From workflow-toolkit
Multi-stage implementation review with parallel sub-agents, severity-based autonomous fixes, and gated test verification. Runs code quality, architecture, simplicity, documentation, and security reviews in sequence with test gates between each fix stage. Security review is blocked until all other fixes are complete. Use after completing a feature, implementation phase, or release candidate. Supports scope modes: full, code-only, security, simplicity, docs.
How this skill is triggered — by the user, by Claude, or both
Slash command
/workflow-toolkit:phased-reviewThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Multi-stage implementation review pipeline with parallel sub-agent reviews, severity-based fix autonomy, and gated test verification.
Multi-stage implementation review pipeline with parallel sub-agent reviews, severity-based fix autonomy, and gated test verification.
Stage 0 — Baseline Verification + Test Coverage Snapshot
Stage 1 — Parallel Code + Architecture Review (2 sub-agents)
Stage 2 — Synthesize Code/Architecture Findings
Stage 3 — Fix Code/Architecture Findings + Re-run Tests
Stage 4 — Simplicity Review (1 sub-agent)
Stage 5 — Fix Simplicity Findings + Re-run Tests
Stage 6 — Documentation Review (1 sub-agent)
Stage 7 — Fix Documentation Findings + Re-run Tests
Stage 8 — Parallel Security Review (3 sub-agents) ← BLOCKED until 3, 5, 7 pass
Stage 9 — Synthesize Security Findings
Stage 10 — Fix Security Findings + Re-run Tests
Stage 11 — Final Verification + Completion Validation
Parse the user's request to determine scope mode. If ambiguous, ask.
| Mode | Stages Run | Use Case |
|---|---|---|
full | 0, 1-11 | Complete pre-release validation |
code-only | 0, 1-3, 11 | Code quality pass — security explicitly out of scope |
security | 0, 8-10, 11 | Security-focused review only |
simplicity | 0, 4-5, 11 | YAGNI / over-engineering check |
docs | 0, 6-7, 11 | Documentation completeness review |
Default: full
Store the selected mode — it determines which stages run and what the completion checklist validates.
If mode is code-only, inform the user: "Note: code-only mode does not include security review. Run with security or full mode for security coverage."
Create a review log file in .claude/memory/reviews/. This directory is gitignored (under .claude/memory/) so review logs are never committed to the repo.
Create the directory if it doesn't exist: mkdir -p .claude/memory/reviews
Filename: phased-review-YYYY-MM-DD.md (use current date)
If a log with today's date already exists, append a counter: phased-review-YYYY-MM-DD-2.md
Write the log header:
# Phased Review Log
- **Date:** [YYYY-MM-DD]
- **Mode:** [selected mode]
- **Stages:** [list of stage numbers for this mode]
- **Project:** [project name / working directory]
Run only the stages included in the selected mode, in order. Each stage writes results to the review log.
Always runs in every mode.
Follow the detection and execution probes in references/baseline-detection.md to:
Write to review log:
## Stage 0 — Baseline
- Tests: [X] passing, [Y] failing, [Z] skipped (exit code [N])
- Lint: [tool]: [PASS/FAIL] (or SKIPPED if not available)
- Typecheck: [tool]: [PASS/FAIL] (or SKIPPED if not available)
- Coverage: [X%] (tool: [name]) or "not measured"
- Test command: `[detected command]`
- Status: **[PASS/FAIL]**
GATE: If tests fail (exit code != 0), STOP. Report failures and tell the user they must fix baseline failures before review can begin. Do not proceed to any further stage.
Modes: full, code-only
Launch two sub-agents in parallel using the Task tool. Use the prompts from references/sub-agent-prompts.md.
Sub-Agent A — Code Review:
subagent_type: "workflow-toolkit:code-reviewer"
Sub-Agent B — Architecture Review:
subagent_type: "compound-engineering:review:architecture-strategist"
Both agents must output findings categorized as Critical / High / Medium / Low with:
Write raw outputs to review log under ## Stage 1 — Raw Findings (Code) and ## Stage 1 — Raw Findings (Architecture).
Modes: full, code-only
Write to review log:
## Stage 2 — Code/Architecture Findings (Consolidated)
### Critical
- CA-001: [description] — [file:line]
### High
- CA-002: [description] — [file:line]
### Medium
- CA-003: [description] — [file:line]
### Low (informational — do not fix)
- CA-004: [description] — [file:line]
**Totals:** [X] Critical, [Y] High, [Z] Medium, [W] Low
Modes: full, code-only
Write to review log:
## Stage 3 — Code/Architecture Fixes
- **Fixed:** [list of CA-IDs with one-line fix descriptions]
- **Escalated:** [list of CA-IDs with reason for escalation]
- **Deferred:** [Low findings — not fixed, informational only]
- Tests after fix: [X] passing, [Y] failing
- Status: **[PASS/FAIL]**
GATE: Tests must pass before proceeding.
Modes: full, simplicity
Launch one sub-agent using the prompt from references/sub-agent-prompts.md.
subagent_type: "compound-engineering:review:code-simplicity-reviewer"
The agent categorizes findings as:
Write to review log under ## Stage 4 — Simplicity Findings.
Modes: full, simplicity
Write to review log:
## Stage 5 — Simplicity Fixes
- **Applied:** [list with descriptions]
- **Deferred:** [list with reasons]
- Tests after fix: [X] passing, [Y] failing
- Status: **[PASS/FAIL]**
GATE: Tests must pass before proceeding.
Modes: full, docs
Launch one sub-agent using the prompt from references/sub-agent-prompts.md.
subagent_type: "workflow-toolkit:ops-docs-generator"
Output: list of missing or outdated documentation with specific recommendations and draft content where possible.
Write to review log under ## Stage 6 — Documentation Findings.
Modes: full, docs
Write to review log:
## Stage 7 — Documentation Fixes
- **Updated:** [list of files modified]
- **Created:** [list of new files, if any]
- Tests after fix: [X] passing, [Y] failing
- Status: **[PASS/FAIL]**
GATE: Tests must pass before proceeding.
Modes: full, security
BLOCKING CONDITION: In full mode, this stage MUST NOT begin until Stages 3, 5, and 7 are ALL complete with passing tests. Verify all three gates passed before proceeding. In security mode (which skips 1-7), proceed directly after Stage 0 passes.
Launch three sub-agents in parallel using the Task tool. Use the prompts from references/sub-agent-prompts.md.
Sub-Agent E — Offensive Security (Red Team):
subagent_type: "compound-engineering:review:security-sentinel"
Thinks like an attacker. Finds exploitation paths, proves attack vectors with concrete PoC inputs, identifies the highest-impact vulnerabilities. IDs: OT1, OT2, etc.
Sub-Agent F — Defensive Security (Technical/Code):
subagent_type: "security-scanning:security-auditor"
Defense-in-depth mindset. Secure coding patterns, input validation at every layer, encryption implementation, security headers, DevSecOps integration. IDs: DF1, DF2, etc.
Sub-Agent G — Security Architecture / Auditor:
subagent_type: "security-scanning:threat-modeling-expert"
STRIDE analysis, attack tree construction, data flow diagrams, trust boundary mapping, risk scoring, and residual risk documentation. IDs: SA1, SA2, etc.
All three agents output findings as Critical / High / Medium / Low with finding IDs, file references, descriptions, and recommended fixes.
Write raw outputs to review log under:
## Stage 8 — Raw Findings (Offensive)## Stage 8 — Raw Findings (Defensive/Technical)## Stage 8 — Raw Findings (Security Architecture)Modes: full, security
Write to review log:
## Stage 9 — Security Findings (Consolidated)
### Critical
- SEC-001 (actionable): [description] — [file:line]
### High
- SEC-002 (actionable): [description] — [file:line]
- SEC-003 (informational): [description — reason for deferral]
### Medium
- SEC-004 (deferred): [description — requires design change]
### Low (informational — do not fix)
- SEC-005: [description]
**Totals:** [X] Critical, [Y] High, [Z] Medium, [W] Low
**Actionable:** [N], **Informational:** [N], **Deferred:** [N]
Modes: full, security
Write to review log:
## Stage 10 — Security Fixes
- **Fixed:** [list of SEC-IDs with descriptions]
- **New tests added:** [count and brief descriptions]
- **Informational/Deferred:** [list with justifications]
- Tests after fix: [X] passing, [Y] failing
- Status: **[PASS/FAIL]**
GATE: Tests must pass.
Always runs in every mode.
Execute the test command from Stage 0. Record final counts.
Execute the coverage command from Stage 0. Record final percentage.
Execute lint/typecheck commands from Stage 0. Record final status.
For the selected scope mode, verify every required stage was executed and recorded in the review log. Read the review log file and check:
full mode — ALL required:
code-only mode: Stages 0, 1, 2, 3, 11
security mode: Stages 0, 8, 9, 10, 11
simplicity mode: Stages 0, 4, 5, 11
docs mode: Stages 0, 6, 7, 11
ALL must be true for the review to PASS:
Write to review log:
## Stage 11 — Final Verification
### Test Results
- Baseline: [X] passing, [Y] failing → Final: [X] passing, [Y] failing
- New tests added during review: [N]
### Coverage
- Baseline: [X%] → Final: [Y%] (delta: [+/-Z%])
### Lint / Typecheck
- Baseline: [status] → Final: [status]
### Findings Summary
| Stage | Critical | High | Medium | Low | Fixed | Escalated | Deferred |
|-------|----------|------|--------|-----|-------|-----------|----------|
| Code/Arch (1-3) | ... | ... | ... | ... | ... | ... | ... |
| Simplicity (4-5) | - | - | - | - | ... | ... | ... |
| Documentation (6-7) | - | - | - | - | ... | ... | ... |
| Security (8-10) | ... | ... | ... | ... | ... | ... | ... |
| **Total** | ... | ... | ... | ... | ... | ... | ... |
### Completion Validation
- Mode: [mode]
- Stages required: [list]
- Stages completed: [list]
- Missing stages: [none / list]
### Final Status: **[PASS / FAIL]**
[If FAIL, list specific criteria not met]
You MUST display the full Stage 11 summary directly in the conversation. Do not just write to the review log — the user needs to see the results without opening the file. Present:
.claude/memory/reviews/phased-review-[date].mdIf the review PASSED, confirm clearly. If it FAILED, list every unmet criterion and what the user needs to address.
npx claudepluginhub swannysec/robot-tools --plugin workflow-toolkitRuns an independent LLM subagent for comprehensive code review with severity-categorized findings (CRITICAL/HIGH/MEDIUM/LOW), scores, and prioritized action plans. Supports task-list, plan, and ad-hoc work scenarios.
Executes a 7-phase code review pipeline: gate, mechanical checks, context scoping, parallel review agents, dedup, validate, and structured output. Trigger on PR events or invoke via /Harness Code Review.
Orchestrates phased code reviews with specialized agents for quality, architecture, security, performance, testing, documentation, and best practices.