§ reference · skill
elaborate
Writes implement-ready code into one phase of a synthesized plan, emitting a per-phase elaboration to `.rpiv/artifacts/elaborations/` that a deterministic splice folds back into the plan.
§ 01 · purpose
Purpose
Turns one phase's contract-level "what to change" into the *actual code to apply* (paste-ready blocks grounded in the current tree), without redesigning the phase or touching any sibling's files. Dispatched once per phase in parallel after synthesize; the stitch-elaborations program (0 LLM calls) splices the results back, and the code gate grades the spliced plan.
§ 02 · when to use
When to use it
- Dispatched once per phase by the build pipeline's elaborate fanout, after the plan clears its gate.
- A phase's Changes name files and symbols but not yet the code
implementshould apply. - Not standalone. The per-phase docs only matter once the splice folds them back into the plan.
- Prefer
implementdirectly when the plan's phases already embed elaborated code. Re-elaborating a code-bearing plan adds nothing.
§ 03 · inputs
Inputs
| Name | Required | Source |
|---|---|---|
plan + phase name | yes | <plan-path> Phase N: <title> (a plan under .rpiv/artifacts/plans/ plus the single phase to elaborate) |
- plan + phase name
- A missing path or unparseable
Phase Nis a dispatch error, not a failing phase. All other phases belong to sibling lanes.
§ 04 · outputs
Outputs
| Artifact | Path | Format |
|---|---|---|
| Per-phase elaboration doc | .rpiv/artifacts/elaborations/ | markdown: <plan-basename>__phase-<N>.md, body exactly one verbatim ## Phase N: <title> section with per-file code blocks and carried Success Criteria |
§ 05 · key steps
Key steps
- Read the whole plan, own one phase Why: The
## Synthesis Notescarry the reconciled cross-phase seams. Sibling phases' interfaces must be referenced by the shapesynthesizealready fixed. Skimming them is required precisely so their code is never rewritten here. - Ground every change in the current tree Why: The plan may have been written against a slightly older state. The emitted code anchors to the signatures, imports, and style that are actually there now, so
implementcan apply it without guessing. - Emit concrete, paste-ready code blocks per file Why: Prose hand-waving ("handle appropriately", "etc.") is exactly what the code gate's actionability dimension fails. Each block is the full function or the exact edit.
- Carry the phase's Success Criteria intact Why: The criteria are the contract
validateruns later. A check may be tightened where the code makes it more concrete, but dropping or weakening one breaks downstream verification. - Preserve the verbatim phase heading Why: The heading is the splice anchor. The
stitch-elaborationsprogram swaps the plan's section by exact phase number and title, so a renamed heading breaks the deterministic fold. - Resolve ambiguity yourself, on the record Why: N lanes run concurrently, so the skill is non-interactive. A genuine blocker gets the most defensible call, recorded under
## Notes / Deferred, and the grade panel catches a bad one.
§ 06 · related skills
Related skills
upstream synthesizeplan
downstream implement