codebyplan 1.13.53 → 1.13.54

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 +1354 -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 +41 -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,261 +0,0 @@
1
- ---
2
- name: cbp-round-start
3
- description: Start a round — planning phase only
4
- triggers: [cbp-round-execute]
5
- argument-hint: [chk-task-round | task-round | requirements-text] # e.g. `108-1-2`, `45-2`, or free-text from /cbp-round-input
6
- effort: xhigh
7
- ---
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. Read/write sources vary by KIND:
20
-
21
- | Operation | `checkpoint` KIND | `standalone` KIND |
22
- |-----------|------------------|-------------------|
23
- | Get task | local state (break-glass: `get_current_task`) | `get_current_standalone_task(repo_id)` |
24
- | Get rounds | local state (break-glass: `get_rounds`) | `get_standalone_rounds(standalone_task_id)` |
25
- | Add round | `codebyplan round add` (break-glass: `add_round`) | `add_standalone_round(standalone_task_id, ...)` |
26
- | Update round | `codebyplan round update` (break-glass: `update_round`) | `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 | `codebyplan task update` (break-glass: `update_task`) | `update_standalone_task(standalone_task_id, ...)` |
29
-
30
- > **Note**: The `standalone` KIND column uses MCP tools unchanged — standalone local-first migration is out of scope for this task and will be addressed in a later task.
31
-
32
- # Round Start Command
33
-
34
- Planning phase for a new round. Analyzes context, creates a plan, then auto-triggers `/cbp-round-execute` — the `ask`-tier permission prompt on that skill IS the user's plan approval. NO execution or testing — those are separate commands.
35
-
36
- ## Inline-Fallback for Planner Spawn Failure
37
-
38
- If the `cbp-task-planner` agent spawn fails for any reason (`API Error: Extra usage required`, monthly Agent usage cap, provider 5xx, rate limit, context overflow), the orchestrator MUST follow the canonical inline-fallback procedure documented in `skills/cbp-round-end/SKILL.md` "Inline-fallback for any spawn failure".
39
-
40
- Procedure summary (pointer back to canonical):
41
-
42
- 1. Detect the failure class from the error string; record `round.context.planner_findings.spawn_failure = { class, error_message, decided_at }`.
43
- 2. Walk the planner's documented Phase 0-8 checklist inline using `Read` / `Grep` / `Bash` / MCP `get_*` — `agents/cbp-task-planner.md` is the inline script. Phase 1.5 (Requirement Premise Verification) and Phase 4.7 (Migration Shape-Distribution Pre-Flight) are MANDATORY in fallback mode — these are the gates the agent uniquely enforces; skipping them produces unverified plans.
44
- 3. Populate the planner's output contract (`approved_plan` shape: `files_to_modify[]`, `deliverables`, `specialist_needs`, `round_type`, `shape_distribution` if applicable, `context_summary`) with `mode: 'inline_fallback'`.
45
- 4. Apply the pre-emptive-skip rule: when the same failure class fired in the previous spawn of this session, skip the spawn attempt entirely and go straight to inline.
46
- 5. Continue the skill — do NOT abort. Step 9 auto-triggers `/cbp-round-execute`; the `ask`-tier permission prompt on that skill is the user's plan approval (see Step 8).
47
-
48
- Inline-fallback is NOT a quality downgrade trapdoor — Phase 1.5 row-by-row verification is mandatory. A fallback plan that skipped premise verification is a regression caught by the next session's cbp-improve-round.
49
-
50
- ## Pipeline
51
-
52
- ```
53
- /cbp-round-start (planning) → /cbp-round-execute (ask-tier permission = plan approval)
54
- ```
55
-
56
- **Auto-loop mode**: when `round.context.auto_loop_mode === true` flows in from `/cbp-round-input`, Step 6 (Q&A) is skipped and Step 8's `/cbp-round-execute` permission is auto-approved. See cbp-round-update SKILL.md Step 3b (auto-loop decision) and cbp-round-end SKILL.md Step 8 for the full contract.
57
-
58
- ## Instructions
59
-
60
- ### Step 0: Parse `$ARGUMENTS` shape
61
-
62
- Disambiguate the argument up front. Three input shapes:
63
-
64
- ### CHK / TASK / ROUND Identifier Notation Vocabulary
65
-
66
- | Shape | Regex | Meaning |
67
- |-------|-------|---------|
68
- | `{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`. |
69
- | `{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). |
70
- | Non-empty, non-identifier-shaped | — | **Free-text round requirements** (the round-input passthrough path). |
71
- | _(empty)_ | — | No identifier, no requirements text — derive task/round from Kind Detection above. |
72
-
73
- Malformed identifier shapes (`108-`, `-1-2`, `108--1`, `abc-1`) — surface this error and stop, mirroring `/cbp-task-start`'s error vocabulary:
74
-
75
- ```
76
- round-start: invalid argument `{value}`. Expected:
77
- 108-1-2 → round 2 of CHK-108 TASK-1
78
- 45-2 → round 2 of standalone TASK-45
79
- (free-text) → round requirements (typical from /cbp-round-input)
80
- (empty) → derive from active task/round state
81
- ```
82
-
83
- #### Worked examples
84
-
85
- - `round-start 108-1-2` → resolve CHK-108 TASK-1, target round 2
86
- - `round-start 45-2` → resolve standalone TASK-45, target round 2
87
- - `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).
88
- - `round-start "Implement OAuth flow per CHK-X plan"` → free-text path; current-task/round derivation from state
89
- - `round-start` (empty) → derive from Kind Detection; round 1 uses `task.requirements`
90
- - `round-start 108-` → error: malformed identifier
91
- - `round-start -1-2` → error: malformed identifier
92
- - `round-start abc-1` → error: malformed identifier
93
-
94
- > **Mental-model warning**: `task-start` and `round-start` interpret the SAME `108-1` argument differently. `task-start 108-1` → CHK-108 TASK-1 (checkpoint-bound task). `round-start 108-1` → standalone TASK-108 round 1 (because round-start needs three numbers for a checkpoint-bound round). When in doubt, write all three: `round-start 108-1-2`.
95
-
96
- ### Step 1: Get Current Task
97
-
98
- If Step 0 produced an identifier (`target_task` set): resolve directly per the identifier (bound or standalone) — use KIND-appropriate sources per the Kind Detection table above.
99
-
100
- Otherwise: use Kind Detection to determine KIND, then:
101
- - **checkpoint KIND**: read `.codebyplan/state/checkpoints/<checkpointId>/tasks/<taskId>.json` (local-first). If missing/stale, run `npx codebyplan sync` once and re-read. Break-glass fallback: MCP `get_current_task` when the state dir is absent and sync fails (daemon-dead + CLI-unavailable).
102
- - **standalone KIND**: MCP `get_current_standalone_task(repo_id)` — standalone tools are NOT migrated this task; standalone KIND still uses MCP until a later task.
103
-
104
- If no in-progress task and Step 0 produced no identifier, show error: `No active task. Run /cbp-task-start first.`
105
-
106
- ### Step 2: Determine Round Number
107
-
108
- 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 reading local round files or MCP per KIND below).
109
-
110
- Otherwise:
111
- - **checkpoint KIND**: list `.codebyplan/state/checkpoints/<checkpointId>/tasks/<taskId>/rounds/` (local-first). If missing/stale, run `npx codebyplan sync` once and re-read. Break-glass fallback: MCP `get_rounds` when the state dir is absent and sync fails.
112
- - **standalone KIND**: MCP `get_standalone_rounds(standalone_task_id)` — standalone still uses MCP.
113
-
114
- Count existing rounds; next is N+1.
115
-
116
- ### Step 3: Gather Round Requirements
117
-
118
- **If Step 0 parsed an identifier**: this skill was invoked to resume/start a specific round. Requirements come from existing round data (when the round exists) or task.requirements (for new round 1) — `$ARGUMENTS` is the identifier itself, NOT requirements text.
119
-
120
- **Else (free-text path), if round number is 1:**
121
-
122
- - Use `task.requirements` as the primary requirements
123
- - If `$ARGUMENTS` provided (free-text), merge as additional context
124
-
125
- **Else (free-text path), if round number > 1:**
126
-
127
- 1. If `$ARGUMENTS` provided (from `/cbp-round-input`): use as round requirements
128
- 2. If NO arguments: show error - `Round 2+ requires input. Run /cbp-round-input first.`
129
-
130
- ### Step 4: Create Round in DB
131
-
132
- **checkpoint KIND**: `codebyplan round add --task-id <uuid> --checkpoint-id <uuid> --number <N> --status in_progress --started-at <ISO> --triggered-by <user|claude|auto_loop> [--requirements <text>] [--context <json>]` (CLI write-through: writes local state at `.codebyplan/state/checkpoints/<checkpointId>/tasks/<taskId>/rounds/<roundId>.json` + REST). Break-glass fallback: MCP `add_round` when the CLI is unavailable.
133
-
134
- **standalone KIND**: MCP `add_standalone_round(standalone_task_id, ...)` — standalone still uses MCP.
135
-
136
- Fields to supply:
137
- - `task_id` (checkpoint) / `standalone_task_id` (standalone): current task ID
138
- - `number`: next round number
139
- - `status`: "in_progress"
140
- - `started_at`: now (ISO format)
141
- - `triggered_by`: `"user"` | `"claude"` | `"auto_loop"` — `auto_loop` when `auto_loop_mode === true` flows in from round-input; `claude` when auto-triggered by testing failure; `user` otherwise
142
- - `requirements`: round requirements from Step 3
143
- - `context`: when `auto_loop_mode === true`, persist `auto_loop_mode: true`, `auto_loop_index: N`, `auto_loop_cap: C` into `round.context` (carried forward from round-input args)
144
-
145
- ### Step 5: Load Context from DB
146
-
147
- Load from checkpoint and task:
148
- - Checkpoint context (decisions, dependencies, constraints, goal)
149
- - Task context and requirements
150
- - Resources from checkpoint and task (documentation links, API docs, guides)
151
- - Previous round results (files_changed, QA results)
152
- - For round 2+: load the latest completed round's `context.testing_qa_output` and `context.executor_output`:
153
- - **checkpoint KIND**: read `.codebyplan/state/checkpoints/<checkpointId>/tasks/<taskId>/rounds/<roundId>.json` (local-first). If missing/stale, run `npx codebyplan sync` once and re-read. Break-glass fallback: MCP `get_rounds` when the state dir is absent and sync fails.
154
- - **standalone KIND**: MCP `get_standalone_rounds(standalone_task_id)` — standalone still uses MCP.
155
- - Identify unapproved files from task.files_changed (where user_approved === false)
156
-
157
- ### Step 6: First Round Analysis (Round 1 only)
158
-
159
- For the first round only:
160
-
161
- 1. Analyze the task context and requirements thoroughly
162
- 2. Identify any ambiguities or gaps
163
- 3. If questions are needed, ask user via AskUserQuestion (max 4 per batch)
164
- 4. If task context changes from Q&A answers:
165
- - **checkpoint KIND**: `codebyplan task update --id <task-id> --checkpoint-id <uuid> --context <json>` (CLI write-through: local state at `.codebyplan/state/checkpoints/<checkpointId>/tasks/<taskId>.json` + REST). Break-glass fallback: MCP `update_task` when the CLI is unavailable.
166
- - **standalone KIND**: MCP `update_standalone_task(standalone_task_id, context: {...})` — standalone still uses MCP.
167
- - Save Q&A decisions as `context.decisions[]`
168
-
169
- Skip this step for round 2+ (context already established via `/cbp-round-input`).
170
-
171
- **If `auto_loop_mode === true`, skip Q&A regardless of round number** — the auto-loop already has authoritative requirements from the prior round's findings (round 1 is always manual in practice, but the rule is explicit so future round-1 auto-loops follow it).
172
-
173
- ### Step 7: Spawn Task Planner Agent
174
-
175
- Spawn `cbp-task-planner` agent with:
176
- ```yaml
177
- input:
178
- task_number: N
179
- round_number: N
180
- requirements: task.requirements
181
- round_requirements: [round-specific input from Step 3]
182
- checkpoint: {id, title, goal, context}
183
- task: {id, title, requirements, context}
184
- previous_rounds: {count, files_pending, files_changed, testing_qa_output, unapproved_files}
185
- ```
186
-
187
- **Round 2+ context**: The planner receives the previous round's testing-qa output and list of unapproved files.
188
-
189
- **Priority**: If `round_requirements` is set (round 2+), the planner focuses on those specific goals while respecting `task.requirements` as context.
190
-
191
- Wait for planner output.
192
-
193
- ### Step 8: Present Plan
194
-
195
- Present the plan to user:
196
-
197
- ```
198
- ## Round [N] Plan
199
-
200
- **Goal**: [goal]
201
-
202
- ### Steps:
203
- 1. [step]
204
- 2. [step]
205
- ...
206
-
207
- ### Files to modify:
208
- | File | Action | Purpose |
209
- |------|--------|---------|
210
- | ... | ... | ... |
211
- ```
212
-
213
- **Wave table** — when `approved_plan.waves[]` contains ≥2 entries, render a wave summary table BEFORE the files table:
214
-
215
- ```
216
- ### Execution Waves
217
- | Wave | Agent type | Files | Depends on | Skill preloads |
218
- |------|-----------|-------|-----------|----------------|
219
- | web-ui | cbp-round-executor | 7 | — | cbp-frontend-design |
220
- | backend-api | cbp-round-executor | 4 | — | — |
221
- ```
222
-
223
- Single-wave plans present the existing flat plan view (no wave table) — backward compatible.
224
-
225
- **Plan approval is the `ask`-tier `Skill(cbp-round-execute)` permission prompt** — there is NO approve/needs-changes/wrong AskUserQuestion here. After presenting the plan, proceed to Step 9, which auto-triggers `/cbp-round-execute`; the harness then shows the `ask`-tier permission prompt, and confirming it IS the user's go-ahead on the plan.
226
-
227
- **Denied-execute handling** — if the user declines the `/cbp-round-execute` permission, the plan does not run. Treat the decline as "the plan must change":
228
-
229
- - **Minor changes**: collect the user's feedback, re-spawn `cbp-task-planner` with it as a constraint (re-run Step 7), present the revised plan, and re-trigger `/cbp-round-execute`.
230
- - **Wrong direction**: save the rejection reason to round context and auto-trigger `/cbp-round-input` for new requirements.
231
-
232
- **If `auto_loop_mode === true`**: the loop auto-approves — log `round.context.plan_approval = { mode: "auto_loop", auto_approved_at: <ISO> }`, surface a one-line note `"Auto-approved under auto_loop_mode (round N of cap C)"`, and proceed to Step 9 (the `/cbp-round-execute` permission is auto-approved under the loop).
233
-
234
- ### Step 9: Auto-trigger Round Execute
235
-
236
- Save planner output to round context, then trigger `/cbp-round-execute`. The `ask`-tier permission prompt on `/cbp-round-execute` is the user's plan approval (see Step 8).
237
-
238
- - **checkpoint KIND**: `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.
239
- - **standalone KIND**: MCP `update_standalone_round(standalone_round_id, ...)` — standalone still uses MCP.
240
-
241
- ```
242
- Starting execution phase...
243
- ```
244
-
245
- ## Key Rules
246
-
247
- - **Planning ONLY** — no code execution, no testing
248
- - Planner gets full context (checkpoint + task + previous rounds)
249
- - Round 1 auto-triggered from `/cbp-task-start`
250
- - Round 2+ triggered from `/cbp-round-input`
251
- - Claude NEVER git adds files in round commands
252
-
253
- ## Integration
254
-
255
- - **Reads (checkpoint KIND)**: `.codebyplan/state/checkpoints/<id>.json`, `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)
256
- - **Reads (standalone KIND)**: MCP `get_current_standalone_task`, `get_standalone_rounds` — standalone still uses MCP
257
- - **Writes (checkpoint KIND)**: `codebyplan round add` (Step 4), `codebyplan round update` (Step 9), `codebyplan task update` (Step 6 context only) — break-glass: MCP `add_round` / `update_round` / `update_task`
258
- - **Writes (standalone KIND)**: MCP `add_standalone_round`, `update_standalone_round`, `update_standalone_task` — standalone still uses MCP
259
- - **Spawns**: `cbp-task-planner`
260
- - **Triggers**: `/cbp-round-execute` (auto, on plan approval)
261
- - **Triggered by**: `/cbp-task-start` (round 1), `/cbp-round-input` (round 2+)
@@ -1,120 +0,0 @@
1
- ---
2
- name: cbp-round-update
3
- description: Triage a finished round (Claude-only); direct user to run round-complete on a clean round, or trigger round-input when more work is needed
4
- argument-hint: [chk-task-round | task-round]
5
- triggers: [cbp-round-input]
6
- effort: low
7
- ---
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. round-update is **read + triage only** — it reads round state and routes; it never completes the round or writes file approvals. Read/write sources vary by KIND:
20
-
21
- | Operation | `checkpoint` KIND | `standalone` KIND |
22
- |-----------|------------------|-------------------|
23
- | Get task | local state (break-glass: `get_current_task`) | `get_current_standalone_task(repo_id)` |
24
- | Get rounds | local state (break-glass: `get_rounds`) | `get_standalone_rounds(standalone_task_id)` |
25
- | Update round (audit only) | `codebyplan round update` (break-glass: `update_round`) | `update_standalone_round(standalone_round_id, ...)` |
26
-
27
- > **Note**: The `standalone` KIND column uses MCP tools unchanged — standalone local-first migration is out of scope for this task and will be addressed in a later task.
28
-
29
- The completion + file-approval reconcile (`sync-approvals`, `complete_round` / `complete_standalone_round`) now lives in `/cbp-round-complete`.
30
-
31
- # Round Update Command
32
-
33
- **Claude-only, autonomous triage.** round-update inspects a finished round's automated state — which files Claude approved (`claude_approved`), whether testing-QA hard-failed, and whether `improve-round` left outstanding findings — and routes to exactly one next step. It makes **no writes** beyond an audit breadcrumb and **never prompts the user**: it is auto-triggered by `/cbp-round-end` and runs without a confirmation gate. The user-facing confirmation has moved to `/cbp-round-complete` (an `ask`-tier permission prompt). round-update NEVER reads or touches git staging — user approval is reconciled later by `/cbp-round-complete`.
34
-
35
- ## Routing in one line
36
-
37
- - **Round is clean** → **direct the user to run** `/cbp-round-complete` (the user-invoked finalizer reconciles your `git add`s and completes the round; round-update cannot invoke it — round-complete is `disable-model-invocation: true`).
38
- - **Round needs more work** → trigger `/cbp-round-input` (more changes / planning).
39
-
40
- ## Instructions
41
-
42
- ### Step 1: Parse `$ARGUMENTS`
43
-
44
- Parse the argument using the canonical chk-task-round notation (see `cbp-round-start` Step 0 "CHK / TASK / ROUND Identifier Notation Vocabulary"):
45
-
46
- | Shape | Regex | Resolves to |
47
- |-------|-------|-------------|
48
- | `{chk}-{task}-{round}` (e.g. `108-1-2`) | `^[0-9]+-[0-9]+-[0-9]+$` | Checkpoint-bound: CHK-{chk} TASK-{task} ROUND-{round} |
49
- | `{task}-{round}` (e.g. `45-2`) | `^[0-9]+-[0-9]+$` | Standalone: standalone TASK-{task} ROUND-{round} |
50
- | _(empty)_ | — | Use Kind Detection to find active task and latest round |
51
-
52
- Anything else is malformed — surface this error and stop:
53
-
54
- ```
55
- round-update: invalid argument `{value}`. Expected:
56
- 108-1-2 → CHK-108 TASK-1 ROUND-2 (checkpoint-bound)
57
- 45-2 → standalone TASK-45 ROUND-2
58
- (empty) → active task and latest round
59
- ```
60
-
61
- Error cases: `abc`, `108-`, `-1`, anything with whitespace or non-numeric characters. Note that `108-1` is **valid** here — it resolves to standalone TASK-108 ROUND-1 per the 2-segment task-round form. To target a checkpoint-bound round, use the 3-segment form `108-1-2`.
62
-
63
- #### Worked examples
64
-
65
- - `round-update 108-1-2` → CHK-108 TASK-1 ROUND-2
66
- - `round-update 45-2` → standalone TASK-45 ROUND-2
67
- - `round-update` (no arg) → active task and latest in-progress round via Kind Detection
68
- - `round-update abc` → error: malformed
69
-
70
- ### Step 1.5: Get Current Task and Round
71
-
72
- Given the parse from Step 1:
73
-
74
- | Parse | Resolution path |
75
- |-------|-----------------|
76
- | `{chk}-{task}-{round}` | Read `.codebyplan/state/checkpoints/` to find the checkpoint where `number === {chk}` (local-first; `npx codebyplan sync` on miss; break-glass: MCP `get_checkpoints(repo_id)`). Read `checkpoints/<id>/tasks/<taskId>.json` to find task where `number === {task}` (break-glass: MCP `get_tasks`). Read `checkpoints/<id>/tasks/<id>/rounds/<roundId>.json` to find round where `number === {round}` (break-glass: MCP `get_rounds`). |
77
- | `{task}-{round}` | MCP `get_standalone_rounds` via `get_current_standalone_task` or direct task lookup → filter `number === {round}`. Standalone still uses MCP. |
78
- | _(empty)_ | checkpoint KIND → read `.codebyplan/state/checkpoints/<id>/tasks/<id>.json` (local-first; sync on miss; break-glass: MCP `get_current_task` + `get_rounds`); standalone KIND → MCP `get_current_standalone_task(repo_id)` + `get_standalone_rounds(standalone_task_id)` — standalone still uses MCP. |
79
-
80
- If no task found: `No active task. Nothing to update.`
81
-
82
- This step is **read-only**. There is no permission gate — round-update is autonomous (see the Key Rules below).
83
-
84
- ### Step 2: Triage the Round
85
-
86
- Read the latest round's context: `round.context.testing_qa_output.totals.hard_fail`, `round.context.improve_round_findings[]`, `round.context.round_type`, and `round.files_changed[]` (each entry's `claude_approved`). Compute a single `clean` verdict:
87
-
88
- - **Survey round** (`round.context.round_type === 'survey'`): no file diff exists, so QA/approval predicates do not apply. `clean = improve_round_findings[]` is empty.
89
- - **Normal round**: `clean = (every file in files_changed[] has claude_approved === true) AND testing_qa_output.totals.hard_fail === false AND improve_round_findings[]` is empty.
90
-
91
- Display a one-line triage summary, e.g. `"ROUND-N triage: clean"` or `"ROUND-N triage: N findings / hard_fail=true → needs another round"`. round-update reads `claude_approved` only — it does **not** read git staging or `user_approved`; those belong to `/cbp-round-complete`.
92
-
93
- ### Step 3: Route
94
-
95
- **3a — Clean → direct the user to `/cbp-round-complete`.** STOP and surface the directive: `Round clean. Next: run /cbp-round-complete to reconcile your git adds and finalize.` round-update does NOT invoke round-complete — round-complete carries `disable-model-invocation: true`, so only the user can run it (its `ask`-tier permission prompt is the user's confirmation on that direct invoke). Once the user runs it, round-complete reconciles the `git add`s, completes the round, and routes onward (all files staged → task-check; some withheld → round-input). round-update writes nothing here beyond the Step 2 summary. In `auto_loop_mode`, a clean triage is the loop's success exit — the directive applies here too (the user invokes round-complete to finalize); the loop continues only via the not-clean path in 3b, and round-complete owns the degenerate clean-but-unstaged guard.
96
-
97
- **3b — Not clean → `/cbp-round-input`.** More changes or planning are needed. Routing is **independent of git staging** — round-input is reachable whether or not the user has staged anything (it performs its own deep analysis of the unapproved files). Two sub-cases:
98
-
99
- - **Auto-loop** (`round.context.auto_loop_mode === true`): compute `next_index = (round.context.auto_loop_index ?? 0) + 1`.
100
- - If `next_index > (round.context.auto_loop_cap ?? 5)`: surface the cap-exhausted prompt via AskUserQuestion (a genuine multi-option user decision — keep it). 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.
101
- - Otherwise: persist `round.context.auto_loop_decision = { spawned_next: true, next_index, decided_at }` on the current round (audit trail) — **checkpoint KIND**: `codebyplan round update --id <round-id> --task-id <uuid> --checkpoint-id <uuid> --context <json>` (break-glass: MCP `update_round`); **standalone KIND**: MCP `update_standalone_round(standalone_round_id, ...)` — standalone still uses MCP. Then auto-trigger `/cbp-round-input` with NO prompt. 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.
102
- - **Manual round**: auto-trigger `/cbp-round-input` directly (no prompt).
103
-
104
- ## Key Rules
105
-
106
- - **Autonomous + Claude-only** — round-update never prompts before running. It is auto-triggered by `/cbp-round-end`. On a clean triage it **directs** the user to run `/cbp-round-complete` — it cannot invoke that skill (`disable-model-invocation: true`); the confirmation step is round-complete's own `ask`-tier permission prompt on the user's direct invoke, not an AskUserQuestion here. (The auto-loop cap-exhausted AskUserQuestion in Step 3b is a genuine user decision, not a run gate.)
107
- - **Triage, never finalize** — round-update does NOT call `sync-approvals`, `complete_round`, or `complete_standalone_round`, and does NOT write file approvals. All of that is `/cbp-round-complete`.
108
- - **Never touches git** — round-update reads `claude_approved` from the DB only; it never reads staging, asks the user to `git add`, or stages files.
109
- - **git-add independence** — the "needs more work" route to `/cbp-round-input` fires regardless of whether files are staged. There is no clean-but-unstaged dead-end.
110
- - **standalone parity** — KIND detection governs which read/audit tools are used; the clean→`/cbp-round-complete` and not-clean→`/cbp-round-input` routing is identical for both KINDs (round-complete and round-input self-detect KIND).
111
-
112
- ## Integration
113
-
114
- - **Triggered by**: `/cbp-round-end` (auto), or user manually
115
- - **Reads (checkpoint KIND)**: `.codebyplan/state/checkpoints/<id>.json`, `checkpoints/<id>/tasks/<id>.json`, `checkpoints/<id>/tasks/<id>/rounds/<id>.json` (local-first; `npx codebyplan sync` on miss; MCP `get_current_task` / `get_checkpoints` / `get_tasks` / `get_rounds` as break-glass)
116
- - **Reads (standalone KIND)**: MCP `get_current_standalone_task`, `get_standalone_rounds` — standalone still uses MCP
117
- - **Writes (checkpoint KIND)**: `codebyplan round update` — audit only (`auto_loop_decision` / `auto_loop_cap_exhausted`; break-glass: MCP `update_round`). No completion, no file-approval writes.
118
- - **Writes (standalone KIND)**: MCP `update_standalone_round` — audit only — standalone still uses MCP
119
- - **Triggers**: `/cbp-round-input` (not-clean triage: outstanding findings, hard-fail, or unapproved Claude checks — fires independent of git staging; also the auto-loop dirty spawn), cap-exhausted prompt routes from Step 3b (any of the three options)
120
- - **Directs the user to**: `/cbp-round-complete` (clean triage) — round-update cannot invoke it (`disable-model-invocation: true`); it emits a `Next: /cbp-round-complete` directive and the user runs it (its `ask`-tier permission prompt is the confirmation)
@@ -1,53 +0,0 @@
1
- name: EAS Build + Submit
2
-
3
- on:
4
- push:
5
- tags:
6
- - 'mobile-v*.*.*'
7
- workflow_dispatch:
8
- inputs:
9
- profile:
10
- type: choice
11
- description: Build profile
12
- options: [preview, production]
13
- default: preview
14
- platform:
15
- type: choice
16
- description: Platform
17
- options: [all, ios, android]
18
- default: all
19
-
20
- jobs:
21
- build:
22
- runs-on: ubuntu-latest
23
- steps:
24
- - uses: actions/checkout@v4
25
-
26
- - uses: pnpm/action-setup@v3
27
- with:
28
- version: 10
29
-
30
- - uses: actions/setup-node@v4
31
- with:
32
- node-version: 22
33
- cache: pnpm
34
-
35
- - uses: expo/expo-github-action@v8
36
- with:
37
- eas-version: latest
38
- token: ${{ secrets.EXPO_TOKEN }}
39
-
40
- - run: pnpm install --frozen-lockfile
41
-
42
- - name: EAS Build
43
- run: |
44
- cd apps/mobile
45
- eas build --profile ${{ inputs.profile || 'preview' }} \
46
- --platform ${{ inputs.platform || 'all' }} \
47
- --non-interactive --no-wait
48
-
49
- - name: EAS Submit (production only)
50
- if: inputs.profile == 'production'
51
- run: |
52
- cd apps/mobile
53
- eas submit --platform ${{ inputs.platform || 'all' }} --latest --non-interactive
@@ -1,31 +0,0 @@
1
- name: VS Code Marketplace publish
2
-
3
- on:
4
- push:
5
- tags:
6
- - 'vscode-v*.*.*'
7
- workflow_dispatch:
8
-
9
- jobs:
10
- publish:
11
- runs-on: ubuntu-latest
12
- steps:
13
- - uses: actions/checkout@v4
14
-
15
- - uses: pnpm/action-setup@v3
16
- with:
17
- version: 10
18
-
19
- - uses: actions/setup-node@v4
20
- with:
21
- node-version: 22
22
- cache: pnpm
23
-
24
- - run: pnpm install --frozen-lockfile
25
- - run: pnpm --filter REPLACE_WITH_EXT_NAME build
26
- - name: Publish to Marketplace
27
- env:
28
- VSCE_PAT: ${{ secrets.VSCE_PAT }}
29
- run: |
30
- cd apps/vscode
31
- npx @vscode/vsce publish --no-yarn
@@ -1,172 +0,0 @@
1
- ---
2
- name: cbp-task-check
3
- description: AI production review for the current task
4
- argument-hint: [chk-task]
5
- triggers: [cbp-task-testing, cbp-round-input]
6
- effort: high
7
- ---
8
-
9
- # Task Check Command
10
-
11
- AI-driven production readiness review. Spawns the `cbp-task-check` agent for thorough verification including user satisfaction discussion. This command is a thin orchestrator — the agent does the heavy lifting. It is the **cross-round double-check**: rounds already own per-round QA (debug scan, security grep, audit, per-app build/lint/types), so this layer focuses on holistic concerns visible only across the full task diff — requirements traceability, checkpoint alignment, shippability, holistic code review, and scope drift — never re-running per-round checks.
12
-
13
- ## Inline-Fallback for Spawn Failure
14
-
15
- If the `cbp-task-check` agent spawn fails for any reason (`API Error: Extra usage required`, monthly Agent usage cap, provider 5xx, rate limit, context overflow), the orchestrator MUST follow the canonical inline-fallback procedure documented in `skills/cbp-round-end/SKILL.md` "Inline-fallback for any spawn failure".
16
-
17
- Procedure summary (pointer back to canonical):
18
-
19
- 1. Detect the failure class from the error string; record `round.context.task_check_findings.spawn_failure = { class, error_message, decided_at }`.
20
- 2. Walk the agent's documented Phase 1-10 checklist inline using `Read` / `Grep` / `Bash` / MCP `get_*` tools — the agent's definition file is the inline script.
21
- 3. Populate the agent's output contract (`verdict`, `route_recommendation`, `requirements_status`, `qa_status`, `code_review_findings`, `user_satisfaction`, `scope_divergence_detected`, etc.) with `mode: 'inline_fallback'` so analytics distinguishes.
22
- 4. Apply the pre-emptive-skip rule: when the same failure class fired in the previous skill of this session, skip the spawn attempt entirely and go straight to inline.
23
- 5. Continue the skill — do NOT abort. Inline-fallback is intended to keep the pipeline moving under sustained outages.
24
-
25
- Inline-fallback is NOT a quality downgrade trapdoor — every Phase from the agent definition MUST be walked, in order, with the same Read/Grep depth the agent would have used. Skipping phases under the banner of fallback is a separate failure mode that `cbp-improve-claude` flags as `inline_fallback_shortcutting`.
26
-
27
- ## When Used
28
-
29
- - After all rounds complete and all files approved (auto-triggered by `/cbp-round-complete`)
30
- - Before `/cbp-task-testing`
31
- - `/cbp-task-check` is NEVER skippable
32
-
33
- ## Instructions
34
-
35
- ### Step 1: Parse `$ARGUMENTS`
36
-
37
- Parse the argument using the canonical chk-task-round notation (see `cbp-round-start` Step 0 "CHK / TASK / ROUND Identifier Notation Vocabulary"):
38
-
39
- | Shape | Regex | Resolves to |
40
- |-------|-------|-------------|
41
- | `{chk}-{task}` (e.g. `108-1`) | `^[0-9]+-[0-9]+$` | Checkpoint-bound: CHK-{chk} TASK-{task} |
42
- | _(empty)_ | — | Resolve from local state per Step 1.5/2 (MCP `get_current_task` break-glass) — the active in-progress task |
43
- | `{task}` (bare number) | — | **Error**: "Use /cbp-standalone-task-check {N} instead — bare numbers no longer route to standalone tasks." |
44
-
45
- Anything else is malformed — surface this error and stop:
46
-
47
- ```
48
- task-check: invalid argument `{value}`. Expected:
49
- 108-1 → CHK-108 TASK-1 (checkpoint-bound)
50
- (empty) → active in-progress task
51
-
52
- For standalone tasks, use `/cbp-standalone-task-check {N}`.
53
- For a specific round, use `/cbp-round-update 108-1-2`.
54
- ```
55
-
56
- Error cases: `108-1-2` (that is round-update's shape), `abc`, `108-`, `-1`, `108--1`, anything with whitespace or non-numeric characters.
57
-
58
- #### Worked examples
59
-
60
- - `task-check 108-1` → CHK-108 TASK-1
61
- - `task-check` (no arg) → active in-progress task via `get_current_task`
62
- - `task-check 45` → error: "Use /cbp-standalone-task-check 45 instead — bare numbers no longer route to standalone tasks."
63
- - `task-check 108-1-2` → error: "use `/cbp-round-update 108-1-2`"
64
- - `task-check abc` → error: malformed
65
-
66
- ### Step 1.5: Get Current Task
67
-
68
- Given the parse from Step 1:
69
-
70
- | Parse | Resolution path |
71
- |-------|-----------------|
72
- | `{chk}-{task}` | Read `.codebyplan/state/checkpoints/*.json` → filter `number === {chk}`. Read `.codebyplan/state/checkpoints/<id>/tasks/*.json` → filter `number === {task}`. If missing/stale, run `npx codebyplan sync` once and re-read. Break-glass fallback: MCP `get_checkpoints`/`get_tasks` when state dir absent and sync fails. |
73
- | _(empty)_ | Read `.codebyplan/state/todos.json` → find the active in-progress task. If missing/stale, run `npx codebyplan sync` once and re-read. Break-glass fallback: MCP `get_current_task(repo_id)` when state dir absent and sync fails. |
74
-
75
- If no in-progress task, show error and stop.
76
-
77
- ### Step 2: Quick Gate — Verify All Rounds Complete
78
-
79
- Read `.codebyplan/state/checkpoints/<checkpointId>/tasks/<taskId>/rounds/*.json` (local-first). If missing/stale, run `npx codebyplan sync` once and re-read. Break-glass fallback: MCP `get_rounds` when state dir absent and sync fails. Verify all rounds are `completed`.
80
-
81
- If any rounds still in_progress:
82
-
83
- ```
84
- ## Cannot Run Task Check
85
-
86
- TASK-[N] has an active round (Round [N]). Complete it first:
87
- - Run `/cbp-round-update` to finish the round
88
- ```
89
-
90
- Stop here.
91
-
92
- ### Step 3: Load All Context
93
-
94
- 1. Checkpoint details — from `.codebyplan/state/checkpoints/<checkpointId>.json` (already read in Step 1.5)
95
- 2. Task details — from `.codebyplan/state/checkpoints/<checkpointId>/tasks/<taskId>.json` (already read in Step 1.5)
96
- 3. All rounds — from `.codebyplan/state/checkpoints/<checkpointId>/tasks/<taskId>/rounds/*.json` (already read in Step 2)
97
-
98
- ### Step 4: Spawn Task Check Agent
99
-
100
- Spawn `cbp-task-check` agent with full context:
101
-
102
- ```yaml
103
- input:
104
- task_number: [N]
105
- round_number: [total rounds]
106
- checkpoint: { id, title, goal, context }
107
- task: { id, title, requirements, context, files_changed, qa }
108
- rounds: [{ number, requirements, context, qa, files_changed }]
109
- ```
110
-
111
- Wait for agent to complete. Agent handles all 10 phases including user satisfaction discussion.
112
-
113
- ### Step 5: Save Agent Output
114
-
115
- Save agent output to task context: `codebyplan task update --id <taskId> --checkpoint-id <checkpointId> --context '{"check_verdict": ...}'` (CLI write-through: local state file + REST). Break-glass fallback: MCP `update_task` when CLI is unavailable.
116
-
117
- - `task.context.check_verdict` = agent output (verdict, requirements_check, etc.)
118
-
119
- ### Step 6: Route Based on Verdict
120
-
121
- **READY + satisfied:**
122
-
123
- Starting task testing...
124
-
125
- Invoke `cbp-task-testing` via the Skill tool with the same `{chk-task}` argument. `cbp-task-testing`
126
- is `allow`-tier — it auto-fires silently. If the `cbp-skill-context-guard.sh` hook detects the
127
- context window is above the 200K threshold it will block the skill and direct you to run
128
- `/cbp-clear-prep` first; otherwise testing starts immediately.
129
-
130
- **NOT READY — fixable issues:**
131
-
132
- ```
133
- Issues found that need addressing:
134
- - [issue 1]
135
- - [issue 2]
136
- ```
137
-
138
- Invoking `cbp-round-input` to address the issues found during review...
139
-
140
- Invoke `cbp-round-input` via the Skill tool. `cbp-round-input` is `allow`-tier — it auto-fires silently.
141
-
142
- **NOT READY — needs new task:**
143
-
144
- ```
145
- Scope issues identified that require a new task:
146
- - [scope issue]
147
- ```
148
-
149
- Suggest: `/cbp-task-create`. **STOP HERE** — wait for user (creating a new task is a user scope decision — not auto-triggered).
150
-
151
- **NOT READY — approvals missing:**
152
-
153
- ```
154
- Code review passed but [N] files need user approval.
155
- ```
156
-
157
- Suggest: Approve files, then re-run `/cbp-task-check`. **STOP HERE** — wait for user (approval is a user action — not auto-triggered).
158
-
159
- ## Key Rules
160
-
161
- - **`/cbp-task-check` is NEVER skippable** — mandatory before `/cbp-task-testing`
162
- - **This is AI review + user satisfaction** — not automated testing
163
- - **Read all changed files** — agent does the heavy lifting
164
- - **No file changes** — review only, never edit
165
- - **Checkpoint-bound only** — for standalone tasks use `/cbp-standalone-task-check`
166
-
167
- ## Integration
168
-
169
- - **Reads**: `.codebyplan/state/checkpoints/*.json`, `checkpoints/<id>/tasks/*.json`, `checkpoints/<id>/tasks/<id>/rounds/*.json`, `todos.json` (local-first; `npx codebyplan sync` on miss; MCP `get_current_task`/`get_rounds` break-glass), plus all changed files (via agent)
170
- - **Writes**: `codebyplan task update` (CLI write-through; MCP `update_task` break-glass)
171
- - **Triggers**: auto-triggers `cbp-task-testing` via Skill tool on READY + satisfied (`allow`-tier, fires silently; the 200K context guard handles oversized contexts via the cbp-clear-prep flow); auto-triggers `cbp-round-input` via Skill tool on NOT READY — fixable issues (`allow`-tier, fires silently)
172
- - **Triggered by**: `/cbp-round-complete` (auto, when all files approved)