claude-cook 1.10.7 → 1.10.8

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.
@@ -97,6 +97,7 @@ Aggregate events:
97
97
  | --------- | --------------- |
98
98
  | All wave N tickets are `done` | WAVE_COMPLETE |
99
99
  | All tickets across all waves are `done` | PHASE_COMPLETE |
100
+ | Tickets in `inreview` awaiting review | NEEDS_REVIEW |
100
101
  | No changes detected | NO_CHANGE |
101
102
 
102
103
  </step>
@@ -129,11 +130,25 @@ Run /cook:pm-start {X+1} to begin next phase.
129
130
  4. If false: log and present suggestion to user
130
131
  5. Update STATE.md wave summary
131
132
 
132
- ### WORKER_COMPLETED / WORKER_AUTO_COMPLETED
133
+ ### WORKER_COMPLETED (inprogress → inreview)
133
134
  1. Call `get_task(task_id)` to read worker output/notes
134
- 2. Update TICKET-MAP.md: status=done, completed=timestamp
135
+ 2. Update TICKET-MAP.md: status=inreview, review_started=timestamp
136
+ 3. Trigger automated code review:
137
+ - Spawn `feature-dev:code-reviewer` agent via Task tool
138
+ - Provide: ticket title, acceptance criteria from ticket description, recent commits (use `git log --oneline -10` to find relevant commits)
139
+ - The reviewer examines the diff and returns a verdict: **PASS** or **FAIL** with issues
140
+ 4. Based on review result:
141
+ - **PASS:** Update ticket status to `done` via `mcp__vibe_kanban__update_task(task_id, status="done")`. Update TICKET-MAP.md: status=done, completed=timestamp, review=passed. Check if this completes the wave.
142
+ - **FAIL:** Update ticket status back to `inprogress` via `mcp__vibe_kanban__update_task(task_id, status="inprogress")`. Update TICKET-MAP.md: status=inprogress, review=failed. Append review feedback as a task note via `mcp__vibe_kanban__update_task(task_id, description=original_description + "\n\n## Review Feedback\n\n" + reviewer_issues)`. Re-dispatch the ticket so the worker can address review feedback.
143
+ 5. Log review result to PM-LOG.md
144
+
145
+ ### WORKER_AUTO_COMPLETED (inprogress → done, bypass review)
146
+ 1. Call `get_task(task_id)` to read worker output/notes
147
+ 2. Update TICKET-MAP.md: status=done, completed=timestamp, review=skipped
135
148
  3. Check if this completes the wave
136
149
 
150
+ > **Note:** `inprogress → done` skips review (worker or human marked it done directly). To enforce review, workers should transition to `inreview` instead of `done`.
151
+
137
152
  ### TICKET_CANCELLED (potential failure)
138
153
  1. Call `get_task(task_id)` to read cancellation reason
139
154
  2. Check `pm.auto_replan_on_failure` in config
@@ -13,6 +13,7 @@ NEEDS_PLANNING → No PLAN.md files
13
13
  NEEDS_SYNC → Plans exist, no TICKET-MAP.md
14
14
  NEEDS_DISPATCH → TICKET-MAP has todo tickets in ready wave
15
15
  MONITORING → Tickets inprogress
16
+ NEEDS_REVIEW → Tickets inreview (awaiting code review)
16
17
  PHASE_COMPLETE → All tickets done, more phases in roadmap
17
18
  MILESTONE_COMPLETE → All tickets done, last phase in roadmap
18
19
  ```
@@ -24,9 +25,12 @@ NEEDS_PLANNING ──spawn planner──→ NEEDS_SYNC
24
25
  NEEDS_SYNC ──create tickets──→ NEEDS_DISPATCH
25
26
  NEEDS_DISPATCH ──launch workers──→ MONITORING
26
27
  MONITORING ──poll + react──→ MONITORING (loop)
28
+ ──→ NEEDS_REVIEW (worker completed, tickets inreview)
27
29
  ──→ NEEDS_DISPATCH (wave complete, next wave ready)
28
30
  ──→ PHASE_COMPLETE (all done)
29
31
  ──→ MONITORING + replan (ticket failed)
32
+ NEEDS_REVIEW ──code review──→ MONITORING (review passed → done, check wave)
33
+ ──→ MONITORING (review failed → re-dispatch)
30
34
  PHASE_COMPLETE ──advance phase──→ NEEDS_PLANNING (next phase)
31
35
  ──→ MILESTONE_COMPLETE (last phase)
32
36
  MILESTONE_COMPLETE ──stop signal──→ EXIT
@@ -92,17 +96,42 @@ Follow `pm-check.md` workflow:
92
96
  | Event | Reaction |
93
97
  |-------|----------|
94
98
  | Ticket: todo → inprogress | Update TICKET-MAP (worker started) |
95
- | Ticket: inprogress → done | Update TICKET-MAP, check wave completion |
96
- | Ticket: inprogress → inreview | Update TICKET-MAP (awaiting review) |
99
+ | Ticket: inprogress → inreview | Update TICKET-MAP, transition to NEEDS_REVIEW |
100
+ | Ticket: inprogress → done | Update TICKET-MAP (review skipped), check wave completion |
97
101
  | Ticket: any → cancelled | If auto_replan: run pm-replan (TARGETED). Else: log warning |
98
102
  | Wave complete | If auto_dispatch_next_wave: dispatch next wave. Else: log |
99
103
  | All tickets done | Mark as PHASE_COMPLETE (caught next cycle) |
100
- | No changes | Log: "No changes. {N} inprogress, {M} todo." |
104
+ | No changes | Log: "No changes. {N} inprogress, {M} inreview, {O} todo." |
101
105
 
102
106
  4. Update TICKET-MAP.md + STATE.md + PM-LOG.md
103
107
 
104
108
  **Stuck detection:** If a ticket has been `inprogress` for longer than 30 minutes (configurable), log a warning. After 60 minutes, consider re-dispatching with a different executor.
105
109
 
110
+ ### NEEDS_REVIEW
111
+
112
+ **Goal:** Run automated code review on tickets that workers have completed.
113
+
114
+ 1. Find all tickets with status `inreview` in TICKET-MAP.md
115
+ 2. For each `inreview` ticket:
116
+ a. Read ticket details via `mcp__vibe_kanban__get_task(task_id)`
117
+ b. Spawn `feature-dev:code-reviewer` agent via Task tool:
118
+ - Provide: ticket title, acceptance criteria, recent git commits
119
+ - Reviewer examines the diff for bugs, security issues, and code quality
120
+ c. Based on review verdict:
121
+ - **PASS:** Update ticket → `done` via `mcp__vibe_kanban__update_task(task_id, status="done")`. Update TICKET-MAP: status=done, review=passed.
122
+ - **FAIL:** Update ticket → `inprogress` via `mcp__vibe_kanban__update_task(task_id, status="inprogress")`. Append review feedback to ticket description. Re-dispatch worker to address feedback.
123
+ 3. After all reviews processed:
124
+ - Check wave completion (all done → dispatch next wave or PHASE_COMPLETE)
125
+ 4. Log review results to PM-LOG.md:
126
+ ```markdown
127
+ ## [{timestamp}] CODE_REVIEW
128
+
129
+ - Reviewed {N} tickets
130
+ - Passed: {list}
131
+ - Failed: {list with issue summaries}
132
+ - Actions: {re-dispatched / wave advanced / etc.}
133
+ ```
134
+
106
135
  ### PHASE_COMPLETE
107
136
 
108
137
  **Goal:** Advance to next phase in roadmap.
@@ -176,10 +176,10 @@ Update the Wave Summary table:
176
176
  ```markdown
177
177
  ## Wave Summary
178
178
 
179
- | Wave | Total | Done | In Progress | Todo | Failed |
180
- | ---- | ----- | ---- | ----------- | ---- | ------ |
181
- | 1 | 3 | 0 | 0 | 3 | 0 |
182
- | 2 | 2 | 0 | 0 | 2 | 0 |
179
+ | Wave | Total | Done | In Review | In Progress | Todo | Failed |
180
+ | ---- | ----- | ---- | --------- | ----------- | ---- | ------ |
181
+ | 1 | 3 | 0 | 0 | 0 | 3 | 0 |
182
+ | 2 | 2 | 0 | 0 | 0 | 2 | 0 |
183
183
  ```
184
184
 
185
185
  Update `last_polled` timestamp.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-cook",
3
- "version": "1.10.7",
3
+ "version": "1.10.8",
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"
@@ -174,12 +174,13 @@ print_progress() {
174
174
 
175
175
  if [ -n "$ticket_map" ] && [ -f "$ticket_map" ]; then
176
176
  local done_count=$(grep -c "| done " "$ticket_map" 2>/dev/null || echo "0")
177
+ local inreview_count=$(grep -c "| inreview " "$ticket_map" 2>/dev/null || echo "0")
177
178
  local inprogress_count=$(grep -c "| inprogress " "$ticket_map" 2>/dev/null || echo "0")
178
179
  local todo_count=$(grep -c "| todo " "$ticket_map" 2>/dev/null || echo "0")
179
- local total=$((done_count + inprogress_count + todo_count))
180
+ local total=$((done_count + inreview_count + inprogress_count + todo_count))
180
181
 
181
182
  if [ "$total" -gt 0 ]; then
182
- # Build progress bar
183
+ # Build progress bar (done + inreview count toward completion)
183
184
  local pct=0
184
185
  if [ "$total" -gt 0 ]; then
185
186
  pct=$((done_count * 100 / total))
@@ -191,10 +192,14 @@ print_progress() {
191
192
  for ((i=0; i<filled; i++)); do bar+="█"; done
192
193
  for ((i=0; i<empty; i++)); do bar+="░"; done
193
194
 
194
- echo " ┌─────────────────────────────────────────┐"
195
+ echo " ┌──────────────────────────────────────────────────────┐"
195
196
  echo " │ Progress: [$bar] ${pct}%"
196
- echo " │ Done: $done_count Running: $inprogress_count Todo: $todo_count Total: $total"
197
- echo " └─────────────────────────────────────────┘"
197
+ if [ "$inreview_count" -gt 0 ]; then
198
+ echo " │ Done: $done_count Review: $inreview_count Running: $inprogress_count Todo: $todo_count"
199
+ else
200
+ echo " │ Done: $done_count Running: $inprogress_count Todo: $todo_count Total: $total"
201
+ fi
202
+ echo " └──────────────────────────────────────────────────────┘"
198
203
  fi
199
204
  fi
200
205
  }
@@ -206,11 +211,12 @@ all_tickets_done() {
206
211
 
207
212
  if [ -n "$ticket_map" ] && [ -f "$ticket_map" ]; then
208
213
  local done_count=$(grep -c "| done " "$ticket_map" 2>/dev/null || echo "0")
214
+ local inreview_count=$(grep -c "| inreview " "$ticket_map" 2>/dev/null || echo "0")
209
215
  local inprogress_count=$(grep -c "| inprogress " "$ticket_map" 2>/dev/null || echo "0")
210
216
  local todo_count=$(grep -c "| todo " "$ticket_map" 2>/dev/null || echo "0")
211
- local total=$((done_count + inprogress_count + todo_count))
217
+ local total=$((done_count + inreview_count + inprogress_count + todo_count))
212
218
 
213
- if [ "$total" -gt 0 ] && [ "$inprogress_count" -eq 0 ] && [ "$todo_count" -eq 0 ]; then
219
+ if [ "$total" -gt 0 ] && [ "$inreview_count" -eq 0 ] && [ "$inprogress_count" -eq 0 ] && [ "$todo_count" -eq 0 ]; then
214
220
  return 0
215
221
  fi
216
222
  fi