§ 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.

arguments --<channel> <artifact-path> --<channel>-verdicts <verdict-path> [--<channel>-verdicts <verdict-path> ...]

§ 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 slice in re-slice mode when the failure is structural. amend may 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 not ending in -verdicts
verdicts yes --<channel>-verdicts <path> (repeatable), verdict JSONs under .rpiv/artifacts/verdicts/
artifact
Parsed generically, agnostic to the channel name. The same reviser serves every gate.
verdicts
Grouped by dimension; only the latest verdict per dimension counts.

§ 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

  1. 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.
  2. Select only the failing findings Why: Dimensions that pass are settled; touching them risks regressing a pass and expands the diff the panel must re-judge for no gain.
  3. Apply each finding's feedback surgically at its where anchor Why: The verdict's feedback is the instruction set and where locates the exact spot. Changes no finding asked for are scope creep the panel never sanctioned.
  4. Ground codebase-dependent fixes by reading, never editing, the repo Why: The boundary is the working tree. implement owns code. But a code-bearing plan's embedded code blocks are artifact content. So a fabricated edit anchor or drifted file:line inside one is fixed in place like any other finding.
  5. 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

upstream grade
downstream gradeimplement