codebyplan 1.13.20 → 1.13.22
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 +12 -4
- package/package.json +1 -1
- package/templates/rules/todo-backend.md +3 -3
- package/templates/settings.project.base.json +0 -17
- package/templates/settings.user.base.json +0 -1
- package/templates/skills/cbp-build-cc-settings/reference/cbp-permission-policy.md +1 -1
- package/templates/skills/cbp-checkpoint-create/SKILL.md +2 -2
- package/templates/skills/cbp-session-end/SKILL.md +11 -8
- package/templates/skills/cbp-todo/SKILL.md +1 -1
- package/templates/skills/cbp-todo/qa-regression.md +1 -1
package/dist/cli.js
CHANGED
|
@@ -14,7 +14,7 @@ var VERSION, PACKAGE_NAME;
|
|
|
14
14
|
var init_version = __esm({
|
|
15
15
|
"src/lib/version.ts"() {
|
|
16
16
|
"use strict";
|
|
17
|
-
VERSION = "1.13.
|
|
17
|
+
VERSION = "1.13.22";
|
|
18
18
|
PACKAGE_NAME = "codebyplan";
|
|
19
19
|
}
|
|
20
20
|
});
|
|
@@ -1453,6 +1453,9 @@ function mergeHooksIntoSettings(settings, hooksJson) {
|
|
|
1453
1453
|
return settings;
|
|
1454
1454
|
}
|
|
1455
1455
|
function mergeBaseSettingsIntoSettings(settings, base) {
|
|
1456
|
+
for (const key of DEPRECATED_BASE_KEYS) {
|
|
1457
|
+
delete settings[key];
|
|
1458
|
+
}
|
|
1456
1459
|
for (const key of SCALAR_BASE_KEYS) {
|
|
1457
1460
|
if (base[key] !== void 0 && settings[key] === void 0) {
|
|
1458
1461
|
settings[key] = base[key];
|
|
@@ -1508,6 +1511,9 @@ function mergeBaseSettingsIntoSettings(settings, base) {
|
|
|
1508
1511
|
return settings;
|
|
1509
1512
|
}
|
|
1510
1513
|
function stripBaseSettingsFromSettings(settings, base) {
|
|
1514
|
+
for (const key of DEPRECATED_BASE_KEYS) {
|
|
1515
|
+
delete settings[key];
|
|
1516
|
+
}
|
|
1511
1517
|
for (const key of SCALAR_BASE_KEYS) {
|
|
1512
1518
|
if (base[key] !== void 0 && settings[key] === base[key]) {
|
|
1513
1519
|
delete settings[key];
|
|
@@ -1587,7 +1593,7 @@ function stripOwnedHooksFromSettings(settings) {
|
|
|
1587
1593
|
}
|
|
1588
1594
|
return settings;
|
|
1589
1595
|
}
|
|
1590
|
-
var OWNER, PLACEHOLDER_RE, REPLACEMENT, SCALAR_BASE_KEYS;
|
|
1596
|
+
var OWNER, PLACEHOLDER_RE, REPLACEMENT, SCALAR_BASE_KEYS, DEPRECATED_BASE_KEYS;
|
|
1591
1597
|
var init_settings_merge = __esm({
|
|
1592
1598
|
"src/lib/settings-merge.ts"() {
|
|
1593
1599
|
"use strict";
|
|
@@ -1599,7 +1605,6 @@ var init_settings_merge = __esm({
|
|
|
1599
1605
|
"autoUpdatesChannel",
|
|
1600
1606
|
"awaySummaryEnabled",
|
|
1601
1607
|
"disableAgentView",
|
|
1602
|
-
"disableRemoteControl",
|
|
1603
1608
|
"editorMode",
|
|
1604
1609
|
"outputStyle",
|
|
1605
1610
|
"preferredNotifChannel",
|
|
@@ -1619,7 +1624,10 @@ var init_settings_merge = __esm({
|
|
|
1619
1624
|
"autoMemoryEnabled",
|
|
1620
1625
|
"effortLevel",
|
|
1621
1626
|
"showClearContextOnPlanAccept",
|
|
1622
|
-
"syntaxHighlightingDisabled"
|
|
1627
|
+
"syntaxHighlightingDisabled"
|
|
1628
|
+
];
|
|
1629
|
+
DEPRECATED_BASE_KEYS = [
|
|
1630
|
+
"disableRemoteControl",
|
|
1623
1631
|
"remoteControlAtStartup",
|
|
1624
1632
|
"agentPushNotifEnabled"
|
|
1625
1633
|
];
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@ paths:
|
|
|
9
9
|
|
|
10
10
|
# Todo backend — queue contract, invariants, and writer obligations
|
|
11
11
|
|
|
12
|
-
The todos queue is materialised by `apps/todo-worker` (CHK-122) and consumed by `/cbp-todo`
|
|
12
|
+
The todos queue is materialised by `apps/todo-worker` (CHK-122) and consumed by `/cbp-todo` (via `mcp__codebyplan__get_todos`). This rule documents what every contributor to the MCP write tools, the worker, or the SQL schema must respect.
|
|
13
13
|
|
|
14
14
|
## 1. Six workflow invariants — DB-layer guards, never bypassable
|
|
15
15
|
|
|
@@ -46,7 +46,7 @@ MCP write → enqueueTodoJob → todos_jobs (status='pending')
|
|
|
46
46
|
|
|
47
47
|
## 3. Priority sort_order bands
|
|
48
48
|
|
|
49
|
-
The worker emits todos with these `sort_order` ranges. Lower = surfaces first in
|
|
49
|
+
The worker emits todos with these `sort_order` ranges. Lower = surfaces first in the todo queue.
|
|
50
50
|
|
|
51
51
|
| Band | sort_order | State |
|
|
52
52
|
|------|-----------|-------|
|
|
@@ -59,7 +59,7 @@ The worker emits todos with these `sort_order` ranges. Lower = surfaces first in
|
|
|
59
59
|
|
|
60
60
|
## 4. Command + args mapping
|
|
61
61
|
|
|
62
|
-
`
|
|
62
|
+
The queue head (`get_todos` `rows[0]`) maps to one of these slash commands. The worker stamps `command` + `metadata.context` based on workflow state:
|
|
63
63
|
|
|
64
64
|
| State | Command | Required context |
|
|
65
65
|
|-------|---------|------------------|
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
"autoUpdatesChannel": "latest",
|
|
4
4
|
"awaySummaryEnabled": true,
|
|
5
5
|
"disableAgentView": false,
|
|
6
|
-
"disableRemoteControl": false,
|
|
7
6
|
"editorMode": "normal",
|
|
8
7
|
"outputStyle": "default",
|
|
9
8
|
"preferredNotifChannel": "notifications_disabled",
|
|
@@ -24,8 +23,6 @@
|
|
|
24
23
|
"disableSkillShellExecution": false,
|
|
25
24
|
"skipWebFetchPreflight": false,
|
|
26
25
|
"fastModePerSessionOptIn": false,
|
|
27
|
-
"remoteControlAtStartup": true,
|
|
28
|
-
"agentPushNotifEnabled": true,
|
|
29
26
|
"effortLevel": "xhigh",
|
|
30
27
|
"statusLine": {
|
|
31
28
|
"type": "command",
|
|
@@ -64,19 +61,11 @@
|
|
|
64
61
|
"Skill(cbp-standalone-task-create)",
|
|
65
62
|
"Skill(cbp-standalone-task-start)",
|
|
66
63
|
"Skill(cbp-standalone-task-complete)",
|
|
67
|
-
"mcp__codebyplan__accept_invite",
|
|
68
|
-
"mcp__codebyplan__change_role",
|
|
69
|
-
"mcp__codebyplan__create_launch",
|
|
70
|
-
"mcp__codebyplan__update_launch",
|
|
71
|
-
"mcp__codebyplan__delete_launch",
|
|
72
64
|
"mcp__codebyplan__create_organization",
|
|
73
65
|
"mcp__codebyplan__create_project",
|
|
74
66
|
"mcp__codebyplan__create_repo",
|
|
75
67
|
"mcp__codebyplan__delete_session_log",
|
|
76
68
|
"mcp__codebyplan__delete_worktree",
|
|
77
|
-
"mcp__codebyplan__invite_member",
|
|
78
|
-
"mcp__codebyplan__remove_member",
|
|
79
|
-
"mcp__codebyplan__revoke_invite",
|
|
80
69
|
"mcp__codebyplan__release_assignment",
|
|
81
70
|
"Bash(codebyplan setup:*)",
|
|
82
71
|
"Bash(npx codebyplan setup:*)",
|
|
@@ -148,10 +137,7 @@
|
|
|
148
137
|
"mcp__codebyplan__get_eslint_presets",
|
|
149
138
|
"mcp__codebyplan__get_eslint_repo_config",
|
|
150
139
|
"mcp__codebyplan__get_file_changes",
|
|
151
|
-
"mcp__codebyplan__get_launch",
|
|
152
|
-
"mcp__codebyplan__get_launches",
|
|
153
140
|
"mcp__codebyplan__get_library_doc_job",
|
|
154
|
-
"mcp__codebyplan__get_next_action",
|
|
155
141
|
"mcp__codebyplan__get_repos",
|
|
156
142
|
"mcp__codebyplan__get_rounds",
|
|
157
143
|
"mcp__codebyplan__get_server_config",
|
|
@@ -162,7 +148,6 @@
|
|
|
162
148
|
"mcp__codebyplan__get_task_templates",
|
|
163
149
|
"mcp__codebyplan__get_tasks",
|
|
164
150
|
"mcp__codebyplan__get_todos",
|
|
165
|
-
"mcp__codebyplan__get_work_plan",
|
|
166
151
|
"mcp__codebyplan__get_worktrees",
|
|
167
152
|
"mcp__codebyplan__list_tech_stack_sync_sessions",
|
|
168
153
|
"mcp__codebyplan__get_chunk",
|
|
@@ -187,8 +172,6 @@
|
|
|
187
172
|
"mcp__codebyplan__update_session_state",
|
|
188
173
|
"mcp__codebyplan__create_worktree",
|
|
189
174
|
"mcp__codebyplan__flag_stale_chunk",
|
|
190
|
-
"mcp__codebyplan__list_invites",
|
|
191
|
-
"mcp__codebyplan__list_members",
|
|
192
175
|
"mcp__codebyplan__update_eslint_repo_config",
|
|
193
176
|
"mcp__codebyplan__update_server_config",
|
|
194
177
|
"mcp__codebyplan__update_task_template",
|
|
@@ -31,7 +31,7 @@ Precedence is `deny > ask > allow`; arrays union across scopes (managed/user/pro
|
|
|
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
33
|
- **Lifecycle / state-transition skills**: `cbp-checkpoint-start`, `cbp-checkpoint-create`, `cbp-checkpoint-check`, `cbp-checkpoint-complete`, `cbp-round-update`, `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.
|
|
34
|
-
- **Destructive / admin
|
|
34
|
+
- **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
35
|
- **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
36
|
|
|
37
37
|
### `deny` — unchanged
|
|
@@ -20,7 +20,7 @@ Runs INLINE. This is the **mechanical** stage only: capture raw user input, infe
|
|
|
20
20
|
|
|
21
21
|
### Step 1: Check for Existing Checkpoint Data
|
|
22
22
|
|
|
23
|
-
Source `repo_id` from `.codebyplan/repo.json`. If `$ARGUMENTS` contains a checkpoint number,
|
|
23
|
+
Source `repo_id` from `.codebyplan/repo.json`. If `$ARGUMENTS` contains a checkpoint number, load it via MCP `get_checkpoints`. If the checkpoint already has `ideas[]` with descriptions, reuse `ideas[].description` (do not re-ask) and skip Step 2.
|
|
24
24
|
|
|
25
25
|
### Step 2: Get Checkpoint Description
|
|
26
26
|
|
|
@@ -113,6 +113,6 @@ Auto-trigger `/cbp-checkpoint-plan {NNN}` in the same context. This skill create
|
|
|
113
113
|
## Integration
|
|
114
114
|
|
|
115
115
|
- **Runs inline**: mechanical setup only — no assessment, research, Q&A, plan, or tasks
|
|
116
|
-
- **Reads**: MCP `
|
|
116
|
+
- **Reads**: MCP `get_checkpoints`; `.codebyplan/repo.json`, `.codebyplan/git.json`; `npx codebyplan resolve-worktree`
|
|
117
117
|
- **Writes**: MCP `create_checkpoint` (description-only ideas + deadline + optional worktree_id), `update_checkpoint` (branch_name)
|
|
118
118
|
- **Triggers**: `/cbp-checkpoint-plan` (auto)
|
|
@@ -27,18 +27,21 @@ Always write a session log for this session — **even if empty**. `/cbp-session
|
|
|
27
27
|
|
|
28
28
|
Snapshot the current next-action so the next `/cbp-session-start` (Step 4.5) can auto-resume. The handoff write-path + payload shape are specified inline here and in `/cbp-session-start` Step 4.5 (freshness gate).
|
|
29
29
|
|
|
30
|
-
1. Call MCP `
|
|
31
|
-
2. If
|
|
30
|
+
1. Call MCP `get_todos({ repo_id, worktree_id })` and take the queue head `rows[0]` (rows are ordered by `sort_order`; `rows[0]` is the current next-action). The worker stamps `command`, `instructions`, `state`, and the entity ids `checkpoint_id` / `task_id` / `round_id` on every row.
|
|
31
|
+
2. If `rows[0]` exists and its `command` is non-empty (active work in flight):
|
|
32
32
|
```yaml
|
|
33
33
|
handoff:
|
|
34
|
-
command: <
|
|
35
|
-
instructions: <
|
|
36
|
-
state: <
|
|
37
|
-
context:
|
|
34
|
+
command: <rows[0].command> # e.g. "/cbp-round-update"
|
|
35
|
+
instructions: <rows[0].instructions> # human-readable trigger reason
|
|
36
|
+
state: <rows[0].state> # workflow state label
|
|
37
|
+
context: # entity ids used by the Step 4.5 freshness probe
|
|
38
|
+
checkpoint_id: <rows[0].checkpoint_id>
|
|
39
|
+
task_id: <rows[0].task_id>
|
|
40
|
+
round_id: <rows[0].round_id>
|
|
38
41
|
captured_at: <ISO now> # for entity-drift freshness comparison
|
|
39
42
|
captured_session_log_id: <current session log id>
|
|
40
43
|
```
|
|
41
|
-
3. If `command` is empty / idle
|
|
44
|
+
3. If the queue is empty or `rows[0].command` is empty / idle: set `handoff = null` so the next session's probe falls through to `/cbp-todo`.
|
|
42
45
|
4. Hold `handoff` in context for Step 1's `update_session_log` call below — it ships in the same write as `ended_at` and `summary`.
|
|
43
46
|
|
|
44
47
|
Continuing Step 1:
|
|
@@ -157,7 +160,7 @@ You can close this window.
|
|
|
157
160
|
## Integration
|
|
158
161
|
|
|
159
162
|
- **Triggered by**: user invocation (prompted by `/cbp-todo` when no work remains)
|
|
160
|
-
- **Reads**: `.codebyplan/repo.json`, `.codebyplan/git.json` (`branch_config.production` for the Step 1.6 home-branch fast-forward), MCP `get_session_logs` (resolve current log), MCP `get_current_task`, MCP `get_rounds`, MCP `
|
|
163
|
+
- **Reads**: `.codebyplan/repo.json`, `.codebyplan/git.json` (`branch_config.production` for the Step 1.6 home-branch fast-forward), MCP `get_session_logs` (resolve current log), MCP `get_current_task`, MCP `get_rounds`, MCP `get_todos` (Step 1.3 handoff snapshot — queue head `rows[0]`); `npx codebyplan version-status` (Step 1.7 package-freshness gate)
|
|
161
164
|
- **Writes**: MCP `update_session_log` (with `ended_at` + `handoff` per TASK-2 alias surface; or `create_session_log` fallback), MCP `update_session_state` (deactivate)
|
|
162
165
|
- **Spawns**: none
|
|
163
166
|
- **Triggers**: none at the skill-contract level. Step 1.5 may invoke `/cbp-git-commit` inline on user approval; Step 1.7 may invoke `/cbp-git-commit` on the `newer:true AND guarded:false` update path (committing changed `.claude/` and `.codebyplan/` paths).
|
|
@@ -44,7 +44,7 @@ With `USER_ID` resolved, call MCP `get_todos({ repo_id, user_id, worktree_id })`
|
|
|
44
44
|
|
|
45
45
|
- The head carries `command`, `instructions`, `state`, `metadata`, `worktree_id`, `checkpoint_id`, `task_id`.
|
|
46
46
|
- The routing context (checkpoint/task) lives in **`rows[0].metadata`**.
|
|
47
|
-
- `get_todos` is **pure-read** — `apps/todo-worker` is the sole regen authority. NEVER call `
|
|
47
|
+
- `get_todos` is **pure-read** — `apps/todo-worker` is the sole regen authority. NEVER call `regenerate_todos_for_repo`.
|
|
48
48
|
- Empty array, or `USER_ID` unavailable → go to Step 3 (empty-queue fallback).
|
|
49
49
|
|
|
50
50
|
Queue `command` values may use the `/codebyplan:<name>` plugin-namespace form (e.g. `/codebyplan:round-start`); treat each as the matching `/cbp-<name>` skill for the Step 2 matrix.
|
|
@@ -12,7 +12,7 @@ Repo under test: `2ff6d405-39c5-47b8-a6d1-59f998ac0537`. Resolve a real `user_id
|
|
|
12
12
|
|
|
13
13
|
## Preconditions
|
|
14
14
|
|
|
15
|
-
- `get_todos` is the only Step 1 read — confirm no `
|
|
15
|
+
- `get_todos` is the only Step 1 read — confirm no `regenerate_todos_for_repo` call remains (`grep -n 'regenerate_todos_for_repo' SKILL.md` → no hits).
|
|
16
16
|
- Step 0 uses `resolve-worktree --json` and `whoami --json`.
|
|
17
17
|
|
|
18
18
|
## Scenario A — caller owns the work → auto-trigger
|