@leeovery/claude-technical-workflows 2.0.45 → 2.0.46

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 (34) hide show
  1. package/commands/link-dependencies.md +2 -2
  2. package/commands/workflow/start-discussion.md +5 -1
  3. package/commands/workflow/start-implementation.md +5 -1
  4. package/commands/workflow/start-planning.md +5 -1
  5. package/commands/workflow/start-research.md +5 -1
  6. package/commands/workflow/start-review.md +5 -1
  7. package/commands/workflow/start-specification.md +11 -2
  8. package/commands/workflow/status.md +5 -1
  9. package/commands/workflow/view-plan.md +1 -9
  10. package/package.json +1 -1
  11. package/skills/technical-discussion/SKILL.md +7 -1
  12. package/skills/technical-implementation/SKILL.md +13 -2
  13. package/skills/technical-implementation/references/environment-setup.md +1 -1
  14. package/skills/technical-planning/SKILL.md +83 -20
  15. package/skills/technical-planning/references/{output-backlog-md.md → output-formats/output-backlog-md.md} +4 -4
  16. package/skills/technical-planning/references/{output-beads.md → output-formats/output-beads.md} +4 -4
  17. package/skills/technical-planning/references/{output-linear.md → output-formats/output-linear.md} +4 -4
  18. package/skills/technical-planning/references/{output-local-markdown.md → output-formats/output-local-markdown.md} +3 -3
  19. package/skills/technical-planning/references/output-formats.md +33 -6
  20. package/skills/technical-planning/references/phase-design.md +146 -0
  21. package/skills/technical-planning/references/planning-principles.md +44 -0
  22. package/skills/technical-planning/references/steps/author-tasks.md +63 -0
  23. package/skills/technical-planning/references/steps/define-phases.md +40 -0
  24. package/skills/technical-planning/references/steps/define-tasks.md +43 -0
  25. package/skills/technical-planning/references/steps/plan-review.md +96 -0
  26. package/skills/technical-planning/references/steps/resolve-dependencies.md +56 -0
  27. package/skills/technical-planning/references/steps/review-integrity.md +217 -0
  28. package/skills/technical-planning/references/steps/review-traceability.md +194 -0
  29. package/skills/technical-planning/references/task-design.md +158 -0
  30. package/skills/technical-research/SKILL.md +9 -1
  31. package/skills/technical-research/references/template.md +1 -0
  32. package/skills/technical-review/SKILL.md +9 -1
  33. package/skills/technical-specification/SKILL.md +10 -1
  34. package/skills/technical-planning/references/formal-planning.md +0 -235
@@ -0,0 +1,194 @@
1
+ # Traceability Review
2
+
3
+ *Reference for **[plan-review](plan-review.md)***
4
+
5
+ ---
6
+
7
+ Compare the plan against the specification **in both directions** to ensure complete, faithful translation.
8
+
9
+ **Purpose**: Verify that the plan is a faithful, complete translation of the specification. Everything in the spec must be in the plan, and everything in the plan must trace back to the spec. This is the anti-hallucination gate — it catches both missing content and invented content before implementation begins.
10
+
11
+ Re-read the specification in full before starting. Don't rely on memory — read it as if seeing it for the first time. Then check both directions:
12
+
13
+ ## What You're NOT Doing
14
+
15
+ - **Not adding new requirements** — If something isn't in the spec, the fix is to remove it from the plan or flag it with `[needs-info]`, not to justify its inclusion
16
+ - **Not expanding scope** — Missing spec content should be added as tasks; it shouldn't trigger re-architecture of the plan
17
+ - **Not being lenient with hallucinated content** — If it can't be traced to the specification, it must be removed or the user must explicitly approve it as an intentional addition
18
+ - **Not re-litigating spec decisions** — The specification reflects validated decisions; you're checking the plan's fidelity to them
19
+
20
+ ---
21
+
22
+ ## Direction 1: Specification → Plan (completeness)
23
+
24
+ Is everything from the specification represented in the plan?
25
+
26
+ 1. **For each specification element, verify plan coverage**:
27
+ - Every decision → has a task that implements it
28
+ - Every requirement → has a task with matching acceptance criteria
29
+ - Every edge case → has a task or is explicitly handled within a task
30
+ - Every constraint → is reflected in the relevant tasks
31
+ - Every data model or schema → appears in the relevant tasks
32
+ - Every integration point → has a task that addresses it
33
+ - Every validation rule → has a task with test coverage
34
+
35
+ 2. **Check depth of coverage** — It's not enough that a spec topic is *mentioned* in a task. The task must contain enough detail that an implementer wouldn't need to go back to the specification. Summarizing and rewording is fine, but the essence and instruction must be preserved.
36
+
37
+ ## Direction 2: Plan → Specification (fidelity)
38
+
39
+ Is everything in the plan actually from the specification? This is the anti-hallucination check.
40
+
41
+ 1. **For each task, trace its content back to the specification**:
42
+ - The Problem statement → ties to a spec requirement or decision
43
+ - The Solution approach → matches the spec's architectural choices
44
+ - The implementation details → come from the spec, not invention
45
+ - The acceptance criteria → verify spec requirements, not made-up ones
46
+ - The tests → cover spec behaviors, not imagined scenarios
47
+ - The edge cases → are from the spec, not invented
48
+
49
+ 2. **Flag anything that cannot be traced**:
50
+ - Content that has no corresponding specification section
51
+ - Technical approaches not discussed in the specification
52
+ - Requirements or behaviors not mentioned anywhere in the spec
53
+ - Edge cases the specification never identified
54
+ - Acceptance criteria testing things the specification doesn't require
55
+
56
+ 3. **The standard for hallucination**: If you cannot point to a specific part of the specification that justifies a piece of plan content, it is hallucinated. It doesn't matter how reasonable it seems — if it wasn't discussed and validated, it doesn't belong in the plan.
57
+
58
+ ## Presenting Traceability Findings
59
+
60
+ After completing your review:
61
+
62
+ 1. **Create the tracking file** — Write all findings to `{topic}-review-traceability-tracking.md`
63
+ 2. **Commit the tracking file** — Ensures it survives context refresh
64
+ 3. **Present findings** in two stages:
65
+
66
+ **Stage 1: Summary**
67
+
68
+ > "I've completed the traceability review comparing the plan against the specification. I found [N] items:
69
+ >
70
+ > 1. **[Brief title]** (Missing from plan | Hallucinated | Incomplete)
71
+ > [2-4 line explanation: what's wrong, where in the spec/plan, why it matters]
72
+ >
73
+ > 2. **[Brief title]** (Missing from plan | Hallucinated | Incomplete)
74
+ > [2-4 line explanation]
75
+ >
76
+ > Let's work through these one at a time, starting with #1."
77
+
78
+ **Stage 2: Process One Item at a Time**
79
+
80
+ Work through each finding **one at a time**. For each finding: present it, propose the fix, wait for approval, then apply it verbatim.
81
+
82
+ ### Present the Finding
83
+
84
+ Show the finding with full detail:
85
+
86
+ > **Finding {N} of {total}: {Brief Title}**
87
+ >
88
+ > **Type**: Missing from plan | Hallucinated content | Incomplete coverage
89
+ >
90
+ > **Spec Reference**: [Section/decision in the specification]
91
+ >
92
+ > **Plan Reference**: [Phase/task in the plan, or "N/A" for missing content]
93
+ >
94
+ > **Details**: [What's wrong and why it matters]
95
+
96
+ ### Propose the Fix
97
+
98
+ Present the proposed fix **in the format it will be written to the plan**. What the user sees is what gets applied — no changes between approval and writing.
99
+
100
+ State the action type explicitly so the user knows what's changing structurally:
101
+
102
+ **Update a task** — change content within an existing task:
103
+
104
+ > **Proposed fix — update Phase {N}, Task {M}:**
105
+ >
106
+ > **Current:**
107
+ > [The existing content as it appears in the plan]
108
+ >
109
+ > **Proposed:**
110
+ > [The replacement content]
111
+
112
+ **Add content to a task** — insert into an existing task (e.g., missing acceptance criteria, edge case):
113
+
114
+ > **Proposed fix — add to Phase {N}, Task {M}, {section}:**
115
+ >
116
+ > [The exact content to be added, in plan format]
117
+
118
+ **Remove content from a task** — strip content that shouldn't be there:
119
+
120
+ > **Proposed fix — remove from Phase {N}, Task {M}, {section}:**
121
+ >
122
+ > [The exact content to be removed]
123
+
124
+ **Add a new task** — a spec section has no plan coverage and needs its own task:
125
+
126
+ > **Proposed fix — add new task to Phase {N}:**
127
+ >
128
+ > [The complete task in plan format, using the task template]
129
+
130
+ **Remove a task** — an entire task is hallucinated with no spec backing:
131
+
132
+ > **Proposed fix — remove Phase {N}, Task {M}: {Task Name}**
133
+ >
134
+ > **Reason**: [Why this task has no specification basis]
135
+
136
+ **Add a new phase** — a significant area of the specification has no plan coverage:
137
+
138
+ > **Proposed fix — add new Phase {N}: {Phase Name}**
139
+ >
140
+ > [Phase goal, acceptance criteria, and task overview]
141
+
142
+ **Remove a phase** — an entire phase is not backed by the specification:
143
+
144
+ > **Proposed fix — remove Phase {N}: {Phase Name}**
145
+ >
146
+ > **Reason**: [Why this phase has no specification basis]
147
+
148
+ After presenting the finding and proposed fix, ask:
149
+
150
+ > **Finding {N} of {total}: {Brief Title}**
151
+ >
152
+ > **To proceed, choose one:**
153
+ > - **"Approve"** — Fix is confirmed. I'll apply it to the plan verbatim.
154
+ > - **"Adjust"** — Tell me what to change about the proposed fix.
155
+ > - **"Skip"** — Leave this as-is and move to the next finding.
156
+
157
+ **STOP.** Wait for the user's response.
158
+
159
+ ### If Adjust
160
+
161
+ The user may:
162
+ - Request changes to the proposed fix
163
+ - Ask questions about why this was flagged
164
+ - Suggest a different approach to resolving the finding
165
+
166
+ Incorporate feedback and re-present the proposed fix **in full** using the same format above. Then ask the same choice again. Repeat until approved or skipped.
167
+
168
+ ### If Approved
169
+
170
+ Apply the fix to the plan — as presented, using the output format adapter to determine how it's written. Do not modify content between approval and writing. Then update the tracking file: mark resolution as "Fixed", add any discussion notes.
171
+
172
+ Confirm:
173
+
174
+ > "Finding {N} of {total}: {Brief Title} — fixed."
175
+
176
+ ### If Skipped
177
+
178
+ Update the tracking file: mark resolution as "Skipped", note the reason.
179
+
180
+ > "Finding {N} of {total}: {Brief Title} — skipped."
181
+
182
+ ### Next Finding
183
+
184
+ Commit the tracking file (and any plan changes) before moving on. This ensures progress survives context refresh or session interruption.
185
+
186
+ **If findings remain:** → Present the next finding. Follow the same present → propose → ask → apply sequence.
187
+
188
+ **If all findings are processed:**
189
+
190
+ **Delete the traceability tracking file** (`{topic}-review-traceability-tracking.md`) — it has served its purpose.
191
+
192
+ Inform the user the traceability review is complete.
193
+
194
+ → Return to **[plan-review.md](plan-review.md)** for the integrity review.
@@ -0,0 +1,158 @@
1
+ # Task Design
2
+
3
+ *Reference for **[technical-planning](../SKILL.md)***
4
+
5
+ ---
6
+
7
+ This reference defines the principles for breaking phases into tasks and writing task detail. It is loaded when tasks are first proposed and stays in context through task detailing.
8
+
9
+ ## One Task = One TDD Cycle
10
+
11
+ Write test → implement → pass → commit. Each task produces a single, verifiable increment.
12
+
13
+ ---
14
+
15
+ ## Cross-Cutting References
16
+
17
+ Cross-cutting specifications (e.g., caching strategy, error handling conventions, rate limiting policy) are not things to build — they are architectural decisions that influence how features are built. They inform technical choices within the plan without adding scope.
18
+
19
+ If cross-cutting specifications were provided alongside the specification:
20
+
21
+ 1. **Apply their decisions** when designing tasks (e.g., if caching strategy says "cache API responses for 5 minutes", reflect that in relevant task detail)
22
+ 2. **Note where patterns apply** — when a task implements a cross-cutting pattern, reference it
23
+ 3. **Include a "Cross-Cutting References" section** in the plan linking to these specifications
24
+
25
+ Cross-cutting references are context, not scope. They shape how tasks are written, not what tasks exist.
26
+
27
+ ---
28
+
29
+ ## Vertical Slicing
30
+
31
+ Prefer **vertical slices** that deliver complete, testable functionality over horizontal slices that separate by technical layer.
32
+
33
+ **Horizontal (avoid)**:
34
+
35
+ ```
36
+ Task 1: Create all database models
37
+ Task 2: Create all service classes
38
+ Task 3: Wire up integrations
39
+ Task 4: Add error handling
40
+ ```
41
+
42
+ Nothing works until Task 4. No task is independently verifiable.
43
+
44
+ **Vertical (prefer)**:
45
+
46
+ ```
47
+ Task 1: Fetch and store events from provider (happy path)
48
+ Task 2: Handle pagination for large result sets
49
+ Task 3: Handle authentication token refresh
50
+ Task 4: Handle rate limiting
51
+ ```
52
+
53
+ Each task delivers a complete slice of functionality that can be tested in isolation.
54
+
55
+ Within a bounded feature, vertical slicing means each task completes a coherent unit of that feature's functionality — not that it must touch UI/API/database layers. The test is: *can this task be verified independently?*
56
+
57
+ TDD naturally encourages vertical slicing — when you think "what test can I write?", you frame work as complete, verifiable behaviour rather than technical layers.
58
+
59
+ ---
60
+
61
+ ## Task Ordering
62
+
63
+ Within a phase, order tasks by:
64
+
65
+ 1. **Foundation / setup** — models, migrations, base configuration needed by other tasks
66
+ 2. **Happy path** — the primary expected behaviour, end-to-end
67
+ 3. **Error handling** — validation failures, API errors, permission checks
68
+ 4. **Edge cases** — boundary conditions, unusual inputs, race conditions
69
+
70
+ This ordering means the first tasks establish the pattern and the later tasks extend it. Each task builds on a working foundation rather than building in the dark.
71
+
72
+ **Edge cases as separate tasks**: Keep the happy-path task focused. If a task's acceptance criteria start growing beyond 3-4 items, the edge cases probably deserve their own tasks. This keeps each TDD cycle tight and each task independently verifiable.
73
+
74
+ ---
75
+
76
+ ## Scope Signals
77
+
78
+ ### Too big
79
+
80
+ A task is probably too big if:
81
+
82
+ - The "Do" section exceeds 5 concrete steps
83
+ - You can't describe the test in one sentence
84
+ - It touches more than one architectural boundary (e.g., both API endpoint and queue worker)
85
+ - Completion requires multiple distinct behaviours to be implemented
86
+
87
+ Split it. Two focused tasks are better than one sprawling task.
88
+
89
+ ### Too small
90
+
91
+ A task is probably too small if:
92
+
93
+ - It's a single line change with no meaningful test
94
+ - It's mechanical housekeeping (renaming, moving files) that doesn't warrant its own TDD cycle
95
+ - It only makes sense as a step within another task
96
+
97
+ Merge it into the task that needs it.
98
+
99
+ ### The independence test
100
+
101
+ Ask: "Can I write a test for this task that passes without any other task being complete (within this phase)?" If yes, it's well-scoped. If no, it might need to be merged with its dependency or reordered.
102
+
103
+ ---
104
+
105
+ ## Task Template
106
+
107
+ Every task should follow this structure:
108
+
109
+ ```markdown
110
+ ### Task N: [Clear action statement]
111
+
112
+ **Problem**: Why this task exists — what issue or gap it addresses.
113
+
114
+ **Solution**: What we're building — the high-level approach.
115
+
116
+ **Outcome**: What success looks like — the verifiable end state.
117
+
118
+ **Do**:
119
+ - Specific implementation steps
120
+ - File locations and method names where helpful
121
+ - Concrete guidance, not vague directions
122
+
123
+ **Acceptance Criteria**:
124
+ - [ ] First verifiable criterion
125
+ - [ ] Second verifiable criterion
126
+ - [ ] Edge case handling criterion
127
+
128
+ **Tests**:
129
+ - `"it does the primary expected behaviour"`
130
+ - `"it handles edge case correctly"`
131
+ - `"it fails appropriately for invalid input"`
132
+
133
+ **Context**: (when relevant)
134
+ > Relevant details from specification: code examples, architectural decisions,
135
+ > data models, or constraints that inform implementation.
136
+ ```
137
+
138
+ ### Field Requirements
139
+
140
+ | Field | Required | Notes |
141
+ |-------|----------|-------|
142
+ | Problem | Yes | One sentence minimum — why this task exists |
143
+ | Solution | Yes | One sentence minimum — what we're building |
144
+ | Outcome | Yes | One sentence minimum — what success looks like |
145
+ | Do | Yes | At least one concrete action |
146
+ | Acceptance Criteria | Yes | At least one pass/fail criterion |
147
+ | Tests | Yes | At least one test name; include edge cases, not just happy path |
148
+ | Context | When relevant | Only include when spec has details worth pulling forward |
149
+
150
+ ### The Template as Quality Gate
151
+
152
+ If you struggle to articulate a clear Problem for a task, this signals the task may be:
153
+
154
+ - **Too granular**: Merge with a related task
155
+ - **Mechanical housekeeping**: Include as a step within another task
156
+ - **Poorly understood**: Revisit the specification
157
+
158
+ Every standalone task should have a reason to exist that can be stated simply. The template enforces this — difficulty completing it is diagnostic information, not a problem to work around.
@@ -20,7 +20,13 @@ Either way: Explore feasibility (technical, business, market), validate assumpti
20
20
  - **Topic or idea** (required) - What to research/explore
21
21
  - **Existing context** (optional) - Any prior research or constraints
22
22
 
23
- **If missing:** Will ask user what they want to explore.
23
+ **Before proceeding**, confirm the required input is clear. If anything is missing or unclear, **STOP** and resolve with the user.
24
+
25
+ - **No topic provided?**
26
+ > "What would you like to research or explore? This could be a new idea, a technical concept, a market opportunity — anything you want to investigate."
27
+
28
+ - **Topic is vague or could go many directions?**
29
+ > "You mentioned {topic}. That could cover a lot of ground — is there a specific angle you'd like to start with, or should I explore broadly?"
24
30
 
25
31
  ## Your Expertise
26
32
 
@@ -87,6 +93,8 @@ Research without documentation is wasted. Follow this loop:
87
93
 
88
94
  ## Critical Rules
89
95
 
96
+ **No status field**: Research documents do NOT have a `status` field in their frontmatter. Only `topic` and `date`. Research is open-ended by nature — it doesn't "conclude." Even when a research exploration feels complete, do not add `status: concluded` or any similar field. The document stays as-is.
97
+
90
98
  **Don't hallucinate**: Only document what was actually discussed.
91
99
 
92
100
  **Don't expand**: Capture what was said, don't embellish.
@@ -30,6 +30,7 @@ What we know so far:
30
30
 
31
31
  - `topic`: Use `exploration` for the initial exploration file. Use semantic names (`market-landscape`, `technical-feasibility`) when splitting into focused files.
32
32
  - `date`: Today's date when creating the document.
33
+ - **No `status` field**: Research documents intentionally have no status. Do not add `status`, `state`, or any lifecycle field. Research is open-ended — it never "concludes."
33
34
 
34
35
  ## Notes
35
36
 
@@ -31,7 +31,15 @@ Either way: Verify every plan task was implemented, tested adequately, and meets
31
31
  - **Specification content** (optional) - Context for design decisions
32
32
  - **Implementation scope** (optional) - What code/files to review. Will identify from git if not specified.
33
33
 
34
- **If missing:** Will ask user for plan location. Can proceed without specification.
34
+ **Before proceeding**, verify the required input is available. If anything is missing, **STOP** — do not proceed until resolved.
35
+
36
+ - **No plan provided?**
37
+ > "I need the implementation plan to review against. Could you point me to the plan file (e.g., `docs/workflow/planning/{topic}.md`)?"
38
+
39
+ - **Plan references a specification that can't be found?**
40
+ > "The plan references a specification but I can't locate it at the expected path. Could you confirm where the specification is? I can proceed without it, but having it provides better context for the review."
41
+
42
+ The specification is optional — the review can proceed with just the plan.
35
43
 
36
44
  ## Review Approach
37
45
 
@@ -26,7 +26,16 @@ Either way: Transform unvalidated reference material into a specification that's
26
26
  - Any other reference material
27
27
  - **Topic name** (required) - Used for the output filename
28
28
 
29
- **If missing:** Will ask user to provide context or point to source files.
29
+ **Before proceeding**, verify all required inputs are available and unambiguous. If anything is missing or unclear, **STOP** do not proceed until resolved.
30
+
31
+ - **No source material provided?**
32
+ > "I need source material to build a specification from. Could you point me to the source files (e.g., `docs/workflow/discussion/{topic}.md`), or provide the content directly?"
33
+
34
+ - **No topic name provided?**
35
+ > "What should the specification be named? This determines the output file: `docs/workflow/specification/{name}.md`."
36
+
37
+ - **Source material seems incomplete or unclear?**
38
+ > "I have the source material, but {concern}. Should I proceed as-is, or is there additional material I should review?"
30
39
 
31
40
  **Multiple sources:** When multiple sources are provided, extract exhaustively from ALL of them. Content may be scattered across sources - a decision in one may have constraints or details in another. The specification consolidates everything into a single standalone document.
32
41
 
@@ -1,235 +0,0 @@
1
- # Formal Planning
2
-
3
- *Reference for **[technical-planning](../SKILL.md)***
4
-
5
- ---
6
-
7
- You are creating the formal implementation plan from the specification.
8
-
9
- ## Before You Begin
10
-
11
- **Confirm output format with user.** Ask which format they want, then load the appropriate output adapter from the main skill file. If you don't know which format, ask.
12
-
13
- ## Planning is Collaborative
14
-
15
- Planning is an iterative process between you and the user. The specification contains validated, considered decisions - planning translates that work into actionable structure. But translation still requires judgment, and the user should guide that judgment.
16
-
17
- **Stop, reflect, and ask** when:
18
- - The specification is ambiguous about implementation approach
19
- - Multiple valid ways to structure phases or tasks exist
20
- - You're uncertain whether a task is appropriately scoped
21
- - Edge cases aren't fully addressed in the specification
22
-
23
- **Never invent to fill gaps.** If the specification doesn't address something, use `[needs-info]` and ask the user. The specification is the golden document - everything in the plan must trace back to it.
24
-
25
- **The user expects collaboration.** Planning doesn't have to be done by the agent alone. It's normal and encouraged to pause for guidance rather than guess.
26
-
27
- ## The Planning Process
28
-
29
- ### 1. Read Specification
30
-
31
- From the specification (`docs/workflow/specification/{topic}.md`), extract:
32
- - Key decisions and rationale
33
- - Architectural choices
34
- - Edge cases identified
35
- - Constraints and requirements
36
- - **External dependencies** (from the Dependencies section)
37
-
38
- **The specification is your sole input.** Prior source materials have already been validated, filtered, and enriched into the specification. Everything you need is in the specification - do not reference other documents.
39
-
40
- #### Extract External Dependencies
41
-
42
- The specification's Dependencies section lists things this feature needs from other topics/systems. These are **external dependencies** - things outside this plan's scope that must exist for implementation to proceed.
43
-
44
- Copy these into the plan index file (see "External Dependencies Section" below). During planning:
45
-
46
- 1. **Check for existing plans**: For each dependency, search `docs/workflow/planning/` for a matching topic
47
- 2. **If plan exists**: Try to identify specific tasks that satisfy the dependency. Query the output format to find relevant tasks. If ambiguous, ask the user which tasks apply.
48
- 3. **If no plan exists**: Record the dependency in natural language - it will be linked later via `/link-dependencies` or when that topic is planned.
49
-
50
- **Optional reverse check**: Ask the user: "Would you like me to check if any existing plans depend on this topic?"
51
-
52
- If yes:
53
- 1. Scan other plan indexes for External Dependencies that reference this topic
54
- 2. For each match, identify which task(s) in the current plan satisfy that dependency
55
- 3. Update the other plan's dependency entry with the task ID (unresolved → resolved)
56
-
57
- Alternatively, the user can run `/link-dependencies` later to resolve dependencies across all plans in bulk.
58
-
59
- ### 2. Define Phases
60
-
61
- Break into logical phases:
62
- - Each independently testable
63
- - Each has acceptance criteria
64
- - Progression: Foundation → Core → Edge cases → Refinement
65
-
66
- ### 3. Break Phases into Tasks
67
-
68
- Each task is one TDD cycle:
69
- - One clear thing to build
70
- - One test to prove it works
71
-
72
- ### 4. Write Micro Acceptance
73
-
74
- For each task, name the test that proves completion. Implementation writes this test first.
75
-
76
- ### 5. Address Every Edge Case
77
-
78
- Extract each edge case, create a task with micro acceptance.
79
-
80
- ### 6. Add Code Examples (if needed)
81
-
82
- Only for novel patterns not obvious to implement.
83
-
84
- ### 7. Review Against Specification
85
-
86
- Verify:
87
- - All decisions referenced
88
- - All edge cases have tasks
89
- - Each phase has acceptance criteria
90
- - Each task has micro acceptance
91
-
92
- ## Phase Design
93
-
94
- **Each phase should**:
95
- - Be independently testable
96
- - Have clear acceptance criteria (checkboxes)
97
- - Provide incremental value
98
-
99
- **Progression**: Foundation → Core functionality → Edge cases → Refinement
100
-
101
- ## Task Design
102
-
103
- **One task = One TDD cycle**: write test → implement → pass → commit
104
-
105
- ### Task Structure
106
-
107
- Every task should follow this structure:
108
-
109
- ```markdown
110
- ### Task N: [Clear action statement]
111
-
112
- **Problem**: Why this task exists - what issue or gap it addresses.
113
-
114
- **Solution**: What we're building - the high-level approach.
115
-
116
- **Outcome**: What success looks like - the verifiable end state.
117
-
118
- **Do**:
119
- - Specific implementation steps
120
- - File locations and method names where helpful
121
- - Concrete guidance, not vague directions
122
-
123
- **Acceptance Criteria**:
124
- - [ ] First verifiable criterion
125
- - [ ] Second verifiable criterion
126
- - [ ] Edge case handling criterion
127
-
128
- **Tests**:
129
- - `"it does the primary expected behavior"`
130
- - `"it handles edge case correctly"`
131
- - `"it fails appropriately for invalid input"`
132
-
133
- **Context**: (when relevant)
134
- > Relevant details from specification: code examples, architectural decisions,
135
- > data models, or constraints that inform implementation.
136
- ```
137
-
138
- ### Field Requirements
139
-
140
- | Field | Required | Notes |
141
- |-------|----------|-------|
142
- | Problem | Yes | One sentence minimum - why this task exists |
143
- | Solution | Yes | One sentence minimum - what we're building |
144
- | Outcome | Yes | One sentence minimum - what success looks like |
145
- | Do | Yes | At least one concrete action |
146
- | Acceptance Criteria | Yes | At least one pass/fail criterion |
147
- | Tests | Yes | At least one test name; include edge cases, not just happy path |
148
- | Context | When relevant | Only include when spec has details worth pulling forward |
149
-
150
- ### The Template as Quality Gate
151
-
152
- If you struggle to articulate a clear Problem for a task, this signals the task may be:
153
-
154
- - **Too granular**: Merge with a related task
155
- - **Mechanical housekeeping**: Include as a step within another task
156
- - **Poorly understood**: Revisit the specification
157
-
158
- Every standalone task should have a reason to exist that can be stated simply. The template enforces this - difficulty completing it is diagnostic information, not a problem to work around.
159
-
160
- ### Vertical Slicing
161
-
162
- Prefer **vertical slices** that deliver complete, testable functionality over horizontal slices that separate by technical layer.
163
-
164
- **Horizontal (avoid)**:
165
- ```
166
- Task 1: Create all database models
167
- Task 2: Create all service classes
168
- Task 3: Wire up integrations
169
- Task 4: Add error handling
170
- ```
171
-
172
- Nothing works until Task 4. No task is independently verifiable.
173
-
174
- **Vertical (prefer)**:
175
- ```
176
- Task 1: Fetch and store events from provider (happy path)
177
- Task 2: Handle pagination for large result sets
178
- Task 3: Handle authentication token refresh
179
- Task 4: Handle rate limiting
180
- ```
181
-
182
- Each task delivers a complete slice of functionality that can be tested in isolation.
183
-
184
- Within a bounded feature, vertical slicing means each task completes a coherent unit of that feature's functionality - not that it must touch UI/API/database layers. The test is: *can this task be verified independently?*
185
-
186
- TDD naturally encourages vertical slicing - when you think "what test can I write?", you frame work as complete, verifiable behavior rather than technical layers
187
-
188
- ## Plan as Source of Truth
189
-
190
- The plan IS the source of truth. Every phase, every task must contain all information needed to execute it.
191
-
192
- - **Self-contained**: Each task executable without external context
193
- - **No assumptions**: Spell out the context, don't assume implementer knows it
194
-
195
- ## Flagging Incomplete Tasks
196
-
197
- When information is missing, mark it clearly with `[needs-info]`:
198
-
199
- ```markdown
200
- ### Task 3: Configure rate limiting [needs-info]
201
-
202
- **Do**: Set up rate limiting for the API endpoint
203
- **Test**: `it throttles requests exceeding limit`
204
-
205
- **Needs clarification**:
206
- - What's the rate limit threshold?
207
- - Per-user or per-IP?
208
- ```
209
-
210
- Planning is iterative. Create structure, flag gaps, refine.
211
-
212
- ## Quality Checklist
213
-
214
- Before handing off to implementation:
215
-
216
- - [ ] Clear phases with acceptance criteria
217
- - [ ] Each phase has TDD-sized tasks
218
- - [ ] Each task has micro acceptance (test name)
219
- - [ ] All edge cases mapped to tasks
220
- - [ ] Gaps flagged with `[needs-info]`
221
- - [ ] External dependencies documented in plan index
222
-
223
- ## External Dependencies Section
224
-
225
- The plan index file must include an External Dependencies section. See **[dependencies.md](dependencies.md)** for the format, states, and how they affect implementation.
226
-
227
- ## Commit Frequently
228
-
229
- Commit planning docs at natural breaks, after significant progress, and before any context refresh.
230
-
231
- Context refresh = memory loss. Uncommitted work = lost work.
232
-
233
- ## Output
234
-
235
- Load the appropriate output adapter (linked from the main skill file) for format-specific structure and templates.