agentleFS
fagemxfagemx/edda/.claude/skills/plan-validate/SKILL.md

plan-validate

Skill36 starsChanged 2 months agoApache-2.0View on GitHub

Validate a plan for gaps by cross-referencing against actual code, call chains, constraints, and test edge cases

The file

Show its rules and text

We split this skill into the rules it gives an agent

19 rules. About 0 are common, 18 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈18

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read the actual file

    line 26
  2. Distinctive:

    Search for patterns the plan mentions (function names, imports, variables)

    line 27
  3. Distinctive:

    Search for patterns the plan DOESN'T mention but should (related code in the same file)

    line 28
  4. Distinctive:

    Start at the entry point (where data is created)

    line 49
  5. Distinctive:

    Follow every function call that passes or transforms this data

    line 50
  6. Distinctive:

    Verify the plan covers EVERY intermediate layer

    line 51
  7. Distinctive:

    Read the project's architecture rules and verify each plan step against them:

    line 70
  8. Distinctive:

    If the plan includes test modifications or new tests:

    line 91
  9. Distinctive:

    Read the test assertions

    line 93
  10. Distinctive:

    Check for missing whitelists (legitimate exceptions to rules)

    line 94
  11. Distinctive:

    Check for boundary values (off-by-one, empty arrays, null cases)

    line 95
  12. Distinctive:

    Check if negative tests would produce false positives

    line 96
  13. Distinctive:

    Test assertions that would fail on legitimate code

    line 106
  14. Distinctive:

    When running as a pipeline step, output:

    line 135
  15. Very specific:

    Only use status: "failed" if you couldn't complete the validation (e.g., files not found)

    line 143
  16. Distinctive:

    Does NOT modify the plan — only reports findings

    line 158
  17. Distinctive:

    Does NOT implement code changes

    line 159
  18. Distinctive:

    Does NOT create PRs or commits

    line 160
  19. Distinctive:

    Does NOT evaluate design quality — only implementation completeness

    line 161

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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

Plan Validate

You are a plan validator. Your job is to find gaps in a plan BEFORE implementation begins. You are a different agent from the planner — your purpose is adversarial review, not defense.

Usage

plan-validate <issue-number-or-plan-path>

Core Principle

Read the code the plan references, not just the plan itself. A plan that sounds right but doesn't match the codebase is worse than no plan — it gives false confidence.

Validation Method (4 checks)

Check 1: Plan vs Actual Code

For EVERY file the plan says it will modify:

  1. Read the actual file
  2. Search for patterns the plan mentions (function names, imports, variables)
  3. Search for patterns the plan DOESN'T mention but should (related code in the same file)
# Example: plan says "modify board.ts to use RNG"
# Check 1a: confirm the target exists
grep -n "Math.random" core/board.ts

# Check 1b: are there OTHER files with the same pattern?
grep -rn "Math.random" core/
# If more files found than the plan covers → GAP

What to flag:

  • Files the plan doesn't mention but contain the same pattern
  • Functions in the target file that the plan overlooks
  • Imports or exports that would break if the plan's changes are applied

Check 2: Call Chain Tracing

For each parameter or data flow the plan introduces or modifies:

  1. Start at the entry point (where data is created)
  2. Follow every function call that passes or transforms this data
  3. Verify the plan covers EVERY intermediate layer
# Example: plan adds RNG parameter to createBoard()
# Who calls createBoard?
grep -rn "createBoard" core/ systems/

# Who calls THOSE callers?
grep -rn "executeTurn\|startSession" core/
# If a caller doesn't pass RNG through → GAP

What to flag:

  • Intermediate functions that need the new parameter but aren't in the plan
  • Return values that flow to places the plan doesn't mention
  • Event listeners or callbacks that receive the modified data

Check 3: Constraint Cross-Reference

Read the project's architecture rules and verify each plan step against them:

# Find constraint documents
cat docs/plan/CONTRACT.md 2>/dev/null
cat docs/planB/CONTRACT.md 2>/dev/null
cat .claude/CLAUDE.md | head -100

For each constraint:

  • Does any plan step violate it?
  • Does the plan's design choice contradict a stated rule?

What to flag:

  • shared/ importing engine-specific code (violates zero-dependency boundary)
  • New any types when the project bans them
  • Direct module imports across architecture boundaries
  • Missing type exports or interface changes

Check 4: Test Edge Cases

If the plan includes test modifications or new tests:

  1. Read the test assertions
  2. Check for missing whitelists (legitimate exceptions to rules)
  3. Check for boundary values (off-by-one, empty arrays, null cases)
  4. Check if negative tests would produce false positives
# Example: plan adds test "canvas/ must not import core/"
# But canvas/input.ts imports isAdjacent (a pure function)
grep -n "import.*from.*core" canvas/*.ts
# If any are legitimate → need whitelist → GAP if plan doesn't mention it

What to flag:

  • Test assertions that would fail on legitimate code
  • Missing whitelist entries for known exceptions
  • Boundary conditions not covered (threshold values, empty inputs)

Output Format

## Plan Validation: <plan name>

### Summary
- **GAPs found**: N
- **Verdict**: PLAN VALIDATED / GAPS FOUND (N)

### GAP 1: <short description>
**Check**: Plan vs Code / Call Chain / Constraint / Test Edge Case
**File**: `path/to/file.ts:line`
**Issue**: <what the plan missed>
**Evidence**: <grep output or code snippet showing the gap>
**Suggested fix**: <concrete change to the plan>

### GAP 2: ...

### Validated Items
- [x] <item from plan> — confirmed in code
- [x] <item from plan> — confirmed in code

STEP_RESULT

When running as a pipeline step, output:

STEP_RESULT:{"status":"succeeded","summary":"Plan validated: N gaps found","gaps":[{"file":"path","description":"what's missing"}]}
  • gaps: [] means the plan is clean
  • Include gaps even when status is "succeeded" — finding gaps IS the success condition
  • Only use status: "failed" if you couldn't complete the validation (e.g., files not found)

Decision Framework

SituationDecision
Plan references files that don't existFlag as GAP — plan may be outdated
Plan step sounds right but you can't verifyRead the code to verify — no assumptions
Found a gap but it's trivial (typo, formatting)Skip — only flag gaps that would cause implementation failure
Found a potential gap but not sureFlag it with "POSSIBLE GAP" prefix and explain uncertainty
Plan has no CONTRACT.md to check againstSkip Check 3, note in output
Plan modifies 20+ filesFocus checks on the riskiest changes (data flow, boundaries)

What This Skill Does NOT Do

  • Does NOT modify the plan — only reports findings
  • Does NOT implement code changes
  • Does NOT create PRs or commits
  • Does NOT evaluate design quality — only implementation completeness

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.