$npx -y skills add totvs/engpro-advpl-tlpp-skills --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 implementation plans assuming the engineer has zero context for our codebase and questionable taste. Document everything they need to know: which files to touch for each task, code, testing, docs they might need to check, how to test it. Give them the whole plan as bite-sized tasks. DRY. YAGNI. TDD. Frequent commits. |
| 6 | |
| 7 | Assume they are a skilled developer, but know almost nothing about our toolset or problem domain. Assume they don't know good test design very well. |
| 8 | |
| 9 | **Announce at start:** "I'm using the writing-plans skill to create the implementation plan." |
| 10 | |
| 11 | **Context:** This should be run in a dedicated worktree (created by brainstorming skill). |
| 12 | |
| 13 | **Save plans to:** `docs/plans/YYYY-MM-DD-<feature-name>.md` |
| 14 | |
| 15 | ## Bite-Sized Task Granularity |
| 16 | |
| 17 | **Each step is one action (2-5 minutes):** |
| 18 | - "Write the failing test" - step |
| 19 | - "Run it to make sure it fails" - step |
| 20 | - "Implement the minimal code to make the test pass" - step |
| 21 | - "Run the tests and make sure they pass" - step |
| 22 | - "Commit" - step |
| 23 | |
| 24 | ## Plan Document Header |
| 25 | |
| 26 | **Every plan MUST start with this header:** |
| 27 | |
| 28 | ```markdown |
| 29 | # [Feature Name] Implementation Plan |
| 30 | |
| 31 | > **For Claude:** REQUIRED SUB-SKILL: Use executing-plans to implement this plan task-by-task. |
| 32 | |
| 33 | **Goal:** [One sentence describing what this builds] |
| 34 | |
| 35 | **Architecture:** [2-3 sentences about approach] |
| 36 | |
| 37 | **Tech Stack:** [Key technologies/libraries] |
| 38 | |
| 39 | --- |
| 40 | ``` |
| 41 | |
| 42 | ## Task Structure |
| 43 | |
| 44 | ```markdown |
| 45 | ### Task N: [Component Name] |
| 46 | |
| 47 | **Files:** |
| 48 | - Create: `exact/path/to/file.py` |
| 49 | - Modify: `exact/path/to/existing.py:123-145` |
| 50 | - Test: `tests/exact/path/to/test.py` |
| 51 | |
| 52 | **Step 1: Write the failing test** |
| 53 | |
| 54 | ```python |
| 55 | def test_specific_behavior(): |
| 56 | result = function(input) |
| 57 | assert result == expected |
| 58 | ``` |
| 59 | |
| 60 | **Step 2: Run test to verify it fails** |
| 61 | |
| 62 | Run: `pytest tests/path/test.py::test_name -v` |
| 63 | Expected: FAIL with "function not defined" |
| 64 | |
| 65 | **Step 3: Write minimal implementation** |
| 66 | |
| 67 | ```python |
| 68 | def function(input): |
| 69 | return expected |
| 70 | ``` |
| 71 | |
| 72 | **Step 4: Run test to verify it passes** |
| 73 | |
| 74 | Run: `pytest tests/path/test.py::test_name -v` |
| 75 | Expected: PASS |
| 76 | |
| 77 | **Step 5: Commit** |
| 78 | |
| 79 | ```bash |
| 80 | git add tests/path/test.py src/path/file.py |
| 81 | git commit -m "feat: add specific feature" |
| 82 | ``` |
| 83 | ``` |
| 84 | |
| 85 | ## Remember |
| 86 | - Exact file paths always |
| 87 | - Complete code in plan (not "add validation") |
| 88 | - Exact commands with expected output |
| 89 | - Reference relevant skills with @ syntax |
| 90 | - DRY, YAGNI, TDD, frequent commits |
| 91 | |
| 92 | ## Execution Handoff |
| 93 | |
| 94 | After saving the plan, offer execution choice: |
| 95 | |
| 96 | **"Plan complete and saved to `docs/plans/<filename>.md`. Two execution options:** |
| 97 | |
| 98 | **1. Subagent-Driven (this session)** - I dispatch fresh subagent per task, review between tasks, fast iteration |
| 99 | |
| 100 | **2. Parallel Session (separate)** - Open new session with executing-plans, batch execution with checkpoints |
| 101 | |
| 102 | **Which approach?"** |
| 103 | |
| 104 | **If Subagent-Driven chosen:** |
| 105 | - **REQUIRED SUB-SKILL:** Use subagent-driven-development |
| 106 | - Stay in this session |
| 107 | - Fresh subagent per task + code review |
| 108 | |
| 109 | **If Parallel Session chosen:** |
| 110 | - Guide them to open new session in worktree |
| 111 | - **REQUIRED SUB-SKILL:** New session uses executing-plans |