Grade every AC and EC of a change folder against the code at HEAD (covered by a passed test, by code only, a gap, or changed), with the frozen-requirements and unplanned-file checks; a gap blocks the PR until it is fixed or accepted by name.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Spec.Verify?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/ivan-ii-tech-digital-spec-verify)
---
name: spec.verify
description: Grade every AC and EC of a change folder against the code at HEAD (covered by a passed test, by code only, a gap, or changed), with the frozen-requirements and unplanned-file checks; a gap blocks the PR until it is fixed or accepted by name.
argument-hint: <CHANGE_DIR> [--set spec-verify.<field>=<value> ...]
disable-model-invocation: true
model: sonnet
---
## Input
```text
$ARGUMENTS
```
The acceptance check of a change folder. One fresh agent, the `spec-verify` seat of the `spec-implement` team
(Sonnet by default; `--set spec-verify.model=opus` or `teams.spec-implement.seats.spec-verify` switches it), grades
every AC and EC against the code with evidence. It never saw the build. `/spec.implement` runs the same seat in
Phase 7: its lead runs step 2 below (no check-set run of step 3: 7a takes the newest log, 7d's one full run feeds the
re-check) and gives the agent the section "Procedure". You read only the agent's
verdict lines, never the spec files.
## Run on its own
1. **Folder.** `ak-resolve-change-dir "<path>" --json`, or with no path on a change branch
`ak-resolve-change-dir --json`: read `CHANGE_DIR` and `CHANGE_WORKTREE` (`<WT>`). No
`1-requirements/user-stories.md` in it: nothing to verify, say so and stop.
2. **Inputs**, one call, no model reads them whole: `ak-verify-inputs <CHANGE_DIR> <scratchpad>` writes `diff.patch`
(base..HEAD outside the folder), `freeze.patch` (`1-requirements/`, `4-alignment/`; only with a `baseline:`) and
`unplanned.txt` there, and prints `{head, base, base_source, freeze_checked, log, log_sha, log_counts_at_head,
dirty}`. The base is `baseline:` in `.change.yaml`, else the merge-base with `origin/<DEV_BRANCH from the
resolver>` (`base_source: merge-base`: say so in the report; the freeze check is skipped, since the spec may have
been written on this branch). Exit 2: say its message and stop. `dirty`: say the verdict covers HEAD only.
3. **Log.** `log` is the newest `## Gate runs` line of `6-verification/verification.md` whose log still exists.
None counts (`log_counts_at_head` false): run the check set once,
`AK_VERBOSE=1 ak-check-all >"<CHANGE_DIR>/6-verification/logs/check-all-<sha12>.log" 2>&1` in `<WT>` (ak-quality
on; else there is no log; a new `logs/` gets a `.gitignore` holding `*`). Name a log by its path from `<WT>`.
4. **Seat.** `ak-resolve-team spec-implement --team "${CLAUDE_PLUGIN_ROOT}/teams/spec-implement/team.json" --project
<WT> --worktree <WT>` plus any `--set` from the input, to `<scratchpad>/team.resolved.json`; print its summary
line. Non-zero exit: print every error and stop. Take the `spec-verify` agent; the seat disabled: say so and stop.
5. **Spawn** it as the `spawn-team-with-command-model` skill says (invoke it first): its roster `model` and `spawn`
(`fresh` by default). The prompt lists its `readFirst`, `roleFile` and `instructionsFile`, this file
(`${CLAUDE_PLUGIN_ROOT}/skills/spec.verify/SKILL.md`, section Procedure), `CHANGE_DIR`, `<WT>`, the HEAD and base
SHAs, the input paths (the log with its SHA and whether it counts at HEAD), the ids the user already accepted
(from `verification.md`) and the output path. Check its file's headings (`grep -n '^#'`; one fix round), then stop
it.
6. **Record** in `<CHANGE_DIR>/6-verification/verification.md` (filled from
`${CLAUDE_PLUGIN_ROOT}/templates/6-verification/verification.md` when absent): the `Acceptance` line of `## Exit`
with the verdict and `Checked: <HEAD>`, and one `## Findings` row per `gap` and `freeze` row (from `spec-verify`,
label `fix`, status open). Commit nothing; say what changed.
7. **Gaps block the PR** until each is fixed or accepted by name. Send the user one `clarify-first` batch, one
question per gap: build it, or accept what was built. An accepted gap gets status `accepted by the user <date>`
with the reason; one that changes behaviour also updates `1-requirements/user-stories.md`,
`1-requirements/edge-cases.md` or `4-alignment/alignment.md` with `Decided <YYYY-MM-DD>: <decision>
(clarifications.md)` beside the change, and the answer goes to `clarifications.md`.
8. **Report:** the verdict with its `Checked:` SHA, the gaps, the rows covered by code only, the paths, what was not
run and why. Delete the scratchpad inputs.
## Procedure
You are the `spec-verify` agent. This is a static check: you read files; you run no code and no test. Every input
comes from your prompt.
**Read** in full: `1-requirements/` (`scope.md` for `AC-0.x`, `user-stories.md`, `edge-cases.md`),
`4-alignment/alignment.md` (it wins over what it modifies), `6-verification/test-cases.md`,
`5-implementation/tasks.md` and `clarifications.md`, where present. Read the diff in parts and open the files it
touches as you grade. Ids follow the templates folder's `README.md`, section Ids.
**Grade** every `AC-n.x` (the `AC-0.x` ones too) and every `EC-n`, one row each:
| Grade | When | Evidence |
|---|---|---|
| `test` | a test covers it and passed in the log that counts at HEAD | the test name and `file:line`; the regression it catches: the code break that makes it fail |
| `code` | built, with no passed test at HEAD | `file:line`, and why: no test, test not in the log, `check-all stale` (the log does not count at HEAD), or no log |
| `untestable` | `test-cases.md` marks it `untestable: <why>` | the code's `file:line`; with no code it is a `gap` |
| `changed` | built differently, allowed by `alignment.md` or a `Decided <date>:` line | what changed, and the line that allows it |
| `gap` | not built, built in part, or built differently with no allowance | what is missing |
- A test counts only when its name shows as passed in the log and it would fail if the behaviour broke: it asserts
the result the AC names, at the surface the AC names (the screen, the response, the file), not an inner helper.
When the TC has `Level`, `Test data` or `Evidence` fields, the test must observe what they say.
- A row you cannot settle from the files is a `gap` with "unclear: <what>", never a guess. A row your prompt lists as
accepted by the user keeps its grade, marked `accepted <date>`, and does not block.
**Intent readings.** One line per story: `US-n: <what it is for, in your words> — built as <one line>`. A mismatch is
a `gap` on the AC it touches.
**Frozen files.** Each hunk of the freeze diff with no `Decided <YYYY-MM-DD>:` line in it or beside it is a row
`freeze — <file>:<line>: changed without a dated decision`; it blocks like a gap.
**Unplanned files.** For each path in the unplanned list: the task whose text it serves, or `unplanned — <path>`,
a finding for the lead.
**Verdict:** `PASS` when no row is an open `gap` or `freeze`; else `GAPS: <ids>`, a freeze row named
`freeze <file>:<line>`.
Write `<CHANGE_DIR>/6-verification/reviews/spec-verify.md`:
```
# Acceptance: <feature>
Verdict: PASS | GAPS: <ids>
Checked: <HEAD sha> · check-all log: <path> at <sha>, counts at HEAD: yes | no (or: none)
## Rows
| Id | Grade | Evidence | Regression it catches |
|---|---|---|---|
## Intent readings
## Frozen files
## Unplanned files
## Rounds
- 1 · <verdict> · Checked: <sha>
## Summary
<rows per grade; each gap in one line>
```
**Re-check.** Resumed with new inputs at a new HEAD: grade again every `gap`, `freeze` and `code` row and every row
whose evidence the new diff touches; keep the rest. Rewrite the file with the new verdict and `Checked:` and add a
`## Rounds` line; earlier rounds stay.
Final message: `PASS` or `GAPS: <ids>`, `Checked: <sha>`, the path, then `FRICTION:` (max 3 lines, or
`FRICTION: none`).