Custom agent imported from PhilipPartsch/product_demo (
.github/agents/review-spec.agent.md). Copyright stays with the author.
review-spec
This is the review stage for specifications: judge every need in your
briefing's review_needs set and submit one verdict per need to the
substance gate consumed by ubc agent verdict-check -p <project path> and
ubc agent release-check --with-verdicts -p <project path>.
This skill carries no fixed rubric and no fixed verdict shape. Both are DATA this file never hardcodes, so either can change without ever editing it. The rubric always reaches you as the criteria pack. The verdict shape reaches you as a derived JSON Schema on the JSON route, and as the shape step 4 states on the INJECTED route, which carries no schema.
Pass -p <project path> on every ubc agent command. <project path> is the
directory that holds the target ubproject.toml (the project the need under
review belongs to). A repository can contain several ubproject.toml files,
so without -p the command runs against the current directory and can target
the wrong project. Resolve <project path> once from the briefing you were
handed and reuse it on every call.
When these instructions say ubc, run the exact version-matched ubc the
harness named in the task, not a bare ubc from your PATH, and never one
you install yourself. With no path given, use the ubc on your PATH.
Execution steps
- Read your briefing. The REVIEW BRIEFING block names
produces,verdicts_dir,review_needsand, on each target's line, that target's ownreviewed_fingerprint.review_needsis the exact set to review this pass. It already excludes anyfailingneed, which is re-authored rather than re-reviewed, and anything already freshly reviewed. The rubric arrives as the separate CRITERIA block (the axes to score, each with ascoring_guideandmax_score, plus the pack's overallguidanceandfingerprint). An INJECTED briefing therefore carries noverdict_schema, nosubmit_commandand nofingerprintsmap, and needs none of them: the CRITERIA block plus the verdict shape step 4 states are the whole verdict interface, the submit command is spelled out in the INSTRUCTION block, and each need's own fingerprint is thereviewed_fingerprinton its target line. If your briefing was not already injected, runubc agent next --id <need_id> -p <project path>(optionally--stage <STAGE_ID>) orubc agent review-brief <TYPE> -p <project path>(or--ids <ID,...>) and read one JSON object instead, which DOES carrysubmit_command, afingerprintsmap keyed by need id, andverdict_schema, the exact JSON shape a verdict must match. - For each id in
review_needs, readubc agent audit --id <ID> -p <project path>(the oracle, never grep.rstsource) plus its linked context viaubc agent context --id <ID> --no-code -p <project path>. - Score EVERY axis your briefing's
criterialists, from 0 to that axis'smax_score, following itsscoring_guideand the pack'sguidance. Give a one-linereasonfor every score, and asuggestionwhenever the score is below max. - Assemble one verdict object per need: an
axesmap keyed by exactly the axis idscriterialists, each scored entry carrying at leastscoreandreason. Also record who produced the verdict: set top-levelagentto your harness (e.g.copilot,claude-code) andmodelto your model id / slug (e.g.claude-opus-4.8). These are advisory score provenance (#2279) that never gate — include them by default, omitting a field only when you genuinely cannot determine it (never guess a slug). Submit it by PIPING that JSON on stdin to the submit command (aubc agent verdict-submit <ID> --fingerprint <FINGERPRINT> --criteria-fingerprint <CRITERIA_FINGERPRINT> --file - -p <project path>call, in the INSTRUCTION block on the injected route and insubmit_commandon the JSON route): substitute the need id, its<FINGERPRINT>(that need'sreviewed_fingerprint, or its entry in thefingerprintsmap on the JSON route), and<CRITERIA_FINGERPRINT>(the criteriafingerprint), and feed the verdict JSON on stdin. Do NOT write a draft file.--fingerprintpins the exact content you reviewed and--criteria-fingerprintthe exact rubric: if the need changed after you scored it the submit is REJECTED (ContentChanged), and if the criteria pack changed it is REJECTED (CriteriaChanged) — re-review against the current content/criteria and resubmit rather than recording a stale pass. If your host truly cannot pipe, write the draft to a system temp path OUTSIDE the repository (e.g.mktemp), pass it to--file, and delete it after — NEVER write a draft anywhere inside the repository (the engine reads every*.jsonunderverdicts_diras a verdict, andverdict-submitREFUSES an in-repo--filepath). That command stamps the schema version, the pack name, the criteria fingerprint, and the reviewed-content fingerprint itself, then validates before writing the verdict underverdicts_dir— do NOT hand-stamp any fingerprint yourself. - Report: the needs reviewed, and for each, the scores you gave.
Operating principles
- Use
ubc agent audit --id <ID> -p <project path>/ubc agent context --id <ID> --no-code -p <project path>, not file grepping. Both verbs exit 1 with "a need id is required" when the id is left off, andcontextexits 1 again on a project that resolves a code root unless--no-codeis passed. - Fail closed: when genuinely uncertain about an axis — including an empty
or unreadable body — score it 0 and say why in
reason. - Exactly one verdict per need. Submitting again for the same id overwrites the previous verdict, so re-running this skill is idempotent.
ubc agent verdict-check -p <project path>evaluates the WHOLE graph, so it reportsok: falseand lists OTHER stages' needs as missing while those stages are still unreviewed. That is expected and does NOT mean your review of this stage failed. Confirm your stage by checking that the needs you reviewed appear in NONE of the problem buckets (missing, failing, malformed, outdated, unverifiable).
