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
package/commands/cook/quick.md
DELETED
|
@@ -1,309 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: cook:quick
|
|
3
|
-
description: Execute a quick task with COOK guarantees (atomic commits, state tracking) but skip optional agents
|
|
4
|
-
argument-hint: ""
|
|
5
|
-
allowed-tools:
|
|
6
|
-
- Read
|
|
7
|
-
- Write
|
|
8
|
-
- Edit
|
|
9
|
-
- Glob
|
|
10
|
-
- Grep
|
|
11
|
-
- Bash
|
|
12
|
-
- Task
|
|
13
|
-
- AskUserQuestion
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
<objective>
|
|
17
|
-
Execute small, ad-hoc tasks with COOK guarantees (atomic commits, STATE.md tracking) while skipping optional agents (research, plan-checker, verifier).
|
|
18
|
-
|
|
19
|
-
Quick mode is the same system with a shorter path:
|
|
20
|
-
- Spawns cook-planner (quick mode) + cook-executor(s)
|
|
21
|
-
- Skips cook-phase-researcher, cook-plan-checker, cook-verifier
|
|
22
|
-
- Quick tasks live in `.planning/quick/` separate from planned phases
|
|
23
|
-
- Updates STATE.md "Quick Tasks Completed" table (NOT ROADMAP.md)
|
|
24
|
-
|
|
25
|
-
Use when: You know exactly what to do and the task is small enough to not need research or verification.
|
|
26
|
-
</objective>
|
|
27
|
-
|
|
28
|
-
<execution_context>
|
|
29
|
-
Orchestration is inline - no separate workflow file. Quick mode is deliberately simpler than full COOK.
|
|
30
|
-
</execution_context>
|
|
31
|
-
|
|
32
|
-
<context>
|
|
33
|
-
@.planning/STATE.md
|
|
34
|
-
</context>
|
|
35
|
-
|
|
36
|
-
<process>
|
|
37
|
-
**Step 0: Resolve Model Profile**
|
|
38
|
-
|
|
39
|
-
Read model profile for agent spawning:
|
|
40
|
-
|
|
41
|
-
```bash
|
|
42
|
-
MODEL_PROFILE=$(cat .planning/config.json 2>/dev/null | grep -o '"model_profile"[[:space:]]*:[[:space:]]*"[^"]*"' | grep -o '"[^"]*"$' | tr -d '"' || echo "balanced")
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
Default to "balanced" if not set.
|
|
46
|
-
|
|
47
|
-
**Model lookup table:**
|
|
48
|
-
|
|
49
|
-
| Agent | quality | balanced | budget |
|
|
50
|
-
|-------|---------|----------|--------|
|
|
51
|
-
| cook-planner | opus | opus | sonnet |
|
|
52
|
-
| cook-executor | opus | sonnet | sonnet |
|
|
53
|
-
|
|
54
|
-
Store resolved models for use in Task calls below.
|
|
55
|
-
|
|
56
|
-
---
|
|
57
|
-
|
|
58
|
-
**Step 1: Pre-flight validation**
|
|
59
|
-
|
|
60
|
-
Check that an active COOK project exists:
|
|
61
|
-
|
|
62
|
-
```bash
|
|
63
|
-
if [ ! -f .planning/ROADMAP.md ]; then
|
|
64
|
-
echo "Quick mode requires an active project with ROADMAP.md."
|
|
65
|
-
echo "Run /cook:new-project first."
|
|
66
|
-
exit 1
|
|
67
|
-
fi
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
If validation fails, stop immediately with the error message.
|
|
71
|
-
|
|
72
|
-
Quick tasks can run mid-phase - validation only checks ROADMAP.md exists, not phase status.
|
|
73
|
-
|
|
74
|
-
---
|
|
75
|
-
|
|
76
|
-
**Step 2: Get task description**
|
|
77
|
-
|
|
78
|
-
Prompt user interactively for the task description:
|
|
79
|
-
|
|
80
|
-
```
|
|
81
|
-
AskUserQuestion(
|
|
82
|
-
header: "Quick Task",
|
|
83
|
-
question: "What do you want to do?",
|
|
84
|
-
followUp: null
|
|
85
|
-
)
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
Store response as `$DESCRIPTION`.
|
|
89
|
-
|
|
90
|
-
If empty, re-prompt: "Please provide a task description."
|
|
91
|
-
|
|
92
|
-
Generate slug from description:
|
|
93
|
-
```bash
|
|
94
|
-
slug=$(echo "$DESCRIPTION" | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9]/-/g' | sed 's/--*/-/g' | sed 's/^-//;s/-$//' | cut -c1-40)
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
---
|
|
98
|
-
|
|
99
|
-
**Step 3: Calculate next quick task number**
|
|
100
|
-
|
|
101
|
-
Ensure `.planning/quick/` directory exists and find the next sequential number:
|
|
102
|
-
|
|
103
|
-
```bash
|
|
104
|
-
# Ensure .planning/quick/ exists
|
|
105
|
-
mkdir -p .planning/quick
|
|
106
|
-
|
|
107
|
-
# Find highest existing number and increment
|
|
108
|
-
last=$(ls -1d .planning/quick/[0-9][0-9][0-9]-* 2>/dev/null | sort -r | head -1 | xargs -I{} basename {} | grep -oE '^[0-9]+')
|
|
109
|
-
|
|
110
|
-
if [ -z "$last" ]; then
|
|
111
|
-
next_num="001"
|
|
112
|
-
else
|
|
113
|
-
next_num=$(printf "%03d" $((10#$last + 1)))
|
|
114
|
-
fi
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
---
|
|
118
|
-
|
|
119
|
-
**Step 4: Create quick task directory**
|
|
120
|
-
|
|
121
|
-
Create the directory for this quick task:
|
|
122
|
-
|
|
123
|
-
```bash
|
|
124
|
-
QUICK_DIR=".planning/quick/${next_num}-${slug}"
|
|
125
|
-
mkdir -p "$QUICK_DIR"
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
Report to user:
|
|
129
|
-
```
|
|
130
|
-
Creating quick task ${next_num}: ${DESCRIPTION}
|
|
131
|
-
Directory: ${QUICK_DIR}
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
Store `$QUICK_DIR` for use in orchestration.
|
|
135
|
-
|
|
136
|
-
---
|
|
137
|
-
|
|
138
|
-
**Step 5: Spawn planner (quick mode)**
|
|
139
|
-
|
|
140
|
-
Spawn cook-planner with quick mode context:
|
|
141
|
-
|
|
142
|
-
```
|
|
143
|
-
Task(
|
|
144
|
-
prompt="
|
|
145
|
-
<planning_context>
|
|
146
|
-
|
|
147
|
-
**Mode:** quick
|
|
148
|
-
**Directory:** ${QUICK_DIR}
|
|
149
|
-
**Description:** ${DESCRIPTION}
|
|
150
|
-
|
|
151
|
-
**Project State:**
|
|
152
|
-
@.planning/STATE.md
|
|
153
|
-
|
|
154
|
-
</planning_context>
|
|
155
|
-
|
|
156
|
-
<constraints>
|
|
157
|
-
- Create a SINGLE plan with 1-3 focused tasks
|
|
158
|
-
- Quick tasks should be atomic and self-contained
|
|
159
|
-
- No research phase, no checker phase
|
|
160
|
-
- Target ~30% context usage (simple, focused)
|
|
161
|
-
</constraints>
|
|
162
|
-
|
|
163
|
-
<output>
|
|
164
|
-
Write plan to: ${QUICK_DIR}/${next_num}-PLAN.md
|
|
165
|
-
Return: ## PLANNING COMPLETE with plan path
|
|
166
|
-
</output>
|
|
167
|
-
",
|
|
168
|
-
subagent_type="cook-planner",
|
|
169
|
-
model="{planner_model}",
|
|
170
|
-
description="Quick plan: ${DESCRIPTION}"
|
|
171
|
-
)
|
|
172
|
-
```
|
|
173
|
-
|
|
174
|
-
After planner returns:
|
|
175
|
-
1. Verify plan exists at `${QUICK_DIR}/${next_num}-PLAN.md`
|
|
176
|
-
2. Extract plan count (typically 1 for quick tasks)
|
|
177
|
-
3. Report: "Plan created: ${QUICK_DIR}/${next_num}-PLAN.md"
|
|
178
|
-
|
|
179
|
-
If plan not found, error: "Planner failed to create ${next_num}-PLAN.md"
|
|
180
|
-
|
|
181
|
-
---
|
|
182
|
-
|
|
183
|
-
**Step 6: Spawn executor**
|
|
184
|
-
|
|
185
|
-
Spawn cook-executor with plan reference:
|
|
186
|
-
|
|
187
|
-
```
|
|
188
|
-
Task(
|
|
189
|
-
prompt="
|
|
190
|
-
Execute quick task ${next_num}.
|
|
191
|
-
|
|
192
|
-
Plan: @${QUICK_DIR}/${next_num}-PLAN.md
|
|
193
|
-
Project state: @.planning/STATE.md
|
|
194
|
-
|
|
195
|
-
<constraints>
|
|
196
|
-
- Execute all tasks in the plan
|
|
197
|
-
- Commit each task atomically
|
|
198
|
-
- Create summary at: ${QUICK_DIR}/${next_num}-SUMMARY.md
|
|
199
|
-
- Do NOT update ROADMAP.md (quick tasks are separate from planned phases)
|
|
200
|
-
</constraints>
|
|
201
|
-
",
|
|
202
|
-
subagent_type="cook-executor",
|
|
203
|
-
model="{executor_model}",
|
|
204
|
-
description="Execute: ${DESCRIPTION}"
|
|
205
|
-
)
|
|
206
|
-
```
|
|
207
|
-
|
|
208
|
-
After executor returns:
|
|
209
|
-
1. Verify summary exists at `${QUICK_DIR}/${next_num}-SUMMARY.md`
|
|
210
|
-
2. Extract commit hash from executor output
|
|
211
|
-
3. Report completion status
|
|
212
|
-
|
|
213
|
-
If summary not found, error: "Executor failed to create ${next_num}-SUMMARY.md"
|
|
214
|
-
|
|
215
|
-
Note: For quick tasks producing multiple plans (rare), spawn executors in parallel waves per execute-phase patterns.
|
|
216
|
-
|
|
217
|
-
---
|
|
218
|
-
|
|
219
|
-
**Step 7: Update STATE.md**
|
|
220
|
-
|
|
221
|
-
Update STATE.md with quick task completion record.
|
|
222
|
-
|
|
223
|
-
**7a. Check if "Quick Tasks Completed" section exists:**
|
|
224
|
-
|
|
225
|
-
Read STATE.md and check for `### Quick Tasks Completed` section.
|
|
226
|
-
|
|
227
|
-
**7b. If section doesn't exist, create it:**
|
|
228
|
-
|
|
229
|
-
Insert after `### Blockers/Concerns` section:
|
|
230
|
-
|
|
231
|
-
```markdown
|
|
232
|
-
### Quick Tasks Completed
|
|
233
|
-
|
|
234
|
-
| # | Description | Date | Commit | Directory |
|
|
235
|
-
|---|-------------|------|--------|-----------|
|
|
236
|
-
```
|
|
237
|
-
|
|
238
|
-
**7c. Append new row to table:**
|
|
239
|
-
|
|
240
|
-
```markdown
|
|
241
|
-
| ${next_num} | ${DESCRIPTION} | $(date +%Y-%m-%d) | ${commit_hash} | [${next_num}-${slug}](./quick/${next_num}-${slug}/) |
|
|
242
|
-
```
|
|
243
|
-
|
|
244
|
-
**7d. Update "Last activity" line:**
|
|
245
|
-
|
|
246
|
-
Find and update the line:
|
|
247
|
-
```
|
|
248
|
-
Last activity: $(date +%Y-%m-%d) - Completed quick task ${next_num}: ${DESCRIPTION}
|
|
249
|
-
```
|
|
250
|
-
|
|
251
|
-
Use Edit tool to make these changes atomically
|
|
252
|
-
|
|
253
|
-
---
|
|
254
|
-
|
|
255
|
-
**Step 8: Final commit and completion**
|
|
256
|
-
|
|
257
|
-
Stage and commit quick task artifacts:
|
|
258
|
-
|
|
259
|
-
```bash
|
|
260
|
-
# Stage quick task artifacts
|
|
261
|
-
git add ${QUICK_DIR}/${next_num}-PLAN.md
|
|
262
|
-
git add ${QUICK_DIR}/${next_num}-SUMMARY.md
|
|
263
|
-
git add .planning/STATE.md
|
|
264
|
-
|
|
265
|
-
# Commit with quick task format
|
|
266
|
-
git commit -m "$(cat <<'EOF'
|
|
267
|
-
docs(quick-${next_num}): ${DESCRIPTION}
|
|
268
|
-
|
|
269
|
-
Quick task completed.
|
|
270
|
-
|
|
271
|
-
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
272
|
-
EOF
|
|
273
|
-
)"
|
|
274
|
-
```
|
|
275
|
-
|
|
276
|
-
Get final commit hash:
|
|
277
|
-
```bash
|
|
278
|
-
commit_hash=$(git rev-parse --short HEAD)
|
|
279
|
-
```
|
|
280
|
-
|
|
281
|
-
Display completion output:
|
|
282
|
-
```
|
|
283
|
-
---
|
|
284
|
-
|
|
285
|
-
COOK > QUICK TASK COMPLETE
|
|
286
|
-
|
|
287
|
-
Quick Task ${next_num}: ${DESCRIPTION}
|
|
288
|
-
|
|
289
|
-
Summary: ${QUICK_DIR}/${next_num}-SUMMARY.md
|
|
290
|
-
Commit: ${commit_hash}
|
|
291
|
-
|
|
292
|
-
---
|
|
293
|
-
|
|
294
|
-
Ready for next task: /cook:quick
|
|
295
|
-
```
|
|
296
|
-
|
|
297
|
-
</process>
|
|
298
|
-
|
|
299
|
-
<success_criteria>
|
|
300
|
-
- [ ] ROADMAP.md validation passes
|
|
301
|
-
- [ ] User provides task description
|
|
302
|
-
- [ ] Slug generated (lowercase, hyphens, max 40 chars)
|
|
303
|
-
- [ ] Next number calculated (001, 002, 003...)
|
|
304
|
-
- [ ] Directory created at `.planning/quick/NNN-slug/`
|
|
305
|
-
- [ ] `${next_num}-PLAN.md` created by planner
|
|
306
|
-
- [ ] `${next_num}-SUMMARY.md` created by executor
|
|
307
|
-
- [ ] STATE.md updated with quick task row
|
|
308
|
-
- [ ] Artifacts committed
|
|
309
|
-
</success_criteria>
|
|
@@ -1,200 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: cook:research-phase
|
|
3
|
-
description: Research how to implement a phase (standalone - usually use /cook:plan-phase instead)
|
|
4
|
-
argument-hint: "[phase]"
|
|
5
|
-
allowed-tools:
|
|
6
|
-
- Read
|
|
7
|
-
- Bash
|
|
8
|
-
- Task
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
<objective>
|
|
12
|
-
Research how to implement a phase. Spawns cook-phase-researcher agent with phase context.
|
|
13
|
-
|
|
14
|
-
**Note:** This is a standalone research command. For most workflows, use `/cook:plan-phase` which integrates research automatically.
|
|
15
|
-
|
|
16
|
-
**Use this command when:**
|
|
17
|
-
- You want to research without planning yet
|
|
18
|
-
- You want to re-research after planning is complete
|
|
19
|
-
- You need to investigate before deciding if a phase is feasible
|
|
20
|
-
|
|
21
|
-
**Orchestrator role:** Parse phase, validate against roadmap, check existing research, gather context, spawn researcher agent, present results.
|
|
22
|
-
|
|
23
|
-
**Why subagent:** Research burns context fast (WebSearch, Context7 queries, source verification). Fresh 200k context for investigation. Main context stays lean for user interaction.
|
|
24
|
-
</objective>
|
|
25
|
-
|
|
26
|
-
<context>
|
|
27
|
-
Phase number: $ARGUMENTS (required)
|
|
28
|
-
|
|
29
|
-
Normalize phase input in step 1 before any directory lookups.
|
|
30
|
-
</context>
|
|
31
|
-
|
|
32
|
-
<process>
|
|
33
|
-
|
|
34
|
-
## 0. Resolve Model Profile
|
|
35
|
-
|
|
36
|
-
Read model profile for agent spawning:
|
|
37
|
-
|
|
38
|
-
```bash
|
|
39
|
-
MODEL_PROFILE=$(cat .planning/config.json 2>/dev/null | grep -o '"model_profile"[[:space:]]*:[[:space:]]*"[^"]*"' | grep -o '"[^"]*"$' | tr -d '"' || echo "balanced")
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
Default to "balanced" if not set.
|
|
43
|
-
|
|
44
|
-
**Model lookup table:**
|
|
45
|
-
|
|
46
|
-
| Agent | quality | balanced | budget |
|
|
47
|
-
|-------|---------|----------|--------|
|
|
48
|
-
| cook-phase-researcher | opus | sonnet | haiku |
|
|
49
|
-
|
|
50
|
-
Store resolved model for use in Task calls below.
|
|
51
|
-
|
|
52
|
-
## 1. Normalize and Validate Phase
|
|
53
|
-
|
|
54
|
-
```bash
|
|
55
|
-
# Normalize phase number (8 → 08, but preserve decimals like 2.1 → 02.1)
|
|
56
|
-
if [[ "$ARGUMENTS" =~ ^[0-9]+$ ]]; then
|
|
57
|
-
PHASE=$(printf "%02d" "$ARGUMENTS")
|
|
58
|
-
elif [[ "$ARGUMENTS" =~ ^([0-9]+)\.([0-9]+)$ ]]; then
|
|
59
|
-
PHASE=$(printf "%02d.%s" "${BASH_REMATCH[1]}" "${BASH_REMATCH[2]}")
|
|
60
|
-
else
|
|
61
|
-
PHASE="$ARGUMENTS"
|
|
62
|
-
fi
|
|
63
|
-
|
|
64
|
-
grep -A5 "Phase ${PHASE}:" .planning/ROADMAP.md 2>/dev/null
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
**If not found:** Error and exit. **If found:** Extract phase number, name, description.
|
|
68
|
-
|
|
69
|
-
## 2. Check Existing Research
|
|
70
|
-
|
|
71
|
-
```bash
|
|
72
|
-
ls .planning/phases/${PHASE}-*/RESEARCH.md 2>/dev/null
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
**If exists:** Offer: 1) Update research, 2) View existing, 3) Skip. Wait for response.
|
|
76
|
-
|
|
77
|
-
**If doesn't exist:** Continue.
|
|
78
|
-
|
|
79
|
-
## 3. Gather Phase Context
|
|
80
|
-
|
|
81
|
-
```bash
|
|
82
|
-
grep -A20 "Phase ${PHASE}:" .planning/ROADMAP.md
|
|
83
|
-
cat .planning/REQUIREMENTS.md 2>/dev/null
|
|
84
|
-
cat .planning/phases/${PHASE}-*/*-CONTEXT.md 2>/dev/null
|
|
85
|
-
grep -A30 "### Decisions Made" .planning/STATE.md 2>/dev/null
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
Present summary with phase description, requirements, prior decisions.
|
|
89
|
-
|
|
90
|
-
## 4. Spawn cook-phase-researcher Agent
|
|
91
|
-
|
|
92
|
-
Research modes: ecosystem (default), feasibility, implementation, comparison.
|
|
93
|
-
|
|
94
|
-
```markdown
|
|
95
|
-
<research_type>
|
|
96
|
-
Phase Research — investigating HOW to implement a specific phase well.
|
|
97
|
-
</research_type>
|
|
98
|
-
|
|
99
|
-
<key_insight>
|
|
100
|
-
The question is NOT "which library should I use?"
|
|
101
|
-
|
|
102
|
-
The question is: "What do I not know that I don't know?"
|
|
103
|
-
|
|
104
|
-
For this phase, discover:
|
|
105
|
-
- What's the established architecture pattern?
|
|
106
|
-
- What libraries form the standard stack?
|
|
107
|
-
- What problems do people commonly hit?
|
|
108
|
-
- What's SOTA vs what Claude's training thinks is SOTA?
|
|
109
|
-
- What should NOT be hand-rolled?
|
|
110
|
-
</key_insight>
|
|
111
|
-
|
|
112
|
-
<objective>
|
|
113
|
-
Research implementation approach for Phase {phase_number}: {phase_name}
|
|
114
|
-
Mode: ecosystem
|
|
115
|
-
</objective>
|
|
116
|
-
|
|
117
|
-
<context>
|
|
118
|
-
**Phase description:** {phase_description}
|
|
119
|
-
**Requirements:** {requirements_list}
|
|
120
|
-
**Prior decisions:** {decisions_if_any}
|
|
121
|
-
**Phase context:** {context_md_content}
|
|
122
|
-
</context>
|
|
123
|
-
|
|
124
|
-
<downstream_consumer>
|
|
125
|
-
Your RESEARCH.md will be loaded by `/cook:plan-phase` which uses specific sections:
|
|
126
|
-
- `## Standard Stack` → Plans use these libraries
|
|
127
|
-
- `## Architecture Patterns` → Task structure follows these
|
|
128
|
-
- `## Don't Hand-Roll` → Tasks NEVER build custom solutions for listed problems
|
|
129
|
-
- `## Common Pitfalls` → Verification steps check for these
|
|
130
|
-
- `## Code Examples` → Task actions reference these patterns
|
|
131
|
-
|
|
132
|
-
Be prescriptive, not exploratory. "Use X" not "Consider X or Y."
|
|
133
|
-
</downstream_consumer>
|
|
134
|
-
|
|
135
|
-
<quality_gate>
|
|
136
|
-
Before declaring complete, verify:
|
|
137
|
-
- [ ] All domains investigated (not just some)
|
|
138
|
-
- [ ] Negative claims verified with official docs
|
|
139
|
-
- [ ] Multiple sources for critical claims
|
|
140
|
-
- [ ] Confidence levels assigned honestly
|
|
141
|
-
- [ ] Section names match what plan-phase expects
|
|
142
|
-
</quality_gate>
|
|
143
|
-
|
|
144
|
-
<output>
|
|
145
|
-
Write to: .planning/phases/${PHASE}-{slug}/${PHASE}-RESEARCH.md
|
|
146
|
-
</output>
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
```
|
|
150
|
-
Task(
|
|
151
|
-
prompt="First, read ~/.claude/agents/cook-phase-researcher.md for your role and instructions.\n\n" + filled_prompt,
|
|
152
|
-
subagent_type="general-purpose",
|
|
153
|
-
model="{researcher_model}",
|
|
154
|
-
description="Research Phase {phase}"
|
|
155
|
-
)
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
## 5. Handle Agent Return
|
|
159
|
-
|
|
160
|
-
**`## RESEARCH COMPLETE`:** Display summary, offer: Plan phase, Dig deeper, Review full, Done.
|
|
161
|
-
|
|
162
|
-
**`## CHECKPOINT REACHED`:** Present to user, get response, spawn continuation.
|
|
163
|
-
|
|
164
|
-
**`## RESEARCH INCONCLUSIVE`:** Show what was attempted, offer: Add context, Try different mode, Manual.
|
|
165
|
-
|
|
166
|
-
## 6. Spawn Continuation Agent
|
|
167
|
-
|
|
168
|
-
```markdown
|
|
169
|
-
<objective>
|
|
170
|
-
Continue research for Phase {phase_number}: {phase_name}
|
|
171
|
-
</objective>
|
|
172
|
-
|
|
173
|
-
<prior_state>
|
|
174
|
-
Research file: @.planning/phases/${PHASE}-{slug}/${PHASE}-RESEARCH.md
|
|
175
|
-
</prior_state>
|
|
176
|
-
|
|
177
|
-
<checkpoint_response>
|
|
178
|
-
**Type:** {checkpoint_type}
|
|
179
|
-
**Response:** {user_response}
|
|
180
|
-
</checkpoint_response>
|
|
181
|
-
```
|
|
182
|
-
|
|
183
|
-
```
|
|
184
|
-
Task(
|
|
185
|
-
prompt="First, read ~/.claude/agents/cook-phase-researcher.md for your role and instructions.\n\n" + continuation_prompt,
|
|
186
|
-
subagent_type="general-purpose",
|
|
187
|
-
model="{researcher_model}",
|
|
188
|
-
description="Continue research Phase {phase}"
|
|
189
|
-
)
|
|
190
|
-
```
|
|
191
|
-
|
|
192
|
-
</process>
|
|
193
|
-
|
|
194
|
-
<success_criteria>
|
|
195
|
-
- [ ] Phase validated against roadmap
|
|
196
|
-
- [ ] Existing research checked
|
|
197
|
-
- [ ] cook-phase-researcher spawned with context
|
|
198
|
-
- [ ] Checkpoints handled correctly
|
|
199
|
-
- [ ] User knows next steps
|
|
200
|
-
</success_criteria>
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: cook:resume-work
|
|
3
|
-
description: Resume work from previous session with full context restoration
|
|
4
|
-
allowed-tools:
|
|
5
|
-
- Read
|
|
6
|
-
- Bash
|
|
7
|
-
- Write
|
|
8
|
-
- AskUserQuestion
|
|
9
|
-
- SlashCommand
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
<objective>
|
|
13
|
-
Restore complete project context and resume work seamlessly from previous session.
|
|
14
|
-
|
|
15
|
-
Routes to the resume-project workflow which handles:
|
|
16
|
-
|
|
17
|
-
- STATE.md loading (or reconstruction if missing)
|
|
18
|
-
- Checkpoint detection (.continue-here files)
|
|
19
|
-
- Incomplete work detection (PLAN without SUMMARY)
|
|
20
|
-
- Status presentation
|
|
21
|
-
- Context-aware next action routing
|
|
22
|
-
</objective>
|
|
23
|
-
|
|
24
|
-
<execution_context>
|
|
25
|
-
@~/.claude/cook/workflows/resume-project.md
|
|
26
|
-
</execution_context>
|
|
27
|
-
|
|
28
|
-
<process>
|
|
29
|
-
**Follow the resume-project workflow** from `@~/.claude/cook/workflows/resume-project.md`.
|
|
30
|
-
|
|
31
|
-
The workflow handles all resumption logic including:
|
|
32
|
-
|
|
33
|
-
1. Project existence verification
|
|
34
|
-
2. STATE.md loading or reconstruction
|
|
35
|
-
3. Checkpoint and incomplete work detection
|
|
36
|
-
4. Visual status presentation
|
|
37
|
-
5. Context-aware option offering (checks CONTEXT.md before suggesting plan vs discuss)
|
|
38
|
-
6. Routing to appropriate next command
|
|
39
|
-
7. Session continuity updates
|
|
40
|
-
</process>
|