agentleFS
holgerleichsenringholgerleichsenring/specification-first-agentic-development/skills/review-spec/SKILL.md

review-spec

Skill41 starsChanged 15 days agoMITView on GitHub

Review a spec before any code: a script resolves every cited file and line, then a fresh reviewer answers BUILD, BUILD WITH CUTS or REFUSE. Triggers after create-spec or on 'review the spec'.

18 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 2 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 17 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run this in the main thread: the reviewer must be a fresh subagent, and only the main thread holds the Agent tool.

    line 10
  2. Distinctive:

    After any change re-run step 1, then spawn a fresh reviewer (step 2).

    line 39

“Common” is measured: kept by at least 6 in 10 of the 17 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Review Spec

Run this in the main thread: the reviewer must be a fresh subagent, and only the main thread holds the Agent tool. The spec under review is the planned file create-spec just committed in the spec's worktree.

1. Run the evidence check

python3 "${CLAUDE_SKILL_DIR}/scripts/check-evidence.py" .{project}/specs/planned/{id}-{label}.yaml

It reads every facts[].evidence and checks: each cited path is a file, each cited line lies inside it, each observed: segment carries a real date (yyyy-MM-dd). Refused: a fact citing nothing, a minted [Ln] line, a path under .{project}/specs/planned/ or active/ (a plan is not evidence), a qualifier (name:path/…) not declared in a context's evidence_roots:. A declared qualifier resolves against its path when that path exists in this checkout; otherwise it is accepted unchecked.

  • Exit 0: clean. Exit 1: fix every printed line — re-open the file, re-cite, or turn the fact into an assumption. Re-run until 0.
  • Exit 2: usage error — fix the call. Exit 4: the spec still lies under a 2.4 phases directory — run update-project's scripts/migrate-specs-layout.py, commit, and run the check again. Exit 3, or python3 missing: tell the user "evidence check did not run" and why. Never treat a check that did not run as a pass.

2. Spawn one reviewer

Spawn ONE subagent. It has no conversation history, so give it everything:

  • the spec path and full text;
  • the wider goal — what the user asked for and why, in two or three sentences;
  • this brief, verbatim:

Attack this spec before anyone builds it. Open every cited file around the cited lines — a valid citation is not a true claim. Follow every field, setting and value the spec touches to its sinks: who reads it, who writes it, what else breaks. Extract archives and generated files before reasoning about them. Check every step against the code as it is, not as the spec says it is. Answer with exactly one verdict — BUILD, BUILD WITH CUTS, or REFUSE — and back each finding with file:line evidence. For BUILD WITH CUTS name each cut precisely. REFUSE is a successful result when the spec is wrong. Check upgrade_impact: against what the steps will change: a new required setting, a changed default, a migration old instances cannot run beside, or a deploy file an operator must edit is an upgrade impact, and it is either opt-in or argued in the spec. A spec that consolidates or changes existing behaviour without a characterisation step is a finding.

3. Apply and repeat

  • BUILD: done. Report the verdict to the user.
  • BUILD WITH CUTS: apply every cut. After each cut, grep the old wording across goal, scope, decisions, steps, tests, done and facts — a cut left standing in another register is not applied. Stay inside the spec budget.
  • REFUSE: rewrite or split the spec per the findings, or take it back to the user.

After any change re-run step 1, then spawn a fresh reviewer (step 2). Stop when the verdict is BUILD, or BUILD WITH CUTS with every cut applied and the script clean. Commit the reviewed spec in the spec's worktree:

git add .{project} && git commit -m "spec: review {id}"

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.