agentleFS
BhavinMBhavinM/my-claude-setup/.claude/skills/review-plan/SKILL.md

review-plan

Skill0 starsChanged 10 months agoMITView on GitHub

Review plan.md OR a single phase file against templates AND codebase compliance. Use after creating planning documents or when asked to 'review the plan', 'check the phase', 'verify template compliance'. Each invocation reviews ONE file only. Do NOT use for creating plans (use /create-plan) or implementing phases (use /implement).

20 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use implement-plan, review-security and 7 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.
  • jesgarramSkill

    implement-plan

    Convert a plan document into Claude Code tasks with dependencies. Pure parser that reads plans from context/plans/ and creates executable task workflows.

    Also in 4 projects that use this

  • PydanticSkill

    review-security

    Security review of the current branch against its merge base — sandbox escapes, memory errors, panics and resource-limit bypasses. Use when reviewing changes for security risk, or before merging anything touching the heap/ module, path_security.rs, the wire protocol or the pool.

    Also in 3 projects that use this

  • andrewvaughanSkill

    review-code

    Run a comprehensive multi-perspective code review on current changes. Activates the Review Council (security, quality, documentation, domain review) and runs automated security scanning. Use before creating a pull request or when you want a thorough review of your work.

    Also in 5 projects that use this

  • Microsoft AzureSkill

    review-pr

    Review a pull request for functional issues, coding guideline adherence, and best practices. Use this when asked to review, inspect, or provide feedback on a pull request (Azure DevOps or GitHub). Proposes comments for user approval before posting.

    Also in 5 projects that use this

  • AnthropicSkill

    status

    Case status summary by audience — client-facing (plain language), internal (for the professor), or court-ready (formal caption format per local rules). Same facts, different framing and depth. Use when a student needs to update the client, brief the professor, or prepare a court status report.

    Also in 4 projects that use this

  • MicrosoftSkill

    init

    Generate or update chat customization files for AI coding agents

    Also in 3 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

32 rules. 0 are common, 26 are distinctive, and 6 are very specific to this project.

  • 0

    Common

    Most of the 19 edited versions we read keep these.

  • 26

    Distinctive

    This author's own choices. Worth a look.

  • 6

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If arguments contain "phase" followed by a number → Review that phase file

    line 24
  2. Distinctive:

    If arguments contain only a folder path → Review plan.md

    line 25
  3. Very specific:

    Before starting work, run TaskList to check if tasks already exist from a previous session or before a compact.

    line 64
  4. Very specific:

    Read existing tasks with TaskGet for each task ID

    line 65
  5. Distinctive:

    If no tasks exist, create them after determining the review type (Step 1):

    line 69
  6. Very specific:

    Create the reviews/planning/ directory if it doesn't exist.

    line 103
  7. Distinctive:

    Use the arguments parsed at the top of this document:

    line 111
  8. Distinctive:

    No phase specified → Review plan.md

    line 112
  9. Distinctive:

    Check if each required section exists in the target file

    line 158
  10. Distinctive:

    Use Glob to find 2-3 files matching the phase type pattern

    line 187
  11. Distinctive:

    Read the most relevant one (prefer files in similar feature areas)

    line 188
  12. Distinctive:

    Only flag verifiable deviations: If you can see the correct pattern in the reference file and the phase code differs, that's a valid …

    line 203
  13. Distinctive:

    After writing the review file, run the validation script to catch structural issues:

    line 225
  14. Distinctive:

    After fixing, re-read the phase file to verify each fix is correct.

    line 265
  15. Distinctive:

    Update the review file:

    line 267
  16. Distinctive:

    Update the Verdict to reflect only remaining unfixed issues

    line 270
  17. Distinctive:

    After writing the review file, return:

    line 274
  18. Distinctive:

    Action directive for main agent: If there are deferred items or Medium/Low suggestions, end your summary with:

    line 286
  19. Distinctive:

    If you notice context was compacted or you're unsure of current progress:

    line 297
  20. Very specific:

    Run TaskList to see all tasks and their status

    line 299
  21. Very specific:

    Run TaskGet {id} on that task to read full details

    line 301
  22. Distinctive:

    NO git commands (you don't have Bash access)

    line 314
  23. Distinctive:

    ONLY write files within the plan folder (review files AND phase file fixes)

    line 315
  24. Distinctive:

    Read the appropriate template before reviewing

    line 316
  25. Distinctive:

    Check EVERY section, not just a sample

    line 317
  26. Distinctive:

    Codebase compliance: Read at least one reference file before flagging issues

    line 318
  27. Distinctive:

    Codebase compliance: Only flag verifiable deviations (pattern clearly differs from reference)

    line 319
  28. Distinctive:

    Auto-fix: Default is to fix. Only defer for genuine scope changes or ADR contradictions

    line 321
  29. Distinctive:

    Auto-fix: Use Glob/Grep to verify before claiming "needs codebase verification" — you have the tools

    line 322
  30. Distinctive:

    Fix: Ensure Step 6 (Identify Phase Type and Find References) reads an actual codebase file.

    line 332
  31. Very specific:

    Fix: Use Glob to list all files in the plan folder: plans/{folder}/phase-*.md.

    line 338
  32. Distinctive:

    Fix: Check if a review file already exists at the output location before writing.

    line 344

“Common” is measured: kept by at least 6 in 10 of the 19 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
<!-- ultrathink: Enable extended thinking for thorough plan review -->

Plan Review

YOUR ARGUMENTS: $ARGUMENTS

Arguments are provided above via $ARGUMENTS. Asking the user to re-provide them wastes their time since the data is already available. Parse them and proceed with the review.

Parse the arguments to determine what to review:

  • If arguments contain "phase" followed by a number → Review that phase file
  • If arguments contain only a folder path → Review plan.md
  • The first part is always the plan folder path (e.g., plans/voice-assistant)
  • A bare number like 11 means phase 11

Examples: plans/voice-assistant → review plan.md | plans/voice-assistant phase 11 → review phase-11 | plans/voice-assistant 11 → review phase-11

One file per invocation. Reviewing multiple files causes cognitive overload and superficial results — the user experienced agents ignoring templates when given too many files.


Two-Layer Review

This skill performs two complementary checks:

LayerWhat It CatchesExample
Template ComplianceMissing sections, incomplete structureNo "Step 0: TDD" section, missing acceptance criteria
Codebase ComplianceCode blocks that won't compile or violate patternsWrong Server Action pattern, missing auth check, bad import paths

Why two layers? Template compliance alone produces "12/12 Ready" verdicts for phases containing compilation-breaking issues. In real reviews, template compliance caught 0 of 26 actual issues. All real problems were codebase compliance — wrong API signatures, missing imports, naming violations, patterns that wouldn't work.

Issue TypeTemplate CheckCodebase Check
Missing sectionCaughtN/A
Wrong Server Action pattern (missing auth/validation)MissedCaught
Missing getSession() auth checkMissedCaught
Bad import path (wrong alias resolution)MissedCaught
Schema file in plural schemas/ not singular schema/MissedCaught
Server action missing account slug resolutionMissedCaught
Exported class instead of factory wrapping private classMissedCaught
Missing server-only importMissedCaught
Plan says "update documentation" (violates CLAUDE.md)MissedCaught

Note: Codebase compliance is skipped for plan.md reviews (only phases contain code blocks).

Task Tracking

Tasks survive context compacts — skipping this check causes lost progress and repeated work.

Before starting work, run TaskList to check if tasks already exist from a previous session or before a compact. If tasks exist:

  1. Read existing tasks with TaskGet for each task ID
  2. Find the first task with status pending or in_progress
  3. Resume from that task — do NOT recreate the task list

If no tasks exist, create them after determining the review type (Step 1):

Example task list (phase review):

Task 1: Determine review type and read template
Task 2: Read the target phase file
Task 3: Run automated validators
Task 4: Compare against template (section-by-section)
Task 5: Check specific requirements
Task 6: Find reference implementations
Task 7: Codebase compliance check
Task 8: Write review file using template
Task 9: Validate review format
Task 10: Auto-fix Critical/High/Medium issues
Task 11: Return summary with next steps

Mark each task in_progress when starting and completed when done.

Output Location

Planning reviews go in the reviews/planning/ subfolder:

For plan.md review: Write to: {plan-folder}/reviews/planning/plan.md

For single phase review: Write to: {plan-folder}/reviews/planning/phase-{NN}.md

Examples:

  • plans/250202-voice-assistant/reviews/planning/plan.md (plan.md)
  • plans/250202-voice-assistant/reviews/planning/phase-01.md (phase 01)
  • plans/250202-voice-assistant/reviews/planning/phase-12.md (phase 12)

Create the reviews/planning/ directory if it doesn't exist. You may ONLY write files within the plan folder.

Note: Code/implementation reviews go in reviews/code/ instead — see /code-review skill.

Workflow

Step 1: Determine Review Type

Use the arguments parsed at the top of this document:

  • No phase specified → Review plan.md
  • phase NN or bare number specified → Review phase-NN-*.md

Step 2: Read the Appropriate Template

For plan.md review: Read ../create-plan/references/PLAN-TEMPLATE.md

For phase review: Read ../create-plan/references/PHASE-TEMPLATE.md

Extract all required sections from the template.

Step 3: Read the Target File

For plan.md review: Read {plan-folder}/plan.md

For phase review: Find and read {plan-folder}/phase-{NN}-*.md (use Glob to find the exact filename)

Step 4: Compare Against Template

First, run the automated validators to catch structural issues before manual review:

# Verify required sections exist (for phase files)
echo '{"cwd":"."}' | uv run $CLAUDE_PROJECT_DIR/.claude/hooks/validators/validate_file_contains.py \
  --directory {plan-folder} --extension .md \
  --contains '## Overview' \
  --contains '## Requirements' \
  --contains '## Implementation Steps' \
  --contains '## Acceptance Criteria'

# Check for skeleton/placeholder content
echo '{"cwd":"."}' | uv run $CLAUDE_PROJECT_DIR/.claude/hooks/validators/validate_no_placeholders.py \
  --directory {plan-folder} --extension .md

# For phase files: verify TDD ordering
echo '{"cwd":"."}' | uv run $CLAUDE_PROJECT_DIR/.claude/hooks/validators/validate_tdd_tasks.py \
  --directory {plan-folder} --extension .md

Include any validator failures in the review findings as Critical issues.

Then go through the template section-by-section manually:

  • Check if each required section exists in the target file
  • Note missing sections
  • Note incomplete sections (header exists but content missing)

Step 5: Check Specific Requirements

See checklist.md for detailed criteria covering:

  • Template structure compliance
  • Project framework alignment section (plan.md only)
  • Security requirements section (plan.md only)
  • Phase constraints — size, dependencies, Step 0 TDD (phase files only)

Step 6: Identify Phase Type and Find References

Skip this step for plan.md reviews.

Classify the phase by its primary deliverable:

Phase TypeIndicatorsReference Pattern to Search
Schema/DatabaseCreates tables, migrations, RLSsupabase/migrations/*.sql
ServiceCreates createXxxService()app/home/[account]/**/*service*.ts
Server ActionCreates Server Actions with auth + Zodapp/home/[account]/**/*server-actions*.ts
Schema (Zod)Creates validation schemasapp/home/[account]/**/*.schema.ts
UI/ComponentCreates React components, pagesapp/home/[account]/**/_components/*.tsx
MixedMultiple typesFind reference for each type

Find the closest reference implementation:

  1. Use Glob to find 2-3 files matching the phase type pattern
  2. Read the most relevant one (prefer files in similar feature areas)
  3. This reference is your ground truth for what correct code looks like

Example: For a phase creating server actions, read an existing *-server-actions.ts file like app/home/[account]/feature/_lib/server/server-actions.ts.

Step 7: Codebase Compliance Check

Skip this step for plan.md reviews.

For each code block in the phase file:

  1. Compare against the reference from Step 6
  2. Check against the codebase compliance checklist in checklist.md
  3. Flag deviations with severity (Critical/High/Medium/Low)

Only flag verifiable deviations. If you can see the correct pattern in the reference file and the phase code differs, that's a valid finding. Flagging ambiguous or intentional design choices produces noisy reviews that waste the user's time.

Severity guide:

  • Critical: Won't compile or will crash at runtime (wrong function signature, bad imports)
  • High: Violates security or established patterns (missing auth, wrong RLS, missing permission check)
  • Medium: Naming/convention violations that cause confusion (wrong file paths, inconsistent naming)
  • Low: Style issues that don't affect functionality (comment style, ordering)

Step 8: Read Output Template and Write Review File

Reviews written without reading the template first produce inconsistent formats that the user cannot compare across phases. Read PLAN-REVIEW-TEMPLATE.md and follow the exact format specified:

  • Variant A for plan.md reviews
  • Variant B for phase reviews

The template defines the exact sections, table columns, and verdict format. Inventing custom formats breaks the user's ability to track review status consistently across phases.

Write to:

  • Plan.md review: {plan-folder}/reviews/planning/plan.md
  • Phase review: {plan-folder}/reviews/planning/phase-{NN}.md

Step 8b: Validate Review Format

After writing the review file, run the validation script to catch structural issues:

python $CLAUDE_PROJECT_DIR/.claude/skills/review-plan/scripts/validate_review.py {review-file-path}

The script auto-detects whether this is a plan.md review (Variant A) or phase review (Variant B). If validation fails, fix the reported issues in the review file before proceeding.

Step 9: Auto-Fix Critical, High, and Medium Issues

Skip this step for plan.md reviews or if no Critical/High/Medium codebase issues were found.

Default: FIX IT. Most review issues are straightforward pattern corrections. A review that identifies problems but fixes nothing is only half the job — the user depends on auto-fix to save implementation time.

Fix Critical, High, and Medium issues directly in the phase file:

  1. For each Critical/High/Medium issue: a. Read the reference file cited in the issue (if not already read) b. Locate the problem in the phase file c. Apply the fix using Edit (for targeted changes) or Write (for larger rewrites)
  2. Examples of fixes to make (never defer these):
    • Title/phase number mismatches — filename is the source of truth
    • Missing 'use client' directives in code blocks
    • Wrong import paths or import ordering
    • Wrong file locations (e.g., wrong test directory)
    • Missing code blocks where the review says "should have concrete examples" — write them
    • Wrong function signatures — fix to match the reference
    • Removing documentation update steps — CLAUDE.md prohibits proactive docs
    • Wrong skill references (e.g., /review-phase → /code-review)
    • Convention violations where the correct pattern is clear from reference
    • "Needs codebase verification" — use your Glob/Grep tools to verify, then fix
    • Medium severity: Pattern deviations where reference shows correct approach
    • Medium severity: Missing code blocks where review says "should have concrete examples"
  3. The ONLY reasons to defer to the main agent (use sparingly):
    • The fix would change which features the phase delivers (scope change)
    • The fix contradicts an ADR or Decision Log entry
    • You genuinely cannot determine the correct fix even after using Glob/Grep to investigate
  4. After fixing, re-read the phase file to verify each fix is correct.
  5. Update the review file:
    • Append "(Auto-fixed)" to fixed items in the Issues table
    • Fill in the "Fixes Applied" section (see template)
    • Update the Verdict to reflect only remaining unfixed issues

Step 10: Return Summary with Next Steps

After writing the review file, return:

  • Review file location
  • Verdict (Ready/Not Ready) — based on remaining unfixed issues only
  • Template score (e.g., "12/12 sections")
  • Codebase score (e.g., "3 issues: 1 critical, 2 medium") — phase reviews only
  • Auto-fixed (count and brief list of what was fixed — includes Critical, High, and Medium)
  • Deferred to main agent (issues not auto-fixed and why)
  • Next Steps for Low — present as improvement opportunities (fix unless hallucinated or purely cosmetic)

Improvement mindset: When listing Medium/Low issues, frame them as concrete improvements worth doing now — not optional niceties. Phases are rarely revisited after completion, so "fix later" effectively means "never." The user prefers investing in quality now over speed. Suggest specific enhancements that would make the phase better, even if they go slightly beyond strict requirements.

Action directive for main agent: If there are deferred items or Medium/Low suggestions, end your summary with:

ACTION REQUIRED: [N] deferred items and [M] improvement suggestions need main agent attention.
Please review the items above and fix or discuss with the user before proceeding to implementation.

This ensures the main agent acts on the findings rather than just echoing the summary.

Resuming After Context Compact

If you notice context was compacted or you're unsure of current progress:

  1. Run TaskList to see all tasks and their status
  2. Find the in_progress task — that's where you were
  3. Run TaskGet {id} on that task to read full details
  4. Continue from that task — don't restart from the beginning

Tasks persist across compacts. The task list is your source of truth for progress, not your memory.

Pattern for every work session:

TaskList → find in_progress or first pending → TaskGet → continue work → TaskUpdate (completed) → next task

Constraints

  • ONE file per invocation — Either plan.md OR one phase file, never both
  • NO git commands (you don't have Bash access)
  • ONLY write files within the plan folder (review files AND phase file fixes)
  • Read the appropriate template before reviewing
  • Check EVERY section, not just a sample
  • Codebase compliance: Read at least one reference file before flagging issues
  • Codebase compliance: Only flag verifiable deviations (pattern clearly differs from reference)
  • Codebase compliance: Skipped for plan.md reviews (no code blocks to verify)
  • Auto-fix: Default is to fix. Only defer for genuine scope changes or ADR contradictions
  • Auto-fix: Use Glob/Grep to verify before claiming "needs codebase verification" — you have the tools

The user depends on thorough, section-by-section verification AND code block verification. Skimming and saying "looks good" without checking each section causes issues to be discovered during implementation when they're more costly to fix.

Troubleshooting

Review Produces "12/12 Ready" But Phase Has Code Issues

Cause: Template compliance check passed (all sections exist) but codebase compliance was skipped or superficial.

Fix: Ensure Step 6 (Identify Phase Type and Find References) reads an actual codebase file. The reference file is ground truth for what correct code looks like. Without it, code blocks can't be verified.

Phase File Not Found

Cause: Phase number in arguments doesn't match any phase-{NN}-*.md file in the plan folder.

Fix: Use Glob to list all files in the plan folder: plans/{folder}/phase-*.md. Verify the phase number matches the file naming pattern.

Review File Overwrites Previous Review

Cause: Running review twice on the same file without reading the previous review first.

Fix: Check if a review file already exists at the output location before writing. If it does, read it first and note what changed since the last review.

Delegation & Batching

For instructions on spawning multiple review agents in batches, see delegation.md.

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.