claude-cook 1.10.5 → 1.10.6

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.
@@ -61,6 +61,14 @@ Claude degrades when it perceives context pressure and enters "completion mode."
61
61
 
62
62
  **Aggressive atomicity:** More plans, smaller scope, consistent quality. Each plan: 2-3 tasks max.
63
63
 
64
+
65
+ ## PRD Slicing Rule
66
+
67
+ Every PLAN.md must represent **one PRD slice** (one user-facing capability).
68
+ - If a phase requirement includes multiple capabilities or flows, split into multiple PLAN.md files.
69
+ - Aim for 1-2 acceptance criteria per plan; avoid bundled mega-plans.
70
+ - The resulting plan should fit in a single, focused ticket.
71
+
64
72
  ## Ship Fast
65
73
 
66
74
  No enterprise process. No approval gates.
package/agents/cook-pm.md CHANGED
@@ -81,6 +81,13 @@ When a worker fails:
81
81
  4. Dispatch a fresh worker on the fix
82
82
  5. Log everything to PM-LOG.md
83
83
 
84
+
85
+ ## Ticket Granularity (PRD-aligned)
86
+
87
+ - Each ticket must map to a single PRD slice (one user-facing capability).
88
+ - If a PLAN.md appears to bundle multiple capabilities, spawn the planner in revision mode to split it before syncing.
89
+ - If acceptance criteria exceed 4-5 bullets, it is too large — split.
90
+
84
91
  ## Wave Discipline
85
92
 
86
93
  Plans have wave assignments. Respect them:
@@ -88,6 +95,13 @@ Plans have wave assignments. Respect them:
88
95
  - Wave 2 only after ALL wave 1 tickets are `done`
89
96
  - This prevents dependency conflicts between parallel workers
90
97
 
98
+ ## Autonomous Loop = Minimal User Interruptions
99
+
100
+ When running under `/cook:pm-start` and `pm-loop.sh`, you MUST avoid asking the user questions.
101
+ - Do **not** use AskUserQuestion in the autonomous loop.
102
+ - If a choice is required, pick a safe default and **log the choice** in PM-LOG.md.
103
+ - Only ask the user if a **critical, irreversible** decision cannot be made safely.
104
+
91
105
  </philosophy>
92
106
 
93
107
  <never_do>
@@ -190,7 +204,7 @@ For each ticket in TICKET-MAP.md:
190
204
  **On WAVE_COMPLETE:**
191
205
  1. Read config for `auto_dispatch_next_wave`
192
206
  2. If true: dispatch all wave N+1 tickets (see dispatch flow)
193
- 3. If false: log and suggest `/pm:dispatch` to user
207
+ 3. If false: log and wait (no user prompt in autonomous mode)
194
208
  4. Update STATE.md wave summary
195
209
 
196
210
  **On FAILED:**
@@ -200,18 +214,18 @@ For each ticket in TICKET-MAP.md:
200
214
  - Spawn cook-planner in revision mode with failure context
201
215
  - Create fix plan → create fix ticket → dispatch
202
216
  - Increment replan_count in TICKET-MAP
203
- 4. If false OR max reached: log failure, present to user
217
+ 4. If false OR max reached: log failure and wait (no user prompt in autonomous mode)
204
218
 
205
219
  **On STUCK:**
206
220
  1. Log a warning entry
207
221
  2. If autonomous mode: attempt re-dispatch with same executor
208
- 3. If still stuck after 2 re-dispatches: escalate to user
222
+ 3. If still stuck after 2 re-dispatches: log escalation and wait
209
223
 
210
224
  **On PHASE_COMPLETE:**
211
225
  1. Update STATE.md: phase complete
212
226
  2. Update TICKET-MAP.md: phase_status = complete
213
227
  3. Log phase completion summary
214
- 4. Present to user: "Phase X complete. Run /cook:pm-start {X+1} for next phase."
228
+ 4. No user prompt in autonomous mode (pm-cycle will advance phases automatically)
215
229
 
216
230
  **On NO_CHANGE:**
217
231
  1. Brief log entry: "No changes detected"
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: cook:pm-start
3
3
  description: Start fully autonomous PM — plans, syncs, dispatches, monitors, and advances phases automatically
4
- argument-hint: "<phase> [--manual] [--executor=CLAUDE_CODE] [--skip-plan] [--max-iterations=0] [--max-replans=3] [--calls=0]"
4
+ argument-hint: "<phase> [--manual] [--background] [--executor=CLAUDE_CODE] [--skip-plan] [--max-iterations=0] [--max-replans=3] [--calls=0]"
5
5
  agent: cook-pm
6
6
  allowed-tools:
7
7
  - Read
@@ -38,7 +38,7 @@ Phase number: $ARGUMENTS (required — starting phase)
38
38
 
39
39
  **Flags:**
40
40
  - `--manual` — Don't launch the loop, manage manually with `/cook:pm-cycle`
41
- - `--background` — Run loop detached (default: foreground with live output)
41
+ - `--background` — Run loop detached (default: background when autonomous)
42
42
  - `--executor=X` — Override default executor (CLAUDE_CODE, CURSOR_AGENT, CODEX, etc.)
43
43
  - `--skip-plan` — Skip initial planning, assume plans already exist
44
44
  - `--max-iterations=N` — Safety cap on loop cycles (default: 0 = unlimited)
@@ -176,53 +176,35 @@ Present:
176
176
  | ... | ... | ... | launched |
177
177
  ```
178
178
 
179
- ## 7. Launch PM Loop (default: foreground, live output)
179
+ ## 7. Launch PM Loop (default: background in autonomous mode)
180
180
 
181
- ### Autonomous Mode (default) — FOREGROUND
181
+ ### Autonomous Mode (default) — BACKGROUND
182
182
 
183
- Launch pm-loop.sh in the **foreground** — the user sees live progress, cycle-by-cycle output, progress bars, and desktop notifications for key events. The PM actively reports what it's doing. The loop will automatically trigger `/cook:pm-replan` after repeated failures, up to the configured max.
183
+ Launch pm-loop.sh in the **background** by default in autonomous mode. This avoids blocking the command while keeping the loop running. The loop will automatically trigger `/cook:pm-replan` after repeated failures, up to the configured max.
184
184
 
185
185
  ```bash
186
- ~/.claude/scripts/pm-loop.sh --phase={X} --interval={poll_interval} --max-iterations={max_iterations}
186
+ ~/.claude/scripts/pm-loop.sh --phase={X} --interval={poll_interval} --max-iterations={max_iterations} --background
187
187
  ```
188
188
 
189
- The loop runs in the current terminal. The user sees:
190
- - Cycle headers with timestamps
191
- - Full pm-cycle output (banners, ticket tables, decisions)
192
- - Progress bars between cycles (done/running/todo counts)
193
- - Countdown to next cycle
194
- - Desktop notifications for: milestone complete, errors, phase advances
189
+ Output goes to `.planning/pm-loop.log`. Desktop notifications still work in background mode (macOS/Linux).
195
190
 
196
- Stop with: `Ctrl+C` | `touch .planning/.pm-stop` | `/cook:pm-stop`
191
+ Stop with: `touch .planning/.pm-stop` | `/cook:pm-stop`
197
192
 
198
- **Note:** This is a blocking call — it takes over the terminal. The PM actively reports to the user rather than hiding in a log file.
193
+ If the user explicitly asks for foreground mode, run without `--background`.
199
194
 
200
- ### Background Mode (--background)
195
+ ### Foreground Mode (explicit)
201
196
 
202
- If the user explicitly passes `--background`, launch detached:
197
+ If the user explicitly asks for foreground/live output, launch without `--background`:
203
198
 
204
199
  ```bash
205
- ~/.claude/scripts/pm-loop.sh --phase={X} --interval={poll_interval} --max-iterations={max_iterations} --background
206
- ```
207
-
208
- This re-execs with nohup and exits immediately. Output goes to `.planning/pm-loop.log`.
209
-
210
- Desktop notifications still work in background mode (macOS/Linux).
211
-
212
- Present:
200
+ ~/.claude/scripts/pm-loop.sh --phase={X} --interval={poll_interval} --max-iterations={max_iterations}
213
201
  ```
214
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
215
- PM ► BACKGROUND MODE
216
202
 
217
- PM loop running (PID: {pid})
218
- Log: tail -f .planning/pm-loop.log
219
- Stop: /cook:pm-stop or touch .planning/.pm-stop
220
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
221
- ```
203
+ This blocks the terminal and streams live output.
222
204
 
223
- ### Manual Mode (--manual)
205
+ ### Manual Mode (--manual only)
224
206
 
225
- Don't launch the loop. User runs `/cook:pm-cycle` manually for each step.
207
+ Only use manual mode if the user explicitly passes `--manual`. Otherwise always launch the loop.
226
208
 
227
209
  Present:
228
210
  ```
@@ -60,6 +60,8 @@ Build three lists:
60
60
 
61
61
  **Ticket philosophy:** Tickets are Agile-style task assignments — atomic, isolated, and code-agnostic. They describe **what** to deliver and **why**, not **how** to implement it. The worker agent reads the codebase to figure out implementation. This makes tickets robust to codebase changes and readable by any stakeholder.
62
62
 
63
+ **PRD-driven slicing:** Each ticket must map to a single PRD slice (one user-facing capability). If a plan spans multiple capabilities or flows, split it into multiple smaller plans before ticketing. Use REQUIREMENTS.md / PROJECT.md (or PRD.md if present) to identify the slice.
64
+
63
65
  For each new plan:
64
66
 
65
67
  1. Read the PLAN.md content
@@ -85,20 +87,32 @@ For each new plan:
85
87
  {One-paragraph summary of what to deliver. Written as a user story or task statement.
86
88
  Focus on the deliverable, not implementation details. No file paths, no function names, no code snippets.}
87
89
 
90
+ ## PRD Slice
91
+
92
+ - **Feature/Capability:** {single PRD slice name}
93
+ - **User Flow:** {entry point → key steps → outcome}
94
+ - **In Scope:** {1-3 concrete deliverables}
95
+ - **Out of Scope:** {explicit non-goals to prevent bloat}
96
+
88
97
  ## Why
89
98
 
90
99
  {Why this task matters for the project. What value it adds. What it unblocks.}
91
100
 
92
- ## Acceptance Criteria
101
+ ## Acceptance Criteria (DoD)
93
102
 
94
103
  - [ ] {Observable behavior 1 — from must_haves.truths}
95
104
  - [ ] {Observable behavior 2}
96
105
  - [ ] {Deliverable exists — from must_haves.artifacts, described generically}
106
+ - [ ] {No major regressions in related flows}
97
107
 
98
108
  ## Dependencies
99
109
 
100
110
  - {List ticket IDs this depends on, from depends_on field, or "None"}
101
111
 
112
+ ## QA Notes
113
+
114
+ - {How to verify quickly (manual steps or simple checks)}
115
+
102
116
  ## Scope
103
117
 
104
118
  - Wave: {N}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-cook",
3
- "version": "1.10.5",
3
+ "version": "1.10.6",
4
4
  "description": "A meta-prompting, context engineering and spec-driven development system for Claude Code, OpenCode and Gemini by TÂCHES.",
5
5
  "bin": {
6
6
  "claude-cook": "bin/install.js"