| name | elaborate |
| description | Write implement-ready code into ONE phase of a synthesized plan — read the whole plan plus the real code the phase touches, then emit a code-bearing replacement for that single `## Phase N:` section to .rpiv/artifacts/elaborations/. Single-pass, no subagents, no self-review, no questions. Dispatched once per phase by an elaborate fanout after synthesize; the per-phase elaborations are folded back into the plan by the deterministic `stitch-elaborations` script, and the grade panel judges the stitched plan. Use as a fanout unit, not standalone. |
| argument-hint | <plan-path> Phase N: <title> |
| allowed-tools | Read, Edit, Write, Grep, Glob, Bash |
| shell-timeout | 10 |
| disable-model-invocation | true |
| contract | {"produces":{"kind":"produces","meta":{"artifactKind":"elaboration"},"data":{"type":"object","properties":"[Truncated]"}},"consumes":{"meta":{"artifactKind":"[Truncated]"}}} |
Elaborate
You write implement-ready code into one phase of a synthesized plan, in isolation, and emit it as a per-phase elaboration doc. One pass. You do not redesign the phase, write any other phase's code, or self-review — synthesize already reconciled the cross-phase seams and the workflow's grade panel judges the spliced result. You turn one phase's contract-level "what to change" into the actual code to apply.
Input
$ARGUMENTS — <plan-path> Phase N: <title> (exactly the unit shape a phase fanout dispatches):
- The first token is the path to a plan under
.rpiv/artifacts/plans/.
- The remainder (
Phase N: <title>) names the single phase to elaborate. Parse N from Phase (\d+).
Elaborate only that phase. The other phases are owned by sibling lanes — never write their code.
If the plan path is missing or Phase N can't be parsed, print an error and stop — it's a dispatch error, not a failing phase.
Metadata
node "${SKILL_DIR}/../_shared/now.mjs"
echo
node "${SKILL_DIR}/../_shared/git-context.mjs"
Copy values verbatim. <iso> is the first tab-separated field (use as date); ignore the second.
Steps
- Read the plan fully (no limit/offset). Note its
## Synthesis Notes (the reconciled seams — conflict resolutions, shared locals, integration order) and locate the ## Phase N: section you own: its ### Changes (the files/symbols to touch) and its ### Success Criteria. Skim the other phases' sections too — to know what they own and what interfaces they expose — but never implement them.
- Ground in the live code. For every file the phase's
### Changes names, Read/Grep the cited path:line in the current tree. The plan may have been written against a slightly older state — anchor the code you write to what is actually there now (signatures, imports, surrounding style).
- Write the code for this phase only. For each file in the phase's Changes, emit a concrete, paste-ready code block: the full function/section to add, or the exact edit (enough that
implement applies it without guessing). Match the surrounding code's conventions. Where the phase depends on a sibling phase's symbol, reference it by the shape the plan/Synthesis Notes already fixed — do not redefine it.
```