claude-cook 1.10.8 → 1.11.1

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 (39) hide show
  1. package/agents/cook-pm.md +140 -59
  2. package/commands/cook/help.md +110 -417
  3. package/commands/cook/pm-start.md +86 -117
  4. package/cook/workflows/pm-check.md +9 -8
  5. package/cook/workflows/pm-cycle.md +87 -21
  6. package/package.json +1 -1
  7. package/scripts/pm-loop.sh +30 -10
  8. package/agents/cook-debugger.md +0 -1203
  9. package/agents/cook-executor.md +0 -784
  10. package/agents/cook-integration-checker.md +0 -423
  11. package/agents/cook-phase-researcher.md +0 -641
  12. package/agents/cook-verifier.md +0 -778
  13. package/commands/cook/add-todo.md +0 -193
  14. package/commands/cook/audit-milestone.md +0 -277
  15. package/commands/cook/check-todos.md +0 -228
  16. package/commands/cook/debug.md +0 -169
  17. package/commands/cook/discuss-phase.md +0 -86
  18. package/commands/cook/execute-phase.md +0 -339
  19. package/commands/cook/list-phase-assumptions.md +0 -50
  20. package/commands/cook/pause-work.md +0 -134
  21. package/commands/cook/plan-milestone-gaps.md +0 -295
  22. package/commands/cook/quick.md +0 -309
  23. package/commands/cook/research-phase.md +0 -200
  24. package/commands/cook/resume-work.md +0 -40
  25. package/commands/cook/verify-work.md +0 -219
  26. package/cook/references/checkpoints.md +0 -1078
  27. package/cook/references/tdd.md +0 -263
  28. package/cook/references/verification-patterns.md +0 -612
  29. package/cook/templates/DEBUG.md +0 -159
  30. package/cook/templates/UAT.md +0 -247
  31. package/cook/templates/debug-subagent-prompt.md +0 -91
  32. package/cook/templates/verification-report.md +0 -322
  33. package/cook/workflows/diagnose-issues.md +0 -231
  34. package/cook/workflows/discuss-phase.md +0 -433
  35. package/cook/workflows/execute-phase.md +0 -671
  36. package/cook/workflows/execute-plan.md +0 -1844
  37. package/cook/workflows/list-phase-assumptions.md +0 -178
  38. package/cook/workflows/verify-phase.md +0 -628
  39. package/cook/workflows/verify-work.md +0 -596
@@ -1,159 +0,0 @@
1
- # Debug Template
2
-
3
- Template for `.planning/debug/[slug].md` — active debug session tracking.
4
-
5
- ---
6
-
7
- ## File Template
8
-
9
- ```markdown
10
- ---
11
- status: gathering | investigating | fixing | verifying | resolved
12
- trigger: "[verbatim user input]"
13
- created: [ISO timestamp]
14
- updated: [ISO timestamp]
15
- ---
16
-
17
- ## Current Focus
18
- <!-- OVERWRITE on each update - always reflects NOW -->
19
-
20
- hypothesis: [current theory being tested]
21
- test: [how testing it]
22
- expecting: [what result means if true/false]
23
- next_action: [immediate next step]
24
-
25
- ## Symptoms
26
- <!-- Written during gathering, then immutable -->
27
-
28
- expected: [what should happen]
29
- actual: [what actually happens]
30
- errors: [error messages if any]
31
- reproduction: [how to trigger]
32
- started: [when it broke / always broken]
33
-
34
- ## Eliminated
35
- <!-- APPEND only - prevents re-investigating after /clear -->
36
-
37
- - hypothesis: [theory that was wrong]
38
- evidence: [what disproved it]
39
- timestamp: [when eliminated]
40
-
41
- ## Evidence
42
- <!-- APPEND only - facts discovered during investigation -->
43
-
44
- - timestamp: [when found]
45
- checked: [what was examined]
46
- found: [what was observed]
47
- implication: [what this means]
48
-
49
- ## Resolution
50
- <!-- OVERWRITE as understanding evolves -->
51
-
52
- root_cause: [empty until found]
53
- fix: [empty until applied]
54
- verification: [empty until verified]
55
- files_changed: []
56
- ```
57
-
58
- ---
59
-
60
- <section_rules>
61
-
62
- **Frontmatter (status, trigger, timestamps):**
63
- - `status`: OVERWRITE - reflects current phase
64
- - `trigger`: IMMUTABLE - verbatim user input, never changes
65
- - `created`: IMMUTABLE - set once
66
- - `updated`: OVERWRITE - update on every change
67
-
68
- **Current Focus:**
69
- - OVERWRITE entirely on each update
70
- - Always reflects what Claude is doing RIGHT NOW
71
- - If Claude reads this after /clear, it knows exactly where to resume
72
- - Fields: hypothesis, test, expecting, next_action
73
-
74
- **Symptoms:**
75
- - Written during initial gathering phase
76
- - IMMUTABLE after gathering complete
77
- - Reference point for what we're trying to fix
78
- - Fields: expected, actual, errors, reproduction, started
79
-
80
- **Eliminated:**
81
- - APPEND only - never remove entries
82
- - Prevents re-investigating dead ends after context reset
83
- - Each entry: hypothesis, evidence that disproved it, timestamp
84
- - Critical for efficiency across /clear boundaries
85
-
86
- **Evidence:**
87
- - APPEND only - never remove entries
88
- - Facts discovered during investigation
89
- - Each entry: timestamp, what checked, what found, implication
90
- - Builds the case for root cause
91
-
92
- **Resolution:**
93
- - OVERWRITE as understanding evolves
94
- - May update multiple times as fixes are tried
95
- - Final state shows confirmed root cause and verified fix
96
- - Fields: root_cause, fix, verification, files_changed
97
-
98
- </section_rules>
99
-
100
- <lifecycle>
101
-
102
- **Creation:** Immediately when /cook:debug is called
103
- - Create file with trigger from user input
104
- - Set status to "gathering"
105
- - Current Focus: next_action = "gather symptoms"
106
- - Symptoms: empty, to be filled
107
-
108
- **During symptom gathering:**
109
- - Update Symptoms section as user answers questions
110
- - Update Current Focus with each question
111
- - When complete: status → "investigating"
112
-
113
- **During investigation:**
114
- - OVERWRITE Current Focus with each hypothesis
115
- - APPEND to Evidence with each finding
116
- - APPEND to Eliminated when hypothesis disproved
117
- - Update timestamp in frontmatter
118
-
119
- **During fixing:**
120
- - status → "fixing"
121
- - Update Resolution.root_cause when confirmed
122
- - Update Resolution.fix when applied
123
- - Update Resolution.files_changed
124
-
125
- **During verification:**
126
- - status → "verifying"
127
- - Update Resolution.verification with results
128
- - If verification fails: status → "investigating", try again
129
-
130
- **On resolution:**
131
- - status → "resolved"
132
- - Move file to .planning/debug/resolved/
133
-
134
- </lifecycle>
135
-
136
- <resume_behavior>
137
-
138
- When Claude reads this file after /clear:
139
-
140
- 1. Parse frontmatter → know status
141
- 2. Read Current Focus → know exactly what was happening
142
- 3. Read Eliminated → know what NOT to retry
143
- 4. Read Evidence → know what's been learned
144
- 5. Continue from next_action
145
-
146
- The file IS the debugging brain. Claude should be able to resume perfectly from any interruption point.
147
-
148
- </resume_behavior>
149
-
150
- <size_constraint>
151
-
152
- Keep debug files focused:
153
- - Evidence entries: 1-2 lines each, just the facts
154
- - Eliminated: brief - hypothesis + why it failed
155
- - No narrative prose - structured data only
156
-
157
- If evidence grows very large (10+ entries), consider whether you're going in circles. Check Eliminated to ensure you're not re-treading.
158
-
159
- </size_constraint>
@@ -1,247 +0,0 @@
1
- # UAT Template
2
-
3
- Template for `.planning/phases/XX-name/{phase}-UAT.md` — persistent UAT session tracking.
4
-
5
- ---
6
-
7
- ## File Template
8
-
9
- ```markdown
10
- ---
11
- status: testing | complete | diagnosed
12
- phase: XX-name
13
- source: [list of SUMMARY.md files tested]
14
- started: [ISO timestamp]
15
- updated: [ISO timestamp]
16
- ---
17
-
18
- ## Current Test
19
- <!-- OVERWRITE each test - shows where we are -->
20
-
21
- number: [N]
22
- name: [test name]
23
- expected: |
24
- [what user should observe]
25
- awaiting: user response
26
-
27
- ## Tests
28
-
29
- ### 1. [Test Name]
30
- expected: [observable behavior - what user should see]
31
- result: [pending]
32
-
33
- ### 2. [Test Name]
34
- expected: [observable behavior]
35
- result: pass
36
-
37
- ### 3. [Test Name]
38
- expected: [observable behavior]
39
- result: issue
40
- reported: "[verbatim user response]"
41
- severity: major
42
-
43
- ### 4. [Test Name]
44
- expected: [observable behavior]
45
- result: skipped
46
- reason: [why skipped]
47
-
48
- ...
49
-
50
- ## Summary
51
-
52
- total: [N]
53
- passed: [N]
54
- issues: [N]
55
- pending: [N]
56
- skipped: [N]
57
-
58
- ## Gaps
59
-
60
- <!-- YAML format for plan-phase --gaps consumption -->
61
- - truth: "[expected behavior from test]"
62
- status: failed
63
- reason: "User reported: [verbatim response]"
64
- severity: blocker | major | minor | cosmetic
65
- test: [N]
66
- root_cause: "" # Filled by diagnosis
67
- artifacts: [] # Filled by diagnosis
68
- missing: [] # Filled by diagnosis
69
- debug_session: "" # Filled by diagnosis
70
- ```
71
-
72
- ---
73
-
74
- <section_rules>
75
-
76
- **Frontmatter:**
77
- - `status`: OVERWRITE - "testing" or "complete"
78
- - `phase`: IMMUTABLE - set on creation
79
- - `source`: IMMUTABLE - SUMMARY files being tested
80
- - `started`: IMMUTABLE - set on creation
81
- - `updated`: OVERWRITE - update on every change
82
-
83
- **Current Test:**
84
- - OVERWRITE entirely on each test transition
85
- - Shows which test is active and what's awaited
86
- - On completion: "[testing complete]"
87
-
88
- **Tests:**
89
- - Each test: OVERWRITE result field when user responds
90
- - `result` values: [pending], pass, issue, skipped
91
- - If issue: add `reported` (verbatim) and `severity` (inferred)
92
- - If skipped: add `reason` if provided
93
-
94
- **Summary:**
95
- - OVERWRITE counts after each response
96
- - Tracks: total, passed, issues, pending, skipped
97
-
98
- **Gaps:**
99
- - APPEND only when issue found (YAML format)
100
- - After diagnosis: fill `root_cause`, `artifacts`, `missing`, `debug_session`
101
- - This section feeds directly into /cook:plan-phase --gaps
102
-
103
- </section_rules>
104
-
105
- <diagnosis_lifecycle>
106
-
107
- **After testing complete (status: complete), if gaps exist:**
108
-
109
- 1. User runs diagnosis (from verify-work offer or manually)
110
- 2. diagnose-issues workflow spawns parallel debug agents
111
- 3. Each agent investigates one gap, returns root cause
112
- 4. UAT.md Gaps section updated with diagnosis:
113
- - Each gap gets `root_cause`, `artifacts`, `missing`, `debug_session` filled
114
- 5. status → "diagnosed"
115
- 6. Ready for /cook:plan-phase --gaps with root causes
116
-
117
- **After diagnosis:**
118
- ```yaml
119
- ## Gaps
120
-
121
- - truth: "Comment appears immediately after submission"
122
- status: failed
123
- reason: "User reported: works but doesn't show until I refresh the page"
124
- severity: major
125
- test: 2
126
- root_cause: "useEffect in CommentList.tsx missing commentCount dependency"
127
- artifacts:
128
- - path: "src/components/CommentList.tsx"
129
- issue: "useEffect missing dependency"
130
- missing:
131
- - "Add commentCount to useEffect dependency array"
132
- debug_session: ".planning/debug/comment-not-refreshing.md"
133
- ```
134
-
135
- </diagnosis_lifecycle>
136
-
137
- <lifecycle>
138
-
139
- **Creation:** When /cook:verify-work starts new session
140
- - Extract tests from SUMMARY.md files
141
- - Set status to "testing"
142
- - Current Test points to test 1
143
- - All tests have result: [pending]
144
-
145
- **During testing:**
146
- - Present test from Current Test section
147
- - User responds with pass confirmation or issue description
148
- - Update test result (pass/issue/skipped)
149
- - Update Summary counts
150
- - If issue: append to Gaps section (YAML format), infer severity
151
- - Move Current Test to next pending test
152
-
153
- **On completion:**
154
- - status → "complete"
155
- - Current Test → "[testing complete]"
156
- - Commit file
157
- - Present summary with next steps
158
-
159
- **Resume after /clear:**
160
- 1. Read frontmatter → know phase and status
161
- 2. Read Current Test → know where we are
162
- 3. Find first [pending] result → continue from there
163
- 4. Summary shows progress so far
164
-
165
- </lifecycle>
166
-
167
- <severity_guide>
168
-
169
- Severity is INFERRED from user's natural language, never asked.
170
-
171
- | User describes | Infer |
172
- |----------------|-------|
173
- | Crash, error, exception, fails completely, unusable | blocker |
174
- | Doesn't work, nothing happens, wrong behavior, missing | major |
175
- | Works but..., slow, weird, minor, small issue | minor |
176
- | Color, font, spacing, alignment, visual, looks off | cosmetic |
177
-
178
- Default: **major** (safe default, user can clarify if wrong)
179
-
180
- </severity_guide>
181
-
182
- <good_example>
183
- ```markdown
184
- ---
185
- status: diagnosed
186
- phase: 04-comments
187
- source: 04-01-SUMMARY.md, 04-02-SUMMARY.md
188
- started: 2025-01-15T10:30:00Z
189
- updated: 2025-01-15T10:45:00Z
190
- ---
191
-
192
- ## Current Test
193
-
194
- [testing complete]
195
-
196
- ## Tests
197
-
198
- ### 1. View Comments on Post
199
- expected: Comments section expands, shows count and comment list
200
- result: pass
201
-
202
- ### 2. Create Top-Level Comment
203
- expected: Submit comment via rich text editor, appears in list with author info
204
- result: issue
205
- reported: "works but doesn't show until I refresh the page"
206
- severity: major
207
-
208
- ### 3. Reply to a Comment
209
- expected: Click Reply, inline composer appears, submit shows nested reply
210
- result: pass
211
-
212
- ### 4. Visual Nesting
213
- expected: 3+ level thread shows indentation, left borders, caps at reasonable depth
214
- result: pass
215
-
216
- ### 5. Delete Own Comment
217
- expected: Click delete on own comment, removed or shows [deleted] if has replies
218
- result: pass
219
-
220
- ### 6. Comment Count
221
- expected: Post shows accurate count, increments when adding comment
222
- result: pass
223
-
224
- ## Summary
225
-
226
- total: 6
227
- passed: 5
228
- issues: 1
229
- pending: 0
230
- skipped: 0
231
-
232
- ## Gaps
233
-
234
- - truth: "Comment appears immediately after submission in list"
235
- status: failed
236
- reason: "User reported: works but doesn't show until I refresh the page"
237
- severity: major
238
- test: 2
239
- root_cause: "useEffect in CommentList.tsx missing commentCount dependency"
240
- artifacts:
241
- - path: "src/components/CommentList.tsx"
242
- issue: "useEffect missing dependency"
243
- missing:
244
- - "Add commentCount to useEffect dependency array"
245
- debug_session: ".planning/debug/comment-not-refreshing.md"
246
- ```
247
- </good_example>
@@ -1,91 +0,0 @@
1
- # Debug Subagent Prompt Template
2
-
3
- Template for spawning cook-debugger agent. The agent contains all debugging expertise - this template provides problem context only.
4
-
5
- ---
6
-
7
- ## Template
8
-
9
- ```markdown
10
- <objective>
11
- Investigate issue: {issue_id}
12
-
13
- **Summary:** {issue_summary}
14
- </objective>
15
-
16
- <symptoms>
17
- expected: {expected}
18
- actual: {actual}
19
- errors: {errors}
20
- reproduction: {reproduction}
21
- timeline: {timeline}
22
- </symptoms>
23
-
24
- <mode>
25
- symptoms_prefilled: {true_or_false}
26
- goal: {find_root_cause_only | find_and_fix}
27
- </mode>
28
-
29
- <debug_file>
30
- Create: .planning/debug/{slug}.md
31
- </debug_file>
32
- ```
33
-
34
- ---
35
-
36
- ## Placeholders
37
-
38
- | Placeholder | Source | Example |
39
- |-------------|--------|---------|
40
- | `{issue_id}` | Orchestrator-assigned | `auth-screen-dark` |
41
- | `{issue_summary}` | User description | `Auth screen is too dark` |
42
- | `{expected}` | From symptoms | `See logo clearly` |
43
- | `{actual}` | From symptoms | `Screen is dark` |
44
- | `{errors}` | From symptoms | `None in console` |
45
- | `{reproduction}` | From symptoms | `Open /auth page` |
46
- | `{timeline}` | From symptoms | `After recent deploy` |
47
- | `{goal}` | Orchestrator sets | `find_and_fix` |
48
- | `{slug}` | Generated | `auth-screen-dark` |
49
-
50
- ---
51
-
52
- ## Usage
53
-
54
- **From /cook:debug:**
55
- ```python
56
- Task(
57
- prompt=filled_template,
58
- subagent_type="cook-debugger",
59
- description="Debug {slug}"
60
- )
61
- ```
62
-
63
- **From diagnose-issues (UAT):**
64
- ```python
65
- Task(prompt=template, subagent_type="cook-debugger", description="Debug UAT-001")
66
- ```
67
-
68
- ---
69
-
70
- ## Continuation
71
-
72
- For checkpoints, spawn fresh agent with:
73
-
74
- ```markdown
75
- <objective>
76
- Continue debugging {slug}. Evidence is in the debug file.
77
- </objective>
78
-
79
- <prior_state>
80
- Debug file: @.planning/debug/{slug}.md
81
- </prior_state>
82
-
83
- <checkpoint_response>
84
- **Type:** {checkpoint_type}
85
- **Response:** {user_response}
86
- </checkpoint_response>
87
-
88
- <mode>
89
- goal: {goal}
90
- </mode>
91
- ```