Plan review architecture

From duthaho/claudekit · View interactive version

Plan review architecture is an AI agent skill from the GitHub repository duthaho/claudekit. Architecture-dimension reviewer for written plans. Use when running plan-review or directly when an architectural review is wanted. Activate for keywords like "architecture review", "data flow", "failure modes", "rollback", "edge cases", "test matrix". Scores 5 sub-dimensions 0-10, produces ranked f

How to use this skill

Skill file

Plan Review — Architecture Dimension

Overview

The architecture-dimension reviewer for plan-review. Reads a plan and scores

five concrete sub-dimensions on 0-10: data flow, failure modes, edge cases, test

matrix, and rollback safety. Every score must be paired with a finding citing the

plan task number or section that caused the score. The skill produces a ranked

fix list aligned with plan-review's consolidation step. Used by plan-review's

orchestrator, but invocable directly when only an architectural review is needed.

When to Use

When NOT to Use

context produce noise

Process

Step 1: Pre-read

Goal: Build context before scoring.

Inputs: The plan file. Optionally: the spec it's derived from, the relevant

codebase area.

Actions:

  1. Read the spec (if available) for goals, non-goals, constraints, acceptance

criteria.

  1. Read the plan end to end.
  2. Run map-codebase mentally on the affected area: which files, which entry

points, which downstream services or queues.

Output: A short pre-read note: `Plan touches <areas>; primary risks I'll watch

for: <list>`.

Step 2: Score the five sub-dimensions

Goal: Produce 5 scores with cited findings.

Inputs: The plan file plus pre-read notes.

Actions: For each sub-dimension below, score 0-10 and write at least one

finding. Findings must cite the plan task number or section.

  1. Data flow (0-10)
  1. Failure modes (0-10)

failure?

  1. Edge cases (0-10)
  1. Test matrix (0-10)
  1. Rollback safety (0-10)

a rollback procedure named?

gated behind a feature flag, dual-write, or backfill?

Step 3: Rank findings as fixes

Goal: Convert each finding into a concrete fix proposal.

Inputs: The findings from Step 2.

Actions:

  1. For each finding, write a fix in the form: `<task or section> — change

<X> to <Y> or Add <Z> to <task or section>`.

  1. Rank each fix by impact:
  1. If a sub-dimension scores ≤4, the gap is almost always a blocker.

Output: A ranked list of fixes with cited targets in the plan.

Step 4: Write the architecture report

Goal: Hand plan-review a clean, paste-ready report.

Inputs: Scores and ranked fixes.

Actions:

  1. Produce a Markdown block with this structure:

```markdown

## Architecture review

### Findings

```

  1. Hand back to plan-review for consolidation with the experience reviewer.

Output: The Markdown block.

Rationalizations

| Excuse | Why it sounds reasonable | Why it's wrong | What to do instead |

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

| "I'll score by gut feel — calibration is a waste of time." | Experienced reviewers do have calibrated guts. | Gut-feel scoring without rubric anchors produces "everything's a 7" output the user cannot act on. The rubric anchors exist so the score communicates which gap is open, not just that something feels off. | Use the 0/5/10 anchors above. If a sub-dimension feels like a 7, that's actually a "5 with one gap closed" — name the open gap, score 6 or 7, and write the finding for it. |

| "I'll skip the citations — the user can find the relevant tasks." | Plans are short; finding the cited task is fast. | Findings without citations leave the user to do the matching, and they will skip findings that take work to verify. The citation is the cheapest part of the review for the reviewer and the most expensive part to reconstruct for the consumer. | Cite the task number or plan section in every finding. Task 4 — failure mode for the cache miss is undefined not Cache failure modes are missing. |

| "Rollback for this is obviously the deploy team's problem." | Some rollbacks are operational, owned by SRE. | "Obviously theirs" is the line you say when you don't know what the rollback is. The author of the change knows what would need to be undone; the deploy team knows how to undo it. The plan needs the what, not the how. | Even if SRE owns execution, the plan author writes one line: "Rollback: revert <commit>; re-run migration down; truncate <table>." If you can't write that line, escalate during review, don't skip during review. |

| "Edge cases score is low because edge cases are uncommon — that's fine." | Some edges genuinely never trigger in production. | "Uncommon" without measurement is a guess. Even uncommon edges hit at production scale (1-in-a-million × 1M req/day = 1/day). Scoring edge cases low because "they're uncommon" is the reviewer flinching from a real gap. | Score the edge case sub-dimension on whether the plan names the edges, not on whether you predict they'll trigger. The plan is responsible for surfacing the cases; ops decides which to handle. |

| "Test matrix is the tester's problem, not architecture's." | Test design and architecture are different specialties. | The test matrix is architectural in plans because the tests double as a check that the architecture's failure modes were considered. A plan with rich failure modes and thin tests is internally inconsistent — the tests don't exercise what the architecture promises. | Score the test matrix here. Cite the failure modes from sub-dimension 2 and confirm the test list (sub-dimension 4) covers them. The two scores should track each other; if they don't, that's a finding. |

Evidence Requirements

| Checkpoint | Required artifact | What "no evidence" looks like |

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

| End of Step 1 | Pre-read note naming areas touched and risks to watch | "I read the plan, looks like a backend change." |

| End of Step 2 | Five scores 0-10 each paired with at least one cited finding | "Looks mostly OK; some gaps." |

| End of Step 3 | Ranked fix list with [Blocker/Important/Nice] tags | "There are some things to improve." |

| End of Step 4 | The Markdown block exactly in the format above | A free-form summary the orchestrator has to re-format. |

Red Flags

pattern-matching. Pick the weakest sub-dimension and find at least one finding

worth flagging.

isn't an architectural concern, or the architecture has gaps the tests don't

exercise.

weakness; consider whether the plan author needs help in that area before more

fixes pile on.

reading the actual rollback lines; "10/10" without specific procedures cited is

a false positive.

References

backing services, and disposability inform sub-dimensions 1 (data flow) and 5

(rollback safety). Cited at the rubric level, not skill level — when reviewing

a plan that violates twelve-factor principles, name which factor.

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.