Inputs
- Env: optional
RELAY_SKILL_ROOT defaults to skills.
- Files:
/tmp/relay-ready-contract.json with request, handoff, leaf, and Done Criteria fields; generated request artifacts under ~/.relay/requests/<repo-slug>/.
- Sibling scripts:
${RELAY_SKILL_ROOT:-skills}/relay-ready/scripts/persist-request.js, ${RELAY_SKILL_ROOT:-skills}/relay-dispatch/scripts/dispatch.js.
Relay Ready
Use when
/relay cannot safely bypass straight to planning
- The request is ambiguous, too broad, or may need multiple ordered leaves
- No stable Done Criteria or review anchor exists yet
Do not use when
- Authoring rubrics or dispatch prompts — use
relay-plan
- Delegating implementation work — use
relay-dispatch
- Reviewing executor output — use
relay-review
- Landing a reviewed GitHub change — use
relay-merge
Readiness Judgment
No script scores readiness. Judge the request yourself against these factors,
reading only text outside fenced code blocks — a fenced example is not a signal.
- Clarity is low when any of these hold: a vague verb (
improve, enhance,
clean up, polish); no explicit target (no file path, no function()); a
body under roughly 200 characters. It is high only when an explicit target and
an observable end state both appear in the opening paragraph.
- Granularity is low when any of these hold: a top-level
and joining two
action clauses in the opening line; a multi-verb opener spanning more than one
subsystem; three or more bullets across two or more modules, ignoring
Non-goals, Out of scope, and Tests sections. It is high when one action
verb acts on one subsystem.
- Verifiability is low when subjective wording (
feels, good, smoother,
nicer) carries the criteria, or a Done/Acceptance Criteria heading exists but
its section states nothing observable. It is high when the text names a test
path, a quoted log line, a file or diff target, or a numeric threshold.
- Task shape measures decomposition pressure. Signals: four or more criteria
group headings or eight or more criteria bullets; sprint, epic, milestone,
foundation, roadmap, or initiative scope language; three or more distinct
subsystems; a multi-stage journey (flow, journey, or end-to-end wording plus
three or more stages such as signup, onboarding, review, export); a product
surface mixed with platform foundation terms. Two or more signals — or six or
more criteria groups, eight or more bullets, or four or more subsystems — is a
strong shape.
- Risk is high when
migration, drop, delete, schema, auth,
secret, or prod appears outside fenced code.
Route on that judgment:
- Ready — a Done/Acceptance Criteria heading, an observable assertion inside
that section, no high-risk keyword, single-leaf granularity, and no strong task
shape. Proceed to
relay-plan.
- needs_split — a strong task shape. Take the proposal-first shaping route
below before any dispatch; only an explicit operator override skips it.
- Escalate — high risk together with any low dimension. Confirm scope with
the operator instead of dispatching.
- Otherwise — ask bounded questions until one of the routes above holds.
An accepted relay-ready handoff supersedes the issue's own acceptance criteria
only when the bundle's source identity matches the task in hand: the issue
number or issue URL recorded under source, or, when neither was recorded, the
request_id the operator was given. Before treating an issue body as ready,
check ~/.relay/requests/<repo-slug>/ for such a bundle and use it as the
source of truth. A newer bundle for a different issue is irrelevant — never let
it override the current issue's criteria.
Output Contract
Persist one immutable completed bundle under ~/.relay/requests/<repo-slug>/<request-id>/ (request
frontmatter, raw request, handoff(s), Done Criteria snapshot(s), and a last completion marker). Field-by-field schema with input
requirements plus persisted request and handoff artifact definitions: see
scripts/request-contract.schema.json. persist-request.js
validates the input contract on every persistence call; $defs.RequestArtifact and
$defs.HandoffArtifact document generated frontmatter for downstream consumers.
Persistence Step
Write a JSON contract file with:
source.kind
request_text
- either
handoff for single-leaf or handoffs[] for multi-leaf
- per leaf:
leaf_id, title, goal, order
- per leaf:
done_criteria_markdown
- optional per leaf:
depends_on, in_scope, out_of_scope, assumptions, escalation_conditions
Persist it with:
node "${RELAY_SKILL_ROOT:-skills}/relay-ready/scripts/persist-request.js" --repo . --contract-file /tmp/relay-ready-contract.json --json
Readiness is optional, but if supplied, all readiness dimensions are required; see schema enum domains.
Decomposition Boundary
Scripts only validate and persist handoffs; they do not infer semantic leaf boundaries. The task-shape factors above detect decomposition pressure, not the correct leaves. When the shape is strong, use AI proposal-first shaping to decide whether the request is one high-risk leaf or multiple ordered leaves, then persist the accepted shape. Detailed operator contract and oversized product-foundation example: references/decomposition-contract.md.
Proposal, clarification, answer, and edit state stays in the conversation. Do not
persist mutable intake state or a readiness event journal. Call persist-request.js
once the accepted leaf shape is final. A completed bundle is immutable and an
incomplete bundle fails closed for operator inspection.
Downstream Handoff
After persistence succeeds:
- use
relay-ready/<leaf-id>.md as the source-of-truth input for relay-plan
- dispatch with:
node "${RELAY_SKILL_ROOT:-skills}/relay-dispatch/scripts/dispatch.js" . \
-b <branch> \
--prompt-file <dispatch-prompt-path> \
--rubric-file <rubric-path-from-relay-plan> \
--done-criteria-file <done-criteria-path>
- for multi-leaf requests, dispatch leaves in
decomposition.leaf_order, respecting depends_on
- let dispatch freeze that file into the new run's immutable Done Criteria contract
Do not create a second lifecycle. The readiness gate stops once the relay-ready contract is persisted.
1---2name: relay-ready3description: Verify a task is ready to relay — judge readiness on clarity, granularity, and verifiability, then ask bounded questions when the task is too ambiguous to plan.4---5## Inputs6- Env: optional `RELAY_SKILL_ROOT` defaults to `skills`.7- Files: `/tmp/relay-ready-contract.json` with request, handoff, leaf, and Done Criteria fields; generated request artifacts under `~/.relay/requests/<repo-slug>/`.8- Sibling scripts: `${RELAY_SKILL_ROOT:-skills}/relay-ready/scripts/persist-request.js`, `${RELAY_SKILL_ROOT:-skills}/relay-dispatch/scripts/dispatch.js`.910# Relay Ready1112## Use when1314- `/relay` cannot safely bypass straight to planning15- The request is ambiguous, too broad, or may need multiple ordered leaves16- No stable Done Criteria or review anchor exists yet1718## Do not use when1920- Authoring rubrics or dispatch prompts — use `relay-plan`21- Delegating implementation work — use `relay-dispatch`22- Reviewing executor output — use `relay-review`23- Landing a reviewed GitHub change — use `relay-merge`2425## Readiness Judgment2627No script scores readiness. Judge the request yourself against these factors,28reading only text outside fenced code blocks — a fenced example is not a signal.2930- **Clarity** is low when any of these hold: a vague verb (`improve`, `enhance`,31 `clean up`, `polish`); no explicit target (no file path, no `function()`); a32 body under roughly 200 characters. It is high only when an explicit target and33 an observable end state both appear in the opening paragraph.34- **Granularity** is low when any of these hold: a top-level `and` joining two35 action clauses in the opening line; a multi-verb opener spanning more than one36 subsystem; three or more bullets across two or more modules, ignoring37 `Non-goals`, `Out of scope`, and `Tests` sections. It is high when one action38 verb acts on one subsystem.39- **Verifiability** is low when subjective wording (`feels`, `good`, `smoother`,40 `nicer`) carries the criteria, or a Done/Acceptance Criteria heading exists but41 its section states nothing observable. It is high when the text names a test42 path, a quoted log line, a file or diff target, or a numeric threshold.43- **Task shape** measures decomposition pressure. Signals: four or more criteria44 group headings or eight or more criteria bullets; sprint, epic, milestone,45 foundation, roadmap, or initiative scope language; three or more distinct46 subsystems; a multi-stage journey (flow, journey, or end-to-end wording plus47 three or more stages such as signup, onboarding, review, export); a product48 surface mixed with platform foundation terms. Two or more signals — or six or49 more criteria groups, eight or more bullets, or four or more subsystems — is a50 **strong** shape.51- **Risk** is high when `migration`, `drop`, `delete`, `schema`, `auth`,52 `secret`, or `prod` appears outside fenced code.5354Route on that judgment:5556- **Ready** — a Done/Acceptance Criteria heading, an observable assertion inside57 that section, no high-risk keyword, single-leaf granularity, and no strong task58 shape. Proceed to `relay-plan`.59- **needs_split** — a strong task shape. Take the proposal-first shaping route60 below before any dispatch; only an explicit operator override skips it.61- **Escalate** — high risk together with any low dimension. Confirm scope with62 the operator instead of dispatching.63- **Otherwise** — ask bounded questions until one of the routes above holds.6465An accepted relay-ready handoff supersedes the issue's own acceptance criteria66only when the bundle's source identity matches the task in hand: the issue67number or issue URL recorded under `source`, or, when neither was recorded, the68`request_id` the operator was given. Before treating an issue body as ready,69check `~/.relay/requests/<repo-slug>/` for such a bundle and use it as the70source of truth. A newer bundle for a different issue is irrelevant — never let71it override the current issue's criteria.7273## Output Contract7475Persist one immutable completed bundle under `~/.relay/requests/<repo-slug>/<request-id>/` (request76frontmatter, raw request, handoff(s), Done Criteria snapshot(s), and a last completion marker). Field-by-field schema with input77requirements plus persisted request and handoff artifact definitions: see78[`scripts/request-contract.schema.json`](scripts/request-contract.schema.json). `persist-request.js`79validates the input contract on every persistence call; `$defs.RequestArtifact` and80`$defs.HandoffArtifact` document generated frontmatter for downstream consumers.8182## Persistence Step8384Write a JSON contract file with:85- `source.kind`86- `request_text`87- either `handoff` for single-leaf or `handoffs[]` for multi-leaf88- per leaf: `leaf_id`, `title`, `goal`, `order`89- per leaf: `done_criteria_markdown`90- optional per leaf: `depends_on`, `in_scope`, `out_of_scope`, `assumptions`, `escalation_conditions`9192Persist it with:9394```bash95node "${RELAY_SKILL_ROOT:-skills}/relay-ready/scripts/persist-request.js" --repo . --contract-file /tmp/relay-ready-contract.json --json96```9798Readiness is optional, but if supplied, all readiness dimensions are required; see schema enum domains.99100## Decomposition Boundary101102Scripts only validate and persist handoffs; they do not infer semantic leaf boundaries. The task-shape factors above detect decomposition pressure, not the correct leaves. When the shape is strong, use AI proposal-first shaping to decide whether the request is one high-risk leaf or multiple ordered leaves, then persist the accepted shape. Detailed operator contract and oversized product-foundation example: [`references/decomposition-contract.md`](references/decomposition-contract.md).103104Proposal, clarification, answer, and edit state stays in the conversation. Do not105persist mutable intake state or a readiness event journal. Call `persist-request.js`106once the accepted leaf shape is final. A completed bundle is immutable and an107incomplete bundle fails closed for operator inspection.108109## Downstream Handoff110111After persistence succeeds:1121. use `relay-ready/<leaf-id>.md` as the source-of-truth input for `relay-plan`1132. dispatch with:114115```bash116node "${RELAY_SKILL_ROOT:-skills}/relay-dispatch/scripts/dispatch.js" . \117 -b <branch> \118 --prompt-file <dispatch-prompt-path> \119 --rubric-file <rubric-path-from-relay-plan> \120 --done-criteria-file <done-criteria-path>121```1221233. for multi-leaf requests, dispatch leaves in `decomposition.leaf_order`, respecting `depends_on`1244. let dispatch freeze that file into the new run's immutable Done Criteria contract125126Do not create a second lifecycle. The readiness gate stops once the relay-ready contract is persisted.