一键导入
write-plan
Use when you have a spec or requirements for a multi-step task, before touching code
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when you have a spec or requirements for a multi-step task, before touching code
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | write-plan |
| description | Use when you have a spec or requirements for a multi-step task, before touching code |
Write implementation plans assuming the engineer has zero context for the codebase. Document everything they need: which files to touch, code, testing, how to verify. Bite-sized tasks. DRY. YAGNI. TDD. Frequent commits.
Assume a skilled developer who knows almost nothing about the toolset or problem domain and doesn't know good test design very well.
Save plans to: the structure graph via create_plan (brain-mcp tool) with plan_type: "implementation". Use a descriptive kebab-case slug. The plan content (tasks, dependencies, key_files) is stored as graph metadata, not a file. Call approve_plan after user approval to transition to active status.
Every plan MUST start with:
# [Feature Name] Implementation Plan
**Goal:** [One sentence describing what this builds]
**Architecture:** [2-3 sentences about approach]
**Tech Stack:** [Key technologies/libraries]
---
Each step is one action (2-5 minutes):
### 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 the failing test**
```python
def test_specific_behavior():
result = function(input)
assert result == expected
```
**Step 2: Run test to verify it fails**
Run: `pytest tests/path/test.py::test_name -v`
Expected: FAIL with "function not defined"
**Step 3: Write minimal implementation**
```python
def function(input):
return expected
```
**Step 4: Run test to verify it passes**
Run: `pytest tests/path/test.py::test_name -v`
Expected: PASS
**Step 5: Commit**
```bash
git add tests/path/test.py src/path/file.py
git commit -m "feat: add specific feature"
```
| Mistake | Fix |
|---|---|
| Vague steps ("add validation") | Complete code in every step |
| Missing file paths | Exact paths always, including line ranges for modifications |
| No test commands | Every task needs Run: with exact command and Expected: output |
| Steps too large (10+ minutes) | Break into 2-5 minute atomic actions |
| No commit steps | Commit after every green test cycle |
| Plan references files it hasn't read | Read all relevant files before writing the plan |
After saving the plan, proceed with subagent-driven-development to execute it: dispatch fresh subagent per task with two-stage review (spec compliance, then code quality).
Plans are stored as plan:// nodes in the brain-mcp structure graph, not as files.
create_plan with plan_type: "implementation", descriptive slug, tasks arrayapprove_plan after user review (draft → active)update_plan to update task statuses as work completescomplete_plan with outcomes when all tasks donerevise_plan if approach changes mid-implementation (creates new version, supersedes old)decompose_plan to break a design plan into implementation sub-plansabandon_plan if plan is no longer neededlist_plans to see active plans, get_plan to read full contentNever save plans to .claude/plans/ (ephemeral, collision-prone) or docs/plans/ (clutters repo). The graph is the source of truth.