codebyplan 1.13.53 → 1.13.55

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.
Files changed (84) hide show
  1. package/dist/cli.js +1364 -352
  2. package/package.json +1 -1
  3. package/templates/agents/cbp-database-agent.md +1 -1
  4. package/templates/agents/cbp-e2e-maestro.md +1 -1
  5. package/templates/agents/cbp-e2e-playwright.md +24 -16
  6. package/templates/agents/cbp-e2e-tauri.md +1 -1
  7. package/templates/agents/cbp-e2e-vscode.md +1 -1
  8. package/templates/agents/cbp-e2e-xcuitest.md +1 -1
  9. package/templates/agents/cbp-improve-claude.md +2 -2
  10. package/templates/agents/{cbp-round-executor.md → cbp-round-builder.md} +23 -23
  11. package/templates/agents/{cbp-task-planner.md → cbp-round-planner.md} +26 -25
  12. package/templates/agents/cbp-security-agent.md +1 -1
  13. package/templates/agents/cbp-stripe-agent.md +2 -2
  14. package/templates/agents/cbp-testing-qa-agent.md +11 -11
  15. package/templates/agents/cbp-verify-reviewer.md +236 -0
  16. package/templates/context/architecture-map.md +4 -4
  17. package/templates/context/mcp-docs.md +57 -11
  18. package/templates/context/testing/e2e.md +9 -9
  19. package/templates/github-workflows/ci.yml +58 -0
  20. package/templates/hooks/cbp-skill-context-guard.sh +1 -1
  21. package/templates/hooks/cbp-test-hooks.sh +9 -9
  22. package/templates/hooks/validate-structure-lengths.sh +1 -1
  23. package/templates/hooks/validate-structure-patterns.sh +1 -1
  24. package/templates/rules/README.md +1 -2
  25. package/templates/rules/agent-claim-verification.md +1 -1
  26. package/templates/rules/context-file-loading.md +10 -10
  27. package/templates/rules/development-workflow.md +73 -0
  28. package/templates/rules/e2e-mandatory.md +8 -8
  29. package/templates/rules/execution-proof.md +70 -0
  30. package/templates/rules/model-invocation-convention.md +2 -2
  31. package/templates/rules/parallel-waves.md +11 -11
  32. package/templates/rules/spawn-failure-is-gate-failure.md +76 -0
  33. package/templates/rules/task-routing-recommendation.md +1 -1
  34. package/templates/rules/todo-backend.md +3 -3
  35. package/templates/rules/two-tier-ci.md +63 -0
  36. package/templates/settings.project.base.json +8 -10
  37. package/templates/skills/cbp-build-cc-mode/SKILL.md +1 -1
  38. package/templates/skills/cbp-build-cc-settings/reference/cbp-permission-policy.md +7 -7
  39. package/templates/skills/cbp-build-cc-skill/SKILL.md +1 -1
  40. package/templates/skills/cbp-build-cc-skill/reference/cbp-quality.md +2 -2
  41. package/templates/skills/cbp-build-cc-skill/reference/fork-eligibility.md +11 -14
  42. package/templates/skills/cbp-checkpoint-check/SKILL.md +2 -2
  43. package/templates/skills/cbp-checkpoint-create/SKILL.md +16 -1
  44. package/templates/skills/cbp-checkpoint-update/SKILL.md +3 -3
  45. package/templates/skills/cbp-clear-continue/SKILL.md +2 -2
  46. package/templates/skills/cbp-clear-prep/SKILL.md +3 -3
  47. package/templates/skills/{cbp-task-complete → cbp-finalize}/SKILL.md +25 -29
  48. package/templates/skills/{cbp-task-complete → cbp-finalize}/reference/checkpoint-done-branching.md +1 -1
  49. package/templates/skills/{cbp-task-complete → cbp-finalize}/reference/next-step-heuristic.md +1 -1
  50. package/templates/skills/cbp-frontend-design/SKILL.md +1 -1
  51. package/templates/skills/cbp-frontend-ui/SKILL.md +7 -7
  52. package/templates/skills/cbp-git-commit/SKILL.md +3 -3
  53. package/templates/skills/cbp-merge-main/SKILL.md +4 -4
  54. package/templates/skills/{cbp-round-execute → cbp-round-build}/SKILL.md +93 -75
  55. package/templates/skills/cbp-round-complete/SKILL.md +15 -14
  56. package/templates/skills/cbp-round-plan/SKILL.md +344 -0
  57. package/templates/skills/cbp-session-end/SKILL.md +1 -1
  58. package/templates/skills/cbp-ship-main/SKILL.md +3 -2
  59. package/templates/skills/cbp-standalone-task-check/SKILL.md +10 -9
  60. package/templates/skills/cbp-standalone-task-complete/SKILL.md +12 -13
  61. package/templates/skills/cbp-standalone-task-create/SKILL.md +16 -9
  62. package/templates/skills/cbp-standalone-task-start/SKILL.md +9 -5
  63. package/templates/skills/cbp-standalone-task-testing/SKILL.md +5 -5
  64. package/templates/skills/cbp-task-create/SKILL.md +6 -7
  65. package/templates/skills/cbp-task-start/SKILL.md +8 -8
  66. package/templates/skills/cbp-todo/SKILL.md +6 -8
  67. package/templates/skills/cbp-verify/SKILL.md +146 -0
  68. package/templates/skills/cbp-verify/reference/deterministic-gates.md +114 -0
  69. package/templates/skills/{cbp-round-end → cbp-verify}/reference/findings-presentation.md +16 -12
  70. package/templates/skills/cbp-verify/reference/round-scope.md +62 -0
  71. package/templates/skills/cbp-verify/reference/task-scope.md +71 -0
  72. package/templates/agents/cbp-improve-round.md +0 -283
  73. package/templates/agents/cbp-task-check.md +0 -217
  74. package/templates/skills/cbp-round-check/SKILL.md +0 -134
  75. package/templates/skills/cbp-round-end/SKILL.md +0 -173
  76. package/templates/skills/cbp-round-end/reference/inline-fallback.md +0 -35
  77. package/templates/skills/cbp-round-execute/reference/inline-fallback.md +0 -55
  78. package/templates/skills/cbp-round-input/SKILL.md +0 -197
  79. package/templates/skills/cbp-round-start/SKILL.md +0 -261
  80. package/templates/skills/cbp-round-update/SKILL.md +0 -120
  81. package/templates/skills/cbp-ship/templates/workflow-eas-submit.yml +0 -53
  82. package/templates/skills/cbp-ship/templates/workflow-vsce-publish.yml +0 -31
  83. package/templates/skills/cbp-task-check/SKILL.md +0 -172
  84. package/templates/skills/cbp-task-testing/SKILL.md +0 -279
@@ -1,26 +1,52 @@
1
1
  ---
2
- name: cbp-round-execute
3
- description: Execute the approved plan from /cbp-round-start — runs per-wave executors, inline testing-qa per wave, and routes to /cbp-round-end
2
+ name: cbp-round-build
3
+ description: Execute the approved plan from /cbp-round-plan — runs per-wave builders, inline testing-qa per wave, and auto-triggers /cbp-verify
4
+ triggers: [cbp-verify]
4
5
  effort: xhigh
5
6
  ---
6
7
 
7
- # Round Execute Command
8
+ # Round Build Command
8
9
 
9
- 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`.
10
+ Execution phase. Receives the approved plan from `/cbp-round-plan`, dispatches wave builders, runs per-wave `cbp-testing-qa-agent` in parallel during execution, and auto-triggers `/cbp-verify` (scope=round) when execution completes. The deterministic gates, real-execution proof, and fresh-context review live in `/cbp-verify` — this skill builds; verify judges.
10
11
 
11
12
  ## Pipeline
12
13
 
13
14
  ```
14
- /cbp-round-start → /cbp-round-execute → /cbp-round-end (auto)
15
+ /cbp-round-plan → /cbp-round-build → /cbp-verify (scope=round, auto)
15
16
  ```
16
17
 
17
18
  ## Approval Model
18
19
 
19
- The `ask`-tier `Skill(cbp-round-execute)` permission prompt (configured in `settings.json`) is the **plan-approval gate** handed off from `/cbp-round-start`: confirming the permission approves the plan; declining it returns control to `/cbp-round-start` (re-plan with feedback) or `/cbp-round-input` (wrong direction). Once execution begins, the executors (`cbp-round-executor`, `cbp-mechanical-edits`) and the 3-INLINE / 3-SURVEY paths apply edits **automatically** — there is NO in-skill AskUserQuestion for approval. The only downstream user decisions are genuine ones: the dev-server start prompt (Step 4) and the baseline-regression accept gate (`/cbp-round-end` Step 7).
20
+ The `ask`-tier `Skill(cbp-round-build)` permission prompt (configured in `settings.json`) is the **plan-approval gate** handed off from `/cbp-round-plan`: confirming the permission approves the plan; declining it returns control to `/cbp-round-plan` (re-plan with feedback, or its deep-analysis path for a wrong-direction restart). Once execution begins, the builders (`cbp-round-builder`, `cbp-mechanical-edits`) and the 3-INLINE / 3-SURVEY paths apply edits **automatically** — there is NO in-skill AskUserQuestion for approval. The only downstream user decision in this skill is the genuine one: the dev-server start prompt (Step 4). The baseline-regression accept gate is owned by `/cbp-verify`.
20
21
 
21
22
  ## Identifier Notation
22
23
 
23
- 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 is defined in `cbp-round-start` Step 0 "CHK / TASK / ROUND Identifier Notation Vocabulary".
24
+ This skill operates on the **active** task/round resolved from local state (break-glass: MCP `get_current_task` / `get_rounds`) and does not accept a positional identifier argument. Canonical chk-task-round notation is defined in `cbp-round-plan` Step 0 "CHK / TASK / ROUND Identifier Notation Vocabulary".
25
+
26
+ ## Builder Spawn Failure Is A Gate Failure
27
+
28
+ A `cbp-round-builder` (or `cbp-testing-qa-agent`) spawn failure — the agent could not run, or died
29
+ before emitting its output contract (provider 5xx, monthly Agent usage cap, rate limit, context
30
+ overflow at spawn, billing block) — is a **HARD GATE FAILURE** per
31
+ `rules/spawn-failure-is-gate-failure.md`. The orchestrator does **NOT** walk the builder's phases
32
+ inline and self-certify the build. STOP and surface the retry directive verbatim:
33
+
34
+ ```
35
+ ## Build blocked — builder could not spawn
36
+
37
+ The round builder (cbp-round-builder) failed to spawn: <class> — <verbatim error>.
38
+ This is a hard gate failure, not a completed build. Retry when capacity returns:
39
+ Next: /cbp-round-build
40
+ ```
41
+
42
+ Record `round.context.builder_findings.spawn_failure = { class, error_message, decided_at }`. Do NOT
43
+ continue to Step 8 (verify) without a real build.
44
+
45
+ The **two carve-outs are NOT inline fallback** (`rules/spawn-failure-is-gate-failure.md` §Carve-Out):
46
+ the 3-INLINE / 3-SURVEY paths (Step 3) have no builder to spawn by design — `.claude/`-only edits and
47
+ empty-files surveys are first-class deterministic paths the orchestrator runs directly. The
48
+ `claude_only` testing path (Step 5) likewise has no `cbp-testing-qa-agent` to spawn by design; its
49
+ proof is the deterministic command set. Neither is a substitute for a failed agent spawn.
24
50
 
25
51
  ## Instructions
26
52
 
@@ -30,11 +56,11 @@ Read `.codebyplan/state/checkpoints/<checkpointId>/tasks/<taskId>.json` (local-f
30
56
 
31
57
  Read `.codebyplan/state/checkpoints/<checkpointId>/tasks/<taskId>/rounds/<roundId>.json` (local-first) to find the in-progress round. Same sync / break-glass pattern (MCP `get_rounds` as fallback).
32
58
 
33
- If no in-progress round: `No active round. Run /cbp-round-start first.`
59
+ If no in-progress round: `No active round. Run /cbp-round-plan first.`
34
60
 
35
61
  ### Step 2: Load Approved Plan
36
62
 
37
- Read the plan from round context (`context.planner_output`). If no plan: `No approved plan in round context. Run /cbp-round-start first.`
63
+ Read the plan from round context (`context.planner_output`). If no plan: `No approved plan in round context. Run /cbp-round-plan first.`
38
64
 
39
65
  Read effective testing profile: `round.context.testing_profile_override` if set (user override for this round only), else `task.context.testing_profile` (set by planner Phase 4.8), else default `'web'`. Pass the effective profile to all per-wave `cbp-testing-qa-agent` spawns.
40
66
 
@@ -44,14 +70,14 @@ Inspect `approved_plan.files_to_modify[]` and `approved_plan.round_type`. Four e
44
70
 
45
71
  | Condition | Path |
46
72
  | -------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
47
- | `files_to_modify[]` empty AND `round_type === 'survey'` | **3-SURVEY** — orchestrator executes inline; constructs executor-equivalent output; NEVER spawn `cbp-round-executor` |
48
- | Every entry under `.claude/**` | **3-INLINE** — orchestrator applies via build-cc skills or direct Edit; NEVER spawn `cbp-round-executor` |
73
+ | `files_to_modify[]` empty AND `round_type === 'survey'` | **3-SURVEY** — orchestrator executes inline; constructs builder-equivalent output; NEVER spawn `cbp-round-builder` |
74
+ | Every entry under `.claude/**` | **3-INLINE** — orchestrator applies via build-cc skills or direct Edit; NEVER spawn `cbp-round-builder` |
49
75
  | At least one entry outside `.claude/**` AND `approved_plan.waves[]` has ≥2 waves | **3-WAVE** — dispatch per-wave per schema in `approved_plan.waves[]` |
50
- | At least one entry outside `.claude/**` (single wave or no waves field) | **3-AGENT** — spawn single `cbp-round-executor` |
76
+ | At least one entry outside `.claude/**` (single wave or no waves field) | **3-AGENT** — spawn single `cbp-round-builder` |
51
77
 
52
78
  #### Step 3-SURVEY: Empty-Files Survey Path
53
79
 
54
- Execute the survey instructions inline using Read/Grep/Bash. Save to `round.context.survey_output`. Build executor-equivalent output object with `round_type: 'survey'`. Skip to Step 3c.
80
+ Execute the survey instructions inline using Read/Grep/Bash. Save to `round.context.survey_output`. Build builder-equivalent output object with `round_type: 'survey'`. Skip to Step 3c.
55
81
 
56
82
  `round_type: 'survey'` MUST be set in `round.context` so Step 4 (dev-server probe) and downstream skills short-circuit correctly.
57
83
 
@@ -67,36 +93,36 @@ For each entry, route per `rules/file-routing.md`:
67
93
  - `.claude/context/**`, `.claude/docs/**` → direct Edit
68
94
  - `.claude/hooks/{name}.sh` → direct Write/Edit
69
95
 
70
- Build executor-equivalent output object inline. Skip to Step 3c.
96
+ Build builder-equivalent output object inline. Skip to Step 3c.
71
97
 
72
98
  #### Step 3-WAVE: Multi-Wave Dispatch
73
99
 
74
100
  When `approved_plan.waves[]` is present and has ≥2 entries:
75
101
 
76
102
  1. Topological-sort waves by `depends_on[]` to determine dispatch order.
77
- 2. For each wave whose `depends_on[]` names are all complete, spawn the wave executor:
78
- - `agent_type: 'cbp-round-executor'` → spawn `cbp-round-executor` with wave-scoped input (see `agents/cbp-round-executor.md` wave input contract)
103
+ 2. For each wave whose `depends_on[]` names are all complete, spawn the wave builder:
104
+ - `agent_type: 'cbp-round-builder'` → spawn `cbp-round-builder` with wave-scoped input (see `agents/cbp-round-builder.md` wave input contract)
79
105
  - `agent_type: 'inline'` → execute inline as 3-INLINE path, scoped to `wave.files[]`
80
- 3. After each wave completes, spawn `cbp-testing-qa-agent` against `wave.files[]` with `testing_profile` from Step 2. Run this testing spawn in PARALLEL with the next wave's executor when dependency order allows.
81
- 4. After all waves complete, merge all `files_changed[]` into a single executor output.
106
+ 3. After each wave completes, spawn `cbp-testing-qa-agent` against `wave.files[]` with `testing_profile` from Step 2. Run this testing spawn in PARALLEL with the next wave's builder when dependency order allows.
107
+ 4. After all waves complete, merge all `files_changed[]` into a single builder output.
82
108
 
83
- #### Step 3-AGENT: Single `cbp-round-executor` Spawn
109
+ #### Step 3-AGENT: Single `cbp-round-builder` Spawn
84
110
 
85
111
  #### Mechanical-Edits Delegation Gate
86
112
 
87
- Before spawning `cbp-round-executor`, inspect `task.context.work_mode` (set by cbp-task-planner Phase 4.1).
113
+ Before spawning `cbp-round-builder`, inspect `task.context.work_mode` (set by cbp-round-planner Phase 4.1).
88
114
 
89
- | Value | Action |
90
- | ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
91
- | `mechanical` | Spawn `cbp-mechanical-edits` instead of `cbp-round-executor`. Derive the spec (renames / substitutions / frontmatter_edits / index_regen) from `approved_plan.files_to_modify[]` + the task's deliverables; pass it via the prompt body per the agent's Input Contract. After the agent returns, verify `git status --porcelain` reflects only expected paths AND `validation.orphaned_refs` is empty. Skip the rest of Step 3-AGENT and proceed to Step 3b. |
92
- | `mixed` | Read `task.context.mechanical_files[]` (populated by cbp-task-planner Phase 4.1 per its partition rule). Spawn `cbp-round-executor` for the AUTHORED portion FIRST — the executor's `files` input is `files_to_modify[]` MINUS `mechanical_files[]`. After it returns, spawn `cbp-mechanical-edits` against ONLY `mechanical_files[]` — derive the spec (renames / substitutions / frontmatter_edits / index_regen) from those entries' purpose strings. Merge both `files_changed[]` results into a single output for Step 5. If `mechanical_files[]` is absent or empty when `work_mode === 'mixed'`, halt with a planner-output error (Phase 4.1 contract violation). |
93
- | `design` or absent | Proceed with the existing `cbp-round-executor` spawn below (no change in behaviour). |
115
+ | Value | Action |
116
+ | ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
117
+ | `mechanical` | Spawn `cbp-mechanical-edits` instead of `cbp-round-builder`. Derive the spec (renames / substitutions / frontmatter_edits / index_regen) from `approved_plan.files_to_modify[]` + the task's deliverables; pass it via the prompt body per the agent's Input Contract. After the agent returns, verify `git status --porcelain` reflects only expected paths AND `validation.orphaned_refs` is empty. Skip the rest of Step 3-AGENT and proceed to Step 3b. |
118
+ | `mixed` | Read `task.context.mechanical_files[]` (populated by cbp-round-planner Phase 4.1 per its partition rule). Spawn `cbp-round-builder` for the AUTHORED portion FIRST — the builder's `files` input is `files_to_modify[]` MINUS `mechanical_files[]`. After it returns, spawn `cbp-mechanical-edits` against ONLY `mechanical_files[]` — derive the spec (renames / substitutions / frontmatter_edits / index_regen) from those entries' purpose strings. Merge both `files_changed[]` results into a single output for Step 5. If `mechanical_files[]` is absent or empty when `work_mode === 'mixed'`, halt with a planner-output error (Phase 4.1 contract violation). |
119
+ | `design` or absent | Proceed with the existing `cbp-round-builder` spawn below (no change in behaviour). |
94
120
 
95
- **Universal postcondition for both `mechanical` and `mixed`:** if any spawned `cbp-mechanical-edits` reports `validation.orphaned_refs.length > 0`, treat as a hard-fail signal and route through Step 6 (regardless of whether the executor also ran in the `mixed` path).
121
+ **Universal postcondition for both `mechanical` and `mixed`:** if any spawned `cbp-mechanical-edits` reports `validation.orphaned_refs.length > 0`, treat as a hard-fail signal and route through Step 6 (regardless of whether the builder also ran in the `mixed` path).
96
122
 
97
- This gate is distinct from Phase 2.95's `execution_mode` parallelism hint (consumed downstream by `cbp-round-executor` Step 3.5 for batch-create scenarios). Both gates can fire on the same task.
123
+ This gate is distinct from Phase 2.95's `execution_mode` parallelism hint (consumed downstream by `cbp-round-builder` Step 3.5 for batch-create scenarios). Both gates can fire on the same task.
98
124
 
99
- Spawn `cbp-round-executor` with the approved plan and full context:
125
+ Spawn `cbp-round-builder` with the approved plan and full context:
100
126
 
101
127
  ```yaml
102
128
  input:
@@ -108,7 +134,7 @@ input:
108
134
  resources: [merged from checkpoint.resources + task.resources]
109
135
  ```
110
136
 
111
- Wait for executor output.
137
+ Wait for builder output. **If the spawn fails, STOP per "Builder Spawn Failure Is A Gate Failure" above.**
112
138
 
113
139
  ### Step 3b: Database Work (if plan includes DB changes)
114
140
 
@@ -116,21 +142,21 @@ If the approved plan includes database schema changes, RLS policies, or type gen
116
142
 
117
143
  1. Spawn `cbp-database-agent` with DB-related steps from the plan
118
144
  2. Wait for completion
119
- 3. Merge `files_changed` into executor output
145
+ 3. Merge `files_changed` into builder output
120
146
 
121
147
  ### Step 3b-stripe: Stripe Work (if plan includes Stripe integration)
122
148
 
123
149
  If the approved plan includes Stripe integration work (files under `stripe/`, or plan steps referencing `payment`, `checkout`, `webhook`, `subscription`, or an explicit `stripe_work: true` flag from the planner):
124
150
 
125
- 1. Spawn `cbp-stripe-agent` with Stripe-related steps from the plan and `files_changed_scope` from the executor output
151
+ 1. Spawn `cbp-stripe-agent` with Stripe-related steps from the plan and `files_changed_scope` from the builder output
126
152
  2. Wait for completion
127
- 3. Merge `files_changed` into executor output
153
+ 3. Merge `files_changed` into builder output
128
154
 
129
155
  ### Step 3c: Completion Check
130
156
 
131
157
  - `status: 'completed'` and all deliverables done → proceed to Step 4
132
- - `status: 'blocked'` → present blocker to user via AskUserQuestion, resolve, re-spawn executor with remaining work
133
- - Deliverables incomplete → re-spawn executor with remaining deliverables (max 3 re-triggers). After 3 re-triggers, save partial output and proceed.
158
+ - `status: 'blocked'` → present blocker to user via AskUserQuestion, resolve, re-spawn builder with remaining work
159
+ - Deliverables incomplete → re-spawn builder with remaining deliverables (max 3 re-triggers). After 3 re-triggers, save partial output and proceed.
134
160
 
135
161
  ### Step 4: Dev-Server Probe (rounds 2+, web/desktop profile)
136
162
 
@@ -150,14 +176,14 @@ Skip this probe for `testing_profile === 'claude_only'` or `'backend'`.
150
176
 
151
177
  Read `task.context.testing_profile` (already loaded in Step 2).
152
178
 
153
- **claude_only profile**: run inline checks only (no `cbp-testing-qa-agent` spawn):
179
+ **claude_only profile** (deterministic-only path no `cbp-testing-qa-agent` spawn by design, NOT a fallback): run inline checks only:
154
180
 
155
181
  1. `bash -n <hook-file>` for each modified `.sh` in `files_changed`
156
182
  2. Verify each modified/created SKILL.md ≤300 lines (warn threshold; hook blocks at 600); `scope:` marker present; no `/cbp-*` notation
157
183
 
158
- On pass, synthesise `testing_qa_output` inline per the procedure in `reference/inline-fallback.md` "Validation fallback" section (output shape defined in `agents/cbp-testing-qa-agent.md` Output Contract) and persist to `round.context.testing_qa_output` at Step 7.
184
+ On pass, synthesise `testing_qa_output` inline (output shape defined in `agents/cbp-testing-qa-agent.md` Output Contract; mark `mode: 'inline_synthesised_for_claude_only_profile'`) and persist to `round.context.testing_qa_output` at Step 7. This is the documented happy path for the `claude_only` profile — the agent was never expected to spawn.
159
185
 
160
- **All other profiles**: spawn `cbp-testing-qa-agent` against the wave's `files[]` (or full executor output in single-wave mode), and dispatch e2e specialists **config-driven** in parallel — all Agent calls in the same message:
186
+ **All other profiles**: spawn `cbp-testing-qa-agent` against the wave's `files[]` (or full builder output in single-wave mode), and dispatch e2e specialists **config-driven** in parallel — all Agent calls in the same message:
161
187
 
162
188
  1. **Short-circuit hints** (applied *before* reading `e2e.json`, emit no `e2e_eligible_skipped` signal): if `testing_profile === 'backend'` OR `round.context.round_type === 'survey'`, dispatch `cbp-testing-qa-agent` alone and skip e2e entirely. (The `claude_only` branch above already skips all agent spawns.)
163
189
  2. Read `.codebyplan/e2e.json`. If the file is absent or `frameworks` is missing/empty, no framework is eligible — skip e2e entirely (no `e2e_eligible_skipped` signal) and run `cbp-testing-qa-agent` alone.
@@ -165,78 +191,70 @@ On pass, synthesise `testing_qa_output` inline per the procedure in `reference/i
165
191
  4. For every eligible framework, spawn the matching `cbp-e2e-*` specialist (per the `context/testing/e2e.md` dispatch routing table) IN PARALLEL with `cbp-testing-qa-agent` and with each other. Inject `framework`, `app`, `platforms`, and `credential_vars` from `e2e.json` — the config is authoritative; agents do not auto-detect.
166
192
  5. `has_ui_work` and `testing_profile` are **hints only** beyond the short-circuit above — they never suppress an eligible framework. Pure `.claude/`-only and docs-only rounds match no configured `app` path and are therefore not eligible.
167
193
 
168
- This realises the opt-out contract in `rules/e2e-mandatory.md`: an eligible framework whose specialist does not run without a recorded valid skip reason is an `e2e_eligible_skipped` hard-fail at Step 6.
194
+ This realises the opt-out contract in `rules/e2e-mandatory.md`. The deterministic `e2e_eligible_skipped` gate is owned by `/cbp-verify` Phase 3 (Tier-1 execution proof via `codebyplan e2e verify-round`); this skill records `e2e_eligible[]` / `e2e_outputs` so verify can evaluate it.
169
195
 
170
196
  Input contracts: `cbp-testing-qa-agent` receives `executor_output`, `testing_profile`, `has_ui_work` (see `agents/cbp-testing-qa-agent.md` Input Contract). The `cbp-e2e-*` specialist receives `repo_id`, `round_number`, `files_changed`, `prior_round_files_changed` (full task aggregate when round_number ≥ 2), `whole_checkpoint_mode: false`, `framework`, `app`, `platforms`, `credential_vars`, `test_strategy`, `pages_affected`, `has_auth`, `dev_server_port` (see `context/testing/e2e.md` Input Contract for the full shape). `test_strategy` is injected here in per-round mode; `/cbp-checkpoint-check` Step 5b omits it (the specialist self-resolves from `e2e.json` + DB in `whole_checkpoint_mode`).
171
197
 
172
- **Independence**: neither agent reads the other's output. Baseline-regression findings surface as a BLOCKING gate at `/cbp-round-end` Step 7 (an explicit accept-or-fix user decision; baselines are NEVER auto-accepted). Per-wave spawns MAY run in parallel with the next wave's executor when dependency order allows. The `cbp-e2e-*` specialists are parallel siblings of `cbp-testing-qa-agent` — they do not share state.
198
+ **Independence**: neither agent reads the other's output. Baseline-regression findings surface as a BLOCKING gate at `/cbp-verify` (an explicit accept-or-fix user decision; baselines are NEVER auto-accepted). Per-wave spawns MAY run in parallel with the next wave's builder when dependency order allows. The `cbp-e2e-*` specialists are parallel siblings of `cbp-testing-qa-agent` — they do not share state.
173
199
 
174
200
  ### Step 5b: Post-E2E Screenshot Review (cbp-frontend-ui Phase 6.5)
175
201
 
176
- Aggregate screenshots across ALL specialists that ran: `screenshots = Object.values(round.context.e2e_outputs ?? {}).flatMap(o => o.screenshots ?? [])`. When the aggregated list is non-empty, invoke the `cbp-frontend-ui` skill with `phase: 'screenshot_review'` (input: `files_changed`, `e2e_screenshots: <aggregated screenshots>`, `context: { checkpoint_goal, round_requirements }`). Under this phase the skill runs only Phase 6.5 (Rendered-Output Visual Review) + 7 + 8 — Phases 1-6 (style) already ran inline at executor Step 3.8 with `phase: 'style_only'`.
202
+ Aggregate screenshots across ALL specialists that ran: `screenshots = Object.values(round.context.e2e_outputs ?? {}).flatMap(o => o.screenshots ?? [])`. When the aggregated list is non-empty, invoke the `cbp-frontend-ui` skill with `phase: 'screenshot_review'` (input: `files_changed`, `e2e_screenshots: <aggregated screenshots>`, `context: { checkpoint_goal, round_requirements }`). Under this phase the skill runs only Phase 6.5 (Rendered-Output Visual Review) + 7 + 8 — Phases 1-6 (style) already ran inline at builder Step 3.8 with `phase: 'style_only'`.
177
203
 
178
- Persist findings to `round.context.frontend_ui_review` (merge with Step 3.8's style-only output if present). Baseline-regression findings surface as a BLOCKING gate at `/cbp-round-end` Step 7 (an explicit accept-or-fix user decision; baselines are NEVER auto-accepted); rendered_visual critical findings are surfaced in the Step 7 findings presentation. Neither auto-fails the round. cbp-testing-qa-agent does NOT read these findings (full independence per Step 5).
204
+ Persist findings to `round.context.frontend_ui_review` (merge with Step 3.8's style-only output if present). Baseline-regression findings surface as a BLOCKING gate at `/cbp-verify` (an explicit accept-or-fix user decision; baselines are NEVER auto-accepted); rendered_visual critical findings are carried into verify. Neither auto-fails the round here. cbp-testing-qa-agent does NOT read these findings (full independence per Step 5).
179
205
 
180
206
  **Skip** when `round.context.e2e_outputs` is absent/empty, the aggregated `screenshots` list is empty, or `testing_profile === 'claude_only'`.
181
207
 
182
- ### Step 6: Hard-Fail Routing
208
+ ### Step 6: In-Execution Hard-Fail Retry
183
209
 
184
- Per-wave hard-fail signal true when ANY hold:
210
+ During execution, the per-wave `cbp-testing-qa-agent` may report a hard fail it can fix in-loop. The
211
+ final pass/fail verdict (deterministic gates, e2e proof, fresh-context review) belongs to `/cbp-verify`;
212
+ this step only handles the cheap in-execution retry so a trivially-broken wave is fixed before verify.
213
+
214
+ Per-wave in-execution hard-fail signal — true when ANY hold:
185
215
 
186
216
  - `testing_qa_output.totals.hard_fail === true`.
187
217
  - For any framework `f` in `round.context.e2e_outputs`: `e2e_outputs[f].status === 'failed'` OR `e2e_outputs[f].test_results?.failed > 0`.
188
- - **E2E deterministic gate** (replaces the former judgment-based `e2e_eligible_skipped` evaluation): when `round.context.e2e_eligible[]` is non-empty, first persist `e2e_eligible` / `e2e_outputs` to round context via MCP `update_round` (the Step 7 write, pulled forward — the CLI reads the round row from the DB), then run:
189
-
190
- ```bash
191
- codebyplan e2e verify-round --round-id <round_id> --task-id <task_id>
192
- ```
193
-
194
- Exit 0 = e2e pass. Exit 1 = one or more deterministic hard-fails — the stdout JSON's `failed_checks[]` identifies which (`e2e_eligible_skipped`, `zero_assertion_run`, `empty_gallery`); the `rules/e2e-mandatory.md` valid-skip list and the vscode-test empty-gallery exception are honored by the CLI. When `e2e_eligible[]` is empty, skip the CLI call — nothing to verify.
195
-
196
- **All waves hard_fail: false** → proceed to Step 7. **Any wave hard_fail: true**:
197
218
 
198
- - **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.
199
- - **Structural OR already re-triggered once OR e2e preflight aborts OR `e2e_eligible_skipped`** → save failure context via `codebyplan round update` (break-glass: MCP `update_round`); auto-trigger `/cbp-round-input`. STOP.
219
+ **All waves clear**proceed to Step 7. **Any wave hard_fail: true**:
200
220
 
201
- ## Inline execution fallback
221
+ - **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 builder; re-run testing-qa AND the eligible `cbp-e2e-*` specialists for that wave.
222
+ - **Structural OR already re-triggered once OR e2e preflight aborts** → save failure context via `codebyplan round update` (break-glass: MCP `update_round`) and STILL proceed to Step 7 → Step 8 (`/cbp-verify`). Verify owns the authoritative verdict and the fix-round routing; it will route to `/cbp-round-plan` for a fix round. Do NOT self-route to a fix round here.
202
223
 
203
- When `cbp-round-executor` spawn fails (per `agent-spawn-failure-fallback.md` triggers), fall through to the 3-INLINE branch in Step 3 above for `.claude/`-only edits. For non-`.claude/` edits, walk `agents/cbp-round-executor.md` Phase 1–4 inline using Read / Edit / Write / Bash. Full procedure: `reference/inline-fallback.md` "Execution fallback" section.
204
-
205
- ## Inline validation fallback
206
-
207
- When `cbp-testing-qa-agent` spawn fails OR the resolved `testing_profile` is `claude_only` (in which case the agent isn't spawned by design), run validation inline. Apply the profile gate matrix in `agents/cbp-testing-qa-agent.md` Phase 3 to determine in-scope checks. Full procedure + per-profile shape: `reference/inline-fallback.md` "Validation fallback" section.
208
-
209
- ### Step 7: Save Executor Output
224
+ ### Step 7: Save Builder Output
210
225
 
211
226
  `codebyplan round update --id <round-id> --task-id <uuid> --checkpoint-id <uuid> --context <json>` (CLI write-through: local state at `.codebyplan/state/checkpoints/<checkpointId>/tasks/<taskId>/rounds/<roundId>.json` + REST). Break-glass fallback: MCP `update_round` when the CLI is unavailable.
212
227
 
213
- - `context`: { ...existing, executor_output, testing_qa_output, e2e_eligible, e2e_outputs, frontend_ui_review } — when e2e ran, `e2e_eligible` / `e2e_outputs` were already persisted by the Step 6 pull-forward write; re-include them in this merge payload (the `update_round` REPLACE contract requires re-sending every field that should remain — this is a consolidating merge, not a second write of new data).
228
+ - `context`: { ...existing, executor_output, testing_qa_output, e2e_eligible, e2e_outputs, frontend_ui_review } — the `update_round` REPLACE contract requires re-sending every field that should remain (a consolidating merge, not a partial write).
229
+
230
+ `e2e_outputs` (a framework-keyed map of specialist outputs, e.g. `{ playwright: {...}, maestro: {...} }`) is present when ≥1 eligible framework ran. `frontend_ui_review` is present only when ≥1 eligible framework ran AND Step 5b ran (non-empty screenshots). `e2e_eligible[]` records which frameworks were eligible this round and drives `/cbp-verify` Phase 3's Tier-1 e2e gate.
214
231
 
215
- `e2e_outputs` (a framework-keyed map of specialist outputs, e.g. `{ playwright: {...}, maestro: {...} }`) is present when ≥1 eligible framework ran. `frontend_ui_review` is present only when ≥1 eligible framework ran AND Step 5b ran (non-empty screenshots). `e2e_eligible[]` records which frameworks were eligible this round and drives the Step 6 E2E deterministic gate.
232
+ ### Step 8: Auto-trigger Verify (scope=round)
216
233
 
217
- ### Step 8: Auto-trigger Round End
234
+ Execution complete. Hand the round to the unified verify stage — a SINGLE directive, never an A/B/C menu (`feedback-close-out-routing.md`). `/cbp-verify` runs the deterministic gates, real-execution proof, and the fresh-context `cbp-verify-reviewer`, then routes (fix round → `/cbp-round-plan`; clean last round → escalate to task scope; clean round → `/cbp-round-complete`).
218
235
 
219
236
  ```
220
- Execution and validation complete. Starting round wrap-up...
237
+ Build complete. Starting verify...
221
238
  ```
222
239
 
223
- Trigger `/cbp-round-end`.
240
+ Trigger `/cbp-verify` (scope=round).
224
241
 
225
242
  ## Key Rules
226
243
 
227
- - **Code + test writing + inline validation** — planning lives in `round-start`, summary in `round-end`
228
- - Per-wave `cbp-testing-qa-agent` AND the `cbp-e2e-*` specialist run in parallel (both against the same wave's `files[]`); they may also run in parallel with the NEXT wave's executor when dependency order allows
244
+ - **Build only** — planning lives in `cbp-round-plan`; the pass/fail verdict + gates + proof + review live in `/cbp-verify`
245
+ - Per-wave `cbp-testing-qa-agent` AND the `cbp-e2e-*` specialist run in parallel during execution (both against the same wave's `files[]`); they may also run in parallel with the NEXT wave's builder when dependency order allows
229
246
  - `testing_profile` from `task.context` governs which checks run — read it once in Step 2; pass to every testing-qa + e2e specialist spawn
230
- - `claude_only` profile skips all agent spawns (testing-qa AND `cbp-e2e-*`); runs hook syntax and skill structure checks inline
231
- - E2E dispatch is **config-driven and opt-out** (`.codebyplan/e2e.json`), not gated on `has_ui_work`/`testing_profile` an eligible framework that silently does not run is an `e2e_eligible_skipped` hard-fail (`rules/e2e-mandatory.md`)
247
+ - `claude_only` profile is the deterministic-only path (no testing-qa AND no `cbp-e2e-*` spawn by design); runs hook syntax and skill structure checks inline — NOT an inline fallback
248
+ - E2E dispatch is **config-driven and opt-out** (`.codebyplan/e2e.json`), not gated on `has_ui_work`/`testing_profile`; the `e2e_eligible_skipped` deterministic gate is enforced by `/cbp-verify` Phase 3
232
249
  - Step 5b (cbp-frontend-ui Phase 6.5) runs only when e2e produced screenshots — gated on the aggregated `e2e_outputs[*].screenshots[]` being non-empty
250
+ - Builder / testing-qa spawn failure is a HARD GATE FAILURE — STOP + retry directive, NEVER self-certify the build inline (`rules/spawn-failure-is-gate-failure.md`)
233
251
  - Claude NEVER git adds files in round commands
234
252
 
235
253
  ## Integration
236
254
 
237
255
  - **Reads**: `.codebyplan/state/checkpoints/<id>/tasks/<id>.json`, `checkpoints/<id>/tasks/<id>/rounds/<id>.json` (local-first; `npx codebyplan sync` on miss; MCP `get_current_task` / `get_rounds` as break-glass)
238
- - **Writes**: `codebyplan round update --id <uuid> --task-id <uuid> --checkpoint-id <uuid>` (Steps 6+7 — context with executor_output + testing_qa_output + e2e_eligible + e2e_outputs + frontend_ui_review; break-glass: MCP `update_round`)
239
- - **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-stripe-agent` (if Stripe work), `cbp-security-agent` (if security review needed)
256
+ - **Writes**: `codebyplan round update --id <uuid> --task-id <uuid> --checkpoint-id <uuid>` (Step 7 — context with executor_output + testing_qa_output + e2e_eligible + e2e_outputs + frontend_ui_review; break-glass: MCP `update_round`)
257
+ - **Spawns**: `cbp-round-builder` (per wave or single; spawn failure = hard gate failure → STOP), `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-stripe-agent` (if Stripe work), `cbp-security-agent` (if security review needed)
240
258
  - **Skill invocations**: `cbp-frontend-ui` at Step 5b with `phase: 'screenshot_review'` (post-e2e)
241
- - **Triggers**: `/cbp-round-end` (auto)
242
- - **Triggered by**: `/cbp-round-start` (auto, after plan approval)
259
+ - **Triggers**: `/cbp-verify` (auto, scope=round)
260
+ - **Triggered by**: `/cbp-round-plan` (auto, after plan approval)
@@ -1,9 +1,9 @@
1
1
  ---
2
2
  name: cbp-round-complete
3
- description: Reconcile user git-add approvals, complete the round, and route to the next step
3
+ description: Reconcile user git-add approvals and complete the round (the ask-tier human git-add finalizer)
4
4
  argument-hint: [chk-task-round | task-round]
5
5
  disable-model-invocation: true
6
- triggers: [cbp-task-check, cbp-standalone-task-check, cbp-round-input]
6
+ triggers: [cbp-round-plan]
7
7
  effort: low
8
8
  ---
9
9
 
@@ -28,7 +28,7 @@ Set `KIND` for the rest of this skill. MCP tool names vary by KIND:
28
28
 
29
29
  # Round Complete Command
30
30
 
31
- The **user-invoked finalizer** for a round that `/cbp-round-update` triaged as clean. round-complete carries `disable-model-invocation: true`, so the model cannot invoke it — `/cbp-round-update` *directs* the user here with a `Next: /cbp-round-complete` directive, and the user runs it. It reconciles which files the **user** approved via `git add`, completes the round, and routes to the next step.
31
+ The **user-invoked git-add finalizer** for a round that `/cbp-verify` (scope=round) passed clean. round-complete carries `disable-model-invocation: true`, so the model cannot invoke it — `/cbp-verify` Phase 6 *directs* the user here with a `Next: /cbp-round-complete` directive, and the user runs it. The verify gates, execution proof, and fresh-context review already passed (`/cbp-verify` owns them); this skill's sole job is to reconcile which files the **user** approved via `git add` and complete the round. It does NOT re-run any gate.
32
32
 
33
33
  This skill is gated by an `ask`-tier `Skill(cbp-round-complete)` permission rule in `settings.json`. **The permission prompt IS the user confirmation** on the user's direct invoke — there is NO AskUserQuestion inside this skill. If the user declines the permission, the skill does not run: nothing is synced, no round is completed, and the user can stage files and re-invoke `/cbp-round-complete` when ready.
34
34
 
@@ -44,7 +44,7 @@ If this is false: DO NOT proceed to Step 3.
44
44
 
45
45
  ### Step 1: Parse `$ARGUMENTS`
46
46
 
47
- Parse the argument using the canonical chk-task-round notation (see `cbp-round-start` Step 0 "CHK / TASK / ROUND Identifier Notation Vocabulary"):
47
+ Parse the argument using the canonical chk-task-round notation (see `cbp-round-plan` Step 0 "CHK / TASK / ROUND Identifier Notation Vocabulary"):
48
48
 
49
49
  | Shape | Regex | Resolves to |
50
50
  |-------|-------|-------------|
@@ -126,14 +126,14 @@ Calculate duration from the round's `started_at` to now in minutes.
126
126
 
127
127
  **4a — Count files** — Display: `"Round N complete — Files: X total, Y approved, Z pending"`.
128
128
 
129
- **4b — Route on `unapproved_count`** (from Step 3's `complete_round` response):
129
+ **4b — Route on `unapproved_count`** (from Step 3's `complete_round` response). `/cbp-verify` already
130
+ passed this round clean (gates + proof + review) and routed here; this step only acts on the user's
131
+ git-add signal:
130
132
 
131
- - **`unapproved_count === 0`** (every file user-approved): the user has signed off on the whole round.
132
- - checkpoint KIND auto-trigger `/cbp-task-check`.
133
- - standalone KIND → auto-trigger `/cbp-standalone-task-check`.
134
- - **`unapproved_count > 0`** (user withheld approval on some files): the unstaged files are the signal that more work is wanted on them. Auto-trigger `/cbp-round-input` — its Step 2 deep analysis reads exactly those `user_approved === false` files and formulates the next round's requirements. This route is **independent of how many files are staged**; round-input is reachable even when zero files were staged.
133
+ - **`unapproved_count === 0`** (every file user-approved): the user has signed off on the whole round. The task may now be complete. Surface the single directive `Next: /cbp-verify` so verify re-enters at task scope (its Phase 1 escalation) to run the whole-repo gate, the holistic reviewer, and the one batched human walkthrough, then route to `/cbp-finalize`. (Verify already escalated automatically on the last clean round before routing here; this directive is the manual entry when the user finishes staging out of band.)
134
+ - **`unapproved_count > 0`** (user withheld approval on some files): the unstaged files are the signal that more work is wanted on them. Auto-trigger `/cbp-round-plan` — its Step 3D deep analysis reads exactly those `user_approved === false` files and formulates the next round's requirements. This route is **independent of how many files are staged**; round-plan is reachable even when zero files were staged.
135
135
 
136
- - **Degenerate auto-loop guard**: if the just-completed round had `round.context.auto_loop_mode === true` AND it was a clean exit (no `improve_round_findings[]`, no hard-fail — which is why `/cbp-round-update` triaged it to round-complete in the first place), do NOT auto-trigger `/cbp-round-input`. Its auto-loop path transcribes the prior round's findings verbatim, and a clean round has none — auto-triggering would spin on an empty input. Instead surface the clean-exit note below and STOP; the user stages the pending files and re-invokes (or runs `/cbp-round-input` manually). Persist `round.context.round_complete.degenerate_auto_loop_exit = true`.
136
+ - **Degenerate auto-loop guard**: if the just-completed round had `round.context.auto_loop_mode === true` AND it was a clean exit (no blocking verify findings, no hard-fail — which is why `/cbp-verify` routed it to round-complete in the first place), do NOT auto-trigger `/cbp-round-plan`. Its auto-loop path transcribes the prior round's findings verbatim, and a clean round has none — auto-triggering would spin on an empty input. Instead surface the clean-exit note below and STOP; the user stages the pending files and re-invokes (or runs `/cbp-round-plan` manually). Persist `round.context.round_complete.degenerate_auto_loop_exit = true`.
137
137
 
138
138
  ```
139
139
  ## Round N Complete — Auto-loop finished clean
@@ -141,7 +141,7 @@ Calculate duration from the round's `started_at` to now in minutes.
141
141
  **Files**: X total, Y approved, Z pending
142
142
 
143
143
  Pending files passed all checks; they are just not staged. Stage them
144
- (`git add <path>`) to finish the task, or run /cbp-round-input to start
144
+ (`git add <path>`) to finish the task, or run /cbp-round-plan to start
145
145
  another round.
146
146
  ```
147
147
 
@@ -153,7 +153,7 @@ Payload: `round.context.round_complete = { staged_count, unstaged_count, route,
153
153
 
154
154
  ## Key Rules
155
155
 
156
- - **User-invoked only** — round-complete carries `disable-model-invocation: true`, so the model cannot invoke it. `/cbp-round-update` *directs* the user here on a clean triage (a `Next: /cbp-round-complete` directive); the user runs the skill.
156
+ - **User-invoked only** — round-complete carries `disable-model-invocation: true`, so the model cannot invoke it. `/cbp-verify` (scope=round, Phase 6) *directs* the user here on a clean round (a `Next: /cbp-round-complete` directive); the user runs the skill.
157
157
  - **Permission prompt = confirmation** — gated by `ask`-tier `Skill(cbp-round-complete)`. Because the skill is `disable-model-invocation: true`, this gate applies to the user's **direct** `/cbp-round-complete` invocation. NEVER add an AskUserQuestion to confirm running; the harness prompt is the gate. A declined permission is a clean no-op.
158
158
  - **Step 2 (CLI) must exit 0** — if it fails, STOP before `complete_round`. The merge semantics are enforced by the CLI.
159
159
  - **NEVER ask the user to git add files** — Step 2 only reads staging status. **NEVER stage files** — Claude does not touch the git staging area; the user's `git add` is the approval signal.
@@ -162,9 +162,10 @@ Payload: `round.context.round_complete = { staged_count, unstaged_count, route,
162
162
  ## Integration
163
163
 
164
164
  - **Gates**: `ask`-tier `Skill(cbp-round-complete)` permission prompt on the user's direct invoke — the harness confirms before the skill runs; a decline makes NO writes. There is no in-skill AskUserQuestion.
165
- - **Invoked by**: the user only — round-complete carries `disable-model-invocation: true`, so the model cannot invoke it. `/cbp-round-update` *directs* the user here on a clean triage (a `Next: /cbp-round-complete` directive) but does not invoke it.
165
+ - **Invoked by**: the user only — round-complete carries `disable-model-invocation: true`, so the model cannot invoke it. `/cbp-verify` (scope=round, Phase 6) *directs* the user here on a clean round (a `Next: /cbp-round-complete` directive) but does not invoke it.
166
166
  - **Reads (checkpoint KIND)**: `.codebyplan/state/checkpoints/<id>.json`, `.codebyplan/state/checkpoints/<id>/tasks/<id>.json`, `.codebyplan/state/checkpoints/<id>/tasks/<id>/rounds/<id>.json` (local-first; run `npx codebyplan sync` if missing; break-glass: MCP `get_current_task` / `get_rounds`). Delegates git+approval sync to `npx codebyplan round sync-approvals`.
167
167
  - **Reads (standalone KIND)**: MCP `get_current_standalone_task` / `get_standalone_rounds` (standalone KIND still uses MCP until a later task).
168
168
  - **Writes (checkpoint KIND)**: `codebyplan round complete` (Step 3); `codebyplan round update` (Step 4 breadcrumb). Break-glass: MCP `complete_round` / `update_round`. Round+task `files_changed` written by the CLI sync-approvals.
169
169
  - **Writes (standalone KIND)**: MCP `complete_standalone_round` / `update_standalone_round` (standalone KIND still uses MCP until a later task).
170
- - **Triggers**: `/cbp-task-check` (checkpoint KIND, all files approved), `/cbp-standalone-task-check` (standalone KIND, all files approved), `/cbp-round-input` (some files unapproved — fires independent of staging count)
170
+ - **Triggered by**: `/cbp-verify` (scope=round, Phase 6 directs the user here on a clean round; does not invoke)
171
+ - **Triggers**: `/cbp-verify` (all files approved — re-enters at task scope for the whole-repo gate + finalize), `/cbp-round-plan` (some files unapproved — its Step 3D deep analysis; fires independent of staging count)