claude-cook 1.11.0 → 1.11.2

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 CHANGED
@@ -107,6 +107,10 @@ When running under `/cook:pm-start` and `pm-loop.sh`, you MUST avoid asking the
107
107
  - If a choice is required, pick a safe default and **log the choice** in PM-LOG.md.
108
108
  - Only ask the user if a **critical, irreversible** decision cannot be made safely.
109
109
 
110
+ ## PM Loop Launch is MANDATORY
111
+
112
+ When spawned by `/cook:pm-start`, you MUST launch `pm-loop.sh` via Bash 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. Always launch it in background with `nohup ... &`.
113
+
110
114
  </philosophy>
111
115
 
112
116
  <never_do>
@@ -117,6 +121,7 @@ When running under `/cook:pm-start` and `pm-loop.sh`, you MUST avoid asking the
117
121
  - Dispatch wave N+1 before wave N is fully done
118
122
  - Replan more than max_replan_attempts times without escalating to human
119
123
  - Run its own code reviewer — delegate review to Vibe Kanban's review agent
124
+ - Skip launching pm-loop.sh after first cycle (unless --manual is set)
120
125
  </never_do>
121
126
 
122
127
  <tools_usage>
@@ -138,28 +138,44 @@ Follow the action for the detected state as defined in `pm-cycle.md`:
138
138
  - NEEDS_DISPATCH → dispatch workers
139
139
  - MONITORING → poll and react
140
140
 
141
- ## 5. Launch PM Loop
141
+ ## 5. Launch PM Loop (MANDATORY)
142
142
 
143
- ### Autonomous Mode (default)BACKGROUND
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
- Build the pm-loop.sh command with all detected parameters:
145
+ **If `--manual` is NOT set**, run this command via Bash tool immediately after the first cycle completes:
146
146
 
147
147
  ```bash
148
- ~/.claude/scripts/pm-loop.sh \
148
+ nohup ~/.claude/scripts/pm-loop.sh \
149
149
  --phase={X} \
150
150
  --interval={poll_interval} \
151
151
  --max-iterations={max_iterations} \
152
152
  --background \
153
- ${prd_flag}
153
+ ${init_flag} \
154
+ ${prd_flag} \
155
+ > /dev/null 2>&1 &
154
156
  ```
155
157
 
156
- Where `${prd_flag}` is `--prd=<file>` if provided.
158
+ Where:
159
+ - `${init_flag}` is `--init` if the `--init` flag was provided
160
+ - `${prd_flag}` is `--prd=<file>` if provided
161
+ - Phase is auto-detected or from arguments
157
162
 
158
- Stop with: `touch .planning/.pm-stop` | `/cook:pm-stop`
163
+ After launching, confirm to user:
164
+ ```
165
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
166
+ PM ► LOOP STARTED
167
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
159
168
 
160
- ### Manual Mode (--manual)
169
+ PM loop running in background (PID: {pid})
170
+ Polling every {interval}s
171
+
172
+ Stop with: /cook:pm-stop
173
+ Status: /cook:pm-status
174
+ ```
175
+
176
+ Stop with: `touch .planning/.pm-stop` | `/cook:pm-stop`
161
177
 
162
- Present:
178
+ **If `--manual` IS set**, do NOT launch the loop. Present:
163
179
  ```
164
180
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
165
181
  PM ► MANUAL MODE
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-cook",
3
- "version": "1.11.0",
3
+ "version": "1.11.2",
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"
@@ -524,24 +524,25 @@ while true; do
524
524
  update_status "running" "completed_cycle" "$(cat "$CALL_COUNT_FILE" 2>/dev/null || echo 0)"
525
525
  print_progress
526
526
 
527
- # Exit if all tickets are done
527
+ # Check if all tickets in current phase are done
528
+ # DON'T exit — let pm-cycle handle phase advancement.
529
+ # pm-cycle will detect PHASE_COMPLETE and advance to next phase,
530
+ # or detect MILESTONE_COMPLETE and exit with code 42.
528
531
  if all_tickets_done; then
529
532
  TIMESTAMP=$(date '+%Y-%m-%d %H:%M:%S')
530
533
  echo ""
531
534
  echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
532
- echo " PM ► ALL TICKETS DONE"
535
+ echo " PM ► PHASE TICKETS DONE — advancing..."
533
536
  echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
534
537
  echo ""
535
- echo " All tickets complete after $CYCLE cycles."
538
+ echo " All current phase tickets complete. Next cycle will advance."
536
539
  echo ""
537
540
  echo "" >> "$LOG_FILE"
538
- echo "## [$TIMESTAMP] LOOP_EXIT" >> "$LOG_FILE"
541
+ echo "## [$TIMESTAMP] PHASE_TICKETS_DONE" >> "$LOG_FILE"
539
542
  echo "" >> "$LOG_FILE"
540
- echo "- All tickets done after $CYCLE cycles" >> "$LOG_FILE"
541
- update_status "completed" "all_tickets_done" "$(cat "$CALL_COUNT_FILE" 2>/dev/null || echo 0)"
542
- rm -f "$PID_FILE"
543
- notify "COOK PM" "All tickets done! Phase complete after $CYCLE cycles."
544
- exit 0
543
+ echo "- All tickets done in current phase after $CYCLE cycles" >> "$LOG_FILE"
544
+ echo "- Continuing loop pm-cycle will advance to next phase" >> "$LOG_FILE"
545
+ notify "COOK PM" "Phase tickets done! Advancing to next phase..."
545
546
  fi
546
547
 
547
548
  echo ""