codebyplan 1.13.28 → 1.13.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +728 -18
- package/package.json +1 -1
- package/templates/README.md +16 -13
- package/templates/agents/cbp-cc-executor.md +6 -9
- package/templates/agents/cbp-improve-round.md +1 -1
- package/templates/agents/cbp-round-executor.md +1 -2
- package/templates/agents/cbp-task-check.md +12 -8
- package/templates/hooks/cbp-mcp-round-sync.sh +9 -0
- package/templates/rules/README.md +13 -8
- package/templates/rules/cbp-operating-gotchas.md +64 -0
- package/templates/settings.project.base.json +3 -3
- package/templates/skills/cbp-build-cc-agent/SKILL.md +3 -4
- package/templates/skills/cbp-build-cc-agent/examples/with-skills-preload.md +2 -3
- package/templates/skills/cbp-build-cc-agent/reference/frontmatter-fields.md +0 -1
- package/templates/skills/cbp-build-cc-agent/scripts/validate-agent.sh +0 -6
- package/templates/skills/cbp-build-cc-agent/templates/agent.md +1 -2
- package/templates/skills/cbp-build-cc-claude-file/SKILL.md +16 -2
- package/templates/skills/cbp-build-cc-claude-file/reference/what-belongs.md +1 -1
- package/templates/skills/cbp-build-cc-mode/SKILL.md +5 -4
- package/templates/skills/cbp-build-cc-rule/SKILL.md +2 -2
- package/templates/skills/cbp-build-cc-settings/reference/cbp-permission-policy.md +3 -2
- package/templates/skills/cbp-build-cc-skill/reference/cbp-quality.md +1 -1
- package/templates/skills/cbp-merge-main/SKILL.md +1 -1
- package/templates/skills/cbp-round-complete/SKILL.md +164 -0
- package/templates/skills/cbp-round-end/SKILL.md +16 -14
- package/templates/skills/cbp-round-end/reference/findings-presentation.md +7 -17
- package/templates/skills/cbp-round-execute/SKILL.md +4 -0
- package/templates/skills/cbp-round-input/SKILL.md +6 -6
- package/templates/skills/cbp-round-start/SKILL.md +12 -15
- package/templates/skills/cbp-round-update/SKILL.md +31 -143
- package/templates/skills/cbp-standalone-task-check/SKILL.md +2 -2
- package/templates/skills/cbp-standalone-task-complete/SKILL.md +4 -3
- package/templates/skills/cbp-standalone-task-testing/SKILL.md +4 -4
- package/templates/skills/cbp-task-check/SKILL.md +3 -3
- package/templates/skills/cbp-task-complete/SKILL.md +7 -6
- package/templates/skills/cbp-task-testing/SKILL.md +3 -5
- package/templates/skills/cbp-todo/SKILL.md +1 -1
- package/templates/skills/cbp-build-cc-memory/SKILL.md +0 -201
- package/templates/skills/cbp-build-cc-memory/examples/feedback-memory.md +0 -11
- package/templates/skills/cbp-build-cc-memory/examples/project-memory.md +0 -11
- package/templates/skills/cbp-build-cc-memory/examples/reference-memory.md +0 -13
- package/templates/skills/cbp-build-cc-memory/examples/user-memory.md +0 -14
- package/templates/skills/cbp-build-cc-memory/reference/memory-types.md +0 -59
- package/templates/skills/cbp-build-cc-memory/reference/when-to-save.md +0 -62
- package/templates/skills/cbp-build-cc-memory/templates/MEMORY-index.md +0 -4
- package/templates/skills/cbp-build-cc-memory/templates/memory-entry.md +0 -15
package/package.json
CHANGED
package/templates/README.md
CHANGED
|
@@ -1,20 +1,23 @@
|
|
|
1
|
-
#
|
|
1
|
+
# .claude/
|
|
2
2
|
|
|
3
|
-
This directory
|
|
3
|
+
This directory is **managed by the `codebyplan` package** and refreshed by:
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
```sh
|
|
6
|
+
npx codebyplan claude update
|
|
7
|
+
```
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
## Do not hand-edit managed files
|
|
8
10
|
|
|
9
|
-
|
|
11
|
+
Files installed here (skills, agents, hooks, rules) are owned by the `codebyplan` package. Running `codebyplan claude update` will overwrite any local changes to managed files.
|
|
10
12
|
|
|
11
|
-
|
|
12
|
-
| --------- | ------------------------------------ | ----------------------------------------------------------------------------------------------- |
|
|
13
|
-
| `skills/` | 41 folders | each is a `SKILL.md` plus optional `templates/`, `reference/`, `examples/`, `scripts/` siblings |
|
|
14
|
-
| `agents/` | 16 files | flat `.md` agent prompts (NOT `AGENT.md` subdirs) |
|
|
15
|
-
| `hooks/` | 20 `.sh` + `hooks.json` + `README.md` | event hooks and manifest |
|
|
16
|
-
| `rules/` | 1+ files | flat `<name>.md` rule files; see `rules/README.md` for bar and format |
|
|
13
|
+
To change managed behaviour, make the change upstream in the `codebyplan` package and publish a new version.
|
|
17
14
|
|
|
18
|
-
##
|
|
15
|
+
## Repo-specific additions
|
|
19
16
|
|
|
20
|
-
|
|
17
|
+
Additions that belong only to this repo go in repo-scoped files that `codebyplan` does not touch:
|
|
18
|
+
|
|
19
|
+
- **Root `CLAUDE.md`** — repo-level context and instructions always loaded by Claude Code.
|
|
20
|
+
- **`rules/` files with `scope: repo-only:<repo-name>`** — behavioral constraints specific to this repo.
|
|
21
|
+
- **`context/` and `docs/`** — repo-specific reference material referenced by your own agents or skills.
|
|
22
|
+
|
|
23
|
+
Repo-scoped files coexist with managed files and are never overwritten by `codebyplan claude update`.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
scope: org-shared
|
|
3
3
|
name: cbp-cc-executor
|
|
4
|
-
description: Authoring executor for `.claude/` infrastructure. Applies approved changes across rules, skills, agents, context, CLAUDE.md, settings,
|
|
4
|
+
description: Authoring executor for `.claude/` infrastructure. Applies approved changes across rules, skills, agents, context, CLAUDE.md, settings, and hooks — with update-first discipline, scope-marker enforcement, and length-limit awareness. Callable by the main conversation, `/cbp-checkpoint-end`, and `round-executor` (for in-scope `.claude/` infra deliverables).
|
|
5
5
|
tools: Read, Write, Edit, Glob, Grep, Skill, Task, AskUserQuestion, mcp__codebyplan__create_task
|
|
6
6
|
model: sonnet
|
|
7
7
|
effort: xhigh
|
|
@@ -40,7 +40,7 @@ input:
|
|
|
40
40
|
source: 'main' | 'checkpoint-end' | 'round-executor' # additional internal sources may exist in your CBP setup; extend as needed
|
|
41
41
|
changes:
|
|
42
42
|
- id: string | number
|
|
43
|
-
type: 'rule' | 'skill' | 'agent' | 'context' | 'architecture' | 'CLAUDE.md' | 'settings' | 'hook'
|
|
43
|
+
type: 'rule' | 'skill' | 'agent' | 'context' | 'architecture' | 'CLAUDE.md' | 'settings' | 'hook'
|
|
44
44
|
target: string # Path under .claude/ (or CLAUDE.md)
|
|
45
45
|
action: 'create' | 'update' | 'delete'
|
|
46
46
|
description: string # What the change is
|
|
@@ -121,13 +121,12 @@ Per validated change, route to the correct authoring path:
|
|
|
121
121
|
| CLAUDE.md | `/cbp-build-cc-claude-file` (only for a non-root CLAUDE.md — root exists) | Direct Edit |
|
|
122
122
|
| settings | `/cbp-build-cc-settings` | `/cbp-build-cc-settings` (schema-critical — always route) |
|
|
123
123
|
| hook | Direct Write with `# @scope:` header | Direct Edit |
|
|
124
|
-
| memory | `/cbp-build-cc-memory` | `/cbp-build-cc-memory` (MEMORY.md index must update) |
|
|
125
124
|
|
|
126
125
|
Routing rules:
|
|
127
126
|
|
|
128
127
|
- **Creates always go through the build-cc skill** when one exists — the skill embeds the signature (`scope:` / `$schema:` / `type:`) the build-cc skills require.
|
|
129
128
|
- **Updates use direct Edit** on already-signed files. The signature travels with the file; editing preserves it.
|
|
130
|
-
- **Settings
|
|
129
|
+
- **Settings always route** — their schema semantics are non-trivial.
|
|
131
130
|
|
|
132
131
|
Record every applied change with `authored_via` and `status`.
|
|
133
132
|
|
|
@@ -143,9 +142,8 @@ Record every applied change with `authored_via` and `status`.
|
|
|
143
142
|
After all changes applied:
|
|
144
143
|
|
|
145
144
|
1. For every touched file, re-check: still within length limit? scope marker still present?
|
|
146
|
-
2. If `
|
|
147
|
-
3.
|
|
148
|
-
4. Report any drift as `status: 'partial'` and list in `applied_changes[].note`.
|
|
145
|
+
2. If `settings.json` touched: valid JSON? Re-read the file and validate syntax — matched braces/brackets, quoted keys, no trailing commas. Reject the change if invalid.
|
|
146
|
+
3. Report any drift as `status: 'partial'` and list in `applied_changes[].note`.
|
|
149
147
|
|
|
150
148
|
### Phase 6: Return
|
|
151
149
|
|
|
@@ -164,7 +162,6 @@ Every managed file must carry its scope marker — checked by `validate-structur
|
|
|
164
162
|
| agent | `scope: {value}` | YAML frontmatter |
|
|
165
163
|
| hook | `# @scope: {value}` | Header comment |
|
|
166
164
|
| settings | `$schema: {url}` (implicit scope via filename) | JSON field |
|
|
167
|
-
| memory | `type: {user\|feedback\|project\|reference}` | YAML frontmatter |
|
|
168
165
|
| context | _(signatureless)_ | n/a |
|
|
169
166
|
| architecture | _(signatureless)_ | n/a |
|
|
170
167
|
| CLAUDE.md | _(plain markdown)_ | n/a |
|
|
@@ -208,6 +205,6 @@ Block-limit violations are non-negotiable — split before applying.
|
|
|
208
205
|
- **Spawned by**: main conversation (ad-hoc), `/cbp-checkpoint-end` (future), `round-executor` (in-scope `.claude/` infra deliverables, `source: 'round-executor'`)
|
|
209
206
|
- **Reads**: `.claude/` inventory, `validate-structure-lengths.sh`, target files
|
|
210
207
|
- **Writes**: `.claude/` files (via `/cbp-build-cc-*` skills for creates, direct Edit for updates)
|
|
211
|
-
- **Calls skills**: `/cbp-build-cc-rule`, `/cbp-build-cc-skill`, `/cbp-build-cc-claude-file`, `/cbp-build-cc-settings
|
|
208
|
+
- **Calls skills**: `/cbp-build-cc-rule`, `/cbp-build-cc-skill`, `/cbp-build-cc-claude-file`, `/cbp-build-cc-settings`
|
|
212
209
|
- **Creates tasks**: via MCP `create_task` when a change exceeds invocation scope
|
|
213
210
|
- **Enforced by**: `validate-structure-lengths.sh` (length), `validate-structure-scope.sh` (scope marker), `validate-structure-patterns.sh` (path layout)
|
|
@@ -279,6 +279,6 @@ Return findings sorted by severity (critical first). If no findings, return `sta
|
|
|
279
279
|
## Integration
|
|
280
280
|
|
|
281
281
|
- **Spawned by**: `/cbp-round-end` (Step 6)
|
|
282
|
-
- **Returns to**: `/cbp-round-end` which
|
|
282
|
+
- **Returns to**: `/cbp-round-end` which auto-applies in-scope findings inline and routes out-of-scope findings to `/cbp-round-update`
|
|
283
283
|
- **Does NOT**: Apply any changes
|
|
284
284
|
- **Reads**: Changed files, task requirements, round context
|
|
@@ -98,7 +98,7 @@ output:
|
|
|
98
98
|
|
|
99
99
|
**Key Principle:** If something is unclear or you're blocked, ASK the user. Don't make assumptions.
|
|
100
100
|
|
|
101
|
-
**Routing Principle:** For managed files requiring routing commands (`/cbp-build-cc-rule`, `/cbp-build-cc-agent`, `/cbp-build-cc-skill`, `/cbp-build-cc-claude-file`, `/cbp-build-cc-settings
|
|
101
|
+
**Routing Principle:** For managed files requiring routing commands (`/cbp-build-cc-rule`, `/cbp-build-cc-agent`, `/cbp-build-cc-skill`, `/cbp-build-cc-claude-file`, `/cbp-build-cc-settings`), use Skill tool. For other managed files (templates, architecture, research, stack docs), use direct Write/Edit.
|
|
102
102
|
|
|
103
103
|
## Execution Workflow
|
|
104
104
|
|
|
@@ -124,7 +124,6 @@ Skill tool: skill="cbp-build-cc-agent" # for .claude/agents/
|
|
|
124
124
|
Skill tool: skill="cbp-build-cc-skill" # for .claude/skills/
|
|
125
125
|
Skill tool: skill="cbp-build-cc-claude-file" # for .claude/CLAUDE.md
|
|
126
126
|
Skill tool: skill="cbp-build-cc-settings" # for .claude/settings*.json
|
|
127
|
-
Skill tool: skill="cbp-build-cc-memory" # for ~/.claude/projects/<project>/memory/
|
|
128
127
|
Direct Write/Edit # for templates, docs/
|
|
129
128
|
```
|
|
130
129
|
|
|
@@ -9,7 +9,7 @@ effort: xhigh
|
|
|
9
9
|
|
|
10
10
|
# Task Check Agent
|
|
11
11
|
|
|
12
|
-
AI-driven production readiness review with user satisfaction discussion.
|
|
12
|
+
AI-driven production readiness review with user satisfaction discussion. This is the **cross-round double-check** layer: per-round QA (build/lint/types per app, the `console.log`/debug scan, the OWASP/secret grep, API auth-enforcement curls, `pnpm audit`) already ran inside each round's `testing-qa-agent` — this agent does NOT re-run it. Its unique value is holistic: verifying all task requirements are met, checkpoint goals are aligned, the aggregated work is shippable, and — for tasks that span many rounds where scope can shift as new ideas/problems surface — detecting scope drift that should update the checkpoint or task rather than re-running per-round checks.
|
|
13
13
|
|
|
14
14
|
**Numeric-claim verification (Proposal P6)**: when round summaries assert numeric facts (file counts, package counts, percentage changes, line counts, version numbers), verify each via direct count: `find ... | wc -l`, `grep -c`, `wc -l <file>`. Do NOT accept narrative numbers without a verification command. Mismatches between asserted and actual counts indicate documentation drift; flag as a finding requiring a fix.
|
|
15
15
|
|
|
@@ -95,14 +95,16 @@ Check `task.files_changed`:
|
|
|
95
95
|
- List unapproved files
|
|
96
96
|
- Determine if unapproved files block completion
|
|
97
97
|
|
|
98
|
-
### Phase 6: Code Review
|
|
98
|
+
### Phase 6: Code Review (holistic spot-check)
|
|
99
99
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
- No
|
|
103
|
-
- No
|
|
104
|
-
- Error handling present where needed
|
|
105
|
-
- Consistent with existing codebase patterns
|
|
100
|
+
Per-round QA already ran the line-level checks — the `console.log`/debug scan (round `testing-qa-agent` Phase 3.5), the OWASP secret/injection grep (Phase 5), the API auth-enforcement curl (Phase 3.55), and `pnpm audit` (Phase 3.7). Do NOT re-run them here. Phase 6 is a light holistic spot-check across the aggregated diff for what a single round cannot see:
|
|
101
|
+
|
|
102
|
+
- No obvious bugs or regressions that emerge only when all rounds' changes are read together
|
|
103
|
+
- No cross-round integration gaps (a field/contract introduced in one round that a later round broke)
|
|
104
|
+
- Error handling present where needed at the feature boundary
|
|
105
|
+
- Consistent with existing codebase patterns across the full task diff
|
|
106
|
+
|
|
107
|
+
If the aggregated diff surfaces an obvious issue per-round QA missed, flag it as a finding — but the per-round scans are authoritative for line-level concerns.
|
|
106
108
|
|
|
107
109
|
### Phase 7: Shippable Feature Gate
|
|
108
110
|
|
|
@@ -125,6 +127,8 @@ Update `round_outcome_analysis` with findings.
|
|
|
125
127
|
|
|
126
128
|
### Phase 9: User Satisfaction Discussion
|
|
127
129
|
|
|
130
|
+
For tasks that ran many rounds, scope drift accumulates quietly — each round may have absorbed a new idea or problem without the checkpoint/task requirements being updated. The satisfaction discussion is where that drift surfaces; treat the scope-divergence scan below as a first-class output, not an afterthought.
|
|
131
|
+
|
|
128
132
|
Present findings to user via AskUserQuestion:
|
|
129
133
|
|
|
130
134
|
```
|
|
@@ -5,6 +5,15 @@
|
|
|
5
5
|
# staging-status flip, and web-UI flag sync to the codebyplan CLI.
|
|
6
6
|
# Replaces the inline jq merge + curl PATCH with a single CLI call.
|
|
7
7
|
#
|
|
8
|
+
# Trigger context (CHK-197): complete_round is now called by /cbp-round-complete
|
|
9
|
+
# (the permission-gated finalizer), which already runs `sync-approvals` once
|
|
10
|
+
# BEFORE completing the round. This hook firing afterward is the expected
|
|
11
|
+
# post-complete safety net — it catches approval drift between that pre-complete
|
|
12
|
+
# sync and the approval_locked write; it is NOT a duplicate run to remove.
|
|
13
|
+
# NOTE: this hook matches complete_round only; complete_standalone_round is NOT
|
|
14
|
+
# covered, so standalone rounds rely solely on /cbp-round-complete's pre-complete
|
|
15
|
+
# sync (pre-existing coverage gap, documented here intentionally — not fixed).
|
|
16
|
+
#
|
|
8
17
|
# Delegates to: npx codebyplan round sync-approvals
|
|
9
18
|
# - Git-diff drift merge (in/not-in DB vs git)
|
|
10
19
|
# - Staging-status → user_approved flip
|
|
@@ -34,14 +34,19 @@ The `install`/`update`/`uninstall` flow handles these files identically to how i
|
|
|
34
34
|
|
|
35
35
|
## Current status
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
| Rule file | Summary |
|
|
40
|
-
|
|
41
|
-
| `scope-vocabulary.md` | Canonical scope-marker enum (`org-shared` / `project-shared` / `repo-only:<name>`) enforced by three validators |
|
|
42
|
-
| `context-file-loading.md` | Context-file load contract — who loads what, when, and how missing files are handled |
|
|
43
|
-
| `todo-backend.md` | Todos queue contract, six DB-layer workflow invariants, and writer obligations for MCP mutators |
|
|
44
|
-
| `supabase-branch-lifecycle.md` | Supabase preview-branch lifecycle mirrors the git feat-branch lifecycle — lazy create on first DB change, delete wherever the git branch is removed |
|
|
37
|
+
Nine rules are shipped:
|
|
38
|
+
|
|
39
|
+
| Rule file | Scope | Summary |
|
|
40
|
+
|---|---|---|
|
|
41
|
+
| `scope-vocabulary.md` | `org-shared` | Canonical scope-marker enum (`org-shared` / `project-shared` / `repo-only:<name>`) enforced by three validators |
|
|
42
|
+
| `context-file-loading.md` | `org-shared` | Context-file load contract — who loads what, when, and how missing files are handled |
|
|
43
|
+
| `todo-backend.md` | `org-shared` | Todos queue contract, six DB-layer workflow invariants, and writer obligations for MCP mutators |
|
|
44
|
+
| `supabase-branch-lifecycle.md` | `org-shared` | Supabase preview-branch lifecycle mirrors the git feat-branch lifecycle — lazy create on first DB change, delete wherever the git branch is removed |
|
|
45
|
+
| `agent-claim-verification.md` | `org-shared` | Verify an agent's claimed outcomes against ground truth (git, filesystem, tool results) before trusting them |
|
|
46
|
+
| `e2e-mandatory.md` | `org-shared` | E2E is opt-out: an eligible framework whose source changed in a round must run its specialist or record a valid skip |
|
|
47
|
+
| `parallel-waves.md` | `org-shared` | Wave-dispatch contract for parallel round execution — topological ordering and per-wave testing |
|
|
48
|
+
| `task-routing-recommendation.md` | `repo-only:codebyplan` | Two-family command surface (checkpoint-bound vs standalone) and identifier-format routing — installed only in codebyplan-family repos |
|
|
49
|
+
| `cbp-operating-gotchas.md` | `org-shared` | Cross-repo CBP-tooling traps (ship/timeout/MCP-replace/worktree/lint-baseline/approval-reconcile) + behavioral prefs, inherited once by all consumers |
|
|
45
50
|
|
|
46
51
|
## Contributing a rule
|
|
47
52
|
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
---
|
|
2
|
+
scope: org-shared
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# CBP Operating Gotchas
|
|
6
|
+
|
|
7
|
+
Cross-repo traps in the CodeByPlan tooling surface (CLI, MCP, git, host platform) that
|
|
8
|
+
recur in every consuming repo. They are recorded **once** here so consumers inherit them via
|
|
9
|
+
`npx codebyplan claude update` instead of re-learning each one per repo. This file is for
|
|
10
|
+
SHARED tooling behavior only — repo-specific gotchas belong in that repo's own `CLAUDE.md`
|
|
11
|
+
(root or nested), never here.
|
|
12
|
+
|
|
13
|
+
## Tooling Traps
|
|
14
|
+
|
|
15
|
+
- **`codebyplan ship` can report a false `checks_failed`.** The CLI polls
|
|
16
|
+
`gh pr checks --json name,state,conclusion` and treats a check as failed when its `state` is
|
|
17
|
+
`COMPLETED` and its `conclusion` is non-null and not a success value — but `gh` does not always
|
|
18
|
+
populate `conclusion` for every check type, so a green PR can be misread as failed. Do not trust
|
|
19
|
+
the CLI verdict alone: confirm with `gh pr checks <pr> --watch`, then merge manually with
|
|
20
|
+
`gh pr merge <pr> --merge`.
|
|
21
|
+
|
|
22
|
+
- **macOS has no `timeout` binary.** Wrapping a build/lint/test in `timeout …` fails with
|
|
23
|
+
`command not found: timeout` — meaning the wrapped command **never ran** (a misleading
|
|
24
|
+
"exit 127", not a real result). Never shell-wrap with `timeout`; use the Bash tool's own
|
|
25
|
+
`timeout` parameter to bound a command.
|
|
26
|
+
|
|
27
|
+
- **MCP `update_checkpoint` / `update_task` / `update_round` are REPLACE, not merge.** The
|
|
28
|
+
`context` JSONB and `files_changed[]` array overwrite wholesale — a partial write silently
|
|
29
|
+
clobbers existing `decisions` / `discoveries` / `check_results`. Always read the current row,
|
|
30
|
+
merge your change into the full object/array, then write the whole thing back.
|
|
31
|
+
|
|
32
|
+
- **`resolve-worktree` empty output = a NULL `(device, path, branch)` tuple, not a broken
|
|
33
|
+
resolver.** When identity is unresolved the server can collapse the caller to the repo's main
|
|
34
|
+
worktree, so feat-locked writes get rejected. Pass `caller_worktree_id` on every MCP mutation,
|
|
35
|
+
and confirm ownership by matching the row's repo path + branch to the current directory before
|
|
36
|
+
mutating.
|
|
37
|
+
|
|
38
|
+
- **Full-repo lint/type baselines are often pre-existing red.** A round must gate on the files
|
|
39
|
+
it changed, not the whole-repo baseline — scope lint/tsc checks to the round's changed set so a
|
|
40
|
+
pre-existing baseline error outside that set never fails the round.
|
|
41
|
+
|
|
42
|
+
- **`complete_task` checks file approval on the round's `files_changed`, not the task's.**
|
|
43
|
+
Reconcile approvals via `update_round` (set each entry `user_approved: true`), not
|
|
44
|
+
`update_task` alone — updating only the task leaves the round entries unapproved and
|
|
45
|
+
`complete_task` rejects with "files are not approved".
|
|
46
|
+
|
|
47
|
+
- **CLI transport uses REST (reads) and OAuth+MCP (writes) — a 502 from `codebyplan round sync-approvals` is transient MCP churn, not an outage.** The CLI exits 0 with a warning and MCP tools still work. A missing `CODEBYPLAN_API_KEY` surfaces as an `ApiError`, not a 502. `sync-approvals` can also drag untracked per-device dirs into `files_changed` — run it from the repo root or pass `--caller-worktree-id`.
|
|
48
|
+
|
|
49
|
+
- **`codebyplan claude update` requires a TTY.** On non-TTY stdin (CI, piped) it half-applies then errors. Re-run with `--yes` to accept defaults non-interactively.
|
|
50
|
+
|
|
51
|
+
- **Checkpoint locks are invisible until a mutation they block.** `get_checkpoints` / `get_tasks` succeed even when another worktree holds the lock; the 403 fires only on `update_*` / `complete_*`. Verify the row's `worktree_id` matches the caller before mutating. A null-`worktree_id` checkpoint can still be actively shipped by whichever worktree physically holds its feat branch — check `git worktree list` first.
|
|
52
|
+
|
|
53
|
+
- **`update_task` accepts `caller_worktree_id` for lock-verify only — it does NOT assign ownership.** Ownership assignment goes through the web UI or the dedicated assignment path. Don't conflate `caller_worktree_id` with `assigned_worktree_id`.
|
|
54
|
+
|
|
55
|
+
- **Re-run config-driven gates after merging main into a feat branch.** A merge can add or change `.codebyplan/shipment.json`, ports, branch config, `e2e.json`, and `eslint.json` — treat the post-merge state as a fresh baseline before continuing.
|
|
56
|
+
|
|
57
|
+
## Behavioral Preferences
|
|
58
|
+
|
|
59
|
+
- **Never `git stash`** — for any reason. To inspect or compare other state use
|
|
60
|
+
`git diff <ref>`, `git show <ref>:<path>`, or `git worktree add`.
|
|
61
|
+
|
|
62
|
+
- **During MCP instability, verify tool results over narration.** When responses lag, servers
|
|
63
|
+
cycle, or calls 502, never state an expected output as fact — confirm against git and the
|
|
64
|
+
filesystem, which are the source of truth.
|
|
@@ -55,7 +55,8 @@
|
|
|
55
55
|
"Skill(cbp-checkpoint-create)",
|
|
56
56
|
"Skill(cbp-checkpoint-check)",
|
|
57
57
|
"Skill(cbp-checkpoint-complete)",
|
|
58
|
-
"Skill(cbp-round-
|
|
58
|
+
"Skill(cbp-round-complete)",
|
|
59
|
+
"Skill(cbp-round-execute)",
|
|
59
60
|
"Skill(cbp-session-end)",
|
|
60
61
|
"Skill(cbp-task-complete)",
|
|
61
62
|
"Skill(cbp-standalone-task-create)",
|
|
@@ -95,7 +96,6 @@
|
|
|
95
96
|
"allow": [
|
|
96
97
|
"Skill(cbp-build-cc-agent)",
|
|
97
98
|
"Skill(cbp-build-cc-claude-file)",
|
|
98
|
-
"Skill(cbp-build-cc-memory)",
|
|
99
99
|
"Skill(cbp-build-cc-mode)",
|
|
100
100
|
"Skill(cbp-build-cc-rule)",
|
|
101
101
|
"Skill(cbp-build-cc-settings)",
|
|
@@ -114,9 +114,9 @@
|
|
|
114
114
|
"Skill(cbp-refresh-infra)",
|
|
115
115
|
"Skill(cbp-round-check)",
|
|
116
116
|
"Skill(cbp-round-end)",
|
|
117
|
-
"Skill(cbp-round-execute)",
|
|
118
117
|
"Skill(cbp-round-input)",
|
|
119
118
|
"Skill(cbp-round-start)",
|
|
119
|
+
"Skill(cbp-round-update)",
|
|
120
120
|
"Skill(cbp-session-start)",
|
|
121
121
|
"Skill(cbp-setup-e2e)",
|
|
122
122
|
"Skill(cbp-setup-eslint)",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
scope: org-shared
|
|
3
3
|
name: cbp-build-cc-agent
|
|
4
|
-
description: Build a Claude Code subagent at .claude/agents/{name}.md (flat form, per the official sub-agents spec) following the official sub-agents spec (frontmatter, tools, model,
|
|
5
|
-
argument-hint: "[agent-name] [--scope=project|user] [--
|
|
4
|
+
description: Build a Claude Code subagent at .claude/agents/{name}.md (flat form, per the official sub-agents spec) following the official sub-agents spec (frontmatter, tools, model, hooks, skills preload, permission modes, isolation).
|
|
5
|
+
argument-hint: "[agent-name] [--scope=project|user] [--isolation=worktree]"
|
|
6
6
|
allowed-tools: Read, Write, Edit, Glob, Grep, Bash(mkdir *), Bash(chmod *)
|
|
7
7
|
effort: xhigh
|
|
8
8
|
---
|
|
@@ -15,7 +15,7 @@ Create a Claude Code subagent following the official Claude Code sub-agents spec
|
|
|
15
15
|
|
|
16
16
|
## Arguments
|
|
17
17
|
|
|
18
|
-
`$ARGUMENTS` — agent name (kebab-case, required). Flags: `--scope=project|user` (default `project`), `--
|
|
18
|
+
`$ARGUMENTS` — agent name (kebab-case, required). Flags: `--scope=project|user` (default `project`), `--isolation=worktree`.
|
|
19
19
|
|
|
20
20
|
## When to Use
|
|
21
21
|
|
|
@@ -70,7 +70,6 @@ Check each against the task and include only when they add value:
|
|
|
70
70
|
|
|
71
71
|
| Capability | Field | When to include |
|
|
72
72
|
| -------------------- | --------------------------------------------------------------- | ------------------------------------------------------ |
|
|
73
|
-
| Persistent memory | `memory: project\|user\|local` | Agent should accumulate learnings across conversations |
|
|
74
73
|
| Preloaded skills | `skills: [skill-a, skill-b]` | Domain knowledge the agent needs every run |
|
|
75
74
|
| Scoped MCP servers | `mcpServers: [...]` | Tools the parent session shouldn't have in context |
|
|
76
75
|
| Lifecycle hooks | `hooks: { PreToolUse: [...], PostToolUse: [...], Stop: [...] }` | Need to validate tool calls or trigger side-effects |
|
|
@@ -4,7 +4,6 @@ description: Implement API endpoints following team conventions. Use when adding
|
|
|
4
4
|
tools: Read, Write, Edit, Grep, Glob, Bash
|
|
5
5
|
model: sonnet
|
|
6
6
|
effort: xhigh
|
|
7
|
-
memory: project
|
|
8
7
|
skills:
|
|
9
8
|
- api-conventions
|
|
10
9
|
- error-handling-patterns
|
|
@@ -13,11 +12,11 @@ skills:
|
|
|
13
12
|
You are an API developer. Follow the conventions and patterns preloaded via the `skills` field — they define the project's RESTful naming, error format, and validation rules.
|
|
14
13
|
|
|
15
14
|
When invoked:
|
|
16
|
-
1. Read `
|
|
15
|
+
1. Read the nearest folder-local `CLAUDE.md` (e.g. `src/api/CLAUDE.md`) for conventions specific to this area
|
|
17
16
|
2. Locate the handler directory (`src/api/handlers/`)
|
|
18
17
|
3. Implement the endpoint per the preloaded conventions
|
|
19
18
|
4. Write or update tests in the matching `*.test.ts` file
|
|
20
|
-
5.
|
|
19
|
+
5. When you discover a durable pattern worth remembering, record it in the folder-local `CLAUDE.md` via `/cbp-build-cc-claude-file`
|
|
21
20
|
|
|
22
21
|
Return:
|
|
23
22
|
- Files created/modified
|
|
@@ -14,7 +14,6 @@ Source: official Claude Code sub-agents spec. Only `name` and `description` are
|
|
|
14
14
|
| `skills` | list | Skills to preload — full content injected at startup |
|
|
15
15
|
| `mcpServers` | list | String references (shared) or inline defs (scoped to this agent) |
|
|
16
16
|
| `hooks` | object | Lifecycle hooks — `PreToolUse`, `PostToolUse`, `Stop` (→ `SubagentStop`) |
|
|
17
|
-
| `memory` | string | `user` \| `project` \| `local` — persistent MEMORY.md directory |
|
|
18
17
|
| `background` | boolean | Always run concurrent to the main thread |
|
|
19
18
|
| `effort` | string | `low` \| `medium` \| `high` \| `xhigh` \| `max`. **Plugin agents authored in CBP MUST set this explicitly** (no commented-out placeholder); see [/cbp-build-cc-mode](../../build-cc-mode/SKILL.md) for the matrix |
|
|
20
19
|
| `isolation` | string | `worktree` — gives the agent a temporary git worktree |
|
|
@@ -54,12 +54,6 @@ if [ -n "$pm" ] && [[ ! "$pm" =~ ^(default|acceptEdits|auto|dontAsk|bypassPermis
|
|
|
54
54
|
err "permissionMode invalid: got '$pm'"
|
|
55
55
|
fi
|
|
56
56
|
|
|
57
|
-
# Memory scope check
|
|
58
|
-
mem=$(grep -E '^memory:' <<< "$fm" | head -1 | sed -E 's/^memory:[[:space:]]*//; s/[[:space:]]*$//; s/^"(.*)"$/\1/' || true)
|
|
59
|
-
if [ -n "$mem" ] && [[ ! "$mem" =~ ^(user|project|local)$ ]]; then
|
|
60
|
-
err "memory must be user|project|local: got '$mem'"
|
|
61
|
-
fi
|
|
62
|
-
|
|
63
57
|
if [ "$errors" -gt 0 ]; then
|
|
64
58
|
echo "validation FAILED ($errors issue(s)) for $FILE" >&2
|
|
65
59
|
exit 1
|
|
@@ -12,7 +12,6 @@ effort: xhigh
|
|
|
12
12
|
# color: blue # red | blue | green | yellow | purple | orange | pink | cyan
|
|
13
13
|
# background: false
|
|
14
14
|
# isolation: worktree # only if the agent should work in an isolated git worktree
|
|
15
|
-
# memory: project # project | user | local — enables persistent MEMORY.md
|
|
16
15
|
# skills:
|
|
17
16
|
# - api-conventions
|
|
18
17
|
# - error-handling-patterns
|
|
@@ -33,7 +32,7 @@ effort: xhigh
|
|
|
33
32
|
# hooks:
|
|
34
33
|
# - type: command
|
|
35
34
|
# command: "./scripts/run-linter.sh"
|
|
36
|
-
# initialPrompt: "Start by reading
|
|
35
|
+
# initialPrompt: "Start by reading the project CLAUDE.md, then wait for instructions." # only used when run as main thread via --agent
|
|
37
36
|
---
|
|
38
37
|
|
|
39
38
|
You are a [role] specialising in [domain].
|
|
@@ -28,12 +28,12 @@ Actions:
|
|
|
28
28
|
- Adding a new project-level fact (build command, architecture decision)
|
|
29
29
|
- Restructuring when CLAUDE.md grows past ~200 lines
|
|
30
30
|
- Migrating from AGENTS.md to CLAUDE.md (or bridging them)
|
|
31
|
+
- Capturing a folder-local learning (a `project`/`feedback` insight tied to one area of the tree) → author a **nested CLAUDE.md** next to that code (see "Authoring a nested CLAUDE.md" below). This is the home for durable learnings that previously went to auto-memory.
|
|
31
32
|
|
|
32
33
|
Do NOT use this skill for:
|
|
33
34
|
|
|
34
35
|
- Workflow details or behavioural rules → `/cbp-build-cc-rule`
|
|
35
36
|
- Reusable step-by-step procedures → `/cbp-build-cc-skill`
|
|
36
|
-
- Personal learnings across projects → `/cbp-build-cc-memory`
|
|
37
37
|
|
|
38
38
|
## Instructions
|
|
39
39
|
|
|
@@ -48,6 +48,20 @@ Do NOT use this skill for:
|
|
|
48
48
|
|
|
49
49
|
Default: project. Either `./CLAUDE.md` or `./.claude/CLAUDE.md` works; pick one and stick to it.
|
|
50
50
|
|
|
51
|
+
### Step 1.5 — Authoring a nested CLAUDE.md
|
|
52
|
+
|
|
53
|
+
A **nested** CLAUDE.md lives in a subdirectory (e.g. `apps/web/src/lib/CLAUDE.md`) rather than the repo root. It is the home for a folder-local learning — a `project`/`feedback` insight that only matters when working in that part of the tree (what previously went to auto-memory). Prefer a nested CLAUDE.md over the root file whenever the fact is scoped to one area: it keeps the root high-signal and loads the detail only when relevant.
|
|
54
|
+
|
|
55
|
+
**Discovery (how nested files load).** At session start Claude Code loads every `CLAUDE.md` on the path from the working directory **up** to the repo root. Files in subdirectories **below** the working directory load **on-demand** — the moment Claude reads any file inside that subdirectory. Unlike the root file, nested CLAUDE.md content does **not** survive compaction — it reloads when Claude next touches a matching subdirectory file. So a nested file is self-contained context for its folder, not a place for repo-wide rules.
|
|
56
|
+
|
|
57
|
+
**Placement.** Put the file in the shallowest directory that fully contains the concern:
|
|
58
|
+
|
|
59
|
+
- A gotcha about one package's build → that package root (`packages/foo/CLAUDE.md`)
|
|
60
|
+
- A convention for a feature area → that feature dir (`apps/web/src/lib/CLAUDE.md`)
|
|
61
|
+
- A repo-wide fact → the root CLAUDE.md, not a nested file
|
|
62
|
+
|
|
63
|
+
**Authoring.** Same quality gates as the root file (specific > vague, no duplication, keep it stable), but scope every line to the folder. Open with one line naming the area the file governs. Cross-link the root file or a rule with `@path` imports instead of repeating their content. To create one, run this skill with `create --scope=project` and write to the nested path.
|
|
64
|
+
|
|
51
65
|
### Step 2 — Read existing CLAUDE.md (for update/check)
|
|
52
66
|
|
|
53
67
|
```bash
|
|
@@ -165,7 +179,7 @@ Run `/memory` to confirm the file is loaded. The list shows all CLAUDE.md, CLAUD
|
|
|
165
179
|
- **Triggered by**: user invocation
|
|
166
180
|
- **Reads**: `${CLAUDE_SKILL_DIR}/templates/*.md`, `${CLAUDE_SKILL_DIR}/reference/*.md`, current CLAUDE.md, `.claude/rules/*.md`
|
|
167
181
|
- **Writes**: CLAUDE.md at the chosen scope
|
|
168
|
-
- **Related skills**: `/cbp-build-cc-rule` (behavioural constraints), `/cbp-build-cc-
|
|
182
|
+
- **Related skills**: `/cbp-build-cc-rule` (behavioural constraints), `/cbp-build-cc-settings` (for `claudeMdExcludes`)
|
|
169
183
|
|
|
170
184
|
## Key Rules
|
|
171
185
|
|
|
@@ -15,7 +15,7 @@ Source: official Claude Code memory spec — *Write effective instructions*.
|
|
|
15
15
|
|-------------|------------------|
|
|
16
16
|
| Multi-step procedure | Skill (`.claude/skills/{name}/SKILL.md`) |
|
|
17
17
|
| File-specific constraint | Path-scoped rule (`.claude/rules/{name}.md` with `paths:`) |
|
|
18
|
-
|
|
|
18
|
+
| Folder-local learning (project/feedback) | Nested CLAUDE.md placed next to the code it concerns (see SKILL.md "Authoring a nested CLAUDE.md") |
|
|
19
19
|
| API endpoint documentation | `docs/` |
|
|
20
20
|
| Architecture deep-dive | `docs/architecture/` |
|
|
21
21
|
| Framework usage guide | `docs/stack/{framework}/` |
|
|
@@ -23,7 +23,7 @@ Audit or apply the canonical `model:` + `effort:` frontmatter convention across
|
|
|
23
23
|
|
|
24
24
|
`model: sonnet` + `effort: xhigh`
|
|
25
25
|
|
|
26
|
-
Fifteen of the 16 authoring agents take the default (`cbp-cc-executor`, `cbp-database-agent`, `cbp-improve-claude`, `cbp-improve-round`, `cbp-research`, `cbp-round-executor`, `cbp-security-agent`, `cbp-task-check`, `cbp-task-planner`, `cbp-testing-qa-agent`, `cbp-e2e-playwright`, `cbp-e2e-maestro`, `cbp-e2e-tauri`, `cbp-e2e-vscode`, `cbp-e2e-xcuitest`). The 16th — `cbp-mechanical-edits` — is an explicit haiku-low exception (see below).
|
|
26
|
+
Fifteen of the 16 authoring agents take the default (`cbp-cc-executor`, `cbp-database-agent`, `cbp-improve-claude`, `cbp-improve-round`, `cbp-research`, `cbp-round-executor`, `cbp-security-agent`, `cbp-task-check`, `cbp-task-planner`, `cbp-testing-qa-agent`, `cbp-e2e-playwright`, `cbp-e2e-maestro`, `cbp-e2e-tauri`, `cbp-e2e-vscode`, `cbp-e2e-xcuitest`). The 16th — `cbp-mechanical-edits` — is an explicit haiku-low exception (see below). 26 skills take the default: cbp-round-start, cbp-round-input, cbp-round-execute, cbp-task-create, cbp-task-start, cbp-task-complete, cbp-task-testing, cbp-checkpoint-create, cbp-checkpoint-check, cbp-checkpoint-end, cbp-build-cc-mode, cbp-build-cc-agent, cbp-build-cc-skill, cbp-build-cc-rule, cbp-build-cc-claude-file, cbp-build-cc-settings, cbp-frontend-a11y, cbp-frontend-design, cbp-frontend-ui, cbp-frontend-ux, cbp-session-end, cbp-ship, cbp-ship-configure, cbp-supabase-setup, cbp-supabase-migrate, cbp-supabase-branch-check.
|
|
27
27
|
|
|
28
28
|
### Effort-lowered skills (5)
|
|
29
29
|
|
|
@@ -31,19 +31,20 @@ Fifteen of the 16 authoring agents take the default (`cbp-cc-executor`, `cbp-dat
|
|
|
31
31
|
|
|
32
32
|
| skill | model | effort | reason |
|
|
33
33
|
| ----------------- | ------ | ------ | ----------------------------------------------------------------------------------------------------------------- |
|
|
34
|
-
| cbp-round-end | sonnet | high | Spawns cbp-improve-round agent;
|
|
34
|
+
| cbp-round-end | sonnet | high | Spawns cbp-improve-round agent; auto-applies in-scope findings + routes out-of-scope to round-update — lighter than xhigh suffices |
|
|
35
35
|
| cbp-task-check | sonnet | high | Thin orchestrator over spawned cbp-task-check agent; inline-fallback path keeps Opus for safety |
|
|
36
36
|
| cbp-checkpoint-update | sonnet | high | Status updates + context patches mostly; lighter than xhigh |
|
|
37
37
|
| cbp-ship-main | sonnet | high | Production-impacting PR creation; keep Opus reasoning but drop effort |
|
|
38
38
|
| cbp-merge-main | sonnet | high | Long-lived-branch integration merge — surgical conflict resolution, no authoring |
|
|
39
39
|
|
|
40
|
-
### Haiku-low skills (
|
|
40
|
+
### Haiku-low skills (10)
|
|
41
41
|
|
|
42
42
|
`model: haiku` + `effort: low`. Pure mechanical / dispatch / templated work.
|
|
43
43
|
|
|
44
44
|
| skill | model | effort | reason |
|
|
45
45
|
| ---------------------- | ----- | ------ | ---------------------------------------------------------------------------------------- |
|
|
46
|
-
| cbp-round-update | haiku | low | Pure mechanical:
|
|
46
|
+
| cbp-round-update | haiku | low | Pure mechanical: triage round state (claude_approved/findings/hard_fail), route to round-complete or round-input |
|
|
47
|
+
| cbp-round-complete | haiku | low | Pure mechanical: sync-approvals git-add reconcile, complete round, route per unapproved count |
|
|
47
48
|
| cbp-round-check | haiku | low | Run build/lint/types commands, parse output, update QA |
|
|
48
49
|
| cbp-todo | haiku | low | Dispatch: single MCP call + route to next command |
|
|
49
50
|
| cbp-checkpoint-complete | haiku | low | Pure finalization — mark completed, write summary; judgment happened in checkpoint-check |
|
|
@@ -25,7 +25,7 @@ Create a rule at `.claude/rules/{name}.md` per the official Claude Code memory s
|
|
|
25
25
|
|
|
26
26
|
- Step-by-step workflows → use `/cbp-build-cc-skill` (loads on invoke, doesn't burn context)
|
|
27
27
|
- Project-level facts always needed → CLAUDE.md (use `/cbp-build-cc-claude-file`)
|
|
28
|
-
- Accumulating learnings →
|
|
28
|
+
- Accumulating learnings → nested CLAUDE.md (use `/cbp-build-cc-claude-file`)
|
|
29
29
|
|
|
30
30
|
## Instructions
|
|
31
31
|
|
|
@@ -164,7 +164,7 @@ Use the `InstructionsLoaded` hook if you need to debug exactly when and why a ru
|
|
|
164
164
|
- **Triggered by**: user invocation
|
|
165
165
|
- **Reads**: `${CLAUDE_SKILL_DIR}/templates/rule.md`, `${CLAUDE_SKILL_DIR}/reference/paths-patterns.md`
|
|
166
166
|
- **Writes**: `.claude/rules/{name}.md` or `~/.claude/rules/{name}.md`
|
|
167
|
-
- **Related skills**: `/cbp-build-cc-claude-file` (project facts
|
|
167
|
+
- **Related skills**: `/cbp-build-cc-claude-file` (project facts + nested-folder learnings), `/cbp-build-cc-skill` (workflows)
|
|
168
168
|
|
|
169
169
|
## Key Rules
|
|
170
170
|
|
|
@@ -22,7 +22,7 @@ Precedence is `deny > ask > allow`; arrays union across scopes (managed/user/pro
|
|
|
22
22
|
|
|
23
23
|
### `allow` — the autonomous workflow surface
|
|
24
24
|
|
|
25
|
-
- **Non-lifecycle, non-shipment `/cbp-*` skills** — authoring (`cbp-build-cc-*`), frontend (`cbp-frontend-*`), git (`cbp-git-*`, `cbp-merge-main`, `cbp-refresh-infra`), round work (`cbp-round-check`/`-end`/`-
|
|
25
|
+
- **Non-lifecycle, non-shipment `/cbp-*` skills** — authoring (`cbp-build-cc-*`), frontend (`cbp-frontend-*`), git (`cbp-git-*`, `cbp-merge-main`, `cbp-refresh-infra`), round work (`cbp-round-check`/`-end`/`-input`/`-start`/`-update` — `cbp-round-update` is autonomous triage that only reads round state and routes to `cbp-round-complete` or `cbp-round-input`, so it runs without a prompt), setup/configure (`cbp-setup-*`, `cbp-ship-configure`, `cbp-supabase-*`), task prep (`cbp-task-check`/`-create`/`-start`/`-testing`, `cbp-standalone-task-check`/`-testing`), planning (`cbp-checkpoint-plan`/`-update`), plus `cbp-session-start` and `cbp-todo`. Invoking a skill is the intended mode of operation; the gated side effects happen inside via the Bash/MCP tools the skill calls, which carry their own tiering. The lifecycle/state-transition and plan-approval skills are the exception — they live in `ask` (next section).
|
|
26
26
|
- **All `mcp__codebyplan__*` reads** (`get_*`, `list_*`, `search_*`, `health_check`, `lookup_symbol`, `resolve_library_id`, `get_chunk`).
|
|
27
27
|
- **Routine workflow-write MCP tools** the pipeline calls many times per task: create/update/complete checkpoint, task, and round; session log + session-state writes; `create_worktree`, `add_library`, `flag_stale_chunk`, `update_server_config`, `update_eslint_repo_config`, `update_task_template`. Gating these with `ask` would make the autonomous workflow unusable.
|
|
28
28
|
- **Read/safe CLI commands** (both `codebyplan X` and `npx codebyplan X`): `whoami`, `resolve-worktree`, `statusline`, `ports`, `tech-stack`, `eslint`, `round`, `help`, `--version`.
|
|
@@ -30,7 +30,8 @@ Precedence is `deny > ask > allow`; arrays union across scopes (managed/user/pro
|
|
|
30
30
|
### `ask` — the deliberate confirm-gate
|
|
31
31
|
|
|
32
32
|
- **Production-shipment skills**: `cbp-ship`, `cbp-ship-main`, `cbp-checkpoint-end` — these promote/deploy to production, so they prompt even in an otherwise auto-allowed setup.
|
|
33
|
-
- **Lifecycle / state-transition skills**: `cbp-checkpoint-start`, `cbp-checkpoint-create`, `cbp-checkpoint-check`, `cbp-checkpoint-complete`, `cbp-round-
|
|
33
|
+
- **Lifecycle / state-transition skills**: `cbp-checkpoint-start`, `cbp-checkpoint-create`, `cbp-checkpoint-check`, `cbp-checkpoint-complete`, `cbp-round-complete`, `cbp-session-end`, `cbp-task-complete`, `cbp-standalone-task-create`, `cbp-standalone-task-start`, `cbp-standalone-task-complete` — these open or close checkpoints, tasks, rounds, and sessions (advancing workflow state in the database), so they stop for explicit confirmation rather than running autonomously. `cbp-round-complete` is the permission-gated round finalizer (reconciles the user's `git add`s, completes the round, routes onward); its `ask` prompt replaces the in-skill confirmation that used to live in `cbp-round-update` — which is now an autonomous, `allow`-tier triage step.
|
|
34
|
+
- **Plan-approval gate**: `cbp-round-execute` — the round plan is approved by confirming this `ask` prompt rather than via an in-skill AskUserQuestion. `cbp-round-start` runs its planning Q&A, then hands off to `cbp-round-execute`; the permission prompt is the user's go/no-go on the plan.
|
|
34
35
|
- **Destructive / admin MCP tools**: `delete_session_log`, `delete_worktree`, `create_repo`, `release_assignment`. (The launch and member-admin tools were dropped from the MCP surface in CHK-180 — those concerns are web-app only now.)
|
|
35
36
|
- **Mutating / external / clobber-risk CLI commands** (both prefixes): `setup`, `login`, `logout`, `upgrade-auth`, `config` (can overwrite committed `.codebyplan/` files), `branch` (rewrites branch config), `ship`, `claude` (`install`/`update`/`uninstall` overwrite `.claude/`).
|
|
36
37
|
|
|
@@ -88,7 +88,7 @@ A skill should do one thing in the pipeline. If a skill both plans AND executes,
|
|
|
88
88
|
If the skill is part of a chain, show it:
|
|
89
89
|
|
|
90
90
|
```
|
|
91
|
-
/cbp-round-start (planning) →
|
|
91
|
+
/cbp-round-start (planning) → /cbp-round-execute (ask-tier permission = plan approval)
|
|
92
92
|
```
|
|
93
93
|
|
|
94
94
|
### Approval Gates
|
|
@@ -42,7 +42,7 @@ Triggered by `/cbp-task-start` (Step 3.6, optional stale-check), `/cbp-task-comp
|
|
|
42
42
|
- **Cancel** — abort the skill.
|
|
43
43
|
- `unstaged_dirty=false AND staged_present=true` → print one informational line and proceed to Step 1:
|
|
44
44
|
`Staged changes detected — proceeding with merge.`
|
|
45
|
-
(Pre-staged files will be included in the merge commit at Step 2 — this is intentional; the caller already approved them via /cbp-round-
|
|
45
|
+
(Pre-staged files will be included in the merge commit at Step 2 — this is intentional; the caller already approved them via /cbp-round-complete.)
|
|
46
46
|
- `unstaged_dirty=false AND staged_present=false` → proceed silently to Step 1.
|
|
47
47
|
- Either `git diff` command exits with code ≥ 2 (git hard error — not-a-repo, detached HEAD with no commits, index lock, corrupt object store): surface the raw error output and STOP. Do NOT proceed to Step 1.
|
|
48
48
|
|