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.
- package/agents/cook-pm.md +140 -59
- package/commands/cook/help.md +110 -417
- package/commands/cook/pm-start.md +86 -117
- package/cook/workflows/pm-check.md +9 -8
- package/cook/workflows/pm-cycle.md +87 -21
- package/package.json +1 -1
- package/scripts/pm-loop.sh +30 -10
- package/agents/cook-debugger.md +0 -1203
- package/agents/cook-executor.md +0 -784
- package/agents/cook-integration-checker.md +0 -423
- package/agents/cook-phase-researcher.md +0 -641
- package/agents/cook-verifier.md +0 -778
- package/commands/cook/add-todo.md +0 -193
- package/commands/cook/audit-milestone.md +0 -277
- package/commands/cook/check-todos.md +0 -228
- package/commands/cook/debug.md +0 -169
- package/commands/cook/discuss-phase.md +0 -86
- package/commands/cook/execute-phase.md +0 -339
- package/commands/cook/list-phase-assumptions.md +0 -50
- package/commands/cook/pause-work.md +0 -134
- package/commands/cook/plan-milestone-gaps.md +0 -295
- package/commands/cook/quick.md +0 -309
- package/commands/cook/research-phase.md +0 -200
- package/commands/cook/resume-work.md +0 -40
- package/commands/cook/verify-work.md +0 -219
- package/cook/references/checkpoints.md +0 -1078
- package/cook/references/tdd.md +0 -263
- package/cook/references/verification-patterns.md +0 -612
- package/cook/templates/DEBUG.md +0 -159
- package/cook/templates/UAT.md +0 -247
- package/cook/templates/debug-subagent-prompt.md +0 -91
- package/cook/templates/verification-report.md +0 -322
- package/cook/workflows/diagnose-issues.md +0 -231
- package/cook/workflows/discuss-phase.md +0 -433
- package/cook/workflows/execute-phase.md +0 -671
- package/cook/workflows/execute-plan.md +0 -1844
- package/cook/workflows/list-phase-assumptions.md +0 -178
- package/cook/workflows/verify-phase.md +0 -628
- package/cook/workflows/verify-work.md +0 -596
|
@@ -1,193 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: cook:add-todo
|
|
3
|
-
description: Capture idea or task as todo from current conversation context
|
|
4
|
-
argument-hint: [optional description]
|
|
5
|
-
allowed-tools:
|
|
6
|
-
- Read
|
|
7
|
-
- Write
|
|
8
|
-
- Bash
|
|
9
|
-
- Glob
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
<objective>
|
|
13
|
-
Capture an idea, task, or issue that surfaces during a COOK session as a structured todo for later work.
|
|
14
|
-
|
|
15
|
-
Enables "thought → capture → continue" flow without losing context or derailing current work.
|
|
16
|
-
</objective>
|
|
17
|
-
|
|
18
|
-
<context>
|
|
19
|
-
@.planning/STATE.md
|
|
20
|
-
</context>
|
|
21
|
-
|
|
22
|
-
<process>
|
|
23
|
-
|
|
24
|
-
<step name="ensure_directory">
|
|
25
|
-
```bash
|
|
26
|
-
mkdir -p .planning/todos/pending .planning/todos/done
|
|
27
|
-
```
|
|
28
|
-
</step>
|
|
29
|
-
|
|
30
|
-
<step name="check_existing_areas">
|
|
31
|
-
```bash
|
|
32
|
-
ls .planning/todos/pending/*.md 2>/dev/null | xargs -I {} grep "^area:" {} 2>/dev/null | cut -d' ' -f2 | sort -u
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
Note existing areas for consistency in infer_area step.
|
|
36
|
-
</step>
|
|
37
|
-
|
|
38
|
-
<step name="extract_content">
|
|
39
|
-
**With arguments:** Use as the title/focus.
|
|
40
|
-
- `/cook:add-todo Add auth token refresh` → title = "Add auth token refresh"
|
|
41
|
-
|
|
42
|
-
**Without arguments:** Analyze recent conversation to extract:
|
|
43
|
-
- The specific problem, idea, or task discussed
|
|
44
|
-
- Relevant file paths mentioned
|
|
45
|
-
- Technical details (error messages, line numbers, constraints)
|
|
46
|
-
|
|
47
|
-
Formulate:
|
|
48
|
-
- `title`: 3-10 word descriptive title (action verb preferred)
|
|
49
|
-
- `problem`: What's wrong or why this is needed
|
|
50
|
-
- `solution`: Approach hints or "TBD" if just an idea
|
|
51
|
-
- `files`: Relevant paths with line numbers from conversation
|
|
52
|
-
</step>
|
|
53
|
-
|
|
54
|
-
<step name="infer_area">
|
|
55
|
-
Infer area from file paths:
|
|
56
|
-
|
|
57
|
-
| Path pattern | Area |
|
|
58
|
-
|--------------|------|
|
|
59
|
-
| `src/api/*`, `api/*` | `api` |
|
|
60
|
-
| `src/components/*`, `src/ui/*` | `ui` |
|
|
61
|
-
| `src/auth/*`, `auth/*` | `auth` |
|
|
62
|
-
| `src/db/*`, `database/*` | `database` |
|
|
63
|
-
| `tests/*`, `__tests__/*` | `testing` |
|
|
64
|
-
| `docs/*` | `docs` |
|
|
65
|
-
| `.planning/*` | `planning` |
|
|
66
|
-
| `scripts/*`, `bin/*` | `tooling` |
|
|
67
|
-
| No files or unclear | `general` |
|
|
68
|
-
|
|
69
|
-
Use existing area from step 2 if similar match exists.
|
|
70
|
-
</step>
|
|
71
|
-
|
|
72
|
-
<step name="check_duplicates">
|
|
73
|
-
```bash
|
|
74
|
-
grep -l -i "[key words from title]" .planning/todos/pending/*.md 2>/dev/null
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
If potential duplicate found:
|
|
78
|
-
1. Read the existing todo
|
|
79
|
-
2. Compare scope
|
|
80
|
-
|
|
81
|
-
If overlapping, use AskUserQuestion:
|
|
82
|
-
- header: "Duplicate?"
|
|
83
|
-
- question: "Similar todo exists: [title]. What would you like to do?"
|
|
84
|
-
- options:
|
|
85
|
-
- "Skip" — keep existing todo
|
|
86
|
-
- "Replace" — update existing with new context
|
|
87
|
-
- "Add anyway" — create as separate todo
|
|
88
|
-
</step>
|
|
89
|
-
|
|
90
|
-
<step name="create_file">
|
|
91
|
-
```bash
|
|
92
|
-
timestamp=$(date "+%Y-%m-%dT%H:%M")
|
|
93
|
-
date_prefix=$(date "+%Y-%m-%d")
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
Generate slug from title (lowercase, hyphens, no special chars).
|
|
97
|
-
|
|
98
|
-
Write to `.planning/todos/pending/${date_prefix}-${slug}.md`:
|
|
99
|
-
|
|
100
|
-
```markdown
|
|
101
|
-
---
|
|
102
|
-
created: [timestamp]
|
|
103
|
-
title: [title]
|
|
104
|
-
area: [area]
|
|
105
|
-
files:
|
|
106
|
-
- [file:lines]
|
|
107
|
-
---
|
|
108
|
-
|
|
109
|
-
## Problem
|
|
110
|
-
|
|
111
|
-
[problem description - enough context for future Claude to understand weeks later]
|
|
112
|
-
|
|
113
|
-
## Solution
|
|
114
|
-
|
|
115
|
-
[approach hints or "TBD"]
|
|
116
|
-
```
|
|
117
|
-
</step>
|
|
118
|
-
|
|
119
|
-
<step name="update_state">
|
|
120
|
-
If `.planning/STATE.md` exists:
|
|
121
|
-
|
|
122
|
-
1. Count todos: `ls .planning/todos/pending/*.md 2>/dev/null | wc -l`
|
|
123
|
-
2. Update "### Pending Todos" under "## Accumulated Context"
|
|
124
|
-
</step>
|
|
125
|
-
|
|
126
|
-
<step name="git_commit">
|
|
127
|
-
Commit the todo and any updated state:
|
|
128
|
-
|
|
129
|
-
**Check planning config:**
|
|
130
|
-
|
|
131
|
-
```bash
|
|
132
|
-
COMMIT_PLANNING_DOCS=$(cat .planning/config.json 2>/dev/null | grep -o '"commit_docs"[[:space:]]*:[[:space:]]*[^,}]*' | grep -o 'true\|false' || echo "true")
|
|
133
|
-
git check-ignore -q .planning 2>/dev/null && COMMIT_PLANNING_DOCS=false
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
**If `COMMIT_PLANNING_DOCS=false`:** Skip git operations, log "Todo saved (not committed - commit_docs: false)"
|
|
137
|
-
|
|
138
|
-
**If `COMMIT_PLANNING_DOCS=true` (default):**
|
|
139
|
-
|
|
140
|
-
```bash
|
|
141
|
-
git add .planning/todos/pending/[filename]
|
|
142
|
-
[ -f .planning/STATE.md ] && git add .planning/STATE.md
|
|
143
|
-
git commit -m "$(cat <<'EOF'
|
|
144
|
-
docs: capture todo - [title]
|
|
145
|
-
|
|
146
|
-
Area: [area]
|
|
147
|
-
EOF
|
|
148
|
-
)"
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
Confirm: "Committed: docs: capture todo - [title]"
|
|
152
|
-
</step>
|
|
153
|
-
|
|
154
|
-
<step name="confirm">
|
|
155
|
-
```
|
|
156
|
-
Todo saved: .planning/todos/pending/[filename]
|
|
157
|
-
|
|
158
|
-
[title]
|
|
159
|
-
Area: [area]
|
|
160
|
-
Files: [count] referenced
|
|
161
|
-
|
|
162
|
-
---
|
|
163
|
-
|
|
164
|
-
Would you like to:
|
|
165
|
-
|
|
166
|
-
1. Continue with current work
|
|
167
|
-
2. Add another todo
|
|
168
|
-
3. View all todos (/cook:check-todos)
|
|
169
|
-
```
|
|
170
|
-
</step>
|
|
171
|
-
|
|
172
|
-
</process>
|
|
173
|
-
|
|
174
|
-
<output>
|
|
175
|
-
- `.planning/todos/pending/[date]-[slug].md`
|
|
176
|
-
- Updated `.planning/STATE.md` (if exists)
|
|
177
|
-
</output>
|
|
178
|
-
|
|
179
|
-
<anti_patterns>
|
|
180
|
-
- Don't create todos for work in current plan (that's deviation rule territory)
|
|
181
|
-
- Don't create elaborate solution sections — captures ideas, not plans
|
|
182
|
-
- Don't block on missing information — "TBD" is fine
|
|
183
|
-
</anti_patterns>
|
|
184
|
-
|
|
185
|
-
<success_criteria>
|
|
186
|
-
- [ ] Directory structure exists
|
|
187
|
-
- [ ] Todo file created with valid frontmatter
|
|
188
|
-
- [ ] Problem section has enough context for future Claude
|
|
189
|
-
- [ ] No duplicates (checked and resolved)
|
|
190
|
-
- [ ] Area consistent with existing todos
|
|
191
|
-
- [ ] STATE.md updated if exists
|
|
192
|
-
- [ ] Todo and state committed to git
|
|
193
|
-
</success_criteria>
|
|
@@ -1,277 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: cook:audit-milestone
|
|
3
|
-
description: Audit milestone completion against original intent before archiving
|
|
4
|
-
argument-hint: "[version]"
|
|
5
|
-
allowed-tools:
|
|
6
|
-
- Read
|
|
7
|
-
- Glob
|
|
8
|
-
- Grep
|
|
9
|
-
- Bash
|
|
10
|
-
- Task
|
|
11
|
-
- Write
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
<objective>
|
|
15
|
-
Verify milestone achieved its definition of done. Check requirements coverage, cross-phase integration, and end-to-end flows.
|
|
16
|
-
|
|
17
|
-
**This command IS the orchestrator.** Reads existing VERIFICATION.md files (phases already verified during execute-phase), aggregates tech debt and deferred gaps, then spawns integration checker for cross-phase wiring.
|
|
18
|
-
</objective>
|
|
19
|
-
|
|
20
|
-
<execution_context>
|
|
21
|
-
<!-- Spawns cook-integration-checker agent which has all audit expertise baked in -->
|
|
22
|
-
</execution_context>
|
|
23
|
-
|
|
24
|
-
<context>
|
|
25
|
-
Version: $ARGUMENTS (optional — defaults to current milestone)
|
|
26
|
-
|
|
27
|
-
**Original Intent:**
|
|
28
|
-
@.planning/PROJECT.md
|
|
29
|
-
@.planning/REQUIREMENTS.md
|
|
30
|
-
|
|
31
|
-
**Planned Work:**
|
|
32
|
-
@.planning/ROADMAP.md
|
|
33
|
-
@.planning/config.json (if exists)
|
|
34
|
-
|
|
35
|
-
**Completed Work:**
|
|
36
|
-
Glob: .planning/phases/*/*-SUMMARY.md
|
|
37
|
-
Glob: .planning/phases/*/*-VERIFICATION.md
|
|
38
|
-
</context>
|
|
39
|
-
|
|
40
|
-
<process>
|
|
41
|
-
|
|
42
|
-
## 0. Resolve Model Profile
|
|
43
|
-
|
|
44
|
-
Read model profile for agent spawning:
|
|
45
|
-
|
|
46
|
-
```bash
|
|
47
|
-
MODEL_PROFILE=$(cat .planning/config.json 2>/dev/null | grep -o '"model_profile"[[:space:]]*:[[:space:]]*"[^"]*"' | grep -o '"[^"]*"$' | tr -d '"' || echo "balanced")
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
Default to "balanced" if not set.
|
|
51
|
-
|
|
52
|
-
**Model lookup table:**
|
|
53
|
-
|
|
54
|
-
| Agent | quality | balanced | budget |
|
|
55
|
-
|-------|---------|----------|--------|
|
|
56
|
-
| cook-integration-checker | sonnet | sonnet | haiku |
|
|
57
|
-
|
|
58
|
-
Store resolved model for use in Task call below.
|
|
59
|
-
|
|
60
|
-
## 1. Determine Milestone Scope
|
|
61
|
-
|
|
62
|
-
```bash
|
|
63
|
-
# Get phases in milestone
|
|
64
|
-
ls -d .planning/phases/*/ | sort -V
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
- Parse version from arguments or detect current from ROADMAP.md
|
|
68
|
-
- Identify all phase directories in scope
|
|
69
|
-
- Extract milestone definition of done from ROADMAP.md
|
|
70
|
-
- Extract requirements mapped to this milestone from REQUIREMENTS.md
|
|
71
|
-
|
|
72
|
-
## 2. Read All Phase Verifications
|
|
73
|
-
|
|
74
|
-
For each phase directory, read the VERIFICATION.md:
|
|
75
|
-
|
|
76
|
-
```bash
|
|
77
|
-
cat .planning/phases/01-*/*-VERIFICATION.md
|
|
78
|
-
cat .planning/phases/02-*/*-VERIFICATION.md
|
|
79
|
-
# etc.
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
From each VERIFICATION.md, extract:
|
|
83
|
-
- **Status:** passed | gaps_found
|
|
84
|
-
- **Critical gaps:** (if any — these are blockers)
|
|
85
|
-
- **Non-critical gaps:** tech debt, deferred items, warnings
|
|
86
|
-
- **Anti-patterns found:** TODOs, stubs, placeholders
|
|
87
|
-
- **Requirements coverage:** which requirements satisfied/blocked
|
|
88
|
-
|
|
89
|
-
If a phase is missing VERIFICATION.md, flag it as "unverified phase" — this is a blocker.
|
|
90
|
-
|
|
91
|
-
## 3. Spawn Integration Checker
|
|
92
|
-
|
|
93
|
-
With phase context collected:
|
|
94
|
-
|
|
95
|
-
```
|
|
96
|
-
Task(
|
|
97
|
-
prompt="Check cross-phase integration and E2E flows.
|
|
98
|
-
|
|
99
|
-
Phases: {phase_dirs}
|
|
100
|
-
Phase exports: {from SUMMARYs}
|
|
101
|
-
API routes: {routes created}
|
|
102
|
-
|
|
103
|
-
Verify cross-phase wiring and E2E user flows.",
|
|
104
|
-
subagent_type="cook-integration-checker",
|
|
105
|
-
model="{integration_checker_model}"
|
|
106
|
-
)
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
## 4. Collect Results
|
|
110
|
-
|
|
111
|
-
Combine:
|
|
112
|
-
- Phase-level gaps and tech debt (from step 2)
|
|
113
|
-
- Integration checker's report (wiring gaps, broken flows)
|
|
114
|
-
|
|
115
|
-
## 5. Check Requirements Coverage
|
|
116
|
-
|
|
117
|
-
For each requirement in REQUIREMENTS.md mapped to this milestone:
|
|
118
|
-
- Find owning phase
|
|
119
|
-
- Check phase verification status
|
|
120
|
-
- Determine: satisfied | partial | unsatisfied
|
|
121
|
-
|
|
122
|
-
## 6. Aggregate into v{version}-MILESTONE-AUDIT.md
|
|
123
|
-
|
|
124
|
-
Create `.planning/v{version}-v{version}-MILESTONE-AUDIT.md` with:
|
|
125
|
-
|
|
126
|
-
```yaml
|
|
127
|
-
---
|
|
128
|
-
milestone: {version}
|
|
129
|
-
audited: {timestamp}
|
|
130
|
-
status: passed | gaps_found | tech_debt
|
|
131
|
-
scores:
|
|
132
|
-
requirements: N/M
|
|
133
|
-
phases: N/M
|
|
134
|
-
integration: N/M
|
|
135
|
-
flows: N/M
|
|
136
|
-
gaps: # Critical blockers
|
|
137
|
-
requirements: [...]
|
|
138
|
-
integration: [...]
|
|
139
|
-
flows: [...]
|
|
140
|
-
tech_debt: # Non-critical, deferred
|
|
141
|
-
- phase: 01-auth
|
|
142
|
-
items:
|
|
143
|
-
- "TODO: add rate limiting"
|
|
144
|
-
- "Warning: no password strength validation"
|
|
145
|
-
- phase: 03-dashboard
|
|
146
|
-
items:
|
|
147
|
-
- "Deferred: mobile responsive layout"
|
|
148
|
-
---
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
Plus full markdown report with tables for requirements, phases, integration, tech debt.
|
|
152
|
-
|
|
153
|
-
**Status values:**
|
|
154
|
-
- `passed` — all requirements met, no critical gaps, minimal tech debt
|
|
155
|
-
- `gaps_found` — critical blockers exist
|
|
156
|
-
- `tech_debt` — no blockers but accumulated deferred items need review
|
|
157
|
-
|
|
158
|
-
## 7. Present Results
|
|
159
|
-
|
|
160
|
-
Route by status (see `<offer_next>`).
|
|
161
|
-
|
|
162
|
-
</process>
|
|
163
|
-
|
|
164
|
-
<offer_next>
|
|
165
|
-
Output this markdown directly (not as a code block). Route based on status:
|
|
166
|
-
|
|
167
|
-
---
|
|
168
|
-
|
|
169
|
-
**If passed:**
|
|
170
|
-
|
|
171
|
-
## ✓ Milestone {version} — Audit Passed
|
|
172
|
-
|
|
173
|
-
**Score:** {N}/{M} requirements satisfied
|
|
174
|
-
**Report:** .planning/v{version}-MILESTONE-AUDIT.md
|
|
175
|
-
|
|
176
|
-
All requirements covered. Cross-phase integration verified. E2E flows complete.
|
|
177
|
-
|
|
178
|
-
───────────────────────────────────────────────────────────────
|
|
179
|
-
|
|
180
|
-
## ▶ Next Up
|
|
181
|
-
|
|
182
|
-
**Complete milestone** — archive and tag
|
|
183
|
-
|
|
184
|
-
/cook:complete-milestone {version}
|
|
185
|
-
|
|
186
|
-
<sub>/clear first → fresh context window</sub>
|
|
187
|
-
|
|
188
|
-
───────────────────────────────────────────────────────────────
|
|
189
|
-
|
|
190
|
-
---
|
|
191
|
-
|
|
192
|
-
**If gaps_found:**
|
|
193
|
-
|
|
194
|
-
## ⚠ Milestone {version} — Gaps Found
|
|
195
|
-
|
|
196
|
-
**Score:** {N}/{M} requirements satisfied
|
|
197
|
-
**Report:** .planning/v{version}-MILESTONE-AUDIT.md
|
|
198
|
-
|
|
199
|
-
### Unsatisfied Requirements
|
|
200
|
-
|
|
201
|
-
{For each unsatisfied requirement:}
|
|
202
|
-
- **{REQ-ID}: {description}** (Phase {X})
|
|
203
|
-
- {reason}
|
|
204
|
-
|
|
205
|
-
### Cross-Phase Issues
|
|
206
|
-
|
|
207
|
-
{For each integration gap:}
|
|
208
|
-
- **{from} → {to}:** {issue}
|
|
209
|
-
|
|
210
|
-
### Broken Flows
|
|
211
|
-
|
|
212
|
-
{For each flow gap:}
|
|
213
|
-
- **{flow name}:** breaks at {step}
|
|
214
|
-
|
|
215
|
-
───────────────────────────────────────────────────────────────
|
|
216
|
-
|
|
217
|
-
## ▶ Next Up
|
|
218
|
-
|
|
219
|
-
**Plan gap closure** — create phases to complete milestone
|
|
220
|
-
|
|
221
|
-
/cook:plan-milestone-gaps
|
|
222
|
-
|
|
223
|
-
<sub>/clear first → fresh context window</sub>
|
|
224
|
-
|
|
225
|
-
───────────────────────────────────────────────────────────────
|
|
226
|
-
|
|
227
|
-
**Also available:**
|
|
228
|
-
- cat .planning/v{version}-MILESTONE-AUDIT.md — see full report
|
|
229
|
-
- /cook:complete-milestone {version} — proceed anyway (accept tech debt)
|
|
230
|
-
|
|
231
|
-
───────────────────────────────────────────────────────────────
|
|
232
|
-
|
|
233
|
-
---
|
|
234
|
-
|
|
235
|
-
**If tech_debt (no blockers but accumulated debt):**
|
|
236
|
-
|
|
237
|
-
## ⚡ Milestone {version} — Tech Debt Review
|
|
238
|
-
|
|
239
|
-
**Score:** {N}/{M} requirements satisfied
|
|
240
|
-
**Report:** .planning/v{version}-MILESTONE-AUDIT.md
|
|
241
|
-
|
|
242
|
-
All requirements met. No critical blockers. Accumulated tech debt needs review.
|
|
243
|
-
|
|
244
|
-
### Tech Debt by Phase
|
|
245
|
-
|
|
246
|
-
{For each phase with debt:}
|
|
247
|
-
**Phase {X}: {name}**
|
|
248
|
-
- {item 1}
|
|
249
|
-
- {item 2}
|
|
250
|
-
|
|
251
|
-
### Total: {N} items across {M} phases
|
|
252
|
-
|
|
253
|
-
───────────────────────────────────────────────────────────────
|
|
254
|
-
|
|
255
|
-
## ▶ Options
|
|
256
|
-
|
|
257
|
-
**A. Complete milestone** — accept debt, track in backlog
|
|
258
|
-
|
|
259
|
-
/cook:complete-milestone {version}
|
|
260
|
-
|
|
261
|
-
**B. Plan cleanup phase** — address debt before completing
|
|
262
|
-
|
|
263
|
-
/cook:plan-milestone-gaps
|
|
264
|
-
|
|
265
|
-
<sub>/clear first → fresh context window</sub>
|
|
266
|
-
|
|
267
|
-
───────────────────────────────────────────────────────────────
|
|
268
|
-
</offer_next>
|
|
269
|
-
|
|
270
|
-
<success_criteria>
|
|
271
|
-
- [ ] Milestone scope identified
|
|
272
|
-
- [ ] All phase VERIFICATION.md files read
|
|
273
|
-
- [ ] Tech debt and deferred gaps aggregated
|
|
274
|
-
- [ ] Integration checker spawned for cross-phase wiring
|
|
275
|
-
- [ ] v{version}-MILESTONE-AUDIT.md created
|
|
276
|
-
- [ ] Results presented with actionable next steps
|
|
277
|
-
</success_criteria>
|
|
@@ -1,228 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: cook:check-todos
|
|
3
|
-
description: List pending todos and select one to work on
|
|
4
|
-
argument-hint: [area filter]
|
|
5
|
-
allowed-tools:
|
|
6
|
-
- Read
|
|
7
|
-
- Write
|
|
8
|
-
- Bash
|
|
9
|
-
- Glob
|
|
10
|
-
- AskUserQuestion
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
<objective>
|
|
14
|
-
List all pending todos, allow selection, load full context for the selected todo, and route to appropriate action.
|
|
15
|
-
|
|
16
|
-
Enables reviewing captured ideas and deciding what to work on next.
|
|
17
|
-
</objective>
|
|
18
|
-
|
|
19
|
-
<context>
|
|
20
|
-
@.planning/STATE.md
|
|
21
|
-
@.planning/ROADMAP.md
|
|
22
|
-
</context>
|
|
23
|
-
|
|
24
|
-
<process>
|
|
25
|
-
|
|
26
|
-
<step name="check_exist">
|
|
27
|
-
```bash
|
|
28
|
-
TODO_COUNT=$(ls .planning/todos/pending/*.md 2>/dev/null | wc -l | tr -d ' ')
|
|
29
|
-
echo "Pending todos: $TODO_COUNT"
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
If count is 0:
|
|
33
|
-
```
|
|
34
|
-
No pending todos.
|
|
35
|
-
|
|
36
|
-
Todos are captured during work sessions with /cook:add-todo.
|
|
37
|
-
|
|
38
|
-
---
|
|
39
|
-
|
|
40
|
-
Would you like to:
|
|
41
|
-
|
|
42
|
-
1. Continue with current phase (/cook:progress)
|
|
43
|
-
2. Add a todo now (/cook:add-todo)
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
Exit.
|
|
47
|
-
</step>
|
|
48
|
-
|
|
49
|
-
<step name="parse_filter">
|
|
50
|
-
Check for area filter in arguments:
|
|
51
|
-
- `/cook:check-todos` → show all
|
|
52
|
-
- `/cook:check-todos api` → filter to area:api only
|
|
53
|
-
</step>
|
|
54
|
-
|
|
55
|
-
<step name="list_todos">
|
|
56
|
-
```bash
|
|
57
|
-
for file in .planning/todos/pending/*.md; do
|
|
58
|
-
created=$(grep "^created:" "$file" | cut -d' ' -f2)
|
|
59
|
-
title=$(grep "^title:" "$file" | cut -d':' -f2- | xargs)
|
|
60
|
-
area=$(grep "^area:" "$file" | cut -d' ' -f2)
|
|
61
|
-
echo "$created|$title|$area|$file"
|
|
62
|
-
done | sort
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
Apply area filter if specified. Display as numbered list:
|
|
66
|
-
|
|
67
|
-
```
|
|
68
|
-
Pending Todos:
|
|
69
|
-
|
|
70
|
-
1. Add auth token refresh (api, 2d ago)
|
|
71
|
-
2. Fix modal z-index issue (ui, 1d ago)
|
|
72
|
-
3. Refactor database connection pool (database, 5h ago)
|
|
73
|
-
|
|
74
|
-
---
|
|
75
|
-
|
|
76
|
-
Reply with a number to view details, or:
|
|
77
|
-
- `/cook:check-todos [area]` to filter by area
|
|
78
|
-
- `q` to exit
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
Format age as relative time.
|
|
82
|
-
</step>
|
|
83
|
-
|
|
84
|
-
<step name="handle_selection">
|
|
85
|
-
Wait for user to reply with a number.
|
|
86
|
-
|
|
87
|
-
If valid: load selected todo, proceed.
|
|
88
|
-
If invalid: "Invalid selection. Reply with a number (1-[N]) or `q` to exit."
|
|
89
|
-
</step>
|
|
90
|
-
|
|
91
|
-
<step name="load_context">
|
|
92
|
-
Read the todo file completely. Display:
|
|
93
|
-
|
|
94
|
-
```
|
|
95
|
-
## [title]
|
|
96
|
-
|
|
97
|
-
**Area:** [area]
|
|
98
|
-
**Created:** [date] ([relative time] ago)
|
|
99
|
-
**Files:** [list or "None"]
|
|
100
|
-
|
|
101
|
-
### Problem
|
|
102
|
-
[problem section content]
|
|
103
|
-
|
|
104
|
-
### Solution
|
|
105
|
-
[solution section content]
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
If `files` field has entries, read and briefly summarize each.
|
|
109
|
-
</step>
|
|
110
|
-
|
|
111
|
-
<step name="check_roadmap">
|
|
112
|
-
```bash
|
|
113
|
-
ls .planning/ROADMAP.md 2>/dev/null && echo "Roadmap exists"
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
If roadmap exists:
|
|
117
|
-
1. Check if todo's area matches an upcoming phase
|
|
118
|
-
2. Check if todo's files overlap with a phase's scope
|
|
119
|
-
3. Note any match for action options
|
|
120
|
-
</step>
|
|
121
|
-
|
|
122
|
-
<step name="offer_actions">
|
|
123
|
-
**If todo maps to a roadmap phase:**
|
|
124
|
-
|
|
125
|
-
Use AskUserQuestion:
|
|
126
|
-
- header: "Action"
|
|
127
|
-
- question: "This todo relates to Phase [N]: [name]. What would you like to do?"
|
|
128
|
-
- options:
|
|
129
|
-
- "Work on it now" — move to done, start working
|
|
130
|
-
- "Add to phase plan" — include when planning Phase [N]
|
|
131
|
-
- "Brainstorm approach" — think through before deciding
|
|
132
|
-
- "Put it back" — return to list
|
|
133
|
-
|
|
134
|
-
**If no roadmap match:**
|
|
135
|
-
|
|
136
|
-
Use AskUserQuestion:
|
|
137
|
-
- header: "Action"
|
|
138
|
-
- question: "What would you like to do with this todo?"
|
|
139
|
-
- options:
|
|
140
|
-
- "Work on it now" — move to done, start working
|
|
141
|
-
- "Create a phase" — /cook:add-phase with this scope
|
|
142
|
-
- "Brainstorm approach" — think through before deciding
|
|
143
|
-
- "Put it back" — return to list
|
|
144
|
-
</step>
|
|
145
|
-
|
|
146
|
-
<step name="execute_action">
|
|
147
|
-
**Work on it now:**
|
|
148
|
-
```bash
|
|
149
|
-
mv ".planning/todos/pending/[filename]" ".planning/todos/done/"
|
|
150
|
-
```
|
|
151
|
-
Update STATE.md todo count. Present problem/solution context. Begin work or ask how to proceed.
|
|
152
|
-
|
|
153
|
-
**Add to phase plan:**
|
|
154
|
-
Note todo reference in phase planning notes. Keep in pending. Return to list or exit.
|
|
155
|
-
|
|
156
|
-
**Create a phase:**
|
|
157
|
-
Display: `/cook:add-phase [description from todo]`
|
|
158
|
-
Keep in pending. User runs command in fresh context.
|
|
159
|
-
|
|
160
|
-
**Brainstorm approach:**
|
|
161
|
-
Keep in pending. Start discussion about problem and approaches.
|
|
162
|
-
|
|
163
|
-
**Put it back:**
|
|
164
|
-
Return to list_todos step.
|
|
165
|
-
</step>
|
|
166
|
-
|
|
167
|
-
<step name="update_state">
|
|
168
|
-
After any action that changes todo count:
|
|
169
|
-
|
|
170
|
-
```bash
|
|
171
|
-
ls .planning/todos/pending/*.md 2>/dev/null | wc -l
|
|
172
|
-
```
|
|
173
|
-
|
|
174
|
-
Update STATE.md "### Pending Todos" section if exists.
|
|
175
|
-
</step>
|
|
176
|
-
|
|
177
|
-
<step name="git_commit">
|
|
178
|
-
If todo was moved to done/, commit the change:
|
|
179
|
-
|
|
180
|
-
**Check planning config:**
|
|
181
|
-
|
|
182
|
-
```bash
|
|
183
|
-
COMMIT_PLANNING_DOCS=$(cat .planning/config.json 2>/dev/null | grep -o '"commit_docs"[[:space:]]*:[[:space:]]*[^,}]*' | grep -o 'true\|false' || echo "true")
|
|
184
|
-
git check-ignore -q .planning 2>/dev/null && COMMIT_PLANNING_DOCS=false
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
**If `COMMIT_PLANNING_DOCS=false`:** Skip git operations, log "Todo moved (not committed - commit_docs: false)"
|
|
188
|
-
|
|
189
|
-
**If `COMMIT_PLANNING_DOCS=true` (default):**
|
|
190
|
-
|
|
191
|
-
```bash
|
|
192
|
-
git add .planning/todos/done/[filename]
|
|
193
|
-
git rm --cached .planning/todos/pending/[filename] 2>/dev/null || true
|
|
194
|
-
[ -f .planning/STATE.md ] && git add .planning/STATE.md
|
|
195
|
-
git commit -m "$(cat <<'EOF'
|
|
196
|
-
docs: start work on todo - [title]
|
|
197
|
-
|
|
198
|
-
Moved to done/, beginning implementation.
|
|
199
|
-
EOF
|
|
200
|
-
)"
|
|
201
|
-
```
|
|
202
|
-
|
|
203
|
-
Confirm: "Committed: docs: start work on todo - [title]"
|
|
204
|
-
</step>
|
|
205
|
-
|
|
206
|
-
</process>
|
|
207
|
-
|
|
208
|
-
<output>
|
|
209
|
-
- Moved todo to `.planning/todos/done/` (if "Work on it now")
|
|
210
|
-
- Updated `.planning/STATE.md` (if todo count changed)
|
|
211
|
-
</output>
|
|
212
|
-
|
|
213
|
-
<anti_patterns>
|
|
214
|
-
- Don't delete todos — move to done/ when work begins
|
|
215
|
-
- Don't start work without moving to done/ first
|
|
216
|
-
- Don't create plans from this command — route to /cook:plan-phase or /cook:add-phase
|
|
217
|
-
</anti_patterns>
|
|
218
|
-
|
|
219
|
-
<success_criteria>
|
|
220
|
-
- [ ] All pending todos listed with title, area, age
|
|
221
|
-
- [ ] Area filter applied if specified
|
|
222
|
-
- [ ] Selected todo's full context loaded
|
|
223
|
-
- [ ] Roadmap context checked for phase match
|
|
224
|
-
- [ ] Appropriate actions offered
|
|
225
|
-
- [ ] Selected action executed
|
|
226
|
-
- [ ] STATE.md updated if todo count changed
|
|
227
|
-
- [ ] Changes committed to git (if todo moved to done/)
|
|
228
|
-
</success_criteria>
|