$npx -y skills add aaddrick/claude-pipeline --skill writing-plansUse when you have a spec or requirements for a multi-step task, before touching code
| 1 | # Writing Plans |
| 2 | |
| 3 | ## Overview |
| 4 | |
| 5 | Write comprehensive plans assuming the engineer has zero codebase context. Document: files to touch, code snippets, test commands, expected outputs. Bite-sized tasks. DRY. YAGNI. TDD. Frequent commits. |
| 6 | |
| 7 | Assume skilled developer, unfamiliar with our toolset/domain, weak on test design. |
| 8 | |
| 9 | **Announce:** "I'm using the writing-plans skill to create the implementation plan." |
| 10 | |
| 11 | **Save to:** `docs/plans/YYYY-MM-DD-<feature-name>.md` |
| 12 | |
| 13 | ## Bite-Sized Task Granularity |
| 14 | |
| 15 | **Each step is one action (2-5 minutes):** |
| 16 | - "Write the failing test" - step |
| 17 | - "Run it to make sure it fails" - step |
| 18 | - "Implement the minimal code to make the test pass" - step |
| 19 | - "Run the tests and make sure they pass" - step |
| 20 | - "Commit" - step |
| 21 | |
| 22 | ## Plan Document Header |
| 23 | |
| 24 | **Every plan MUST start with this header:** |
| 25 | |
| 26 | ```markdown |
| 27 | # [Feature Name] Implementation Plan |
| 28 | |
| 29 | > **For Claude:** REQUIRED SUB-SKILL: Use executing-plans to implement this plan task-by-task. |
| 30 | |
| 31 | **Goal:** [One sentence describing what this builds] |
| 32 | |
| 33 | **Architecture:** [2-3 sentences about approach] |
| 34 | |
| 35 | **Tech Stack:** [Key technologies/libraries] |
| 36 | |
| 37 | **Feature Branch:** `issue-XXX-feature-name` ← **CRITICAL: Include this. Subagents need it.** |
| 38 | |
| 39 | --- |
| 40 | ``` |
| 41 | |
| 42 | **Why the branch is required:** Subagents have no memory of which branch they're on. When you dispatch an implementer, you must tell them the branch name explicitly. Having it in the plan header ensures it's always available. |
| 43 | |
| 44 | ## Task Structure |
| 45 | |
| 46 | ```markdown |
| 47 | ### Task N: [Component Name] |
| 48 | |
| 49 | **Files:** |
| 50 | - Create: `exact/path/to/file.py` |
| 51 | - Modify: `exact/path/to/existing.py:123-145` |
| 52 | - Test: `tests/exact/path/to/test.py` |
| 53 | |
| 54 | **Step 1: Write the failing test** |
| 55 | |
| 56 | ```python |
| 57 | def test_specific_behavior(): |
| 58 | result = function(input) |
| 59 | assert result == expected |
| 60 | ``` |
| 61 | |
| 62 | **Step 2: Run test to verify it fails** |
| 63 | |
| 64 | Run: `pytest tests/path/test.py::test_name -v` |
| 65 | Expected: FAIL with "function not defined" |
| 66 | |
| 67 | **Step 3: Write minimal implementation** |
| 68 | |
| 69 | ```python |
| 70 | def function(input): |
| 71 | return expected |
| 72 | ``` |
| 73 | |
| 74 | **Step 4: Run test to verify it passes** |
| 75 | |
| 76 | Run: `pytest tests/path/test.py::test_name -v` |
| 77 | Expected: PASS |
| 78 | |
| 79 | **Step 5: Verify branch and commit** |
| 80 | |
| 81 | ```bash |
| 82 | # Verify on correct branch first |
| 83 | git branch --show-current # Should show feature branch, NOT main/test/aw-next |
| 84 | |
| 85 | git add tests/path/test.py src/path/file.py |
| 86 | git commit -m "feat: add specific feature" |
| 87 | ``` |
| 88 | ``` |
| 89 | |
| 90 | ## Remember |
| 91 | - Exact file paths, complete code snippets (not "add validation"), exact commands with expected output |
| 92 | - Reference relevant skills with @ syntax |
| 93 | - DRY, YAGNI, TDD, frequent commits |
| 94 | |
| 95 | ## Execution Handoff |
| 96 | |
| 97 | **"Plan complete and saved to `docs/plans/<filename>.md`. Proceeding with subagent-driven implementation."** |
| 98 | |
| 99 | **REQUIRED:** Use subagent-driven-development (fresh subagent per task, code review between tasks). |
| 100 | |
| 101 | **Alternative:** If user requests, guide to executing-plans skill for parallel session with checkpoints. |