plan-verify
Verify an implementation plan against the actual codebase before starting implementation. Use when about to execute tasks from a plan document.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Verify an implementation plan against the actual codebase before starting implementation. Use when about to execute tasks from a plan document.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Multi-agent coordination via SeleneDB context bridge. Check active peers, read shared context, declare work intents, and avoid conflicts when multiple agents work simultaneously.
Commit discipline with graph linking. MERGE GitCommit nodes and link to active milestones, findings, and decisions. Verify before committing, never push unless asked.
Background annotation discipline. All skills auto-annotate graph nodes with rationale, observations, TODOs, and bookmarks as they work. Captures context that feeds into graph-docs documentation generation.
Track and recall context across sessions. Auto-captures rolling summaries as skills complete. Invoke to review session history, search past work, or see what happened recently.
Language-specific standards plus graph-sourced conventions. Reads Convention nodes from SeleneDB, enforces project rules alongside built-in standards. Promotes recurring violations to new conventions.
Structured multi-perspective debate for evaluating decisions. 3-phase methodology: independent generation, adversarial exchange, synthesis. Use when a decision has multiple valid approaches or high stakes.
| name | plan-verify |
| description | Verify an implementation plan against the actual codebase before starting implementation. Use when about to execute tasks from a plan document. |
This is Stage 5a of the feature-design workflow, but can also be invoked
standalone on any implementation plan.
Catch factual errors in implementation plans before they become implementation bugs. Plans make claims about what exists, how APIs work, and where code lives. These claims go stale or were wrong to begin with. The most common plan errors are naming hallucinations (referencing renamed functions), mapping hallucinations (wrong data flow assumptions), and resource hallucinations (files or APIs that do not exist).
When NOT to use: The user is brainstorming or exploring (plans aren't written yet). The plan was just generated in this conversation from current code (verification adds little for same-session plans). The user asks to "just start building."
If SeleneDB is available (see selene-integration.md), create a session and recall prior verification context:
Create session with skill: 'plan-verify' and scope: $ARGUMENTS
Scoped auto-recall — query for prior verifications on referenced files:
:PlanClaim nodes with inaccuracy_type != 'none' linked to
:CodeLocation nodes in the plan's scopeIf prior verification data exists, present it:
"Prior verification context:
- [Module] has had [N] naming inaccuracies in past plans
- Most common inaccuracy type in this area: [type]
I'll prioritize checking [high-drift areas] first."
If no prior context exists, skip silently.
For each task in the plan, verify the following against the actual codebase. Use grep and read. Do not trust the plan's claims. See verification-checklist.md for the complete mechanical checklist.
If the plan references a creation date or commit, check whether the codebase has changed since then:
git log --oneline <plan-date>..HEAD -- <referenced-files>
If referenced files have changed, the plan's claims about those files are suspect. Verify each claim against the current state, not the state when the plan was written.
Every file path mentioned in the plan (create, modify, test):
Every function, method, struct, trait, or type referenced in the plan:
#[deprecated], @deprecated)This is the highest-value check. A wrong signature cascades through every task that depends on it.
For claims about how data moves through the system:
For task dependencies (blocks/blocked-by):
For tasks assigned to the same execution wave:
Search the plan for incomplete content:
Present inaccuracies and missing context one at a time, starting with the highest blast-radius items:
Summarize: "N confirmed, N inaccurate (N corrected), N missing context, N stale."
After each user decision on an inaccuracy, write the claim to the graph:
INSERT (c:PlanClaim {
claim: $plan_claim,
actual: $codebase_state,
inaccuracy_type: $type,
blast_radius: $downstream_task_count
})
RETURN id(c) AS claim_id
Link to session and affected code location:
MATCH (s:Session) WHERE id(s) = $session_id
MATCH (c:PlanClaim) WHERE id(c) = $claim_id
INSERT (s)-[:produced]->(c)
MERGE (loc:CodeLocation {file: $file, function: $function})
INSERT (c)-[:affects]->(loc)
Also write confirmed claims (with inaccuracy_type: 'none') — these
establish a baseline of plan accuracy for the codebase. Over time,
the ratio of accurate to inaccurate claims per module reveals which
areas of the codebase are most prone to plan drift.
Based on findings, recommend one of:
| Decision | Criteria |
|---|---|
| Go | Zero inaccuracies, all mechanical checks pass |
| Fix and go | 1-3 inaccuracies, all correctable by patching specific claims |
| Rewrite | More than 3 inaccuracies, OR any inaccuracy in the core architecture or data model |
| Kill | Fundamental assumption is invalid (the API the plan builds on does not exist, the approach is architecturally wrong) |
Get alignment on the decision before any implementation begins.
For Fix and go or Go decisions where inaccuracies were accepted,
offer: "Note why this is acceptable? (optional)" If yes, create a
:Note {kind: 'rationale', author: 'user'} linked to the :Session
via :annotates. This captures risk acceptance reasoning for future
verification sessions on the same plan.
After the quality gate decision, record it:
MATCH (s:Session) WHERE id(s) = $session_id
SET s.outcome = $gate_decision
The quality gate decision (go, fix_and_go, rewrite, kill) becomes
the session outcome, queryable across sessions. A history of rewrite
and kill outcomes for a module signals persistent planning problems.
| Rationalization | Why It's Wrong |
|---|---|
| "Plan was reviewed already, assume correct" | Plans decay the moment code changes. Verification catches drift that review cannot. |
| "A few API references checked, that's enough" | Partial checking gives false confidence. One wrong signature wastes hours of implementation. |
| "No obvious path errors, skip file checks" | Obvious errors are caught during planning. Verification catches the non-obvious ones — renamed files, moved modules. |
| "Plan is 2 days old, skip staleness check" | Two days of active development can change dozens of files. Age alone doesn't predict staleness. |
| "Inaccuracies can be fixed during implementation" | Fixing during implementation costs 10x more than fixing during verification. |
Stop and reassess if you observe:
API signatures are the highest-value check. Research shows naming and resource hallucinations (referencing things that do not exist or exist under different names) are the most common LLM plan errors. One wrong signature cascades through every downstream task.
Location of inaccuracies matters more than count. One wrong core API signature is worse than three wrong comment references. The quality gate should weight inaccuracies by their blast radius: how many tasks depend on the incorrect claim?
The cost of verification is minutes. The cost of a stale plan is hours. Always err on the side of re-verification, especially after days have passed since the plan was written or after other work has merged.