codebyplan 1.13.32 → 1.13.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -14,7 +14,7 @@ var VERSION, PACKAGE_NAME;
14
14
  var init_version = __esm({
15
15
  "src/lib/version.ts"() {
16
16
  "use strict";
17
- VERSION = "1.13.32";
17
+ VERSION = "1.13.33";
18
18
  PACKAGE_NAME = "codebyplan";
19
19
  }
20
20
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codebyplan",
3
- "version": "1.13.32",
3
+ "version": "1.13.33",
4
4
  "description": "CLI for CodeByPlan — AI-powered development planning and tracking",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  scope: org-shared
3
3
  name: cbp-build-cc-mode
4
- description: Audit + apply the CHK-109 model/effort matrix across every authoring skill and agent under `packages/codebyplan-package/templates/`. Bare invocation walks all SKILL.md and agent .md files and reports frontmatter gaps; with a path argument, edits the target file's frontmatter to the matrix-decided values.
4
+ description: Audit + apply the CHK-109 model/effort convention across every authoring skill and agent under `packages/codebyplan-package/templates/`. Skills set `effort:` only and inherit the session model; agents pin `model:` + `effort:`. Bare invocation audits and reports frontmatter gaps; with a path argument, edits the target file's frontmatter to the convention-decided values.
5
5
  argument-hint: "[path-to-agent-or-skill]"
6
6
  allowed-tools: Read, Write, Edit, Glob, Grep
7
7
  effort: xhigh
@@ -9,66 +9,47 @@ effort: xhigh
9
9
 
10
10
  # Build CC Mode
11
11
 
12
- Audit or apply the canonical `model:` + `effort:` frontmatter convention across every authoring-source skill (`packages/codebyplan-package/templates/skills/*/SKILL.md`) and agent (`packages/codebyplan-package/templates/agents/*.md`). Bare invocation = audit; path argument = apply.
12
+ Audit or apply the canonical model/effort frontmatter convention across every authoring-source skill (`packages/codebyplan-package/templates/skills/*/SKILL.md`) and agent (`packages/codebyplan-package/templates/agents/*.md`). Bare invocation = audit; path argument = apply.
13
+
14
+ The convention splits by surface:
15
+
16
+ - **Skills do NOT pin `model:`.** A skill's inline turn runs inside the user's active session, so it must inherit the session model. Pinning a model (a) forces a model the user did not choose and (b) can carry the session's 1M `[1m]` context tier onto the skill, producing `API Error: Usage credits required for 1M context`. Skills set `effort:` only.
17
+ - **Agents pin `model:` explicitly.** A spawned/forked subagent should not silently inherit the parent's model or context tier — every agent states its model so each subagent's cost/quality is auditable. Agents set both `model:` and `effort:`.
13
18
 
14
19
  ## When to Use
15
20
 
16
- - Authoring a new agent or skill — look up the matrix below to pick the right `model` + `effort` before writing the frontmatter.
21
+ - Authoring a new agent or skill — look up the convention below before writing the frontmatter.
17
22
  - Sweeping `packages/codebyplan-package/templates/` for conformance after a refactor or version bump.
18
- - Onboarding a new exception (e.g., a fresh haiku-low skill) — record the rationale in the matrix here first, then apply.
23
+ - Onboarding a new exception — record the rationale here first, then apply.
19
24
 
20
25
  ## Decision Matrix
21
26
 
22
- ### Default (applies to all agents and most skills)
23
-
24
- `model: sonnet` + `effort: xhigh`
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 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
-
28
- ### Effort-lowered skills (5)
27
+ ### Skills `effort:` only, never `model:`
29
28
 
30
- `model: sonnet` + `effort: high`. Opus reasoning retained; effort dropped from `xhigh` because the skill body is summary/dispatch rather than deep authoring.
29
+ Omit `model:` entirely (inherit the session model). Set `effort:` per the skill's nature. Default `effort: xhigh`; tiers:
31
30
 
32
- | skill | model | effort | reason |
33
- | ----------------- | ------ | ------ | ----------------------------------------------------------------------------------------------------------------- |
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
- | cbp-task-check | sonnet | high | Thin orchestrator over spawned cbp-task-check agent; inline-fallback path keeps Opus for safety |
36
- | cbp-checkpoint-update | sonnet | high | Status updates + context patches mostly; lighter than xhigh |
37
- | cbp-ship-main | sonnet | high | Production-impacting PR creation; keep Opus reasoning but drop effort |
38
- | cbp-merge-main | sonnet | high | Long-lived-branch integration merge — surgical conflict resolution, no authoring |
31
+ | effort | use for | examples |
32
+ | -------- | ------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
33
+ | `xhigh` | deep authoring / planning / orchestration (most skills) | build-cc-*, checkpoint-check/end/plan, round-start/input/execute, task-create/start/complete/testing, standalone-task-*, frontend-*, ship, ship-configure, supabase-*, setup-e2e/eslint, session-end |
34
+ | `high` | summary / orchestration, lighter than xhigh | checkpoint-create, checkpoint-start, checkpoint-update, round-end, task-check, standalone-task-check, ship-main, merge-main |
35
+ | `medium` | moderate, scoped sync work | refresh-infra |
36
+ | `low` | pure mechanical / dispatch / templated work | checkpoint-complete, round-check, round-complete, round-update, todo, session-start, git-commit, git-branch-feat-create, git-worktree-create, git-worktree-remove |
39
37
 
40
- ### Haiku-low skills (10)
38
+ A skill that carries a `model:` line is a **gap** — remove it unless a deliberate, documented exception is recorded here (currently none).
41
39
 
42
- `model: haiku` + `effort: low`. Pure mechanical / dispatch / templated work.
40
+ ### Agents — `model:` + `effort:`
43
41
 
44
- | skill | model | effort | reason |
45
- | ---------------------- | ----- | ------ | ---------------------------------------------------------------------------------------- |
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 |
48
- | cbp-round-check | haiku | low | Run build/lint/types commands, parse output, update QA |
49
- | cbp-todo | haiku | low | Dispatch: single MCP call + route to next command |
50
- | cbp-checkpoint-complete | haiku | low | Pure finalization — mark completed, write summary; judgment happened in checkpoint-check |
51
- | cbp-git-commit | haiku | low | Conventional-commit message authoring is templated; never-git-add rule codified |
52
- | cbp-git-branch-feat-create | haiku | low | Mechanical: read config, checkout production branch (main), create branch, push |
53
- | cbp-git-worktree-create | haiku | low | Mechanical: git worktree add + .claude/ copy + MCP register |
54
- | cbp-git-worktree-remove | haiku | low | Mechanical: git worktree remove + cleanup + MCP deregister |
55
- | cbp-session-start | haiku | low | Dispatch: MCP health check, activate session, fetch logs, auto-trigger /cbp-todo |
56
-
57
- ### Haiku-low agents (1)
58
-
59
- `model: haiku` + `effort: low`. The 16th authoring agent — pure I/O mechanical work, never authors logic.
42
+ Default `model: sonnet` + `effort: xhigh`. 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 is the one exception:
60
43
 
61
44
  | agent | model | effort | reason |
62
45
  | -------------------- | ----- | ------ | ----------------------------------------------------------------------------------- |
63
46
  | cbp-mechanical-edits | haiku | low | Mechanical rename/substitution/frontmatter-edit subagent; no judgment, pure dispatch |
64
47
 
65
- ## Precedence Rule
48
+ `model: inherit` is NOT permitted for agents — pin an explicit alias (`sonnet` / `haiku`) or a full ID.
66
49
 
67
- A skill's `model:` / `effort:` apply to the inline-running turn (the orchestrator turn that invokes the skill). An agent's `model:` / `effort:` apply to the spawned/forked subagent context. For `context: fork` skills, the agent specified in `agent:` governs the forked subagent (per the official Claude Code spec). The two surfaces scope to different execution contexts and do not conflict.
68
-
69
- ## Model Alias vs Pinned
50
+ ## Precedence Rule
70
51
 
71
- Pinned (`sonnet`) is the default convention for explicit version-pinning of work that depends on a specific frontier model's reasoning quality. Alias (`haiku`) is acceptable only for explicit lowering exceptions where the alias-tracked latest of that family is desired (the 10 haiku-low entries above). `model: inherit` is NOT permitted in authoring every file under `packages/codebyplan-package/templates/` states its model explicitly so the matrix is auditable.
52
+ A skill's `effort:` applies to the inline-running turn (the orchestrator turn that invokes the skill); the skill runs on that turn's inherited model. An agent's `model:` / `effort:` apply to the spawned/forked subagent context. For `context: fork` skills, the agent named in `agent:` governs the forked subagent (per the official Claude Code spec) so a forked skill's model comes from that agent, not from the skill.
72
53
 
73
54
  ## Audit Mode
74
55
 
@@ -76,25 +57,28 @@ Invoked with no arguments. Procedure:
76
57
 
77
58
  1. Glob `packages/codebyplan-package/templates/agents/*.md` and `packages/codebyplan-package/templates/skills/*/SKILL.md`.
78
59
  2. For each file, read the frontmatter and parse `model:` + `effort:`.
79
- 3. Look up the expected values from the matrix above (file basename or `name:` frontmatter field is the lookup key).
80
- 4. Emit a pipe-delimited table line per file: `path | current_model/current_effort | expected_model/expected_effort | status`.
60
+ 3. Apply the convention by surface:
61
+ - **Skill**: `model:` MUST be ABSENT; `effort:` MUST be present and one of `low`/`medium`/`high`/`xhigh`/`max` (default `xhigh`).
62
+ - **Agent**: `model:` MUST be present (per the agent table; default `sonnet`); `effort:` present (default `xhigh`).
63
+ 4. Emit one pipe-delimited line per file: `path | current_model/current_effort | expected | status`.
81
64
  5. Status values:
82
- - `ok` — current matches expected
83
- - `gap` — missing field, or current value differs from expected
84
- - `deprecated` uses `model: sonnet` (legacy alias; migrate to `sonnet`)
85
- 6. Print a summary line at the end: total files audited, count `ok`, count `gap`, count `deprecated`.
65
+ - `ok` — matches the convention.
66
+ - `gap` — a skill that carries a `model:` line, a skill missing `effort:`, an agent missing/incorrect `model:`, or any missing/invalid `effort:`.
67
+ 6. Print a summary: total audited, count `ok`, count `gap`.
86
68
 
87
- The audit is read-only — no edits performed.
69
+ The audit is read-only.
88
70
 
89
71
  ## Apply Mode
90
72
 
91
73
  Invoked with a path argument (the target `SKILL.md` or agent `.md`). Procedure:
92
74
 
93
- 1. Read the file. Identify the skill or agent name from the `name:` frontmatter field (or from the path basename if `name:` is absent).
94
- 2. Look up target `model` + `effort` from the matrix above.
95
- 3. Use Edit to set the frontmatter `model:` and `effort:` lines to the target values. Preserve every other frontmatter field and the entire file body. Files whose current status is `deprecated` (legacy `model: sonnet`) follow the same path — the deprecated label is informational; the remediation action is identical to `gap`.
96
- 4. If the name is NOT in the matrix, surface to the user via AskUserQuestion: current state, propose the default (`sonnet` / `xhigh`), ask whether to (a) add an exception entry to this skill's matrix first, or (b) apply the default.
75
+ 1. Read the file. Identify the name from the `name:` frontmatter (or the path basename).
76
+ 2. Look up the target from the convention above.
77
+ 3. Use Edit to set the frontmatter to the target, preserving every other field and the entire body:
78
+ - **Skill**: REMOVE any `model:` line; set/keep a valid `effort:` (default `xhigh`).
79
+ - **Agent**: set `model:` and `effort:` to the table values.
80
+ 4. If the name is NOT covered, surface via AskUserQuestion: current state, propose the default (skill → no `model:` + `xhigh`; agent → `sonnet` + `xhigh`), and ask whether to (a) record an exception entry here first, or (b) apply the default.
97
81
 
98
82
  ## Self-Conformance
99
83
 
100
- This skill's own frontmatter sits at the default (`sonnet` / `xhigh`). The first audit run after this skill is authored MUST emit `ok` for `packages/codebyplan-package/templates/skills/cbp-build-cc-mode/SKILL.md` — if it doesn't, the matrix is out of sync with reality and must be reconciled before any further apply.
84
+ This skill is itself a skill: its frontmatter sets `effort: xhigh` and NO `model:`. The first audit run after editing this file MUST emit `ok` for `packages/codebyplan-package/templates/skills/cbp-build-cc-mode/SKILL.md` — if it doesn't, the convention is out of sync with reality and must be reconciled before any further apply.
@@ -90,7 +90,7 @@ Key fields by use case:
90
90
  | Hide from `/` menu | `user-invocable: false` |
91
91
  | Pre-approve tools | `allowed-tools: Bash(git add *) Bash(git commit *)` |
92
92
  | Accept arguments | `argument-hint: [file] [mode]`, optionally `arguments: [file mode]` for named `$file`/`$mode` |
93
- | Set model/effort (always required for plugin skills) | `model: sonnet`, `effort: xhigh` — defaults for plugin skills. Lower (`haiku`/`low` or Opus/`high`) only as a documented exception per [/cbp-build-cc-mode](../build-cc-mode/SKILL.md). `model: inherit` is NOT permitted |
93
+ | Set effort (do NOT set model) | `effort: xhigh` — default for plugin skills; lower (`high`/`low`) per [/cbp-build-cc-mode](../build-cc-mode/SKILL.md). **Omit `model:`** so the skill inherits the active session model — pinning one forces a model the user didn't choose and can carry the session's 1M `[1m]` tier onto the skill (→ "usage credits required for 1M context"). Pin `model:` only as a deliberate, documented exception |
94
94
  | Path-scoped auto-load | `paths: ["src/api/**/*.ts"]` |
95
95
  | Fork to subagent | `context: fork`, `agent: Explore` |
96
96
 
@@ -12,7 +12,7 @@ Source: official Claude Code skills spec. All fields are optional; `description`
12
12
  | `disable-model-invocation` | `true` → only user can invoke (via `/name`) |
13
13
  | `user-invocable` | `false` → hidden from `/` menu, Claude-only |
14
14
  | `allowed-tools` | Pre-approve tools while the skill is active |
15
- | `model` | Override model for this skill's turn. **Plugin skills authored in CBP MUST set this explicitly** `inherit` is not permitted; defaults to `sonnet`. See [/cbp-build-cc-mode](../../build-cc-mode/SKILL.md) for the canonical matrix |
15
+ | `model` | Override model for this skill's turn. **CBP skills normally OMIT this** so the skill inherits the active session model. Pinning a model (e.g. `sonnet`) forces that model and can carry the session's 1M `[1m]` context tier onto the skill, triggering "usage credits required for 1M context". Set it only as a deliberate, documented exception — see [/cbp-build-cc-mode](../../build-cc-mode/SKILL.md) |
16
16
  | `effort` | Override effort level (`low`/`medium`/`high`/`xhigh`/`max`). **Plugin skills authored in CBP MUST set this explicitly** (no commented-out placeholder); defaults to `xhigh`. See [/cbp-build-cc-mode](../../build-cc-mode/SKILL.md) for the matrix |
17
17
  | `context` | `fork` → run in a subagent |
18
18
  | `agent` | Subagent type when `context: fork` — built-in or custom |
@@ -49,10 +49,14 @@ grep -qE '^description:\s*' <<< "$fm" || echo " WARN: no description — Claude
49
49
  # CBP scope required
50
50
  grep -qE '^scope:\s*' <<< "$fm" || err "missing CBP required field: scope (org-shared|project-shared|repo-only:<repo-name>)"
51
51
 
52
- # Model (if present)
53
- model=$(grep -E '^model:' <<< "$fm" | head -1 | sed -E 's/^model:[[:space:]]*//; s/[[:space:]]*$//; s/^"(.*)"$/\1/' || true)
54
- if [ -n "$model" ] && [[ ! "$model" =~ ^(sonnet|opus|haiku|inherit|claude-.+)$ ]]; then
55
- err "model invalid: '$model'"
52
+ # Model skills MUST NOT pin a model. A skill's inline turn runs in the user's
53
+ # active session, so it inherits the session model. Pinning one forces a model the
54
+ # user didn't choose and can carry the session's 1M [1m] context tier onto the skill
55
+ # ("API Error: Usage credits required for 1M context"). Agents pin model explicitly
56
+ # (validate-agent.sh) — skills never do.
57
+ if grep -qE '^model:' <<< "$fm"; then
58
+ model=$(grep -E '^model:' <<< "$fm" | head -1 | sed -E 's/^model:[[:space:]]*//; s/[[:space:]]*$//')
59
+ err "skills must NOT set 'model:' (found '$model') — skills inherit the session model; remove the line (see /cbp-build-cc-mode)"
56
60
  fi
57
61
 
58
62
  # Effort (if present)
@@ -8,8 +8,8 @@ description: What this skill does and when to use it. Front-load the key use cas
8
8
  # disable-model-invocation: false # true = only user can invoke via /name
9
9
  # user-invocable: true # false = only Claude can invoke (hidden from / menu)
10
10
  # allowed-tools: Read, Grep, Glob, Bash(git status *)
11
- # review with /cbp-build-cc-mode if defaults don't fit this skill's purpose
12
- model: sonnet
11
+ # model: # OMIT to inherit the session model (recommended). A pinned model can carry the session's 1M [1m] tier and require usage credits — pin only as a documented exception (see /cbp-build-cc-mode)
12
+ # review effort with /cbp-build-cc-mode if the default doesn't fit this skill's purpose
13
13
  effort: xhigh
14
14
  # context: fork # runs in a forked subagent
15
15
  # agent: Explore # subagent type: Explore | Plan | general-purpose | <custom>
@@ -2,7 +2,6 @@
2
2
  scope: org-shared
3
3
  name: cbp-merge-main
4
4
  description: Merge main into the current feat branch with interactive per-conflict resolution and inline QA re-run
5
- model: sonnet
6
5
  effort: high
7
6
  ---
8
7
 
@@ -3,7 +3,6 @@ scope: org-shared
3
3
  name: cbp-setup-e2e
4
4
  description: Detect installed E2E frameworks, ask which to enable, record credentials source (gitignored env-file path + var names only, never secrets), and write/refresh .codebyplan/e2e.json. Interactive, idempotent.
5
5
  argument-hint: "[--force]"
6
- model: sonnet
7
6
  effort: xhigh
8
7
  allowed-tools: Read, Write, Edit, Bash(cat *), Bash(jq *), Bash(which *), Bash(test *), Bash(mkdir *), Bash(cp *), Bash(echo *), Bash(date *), Bash(mv *), Bash(git check-ignore *), AskUserQuestion, mcp__codebyplan__get_repos
9
8
  ---
@@ -3,7 +3,6 @@ scope: org-shared
3
3
  name: cbp-setup-eslint
4
4
  description: Detect each app's tech stack, resolve matching DB ESLint presets, confirm which to enable per app, run `codebyplan eslint init` to generate eslint.config.mjs, and write/refresh .codebyplan/eslint.json. Interactive, idempotent.
5
5
  argument-hint: "[--force]"
6
- model: sonnet
7
6
  effort: xhigh
8
7
  allowed-tools: Read, Write, Edit, Bash(cat *), Bash(jq *), Bash(test *), Bash(ls *), Bash(mkdir *), Bash(cp *), Bash(echo *), Bash(mv *), Bash(npx codebyplan eslint *), AskUserQuestion, mcp__codebyplan__get_repos, mcp__codebyplan__get_eslint_presets
9
8
  ---
@@ -2,7 +2,6 @@
2
2
  scope: org-shared
3
3
  name: cbp-ship-main
4
4
  description: Ship feat branch to production branch via PR — thin wrapper around `codebyplan ship`
5
- model: sonnet
6
5
  effort: high
7
6
  ---
8
7
 
@@ -4,7 +4,6 @@ name: cbp-supabase-branch-check
4
4
  description: Gate skill called by /cbp-ship-main (pre-merge) to verify the Supabase preview branch health check is green before allowing a PR to be merged; skips when no DB-path changes are detected.
5
5
  argument-hint: "[--mode pre_pr_create|pre_merge] [--target integration|production]"
6
6
  allowed-tools: Bash(git *), Bash(gh *), Bash(jq *), Bash(supabase *), Bash(sleep *), Bash(echo *), Read, mcp__supabase__list_branches, mcp__supabase__get_logs
7
- model: sonnet
8
7
  effort: xhigh
9
8
  ---
10
9
 
@@ -4,7 +4,6 @@ name: cbp-supabase-migrate
4
4
  description: Scaffold or adopt a Supabase migration for the current PR branch, apply to the branch's preview DB, run advisor checks, regenerate TypeScript types. Includes a fresh-branch dry-run pre-flight that uses one persistent dry-run ephemeral branch per feature branch.
5
5
  argument-hint: "[--new <name> | <path-to-sql>]"
6
6
  allowed-tools: Read, Edit, Write, Bash(git *), Bash(supabase *), Bash(jq *), Bash(date *), Bash(which *), Bash(cp *), Bash(mv *), Bash(test *), Bash(ls *), mcp__supabase__apply_migration, mcp__supabase__list_migrations, mcp__supabase__get_advisors, mcp__supabase__generate_typescript_types, mcp__supabase__reset_branch, mcp__supabase__list_branches, mcp__supabase__create_branch, mcp__supabase__get_cost, mcp__supabase__confirm_cost, mcp__codebyplan__update_checkpoint, mcp__codebyplan__update_task
7
- model: sonnet
8
7
  effort: xhigh
9
8
  ---
10
9