Review plan

From atomicinnovation/accelerator · View interactive version

Review plan is an AI agent skill from the GitHub repository atomicinnovation/accelerator. Review an implementation plan through multiple quality lenses and collaboratively iterate based on findings. Use when the user wants to evaluate a plan before implementation.

How to use this skill

Skill file

Review Plan

!accelerator config context --skill review-plan --fail-safe

!accelerator config agents --fail-safe

If no "Agent Names" section appears above, use these defaults:

accelerator:reviewer, accelerator:codebase-locator,

accelerator:codebase-analyser, accelerator:codebase-pattern-finder,

accelerator:documents-locator, accelerator:documents-analyser,

accelerator:web-search-researcher.

!accelerator config review plan --fail-safe

Plans directory: !accelerator config path plans --fail-safe

Plan reviews directory: !accelerator config path review_plans --fail-safe

Plan Review Template

The template below defines the frontmatter and body structure that every

plan review must carry. Read it now — use it to guide what information

you record in Steps 3-4 and what shape you persist in Step 4.8.

!accelerator config template plan-review --fail-safe

You are tasked with reviewing an implementation plan through multiple quality

lenses and then collaboratively iterating the plan based on findings.

Initial Response

When this command is invoked:

  1. Check if a plan path was provided:

note them for lens selection

  1. If no plan path provided, respond with:
I'll help you review an implementation plan. Please provide:
1. The path to the plan file (e.g., `{plans directory}/2025-01-08-ENG-1478-feature.md`)
2. (Optional) Focus areas to emphasise (e.g., "focus on security and architecture")

Tip: You can invoke this command with arguments:
  `/review-plan {plans directory}/2025-01-08-feature.md`
  `/review-plan {plans directory}/2025-01-08-feature.md focus on security and architecture`

Then wait for the user's input.

Available Review Lenses

| Lens | Lens Skill | Focus |

|--------------------|-------------------------------|-----------------------------------------------------------------------|

| Architecture | architecture-lens | Modularity, coupling, scalability, evolutionary design, tradeoffs |

| Security | security-lens | Threats, missing protections, STRIDE analysis, OWASP coverage |

| Test Coverage | test-coverage-lens | Testing strategy, test pyramid, edge cases, isolation, risk coverage |

| Code Quality | code-quality-lens | Design principles, testability, error handling, complexity management |

| Standards | standards-lens | Project conventions, API standards, accessibility |

| Usability | usability-lens | Developer experience, API ergonomics, configuration, onboarding |

| Performance | performance-lens | Algorithmic efficiency, resource usage, concurrency, caching |

| Documentation | documentation-lens | Documentation completeness, accuracy, audience fit |

| Database | database-lens | Migration safety, schema design, query correctness, integrity |

| Correctness | correctness-lens | Logical validity, boundary conditions, state management, concurrency |

| Compatibility | compatibility-lens | API contracts, cross-platform, protocol compliance, deps |

| Portability | portability-lens | Environment independence, deployment flexibility, vendor lock |

| Safety | safety-lens | Data loss prevention, operational safety, protective mechanisms |

Process Steps

Step 1: Read and Understand the Plan

  1. Read the plan file FULLY — never use limit/offset
  2. Read any files the plan references — work items, related research, key

source files mentioned

  1. Understand the plan's scope:
  1. Check for existing reviews: Glob for review documents matching

{plan reviews directory}/{plan-stem}-review-*.md. If any are found:

understand what was previously reviewed

most recent (review {N}, verdict: {verdict}) will be used as context."

fresh. But the aggregation step (Step 4) should reference the previous

review when composing cross-cutting themes and the assessment:

specifically, note which findings from the previous review recur in

the new review and which appear to have been addressed by plan changes.

frontmatter from a partial write), warn the user and proceed as if no

prior review exists.

The new review creates a new file with the next review number (e.g.,

-review-2.md). Previous review files are never modified or deleted —

the full review history is preserved on disk.

Step 2: Select Review Lenses

Determine which lenses are relevant based on the plan's scope and any user-

provided focus arguments.

If the user provided focus arguments:

If no focus arguments were provided, auto-detect relevance:

Take time to think carefully about which lenses apply based on:

changes

or configuration-only changes

configuration-only, or infrastructure-only changes with no code

user input handling, data storage, external integrations, API endpoints,

secrets/credentials, network boundaries

new file/module creation, changes to public interfaces

configuration surfaces, breaking changes, migration paths, developer-facing

libraries

high-throughput APIs, concurrent processing resource efficiency, caching

strategy, or algorithm-heavy logic. Skip for documentation-only,

configuration-only, or trivial changes.

user-facing features, configuration changes, breaking changes, or new

system components that will need documentation.

new tables, migrations, query-heavy features, or changes to data access

patterns.

documentation-only or trivial configuration changes.

dependency updates, protocol changes, cross-platform considerations, or

versioning decisions.

deployment modifications, new cloud service integrations, or

environment-specific logic.

logic, deployment changes, automated processes, or changes to critical

system paths.

Lens selection cap: Select the most relevant lenses for the change under

review. If review configuration is provided above, use the configured

min_lenses and max_lenses values. Otherwise, use the defaults:

{min lenses} to {max lenses} lenses. Apply these prioritisation rules:

Apply this lens selection pipeline in order:

  1. Start with all available lenses: the 13 built-in lenses plus any

custom lenses listed in the review configuration above.

  1. Remove disabled lenses: if review configuration specifies

disabled_lenses, remove those from the available set. They are never

selected regardless of auto-detect criteria.

  1. Mark core lenses: if review configuration specifies core_lenses,

use that list. Otherwise, the core lenses are Architecture, Code Quality,

Test Coverage, and Correctness. Core lenses are included unless the change

is clearly outside their scope.

  1. Auto-detect remaining lenses: use the criteria below (for built-in

lenses) and the auto-detect criteria from review configuration (for custom

lenses) to identify which non-core lenses are relevant to the change.

Custom lenses that provide auto-detect criteria participate in selection

like any other non-core lens. Custom lenses without auto-detect criteria

(marked "always include" in the configuration) are always selected. Custom

lenses use absolute paths instead of the ${CLAUDE_PLUGIN_ROOT} lens

path template.

  1. Apply focus arguments: if the user provided focus areas, prioritise

the corresponding lenses and fill remaining slots with auto-detected ones.

  1. Cap at max_lenses: if more lenses than the configured maximum pass

selection, rank by relevance and drop the least relevant. Prefer lenses

whose core responsibilities directly overlap with the change's concerns.

  1. Enforce min_lenses floor: never run fewer than min_lenses unless

the change is trivially scoped.

When presenting the lens selection, clearly indicate which lenses are

selected and which are skipped, with a brief reason for each skip.

Present your lens selection to the user before proceeding:

Based on the plan's scope, I'll review through these lenses:
- Architecture: [reason]
- Security: [reason — or "Skipping: no security-sensitive changes identified"]
- Test Coverage: [reason]
- Code Quality: [reason]
- Standards: [reason — or "Skipping: ..."]
- Usability: [reason — or "Skipping: ..."]
- Performance: [reason — or "Skipping: no performance-sensitive changes identified"]
- Documentation: [reason — or "Skipping: ..."]
- Database: [reason — or "Skipping: no database changes identified"]
- Correctness: [reason]
- Compatibility: [reason — or "Skipping: ..."]
- Portability: [reason — or "Skipping: ..."]
- Safety: [reason — or "Skipping: ..."]

Then use the AskUserQuestion tool to ask the user whether to proceed, with

two options:

  1. Yes, use the proposed lenses — run the review with the selected lenses
  2. No, specify which lenses to use — adjust the selection before running

Wait for the user's answer before spawning reviewers. If they choose option 2,

ask which lenses they want as a plain-text question only — do NOT use

AskUserQuestion for this follow-up (the lens list is too large for the

4-option limit). Once confirmed, update the selection and re-present it using

the same AskUserQuestion proceed/adjust pattern above.

Step 3: Spawn Review Agents

For each selected lens, spawn the {reviewer agent} agent with a prompt

that includes paths to the lens skill and output format files. Do NOT read

these files yourself — the agent reads them in its own context.

Compose each agent's prompt following this template:

You are reviewing an implementation plan through the [lens name] lens.

## Context

The implementation plan is at [path]. Read it fully.
Also read any files the plan references for additional context.

## Analysis Strategy

1. Read your lens skill and output format files (see paths below)
2. Read the implementation plan file fully
3. Identify the scope and complexity of the proposed changes
4. Explore the codebase to understand existing patterns and context
5. Evaluate the plan through your lens, applying each key question
6. Reference specific plan sections in your findings using the `location`
   field (e.g., "Phase 2: API Endpoints", "Testing Strategy section")

## Lens

Read the lens skill at the path listed in the Lens Catalogue table in the
review configuration above. If no review configuration is present, use:
${CLAUDE_PLUGIN_ROOT}/skills/review/lenses/[lens]-lens/SKILL.md

## Output Format

Read the output format at: ${CLAUDE_PLUGIN_ROOT}/skills/review/output-formats/plan-review-output-format/SKILL.md

IMPORTANT: Return your analysis as a single JSON code block. Do not include
prose outside the JSON block.

Spawn all selected agents in parallel using the Task tool with

subagent_type: "!accelerator config agent reviewer --fail-safe".

IMPORTANT: Wait for ALL review agents to complete before proceeding.

Handling malformed agent output:

If an agent's response is not a clean JSON block, apply this extraction

strategy:

  1. Look for a JSON code block fenced with triple backticks (optionally with

a json language tag)

  1. If found, extract and parse the content within the fences
  2. If the extracted JSON is valid, use it normally
  3. If no JSON code block is found, or the JSON within it is invalid, apply

the fallback: treat the agent's entire output as a single finding with

the agent's lens name and "major" severity, and include it in the

review summary

When falling back, warn the user that the agent's output could not be parsed

and present the raw agent output in a collapsed form so the user can see what

the agent actually found.

Step 4: Aggregate and Curate Findings

Once all reviews are complete:

  1. Parse agent outputs: Extract the JSON block from each agent's response

(see the extraction strategy in Step 3). Collect the summary, strengths,

and findings arrays from each.

  1. Aggregate across agents:
  1. Deduplicate findings: Where multiple agents flag overlapping plan

sections with similar concerns, consider merging — but only when the

findings address the same underlying concern from different lens

perspectives. Location proximity alone is not sufficient; the findings must

be semantically related.

When merging:

When in doubt, keep findings separate — distinct findings are easier to

address individually than a merged finding covering multiple concerns.

  1. Prioritise findings:
  1. Determine suggested verdict:

If review configuration provides verdict overrides above, apply those

thresholds instead of the defaults below:

rule (major count rule still applies independently)

exist → suggest REVISE

→ suggest REVISE

→ suggest COMMENT

Verdict meanings:

When presenting a COMMENT verdict with major findings, note: "Plan is

acceptable but could be improved — see major findings below."

  1. Identify cross-cutting themes: Look for findings that appear across

multiple lenses — issues flagged by 2+ agents reinforce each other and

should be highlighted in the summary. Also identify tradeoffs where

different lenses conflict (e.g., security wants more validation, usability

wants less friction).

  1. Compose the review summary:

```markdown

## Plan Review: [Plan Name]

Verdict: [APPROVE | REVISE | COMMENT]

[Combined assessment: take each agent's summary and synthesise into 2-3

sentences covering the overall quality of the plan across all lenses]

### Cross-Cutting Themes

[Issues that multiple lenses identified — these deserve the most attention]

### Tradeoff Analysis

[Where different lenses disagree, present both perspectives]

[Omit either section if there are no cross-cutting themes or tradeoffs]

### Findings

#### Critical

Location: [plan section]

[First 1-2 sentences of body as summary]

#### Major

Location: [plan section]

[First 1-2 sentences of body as summary]

#### Minor

Location: [plan section]

[First 1-2 sentences of body as summary]

#### Suggestions

Location: [plan section]

[First 1-2 sentences of body as summary]

### Strengths

### Recommended Changes

[Ordered list of specific, actionable changes to the plan, prioritised by

impact. Each should reference the finding(s) it addresses.]

1. [Change description] (addresses: [finding titles])

[Specific guidance on what to modify in the plan]


Review generated by /review-plan

```

  1. Write the review artifact to {plan reviews directory}/:

Derive the review filename using the plan stem and the next available

review number. The plan stem is the basename of the plan path without

the .md extension. For example, if the plan is

{plans directory}/2026-03-22-improve-error-handling.md and no prior reviews

exist, the review filename is

{plan reviews directory}/2026-03-22-improve-error-handling-review-1.md.

To determine the next review number:

```bash

mkdir -p {plan reviews directory}

# Glob for existing reviews of this plan

ls {plan reviews directory}/{plan-stem}-review-*.md 2>/dev/null

# Extract the highest number, increment by 1. If none exist, use 1.

```

Populate frontmatter

The target: field is filled automatically from the $ARGUMENTS plan

reference — this is what makes the review traceable back to the plan it

covers. Per ADR-0034, the typed-linkage form is "plan:<plan-id>".

Before writing the plan review file, capture metadata and substitute the

unified base fields and per-type extras into the template's frontmatter

block:

  1. Invoke accelerator corpus metadata derive

to obtain Current Date/Time (UTC):.

  1. Substitute every field below with the indicated value:

as a YAML string

Fill when the review names a parent plan; otherwise omit the key.

filename stem (e.g. "plan:2026-05-30-0065-update-artifact-templates-to-unified-schema");

the typed-linkage ref to the plan under review, per ADR-0034.

Always fill — every review has a target.

artifacts (["plan-review:NNNN", ...]). Fill when prior reviews

are explicit; otherwise omit the key.

glob above)

per the Step 7 flow)

  1. Write the file with the substituted frontmatter block, followed by

the review summary composed in Step 4.7 and the per-lens results as

a final section:

{The full review summary from Step 4.7}

## Per-Lens Results

### {Lens 1 Name}

**Summary**: {agent summary}

**Strengths**:
{agent strengths}

**Findings**:
{agent findings — each with severity, confidence, location, and body}

### {Lens 2 Name}

...

The per-lens results section contains the full content from each agent's

JSON output, converted to readable markdown. This preserves the complete

analysis for future reference while keeping it human-readable.

Validate the frontmatter: after writing the review, run

accelerator corpus frontmatter validate --file <path>

If it exits non-zero, the review document violates the canonical frontmatter

standard; report the emitted violation and fix the frontmatter before

completing.

Step 5: Present the Review

Present the composed review summary from Step 4.7 to the user.

After presenting, offer the user control before proceeding to iteration:

The review is complete. Verdict: [verdict]

Would you like to:
1. Proceed to address findings? (I'll help edit the plan)
2. Change the verdict? (currently: [verdict])
3. Discuss any specific findings in more detail?
4. Re-run specific lenses with adjusted focus?

Step 6: Collaborative Plan Iteration

After presenting the review:

  1. Discuss findings with the user:
  1. Edit the plan based on agreed changes:
  1. Summarise changes made:

```

I've made the following changes to the plan:

```

Step 7: Offer Re-Review

After edits are complete:

The plan has been updated. Would you like me to run another review pass to
verify the changes address the findings? This will re-run the relevant lenses
to check for any remaining issues or new concerns introduced by the edits.

If the user accepts:

determine resolution status

introduced new issues

```

## Re-Review: [Plan Name]

Verdict: [APPROVE | REVISE | COMMENT]

### Previously Identified Issues

### New Issues Introduced

### Assessment

[Whether the plan is now in good shape or needs further iteration]

```

After composing the re-review summary, update the review artifact

as a single write operation:

  1. Read the full content of the existing review document at

{plan reviews directory}/{plan-stem}-review-{N}.md

  1. In memory, update exactly four frontmatter fields — verdict,

review_pass, last_updated, and last_updated_by — preserving

all other fields and body content verbatim. The date field

retains the original-review timestamp; only last_updated

advances on re-review. (last_updated_by may match reviewer if

the re-reviewer is the same person, but is computed independently

to handle the cross-reviewer case.)

Pre-0066-artifact handling: when the re-reviewed artifact

lacks last_updated: and/or last_updated_by: (it was written

pre-0066), insert those fields rather than treating their absence

as malformed-frontmatter. Only an unparseable YAML block or

missing --- delimiters triggers the fresh--review-{N+1}.md

fallback.

  1. Append the re-review section at the end of the content (after the

Per-Lens Results section)

  1. Write the complete modified content back to the same file in one

operation

The frontmatter's verdict and review_pass fields reflect the

latest re-review state (not the initial review state), so readers can

check the current status without scrolling:

```markdown

## Re-Review (Pass {N}) — {date}

Verdict: {verdict}

### Previously Identified Issues

### New Issues Introduced

### Assessment

{Whether the plan is now in good shape or needs further iteration}

```

The document reads chronologically: initial review, per-lens results,

then re-review sections in order. The frontmatter always reflects the

latest verdict and pass count.

If the user declines or the re-review shows all clear, the review is complete.

Important Guidelines

  1. Read the plan fully before doing anything else — you need complete

context to select lenses and brief the agents properly

  1. Spawn agents in parallel — the review lenses are independent and should

run concurrently for efficiency

  1. Synthesise, don't concatenate — your value is in compiling a balanced

view across lenses, identifying themes and tradeoffs, and prioritising

actionable recommendations. Don't just paste seven reports together.

  1. Be balanced — highlight strengths alongside concerns. A plan that makes

good architectural decisions but has security gaps should get credit for

both.

  1. Prioritise by impact — structural issues that are hard to fix later

matter more than surface-level concerns. A critical finding from one lens

outweighs minor findings from all seven.

  1. Respect tradeoffs — when lenses conflict, present both sides and let the

user decide. Don't privilege one quality attribute over another without

justification.

  1. Edit conservatively — when modifying the plan, make the minimum changes

needed to address findings. Don't restructure or rewrite beyond what's

required.

  1. Track what was addressed — when presenting changes, clearly map them

back to findings so nothing falls through the cracks.

  1. Handle malformed agent output gracefully — if an agent doesn't return

valid JSON, extract what you can and present the raw output to the user

rather than silently dropping findings

  1. Keep positive feedback in the summary — strengths go in the review

summary, not as individual findings. Findings are exclusively for

actionable concerns.

  1. Use emoji severity prefixes consistently — 🔴 critical, 🟡 major,

🔵 minor/suggestion, ✅ strengths. IMPORTANT: Use the actual Unicode

emoji characters (🔴 🟡 🔵 ✅), NOT text shortcodes like :red_circle:,

:yellow_circle:, :blue_circle:, or :white_check_mark:. Shortcodes

are not rendered in markdown and will appear as literal text.

What NOT to Do

{plan reviews directory}/ so the review is visible to the team

lenses will run

structured format

accepted tradeoffs

need a security review

in the summary only

severity

Relationship to Other Commands

The review sits in the plan lifecycle between creation and implementation:

  1. /create-plan — Create the implementation plan interactively
  2. /review-plan — Review and iterate the plan quality (this command)
  3. /implement-plan — Execute the approved plan
  4. /validate-plan — Verify implementation matches the plan

!accelerator config instructions review-plan --fail-safe

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.