§ reference · skill
grade
Judges one artifact along one named quality dimension and writes a verdict JSON to `.rpiv/artifacts/verdicts/` as a single member of a gate's grading panel.
§ 01 · purpose
Purpose
Keeps each quality judgment *narrow and honest*: one panel member, one dimension, no fixes. The pipeline dispatches it once per dimension at each gate and folds the verdicts into an advance/loop decision. A grader that drifted outside its dimension, or softened a real blocker, would corrupt the gate itself.
§ 02 · when to use
When to use it
- Dispatched per dimension by the pipeline's three gates. The gates are slice-grade (
design-readiness), plan-grade and code-grade (five artifact dimensions each). - You need a machine-readable pass/fail verdict on a research, slices, design, or plan artifact.
- Not standalone. The pipeline, not the grader, folds per-dimension verdicts into a decision.
- Prefer the slice-check program for structural invariants (dependency cycles, coverage conservation). Those are verified with 0 LLM calls, not graded.
§ 03 · inputs
Inputs
| Name | Required | Source |
|---|---|---|
--dimension | yes | Gate wiring |
--artifact | yes | The artifact channel under review |
--context | no | A supporting artifact, e.g. the research doc |
--goal | no | The user's verbatim brief, captured at run start |
- --dimension
completeness,correctness,actionability,architecture-fit,pattern-following, ordesign-readiness(slice maps only).- --context
- Required for
architecture-fit. - --goal
- Read only for
completenessandcorrectness; every other dimension ignores it. Goal-based findings must quote the goal's actual wording.
§ 04 · outputs
Outputs
| Artifact | Path | Format |
|---|---|---|
| Verdict | .rpiv/artifacts/verdicts/ | JSON: { dimension, pass, score, severity, findings[], feedback } |
§ 05 · key steps
Key steps
- Validate the flags, bail on a dispatch error Why: A missing or unrecognized flag is a wiring problem, not a failing grade. Emitting a verdict for a misdispatch would poison the gate's fold.
- Read fully, then select the single rubric row Why: Every other dimension is another panel member's job; staying inside the assigned row is what stops findings from double-counting across the panel.
- Spot-check the live codebase where the rubric demands it Why:
correctness,architecture-fit,pattern-following, anddesign-readinessclaims can only be falsified against real code. Grading the artifact's prose alone would judge fluency, not truth. - Rate severity honestly Why: Severity is gate-load-bearing (only a
medium+ finding blocks, even onpass:false). Soft-rating a real blocker ships a defect, and inflating a cosmetic nit stalls the loop. - Write feedback as a surgical instruction set on fail Why: The
feedbackfield is the only thingamendreads. It must name exactly what to change (and fordesign-readiness, the exact re-cut seam) or the fix loop spins. - Emit machine-valid JSON, even on pass, and re-read it Why: The gate parses verdicts with a strict JSON parser and collects the file to score the gate. A malformed or missing verdict bounces the flow into needless re-work even when the judgment was PASS.
§ 06 · related skills
Related skills
upstream slicesynthesizeelaborate