spec-review
Skill0 starsChanged 8 days agoMITView on GitHub
External review of a design spec before the user approves it. Launches Codex in an Orca terminal beside the session (codex exec only as the launcher's last resort, then a fallback reviewer agent), routes confidence-7+ findings through the TypeSafe judge (findings against the user's own decisions go to the user), revises the spec, runs at most one re-review round, then hands off to writing-plans on its own when the last review round is clear of P0/P1 findings, and asks the user to approve the spec only when it is not. Use after kickoff writes a spec, or when asked to "review the spec".
55 other projects use a version of this.
Adopted by
Most recently taken up by
- thistleknot/skillstheir own version, first seen Nov 29, 2026
- stalniy/skillstheir own version, first seen Nov 29, 2026
- tomoyaf/aiskillpod-skillstheir own version, first seen Nov 29, 2026
- jayanez/spec-torquetheir own version, first seen Nov 29, 2026
- DavidCho1999/archaiflow-skillstheir own version, first seen Nov 29, 2026
- uchida-s07/claude-skillstheir own version, first seen Nov 22, 2026
Used with
Projects with it also use get-pr-reviews, push-everything and 9 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
saffron-healthSkillget-pr-reviews
Get nicely formatted output of the last review comments on a PR. Used internally by other skills.
Also in 3 projects that use this
saffron-healthSkillpush-everything
Stage ALL changes in the repository (not just session changes), commit, and push. Use when you need to commit all pending changes.
Also in 3 projects that use this
fernandoxavier02Skillspec-requirements
Generate EARS-format requirements based on project description and steering context. Use when generating requirements from project description.
Also in 3 projects that use this
NVIDIASkillgenerate-spec
Produce a feature specification covering API changes, backward compatibility, cross-language impact, performance, and a file-level change plan. Use when designing a new feature, planning a significant change, or the user asks to spec something out.
Also in 3 projects that use this
xfstudioSkillspec-tasks
Generate actionable, dependency-ordered tasks.md organized by user story. Use when user says "/spec-tasks", "create tasks", "generate task list" after /spec-plan to prepare for implementation.
Also in 3 projects that use this
telefrekSkillspec-init
Bootstrap the spec corpus for this project
Also in 3 projects that use this
- +2 more from saffron-health
Other versions55 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 55
- microsoft/winappCli★ 1.4ksame name
- utopia-rise/godot-kotlin-jvm★ 1ksame name
- utopia-rise/fmod-gdextension★ 954same name
- cashew-labs/libretto★ 911same name
- saffron-health/libretto★ 911same name
- liza-mas/liza★ 426same name
- HHU3637kr/skills★ 150same name
- saffron-health/opencode-gui★ 59same name
- agent-ix/quoin★ 20same name
- aictrl-dev/skills★ 18same name
45 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository11 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- finishing-a-development-branchSkill
- kickoffSkill
- plan-reviewSkill
- reviewSkill
- subagent-driven-developmentSkill
- systematic-debuggingSkill
- test-driven-developmentSkill
- typesafe-aiSkill
- verification-before-completionSkill
- writing-plansSkill
The file
We split this skill into the rules it gives an agent
7 rules. 0 are common, 0 are distinctive, and 7 are very specific to this project.
0
Common
Most of the 49 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 27
If it prints spec not found, spec is not inside a git repository or spec is outside the repository, stop with that message.
- Very specific: line 34
Create a temp file outside the repo (under $TMPDIR) containing, in order:
- Very specific: line 93
Run the judge exactly as judge.md says.
- Very specific: line 99
If the report has no confidence-7+ finding (None under ## Findings (confidence 7+)), skip this section: append nothing and commit nothing.
- Very specific: line 108
Commit only the spec, so unrelated work in the checkout stays out and an untracked spec is included: git add -- "$SPEC" && git commit -m …
- Very specific: line 138
Never start implementation from this skill, and never write the plan from it: the plan is writing-plans' job, invoked only once the spec is …
- Very specific: line 139
Never edit REPORT; it is the reviewer's artifact.
“Common” is measured: kept by at least 6 in 10 of the 49 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.
Files
Spec Review
Announce at start: "Using spec-review on <spec path>."
0. Inputs
SPEC: the argument, or the newest spec by modification time —ls -t docs/specs/*-design.md 2>/dev/null | head -1; print which file was chosen. Stop with a message if none; do not launch a reviewer. Then normalize it to a path relative to the repository that contains it, so an absolute or../argument works:ARG="<the argument, or the ls -t result>" [ -f "$ARG" ] || { echo "spec not found: $ARG"; exit 1; } command -v realpath >/dev/null || { echo "realpath not found; pass a repo-relative spec path"; exit 1; } SPEC_ABS="$(realpath "$ARG")" # resolves the file itself, so a symlink to an outside file is caught below TOP="$(git -C "$(dirname "$SPEC_ABS")" rev-parse --show-toplevel 2>/dev/null)" [ -n "$TOP" ] || { echo "spec is not inside a git repository: $SPEC_ABS"; exit 1; } case "$SPEC_ABS" in "$TOP"/*) ;; *) echo "spec is outside the repository: $SPEC_ABS"; exit 1;; esac SPEC="${SPEC_ABS#"$TOP"/}" echo "TOP=$TOP"; echo "SPEC=$SPEC"If it prints
spec not found,spec is not inside a git repositoryorspec is outside the repository, stop with that message. Run every later block fromTOP(cd "$TOP"first), withSPECas printed.REPORT:<directory of SPEC>/<spec basename without .md>.review.md— beside the spec, always repo-relative;reviewer.shrejects an absolute path. It is relative to the reporeviewer.shworks in, so run from the repo containingSPEC, or pass--repo <that repo>toreviewer.sh.ROUND: 1.- Locate the repo and the judge protocol: read
judge.mdfrom thekickoffskill directory (same repo,skills/kickoff/judge.md; locate the repo with the snippet in that file, replacingkickoffwithspec-review). Every fenced block below is one shell call: fillSKILL_DIRfrom this loaded skill's absolute base directory and run the locator in each call that uses$SKILLS_REPO. Read the runtime adapter for Codex command sessions and delegation.
1. Build the prompt
Create a temp file outside the repo (under $TMPDIR) containing, in order:
- The full text of
reviewer.mdfrom this skill's directory. THE SPEC:followed by the spec file verbatim inside a fence longer than any backtick run in the spec — use seven backticks unless the spec contains a run of seven or more, then go longer still.Referenced source files:followed by the repo-relative paths mentioned in the spec that are real files: grep the spec for path-like tokens containing/, keep those that passtest -f, drop anything undernode_modules/(repo-localagents/,.claude/and.codex/files stay: the reviewer reads them as data), deduplicate and sort, and keep at most 40 entries.- On round 2 only:
Previous report:followed by the previous report verbatim (from<REPORT>.round1.md), thenReview the whole revised spec: report every finding from the previous report that is still present, mark fixed ones as resolved, and report new findings the spec changes introduced. Write the report to <REPORT>on its own line — the last line of the file, in round 1 and round 2 alike. Self-check before launching:[ "$(tail -1 "$PROMPT")" = "Write the report to $REPORT" ] || echo "prompt malformed". If it printsprompt malformed, rebuild the prompt in this order and re-check; do not launch the reviewer.
Say nothing about models or reasoning effort in the prompt — the launcher pins those.
2. Launch the external reviewer
The reviewer is Codex in an Orca terminal opened beside this session — a visible tab the user can watch. codex exec is only the launcher's last resort: reviewer.sh itself falls back to it when Orca cannot start a Codex terminal, and says why on stderr. So launch only by running the block below as written: never run codex, codex exec or orca terminal … yourself, never write your own launcher, never skip the block because Orca "looks unavailable". In Claude Code run the block with dangerouslyDisableSandbox: true (the sandbox can cut Orca's local socket and Codex's network, which silently turns the review into codex exec) and run_in_background: true (the review outlives the Bash timeout; you are notified when it exits).
Substitute the real paths and round values for the placeholders before running:
SKILL_DIR="<absolute directory of the loaded spec-review skill>"
SKILLS_REPO="$(cd -P "$SKILL_DIR/../.." 2>/dev/null && pwd -P)"
[ -f "$SKILL_DIR/SKILL.md" ] && [ -f "$SKILLS_REPO/scripts/typesafe-judge.mjs" ] || { echo "distro root not found for loaded skill: $SKILL_DIR" >&2; exit 2; }
[ -f "$SKILLS_REPO/scripts/reviewer.sh" ] || { echo "reviewer not found: SKILLS_REPO=$SKILLS_REPO" >&2; exit 2; }
PROMPT="<the temp prompt file from section 1>"
REPORT="<REPORT, repo-relative>"
ROUND="<1 or 2>"
ROUND1_REPORT="<the round-1 REPORT; in round 2 the same value as in round 1>"
SESSION="$(git rev-parse --show-toplevel)/.context/spec-review-$(basename "$ROUND1_REPORT" .md)-session"
echo "SESSION=$SESSION"
# Round 1 starts fresh: close an orphan left by an interrupted earlier review of this spec.
[ "$ROUND" = 1 ] && bash "$SKILLS_REPO/scripts/reviewer.sh" --close-session "$SESSION"
bash "$SKILLS_REPO/scripts/reviewer.sh" --prompt-file "$PROMPT" --output "$REPORT" --title spec-review --timeout-min 15 --session-file "$SESSION"
echo "reviewer_exit=$?"0: report is atREPORT; note which path ran (reviewer: orca/reviewer: codex-exec). Onreviewer: codex-exec, copy theorca: …stderr line into the section-6 summary as the reason the Orca terminal was not used; do not relaunch by hand.3: dispatch the fallback reviewer with the same prompt file content as its prompt and the instruction to writeREPORT, and wait for it. Claude Code:subagent_type=verus-reviewer(verus-skills:verus-reviewerwhen installed as a plugin), unnamed, in the background, nomodelparameter. For Codex, follow the runtime adapter: prepend the matching role body to the task prompt and dispatch in fresh context with the native subagent tool. On a host with no subagent tool at all, do not stop: perform the review yourself in this session followingreviewer.mdexactly, writeREPORT, and state in the report header that it was produced by the fallback reviewer, not an independent second voice.1: fix the invocation; do not proceed. An Orca terminal that could not be closed is left recorded in the session file, and the section-6 close retries it.- any other exit code (e.g.
127): the launcher was not found or could not run — treat as1: fix the invocation, do not proceed.
3. Triage findings
Parse ## Findings (confidence 7+). For each finding, in order of severity:
First check whether the finding touches a recorded decision. A finding against a user decision — it names a question in the spec's Decisions section marked user, or its fix would change what such a decision settled: do not call the judge. Ask the user directly: the finding verbatim, the decision it contradicts, 2–4 concrete ways to resolve it (keeping the decision is one of them, with its strongest argument), and your recommendation. A finding against an auto decision is triaged like any other finding below. A recommended decision counts as auto here.
Then decide whether the finding is a real choice.
One reasonable fix — for example a false claim about the repository with an obvious correction, or a contradiction between two sections where one side is plainly the intended one: do not call the judge. Accept it and print, in place of a decision block:
accepted without the judge: <finding one-liner> — <the evidence: file:line, command output, the spec text on both sides>
Record that line with the decisions (section 4).
Otherwise build a judge question about how to fix it:
question: "How should <the finding, in a few words> be fixed?"- options: 2–4 concrete ways to fix it, each one a reasonable engineer could pick, each with its concrete consequence in
description. The reviewer's proposal may be one of them. A "leave it as is" option is allowed only when itsdescriptionstates the strongest argument for leaving it; never add a bare "reject". Map each option to the judge's JSON fields:labelis a short name,descriptionthe consequence. context: a structured object —goal(the spec's Goal, one sentence),decisions(the spec's recorded decisions the finding touches, and findings already triaged in this round),facts(the finding verbatim, the relevant spec excerpt, and the repository fact it rests on with file path and short excerpt),constraints(the user's rules and the spec's Non-goals),consequences(one entry per option id, each naming what concretely happens or breaks — file, behaviour, test — if that option is chosen; equal specificity and length for every id, no comparative or preference language). Facts only — a stranger readingfactsalone must be able to pick.recommended: your pick. It is shown to the user and never sent to the judge.
Run the judge exactly as judge.md says. Accepted → apply the decision; unaccepted → take your recommended option without asking and apply it the same way; any non-zero judge exit → ask the user. Print every decision block in chat as it happens.
Findings in the Appendix are not acted on; leave them in the report.
4. Revise the spec
If the report has no confidence-7+ finding (None under ## Findings (confidence 7+)), skip this section: append nothing and commit nothing; the section-6 summary says the report was CLEAR.
Otherwise apply to SPEC directly (edit the affected sections) the chosen action of every judged finding, whatever its option letter and whether the judge accepted it, it fell back to your recommendation, or the user chose it, the user's answer to every finding against a user decision, and every finding accepted without the judge. A "leave it as is" choice is recorded with the decisions but changes nothing in the spec. Do not edit the spec's Decisions section: it is the interview record, and a later section supersedes it. Append to the spec a section:
## Spec review decisions (round N)
<one decision block per judged finding, the question and the user's answer for each finding against a `user` decision, one "accepted without the judge: …" line per finding decided without it, and a "Left as is: <finding> — <argument>" line for each finding the judge or the user chose to leave>Commit only the spec, so unrelated work in the checkout stays out and an untracked spec is included: git add -- "$SPEC" && git commit -m "docs(spec): apply spec-review round N" -- "$SPEC".
5. Second round
Skip round 2 if the round-1 report has no P0/P1 at confidence 7+. Otherwise, if ROUND is 1 and at least one finding changed the spec: copy the round-1 report to <REPORT>.round1.md first (reviewer.sh deletes REPORT at startup, so the only copy would be lost), then set ROUND to 2, rebuild the prompt (section 1, reading the previous report from <REPORT>.round1.md), relaunch (section 2; pass the same SESSION as round 1 — in Orca that reuses round 1's terminal, so the reviewer sees its own earlier context), triage and revise again.
Stop after round 2.
6. Hand off
First close this review's reviewer session:
SKILL_DIR="<absolute directory of the loaded spec-review skill>"
SKILLS_REPO="$(cd -P "$SKILL_DIR/../.." 2>/dev/null && pwd -P)"
[ -f "$SKILL_DIR/SKILL.md" ] && [ -f "$SKILLS_REPO/scripts/typesafe-judge.mjs" ] || { echo "distro root not found for loaded skill: $SKILL_DIR" >&2; exit 2; }
SESSION="<the SESSION printed by section 2>"
bash "$SKILLS_REPO/scripts/reviewer.sh" --close-session "$SESSION"Report to the user: rounds run, reviewer path used, findings accepted/left/asked, path of the final report, and — when round 2 ran — the path of the kept round-1 report (<REPORT>.round1.md).
Then decide whether the spec is clear: the last round run (round 1 when round 2 was skipped, otherwise round 2) has no P0/P1 at confidence 7+, and its report came from Codex (reviewer: orca / reviewer: codex-exec) or the fallback reviewer agent — not from the in-session review on a host with no subagent tool.
Clear: do not wait for approval. The user answered the interview and the reviewer found nothing blocking; the spec needs no second read. Say: "Spec reviewed and clear: <SPEC>. Moving on to the plan with writing-plans — write here at any time to stop or change the spec." and invoke writing-plans (verus-skills:writing-plans when installed as a plugin) with the spec path right away. Invoke nothing else.
Not clear: name why (the P0/P1 findings of the last round that no reviewer has seen fixed, or the in-session review), then say: "Spec written and reviewed: <SPEC>. Review it; when approved I will write the plan with writing-plans." Wait for the user's explicit approval. If they ask for changes instead, apply them to the spec and commit only the spec (git add -- "$SPEC" && git commit -m "docs(spec): apply user changes after spec-review" -- "$SPEC"). Then, if the changes touch Goal, Non-goals, Design or Decisions and round 2 has not run, run round 2 on the edited spec: copy the round-1 report to <REPORT>.round1.md, set ROUND to 2, go through sections 1–4 again (section 2 with the same SESSION value — the session was closed, so the launcher opens a fresh terminal), close the session again, and come back to this paragraph. Otherwise ask for approval again, naming the edits no reviewer saw. On approval invoke writing-plans (verus-skills:writing-plans when installed as a plugin) with the spec path. Invoke nothing else.
Rules
- Never start implementation from this skill, and never write the plan from it: the plan is
writing-plans' job, invoked only once the spec is clear or the user has approved it. - Never edit
REPORT; it is the reviewer's artifact. Decisions go into the spec. - One re-review round maximum. Residual P2/P3 go to the spec's
Spec review decisions (round N)section as "deferred". - Whenever this skill stops — hand-off, a stop after round 1 or 2, a failed launch, a user who does not approve — first run
reviewer.sh --close-session "$SESSION"(section 6), so review terminals never pile up.
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
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.

