§ reference · skill
amend
Surgically revises one artifact to clear the failing dimensions a grade panel flagged, re-emitting it in place so the gate re-judges the same channel.
§ 01 · purpose
Purpose
Closes a gate's fix loop *without* a wholesale rewrite: it applies only what the failing verdicts cite and leaves passing content byte-for-byte. The pipeline loops the re-emitted artifact straight back to the grade panel. That re-judging is the only validation, so the skill never self-reviews or asks questions.
§ 02 · when to use
When to use it
- Dispatched as the revise stage of the pipeline's plan-fix and code-fix loops, after a grade panel returns failing verdicts.
- Any graded artifact (research, plan, spliced code-bearing plan) needs targeted correction, not redesign.
- Prefer
slicein re-slice mode when the failure is structural.amendmay touch only cited lines and cannot split a slice or break a dependency cycle.
§ 03 · inputs
Inputs
| Name | Required | Source |
|---|---|---|
artifact | yes | The single --<channel> flag that is not a verdicts (-verdicts), citation-floor (-cite-check), or lineage-source (--goal/--research/--subplans) flag |
verdicts | yes | --<channel>-verdicts <path> (repeatable), verdict JSONs under .rpiv/artifacts/verdicts/ |
citation floors | no | --<channel>-cite-check <path> (repeatable), cite-check verdict JSONs |
lineage sources | no | --goal, --research, --subplans — read-only context, never the artifact to re-emit |
- artifact
- Parsed generically, agnostic to the channel name. The same reviser serves every gate; on both build fix arms it resolves to
--plans. If exactly one artifact flag and at least one verdicts flag cannot be identified, the skill errors and stops. - verdicts
- Grouped by dimension; only the latest verdict per dimension counts.
- citation floors
- The deterministic citation floor's verdicts, threaded alongside the LLM panel's —
--plan-cite-checkon the plan-fix arm,--code-cite-checkon the code-fix arm. - lineage sources
- Build fix arms only. A completeness-class finding is repaired by reading the authoritative content here rather than reconstructing it from verdict prose.
plan-fixthreads all three;code-fixthreads only--goaland--research.
§ 04 · outputs
Outputs
| Artifact | Path | Format |
|---|---|---|
| The revised artifact, re-emitted at its SAME path | — | unchanged: Edit in place, status: ready preserved, last_updated bumped |
§ 05 · key steps
Key steps
- Read the artifact fully and every verdict JSON Why: Verdicts accumulate across fix loops, so an older failing verdict may already be superseded. Only the latest per dimension (by
graded_at) reflects the gate's current judgment. - Select the failing findings — plus any verdict carrying a risk-duty demotion Why: Dimensions that pass are settled; touching them risks regressing a pass and expands the diff the panel must re-judge for no gain. The one exception is grader-side — a latest-per-dimension verdict with a non-empty
risk_duty_demotionsarray is selected even when its ownpassistrue. That demotion is a signal to re-judge, not a plan defect:amendmanufactures norisks:edits for it, so when nothing else fails the artifact is re-emitted unchanged with onlylast_updatedbumped. - Apply each finding's feedback surgically at its
whereanchor Why: The verdict'sfeedbackis the instruction set andwherelocates the exact spot. Changes no finding asked for are scope creep the panel never sanctioned. - Ground codebase-dependent fixes by reading, never editing, the repo Why: The boundary is the working tree.
implementowns code. But a code-bearing plan's embedded code blocks are artifact content. So a fabricated edit anchor or driftedfile:lineinside one is fixed in place like any other finding. - Re-emit to the same path Why: Same filename keeps the artifact's channel latest-wins, so the grade panel re-judges the same unit instead of forking a parallel artifact history.
§ 06 · related skills
Related skills
upstream grade