review
Skill40 starsChanged 4 months agoMITView on GitHub
Canonical review parent command. Runs the default three-stage review for tracks or project changes, and routes to quick-review, bughunt, deep-review, or assist-review when the user asks for explicit review depth or when the review context justifies escalation.
192 other projects use a version of this.
Adopted by
Most recently taken up by
- microsoft/veronatheir own version, first seen Nov 8, 2026
- microsoft/FluidFrameworktheir own version, first seen Nov 8, 2026
- charliee1w/consolidation-memorytheir own version, first seen Nov 8, 2026
- jisuzzzz/haechitheir own version, first seen Nov 8, 2026
- apokamo/kajitheir own version, first seen Nov 8, 2026
- dirien/yet-another-agent-harnesstheir own version, first seen Nov 8, 2026
Used with
Projects with it also use close-spec, design-with-images and 10 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.
dzhngSkillclose-spec
When a spec under specs/<feature>/ is done shipping (a write-spec build, or any planned task that produced a spec), archive it to specs/done/ and rewrite it from a build-plan into a durable rationale — the why, the principles, the invariants — pointing back to the real code for the how. Use when implementation has landed and the plan no longer matches what shipped, or the user says a feature/spec is finished. Pairs with [write-spec](../write-spec/SKILL.md) (the plan this closes) and [review](../review/SKILL.md) (run before closing).
Also in 5 projects that use this
dzhngSkilldesign-with-images
Explore UI and visual design with image generation, then iterate the real implementation against the user-selected concept. Use when brainstorming visual directions, offering mockup variants, or implementing an approved generated design; do not stop at the mockups or the first code approximation.
Also in 5 projects that use this
LambenthanSkilldaily-arxiv
每日从 arXiv 拉取新论文,过滤相关性,auto-ingest 高优先级论文,检测 SOTA 更新
Also in 5 projects that use this
LambenthanSkillexp-eval
实验判决门:Review LLM 独立评判实验结果 → 4 种判决路径 → 自动更新 claims confidence、ideas status、graph edges
Also in 5 projects that use this
- +3 more from dzhng
- +5 more from Lambenthan
Other versions192 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 192
- garrytan/gstack★ 141ksame name
- ansible/ansible★ 71ksame name
- docling-project/docling★ 70ksame name
- traefik/traefik★ 65ksame name
- ClickHouse/ClickHouse★ 51ksame name
- temporalio/temporal★ 24ksame name
- tisfeng/Easydict★ 15ksame name
- juicedata/juicefs★ 15ksame name
- elie222/inbox-zero★ 13ksame name
- gitkraken/vscode-gitlens★ 10ksame name
182 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 repository35 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- web/llms-full.txtllms.txt
- web/llms.txtllms.txt
- adrSkill
- assist-reviewSkill
- bughuntSkill
- changeSkill
- coverageSkill
- debugSkill
- decomposeSkill
- deep-reviewSkill
- deploy-checklistSkill
- discoverSkill
- docsSkill
- documentationSkill
- draftSkill
- graphSkill
- impactSkill
- implementSkill
- incident-responseSkill
- initSkill
- integrationsSkill
- jiraSkill
- learnSkill
- new-trackSkill
- opsSkill
- planSkill
- quick-reviewSkill
- revertSkill
- standupSkill
- statusSkill
- tech-debtSkill
- testing-strategySkill
- tourSkill
- uploadSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
69 rules. 0 are common, 36 are distinctive, and 33 are very specific to this project.
0
Common
Most of the 157 edited versions we read keep these.
36
Distinctive
This author's own choices. Worth a look.
33
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
When draft/graph/schema.yaml exists, this skill must follow the graph-first lookup contract in core/shared/graph-query.md §Mandatory Lookup …
- Very specific: line 25
Run blast-radius assessment via "$DRAFT_TOOLS/hotspot-rank.sh" --repo .
- Very specific: line 31
When draft/graph/schema.yaml does not exist, the graph checks do not run and must be reported as not run — never inferred from grep.
- Very specific: line 90
Do not print "Draft not initialized" and stop — that error belongs to skills that cannot function without context (/draft:learn, …
- Very specific: line 126
Scope exclusivity: Only one of track, project, files, commits
- Very specific: line 127
Modifier normalization: If full is present, enable with-bughunt and with-assist.
- Distinctive: line 131
If no arguments provided:
- Very specific: line 134
If no [~] track, find first [ ] Pending track
- Very specific: line 135
If track found: display Auto-detected track: <id> - <name> [<status>] and proceed
- Distinctive: line 136
If no track is found but the repo has local changes: default to project-level review of current changes
- Very specific: line 137
If no draft/tracks.md exists (zero-setup mode): resolve scope from git per references/zero-setup-mode.md §Scope resolution without tracks — …
- Distinctive: line 138
If no track and no changes: error "No review scope found.
- Distinctive: line 144
If the user explicitly invoked a specialist mode, route directly.
- Distinctive: line 153
When routing, preserve any scope that can be mapped sensibly.
- Very specific: line 164
If no explicit mode is present, continue with the baseline /draft:review workflow below.
- Distinctive: line 184
If exists → use this track
- Distinctive: line 198
Exact match: Use immediately
- Very specific: line 236
If the parent exists: use <first_SHA>^..<last_SHA> as the range
- Very specific: line 237
If the parent does NOT exist (first commit in the repo — git rev-parse fails): use the empty tree SHA …
- Very specific: line 243
If [ ] or [~] tasks exist: Display warning and proceed:
- Distinctive: line 252
No commits found: Warn "No commits found in plan.md, review may be incomplete"
- Distinctive: line 273
If empty: Error "No files match pattern '<pattern>'"
- Distinctive: line 283
If fails: Error "Invalid commit range '<range>'"
- Very specific: line 291
Read and follow the base procedure in core/shared/draft-context-loading.md.
- Distinctive: line 294
No spec.md → skip Stage 2 (spec compliance).
- Distinctive: line 295
Run Stage 1 (automated validation) and Stage 3 (code quality)
- Very specific: line 302
After scope is resolved, decide whether baseline /draft:review should proceed as the full three-stage review or should delegate to a …
- Very specific: line 307
If scope is project/files/commits and the diff is small, prefer /draft:quick-review.
- Distinctive: line 311
no spec/plan context available
- Very specific: line 315
If the review is track-scoped and the output is likely for another reviewer or approver, attach /draft:assist-review unless the user …
- Very specific: line 323
If the diff touches high-risk surfaces, attach /draft:bughunt.
- Very specific: line 332
If the review scope maps cleanly to one high-risk module, attach /draft:deep-review.
- Distinctive: line 339
If the diff spans many modules, do not auto-run multiple deep reviews.
- Distinctive: line 345
always compute and report blast radius / hotspot impact from graph data when available
- Distinctive: line 346
always explain which specialist workflows were auto-invoked and why
- Very specific: line 357
If the heuristic selects /draft:quick-review instead of baseline review, route there directly and stop this workflow.
- Distinctive: line 367
Run shortstat to check diff size:
- Distinctive: line 379
Run full diff in one pass:
- Distinctive: line 449
If any changed file is HIGH IMPACT: escalate Stage 3 thoroughness (check all callers of changed functions) and note this in the report …
- Very specific: line 450
Architecture Conformance: Search for pattern violations documented in draft/.ai-context.md.
- Distinctive: line 451
Dead Code: Check for newly exported functions/classes in the diff that have 0 references across the codebase.
- Distinctive: line 455
Check if any new cross-module includes were added in the diff
- Very specific: line 456
Verify they follow the established dependency direction from "$DRAFT_TOOLS/graph-arch.sh" --repo .
- Distinctive: line 458
Check if changes introduce files in modules listed in graph cycles — flag as higher risk
- Distinctive: line 513
PASS: No critical issues found → Proceed to Stage 2
- Very specific: line 518
After completing Stage 1, recommend appropriate static analysis tools based on the project's tech-stack.md.
- Distinctive: line 561
PASS: All requirements implemented AND all acceptance criteria met → Proceed to Stage 3
- Distinctive: line 562
PASS WITH NOTES: All requirements met but minor gaps in acceptance criteria verification → Proceed to Stage 3 with notes
- Distinctive: line 642
If Stage 3 produces zero findings across all four dimensions, do NOT accept "clean" without this gate.
- Distinctive: line 654
Document the pass in the review report:
- Distinctive: line 688
Run the specialist workflows selected explicitly or by the Step 2.5 heuristics.
- Very specific: line 708
If with-assist, full, or handoff heuristics selected assist-review:
- Very specific: line 710
run /draft:assist-review for the same track context
- Distinctive: line 721
If deep-review escalation is justified and the scope maps to one dominant module:
- Distinctive: line 727
If deep-review is recommended but not auto-run:
- Very specific: line 729
add a Next Actions row pointing to /draft:review deep <module> or /draft:deep-review <module>
- Distinctive: line 744
If same severity from different tools: merge into single finding, combine descriptions
- Distinctive: line 750
Create unified review report in markdown format.
- Very specific: line 752
MANDATORY: Include YAML frontmatter with git metadata: Follow the procedure in core/shared/git-report-metadata.md to gather git info, …
- Distinctive: line 758
After writing the timestamped report, create a symlink pointing to it:
- Distinctive: line 877
No Stage 2 section (no spec compliance)
- Very specific: line 899
Condition: Always update metadata after generating the review report, regardless of verdict.
- Very specific: line 1063
After generating the review report, execute the pattern learning phase from core/shared/pattern-learning.md to update draft/guardrails.md …
- Very specific: line 1139
Every review report must end with a ## Next Actions section listing the smallest set of follow-ups in execution order.
- Very specific: line 1160
Coverage check: If TDD enabled in workflow.md, auto-run /draft:coverage and include results in review report
- Distinctive: line 1164
After review completion, based on findings:
- Very specific: line 1187
If Jira ticket linked, sync via core/shared/jira-sync.md:
- Distinctive: line 1194
Before printing the final verdict, internally verify and report:
- Very specific: line 1200
If draft/graph/schema.yaml does not exist, set Graph files queried: NONE and use justification graph data unavailable.
“Common” is measured: kept by at least 6 in 10 of the 157 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
Code Review
You are conducting a code review using Draft's Context-Driven Development methodology.
MANDATORY GRAPH LOOKUP (read before any review stage)
When draft/graph/schema.yaml exists, this skill must follow the graph-first lookup contract in core/shared/graph-query.md §Mandatory Lookup Contract. Stage 1 (Automated Validation) starts from the graph:
First resolve the bundled helpers:
# Locate Draft's bundled helpers (cwd is the user's project; ${CLAUDE_PLUGIN_ROOT}
# is not exported into skill Bash). See core/shared/tool-resolver.md.
DRAFT_TOOLS="${DRAFT_PLUGIN_ROOT:-$(cat ~/.cache/draft/plugin-root 2>/dev/null)}/scripts/tools"
[ -d "$DRAFT_TOOLS" ] || DRAFT_TOOLS="$(ls -d ~/.claude/plugins/cache/*/draft/*/scripts/tools 2>/dev/null | sort -V | tail -1)"
[ -d "$DRAFT_TOOLS" ] || DRAFT_TOOLS="$(ls -d ~/.claude/plugins/marketplaces/*draft*/scripts/tools 2>/dev/null | tail -1)"
[ -d "$DRAFT_TOOLS" ] || DRAFT_TOOLS="$PWD/scripts/tools"- Run blast-radius assessment via
"$DRAFT_TOOLS/hotspot-rank.sh" --repo .and"$DRAFT_TOOLS/graph-impact.sh"(see Stage 1). - For each changed file with non-trivial diff size, run
"$DRAFT_TOOLS/graph-impact.sh" --repo . --file <path>to obtain the affected module set deterministically. - For each public symbol modified, run
"$DRAFT_TOOLS/graph-callers.sh" --repo . --symbol <name>to enumerate downstream callers before judging breaking-change severity.
Filesystem grep is reserved for source-text scans (string literals, log messages, regex matches in code) — not for discovering modules, files, or callers when the graph can answer.
When draft/graph/schema.yaml does not exist, the graph checks do not run and must be reported as not run — never inferred from grep. See Step 0.
Red Flags - STOP if you're
See shared red flags — applies to all code-touching skills.
Skill-specific:
- Reviewing without reading the track's spec.md and plan.md first
- Reporting findings without reading the actual code
- Skipping spec compliance stage and jumping to code quality
- Making up file locations or line numbers
- Claiming "no issues" without systematic analysis evidence
Read before you review. Evidence over opinion.
Overview
This command is the canonical review parent.
It orchestrates review workflows at two levels:
- Track-level: Review against spec.md and plan.md (three-stage: automated validation, spec compliance, code quality)
- Project-level: Review arbitrary changes (automated validation + code quality)
Specialist review workflows remain available:
/draft:quick-review/draft:bughunt/draft:deep-review/draft:assist-review
/draft:review should remove the burden of choosing among them when the right depth is obvious from user intent or track state.
Important semantic note:
/draft:impactis not a review-depth mode in the current product. It measures project/track delivery telemetry, not code-change review depth. Do not route/draft:reviewto/draft:impact.
Automated static validation (OWASP secrets, dead code, dependency cycles, N+1 patterns) is natively built into Stage 1 of this review.
Step 0: Detect Setup Level (run first, always)
/draft:review is context-optional. It runs on an un-indexed repo with no setup, so a first-time user gets findings before paying for /draft:init.
ls draft/ 2>/dev/null # absent -> zero-setup mode
ls draft/graph/schema.yaml 2>/dev/null # absent -> graph-lessdraft/ | graph | Mode | Behavior |
| absent | absent | zero-setup | Follow references/zero-setup-mode.md for scope resolution, stage behavior, output, and CTA. Skip Steps 2.1–2.2 and Stage 2. |
| present | absent | graph-less | Full workflow minus graph queries. Report every graph check as not run. |
| present | present | full | Everything below. |
Do not print "Draft not initialized" and stop — that error belongs to skills that cannot function without context (/draft:learn, /draft:deep-review, /draft:tech-debt, /draft:implement). See core/shared/context-verify.md.
In any degraded mode: report what did not run, never simulate it, and end with the specific checks that indexing would add.
Step 1: Parse Arguments
Extract and validate command arguments from user input.
Supported Arguments
Explicit review modes:
quick- Route to/draft:quick-reviewbughunt- Route to/draft:bughuntdeep- Route to/draft:deep-reviewassist- Route to/draft:assist-review
Scope specifiers (mutually exclusive for baseline review):
track <id|name>- Review specific track (exact ID or fuzzy name match)project- Review uncommitted changes (git diff HEAD)files <pattern>- Review specific file pattern (e.g.,src/**/*.ts)commits <range>- Review commit range (e.g.,main...HEAD,abc123..def456)
Quality integration modifiers:
with-bughunt- Include/draft:bughuntresultswith-assist- Include/draft:assist-reviewsummaryfull- Enable all sensible add-ons for the selected scope (with-bughunt,with-assist, and any justified deep-review escalation)
Validation Rules
- Mode exclusivity: At most one explicit mode among
quick,bughunt,deep,assist - Scope requirement: At least one scope specifier OR no arguments (auto-detect track/project)
- Scope exclusivity: Only one of
track,project,files,commits - Modifier normalization: If
fullis present, enablewith-bughuntandwith-assist. Do not silently forcedeep; deep-review is module-scoped and must still satisfy escalation rules.
Default Behavior
If no arguments provided:
- Auto-detect active
[~]In Progress track fromdraft/tracks.md - If no
[~]track, find first[ ]Pending track - If track found: display
Auto-detected track: <id> - <name> [<status>]and proceed - If no track is found but the repo has local changes: default to project-level review of current changes
- If no
draft/tracks.mdexists (zero-setup mode): resolve scope from git perreferences/zero-setup-mode.md§Scope resolution without tracks — uncommitted changes, else branch-vs-default diff, elseHEAD - If no track and no changes: error "No review scope found. Specify a track, files, commit range, or create changes to review."
Step 1.5: Route Explicit Modes Before Baseline Review
If the user explicitly invoked a specialist mode, route directly.
Explicit Mode Routing
/draft:review quick ...→ follow/draft:quick-review/draft:review bughunt ...→ follow/draft:bughunt/draft:review deep ...→ follow/draft:deep-review/draft:review assist ...→ follow/draft:assist-review
When routing, preserve any scope that can be mapped sensibly.
Examples:
/draft:review quick files "src/**/*.ts"→ quick review of those files/draft:review bughunt track payments-refactor→ bughunt scoped to that track/draft:review deep auth→ deep-review of theauthmodule/draft:review assist track add-user-auth→ reviewer-assist summary for that track
Explicit mode always wins over automatic escalation.
If no explicit mode is present, continue with the baseline /draft:review workflow below.
Step 2: Determine Review Scope
Based on parsed arguments, determine review scope and load appropriate context.
Track-Level Review
Trigger: track <id|name> argument OR auto-detected track
2.1: Resolve Track
Check if argument is exact directory match:
ls draft/tracks/<arg>/ 2>/dev/nullIf exists → use this track
- Parse tracks.md for fuzzy matching:
- Read
draft/tracks.md - Split by
---separators - For each section, extract:
- Track ID (from path:
./tracks/<id>/) - Track name (from heading:
### <id> - <name>)
- Track ID (from path:
- Match input against:
- Exact ID (case-insensitive)
- Partial ID (substring)
- Partial name (substring, case-insensitive)
- Read
- Handle matches:
- Exact match: Use immediately
Multiple matches: Display numbered list with format:
Multiple tracks match '<input>': 1. <id> - <name> [<status>] 2. <id> - <name> [<status>] Select track (1-N):Validate selection is within 1-N range. Re-prompt on invalid input.
- No matches: Error with suggestions (closest 3 by edit distance)
2.2: Load Track Context
Once track is resolved:
Verify track directory exists:
ls draft/tracks/<id>/ 2>/dev/null- Read spec.md:
- Load
draft/tracks/<id>/spec.md - Extract: Summary, Requirements, Acceptance Criteria, Non-Goals
- Store for Stage 1 compliance checks
- Load
- Read hld.md and lld.md (when present):
draft/tracks/<id>/hld.md— extract §High-Level Design / Architecture, §Detailed Design (per-component subsections), §Dependencies, §Checklist (Performance/Scale/Security/Resiliency/Multi-tenancy/Upgrade/Cost), §Approvalsdraft/tracks/<id>/lld.md— extract §Classes and Interfaces (signatures, invariants), §Data Model (schemas, migrations), §Error Handling, §Observability metrics- Store for HLD/LLD compliance pass (Stage 1.5 below)
- Read plan.md:
- Load
draft/tracks/<id>/plan.md - Extract commit SHAs from completed
[x]task lines only. Match pattern: 7+ character hex strings in parentheses, regex\(([a-f0-9]{7,})\). Example:- [x] **Task 1.1:** Description (7a7dc85). Collect SHAs in order of appearance; deduplicate keeping first occurrence. - Determine commit range:
- First commit parent: run
git rev-parse <first_SHA>^ 2>/dev/null - If the parent exists: use
<first_SHA>^..<last_SHA>as the range - If the parent does NOT exist (first commit in the repo —
git rev-parsefails): use the empty tree SHA4b825dc642cb6eb9a060e54bf8d69288fbee4904as the range start, i.e.,4b825dc642cb6eb9a060e54bf8d69288fbee4904..<last_SHA>. Alternatively, for single-commit ranges, usegit diff-tree --root -p <first_SHA>to obtain the diff. - Last commit:
<last_SHA>
- First commit parent: run
- Load
- Check for incomplete work:
- Parse plan.md task statuses
- Count
[ ],[~],[x],[!]tasks If
[ ]or[~]tasks exist: Display warning and proceed:Warning: Track has N incomplete tasks (M in-progress, K pending). Reviewing completed work only.
- Handle missing files:
- Missing spec.md: Error "spec.md not found for track
<id>" - Missing plan.md: Warn "plan.md not found, skipping commit extraction"
- No commits found: Warn "No commits found in plan.md, review may be incomplete"
- Missing spec.md: Error "spec.md not found for track
Project-Level Review
Trigger: project, files <pattern>, commits <range> argument, or no active track with local changes
2.3: Project Scope Detection
projectargument:- Scope: Uncommitted changes
- Command:
git diff HEAD
files <pattern>argument:- Scope: Specific files matching glob pattern
- Command:
git diff HEAD -- <pattern> Validate pattern matches files:
git ls-files <pattern> | head -1If empty: Error "No files match pattern '
<pattern>'"
commits <range>argument:- Scope: Commit range
Validate range exists:
git rev-parse <range> 2>/dev/nullIf fails: Error "Invalid commit range '
<range>'"- Command:
git diff <range>
2.4: Load Project Context
For project-level reviews (no track context):
- Load Draft context (if available):
Read and follow the base procedure in
core/shared/draft-context-loading.md. - Note limitations:
- No spec.md → skip Stage 2 (spec compliance); say it was skipped and why
- Run Stage 1 (automated validation) and Stage 3 (code quality)
- Zero-setup mode → also declare every unavailable graph check, per
references/zero-setup-mode.md§What degrades, precisely
Step 2.5: Choose Baseline Review Depth
After scope is resolved, decide whether baseline /draft:review should proceed as the full three-stage review or should delegate to a specialist by default.
Routing Heuristics for Bare /draft:review
Tiny ad-hoc scope with no track context
If scope is project/files/commits and the diff is small, prefer/draft:quick-review.Good signals:
- single file or very small file set
- no spec/plan context available
- user asks for a sanity check rather than a formal gate
Track-complete or handoff review
If the review is track-scoped and the output is likely for another reviewer or approver, attach/draft:assist-reviewunless the user explicitly opted out.Good signals:
- all tasks completed
- upload / PR / handoff language
fullorwith-assistmodifier present
High defect-risk changes
If the diff touches high-risk surfaces, attach/draft:bughunt.Good signals:
- auth, payments, persistence, concurrency, migrations, public API boundaries
- hotspot / high-fanIn files
- weak or missing tests
fullorwith-bughuntmodifier present
Single-module structural risk
If the review scope maps cleanly to one high-risk module, attach/draft:deep-review.Good signals:
- single module or service dominates the diff
- structural or resilience-sensitive changes
- high blast radius plus concurrency / durability / resiliency concerns
If the diff spans many modules, do not auto-run multiple deep reviews. Instead, finish baseline review and recommend targeted deep-review follow-ups for the highest-risk modules.
Mandatory Baseline Behavior
Even when no specialist command is attached:
- always compute and report blast radius / hotspot impact from graph data when available
- always explain which specialist workflows were auto-invoked and why
Example:
Running /draft:review
- baseline three-stage review
- bughunt attached because auth and persistence paths changed
- assist-review attached because this is a completed track handoffIf the heuristic selects /draft:quick-review instead of baseline review, route there directly and stop this workflow.
Step 3: Generate Git Diff (Smart Chunking)
Generate diff output using smart chunking to avoid context overflow.
3.1: Determine Diff Size
Run shortstat to check diff size:
git diff --shortstat <range>Parse output robustly — handle both singular (1 file changed) and plural (N files changed) forms. Extract numeric values for files, insertions, and deletions. Use total lines changed (insertions + deletions) for the chunking threshold.
3.2: Smart Chunking Strategy
Small/Medium changes (<300 lines changed):
Run full diff in one pass:
git diff <range>- Store complete diff for analysis
Large changes (≥300 lines changed):
- Announce: "Large changeset detected (N files). Using file-by-file review mode."
Get file list:
git diff --name-only <range>- For each file:
- Display progress:
[N/M] Reviewing <filename> - Run:
git diff <range> -- <file> - Analyze immediately (don't store all)
- Track findings in temporary structure
- Display progress:
- Aggregate findings after all files processed
3.3: Filter Files (Optional)
Skip non-source files to focus review:
- Ignore lock/minified:
*.lock,package-lock.json,yarn.lock,*.min.js,*.min.css,*.map - Ignore build artifacts:
dist/,build/,target/,out/,__pycache__/,*.pyc - Ignore vendored:
node_modules/,vendor/,.git/ - Ignore binaries: images, fonts, compiled assets
- Ignore generated files: check first 10 lines for
@generatedmarker (case-insensitive, any comment syntax:/* @generated */,// @generated,# @generated)
Step 4: Run Reviewer Agent
Apply a three-stage review process (merging static validation and semantic review).
Stage 1: Automated Validation
Goal: Detect structural, security, and performance issues using fast, objective searches across the diff.
Load plugin guardrails before scanning: core/guardrails/review-checks.md (RC-###), core/guardrails/security.md (SEC-##), and the relevant core/guardrails/language-standards.md section for the detected stack. draft/guardrails.md project rules take precedence on any conflict.
Hard red line violations (SEC-01…SEC-10) are always Critical and block review approval. If the violation has a // SECURITY-OVERRIDE: <ticket> <justification> annotation, downgrade to Important and record the ticket in the report.
Read-before-report gate (Ground-Truth Discipline G1): Static checks (grep, scanner output) identify candidate findings. Every candidate that survives to the final review report must be backed by an actual Read of the cited file in this session. A grep hit on dangerouslySetInnerHTML is a candidate; only after opening the file and checking surrounding context (sanitiser? test/mock file? feature flag?) does it become a reported finding. Filing findings directly from grep output is the dominant false-positive source in review skills — do not do it.
For the files changed in the diff, perform static checks using grep or similar tools:
Blast Radius Assessment (if the
draft/graph/snapshot exists):First resolve the bundled helpers:
# Locate Draft's bundled helpers (cwd is the user's project; ${CLAUDE_PLUGIN_ROOT} # is not exported into skill Bash). See core/shared/tool-resolver.md. DRAFT_TOOLS="${DRAFT_PLUGIN_ROOT:-$(cat ~/.cache/draft/plugin-root 2>/dev/null)}/scripts/tools" [ -d "$DRAFT_TOOLS" ] || DRAFT_TOOLS="$(ls -d ~/.claude/plugins/cache/*/draft/*/scripts/tools 2>/dev/null | sort -V | tail -1)" [ -d "$DRAFT_TOOLS" ] || DRAFT_TOOLS="$(ls -d ~/.claude/plugins/marketplaces/*draft*/scripts/tools 2>/dev/null | tail -1)" [ -d "$DRAFT_TOOLS" ] || DRAFT_TOOLS="$PWD/scripts/tools"- List all changed files from the diff
- For each changed file, check if it appears in
"$DRAFT_TOOLS/hotspot-rank.sh" --repo .output — if yes, record itsfanInvalue - Classify: files with fanIn in the top 20% of the hotspot output = HIGH IMPACT; top 21–50% = MEDIUM; below 50% or not in output = STANDARD
- For any file in a HIGH or MEDIUM module, query
"$DRAFT_TOOLS/graph-arch.sh" --repo . | jq '.packages[].fan_in'(how many modules depend on this module) - Include a
Blast Radiusline in the Stage 1 report summary:Blast Radius: HIGH | MEDIUM | STANDARD — <N> changed files affect high-fanIn modules: [file list] - If any changed file is HIGH IMPACT: escalate Stage 3 thoroughness (check all callers of changed functions) and note this in the report header
- Architecture Conformance: Search for pattern violations documented in
draft/.ai-context.md. (e.g.import * from 'database'in a React component). - Dead Code: Check for newly exported functions/classes in the diff that have 0 references across the codebase.
- Dependency Cycles: Trace the import chains for new imports to ensure no circular dependencies (e.g., A → B → C → A) are introduced.
- Graph Boundary Check (if
draft/graph/schema.yamlexists)[RC-013]:- For each changed file, identify its module from the graph
- Check if any new cross-module includes were added in the diff
- Verify they follow the established dependency direction from
"$DRAFT_TOOLS/graph-arch.sh" --repo .package fan-in/out - Flag reverse-direction dependencies (module A now depends on module B, but only B→A existed before) as "Potential architecture violation — new dependency direction"
- Check if changes introduce files in modules listed in graph cycles — flag as higher risk
- Security Scan
[RC-001, RC-002, RC-003, RC-011]:- Hardcoded secrets and API keys
[RC-001] - SQL injection risks (string concatenation in queries)
[RC-002] - XSS vulnerabilities (
innerHTMLor raw DOM insertion)[RC-011] - Missing input validation at new entry points
[RC-003]
- Hardcoded secrets and API keys
- Dependency Manifest Check
[RC-014]: If diff modifiespackage.json,requirements.txt,go.mod,Cargo.toml,pom.xml, orbuild.gradle, run the project's configured dependency vulnerability scanner (fromdraft/tech-stack.md) or recommendnpm audit/pip-audit/cargo auditas appropriate. Include results in Stage 1 findings. - Performance Anti-patterns: Scan the diff for:
- N+1 database queries (loops containing queries)
- Blocking synchronous I/O within async functions
- Unbounded queries lacking pagination
Context-Specific Checks: Identify the primary domain of changed files and apply domain-specific checks:
- Crypto/Security changes (files matching
auth,crypto,security,token,password,hash,encrypt):- Timing-safe comparisons used (no
==for secret comparison) - Constant-time operations for sensitive data
- Secure random generation (no
Math.random()for security) - Key length meets minimum requirements
- Timing-safe comparisons used (no
- Database/Migration changes (files matching
migration,schema,model,entity,repository):- Backward compatibility preserved (no destructive column drops without migration path)
- Index coverage for new queries
- Constraint preservation (foreign keys, unique constraints)
- Zero-downtime migration safety (no table locks on large tables)
- API Endpoint changes (files matching
controller,handler,route,endpoint,resolver)[RC-005, RC-012]:- Backward compatibility of public signatures (no breaking param changes)
[RC-012] - Input validation present for all new parameters
[RC-003] - Rate limiting configured for new endpoints
- Authentication/authorization checks in place
[RC-005]
- Backward compatibility of public signatures (no breaking param changes)
- Configuration changes (files matching
config,env,settings):- No secrets exposed in plaintext
- Validation at startup for required config values
- Fallback defaults provided where appropriate
- UI/Frontend changes (files matching
component,view,page,template):- No XSS vectors (
innerHTML,dangerouslySetInnerHTML,v-html) - Accessibility present (ARIA attributes, keyboard navigation)
- Performance impact considered (bundle size, render cycles)
- No XSS vectors (
- Crypto/Security changes (files matching
- Breaking Change Detection
[RC-012]: Check for public API changes in the diff:- Exported function/method signatures unchanged (no added required params, no changed return types)
- No removed or renamed exported symbols
- Error types and error codes unchanged
- Serialization format preserved (JSON field names, protobuf field numbers)
- Flag as CRITICAL if breaking change found with no deprecation period or version bump
- Threat Model (STRIDE): For new endpoints or data mutations, check:
- Spoofing: Can the caller's identity be faked? (authentication check)
- Tampering: Can request data be modified in transit? (integrity check)
- Repudiation: Are actions logged for audit? (logging check)
- Information Disclosure: Does the response leak internal details? (error message check)
- Denial of Service: Can the endpoint be abused? (rate limiting, resource limits)
- Elevation of Privilege: Are authorization checks in place? (RBAC/ABAC check)
Verdict:
- PASS: No critical issues found → Proceed to Stage 2
- FAIL: ANY Critical issue found (e.g., circular dependency, hardcoded secret, raw SQL injection) → List the static analysis failures, generate the review report, and STOP. Do not proceed to Stage 2. This prevents wasting effort on structurally broken code.
SAST Tool Recommendations
After completing Stage 1, recommend appropriate static analysis tools based on the project's tech-stack.md. Check if these tools are already configured in CI; if not, recommend adding them.
| Language | Recommended Tools |
| JavaScript/TypeScript | ESLint with eslint-plugin-security, Semgrep |
| Python | Bandit, Semgrep, pylint |
| Java | Error Prone, SpotBugs, Semgrep |
| Go | gosec, staticcheck |
| Rust | cargo clippy, cargo audit |
| C/C++ | Clang Static Analyzer, cppcheck |
| Multi-language | Semgrep (https://semgrep.dev/), CodeQL (semantic code analysis) |
References: Meta Infer for CI integration patterns, Google Error Prone for compile-time analysis.
Include tool recommendations in the review report under Stage 1 as a "Recommended Tooling" subsection. Only recommend tools relevant to the languages detected in the diff.
Stage 2: Spec Compliance (Track-Level Only)
Skip for project-level reviews (no spec exists)
Load spec.md acceptance criteria and verify implementation:
4.1: Requirements Coverage
For each functional requirement in spec.md:
- Requirement implemented (find evidence in diff)
- Files modified/created match requirement
4.2: Acceptance Criteria
For each criterion in spec.md:
- Criterion met (check against diff)
- Test coverage exists (if TDD enabled)
4.3: Scope Adherence
- No missing features from spec
- No extra unneeded work (scope creep)
Verdict:
- PASS: All requirements implemented AND all acceptance criteria met → Proceed to Stage 3
- PASS WITH NOTES: All requirements met but minor gaps in acceptance criteria verification → Proceed to Stage 3 with notes
- FAIL: ANY requirement missing OR ANY acceptance criterion not met → List gaps, report, and stop (no Stage 3)
Stage 2.5: HLD/LLD Compliance (Track-Level Only, when hld.md exists)
Skip if no hld.md — fall through to Stage 3.
2.5.1: HLD §Approvals signed
- All required approver rows have a Date populated (per
/draft:uploadStep 3.1 logic) - If HLD was modified after the latest signed Date → flag as Critical "HLD modified after sign-off — re-circulate"
2.5.2: HLD §Detailed Design coverage
For every component subsection in HLD §Detailed Design:
- Files listed in the component diff actually exist at the cited
path:line - Each component's
Whitebox requirements addressedlist is non-empty
2.5.3: HLD §Checklist populated
For criticality ∈ {high, mission-critical} (frontmatter):
- §Performance, §Scale, §Security, §Resiliency, §Multi-tenancy, §Upgrade, §Cost are populated (not still "<Describe...>" placeholders)
2.5.4: Code-vs-HLD drift
- Diff introduces no new modules absent from HLD §Detailed Design
- Diff introduces no new cross-module dependencies absent from HLD §Dependencies
- Diff respects HLD §Key Design Decisions (e.g., decision says "single-writer" → no new shared-write paths in code)
2.5.5: LLD compliance (when lld.md exists)
- Public API additions in diff are reflected in LLD §Classes and Interfaces
- Schema/data-model changes in diff are reflected in LLD §Data Model with migration path
- Diff respects LLD invariants (thread safety, idempotency, ordering)
Verdict:
- PASS → Stage 3
- FAIL → list HLD/LLD gaps with severity Critical (drift) or Important (incomplete sections), then Stage 3
Stage 3: Code Quality
Run for both track-level (if Stage 2 passes) and project-level reviews
Analyze semantic code quality across four dimensions:
4.4: Architecture
- Follows project patterns (from tech-stack.md or CLAUDE.md)
- Appropriate separation of concerns
- Critical invariants honored (if
.ai-context.mdexists — check ## Critical Invariants section)
4.5: Error Handling
- Errors handled at appropriate level
- User-facing errors are helpful
- No silent failures
4.6: Testing
- Tests test real logic (not implementation details)
- Edge cases have test coverage
4.7: Maintainability
- Code is readable without excessive comments
- Consistent naming and style
4.8: Diff Complexity Metrics
- No functions exceeding cognitive complexity threshold (>15)
- No files with high churn + high complexity (flag as refactoring candidates)
- No deeply nested control flow (>3 levels of nesting)
For each flagged function, report: file path, function name, estimated complexity, and recommended action (split, extract, simplify).
Adversarial Pass (mandatory when Stage 3 yields zero findings)
If Stage 3 produces zero findings across all four dimensions, do NOT accept "clean" without this gate. This pass is mandatory, not optional — a "zero findings" verdict that did not complete it is incomplete and must be flagged in the report.
Answer each of the 7 questions explicitly with file:line evidence (not "looks fine"):
- Error paths — Is every error/exception handled? Are any failure modes silently swallowed? Quote the handler or note its absence.
- Edge cases — Are there boundary conditions (empty input, max values, concurrent access) not covered by tests? Cite tests or note coverage gap.
- Implicit assumptions — Does code assume inputs are always valid, services always up, or state always consistent? Quote the assumption site.
- Future brittleness — Is anything hardcoded that will break on scale or config change? Cite the constant or flag.
- Missing coverage — Is there behavior that should be tested but isn't? Name the behavior and the missing test.
- Guardrails — Do any changes violate learned anti-patterns from
guardrails.md? Cite the rule. - Invariants — Do any changes violate critical invariants documented in
.ai-context.md? Cite the invariant.
Document the pass in the review report:
"Adversarial pass: 7/7 answered with evidence. [one line per question with
file:lineor 'N/A —<reason>']."
A review verdict of "clean / LGTM" without this filled-in block is non-conforming and must not be emitted. Skipping the pass is a Ground-Truth Red Flag G4 violation (claim about absence-of-issues from incomplete examination).
Issue Classification
Classify all findings by severity:
| Severity | Definition | Action |
| Critical | Blocks release, breaks functionality, security issue | Must fix before proceeding |
| Important | Degrades quality, technical debt | Should fix before phase complete |
| Minor | Style, optimization, nice-to-have | Note for later, don't block |
Scope-specific behavior:
- For track-level reviews: Run all three stages. Stage 2 uses
spec.mdacceptance criteria loaded in Step 2. - For project-level reviews: Skip Stage 2 (no spec). Run Stage 1 and Stage 3 only.
Issue format:
- [ ] [File:line] Description of issue `[RC-### or CQ-### or SEC-## if applicable]`
- **Impact:** [what breaks/degrades]
- **Suggested fix:** [how to address]Cite the most specific guardrail rule ID that applies. If no numbered rule covers the finding, omit the citation — the finding is still valid.
Step 5: Run Specialist Integrations (Optional / Heuristic)
Run the specialist workflows selected explicitly or by the Step 2.5 heuristics.
5.1: Run Bughunt
Track-level:
/draft:bughunt --track <id>Project-level:
/draft:bughuntParse output from draft/tracks/<id>/bughunt-report-latest.md or draft/bughunt-report-latest.md
5.2: Run Assist Review
If with-assist, full, or handoff heuristics selected assist-review:
- run
/draft:assist-reviewfor the same track context - extract:
- intent summary
- structural edits
- HLD/LLD drift flags
- suggested review order
Append this as a dedicated section in the final review report rather than merging it into bug findings.
5.3: Run Deep Review
If deep-review escalation is justified and the scope maps to one dominant module:
- run
/draft:deep-review <module> - extract critical and important findings relevant to the current diff
- include a short
Deep Review Escalationsection in the report
If deep-review is recommended but not auto-run:
- add a
Next Actionsrow pointing to/draft:review deep <module>or/draft:deep-review <module>
5.4: Aggregate Findings
Merge findings from:
- Reviewer agent (Stage 1, 2, 3)
- Bughunt results (if run)
- Deep-review findings relevant to the current diff (if run)
Deduplication:
- Two findings are duplicates if they reference the same file and line number
- Severity ordering: Critical > Important > Minor
- On duplicate: keep the finding with highest severity; merge tool attribution as "Found by: reviewer, bughunt, deep-review" as applicable
- If same severity from different tools: merge into single finding, combine descriptions
Step 6: Generate Review Report
Create unified review report in markdown format.
MANDATORY: Include YAML frontmatter with git metadata. Follow the procedure in core/shared/git-report-metadata.md to gather git info, generate frontmatter, and include the report header table. Use generated_by: "draft:review".
Track-Level Report
Path: draft/tracks/<id>/review-report-<timestamp>.md (where <timestamp> is generated via date +%Y-%m-%dT%H%M, e.g., 2026-03-15T1430)
After writing the timestamped report, create a symlink pointing to it:
ln -sf review-report-<timestamp>.md draft/tracks/<id>/review-report-latest.md[YAML frontmatter — see core/shared/git-report-metadata.md, use track_id: "<id>"]
# Review Report: <Track Title>
[Report header table — see core/shared/git-report-metadata.md]
**Track ID:** <id>
**Reviewer:** [Current model name and context window from runtime]
**Commit Range:** <first_SHA>^..<last_SHA>
**Diff Stats:** N files changed, M insertions(+), K deletions(-)
---
## Stage 1: Automated Validation
**Status:** PASS / FAIL
- **Blast Radius:** HIGH | MEDIUM | STANDARD — [list hotspot files if HIGH/MEDIUM]
- **Architecture Conformance:** PASS/FAIL
- **Dead Code:** N found
- **Dependency Cycles:** PASS/FAIL
- **Security Scan:** N issues found
- **Dependency Vulnerabilities:** N Critical / N High (or "Clean" if scanner found none)
- **Performance:** N anti-patterns detected
[If FAIL: List critical structural issues and stop here]
---
## Stage 2: Spec Compliance
**Status:** PASS / FAIL
### Requirements Coverage
- [x] Requirement 1 - Implemented in <file:line>
- [x] Requirement 2 - Implemented in <file:line>
- [ ] Requirement 3 - **MISSING**
### Acceptance Criteria
- [x] Criterion 1 - Verified in <file:line>
- [x] Criterion 2 - Verified in <file:line>
- [ ] Criterion 3 - **NOT MET**
[If FAIL: List gaps and stop here]
---
## Stage 3: Code Quality
**Status:** PASS / PASS WITH NOTES / FAIL
### Critical Issues
[None / List with file:line]
### Important Issues
[None / List with file:line]
### Minor Notes
[None / List items]
---
[If with-bughunt or full]
## Integrations
### Bug Hunt Results
- **Critical:** N found
- **Important:** N found
- **Minor:** N found
- Full report: `./bughunt-report-latest.md`
---
## Summary
**Total Semantic Issues:** N
- Critical: N
- Important: N
- Minor: N
**Verdict:** PASS / PASS WITH NOTES / FAIL
**Required Actions:**
1. [Action item if any]
2. [Action item if any]
---
## Recommendations
[If incomplete tasks found]
⚠️ **Warning:** This track has N incomplete tasks. Consider completing all tasks before marking track as done.
[If no critical issues]
✅ **No blocking issues found.** This track is ready to merge.
[If critical issues found]
❌ **Critical issues must be resolved before proceeding.**Project-Level Report
Path: draft/review-report-<timestamp>.md (where <timestamp> is generated via date +%Y-%m-%dT%H%M, e.g., 2026-03-15T1430)
After writing the timestamped report, create a symlink pointing to it:
ln -sf review-report-<timestamp>.md draft/review-report-latest.mdSimilar format but:
- No Stage 2 section (no spec compliance)
- Header shows scope instead of track ID:
project: "Scope: Uncommitted changes"files <pattern>: "Scope: Files matching '<pattern>'"commits <range>: "Scope: Commits<range>"
- Each run creates a new timestamped file; the
-latest.mdsymlink always points to the most recent report - Include "Previous review:
<timestamp>" if a prior-latest.mdsymlink exists (read its target to determine the previous timestamp)
Zero-Setup Report (no draft/ directory)
Render inline; write no files. An evaluating user has not asked for artifacts in their repo, and creating draft/ is /draft:init's job. On explicit request, save to .draft-review/review-report-<timestamp>.md. Full format and the mandatory closing CTA: references/zero-setup-mode.md §Output.
Report History
Previous timestamped reports are preserved. The -latest.md symlink always points to the most recent report.
Step 7: Update Metadata (Track-Level Only)
For track-level reviews, update metadata.json with review status.
Condition: Always update metadata after generating the review report, regardless of verdict. This ensures review history is tracked for all outcomes (PASS, PASS_WITH_NOTES, or FAIL).
7.1: Read Current Metadata
Load draft/tracks/<id>/metadata.json
7.2: Add Review Fields
{
"id": "<track_id>",
...
"lastReviewed": "<ISO timestamp>",
"reviewCount": N,
"lastReviewVerdict": "PASS" | "PASS_WITH_NOTES" | "FAIL"
}Increment reviewCount on each review.
7.3: Write Updated Metadata
Save updated metadata.json
Step 8: Present Results
Display summary to user with actionable next steps.
Success Output
✅ Review complete: <track_id>
Report: draft/tracks/<id>/review-report-<timestamp>.md (symlink: review-report-latest.md)
Summary:
- Stage 1 (Automated Validation): PASS
- Stage 2 (Spec Compliance): PASS
- Stage 3 (Code Quality): PASS WITH NOTES
- Total semantic issues: 12 (0 Critical, 3 Important, 9 Minor)
[If full]
Additional Checks:
- Bug Hunt: 5 medium-severity findings
Verdict: PASS WITH NOTES
Recommended actions:
1. Fix 3 Important issues (see report)
2. Review 9 Minor notes for future improvements
Next: Address findings and run /draft:review again, or mark track complete.Failure Output
❌ Review failed: <track_id>
Report: draft/tracks/<id>/review-report-<timestamp>.md (symlink: review-report-latest.md)
Stage 1 (Automated Validation): PASS
Stage 2 (Spec Compliance): FAIL
- 3 requirements not implemented
- 2 acceptance criteria not met
Stage 3: SKIPPED (Stage 2 must pass first)
Verdict: FAIL
Required actions:
1. Implement missing requirements (see report)
2. Meet all acceptance criteria
3. Run /draft:implement to resume work
Next: Fix gaps and run /draft:review again.Error Handling
Missing Draft Directory — not an error
A missing draft/ directory is a supported mode, not a failure. Enter zero-setup mode (Step 0) and review the diff. Never emit "Draft not initialized" from this skill.
The only legitimate stop is a repository with nothing to review:
No changes to review. Make a change, or run /draft:review commits <range>.No Tracks Found
Error: No tracks found in draft/tracks.md
Run /draft:new-track to create your first track.Track Not Found
Error: Track 'xyz' not found.
Did you mean:
1. add-review-command
2. enterprise-readiness
Use exact track ID or run /draft:status to see all tracks.Ambiguous Match
Multiple tracks match 'review':
1. add-review-command - Add /draft:review Command [~]
2. review-architecture-md - Review architecture.md [x]
Select track (1-2):Invalid Git Range
Error: Invalid commit range 'main...feature'
Git error: fatal: ambiguous argument 'feature': unknown revision
Verify the range exists:
git log main...featureMissing Commits in Plan
⚠️ Warning: No commit SHAs found in plan.md
Cannot determine commit range for review.
Options:
1. Manually specify range: /draft:review track <id> commits <range>
2. Review uncommitted changes: /draft:review projectAnti-Patterns
| Don't | Instead |
| Skip Stage 1 (Automated Validation) | Always run automated checks first |
| Skip Stage 2 (Spec Compliance) | Always verify spec compliance before quality checks |
| Run Stage 3 when Stage 2 fails | Fix spec gaps before quality checks |
| Ignore incomplete tasks | Warn user, suggest completing work first |
| Auto-fix issues found | Report only, let developer decide |
| Batch multiple tracks | Review one track at a time |
Refuse to run because draft/ is missing | Enter zero-setup mode and review the diff |
| Report blast radius / hotspots without the graph | Say the check did not run |
Pattern Learning
After generating the review report, execute the pattern learning phase from core/shared/pattern-learning.md to update draft/guardrails.md with patterns discovered during this review.
Examples
Review active track
/draft:reviewReview specific track by ID
/draft:review track add-user-authReview specific track by name (fuzzy)
/draft:review track "user authentication"Comprehensive track review
/draft:review track add-user-auth fullReview uncommitted changes
/draft:review projectReview specific files
/draft:review files "src/**/*.ts"Review commit range
/draft:review commits main...feature-branchReview with bughunt
/draft:review track my-feature with-bughuntExplicit quick review via parent
/draft:review quick files "src/**/*.ts"Explicit deep review via parent
/draft:review deep authExplicit assist review via parent
/draft:review assist track my-featureReport Closing: Next Actions (REQUIRED)
Every review report must end with a ## Next Actions section listing the smallest set of follow-ups in execution order. Use this exact shape:
## Next Actions
| # | Action | Owner | Blocker? | Skill / Command |
|---|---|---|---|---|
| 1 | <imperative one-liner> | <author\|reviewer\|TBD> | yes/no | `/draft:<skill> <args>` or `n/a` |Rules:
- Critical findings produce blocker rows (
Blocker? = yes); proceeding to merge is forbidden until cleared. - Each action is imperative ("Add CSRF token to /api/transfer"), not a restatement of the finding.
- Suggest the Draft follow-up when one applies (
/draft:debug,/draft:regression,/draft:tech-debt,/draft:bughunt,/draft:adr). Otherwise putn/a. - Cap at 7 actions; if more remain, add a final row pointing at the full report.
Cross-Skill Dispatch
Auto-Invoke at Completion
- Coverage check: If TDD enabled in workflow.md, auto-run
/draft:coverageand include results in review report
Suggestions at Completion
After review completion, based on findings:
If significant code quality findings:
"Review complete. Consider:
→ /draft:tech-debt — Catalog and prioritize the technical debt found"If new public APIs lack documentation:
→ /draft:documentation api — Document new API endpoints"If undocumented design decisions discovered:
→ /draft:adr — Record architectural decisions found during review"Jira Sync
If Jira ticket linked, sync via core/shared/jira-sync.md:
- Attach
review-report-latest.mdto ticket - Post comment: "[draft] review-complete: {PASS/FAIL}. {n} findings: {critical} critical, {suggestions} suggestions."
Mandatory Self-Check (before final verdict)
Before printing the final verdict, internally verify and report:
- Graph data queried — which live-engine tools were invoked (e.g.
get_architecture,hotspot-rank.sh,graph-impact.sh,graph-callers.sh,cycle-detect.sh). - Layer 1 files deliberately skipped — list any context sections skipped as irrelevant to the diff under review.
- Filesystem grep fallback justification — for every
grep/findrun, state the concept it searched for. Source-text scans (string literals, regex matches in code) are exempt — they are not symbol/file discovery.
If draft/graph/schema.yaml does not exist, set Graph files queried: NONE and use justification graph data unavailable.
Graph Usage Report (append to review report)
Emit the canonical footer from core/shared/graph-usage-report.md. The lint hook scripts/tools/check-graph-usage-report.sh validates the section on save.
Skill Telemetry
As the last step after saving the review report, emit a metrics record. Best-effort — never block.
Payload fields:
{
"skill": "review",
"track_id": "<track_id or null>",
"stage_reached": "stage1|stage2|stage3",
"verdict": "PASS|PASS_WITH_NOTES|NEEDS_CHANGES|FAIL",
"critical_count": <N>,
"important_count": <N>,
"blast_radius": "HIGH|MEDIUM|STANDARD",
"graph_queries": <N>,
"fallback_grep_count": <N>
}Emit call:
# Locate Draft's bundled helpers (cwd is the user's project; ${CLAUDE_PLUGIN_ROOT}
# is not exported into skill Bash). See core/shared/tool-resolver.md.
DRAFT_TOOLS="${DRAFT_PLUGIN_ROOT:-$(cat ~/.cache/draft/plugin-root 2>/dev/null)}/scripts/tools"
[ -d "$DRAFT_TOOLS" ] || DRAFT_TOOLS="$(ls -d ~/.claude/plugins/cache/*/draft/*/scripts/tools 2>/dev/null | sort -V | tail -1)"
[ -d "$DRAFT_TOOLS" ] || DRAFT_TOOLS="$(ls -d ~/.claude/plugins/marketplaces/*draft*/scripts/tools 2>/dev/null | tail -1)"
[ -d "$DRAFT_TOOLS" ] || DRAFT_TOOLS="$PWD/scripts/tools"
[ -x "$DRAFT_TOOLS/emit-skill-metrics.sh" ] && bash "$DRAFT_TOOLS/emit-skill-metrics.sh" \
'{"skill":"review","track_id":"<id_or_null>","stage_reached":"<stage>","verdict":"<v>","critical_count":<N>,"important_count":<N>,"blast_radius":"<br>","graph_queries":<N>,"fallback_grep_count":<N>}'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.

