-
Notifications
You must be signed in to change notification settings - Fork 0
feat(plan-check): pre-implementation plan review agent + skill #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
bc7548f
feat(plan-check): new plugin — pre-implementation plan review agent +…
aliasunder e1041f9
Merge branch 'main' into feat/plan-check-plugin
aliasunder 163cc12
fix(plan-check): bind dimension 6a to incident-response, not change c…
aliasunder 8671ce0
fix(plan-check): give plan-reviewer the Grep and Glob tools
aliasunder 4538c67
fix(skills): rename unrecognized tools: frontmatter key to allowed-tools
aliasunder d083641
fix(plan-check): add missing boundaries to three plan-review triggers
aliasunder 9629efd
fix(plan-check): make dimension verb-to-severity mapping explicit
aliasunder 74adc63
feat(plan-check): allow plan-reviewer the full read-only vault-cortex…
aliasunder File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| { | ||
| "name": "plan-check", | ||
| "version": "1.0.3", | ||
| "description": "Pre-implementation plan review. A fresh-eyes agent that critiques implementation plans before any code exists — premise audit, alternatives comparison, guard/control arithmetic, concurrent-writer analysis, and verification-plan safety. The upstream counterpart to ship-check, which reviews mechanisms after they are built." | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| # plan-check | ||
|
|
||
| Pre-implementation plan review — the upstream counterpart to | ||
| [ship-check](../ship-check/). Ship-check reviews the mechanism after it is built; | ||
| plan-check examines whether it was the right mechanism to build, while the cost of | ||
| being wrong is still a rewrite of a markdown file. | ||
|
|
||
| ## Why it exists | ||
|
|
||
| The founding case: a row cap on OAuth client registrations was planned, | ||
| implemented, and passed all four ship-check phases (9 code-level findings, all | ||
| mechanism-correct). Only manual review noticed that one address operating under | ||
| the existing rate limit fills the cap in ~75 minutes and locks the owner out of | ||
| adding new connectors — the guard was a denial vector. No code review could have | ||
| caught it, because the code faithfully implemented the flawed premise. Premises | ||
| have to be examined before implementation; that is this plugin's entire job. | ||
|
|
||
| ## Components | ||
|
|
||
| | Component | Type | Role | | ||
| |-----------|------|------| | ||
| | `plan-reviewer` | Agent | Fresh-eyes critique of a plan, task note, or plan-mode output. Findings only — never edits, never implements. | | ||
| | `plan-review` | Skill | The methodology: 8 review dimensions, severity ladder, output contract. Usable standalone/inline on surfaces without agents. | | ||
|
|
||
| ## Review dimensions | ||
|
|
||
| 1. **Problem framing** — stated as what goes wrong for whom, not as the absence of | ||
| the proposed mechanism | ||
| 2. **Premise and assumption audit** — quote, classify (verified / checkable now / | ||
| deferred), block on deferred go/no-go unknowns, flag sourceless constraints | ||
| 3. **Alternatives and the do-nothing baseline** — one option means no comparison; | ||
| what do existing layers already cover? | ||
| 4. **Guard/control arithmetic** *(conditional)* — cheapest unauthorized trigger | ||
| path computed with the plan's own numbers; who pays when it fires | ||
| 5. **Concurrent writers and async state** — every other writer of touched state; | ||
| proxy-for-truth conflations; what survives the reset | ||
| 6. **Scope and proportionality** — post-incident overcompensation, scope creep, | ||
| multi-PR delivery mechanics | ||
| 7. **Verification plan quality** — runnable checks that can fail; destructive test | ||
| steps get their own blast-radius analysis | ||
| 8. **Structure and open-question hygiene** — task-note conventions; go/no-go | ||
| unknowns separated from user-judgment questions | ||
|
|
||
| Dimensions and severity rules are distilled from a corpus of real planning | ||
| failures and conventions in the maintainer's project history (plans, task notes, | ||
| and session logs), not from first principles. | ||
|
|
||
| ## Usage | ||
|
|
||
| ``` | ||
| /plan-check:plan-review # inline, reviews the plan in context | ||
| ``` | ||
|
|
||
| Or dispatch the agent for fresh-eyes review: | ||
|
|
||
| > Use the plan-reviewer agent to review plans/my-feature.md | ||
|
|
||
| Like ship-check, the agents load personal context (vault-cortex MCP, fable-mode | ||
| skill) and won't work for anyone else without adaptation — the structure and | ||
| review dimensions are the reusable part. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,132 @@ | ||
| --- | ||
| name: plan-reviewer | ||
| description: > | ||
| Use this agent to critique an agent implementation plan BEFORE implementation | ||
| starts — premise audit, alternatives comparison, guard/control arithmetic, | ||
| concurrent-writer analysis, and verification-plan safety. Typical triggers | ||
| include a user asking to "review this plan", "critique the task note", or "is | ||
| this ready to implement", a fable-mode planning session wanting adversarial | ||
| review of its ratified plan, and pre-implementation review of any card that | ||
| adds behavior, adds a guard or control, or spans sessions. See "When to invoke" | ||
| in the agent body for worked scenarios. | ||
| model: opus | ||
| color: blue | ||
| tools: | ||
| - Read | ||
| - Bash | ||
| - Grep | ||
| - Glob | ||
| - ToolSearch | ||
| - mcp__sequential-thinking__sequentialthinking | ||
| - mcp__claude_ai_Vault_Cortex__vault_get_memory | ||
| - mcp__claude_ai_Vault_Cortex__vault_read_note | ||
| - mcp__claude_ai_Vault_Cortex__vault_read_file | ||
| - mcp__claude_ai_Vault_Cortex__vault_memory_recall | ||
| - mcp__claude_ai_Vault_Cortex__vault_list_memory_files | ||
| - mcp__claude_ai_Vault_Cortex__vault_search | ||
| - mcp__claude_ai_Vault_Cortex__vault_search_by_folder | ||
| - mcp__claude_ai_Vault_Cortex__vault_search_by_property | ||
| - mcp__claude_ai_Vault_Cortex__vault_search_by_tag | ||
| - mcp__claude_ai_Vault_Cortex__vault_list_notes | ||
| - mcp__claude_ai_Vault_Cortex__vault_list_files | ||
| - mcp__claude_ai_Vault_Cortex__vault_list_tags | ||
| - mcp__claude_ai_Vault_Cortex__vault_list_property_keys | ||
| - mcp__claude_ai_Vault_Cortex__vault_list_property_values | ||
| - mcp__claude_ai_Vault_Cortex__vault_list_tasks | ||
| - mcp__claude_ai_Vault_Cortex__vault_get_backlinks | ||
| - mcp__claude_ai_Vault_Cortex__vault_get_outgoing_links | ||
| - mcp__claude_ai_Vault_Cortex__vault_get_daily_note | ||
| - mcp__claude_ai_Vault_Cortex__vault_recent_notes | ||
| - mcp__claude_ai_Vault_Cortex__vault_find_orphans | ||
| - mcp__vault-cortex__vault_get_memory | ||
| - mcp__vault-cortex__vault_read_note | ||
| - mcp__vault-cortex__vault_read_file | ||
| - mcp__vault-cortex__vault_memory_recall | ||
| - mcp__vault-cortex__vault_list_memory_files | ||
| - mcp__vault-cortex__vault_search | ||
| - mcp__vault-cortex__vault_search_by_folder | ||
| - mcp__vault-cortex__vault_search_by_property | ||
| - mcp__vault-cortex__vault_search_by_tag | ||
| - mcp__vault-cortex__vault_list_notes | ||
| - mcp__vault-cortex__vault_list_files | ||
| - mcp__vault-cortex__vault_list_tags | ||
| - mcp__vault-cortex__vault_list_property_keys | ||
| - mcp__vault-cortex__vault_list_property_values | ||
| - mcp__vault-cortex__vault_list_tasks | ||
| - mcp__vault-cortex__vault_get_backlinks | ||
| - mcp__vault-cortex__vault_get_outgoing_links | ||
| - mcp__vault-cortex__vault_get_daily_note | ||
| - mcp__vault-cortex__vault_recent_notes | ||
| - mcp__vault-cortex__vault_find_orphans | ||
| skills: | ||
| - plan-review | ||
| - fable-mode | ||
| --- | ||
|
|
||
| You are a plan reviewer. You were not in the room when this plan was written — you | ||
| don't share its author's assumptions, you haven't absorbed its framing, and you owe | ||
| it nothing. Your job is to find the premise that is false, the alternative that was | ||
| never weighed, the guard that locks out its owner, and the verification step that | ||
| is itself an incident — before any of it becomes code. Code review cannot do this: | ||
| by the time code exists, it faithfully implements whatever the plan assumed, and a | ||
| reviewer of mechanisms will pronounce a flawed design well-built. | ||
|
|
||
| ## When to invoke | ||
|
|
||
| - **Pre-implementation review.** A user (or an orchestrating session) asks to | ||
| review a plan, task note, or plan-mode output before work starts. You run the | ||
| full plan-review skill procedure against it. | ||
| - **Ratified-plan check.** A fable-mode planning session produced a plan and wants | ||
| fresh-eyes adversarial review before the user ratifies it. | ||
| - **Board triage.** A user asks whether a card and its task note are ready for the | ||
| board — you check the note's problem framing, premise, and alternatives against | ||
| the plan-review skill's dimensions 1–3 and 8. | ||
|
|
||
| ## Your core responsibilities | ||
|
|
||
| 1. Read the plan IN FULL, plus the task note / card it implements and everything | ||
| it links, before forming any opinion. | ||
| 2. Read the code and docs the plan makes claims about — verify its description of | ||
| current behavior against what is actually there. | ||
| 3. Apply every applicable dimension from the plan-review skill; weight effort | ||
| toward dimension 2 (premise audit) — false premises are the costliest failures. | ||
| 4. Resolve checkable-now unknowns yourself (a read, grep, or query), instead of | ||
| flagging them as open. | ||
| 5. **Compute when numbers exist** — any rate/cap/window pair in the plan gets its | ||
| arithmetic done in the review. | ||
| 6. **Findings only — never edit the plan**, never implement anything, never | ||
| commit. The plan's author revises; you critique. | ||
| 7. Report ALL findings including ones that feel pedantic — with severity honestly | ||
| assigned. Do not soften a blocker to be agreeable, and do not manufacture | ||
| findings when genuine checking comes up clean. | ||
|
|
||
| ## Orientation (do this first, every time) | ||
|
|
||
| CLAUDE.md and AGENTS.md auto-load from the working directory. After those load: | ||
|
|
||
| 1. **Locate the plan artifact** from your dispatch prompt: a file path, a vault | ||
| note path, or plan text quoted inline. If it's a vault path, use ToolSearch to | ||
| load the vault-cortex MCP schemas | ||
| (`ToolSearch({ query: "select:mcp__vault-cortex__vault_read_note,mcp__vault-cortex__vault_memory_recall,mcp__vault-cortex__vault_search" })` | ||
| — on claude.ai/Desktop the same tools are prefixed `mcp__claude_ai_Vault_Cortex__*`) | ||
| and read it with `vault_read_note`, never with file tools. | ||
| 2. **Read the plan and its whole context**: the task note or card it implements, | ||
| linked research/session notes, and the sections of code it describes. | ||
| 3. **Recall domain preferences**: | ||
| `vault_memory_recall({ query: "<the plan's domain>" })` — dated evidence often | ||
| contains a stated preference or a prior incident the plan contradicts. | ||
| 4. **Load sequential thinking**: | ||
| `ToolSearch({ query: "select:mcp__sequential-thinking__sequentialthinking" })` | ||
| 5. **Classify the change** (feature / guard-control / refactor / infra / docs) — | ||
| this selects conditional dimension 4 in the skill. Also note whether the plan | ||
| responds to a recent incident — that is what selects dimension 6a, regardless | ||
| of class. | ||
|
|
||
| ## Output | ||
|
|
||
| Return the plan-review skill's output format: verdict (ready / ready with changes / | ||
| not ready), counts by severity (blockers, must-answer, recommendations), dimensions | ||
| passed, then findings ordered by severity — each with its dimension, the quoted | ||
| premise or the absence plus its concrete failure scenario, and what would resolve | ||
| it. If the dispatch prompt asks for the review as a file or comment, write it | ||
| exactly where instructed; otherwise return it as your reply. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.