Drafts structured implementation plans for multi-step coding tasks from specs, before touching code. Generates plan.json manifest, phased task MD files with exact steps, and validates via workflow gates.
npx claudepluginhub nikhilsitaram/claude-caliper --plugin claude-caliper-workflowThis skill uses the workspace's default tool permissions.
> **Subagent dispatch:** Use `subagent_type: "claude-caliper:plan-drafter"`. The agent definition contains the full planning methodology. The invocation prompt needs only the design doc path, working directory, and plan directory.
Generates executable Markdown implementation plans for multi-step tasks from context briefs, resolving ambiguities, ordering dependencies, and enabling parallel worker execution.
Creates detailed implementation plans from specs for multi-step tasks before coding, with file structure mapping, bite-sized TDD steps, architecture overview, and tech stack.
Share bugs, ideas, or general feedback.
Subagent dispatch: Use
subagent_type: "claude-caliper:plan-drafter". The agent definition contains the full planning methodology. The invocation prompt needs only the design doc path, working directory, and plan directory.
Write implementation plans assuming the executor has zero codebase context. Document everything: which files to touch, exact code, how to test, what to avoid and why.
Save to: the absolute $PLAN_DIR injected by the dispatcher (resolves to $MAIN_ROOT/.claude/claude-caliper/YYYY-MM-DD-<topic>/ in the main repo, not the worktree). Plans are gitignored but persist across worktree cleanup.
TaskList to check for prior session contextvalidate-plan --check-entry $PLAN_DIR/plan.json --stage draft-plan (exits early if design-review hasn't passed; the plan.json file need not exist yet — only reviews.json is read)$MAIN_ROOT/.claude/claude-caliper/ (main repo root, gitignored), no commit neededDirectory layout:
.claude/claude-caliper/YYYY-MM-DD-topic/
├── plan.json # Structured manifest (source of truth)
├── plan.md # Generated outline (DO NOT edit)
├── phase-a/
│ ├── completion.md # Empty stub (lead aggregates per-task completions)
│ ├── a1.md # Task prose
│ └── a2.md
└── phase-b/
├── completion.md
└── b1.md
plan.json fields:
{
"schema": 1,
"status": "Not Yet Started",
"workflow": "pr-create",
"execution_mode": "subagents",
"goal": "One sentence",
"architecture": "2-3 sentences",
"tech_stack": "Key technologies",
"phases": [
{
"letter": "A",
"name": "Core API",
"status": "Not Started",
"depends_on": [],
"rationale": "Foundation layer needed first",
"tasks": [
{
"id": "A1",
"name": "Setup route handlers",
"status": "pending",
"depends_on": [],
"complexity": "medium",
"reviewer_needed": true,
"files": {
"create": ["src/routes.ts"],
"modify": [],
"test": ["tests/routes.test.ts"]
},
"verification": "npx jest tests/routes.test.ts",
"done_when": "Handler returns 200, 2/2 tests pass"
}
]
}
]
}
Optional: success_criteria at plan/phase/task levels. workflow: pr-create (default), pr-merge, or plan-only — set by design skill. execution_mode: subagents (default placeholder) or agent-teams — design skill overwrites after draft-plan. review_wait_minutes: max wait for external reviewers (default 5, 0 to skip).
See: schema-reference.md for full schema reference.
Task .md file structure:
# A1: Setup route handlers
**Avoid:** Don't use express — we're on Hono. Edge runtime compatibility.
## Steps
### Step 1: Write failing test for GET /api/health
(Full TDD cycle with code)
H1 header must match # {id}: {name} from plan.json. When a task consumes output from a prior phase, the orchestrate lead appends a handoff section after the H1 at the prior phase's wrap-up.
Multi-phase when: dependency layers, verification gates, or independent shipping. Single-phase when: tasks are independent. Use A-prefix (A1, A2...).
Gates: 8+ tasks single-phase → look for hidden boundary. 7+ tasks per phase → examine cut points.
Phase boundaries = meaningful "run full suite" points. Each phase gets phase-{letter}/ with completion.md + task files. depends_on declares phase ordering. Tasks within a phase execute in parallel — file sets must be disjoint (validate-plan --schema enforces this).
Inherit phases from design doc if approved.
Each task carries fixed overhead: worktree creation, subagent dispatch, and a review cycle. Trivial tasks (single-line changes, import additions, config updates) don't justify that cost individually. Before finalizing tasks, scan for consolidation opportunities:
Every task splits metadata (plan.json) and prose (task .md file).
plan.json fields:
| Field | Requirement | Good |
|---|---|---|
| files | Exact paths (create/modify/test) | {"create": ["src/auth/login.ts"], "test": ["tests/auth/login.test.ts"]} |
| verification | Runnable command, <60s | pytest tests/auth/ -v |
| done_when | Measurable end state | login returns JWT, 4/4 tests pass |
| depends_on | Task IDs this consumes | ["A1", "A2"] (same phase for semantic ordering, prior phase for cross-phase deps) |
| complexity | Enum: low, medium, high | "medium" |
| reviewer_needed | Bool — false only for low-complexity mechanical tasks | true |
Task .md file content:
| Field | Requirement | Good |
|---|---|---|
| Avoid + WHY | Pitfalls with reasoning | "Use jose not jsonwebtoken — CJS/Edge issues" |
| Steps | TDD cycle per step (consolidated mechanical tasks: list changes + suite-level verification) | Write failing test, verify fail, implement, verify pass, commit |
Write complete code in each step — not "add validation" or "implement the handler."
Interface-first ordering: Define contracts first, implement in middle tasks, wire consumers last.
First task as integration tests: When cross-task data flow exists, A1 can be broad integration tests (double-loop TDD) that stay RED until the last piece lands.
Handoff notes: The orchestrate lead writes handoff sections to cross-phase task files at the source phase's wrap-up (post-review). Draft-plan doesn't write these.
Before handoff, re-read every task file and the plan.json. The plan-reviewer downstream applies a 7-point checklist; catch the prose-level items here so review is pass/fail, not an editing pass. Goal at handoff: zero or one remaining issues.
Per task:
done_when — "4/4 tests pass" or "endpoint returns 200", not "auth works" or "feature complete".plan.json matches its prose references; every function referenced in prose matches its declaration.Across the plan:
done_when. Missing criterion → add a task.