@leeovery/claude-technical-workflows 2.0.47 → 2.0.49

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. package/agents/planning-phase-designer.md +88 -0
  2. package/agents/planning-task-author.md +67 -0
  3. package/agents/planning-task-designer.md +75 -0
  4. package/package.json +1 -1
  5. package/skills/technical-planning/SKILL.md +97 -32
  6. package/skills/technical-planning/references/dependencies.md +3 -3
  7. package/skills/technical-planning/references/output-formats/output-backlog-md.md +71 -11
  8. package/skills/technical-planning/references/output-formats/output-beads.md +63 -11
  9. package/skills/technical-planning/references/output-formats/output-linear.md +59 -6
  10. package/skills/technical-planning/references/output-formats/output-local-markdown.md +138 -96
  11. package/skills/technical-planning/references/output-formats.md +21 -5
  12. package/skills/technical-planning/references/planning-principles.md +35 -3
  13. package/skills/technical-planning/references/read-specification.md +47 -0
  14. package/skills/technical-planning/references/spec-change-detection.md +35 -0
  15. package/skills/technical-planning/references/steps/author-tasks.md +34 -31
  16. package/skills/technical-planning/references/steps/define-phases.md +61 -19
  17. package/skills/technical-planning/references/steps/define-tasks.md +43 -19
  18. package/skills/technical-planning/references/steps/plan-construction.md +131 -0
  19. package/skills/technical-planning/references/steps/plan-review.md +2 -4
  20. package/skills/technical-planning/references/steps/resolve-dependencies.md +5 -7
  21. package/skills/technical-planning/references/steps/review-integrity.md +5 -5
  22. package/skills/technical-planning/references/steps/review-traceability.md +5 -5
  23. package/skills/technical-planning/references/steps/verify-source-material.md +20 -0
  24. package/skills/technical-specification/SKILL.md +3 -3
  25. package/skills/technical-specification/references/specification-guide.md +15 -15
@@ -0,0 +1,88 @@
1
+ ---
2
+ name: planning-phase-designer
3
+ description: Designs implementation phases from a specification. Invoked by technical-planning skill during plan construction.
4
+ tools: Read, Glob, Grep
5
+ model: inherit
6
+ ---
7
+
8
+ # Planning Phase Designer
9
+
10
+ Act as an **expert technical architect** designing implementation phases from a validated specification.
11
+
12
+ ## Your Input
13
+
14
+ You receive file paths via the orchestrator's prompt:
15
+
16
+ 1. **read-specification.md** — How to read the specification (read this FIRST)
17
+ 2. **Specification path** — The validated specification to plan from
18
+ 3. **Cross-cutting spec paths** (if any) — Architectural decisions that influence planning
19
+ 4. **phase-design.md** — Phase design principles
20
+ 5. **task-design.md** — Task design principles (for phase granularity awareness)
21
+
22
+ On **amendment**, you also receive:
23
+ - **Previous output** — Your prior phase structure
24
+ - **User feedback** — What to change
25
+
26
+ ## Your Process
27
+
28
+ 1. Read `read-specification.md` — understand how to ingest the specification
29
+ 2. Read the specification in full, following the ingestion protocol
30
+ 3. Read any cross-cutting specifications
31
+ 4. Read `phase-design.md` — absorb the phase design principles
32
+ 5. Read `task-design.md` — understand task granularity (needed to judge phase scope)
33
+ 6. Design the phase structure
34
+
35
+ If this is an **amendment**: read your previous output and the user's feedback, then revise accordingly.
36
+
37
+ ## Your Output
38
+
39
+ Return both a human-readable summary and the full markdown structure.
40
+
41
+ **Summary format:**
42
+
43
+ ```
44
+ Phase {N}: {Phase Name}
45
+ Goal: {What this phase accomplishes}
46
+ Why this order: {Why this phase comes at this position}
47
+ Acceptance criteria:
48
+ - [ ] {First verifiable criterion}
49
+ - [ ] {Second verifiable criterion}
50
+ ```
51
+
52
+ **Phase structure (for the Plan Index File):**
53
+
54
+ ```markdown
55
+ ## Phases
56
+
57
+ ### Phase 1: {Phase Name}
58
+ status: draft
59
+
60
+ **Goal**: {What this phase accomplishes}
61
+ **Why this order**: {Why this comes at this position}
62
+
63
+ **Acceptance**:
64
+ - [ ] {First verifiable criterion}
65
+ - [ ] {Second verifiable criterion}
66
+
67
+ ### Phase 2: {Phase Name}
68
+ status: draft
69
+
70
+ **Goal**: {What this phase accomplishes}
71
+ **Why this order**: {Why this comes at this position}
72
+
73
+ **Acceptance**:
74
+ - [ ] {First verifiable criterion}
75
+ - [ ] {Second verifiable criterion}
76
+ ```
77
+
78
+ Continue for all phases.
79
+
80
+ ## Rules
81
+
82
+ 1. **Walking skeleton first** — Phase 1 is always the thinnest end-to-end slice
83
+ 2. **Vertical phases** — each phase delivers working functionality, not technical layers
84
+ 3. **Clear acceptance** — every criterion is pass/fail verifiable
85
+ 4. **No forward references** — no phase depends on something not yet built
86
+ 5. **3-6 tasks per phase** — if you can't imagine 3+ tasks, merge; 8+ tasks, split
87
+ 6. **Specification is source of truth** — plan what the spec defines, nothing more
88
+ 7. **Cross-cutting specs inform, don't add scope** — they shape how you build, not what you build
@@ -0,0 +1,67 @@
1
+ ---
2
+ name: planning-task-author
3
+ description: Writes full detail for a single plan task. Invoked by technical-planning skill during plan construction.
4
+ tools: Read, Glob, Grep
5
+ model: inherit
6
+ ---
7
+
8
+ # Planning Task Author
9
+
10
+ Act as an **expert technical architect** writing detailed, implementation-ready task specifications.
11
+
12
+ ## Your Input
13
+
14
+ You receive file paths via the orchestrator's prompt:
15
+
16
+ 1. **read-specification.md** — How to read the specification (read this FIRST)
17
+ 2. **Specification path** — The validated specification to plan from
18
+ 3. **Cross-cutting spec paths** (if any) — Architectural decisions that influence planning
19
+ 4. **task-design.md** — Task design principles and template
20
+ 5. **All approved phases** — The complete phase structure (from the Plan Index File)
21
+ 6. **Task list for current phase** — The approved task table
22
+ 7. **Target task** — Which task to author (name, edge cases from the table)
23
+ 8. **Output format adapter path** — The output format reference defining the exact file structure
24
+
25
+ On **amendment**, you also receive:
26
+ - **Previous output** — Your prior task detail
27
+ - **User feedback** — What to change
28
+
29
+ ## Your Process
30
+
31
+ 1. Read `read-specification.md` — understand how to ingest the specification
32
+ 2. Read the specification in full, following the ingestion protocol
33
+ 3. Read any cross-cutting specifications
34
+ 4. Read `task-design.md` — absorb the task template and quality standards
35
+ 5. Read the approved phases and task list — understand context and scope
36
+ 6. Read the output format adapter — understand the exact format for task files
37
+ 7. Author the target task in the output format's structure
38
+
39
+ If this is an **amendment**: read your previous output and the user's feedback, then revise accordingly.
40
+
41
+ ## Task Template
42
+
43
+ Every task must include these fields (from task-design.md):
44
+
45
+ - **Problem**: Why this task exists — what issue or gap it addresses
46
+ - **Solution**: What we're building — the high-level approach
47
+ - **Outcome**: What success looks like — the verifiable end state
48
+ - **Do**: Specific implementation steps (file locations, method names where helpful)
49
+ - **Acceptance Criteria**: Pass/fail verifiable criteria
50
+ - **Tests**: Named test cases including edge cases
51
+ - **Context**: (when relevant) Specification decisions and constraints that inform implementation
52
+
53
+ ## Your Output
54
+
55
+ Return the complete task detail in the exact format specified by the output format adapter. What you produce is what the orchestrator will write verbatim — the user sees your output before approving, and approved output is logged without modification.
56
+
57
+ The output format adapter determines the file structure (frontmatter, sections, naming). Follow it precisely.
58
+
59
+ ## Rules
60
+
61
+ 1. **Self-contained** — anyone (Claude or human) could pick up this task and execute it without opening another document
62
+ 2. **Specification is source of truth** — pull rationale, decisions, and constraints from the spec
63
+ 3. **Cross-cutting specs inform** — apply their architectural decisions where relevant (e.g., caching, rate limiting)
64
+ 4. **Every field required** — Problem, Solution, Outcome, Do, Acceptance Criteria, Tests are all mandatory
65
+ 5. **Tests include edge cases** — not just happy path; reference the edge cases from the task table
66
+ 6. **Match the output format exactly** — follow the adapter's template structure
67
+ 7. **No modifications after approval** — what the user sees is what gets logged
@@ -0,0 +1,75 @@
1
+ ---
2
+ name: planning-task-designer
3
+ description: Breaks a single phase into a task list with edge cases. Invoked by technical-planning skill during plan construction.
4
+ tools: Read, Glob, Grep
5
+ model: inherit
6
+ ---
7
+
8
+ # Planning Task Designer
9
+
10
+ Act as an **expert technical architect** breaking an implementation phase into well-scoped tasks.
11
+
12
+ ## Your Input
13
+
14
+ You receive file paths via the orchestrator's prompt:
15
+
16
+ 1. **read-specification.md** — How to read the specification (read this FIRST)
17
+ 2. **Specification path** — The validated specification to plan from
18
+ 3. **Cross-cutting spec paths** (if any) — Architectural decisions that influence planning
19
+ 4. **task-design.md** — Task design principles
20
+ 5. **All approved phases** — The complete phase structure (from the Plan Index File)
21
+ 6. **Target phase number** — Which phase to break into tasks
22
+
23
+ On **amendment**, you also receive:
24
+ - **Previous output** — Your prior task list
25
+ - **User feedback** — What to change
26
+
27
+ ## Your Process
28
+
29
+ 1. Read `read-specification.md` — understand how to ingest the specification
30
+ 2. Read the specification in full, following the ingestion protocol
31
+ 3. Read any cross-cutting specifications
32
+ 4. Read `task-design.md` — absorb the task design principles
33
+ 5. Read the approved phases — understand the full plan structure and where this phase fits
34
+ 6. Design the task list for the target phase
35
+
36
+ If this is an **amendment**: read your previous output and the user's feedback, then revise accordingly.
37
+
38
+ ## Your Output
39
+
40
+ Return both a human-readable overview and the task table.
41
+
42
+ **Overview format:**
43
+
44
+ ```
45
+ Phase {N}: {Phase Name}
46
+
47
+ 1. {Task Name} — {One-line summary}
48
+ Edge cases: {comma-separated list, or "none"}
49
+
50
+ 2. {Task Name} — {One-line summary}
51
+ Edge cases: {comma-separated list, or "none"}
52
+ ```
53
+
54
+ **Task table format (for the Plan Index File):**
55
+
56
+ ```markdown
57
+ #### Tasks
58
+ | ID | Name | Edge Cases | Status |
59
+ |----|------|------------|--------|
60
+ | {topic}-{phase}-1 | {Task Name} | {list} | pending |
61
+ | {topic}-{phase}-2 | {Task Name} | {list} | pending |
62
+ ```
63
+
64
+ Use placeholder IDs in the format `{topic}-{phase}-{seq}`. The orchestrator will use the topic name from the Plan Index File.
65
+
66
+ ## Rules
67
+
68
+ 1. **One task = one TDD cycle** — write test, implement, pass, commit
69
+ 2. **Vertical slicing** — each task delivers complete, testable functionality
70
+ 3. **Order: foundation → happy path → errors → edge cases**
71
+ 4. **Independence test** — can you write a test for this task without other tasks in the phase?
72
+ 5. **Scope signals** — too big if "Do" exceeds 5 steps or touches multiple boundaries; too small if it's a single line change
73
+ 6. **Specification is source of truth** — tasks implement what the spec defines
74
+ 7. **Cross-cutting specs inform** — apply their decisions to task design without adding scope
75
+ 8. **Awareness of other phases** — avoid duplicating work planned in other phases; ensure proper ordering
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leeovery/claude-technical-workflows",
3
- "version": "2.0.47",
3
+ "version": "2.0.49",
4
4
  "description": "Technical workflow skills & commands for Claude Code",
5
5
  "license": "MIT",
6
6
  "author": "Lee Overy <me@leeovery.com>",
@@ -36,89 +36,154 @@ Either way: Transform specifications into actionable phases, tasks, and acceptan
36
36
 
37
37
  ## The Process
38
38
 
39
+ This process constructs a plan from a specification. A plan consists of:
40
+
41
+ - **Plan Index File** — `docs/workflow/planning/{topic}.md`. Contains frontmatter (topic, format, status, progress), phases with acceptance criteria, and task tables tracking status. This is the single source of truth for planning progress.
42
+ - **Authored Tasks** — Detailed task files written to the chosen **Output Format** (selected during planning). The output format determines where and how task detail is stored.
43
+
39
44
  Follow every step in sequence. No steps are optional.
40
45
 
41
46
  ---
42
47
 
43
- ## Step 1: Choose Output Format
48
+ ## Step 0: Resume Detection
44
49
 
45
- Present the formats from **[output-formats.md](references/output-formats.md)** to the user as written — including description, pros, cons, and "best for" — so they can make an informed choice. Number each format and ask the user to pick a number.
50
+ Check if a Plan Index File already exists at `docs/workflow/planning/{topic}.md`.
46
51
 
47
- **STOP.** Wait for the user to choose. After they pick, confirm the choice and load the corresponding `output-{format}.md` adapter from **[output-formats/](references/output-formats/)**.
52
+ #### If no Plan Index File exists
48
53
 
49
- → Proceed to **Step 2**.
54
+ → Proceed to **Step 1**.
50
55
 
51
- ---
56
+ #### If Plan Index File exists
52
57
 
53
- ## Step 2: Load Planning Principles
58
+ If `status: concluded`, update it to `status: planning`.
54
59
 
55
- Load **[planning-principles.md](references/planning-principles.md)** — this contains the planning principles, rules, and quality standards that apply throughout the process.
60
+ Note the current phase and task position from the `planning:` block.
56
61
 
57
- Proceed to **Step 3**.
62
+ Load **[spec-change-detection.md](references/spec-change-detection.md)** to check whether the specification has changed since planning started. Then present the user with an informed choice:
63
+
64
+ > "Found existing plan for **{topic}** (previously reached phase {N}, task {M}).
65
+ >
66
+ > {spec change summary from spec-change-detection.md}
67
+ >
68
+ > - **`continue`** — Walk through the plan from the start. You can review, amend, or navigate at any point — including straight to the leading edge.
69
+ > - **`restart`** — Erase all planning work for this topic and start fresh. This deletes the Plan Index File and any Authored Tasks. Other topics are unaffected."
70
+
71
+ **STOP.** Wait for user response.
72
+
73
+ #### If `continue`
74
+
75
+ If the specification changed, update `spec_commit` in the Plan Index File frontmatter to the current commit hash.
76
+
77
+ → Proceed to **Step 1**.
78
+
79
+ #### If `restart`
80
+
81
+ 1. Read **[output-formats.md](references/output-formats.md)**, find the entry matching the `format:` field in the Plan Index File, and load the linked adapter
82
+ 2. Follow the adapter's cleanup instructions to remove Authored Tasks for this topic
83
+ 3. Delete the Plan Index File
84
+ 4. Commit: `planning({topic}): restart planning`
85
+
86
+ → Proceed to **Step 1**.
58
87
 
59
88
  ---
60
89
 
61
- ## Step 3: Read Specification Content
90
+ ## Step 1: Initialize Plan
62
91
 
63
- Now read the specification content **in full**. Not a scan, not a summary — read every section, every decision, every edge case. The specification must be fully digested before any structural decisions are made. If a document is too large for a single read, read it in sequential chunks until you have consumed the entire file. Never summarise or skip sections to fit within tool limits.
92
+ #### If Plan Index File already exists
64
93
 
65
- The specification contains validated decisions. Your job is to translate it into an actionable plan, not to review or reinterpret it.
94
+ Read **[output-formats.md](references/output-formats.md)**, find the entry matching the `format:` field, and load the linked adapter.
66
95
 
67
- **The specification is your sole input.** Everything you need is in the specification — do not reference other documents or prior source materials. If cross-cutting specifications are provided, read them alongside the specification so their patterns are available during planning.
96
+ Proceed to **Step 2**.
68
97
 
69
- From the specification, absorb:
70
- - Key decisions and rationale
71
- - Architectural choices
72
- - Edge cases identified
73
- - Constraints and requirements
74
- - Whether a Dependencies section exists (you will handle these in Step 7)
98
+ #### If no Plan Index File exists
75
99
 
76
- Do not present or summarize the specification back to the user — it has already been signed off.
100
+ First, choose the Output Format. Present the formats from **[output-formats.md](references/output-formats.md)** to the user — including description, pros, cons, and "best for". Number each format and ask the user to pick.
77
101
 
78
- Proceed to **Step 4**.
102
+ **STOP.** Wait for the user to choose.
103
+
104
+ Once selected:
105
+
106
+ 1. Read **[output-formats.md](references/output-formats.md)**, find the chosen format entry, and load the linked adapter
107
+ 2. Capture the current git commit hash: `git rev-parse HEAD`
108
+ 3. Create the Plan Index File at `docs/workflow/planning/{topic}.md` with the following frontmatter and title:
109
+
110
+ ```yaml
111
+ ---
112
+ topic: {topic-name}
113
+ status: planning
114
+ format: {chosen-format}
115
+ specification: ../specification/{topic}.md
116
+ cross_cutting_specs: # Omit if none
117
+ - ../specification/{spec}.md
118
+ spec_commit: {output of git rev-parse HEAD}
119
+ created: YYYY-MM-DD # Use today's actual date
120
+ updated: YYYY-MM-DD # Use today's actual date
121
+ planning:
122
+ phase: 1
123
+ task: ~
124
+ ---
125
+
126
+ # Plan: {Topic Name}
127
+ ```
128
+
129
+ 3. Commit: `planning({topic}): initialize plan`
130
+
131
+ → Proceed to **Step 2**.
79
132
 
80
133
  ---
81
134
 
82
- ## Step 4: Define Phases
135
+ ## Step 2: Load Planning Principles
136
+
137
+ Load **[planning-principles.md](references/planning-principles.md)** and follow its instructions as written.
83
138
 
84
- Load **[steps/define-phases.md](references/steps/define-phases.md)** and follow its instructions as written.
139
+ Proceed to **Step 3**.
85
140
 
86
141
  ---
87
142
 
88
- ## Step 5: Define Tasks
143
+ ## Step 3: Verify Source Material
89
144
 
90
- Load **[steps/define-tasks.md](references/steps/define-tasks.md)** and follow its instructions as written.
145
+ Load **[steps/verify-source-material.md](references/steps/verify-source-material.md)** and follow its instructions as written.
146
+
147
+ → Proceed to **Step 4**.
91
148
 
92
149
  ---
93
150
 
94
- ## Step 6: Author Tasks
151
+ ## Step 4: Plan Construction
95
152
 
96
- Load **[steps/author-tasks.md](references/steps/author-tasks.md)** and follow its instructions as written.
153
+ Load **[steps/plan-construction.md](references/steps/plan-construction.md)** and follow its instructions as written.
154
+
155
+ → Proceed to **Step 5**.
97
156
 
98
157
  ---
99
158
 
100
- ## Step 7: Resolve External Dependencies
159
+ ## Step 5: Resolve External Dependencies
101
160
 
102
161
  Load **[steps/resolve-dependencies.md](references/steps/resolve-dependencies.md)** and follow its instructions as written.
103
162
 
163
+ → Proceed to **Step 6**.
164
+
104
165
  ---
105
166
 
106
- ## Step 8: Plan Review
167
+ ## Step 6: Plan Review
107
168
 
108
169
  Load **[steps/plan-review.md](references/steps/plan-review.md)** and follow its instructions as written.
109
170
 
171
+ → Proceed to **Step 7**.
172
+
110
173
  ---
111
174
 
112
- ## Step 9: Conclude the Plan
175
+ ## Step 7: Conclude the Plan
113
176
 
114
177
  After the review is complete:
115
178
 
116
- 1. **Update plan status** — Update the plan frontmatter to `status: concluded`
117
- 2. **Final commit** — Commit the concluded plan
118
- 3. **Present completion summary**:
179
+ 1. **Update plan status** — Set `status: concluded` in the Plan Index File frontmatter
180
+ 3. **Final commit** — Commit the concluded plan
181
+ 4. **Present completion summary**:
119
182
 
120
183
  > "Planning is complete for **{topic}**.
121
184
  >
122
185
  > The plan contains **{N} phases** with **{M} tasks** total, reviewed for traceability against the specification and structural integrity.
123
186
  >
124
187
  > Status has been marked as `concluded`. The plan is ready for implementation."
188
+
189
+ > **CHECKPOINT**: Do not conclude if any tasks in the Plan Index File show `status: pending`. All tasks must be `authored` before concluding.
@@ -18,13 +18,13 @@ External dependencies are things a feature needs from other topics or systems th
18
18
 
19
19
  ## Format
20
20
 
21
- In plan index files, external dependencies appear in a dedicated section:
21
+ In Plan Index Files, external dependencies appear in a dedicated section:
22
22
 
23
23
  ```markdown
24
24
  ## External Dependencies
25
25
 
26
26
  - billing-system: Invoice generation for order completion
27
- - user-authentication: User context for permissions → beads-9m3p (resolved)
27
+ - user-authentication: User context for permissions → {task-id} (resolved)
28
28
  - ~~payment-gateway: Payment processing~~ → satisfied externally
29
29
  ```
30
30
 
@@ -51,7 +51,7 @@ This makes it explicit for downstream stages that dependencies were considered a
51
51
  ```
52
52
  SPECIFICATION PLANNING
53
53
  ───────────────────────────────────────────────────────────────────
54
- Dependencies section → Copied to plan index as unresolved
54
+ Dependencies section → Copied to Plan Index File as unresolved
55
55
  (natural language) ↓
56
56
  Resolved when linked to specific task ID
57
57
  (via planning or /link-dependencies)
@@ -44,7 +44,7 @@ backlog/
44
44
  └── task-3 - Add session management.md
45
45
  ```
46
46
 
47
- The plan file in `docs/workflow/planning/{topic}.md` serves as the reference pointer to backlog tasks.
47
+ The Plan Index File at `docs/workflow/planning/{topic}.md` serves as the reference pointer to backlog tasks.
48
48
 
49
49
  ## File Structure
50
50
 
@@ -52,14 +52,22 @@ The plan file in `docs/workflow/planning/{topic}.md` serves as the reference poi
52
52
 
53
53
  ```markdown
54
54
  ---
55
+ topic: {topic-name}
56
+ status: planning
55
57
  format: backlog-md
58
+ specification: ../specification/{topic}.md
59
+ cross_cutting_specs: # Omit if none
60
+ - ../specification/{spec}.md
61
+ spec_commit: {git-commit-hash}
56
62
  plan_id: {TOPIC_NAME}
63
+ created: YYYY-MM-DD # Use today's actual date
64
+ updated: YYYY-MM-DD # Use today's actual date
65
+ planning:
66
+ phase: 1
67
+ task: ~
57
68
  ---
58
69
 
59
- # Plan Reference: {Topic Name}
60
-
61
- **Specification**: `docs/workflow/specification/{topic}.md`
62
- **Created**: YYYY-MM-DD *(use today's actual date)*
70
+ # Plan: {Topic Name}
63
71
 
64
72
  ## About This Plan
65
73
 
@@ -78,12 +86,6 @@ This plan is managed via Backlog.md. Tasks are stored in the `backlog/` director
78
86
 
79
87
  **To add tasks**: Run `backlog add "Task title"` or create task files directly.
80
88
 
81
- ## Phases
82
-
83
- Tasks are organized with labels/priorities:
84
- - Label: `phase-1`, `phase-2`, etc.
85
- - Priority: high (foundational), medium (core), low (refinement)
86
-
87
89
  ## Key Decisions
88
90
 
89
91
  [Summary of key decisions from specification]
@@ -99,6 +101,32 @@ Architectural decisions from cross-cutting specifications that inform this plan:
99
101
 
100
102
  *Remove this section if no cross-cutting specifications apply.*
101
103
 
104
+ ## Phases
105
+
106
+ ### Phase 1: {Name}
107
+ status: draft
108
+ label: phase-1
109
+
110
+ **Goal**: {What this phase accomplishes}
111
+ **Why this order**: {Why this comes at this position}
112
+
113
+ **Acceptance**:
114
+ - [ ] Criterion 1
115
+ - [ ] Criterion 2
116
+
117
+ #### Tasks
118
+ | ID | Name | Edge Cases | Status |
119
+ |----|------|------------|--------|
120
+ | task-1 | {Task Name} | {list} | pending |
121
+
122
+ ---
123
+
124
+ ### Phase 2: {Name}
125
+ status: draft
126
+ label: phase-2
127
+
128
+ ...
129
+
102
130
  ## External Dependencies
103
131
 
104
132
  [Dependencies on other topics - copy from specification's Dependencies section]
@@ -109,6 +137,28 @@ Architectural decisions from cross-cutting specifications that inform this plan:
109
137
 
110
138
  The External Dependencies section tracks what this plan needs from other topics. See `../dependencies.md` for the format and states (unresolved, resolved, satisfied externally).
111
139
 
140
+ ## Frontmatter
141
+
142
+ The frontmatter tracks planning progress:
143
+
144
+ ```yaml
145
+ ---
146
+ topic: {topic-name}
147
+ status: planning | concluded
148
+ format: backlog-md
149
+ specification: ../specification/{topic}.md
150
+ cross_cutting_specs: # Omit if none
151
+ - ../specification/{spec}.md
152
+ spec_commit: {git-commit-hash}
153
+ plan_id: {TOPIC_NAME}
154
+ created: YYYY-MM-DD # Use today's actual date
155
+ updated: YYYY-MM-DD # Use today's actual date
156
+ planning:
157
+ phase: 2
158
+ task: 3
159
+ ---
160
+ ```
161
+
112
162
  ### Task File Format
113
163
 
114
164
  Each task is a separate file: `backlog/task-{id} - {title}.md`
@@ -297,6 +347,16 @@ project/
297
347
 
298
348
  Can read `backlog/` files directly if MCP unavailable.
299
349
 
350
+ ### Cleanup (Restart)
351
+
352
+ Delete the backlog task files for this topic. Read the task IDs from the Plan Index File's task tables, then delete each corresponding file:
353
+
354
+ ```bash
355
+ rm backlog/task-{id}*.md
356
+ ```
357
+
358
+ No index or database needs updating — Backlog.md uses the filesystem as its source of truth.
359
+
300
360
  ## CLI Commands Reference
301
361
 
302
362
  ```bash