codebyplan 1.13.13 → 1.13.14

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/dist/cli.js CHANGED
@@ -14,7 +14,7 @@ var VERSION, PACKAGE_NAME;
14
14
  var init_version = __esm({
15
15
  "src/lib/version.ts"() {
16
16
  "use strict";
17
- VERSION = "1.13.13";
17
+ VERSION = "1.13.14";
18
18
  PACKAGE_NAME = "codebyplan";
19
19
  }
20
20
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codebyplan",
3
- "version": "1.13.13",
3
+ "version": "1.13.14",
4
4
  "description": "CLI for CodeByPlan — AI-powered development planning and tracking",
5
5
  "type": "module",
6
6
  "bin": {
@@ -0,0 +1,51 @@
1
+ ---
2
+ name: task-routing-recommendation
3
+ scope: repo-only:codebyplan
4
+ description: Routing guide — when to use /cbp-task-* vs /cbp-standalone-task-*
5
+ ---
6
+
7
+ # Task Routing Recommendation
8
+
9
+ ## Two-Family Command Surface
10
+
11
+ CodeByPlan has two families of task commands since CHK-141:
12
+
13
+ | Family | Commands | When to use |
14
+ |--------|----------|-------------|
15
+ | Checkpoint-bound | `/cbp-task-create`, `/cbp-task-start {chk}-{task}`, `/cbp-task-check`, `/cbp-task-testing`, `/cbp-task-complete` | Work that belongs to a CHK-NNN checkpoint |
16
+ | Standalone | `/cbp-standalone-task-create`, `/cbp-standalone-task-start {task}`, `/cbp-standalone-task-check`, `/cbp-standalone-task-testing`, `/cbp-standalone-task-complete` | Independent work not tied to any checkpoint |
17
+
18
+ ## Round Commands (Both Families)
19
+
20
+ All `/cbp-round-*` commands work for both task families. The correct family is detected from the active task:
21
+ - Checkpoint-bound task in progress → round commands use checkpoint MCP tools
22
+ - Standalone task in progress → round commands use standalone MCP tools
23
+
24
+ ## Identifier Format
25
+
26
+ | Context | Correct format | Example |
27
+ |---------|----------------|---------|
28
+ | Checkpoint-bound task | `{chk}-{task}` | `141-3` = CHK-141 TASK-3 |
29
+ | Standalone task | `{task}` (bare number) | `45` = standalone TASK-45 |
30
+ | Round of checkpoint task | `{chk}-{task}-{round}` | `141-3-1` |
31
+ | Round of standalone task | `{task}-{round}` | `45-2` |
32
+
33
+ ## Bare-Number Rejection Rule
34
+
35
+ Since CHK-141, `/cbp-task-*` commands reject bare-number arguments. If you type `/cbp-task-start 45`, you will see:
36
+
37
+ ```
38
+ task-start: bare number `45` is no longer valid here.
39
+ Use /cbp-standalone-task-start 45 instead — bare numbers no longer route to standalone tasks.
40
+ ```
41
+
42
+ ## Close-Out Routing
43
+
44
+ After task completion, routes use single-directive form (never A/B/C menus):
45
+
46
+ **Checkpoint-bound task complete:**
47
+ - More tasks in checkpoint → auto-triggers next task (same context)
48
+ - Last task in checkpoint → `Next: /clear, then /cbp-checkpoint-check`
49
+
50
+ **Standalone task complete:**
51
+ - Always → `Next: /cbp-session-end` (or `/cbp-standalone-task-create` for new work)
@@ -7,6 +7,27 @@ effort: low
7
7
 
8
8
  <!-- Re-read this file before executing. Do not rely on memory. -->
9
9
 
10
+ ## Kind Detection
11
+
12
+ Inspect the resolved identifier from argument parsing to determine the task kind:
13
+
14
+ | Identifier shape | KIND |
15
+ |-----------------|------|
16
+ | `{task}-{round}` (2-segment, e.g. `45-2`) | `standalone` |
17
+ | `{chk}-{task}-{round}` (3-segment, e.g. `141-3-1`) | `checkpoint` |
18
+ | _(empty / free-text)_ | Check `get_current_standalone_task` first; if found → `standalone`. Else → `checkpoint` via `get_current_task`. |
19
+
20
+ Set `KIND` for the rest of this skill. MCP tool names vary by KIND:
21
+
22
+ | Operation | `checkpoint` KIND | `standalone` KIND |
23
+ |-----------|------------------|-------------------|
24
+ | Get task | `get_current_task(repo_id)` | `get_current_standalone_task(repo_id)` |
25
+ | Get rounds | `get_rounds(task_id)` | `get_standalone_rounds(standalone_task_id)` |
26
+ | Add round | `add_round(task_id, ...)` | `add_standalone_round(standalone_task_id, ...)` |
27
+ | Update round | `update_round(round_id, ...)` | `update_standalone_round(standalone_round_id, ...)` |
28
+ | Complete round | `complete_round(round_id, duration_minutes?)` | `complete_standalone_round(standalone_round_id, duration_minutes?, caller_worktree_id)` ⚠️ `caller_worktree_id` is REQUIRED for standalone |
29
+ | Update task | `update_task(task_id, ...)` | `update_standalone_task(standalone_task_id, ...)` |
30
+
10
31
  # Round Check Command
11
32
 
12
33
  Run automated checks independently with mandatory execution. Updates round QA. Hard fails if mandatory checks (build/lint/types) fail.
@@ -15,7 +36,10 @@ Run automated checks independently with mandatory execution. Updates round QA. H
15
36
 
16
37
  ### Step 1: Get Current Round
17
38
 
18
- Use MCP `get_current_task` to find active task, then `get_rounds` to find the in-progress round.
39
+ Use Kind Detection above to set KIND. Then:
40
+
41
+ - **checkpoint KIND**: MCP `get_current_task(repo_id)` to find active task, then `get_rounds(task_id)` to find the in-progress round.
42
+ - **standalone KIND**: MCP `get_current_standalone_task(repo_id)` to find active task, then `get_standalone_rounds(standalone_task_id)` to find the in-progress round.
19
43
 
20
44
  ### Step 2: Determine Project Root
21
45
 
@@ -59,7 +83,7 @@ Scan all captured output for:
59
83
 
60
84
  ### Step 6: Save QA Results
61
85
 
62
- Update round QA via MCP `update_round(round_id, qa: ...)`:
86
+ Update round QA via MCP `update_round(round_id, qa: ...)` (checkpoint KIND) or `update_standalone_round(standalone_round_id, qa: ...)` (standalone KIND):
63
87
 
64
88
  ```json
65
89
  {
@@ -99,6 +123,6 @@ If soft failures only: `Run /cbp-round-start to trigger auto-fix, or fix manuall
99
123
 
100
124
  ## Integration
101
125
 
102
- - **Reads**: MCP `get_current_task`, `get_rounds`
103
- - **Writes**: MCP `update_round` (qa field)
126
+ - **Reads**: MCP `get_current_task` / `get_current_standalone_task`, `get_rounds` / `get_standalone_rounds` (per KIND)
127
+ - **Writes**: MCP `update_round` / `update_standalone_round` (qa field) — per KIND
104
128
  - **Standalone**: Can be run independently at any time
@@ -5,6 +5,27 @@ description: Summary wrap-up after testing phase completes
5
5
  effort: high
6
6
  ---
7
7
 
8
+ ## Kind Detection
9
+
10
+ Inspect the resolved identifier from argument parsing to determine the task kind:
11
+
12
+ | Identifier shape | KIND |
13
+ |-----------------|------|
14
+ | `{task}-{round}` (2-segment, e.g. `45-2`) | `standalone` |
15
+ | `{chk}-{task}-{round}` (3-segment, e.g. `141-3-1`) | `checkpoint` |
16
+ | _(empty / free-text)_ | Check `get_current_standalone_task` first; if found → `standalone`. Else → `checkpoint` via `get_current_task`. |
17
+
18
+ Set `KIND` for the rest of this skill. MCP tool names vary by KIND:
19
+
20
+ | Operation | `checkpoint` KIND | `standalone` KIND |
21
+ |-----------|------------------|-------------------|
22
+ | Get task | `get_current_task(repo_id)` | `get_current_standalone_task(repo_id)` |
23
+ | Get rounds | `get_rounds(task_id)` | `get_standalone_rounds(standalone_task_id)` |
24
+ | Add round | `add_round(task_id, ...)` | `add_standalone_round(standalone_task_id, ...)` |
25
+ | Update round | `update_round(round_id, ...)` | `update_standalone_round(standalone_round_id, ...)` |
26
+ | Complete round | `complete_round(round_id, duration_minutes?)` | `complete_standalone_round(standalone_round_id, duration_minutes?, caller_worktree_id)` ⚠️ `caller_worktree_id` is REQUIRED for standalone |
27
+ | Update task | `update_task(task_id, ...)` | `update_standalone_task(standalone_task_id, ...)` |
28
+
8
29
  # Round End Command
9
30
 
10
31
  Summary phase — presents what was done, then runs code quality review to catch bugs and logic errors that automated checks miss.
@@ -21,14 +42,16 @@ See `reference/inline-fallback.md` for full trigger table, procedure, and covera
21
42
 
22
43
  ## Identifier Notation
23
44
 
24
- This skill operates on the **active** task/round resolved via MCP `get_current_task` / `get_rounds` and does not accept a positional identifier argument. Canonical chk-task-round notation — used in prose, error messages, and cross-references — follows `.claude/rules/notation-consistency.md` "CHK / TASK / ROUND Identifier Notation": `108-1` (CHK-108 TASK-1), `45` (standalone TASK-45), `108-1-2` (round 2 of CHK-108 TASK-1), `45-2` (round 2 of standalone TASK-45).
45
+ This skill operates on the **active** task/round resolved via MCP and does not accept a positional identifier argument. Canonical chk-task-round notation — used in prose, error messages, and cross-references — follows `.claude/rules/notation-consistency.md` "CHK / TASK / ROUND Identifier Notation": `108-1` (CHK-108 TASK-1), `45` (standalone TASK-45), `108-1-2` (round 2 of CHK-108 TASK-1), `45-2` (round 2 of standalone TASK-45).
25
46
 
26
47
  ## Instructions
27
48
 
28
49
  ### Step 1: Get Current Task and Round
29
50
 
30
- Use MCP `get_current_task` with repo_id (pass `checkpoint_id` if known to avoid disambiguation) to find the active task.
31
- Use MCP `get_rounds` for the task to find the in-progress round.
51
+ Use Kind Detection above to set KIND. Then:
52
+
53
+ - **checkpoint KIND**: MCP `get_current_task(repo_id)` (pass `checkpoint_id` if known) to find the active task. MCP `get_rounds(task_id)` to find the in-progress round.
54
+ - **standalone KIND**: MCP `get_current_standalone_task(repo_id)` to find the active task. MCP `get_standalone_rounds(standalone_task_id)` to find the in-progress round.
32
55
 
33
56
  Load round context with all outputs (executor_output, testing_qa_output, reviewer_output).
34
57
 
@@ -70,11 +93,11 @@ Merge with previous rounds (supersede items for re-modified files, preserve veri
70
93
 
71
94
  ### Step 4: Update Task Files and QA
72
95
 
73
- Update via MCP:
96
+ Update via MCP using KIND-appropriate tools:
74
97
 
75
- - `update_task(task_id, files_changed: [...])` — merge with existing
76
- - `update_round(round_id, files_changed: [...], qa: {items: [auto_qa items + default_checklist items]})` — round-specific
77
- - `update_task(task_id, qa: {items: [auto_qa items + default_checklist items]})` — aggregated
98
+ - `update_task(task_id, files_changed: [...])` / `update_standalone_task(standalone_task_id, files_changed: [...])` — merge with existing
99
+ - `update_round(round_id, files_changed: [...], qa: {items: [auto_qa items + default_checklist items]})` / `update_standalone_round(standalone_round_id, ...)` — round-specific
100
+ - `update_task(task_id, qa: {items: [auto_qa items + default_checklist items]})` / `update_standalone_task(standalone_task_id, qa: {items: [auto_qa items + default_checklist items]})` — aggregated
78
101
 
79
102
  ### Step 5: Present Summary
80
103
 
@@ -137,8 +160,8 @@ Example tables and the `inline` option gating spec: see `reference/findings-pres
137
160
  - Auto-accept ALL findings into `improve_round_findings[]` regardless of severity (the user opted into the loop).
138
161
  - Skip the polish-spiral stop-gate (auto-loop has its own cap-exhausted termination).
139
162
  - Skip the user findings-decision prompt.
140
- - Save findings via `update_round` exactly as in manual mode.
141
- - Auto-trigger `/cbp-round-update` immediately. round-update Step 6 will decide whether to spawn another round or exit clean (see cbp-round-update SKILL.md Step 6).
163
+ - Save findings via `update_round` / `update_standalone_round` per KIND exactly as in manual mode.
164
+ - Auto-trigger `/cbp-round-update` immediately. round-update Step 4 will decide whether to spawn another round or exit clean (see cbp-round-update SKILL.md Step 4).
142
165
 
143
166
  **Else (manual mode — flag absent or false):**
144
167
 
@@ -146,7 +169,7 @@ Run the existing flow:
146
169
 
147
170
  1. After round 2+, surface the polish-spiral stop-gate per `polish-spiral-stop-gate.md` (defer-to-followups vs continue).
148
171
  2. Surface the findings-decision AskUserQuestion (with optional `inline` per the gating rules in `reference/findings-presentation.md`).
149
- 3. Save accepted/rejected findings to round context via MCP `update_round`:
172
+ 3. Save accepted/rejected findings to round context via MCP `update_round` / `update_standalone_round` per KIND:
150
173
  ```json
151
174
  {
152
175
  "context": {
@@ -167,7 +190,7 @@ Run the existing flow:
167
190
  ## Integration
168
191
 
169
192
  - **Triggered by**: `/cbp-round-execute` (auto, after all waves + testing complete)
170
- - **Reads**: MCP `get_current_task`, `get_rounds`, round context
171
- - **Writes**: MCP `update_round`, `update_task` (files_changed, qa, findings)
193
+ - **Reads**: MCP `get_current_task` / `get_current_standalone_task`, `get_rounds` / `get_standalone_rounds` (per KIND), round context
194
+ - **Writes**: MCP `update_round` / `update_standalone_round`, `update_task` / `update_standalone_task` (files_changed, qa, findings) — per KIND
172
195
  - **Spawns**: `cbp-improve-round` (code quality review)
173
196
  - **Triggers**: `/cbp-round-update` (auto, after findings handled)
@@ -5,6 +5,27 @@ description: Execute the approved plan from /cbp-round-start — runs per-wave e
5
5
  effort: xhigh
6
6
  ---
7
7
 
8
+ ## Kind Detection
9
+
10
+ Inspect the resolved identifier from argument parsing to determine the task kind:
11
+
12
+ | Identifier shape | KIND |
13
+ |-----------------|------|
14
+ | `{task}-{round}` (2-segment, e.g. `45-2`) | `standalone` |
15
+ | `{chk}-{task}-{round}` (3-segment, e.g. `141-3-1`) | `checkpoint` |
16
+ | _(empty / free-text)_ | Check `get_current_standalone_task` first; if found → `standalone`. Else → `checkpoint` via `get_current_task`. |
17
+
18
+ Set `KIND` for the rest of this skill. MCP tool names vary by KIND:
19
+
20
+ | Operation | `checkpoint` KIND | `standalone` KIND |
21
+ |-----------|------------------|-------------------|
22
+ | Get task | `get_current_task(repo_id)` | `get_current_standalone_task(repo_id)` |
23
+ | Get rounds | `get_rounds(task_id)` | `get_standalone_rounds(standalone_task_id)` |
24
+ | Add round | `add_round(task_id, ...)` | `add_standalone_round(standalone_task_id, ...)` |
25
+ | Update round | `update_round(round_id, ...)` | `update_standalone_round(standalone_round_id, ...)` |
26
+ | Complete round | `complete_round(round_id, duration_minutes?)` | `complete_standalone_round(standalone_round_id, duration_minutes?, caller_worktree_id)` ⚠️ `caller_worktree_id` is REQUIRED for standalone |
27
+ | Update task | `update_task(task_id, ...)` | `update_standalone_task(standalone_task_id, ...)` |
28
+
8
29
  # Round Execute Command
9
30
 
10
31
  Execution and validation phase. Receives the approved plan from `/cbp-round-start`, dispatches wave executors, runs per-wave `cbp-testing-qa-agent` in parallel, and routes to `/cbp-round-end`.
@@ -17,14 +38,16 @@ Execution and validation phase. Receives the approved plan from `/cbp-round-star
17
38
 
18
39
  ## Identifier Notation
19
40
 
20
- This skill operates on the **active** task/round resolved via MCP `get_current_task` / `get_rounds` and does not accept a positional identifier argument. Canonical chk-task-round notation — used in prose, error messages, and cross-references — follows `.claude/rules/notation-consistency.md` "CHK / TASK / ROUND Identifier Notation": `108-1` (CHK-108 TASK-1), `45` (standalone TASK-45), `108-1-2` (round 2 of CHK-108 TASK-1), `45-2` (round 2 of standalone TASK-45).
41
+ This skill operates on the **active** task/round resolved via MCP and does not accept a positional identifier argument. Canonical chk-task-round notation — used in prose, error messages, and cross-references — follows `.claude/rules/notation-consistency.md` "CHK / TASK / ROUND Identifier Notation": `108-1` (CHK-108 TASK-1), `45` (standalone TASK-45), `108-1-2` (round 2 of CHK-108 TASK-1), `45-2` (round 2 of standalone TASK-45).
21
42
 
22
43
  ## Instructions
23
44
 
24
45
  ### Step 1: Get Current Task and Round
25
46
 
26
- Use MCP `get_current_task` with repo_id (pass checkpoint_id if known) to find the active task.
27
- Use MCP `get_rounds` for the task to find the in-progress round.
47
+ Use Kind Detection above to set KIND. Then:
48
+
49
+ - **checkpoint KIND**: MCP `get_current_task(repo_id)` (pass checkpoint_id if known) to find the active task. MCP `get_rounds(task_id)` to find the in-progress round.
50
+ - **standalone KIND**: MCP `get_current_standalone_task(repo_id)` to find the active task. MCP `get_standalone_rounds(standalone_task_id)` to find the in-progress round.
28
51
 
29
52
  If no in-progress round: `No active round. Run /cbp-round-start first.`
30
53
 
@@ -178,7 +201,7 @@ Per-wave hard-fail signal — true when ANY hold:
178
201
  **All waves hard_fail: false** → proceed to Step 7. **Any wave hard_fail: true**:
179
202
 
180
203
  - **Simple fixes** (type errors, lint, missing imports, test assertion fixes, e2e `real`-category with clear code-side root cause, no prior re-trigger this round) → save failure details to round context; retrigger the failing wave's executor; re-run testing-qa AND the eligible `cbp-e2e-*` specialists for that wave.
181
- - **Structural OR already re-triggered once OR e2e preflight aborts OR `e2e_eligible_skipped`** → save failure context via MCP `update_round`; auto-trigger `/cbp-round-input`. STOP.
204
+ - **Structural OR already re-triggered once OR e2e preflight aborts OR `e2e_eligible_skipped`** → save failure context via MCP `update_round` / `update_standalone_round` per KIND; auto-trigger `/cbp-round-input`. STOP.
182
205
 
183
206
  ## Inline execution fallback
184
207
 
@@ -190,7 +213,7 @@ When `cbp-testing-qa-agent` spawn fails OR the resolved `testing_profile` is `cl
190
213
 
191
214
  ### Step 7: Save Executor Output
192
215
 
193
- Update round context via MCP `update_round`:
216
+ Update round context via MCP `update_round` / `update_standalone_round` per KIND:
194
217
 
195
218
  - `context`: { ...existing, executor_output, testing_qa_output, e2e_eligible, e2e_outputs, frontend_ui_review }
196
219
 
@@ -216,8 +239,8 @@ Trigger `/cbp-round-end`.
216
239
 
217
240
  ## Integration
218
241
 
219
- - **Reads**: MCP `get_current_task`, `get_rounds`
220
- - **Writes**: MCP `update_round` (context with executor_output + testing_qa_output + e2e_eligible + e2e_outputs + frontend_ui_review)
242
+ - **Reads**: MCP `get_current_task` / `get_current_standalone_task`, `get_rounds` / `get_standalone_rounds` (per KIND)
243
+ - **Writes**: MCP `update_round` / `update_standalone_round` (context with executor_output + testing_qa_output + e2e_eligible + e2e_outputs + frontend_ui_review) — per KIND
221
244
  - **Spawns**: `cbp-round-executor` (per wave or single), `cbp-testing-qa-agent` (per wave, parallel sibling of the `cbp-e2e-*` specialists), the `cbp-e2e-*` specialists (config-driven dispatch per `context/testing/e2e.md`, one per eligible framework in `.codebyplan/e2e.json`), `cbp-database-agent` (if DB work), `cbp-security-agent` (if security review needed)
222
245
  - **Skill invocations**: `cbp-frontend-ui` at Step 5b with `phase: 'screenshot_review'` (post-e2e)
223
246
  - **Triggers**: `/cbp-round-end` (auto)
@@ -6,6 +6,27 @@ argument-hint: [chk-task-round | task-round | requirements-text]
6
6
  effort: xhigh
7
7
  ---
8
8
 
9
+ ## Kind Detection
10
+
11
+ Inspect the resolved identifier from argument parsing to determine the task kind:
12
+
13
+ | Identifier shape | KIND |
14
+ |-----------------|------|
15
+ | `{task}-{round}` (2-segment, e.g. `45-2`) | `standalone` |
16
+ | `{chk}-{task}-{round}` (3-segment, e.g. `141-3-1`) | `checkpoint` |
17
+ | _(empty / free-text)_ | Check `get_current_standalone_task` first; if found → `standalone`. Else → `checkpoint` via `get_current_task`. |
18
+
19
+ Set `KIND` for the rest of this skill. MCP tool names vary by KIND:
20
+
21
+ | Operation | `checkpoint` KIND | `standalone` KIND |
22
+ |-----------|------------------|-------------------|
23
+ | Get task | `get_current_task(repo_id)` | `get_current_standalone_task(repo_id)` |
24
+ | Get rounds | `get_rounds(task_id)` | `get_standalone_rounds(standalone_task_id)` |
25
+ | Add round | `add_round(task_id, ...)` | `add_standalone_round(standalone_task_id, ...)` |
26
+ | Update round | `update_round(round_id, ...)` | `update_standalone_round(standalone_round_id, ...)` |
27
+ | Complete round | `complete_round(round_id, duration_minutes?)` | `complete_standalone_round(standalone_round_id, duration_minutes?, caller_worktree_id)` ⚠️ `caller_worktree_id` is REQUIRED for standalone |
28
+ | Update task | `update_task(task_id, ...)` | `update_standalone_task(standalone_task_id, ...)` |
29
+
9
30
  # Round Input Command
10
31
 
11
32
  Gathers input for a new round. Performs deep analysis of unapproved files, requirements coverage, and testing-QA failures before formulating requirements. Follow-up rounds get the same depth as round 1.
@@ -28,7 +49,7 @@ Try the numeric identifier regex first: `^[0-9]+(-[0-9]+){0,2}$`
28
49
  | `{task}` (e.g. `45`) | 1 | Standalone TASK-{task} next round (matches cbp-task-start standalone convention) |
29
50
  | `{chk}-{task}` (e.g. `108-1`) | 2 | CHK-{chk} TASK-{task} next round (round number implicit — round-input creates a new round) |
30
51
  | `{chk}-{task}-{round}` (e.g. `108-1-2`) | 3 | CHK-{chk} TASK-{task} targeting ROUND-{round} (existing round context) |
31
- | _(no match / empty)_ | — | Free-text requirements (passed through to Step 5) OR empty → use `get_current_task` |
52
+ | _(no match / empty)_ | — | Free-text requirements (passed through to Step 5) OR empty → use Kind Detection |
32
53
 
33
54
  If the argument matches the numeric regex, resolve the target task/round from DB. If no match (or empty), treat the argument as free-text requirements and proceed to Step 2 for context (free-text path still runs deep analysis before Step 5).
34
55
 
@@ -37,16 +58,16 @@ If the argument matches the numeric regex, resolve the target task/round from DB
37
58
  - `round-input 45` → standalone TASK-45 next round
38
59
  - `round-input 108-1` → CHK-108 TASK-1 next round
39
60
  - `round-input 108-1-2` → CHK-108 TASK-1 ROUND-2
40
- - `round-input` (no arg) → active task via `get_current_task`
61
+ - `round-input` (no arg) → active task via Kind Detection
41
62
  - `round-input Fix the broken lint rule in the auth module` → free-text requirements (numeric regex fails → falls through to free-text path)
42
63
 
43
64
  > **Note on 2-segment divergence**: `round-input 108-1` resolves to **CHK-108 TASK-1** (targeting that task's next round). This diverges from `/cbp-round-start` where the 2-segment `108-1` means **standalone TASK-108 ROUND-1**. Round-input always operates on a task-level context (it creates a new round on a task), so the round number is implicit and 2 segments are interpreted as `{chk}-{task}`. To target a standalone task here, use the 1-segment form `45`. To target a specific existing round, use the 3-segment form `108-1-2`.
44
65
 
45
66
  ### Step 2: Deep Analysis (MANDATORY — always runs)
46
67
 
47
- **2a:** Load task via MCP `get_current_task` (pass `checkpoint_id` if known to avoid disambiguation) — get `files_changed`, `requirements`, `context`, `qa`
68
+ **2a:** Load task via KIND-appropriate MCP tool (`get_current_task` or `get_current_standalone_task`) — get `files_changed`, `requirements`, `context`, `qa`
48
69
 
49
- **2b:** Load all rounds via MCP `get_rounds(task_id)` — get previous round context, testing-qa output
70
+ **2b:** Load all rounds via MCP `get_rounds(task_id)` (checkpoint KIND) or `get_standalone_rounds(standalone_task_id)` (standalone KIND) — get previous round context, testing-qa output
50
71
 
51
72
  **2c:** Identify unapproved files from `task.files_changed` where `user_approved === false`
52
73
 
@@ -123,10 +144,10 @@ Based on the analysis + user input, create detailed requirements that:
123
144
 
124
145
  If the new round requirements change the task direction:
125
146
 
126
- 1. Update task context via MCP `update_task(task_id, context: { ... })`:
147
+ 1. Update task context via MCP `update_task(task_id, context: { ... })` / `update_standalone_task(standalone_task_id, context: { ... })` per KIND:
127
148
  - Add new decisions to `context.decisions[]`
128
149
  - Update `context.discoveries[]` if applicable
129
- 2. If checkpoint-level changes needed, update checkpoint context via MCP `update_checkpoint`
150
+ 2. If checkpoint-level changes needed (checkpoint KIND only), update checkpoint context via MCP `update_checkpoint`
130
151
 
131
152
  ### Step 7: Auto-trigger Round Start
132
153
 
@@ -145,8 +166,8 @@ Trigger `/cbp-round-start` with the round requirements as arguments.
145
166
  If this command is triggered **directly** (not via `/cbp-todo`) and no context is available in the session:
146
167
 
147
168
  1. Read `.codebyplan/repo.json` for `repo_id`
148
- 2. Use MCP `get_current_task` to load checkpoint + task
149
- 3. Use MCP `get_rounds(task_id)` to load round history
169
+ 2. Use Kind Detection to determine KIND, then use the appropriate MCP tool to load checkpoint + task
170
+ 3. Use MCP `get_rounds(task_id)` / `get_standalone_rounds(standalone_task_id)` per KIND to load round history
150
171
  4. Continue from Step 2 (deep analysis handles all context loading)
151
172
 
152
173
  ## Key Rules
@@ -160,6 +181,6 @@ If this command is triggered **directly** (not via `/cbp-todo`) and no context i
160
181
  ## Integration
161
182
 
162
183
  - **Triggered by**: `/cbp-round-update` (auto, unapproved files), `/cbp-round-execute` (auto, on hard-fail after retry exhausted), `/cbp-todo` (after /clear), user manually
163
- - **Reads**: MCP `get_current_task`, `get_rounds`, file contents (Read tool)
164
- - **Writes**: MCP `update_task` (context), `update_checkpoint` (context, if needed)
184
+ - **Reads**: MCP `get_current_task` / `get_current_standalone_task`, `get_rounds` / `get_standalone_rounds` (per KIND), file contents (Read tool)
185
+ - **Writes**: MCP `update_task` / `update_standalone_task` (context), `update_checkpoint` (context, if checkpoint KIND and needed)
165
186
  - **Triggers**: `/cbp-round-start` (auto)
@@ -7,6 +7,27 @@ argument-hint: [chk-task-round | task-round | requirements-text] # e.g. `108-1-
7
7
  effort: xhigh
8
8
  ---
9
9
 
10
+ ## Kind Detection
11
+
12
+ Inspect the resolved identifier from argument parsing to determine the task kind:
13
+
14
+ | Identifier shape | KIND |
15
+ |-----------------|------|
16
+ | `{task}-{round}` (2-segment, e.g. `45-2`) | `standalone` |
17
+ | `{chk}-{task}-{round}` (3-segment, e.g. `141-3-1`) | `checkpoint` |
18
+ | _(empty / free-text)_ | Check `get_current_standalone_task` first; if found → `standalone`. Else → `checkpoint` via `get_current_task`. |
19
+
20
+ Set `KIND` for the rest of this skill. MCP tool names vary by KIND:
21
+
22
+ | Operation | `checkpoint` KIND | `standalone` KIND |
23
+ |-----------|------------------|-------------------|
24
+ | Get task | `get_current_task(repo_id)` | `get_current_standalone_task(repo_id)` |
25
+ | Get rounds | `get_rounds(task_id)` | `get_standalone_rounds(standalone_task_id)` |
26
+ | Add round | `add_round(task_id, ...)` | `add_standalone_round(standalone_task_id, ...)` |
27
+ | Update round | `update_round(round_id, ...)` | `update_standalone_round(standalone_round_id, ...)` |
28
+ | Complete round | `complete_round(round_id, duration_minutes?)` | `complete_standalone_round(standalone_round_id, duration_minutes?, caller_worktree_id)` ⚠️ `caller_worktree_id` is REQUIRED for standalone |
29
+ | Update task | `update_task(task_id, ...)` | `update_standalone_task(standalone_task_id, ...)` |
30
+
10
31
  # Round Start Command
11
32
 
12
33
  Planning phase for a new round. Analyzes context, creates plan, gets user approval. NO execution or testing — those are separate commands.
@@ -31,7 +52,7 @@ Inline-fallback is NOT a quality downgrade trapdoor — Phase 1.5 row-by-row ver
31
52
  /cbp-round-start (planning) → [user approval] → /cbp-round-execute (auto)
32
53
  ```
33
54
 
34
- **Auto-loop mode**: when `round.context.auto_loop_mode === true` flows in from `/cbp-round-input`, Step 6 (Q&A) and Step 8 (user approval) skip user prompts. See cbp-round-update SKILL.md Step 6 (auto-loop decision) and cbp-round-end SKILL.md Step 8 for the full contract.
55
+ **Auto-loop mode**: when `round.context.auto_loop_mode === true` flows in from `/cbp-round-input`, Step 6 (Q&A) and Step 8 (user approval) skip user prompts. See cbp-round-update SKILL.md Step 4 (auto-loop decision) and cbp-round-end SKILL.md Step 8 for the full contract.
35
56
 
36
57
  ## Instructions
37
58
 
@@ -44,7 +65,7 @@ Disambiguate the argument up front. Three input shapes (see `.claude/rules/notat
44
65
  | `{chk}-{task}-{round}` (e.g. `108-1-2`) | `^[0-9]+-[0-9]+-[0-9]+$` | **Identifier**: targets round {round} of CHK-{chk} TASK-{task}. Sets `target_checkpoint`, `target_task`, `target_round`. |
45
66
  | `{task}-{round}` (e.g. `45-2`) | `^[0-9]+-[0-9]+$` | **Identifier**: targets round {round} of standalone TASK-{task}. Sets `target_task`, `target_round` (no checkpoint). |
46
67
  | Non-empty, non-identifier-shaped | — | **Free-text round requirements** (the round-input passthrough path). |
47
- | _(empty)_ | — | No identifier, no requirements text — derive task/round from `get_current_task` / `get_rounds`. |
68
+ | _(empty)_ | — | No identifier, no requirements text — derive task/round from Kind Detection above. |
48
69
 
49
70
  Malformed identifier shapes (`108-`, `-1-2`, `108--1`, `abc-1`) — surface this error and stop, mirroring `/cbp-task-start`'s error vocabulary:
50
71
 
@@ -62,7 +83,7 @@ round-start: invalid argument `{value}`. Expected:
62
83
  - `round-start 45-2` → resolve standalone TASK-45, target round 2
63
84
  - `round-start 108-1` → **standalone TASK-108 round 1** (NOT CHK-108 TASK-1). The 2-segment form means `{task}-{round}`; checkpoint-bound round-targeting requires all three numbers (`108-1-2`). If you got here trying to target CHK-108 TASK-1, you want `108-1-2` (specifying a round number) or `/cbp-task-start 108-1` (specifying just a task).
64
85
  - `round-start "Implement OAuth flow per CHK-X plan"` → free-text path; current-task/round derivation from state
65
- - `round-start` (empty) → derive from `get_current_task` / `get_rounds`; round 1 uses `task.requirements`
86
+ - `round-start` (empty) → derive from Kind Detection; round 1 uses `task.requirements`
66
87
  - `round-start 108-` → error: malformed identifier
67
88
  - `round-start -1-2` → error: malformed identifier
68
89
  - `round-start abc-1` → error: malformed identifier
@@ -71,17 +92,17 @@ round-start: invalid argument `{value}`. Expected:
71
92
 
72
93
  ### Step 1: Get Current Task
73
94
 
74
- If Step 0 produced an identifier (`target_task` set): resolve directly per the identifier (bound or standalone) — MCP `get_checkpoints` + `get_tasks`, or `get_tasks(standalone: true)`.
95
+ If Step 0 produced an identifier (`target_task` set): resolve directly per the identifier (bound or standalone) — use KIND-appropriate MCP tools per the Kind Detection table above.
75
96
 
76
- Otherwise: use MCP `get_current_task` with repo_id (pass checkpoint_id if known to avoid disambiguation) to find the active checkpoint and in-progress task.
97
+ Otherwise: use Kind Detection to determine KIND, then use MCP `get_current_task` (checkpoint KIND) or `get_current_standalone_task` (standalone KIND) with repo_id to find the active task.
77
98
 
78
99
  If no in-progress task and Step 0 produced no identifier, show error: `No active task. Run /cbp-task-start first.`
79
100
 
80
101
  ### Step 2: Determine Round Number
81
102
 
82
- If Step 0 produced `target_round`: use that as the round number directly (may target an existing round for resume, or N+1 for a new round — disambiguate by checking MCP `get_rounds`).
103
+ If Step 0 produced `target_round`: use that as the round number directly (may target an existing round for resume, or N+1 for a new round — disambiguate by checking MCP `get_rounds` / `get_standalone_rounds` per KIND).
83
104
 
84
- Otherwise: use MCP `get_rounds` for the task; count existing rounds; next is N+1.
105
+ Otherwise: use MCP `get_rounds` (checkpoint KIND) or `get_standalone_rounds` (standalone KIND) for the task; count existing rounds; next is N+1.
85
106
 
86
107
  ### Step 3: Gather Round Requirements
87
108
 
@@ -99,8 +120,8 @@ Otherwise: use MCP `get_rounds` for the task; count existing rounds; next is N+1
99
120
 
100
121
  ### Step 4: Create Round in DB
101
122
 
102
- Use MCP `add_round`:
103
- - `task_id`: current task ID
123
+ Use MCP `add_round` (checkpoint KIND) or `add_standalone_round` (standalone KIND):
124
+ - `task_id` (checkpoint) / `standalone_task_id` (standalone): current task ID
104
125
  - `number`: next round number
105
126
  - `status`: "in_progress"
106
127
  - `started_at`: now (ISO format)
@@ -115,7 +136,7 @@ Load from checkpoint and task:
115
136
  - Task context and requirements
116
137
  - Resources from checkpoint and task (documentation links, API docs, guides)
117
138
  - Previous round results (files_changed, QA results)
118
- - For round 2+: load the latest completed round's `context.testing_qa_output` and `context.executor_output` via `get_rounds` response
139
+ - For round 2+: load the latest completed round's `context.testing_qa_output` and `context.executor_output` via `get_rounds` / `get_standalone_rounds` per KIND
119
140
  - Identify unapproved files from task.files_changed (where user_approved === false)
120
141
 
121
142
  ### Step 6: First Round Analysis (Round 1 only)
@@ -126,7 +147,7 @@ For the first round only:
126
147
  2. Identify any ambiguities or gaps
127
148
  3. If questions are needed, ask user via AskUserQuestion (max 4 per batch)
128
149
  4. If task context changes from Q&A answers:
129
- - Update task context via MCP `update_task(task_id, context: {...})`
150
+ - Update task context via MCP `update_task(task_id, context: {...})` / `update_standalone_task(standalone_task_id, context: {...})` per KIND
130
151
  - Save Q&A decisions as `context.decisions[]`
131
152
 
132
153
  Skip this step for round 2+ (context already established via `/cbp-round-input`).
@@ -199,7 +220,7 @@ Single-wave plans present the existing flat plan view (no wave table) — backwa
199
220
 
200
221
  ### Step 9: Auto-trigger Round Execute
201
222
 
202
- On approval, save planner output to round context via MCP `update_round`, then trigger `/cbp-round-execute`.
223
+ On approval, save planner output to round context via MCP `update_round` / `update_standalone_round` per KIND, then trigger `/cbp-round-execute`.
203
224
 
204
225
  ```
205
226
  Plan approved. Starting execution phase...
@@ -215,8 +236,8 @@ Plan approved. Starting execution phase...
215
236
 
216
237
  ## Integration
217
238
 
218
- - **Reads**: MCP `get_current_task`, `get_rounds`
219
- - **Writes**: MCP `add_round`, `update_round`, `update_task` (context only)
239
+ - **Reads**: MCP `get_current_task` / `get_current_standalone_task`, `get_rounds` / `get_standalone_rounds` (per KIND)
240
+ - **Writes**: MCP `add_round` / `add_standalone_round`, `update_round` / `update_standalone_round`, `update_task` / `update_standalone_task` (context only) — per KIND
220
241
  - **Spawns**: `cbp-task-planner`
221
242
  - **Triggers**: `/cbp-round-execute` (auto, on plan approval)
222
243
  - **Triggered by**: `/cbp-task-start` (round 1), `/cbp-round-input` (round 2+)
@@ -3,10 +3,31 @@ scope: org-shared
3
3
  name: cbp-round-update
4
4
  description: Check file approvals, complete round, and route to next step
5
5
  argument-hint: [chk-task-round | task-round]
6
- triggers: [cbp-round-input, cbp-task-check]
6
+ triggers: [cbp-round-input, cbp-task-check, cbp-standalone-task-check]
7
7
  effort: low
8
8
  ---
9
9
 
10
+ ## Kind Detection
11
+
12
+ Inspect the resolved identifier from argument parsing to determine the task kind:
13
+
14
+ | Identifier shape | KIND |
15
+ |-----------------|------|
16
+ | `{task}-{round}` (2-segment, e.g. `45-2`) | `standalone` |
17
+ | `{chk}-{task}-{round}` (3-segment, e.g. `141-3-1`) | `checkpoint` |
18
+ | _(empty / free-text)_ | Check `get_current_standalone_task` first; if found → `standalone`. Else → `checkpoint` via `get_current_task`. |
19
+
20
+ Set `KIND` for the rest of this skill. MCP tool names vary by KIND:
21
+
22
+ | Operation | `checkpoint` KIND | `standalone` KIND |
23
+ |-----------|------------------|-------------------|
24
+ | Get task | `get_current_task(repo_id)` | `get_current_standalone_task(repo_id)` |
25
+ | Get rounds | `get_rounds(task_id)` | `get_standalone_rounds(standalone_task_id)` |
26
+ | Add round | `add_round(task_id, ...)` | `add_standalone_round(standalone_task_id, ...)` |
27
+ | Update round | `update_round(round_id, ...)` | `update_standalone_round(standalone_round_id, ...)` |
28
+ | Complete round | `complete_round(round_id, duration_minutes?)` | `complete_standalone_round(standalone_round_id, duration_minutes?, caller_worktree_id)` ⚠️ `caller_worktree_id` is REQUIRED for standalone |
29
+ | Update task | `update_task(task_id, ...)` | `update_standalone_task(standalone_task_id, ...)` |
30
+
10
31
  # Round Update Command
11
32
 
12
33
  Checks file approval status, completes the round, and routes to next step. NEVER asks the user to git add or stage anything — it only reads current state.
@@ -29,7 +50,7 @@ Parse the argument using the canonical chk-task-round notation (see `.claude/rul
29
50
  |-------|-------|-------------|
30
51
  | `{chk}-{task}-{round}` (e.g. `108-1-2`) | `^[0-9]+-[0-9]+-[0-9]+$` | Checkpoint-bound: CHK-{chk} TASK-{task} ROUND-{round} |
31
52
  | `{task}-{round}` (e.g. `45-2`) | `^[0-9]+-[0-9]+$` | Standalone: standalone TASK-{task} ROUND-{round} |
32
- | _(empty)_ | — | Use MCP `get_current_task` / `get_rounds` to find the active task and latest round |
53
+ | _(empty)_ | — | Use Kind Detection to find active task and latest round |
33
54
 
34
55
  Anything else is malformed — surface this error and stop:
35
56
 
@@ -46,7 +67,7 @@ Error cases: `abc`, `108-`, `-1`, anything with whitespace or non-numeric charac
46
67
 
47
68
  - `round-update 108-1-2` → CHK-108 TASK-1 ROUND-2
48
69
  - `round-update 45-2` → standalone TASK-45 ROUND-2
49
- - `round-update` (no arg) → active task and latest in-progress round via `get_current_task` + `get_rounds`
70
+ - `round-update` (no arg) → active task and latest in-progress round via Kind Detection
50
71
  - `round-update abc` → error: malformed
51
72
 
52
73
  ### Step 1.5: Get Current Task and Round
@@ -56,8 +77,8 @@ Given the parse from Step 1:
56
77
  | Parse | Resolution path |
57
78
  |-------|-----------------|
58
79
  | `{chk}-{task}-{round}` | MCP `get_checkpoints(repo_id)` → filter `number === {chk}`. MCP `get_tasks(checkpoint_id)` → filter `number === {task}`. MCP `get_rounds(task_id)` → filter `number === {round}`. |
59
- | `{task}-{round}` | MCP `get_tasks(repo_id, standalone: true)` filter `number === {task}`. MCP `get_rounds(task_id)` → filter `number === {round}`. |
60
- | _(empty)_ | MCP `get_current_task(repo_id)` to find active task. MCP `get_rounds(task_id)` to find latest round (in-progress or completed). |
80
+ | `{task}-{round}` | MCP `get_standalone_rounds` via `get_current_standalone_task` or direct task lookup → filter `number === {round}`. |
81
+ | _(empty)_ | Use Kind Detection: checkpoint KIND → MCP `get_current_task(repo_id)` + `get_rounds(task_id)`; standalone KIND MCP `get_current_standalone_task(repo_id)` + `get_standalone_rounds(standalone_task_id)`. |
61
82
 
62
83
  If no task found: `No active task. Nothing to update.`
63
84
 
@@ -108,7 +129,16 @@ If the command exits non-zero, surface the stderr and STOP. Do NOT proceed to St
108
129
  ### Step 3: Complete Round
109
130
 
110
131
  Calculate duration from `started_at` to now in minutes.
111
- Use MCP `complete_round(round_id, duration_minutes)`.
132
+
133
+ - **checkpoint KIND**: MCP `complete_round(round_id, duration_minutes)`.
134
+ - **standalone KIND**: MCP `complete_standalone_round(standalone_round_id, duration_minutes, caller_worktree_id)`. ⚠️ `caller_worktree_id` is REQUIRED — resolve via `CALLER_WT=$(npx codebyplan resolve-worktree 2>/dev/null)`. If `CALLER_WT` is empty, surface this warning and ask user to confirm before proceeding:
135
+
136
+ ```
137
+ Warning: could not resolve caller_worktree_id (npx codebyplan resolve-worktree returned empty).
138
+ The complete_standalone_round call may be rejected by the pre-guard. Proceed anyway? (yes / no)
139
+ ```
140
+
141
+ If user confirms yes, proceed with `caller_worktree_id: ""`. If no, stop.
112
142
 
113
143
  ### Step 4: Auto-Loop Decision
114
144
 
@@ -118,7 +148,7 @@ Procedure:
118
148
 
119
149
  1. Compute `next_index = (round.context.auto_loop_index ?? 0) + 1`.
120
150
  2. **If `next_index > (round.context.auto_loop_cap ?? 5)`**: surface the cap-exhausted prompt via AskUserQuestion (options: extend cap, stop loop / drop into round-input, close task as-is). Persist `round.context.auto_loop_cap_exhausted = { user_choice, decided_at }` and route per choice.
121
- 3. **Otherwise**: persist `round.context.auto_loop_decision = { spawned_next: true, next_index, decided_at }` on the CURRENT round via `update_round` (audit trail), then auto-trigger `/cbp-round-input` with NO AskUserQuestion. Pass `auto_loop_mode: true`, `auto_loop_index: next_index`, `auto_loop_cap: (prior cap ?? 5)` forward — round-start Step 4 persists them on the new round.
151
+ 3. **Otherwise**: persist `round.context.auto_loop_decision = { spawned_next: true, next_index, decided_at }` on the CURRENT round via `update_round` / `update_standalone_round` per KIND (audit trail), then auto-trigger `/cbp-round-input` with NO AskUserQuestion. Pass `auto_loop_mode: true`, `auto_loop_index: next_index`, `auto_loop_cap: (prior cap ?? 5)` forward — round-start Step 4 persists them on the new round.
122
152
 
123
153
  > **Permission-gate note**: the "NO AskUserQuestion" in item 3 governs only the auto-loop's decision to spawn `/cbp-round-input` — it does not add a prompt for that hand-off. It is NOT a bypass of the Step 1.6 permission gate: when the spawned round eventually re-enters `/cbp-round-update`, Step 1.6 prompts again (the gate always fires, including inside the auto-loop).
124
154
 
@@ -135,7 +165,7 @@ If BOTH signals are clean, fall through to Step 5 (exit routing).
135
165
  Survey rounds produce no file diff; A/B/C predicates assume `files_changed[]` non-empty. Survey routing is decided by `improve_round_findings[]` instead:
136
166
 
137
167
  - `improve_round_findings[]` non-empty → auto-trigger `/cbp-round-input`
138
- - `improve_round_findings[]` empty → auto-trigger `/cbp-task-check`
168
+ - `improve_round_findings[]` empty → checkpoint KIND: auto-trigger `/cbp-task-check`; standalone KIND: auto-trigger `/cbp-standalone-task-check`
139
169
 
140
170
  Output: `"## Round [N] Complete — Survey Round"` with duration, files=0, findings count, routing message. Skip Branches A/B/C.
141
171
 
@@ -150,7 +180,7 @@ Output: `"## Round [N] Complete — Survey Round"` with duration, files=0, findi
150
180
 
151
181
  Surface AskUserQuestion (clean-exit user-gate):
152
182
 
153
- - **(a) close & complete round** → auto-trigger `/cbp-task-check`
183
+ - **(a) close & complete round** → checkpoint KIND: auto-trigger `/cbp-task-check`; standalone KIND: auto-trigger `/cbp-standalone-task-check`
154
184
  - **(b) start new round** → auto-trigger `/cbp-round-input`
155
185
 
156
186
  Persist `round.context.auto_loop_exit = { staged_count, unstaged_count, route, decided_at }`.
@@ -187,11 +217,12 @@ Unreachable in the auto-loop path — Step 4 catches it first. Retained for MANU
187
217
  - **Step 4 owns the dirty-loop case**; Step 5 owns the clean-exit case. Step 5 Branch C is for manual invocation only.
188
218
  - **NEVER ask user to git add files** — only reads staging status. **NEVER stage files** — Claude does not touch git staging area.
189
219
  - Auto-triggered by `/cbp-round-end`, or run manually by user.
220
+ - **standalone KIND Step 3**: `caller_worktree_id` is REQUIRED for `complete_standalone_round` — always resolve and pass it.
190
221
 
191
222
  ## Integration
192
223
 
193
224
  - **Gates**: Step 1.6 permission gate — asks the user to confirm before any side effect; **Cancel** aborts cleanly with no writes. Fires on every invocation incl. the Step 4 auto-loop; sits before and independent of the top-of-file Step 2 hard gate.
194
225
  - **Triggered by**: `/cbp-round-end` (auto), or user manually
195
- - **Reads**: MCP `get_current_task`, `get_rounds`; delegates git+approval sync to `npx codebyplan round sync-approvals`
196
- - **Writes**: MCP `update_round` (auto_loop_decision / auto_loop_exit / auto_loop_cap_exhausted), `complete_round`; round+task files_changed written by CLI
197
- - **Triggers**: `/cbp-round-input` (Step 4 dirty-loop spawn; Branch A 'b' choice; Branch B auto-loop-exit; Branch C manual), `/cbp-task-check` (Branch A 'a' choice; Branch D survey-clean), staging-gate stop (Branch B manual mode), cap-exhausted prompt routes from Step 4 (any of the three options)
226
+ - **Reads**: MCP `get_current_task` / `get_current_standalone_task`, `get_rounds` / `get_standalone_rounds` (per KIND); delegates git+approval sync to `npx codebyplan round sync-approvals`
227
+ - **Writes**: MCP `update_round` / `update_standalone_round` (auto_loop_decision / auto_loop_exit / auto_loop_cap_exhausted); `complete_round` / `complete_standalone_round` (per KIND); round+task files_changed written by CLI
228
+ - **Triggers**: `/cbp-round-input` (Step 4 dirty-loop spawn; Branch A 'b' choice; Branch B auto-loop-exit; Branch C manual), `/cbp-task-check` (Branch A 'a' choice per checkpoint KIND; Branch D survey-clean per checkpoint KIND), `/cbp-standalone-task-check` (Branch A 'a' choice per standalone KIND; Branch D survey-clean per standalone KIND), staging-gate stop (Branch B manual mode), cap-exhausted prompt routes from Step 4 (any of the three options)