Agent skill
writing-plans
Use when you have a spec, design doc, or requirements and need a detailed implementation plan before coding. Triggers: 'write a plan', 'create implementation plan', 'plan this out', 'break this down into steps', 'convert design to tasks', 'implementation order'. Also invoked by develop during planning. NOT for: reviewing existing plans (use reviewing-impl-plans).
Install this agent skill to your Project
npx add-skill https://github.com/axiomantic/spellbook/tree/main/skills/writing-plans
SKILL.md
Writing Plans
Announce: "Using writing-plans skill to create implementation plan."
Invariant Principles
- Zero-Context Assumption - Engineer reading plan knows nothing about codebase, toolset, or domain
- Atomic Tasks - Each step is one action (2-5 min): write test, run test, implement, verify, commit
- Complete Specification - Full code, exact paths, expected outputs; never "add validation" or similar
- TDD Flow - RED (failing test) -> GREEN (minimal pass) -> commit; repeat
- Traceable Decisions - Link to design doc so reviewers can trace requirements -> plan -> code
Inputs
| Input | Required | Description |
|---|---|---|
| Design document OR requirements | Yes | Spec defining what to build |
| Codebase access | Yes | Ability to inspect existing patterns |
| Target feature name | Yes | Short identifier for plan filename |
Outputs
| Output | Type | Description |
|---|---|---|
| Implementation plan | File | ~/.local/spellbook/docs/<project>/plans/YYYY-MM-DD-<feature>.md |
| Execution guidance | Inline | Choice of subagent-driven vs parallel session |
Reasoning Schema
<analysis>
- What does design doc specify?
- What files exist? What patterns used?
- What's simplest path to working code?
</analysis>
<reflection>
- Does each task have complete code (not placeholders)?
- Can engineer execute without codebase knowledge?
- Are test assertions specific (not just "works")?
</reflection>
Save Location
PROJECT_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || pwd)
PROJECT_ENCODED=$(echo "$PROJECT_ROOT" | sed 's|^/||' | tr '/' '-')
mkdir -p ~/.local/spellbook/docs/$PROJECT_ENCODED/plans
# Save as: ~/.local/spellbook/docs/$PROJECT_ENCODED/plans/YYYY-MM-DD-<feature>.md
Plan Header (Required)
# [Feature Name] Implementation Plan
> **For Claude:** Use executing-plans to implement this plan task-by-task.
**Goal:** [One sentence]
**Source Design Doc:** [path or "None - requirements provided directly"]
**Architecture:** [2-3 sentences]
**Tech Stack:** [Key technologies]
---
Task Structure
### Task N: [Component Name]
**Files:**
- Create: `exact/path/to/file.py`
- Modify: `exact/path/to/existing.py:123-145`
- Test: `tests/exact/path/to/test.py`
**Step 1: Write failing test**
[Complete test code]
**Step 2: Verify failure**
Run: `pytest tests/path/test.py::test_name -v`
Expected: FAIL with "[specific error]"
**Step 3: Minimal implementation**
[Complete implementation code]
**Step 4: Verify pass**
Run: `pytest tests/path/test.py::test_name -v`
Expected: PASS
**Step 5: Commit**
`git add [files] && git commit -m "feat: [description]"`
Mode Behavior
| Mode | Design Doc Source | Execution Handoff |
|---|---|---|
| Interactive | Ask user for path | Offer choice: subagent-driven vs parallel session |
| Autonomous | From context, or find most recent in plans/ | Skip; orchestrator handles |
Circuit Breakers (pause even in autonomous):
- No design doc AND no requirements = cannot plan
- Design doc has critical gaps making planning impossible (e.g., missing API contracts, undefined data models, contradictory requirements)
Execution Options (Interactive Only)
After saving plan, offer:
-
Subagent-Driven - This session, fresh subagent per task, review between tasks
- Use:
executing-plans --mode subagent
- Use:
-
Parallel Session - New session in worktree
- Guide user to open new session, then use
executing-plans
- Guide user to open new session, then use
Self-Check
Before completing plan:
- Every task has exact file paths (no "somewhere in src/")
- Every code block is complete (no placeholders or TODOs)
- Every test command includes expected output
- Each step is single atomic action (2-5 min max)
- Design doc path recorded in header
- Plan saved to correct location (
~/.local/spellbook/docs/...)
If ANY unchecked: STOP and fix before proceeding.
<FINAL_EMPHASIS> You are an Implementation Planner. Your reputation depends on plans that engineers execute without questions or backtracking. A plan with vague steps, missing paths, or placeholder code is not a plan — it is a liability. Verify every item before declaring complete. </FINAL_EMPHASIS>
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
spellbook-auditing
Meta-audit skill for spellbook development. Spawns parallel subagents to factcheck docs, optimize instructions, find token savings, and identify MCP candidates. Produces actionable report.
documentation-updates
Use after modifying library skills, library commands, or agents to ensure CHANGELOG, README, and docs are updated
project-encyclopedia
[DEPRECATED] Use project-level AGENTS.md files instead. Previously used for first-session codebase onboarding and persistent glossary creation.
reviewing-impl-plans
Use when reviewing implementation plans before execution. Triggers: 'is this plan solid', 'review the plan', 'check before I start building', 'anything missing from this plan', 'will this plan work', 'audit the implementation plan'. NOT for: reviewing design documents (use reviewing-design-docs) or creating plans (use writing-plans).
session-resume
Session resume protocol and session repairs handling. Loaded when spellbook_session_init returns resume_available: true, or when session_init returns a repairs array. Triggers: 'resume', 'continue', 'where were we', session resume, session repairs.
brainstorming
Use when exploring design approaches, generating ideas, or making architectural decisions. Triggers: 'explore options', 'what are the tradeoffs', 'how should I approach', 'let's think through', 'sketch out an approach', 'I need ideas for', 'how would you structure', 'what are my options'. Also invoked by develop when design decisions are needed.
Didn't find tool you were looking for?