claude-cook 1.11.4 → 1.11.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.
- package/agents/cook-pm.md +2 -2
- package/commands/cook/pm-start.md +13 -10
- package/package.json +1 -1
- package/scripts/pm-loop.sh +8 -8
package/agents/cook-pm.md
CHANGED
|
@@ -109,9 +109,9 @@ When running under `/cook:pm-start` and `pm-loop.sh`, you MUST avoid asking the
|
|
|
109
109
|
|
|
110
110
|
## PM Loop Launch is MANDATORY
|
|
111
111
|
|
|
112
|
-
When spawned by `/cook:pm-start`, you MUST launch `pm-loop.sh`
|
|
112
|
+
When spawned by `/cook:pm-start`, you MUST launch `pm-loop.sh` as a **regular foreground Bash command** after executing the first cycle. The only exception is when `--manual` flag is explicitly set. Without the loop, the PM does one cycle and stops — defeating the purpose of autonomous operation.
|
|
113
113
|
|
|
114
|
-
**IMPORTANT:** Use the Bash tool
|
|
114
|
+
**IMPORTANT:** Use the Bash tool as a regular foreground command (do NOT set `run_in_background`). This streams live output directly in the conversation area so the user sees progress bars, status updates, and poll results in real-time. Do NOT use `--background` flag, `nohup`, `setsid`, `disown`, or `&`. Do NOT set `timeout` on the Bash tool — the loop runs indefinitely until milestone complete or `.pm-stop`. The user can press Ctrl+B to push the loop to background and interact with Claude.
|
|
115
115
|
|
|
116
116
|
</philosophy>
|
|
117
117
|
|
|
@@ -142,7 +142,7 @@ Follow the action for the detected state as defined in `pm-cycle.md`:
|
|
|
142
142
|
|
|
143
143
|
**You MUST launch pm-loop.sh unless `--manual` flag is explicitly set.** This is not optional. The loop is what makes the PM autonomous — without it, the PM does one cycle and stops.
|
|
144
144
|
|
|
145
|
-
**If `--manual` is NOT set**, launch pm-loop.sh
|
|
145
|
+
**If `--manual` is NOT set**, launch pm-loop.sh as a **foreground Bash command** immediately after the first cycle completes:
|
|
146
146
|
|
|
147
147
|
```bash
|
|
148
148
|
~/.claude/scripts/pm-loop.sh \
|
|
@@ -154,29 +154,32 @@ Follow the action for the detected state as defined in `pm-cycle.md`:
|
|
|
154
154
|
```
|
|
155
155
|
|
|
156
156
|
**IMPORTANT:**
|
|
157
|
-
|
|
158
|
-
-
|
|
159
|
-
- Do NOT use `
|
|
160
|
-
-
|
|
157
|
+
|
|
158
|
+
- Use the Bash tool as a **regular foreground command** (do NOT set `run_in_background`). This streams live output directly in the conversation area so the user sees progress bars, status updates, and poll results in real-time.
|
|
159
|
+
- Do NOT use `--background` flag, `nohup`, `setsid`, `disown`, or `&`.
|
|
160
|
+
- Do NOT set `timeout` on the Bash tool — the loop runs indefinitely until milestone complete or `.pm-stop`.
|
|
161
|
+
- The user can press **Ctrl+B** at any time to push the loop to background and interact with Claude. They can check on it later via `/bashes` or by asking Claude to check the output.
|
|
161
162
|
|
|
162
163
|
Where:
|
|
163
164
|
- `${init_flag}` is `--init` if the `--init` flag was provided
|
|
164
165
|
- `${prd_flag}` is `--prd=<file>` if provided
|
|
165
166
|
- Phase is auto-detected or from arguments
|
|
166
167
|
|
|
167
|
-
|
|
168
|
+
Before launching, present to user:
|
|
168
169
|
```
|
|
169
170
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
170
|
-
PM ► LOOP
|
|
171
|
+
PM ► LAUNCHING LOOP
|
|
171
172
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
172
173
|
|
|
173
|
-
PM loop
|
|
174
|
-
Polling every {interval}s.
|
|
174
|
+
PM loop starting. Live output will stream below.
|
|
175
|
+
Polling every {interval}s.
|
|
175
176
|
|
|
177
|
+
Press Ctrl+B to push to background and interact.
|
|
176
178
|
Stop with: /cook:pm-stop
|
|
177
|
-
Status: /cook:pm-status
|
|
178
179
|
```
|
|
179
180
|
|
|
181
|
+
Then immediately invoke the Bash tool with the pm-loop.sh command.
|
|
182
|
+
|
|
180
183
|
Stop with: `touch .planning/.pm-stop` | `/cook:pm-stop`
|
|
181
184
|
|
|
182
185
|
**If `--manual` IS set**, do NOT launch the loop. Present:
|
package/package.json
CHANGED
package/scripts/pm-loop.sh
CHANGED
|
@@ -197,10 +197,10 @@ print_progress() {
|
|
|
197
197
|
ticket_map=$(find .planning/phases/ -name "TICKET-MAP.md" -print -quit 2>/dev/null || true)
|
|
198
198
|
|
|
199
199
|
if [ -n "$ticket_map" ] && [ -f "$ticket_map" ]; then
|
|
200
|
-
local done_count=$(grep -c "| done " "$ticket_map" 2>/dev/null ||
|
|
201
|
-
local inreview_count=$(grep -c "| inreview " "$ticket_map" 2>/dev/null ||
|
|
202
|
-
local inprogress_count=$(grep -c "| inprogress " "$ticket_map" 2>/dev/null ||
|
|
203
|
-
local todo_count=$(grep -c "| todo " "$ticket_map" 2>/dev/null ||
|
|
200
|
+
local done_count; done_count=$(grep -c "| done " "$ticket_map" 2>/dev/null) || done_count=0
|
|
201
|
+
local inreview_count; inreview_count=$(grep -c "| inreview " "$ticket_map" 2>/dev/null) || inreview_count=0
|
|
202
|
+
local inprogress_count; inprogress_count=$(grep -c "| inprogress " "$ticket_map" 2>/dev/null) || inprogress_count=0
|
|
203
|
+
local todo_count; todo_count=$(grep -c "| todo " "$ticket_map" 2>/dev/null) || todo_count=0
|
|
204
204
|
local total=$((done_count + inreview_count + inprogress_count + todo_count))
|
|
205
205
|
|
|
206
206
|
if [ "$total" -gt 0 ]; then
|
|
@@ -234,10 +234,10 @@ all_tickets_done() {
|
|
|
234
234
|
ticket_map=$(find .planning/phases/ -name "TICKET-MAP.md" -print -quit 2>/dev/null || true)
|
|
235
235
|
|
|
236
236
|
if [ -n "$ticket_map" ] && [ -f "$ticket_map" ]; then
|
|
237
|
-
local done_count=$(grep -c "| done " "$ticket_map" 2>/dev/null ||
|
|
238
|
-
local inreview_count=$(grep -c "| inreview " "$ticket_map" 2>/dev/null ||
|
|
239
|
-
local inprogress_count=$(grep -c "| inprogress " "$ticket_map" 2>/dev/null ||
|
|
240
|
-
local todo_count=$(grep -c "| todo " "$ticket_map" 2>/dev/null ||
|
|
237
|
+
local done_count; done_count=$(grep -c "| done " "$ticket_map" 2>/dev/null) || done_count=0
|
|
238
|
+
local inreview_count; inreview_count=$(grep -c "| inreview " "$ticket_map" 2>/dev/null) || inreview_count=0
|
|
239
|
+
local inprogress_count; inprogress_count=$(grep -c "| inprogress " "$ticket_map" 2>/dev/null) || inprogress_count=0
|
|
240
|
+
local todo_count; todo_count=$(grep -c "| todo " "$ticket_map" 2>/dev/null) || todo_count=0
|
|
241
241
|
local total=$((done_count + inreview_count + inprogress_count + todo_count))
|
|
242
242
|
|
|
243
243
|
if [ "$total" -gt 0 ] && [ "$inreview_count" -eq 0 ] && [ "$inprogress_count" -eq 0 ] && [ "$todo_count" -eq 0 ]; then
|