skills/plan/SKILL.md
Planning for tasks and individual steps. Use to plan a task (discovery-driven requirements gathering producing prd.json + plan.json for the orchestrator), plan implementation, or drill into a numbered plan step for design decisions, edge cases, and test strategy. Triggers on "plan a task", "plan this", "plan implementation", "requirements gathering", "plan step", "Let's work on step 1.2.3", "design decisions", "edge cases", "test strategy", "drill into step".
npx skillsauth add mjmorales/claude-prove planInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Unified planning entry point. Two modes:
--task [description]) — discovery-driven planning. Explores the codebase, gathers requirements, identifies edge cases, and writes prd.json + plan.json under .prove/runs/<branch>/<slug>/ for the orchestrator.--step <id>) — interactive drill into a specific numbered step (e.g., 1.2.3) from the active run's plan.json. No code is written; produces requirements, design decisions, and a test strategy.Default (no args): use AskUserQuestion to pick between the two modes.
When invoked without --task or --step:
AskUserQuestion:
question: "What do you want to plan? Task-level discovery produces prd.json + plan.json. Step-level drill refines a single numbered step from the active run."
header: "Plan"
options:
- label: "Task"
description: "Discovery, requirements, and plan.json for a new task"
- label: "Step"
description: "Drill into a numbered step (e.g., 1.2.3) from the active plan.json"
Then ask free-form for the task description or step id, and route accordingly.
references/interaction-patterns.md (project-level) for AskUserQuestion vs free-form decisions.Iterative discovery and planning for a task in an existing codebase. Output: prd.json + plan.json under .prove/runs/<branch>/<slug>/.
Gather from the user:
Delegate to the Explore sub-agent for find, imports, usages, structure, tests, history, todos, and analyze passes — it runs these traversals through its built-in tool surface.
Identify edge cases across input boundaries, state conditions, error scenarios. Use references/edge-cases-checklist.md by domain.
references/interaction-patterns.md). Open-ended: free-form discussion.Link this run to a scrum backlog task so reconciliation (orchestrator completion -> scrum task state) can fire. The link is the optional top-level task_id field on plan.json.
Run claude-prove scrum next-ready --limit 5 --json. Three branches:
Exit 0 with task list -> scrum enabled, ready tasks exist. Present options via AskUserQuestion:
question: "Which scrum task does this run deliver? Pick from the top 5 ready tasks, create a new one, or skip the link."
header: "Scrum Task"
options:
- label: "<task_id>: <title>" # one per returned task, up to 3
description: "<task.status> / wave <task.wave>"
- label: "Create new task"
description: "Invoke `claude-prove scrum task create` inline and use the returned id"
- label: "Skip"
description: "Proceed without task_id (reconciliation is opt-in)"
If the operator picks an existing task -> stamp task_id: "<id>" on plan.json.
If they pick "Create new task" -> ask for a title (free-form), run claude-prove scrum task create --title "<title>" --json, parse the returned id, stamp it on plan.json.
If they pick "Skip" -> omit task_id entirely.
Exit 0 with empty list -> scrum enabled but no ready tasks. Offer AskUserQuestion with "Create new task" and "Skip" (same flow as above, minus the existing-task options).
Non-zero exit -> scrum not enabled on this project. Omit task_id and proceed.
When stamping, the field is a free-form non-empty string — no regex validation. Absent is legal; empty string is rejected by the schema validator.
Task 4 (reconciler) consumes this field; setting it here is a no-op until the reconciler lands, but without it the reconciler cannot link runs to scrum tasks.
After discovery, emit two JSON files under .prove/runs/<branch>/<slug>/ — pick <branch> from the intent (feature, fix, chore, refactor, ...) and derive <slug> from a kebab-cased task name (max 40 chars).
Both files are validated by a PostToolUse hook against packages/cli/src/topics/run-state/schemas.ts. Invalid writes block.
Shape (see packages/cli/src/topics/run-state/schemas.ts — PRD_SCHEMA):
{
"schema_version": "1",
"kind": "prd",
"title": "Human-readable title",
"context": "Why this run exists (problem framing).",
"goals": ["Concrete outcome 1", "Concrete outcome 2"],
"scope": {
"in": ["What's in"],
"out": ["What's explicitly deferred"]
},
"acceptance_criteria": [
"Testable criterion 1",
"Testable criterion 2"
],
"test_strategy": "High-level approach (unit, integration, manual).",
"body_markdown": "Optional longer narrative sections (discovery notes, rollback plan, monitoring)."
}
Shape (see packages/cli/src/topics/run-state/schemas.ts — PLAN_SCHEMA):
{
"schema_version": "1",
"kind": "plan",
"mode": "simple | full",
"task_id": "SCRUM-42",
"tasks": [
{
"id": "1.1",
"title": "Setup config",
"wave": 1,
"deps": [],
"description": "What this task accomplishes and why.",
"acceptance_criteria": ["Criterion A", "Criterion B"],
"worktree": {"path": "", "branch": ""},
"steps": [
{
"id": "1.1.1",
"title": "Add schema field",
"description": "Add `foo` to SchemaX in module Y.",
"acceptance_criteria": ["`tests/test_schema.py` asserts field present"]
}
]
}
]
}
Task id convention: <wave>.<seq> — wave groups parallelizable tasks, seq orders within a wave. Step id: <task_id>.<step_seq>. Orchestrator relies on these dotted ids.
Mode: simple when total step count is ≤3; full otherwise.
Worktree: leave empty at plan time; orchestrator fills this in when spawning the wave.
task_id (optional, top-level): scrum backlog task id linking this run. Set per Phase 6.5; omit when scrum is disabled or the operator skips the link.
After writing prd.json + plan.json, initialize state.json with:
scripts/prove-run init \
--branch <branch> --slug <slug> \
--plan .prove/runs/<branch>/<slug>/plan.json \
--prd .prove/runs/<branch>/<slug>/prd.json
This creates state.json with every task/step in pending and seeds an empty dispatch ledger. Required before /prove:orchestrator can run.
Check .claude/.prove.json for configured validators — use those commands in task acceptance criteria. If absent, the orchestrator auto-detects at runtime. See references/validation-config.md (project-level).
Interactive planning for a specific step from the active run's plan.json. No code is written during this phase — planning only.
Extract the step id from the user's request (e.g., 1.2.3). Resolve the active run via the worktree marker, then read the step with:
scripts/prove-run step-info <step-id>
Returns JSON: {task, step, task_state, step_state}. Use it to extract description, acceptance criteria, dependencies.
Scaffold .prove/plans/plan_<step_id>/ with 8 template files. Substitute STEP_ID and TITLE, then create each file with its sections:
STEP_ID="<step-id>"
TITLE="<Task Title>"
TS="$(date +%Y-%m-%d\ %H:%M)"
WORKSPACE=".prove/plans/plan_${STEP_ID}"
mkdir -p "${WORKSPACE}"
Files and sections (create each with cat > "${WORKSPACE}/<name>" <<EOF ... EOF):
| File | Sections |
|------|----------|
| 00_task_overview.md | Phase, Size (XS/S/M/L/XL/XXL), Status, Dependencies, Original Task Description, Verification Criteria, Related Tasks |
| 01_requirements.md | Functional, Non-Functional (perf/errors/logging/security), Acceptance Criteria, Out of Scope |
| 02_design_decisions.md | Approach Options (pros/cons per option), Selected Approach, Technical Choices, API/Interface Design |
| 03_open_questions.md | Technical, Design, Requirements — each as Q: / A: pairs, resolved by filling in answers |
| 04_potential_issues.md | Technical Risks (risk + mitigation), Edge Cases, Performance Concerns, Integration Points |
| 05_implementation_plan.md | Prerequisites, Implementation Steps (action/files/validation each), Code Structure, Key Notes |
| 06_test_strategy.md | Unit Tests, Integration Tests, Edge Case Tests, Manual Testing Steps, Test Coverage Goals |
| progress.md | Started (${TS}), Current Phase, Planning Checklist (8 items), Discussion Log |
Populate 06_test_strategy.md with validators from .claude/.prove.json. See references/validation-config.md (project-level).
progress.md current (step-mode scratchpad, not state.json)Check plan.json tasks[].deps for prerequisites. If deps unmet, discuss whether to plan despite them, document interface assumptions, and consider mocks for testing.
Verify: open questions resolved, implementation plan actionable, test strategy covers key scenarios, design decisions documented with rationale.
Use AskUserQuestion with header "Ready" and options: "Begin Implementation" / "Review Plan First".
On proceed: the orchestrator drives step execution — step-mode planning does not mutate state.json. Leave that to the orchestrator and its run_state step start / step complete calls.
references/planning-patterns.md — risk matrices, requirement patterns, design frameworks, complexity estimation (step mode)references/edge-cases-checklist.md — edge case checklist by domain (task mode)assets/task-planning-prompts.md — prompt templates for planning sessions (task mode)packages/cli/src/topics/run-state/schemas.ts — authoritative JSON schemasDelegate to the commit skill. Do not create ad-hoc commits.
testing
Anchor session context into prove primitives before compaction and rehydrate from them after. Built-in compaction summarizes by recency and drops the claude-prove state an agent needs to reorient; this skill externalizes volatile context into durable anchors (scrum tasks, decisions, run-state, a compact-anchors pointer file) pre-compact, then runs a deterministic reorientation sequence post-compact. Use before a manual /compact, when context is about to auto-compact, or immediately after a compaction. Triggers on "smart compact", "prepare for compaction", "anchor before compact", "context is getting long", "rehydrate", "reorient after compact".
tools
Apply model-driven CONTENT reshaping to stored run artifacts that sit behind the current schema, on explicit operator invocation only. Triggers on "migrate runs", "migrate run artifacts", "run content migration", "reshape run artifacts", "bring runs to current schema". You are the driver: the `run-state migrate-runs` CLI mechanically detects which artifacts are behind and emits a plan naming each one plus its migration-instruction file; you read the instructions and reshape the prose/findings, gated by the operator. The deterministic `schema migrate` handles structural column moves; this skill covers only the content reshaping beyond them. Never run as a background or resident loop — only when the operator asks.
tools
Synthesize the 7-section risk-forward Review Brief from a run's reasoning log. Triggers on "reasoning brief", "review brief", "synthesize the brief", "generate the brief", "brief the run", "brief for review", "story brief". You are the driver: the `acb brief` CLI renders a mechanical preservation-safe backbone and proves preservation; you synthesize the narrative prose (summary + changes), single-pass or multipass over episode chunks, then gate it through Stage-1 (mechanical, blocking) and Stage-2 (prose judge, advisory).
tools
Prune stale cached versions of the prove plugin from Claude Code's plugin cache. Use when superseded versions pile up under plugins/cache and agents read stale skills/references from them, or when reclaiming plugin-cache disk space. Triggers on "clean up cached plugin versions", "prune the plugin cache", "remove old prove versions", "stale plugin cache".