codebyplan 1.13.14 → 1.13.16
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/README.md +77 -2
- package/dist/cli.js +726 -69
- package/package.json +1 -1
- package/templates/agents/cbp-e2e-maestro.md +26 -3
- package/templates/agents/cbp-e2e-playwright.md +24 -3
- package/templates/agents/cbp-e2e-tauri.md +25 -2
- package/templates/agents/cbp-e2e-vscode.md +28 -3
- package/templates/agents/cbp-e2e-xcuitest.md +40 -4
- package/templates/agents/cbp-task-check.md +2 -0
- package/templates/context/testing/e2e.md +57 -9
- package/templates/hooks/README.md +23 -1
- package/templates/hooks/validate-structure-patterns.sh +1 -1
- package/templates/rules/e2e-mandatory.md +19 -2
- package/templates/settings.project.base.json +18 -1
- package/templates/skills/cbp-checkpoint-end/SKILL.md +18 -1
- package/templates/skills/cbp-frontend-ui/SKILL.md +9 -7
- package/templates/skills/cbp-round-execute/SKILL.md +49 -7
- package/templates/skills/cbp-setup-cmux/SKILL.md +170 -0
- package/templates/skills/cbp-task-complete/SKILL.md +14 -0
- package/templates/skills/cbp-task-start/SKILL.md +8 -0
package/README.md
CHANGED
|
@@ -91,7 +91,7 @@ Print the CLI version.
|
|
|
91
91
|
|
|
92
92
|
When you run Claude Code inside a [cmux](https://github.com/nicholasgasior/cmux) workspace, the `codebyplan` plugin automatically keeps the workspace metadata in sync with your git context:
|
|
93
93
|
|
|
94
|
-
- **On session start** — the workspace title is set to the current git branch
|
|
94
|
+
- **On session start** — the workspace title is set to the current git branch, the workspace description is set to the repo folder basename, and the workspace color is applied from `.codebyplan/cmux.json` (configured via `/cbp-setup-cmux`). If no color is set, a one-line nudge is printed to session output.
|
|
95
95
|
- **On `git checkout` / `git switch`** — the same sync runs automatically after the Bash tool call completes (the match is broad and a redundant sync on a file-restore checkout is harmless, since `codebyplan cmux-sync` is idempotent).
|
|
96
96
|
|
|
97
97
|
This means your cmux workspace always reflects which branch and repo you're working in, without any manual intervention.
|
|
@@ -109,7 +109,7 @@ Both hooks delegate all logic to `codebyplan cmux-sync` — no cmux or git logic
|
|
|
109
109
|
|
|
110
110
|
### Binary resolution order
|
|
111
111
|
|
|
112
|
-
The `cmux` binary is resolved in this order (by `codebyplan cmux-sync`):
|
|
112
|
+
The `cmux` binary is resolved in this order (by `codebyplan cmux-sync` and `codebyplan cmux-status`, both delegating to `resolveCmuxBin()` in `lib/cmux.ts`):
|
|
113
113
|
|
|
114
114
|
1. `$CMUX_BUNDLED_CLI_PATH` — path cmux injects into its Claude hook environment
|
|
115
115
|
2. `$CMUX_CLAUDE_HOOK_CMUX_BIN` — alternative env var the hook environment may set
|
|
@@ -119,6 +119,81 @@ The `cmux` binary is resolved in this order (by `codebyplan cmux-sync`):
|
|
|
119
119
|
|
|
120
120
|
Both hooks check for `$CMUX_WORKSPACE_ID` before doing anything. If you are not running inside a cmux workspace, the hooks exit immediately with no output and no side effects. Repos that do not use cmux are completely unaffected.
|
|
121
121
|
|
|
122
|
+
### Status surface
|
|
123
|
+
|
|
124
|
+
`codebyplan cmux-status` pushes CodeByPlan development state into the cmux workspace sidebar. The lifecycle skills (`cbp-task-start`, `cbp-task-complete`, `cbp-round-execute`) call it automatically — no manual invocation is needed.
|
|
125
|
+
|
|
126
|
+
**Flags:**
|
|
127
|
+
|
|
128
|
+
| Flag | Description |
|
|
129
|
+
| --------------------- | --------------------------------------------------------------- |
|
|
130
|
+
| `--checkpoint <text>` | Set the `cbp-checkpoint` status key |
|
|
131
|
+
| `--task <text>` | Set the `cbp-task` status key |
|
|
132
|
+
| `--qa <text>` | Set the `cbp-qa` status key |
|
|
133
|
+
| `--progress <val>` | Set the sidebar progress bar (0.0–1.0 float, or `N/D` fraction) |
|
|
134
|
+
| `--clear` | Clear all four keys from the sidebar |
|
|
135
|
+
|
|
136
|
+
**Examples:**
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
# Pushed by cbp-task-start when you start a task:
|
|
140
|
+
npx codebyplan cmux-status --checkpoint "CHK-176: cmux status" --task "TASK-2: implement cmux-status"
|
|
141
|
+
|
|
142
|
+
# Pushed by cbp-task-complete when a task finishes:
|
|
143
|
+
npx codebyplan cmux-status --task "TASK-2: implement cmux-status done" --progress 2/5
|
|
144
|
+
|
|
145
|
+
# Pushed by cbp-round-execute after each round:
|
|
146
|
+
npx codebyplan cmux-status --qa "R1 completed"
|
|
147
|
+
|
|
148
|
+
# Clear all status keys:
|
|
149
|
+
npx codebyplan cmux-status --clear
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
**`auto_status` toggle.** The command is gated by the `auto_status` field in `.codebyplan/cmux.json` (configured via `/cbp-setup-cmux`). When `auto_status` is `false`, every call is a no-op. The default is `true` — status pushing is enabled as long as the file exists or is absent (absent defaults to enabled).
|
|
153
|
+
|
|
154
|
+
**No-op outside cmux.** Like `codebyplan cmux-sync`, this command checks for `$CMUX_WORKSPACE_ID` before doing anything. Outside a cmux workspace it exits immediately with no output, so it is safe to call unconditionally from scripts and hooks.
|
|
155
|
+
|
|
156
|
+
### Auto dev server (`codebyplan cmux-serve`)
|
|
157
|
+
|
|
158
|
+
`codebyplan cmux-serve` auto-starts the dev server for any app whose source files are touched by the current round, and opens a cmux browser pane pointing at the allocated port. `cbp-round-execute` calls it automatically at round-execution start — no manual invocation is needed.
|
|
159
|
+
|
|
160
|
+
**How it works:**
|
|
161
|
+
|
|
162
|
+
The command receives the round's changed file list via `--files <comma-separated paths>`. It reads `.codebyplan/server.json` `port_allocations[]` and resolves which apps' source directories intersect the file list. For each matching app it:
|
|
163
|
+
|
|
164
|
+
1. Probes the allocated port (500ms `node:net` connection attempt — no `curl`, no `timeout`).
|
|
165
|
+
2. If the port is **not** listening: creates a `cmux new-split down` terminal pane and sends the dev command via `cmux send`.
|
|
166
|
+
3. Opens a browser pane via `cmux new-pane --type browser --url http://localhost:<port>`.
|
|
167
|
+
|
|
168
|
+
If the port is already listening (another worktree, or a previously started server) it skips straight to step 3 — only the browser pane is opened. This mitigates the multi-worktree port collision by never starting a second server on an already-occupied port.
|
|
169
|
+
|
|
170
|
+
**App-source-dir heuristic mapping** (from `port_allocations[].label` when `command` / `working_dir` are null):
|
|
171
|
+
|
|
172
|
+
| Label | App dir |
|
|
173
|
+
| ------------------------------ | -------------------------- |
|
|
174
|
+
| `Web Dev` | `apps/web` |
|
|
175
|
+
| `Web Dev (codebyplan-desktop)` | `apps/desktop` |
|
|
176
|
+
| `Backend Dev` | `apps/backend` |
|
|
177
|
+
| `MCP Dev` | `apps/mcp` |
|
|
178
|
+
| `Docs Ingest` | `apps/docs-ingest` |
|
|
179
|
+
| `E2E Tests` | skipped (not a dev server) |
|
|
180
|
+
|
|
181
|
+
When `allocation.command` and `allocation.working_dir` are both set (Tier 1), those values are used directly — the label heuristic is skipped. When no mapping exists for a label, one log line is emitted and the allocation is skipped; the rest continue.
|
|
182
|
+
|
|
183
|
+
**`auto_dev_server` toggle.** Gated by the `auto_dev_server` field in `.codebyplan/cmux.json` (configured via `/cbp-setup-cmux`). When `auto_dev_server` is `false`, every call is a no-op. The default is `true` — the feature is enabled as long as the file is absent or the key is not explicitly set to `false`.
|
|
184
|
+
|
|
185
|
+
**No-op outside cmux.** Like `codebyplan cmux-status`, this command checks for `$CMUX_WORKSPACE_ID` before doing anything. Outside a cmux workspace it exits immediately with no output and no side effects.
|
|
186
|
+
|
|
187
|
+
**Examples:**
|
|
188
|
+
|
|
189
|
+
```bash
|
|
190
|
+
# Called automatically by cbp-round-execute with the round's files:
|
|
191
|
+
npx codebyplan cmux-serve --files "apps/web/src/app/page.tsx,apps/web/src/components/Button.tsx"
|
|
192
|
+
|
|
193
|
+
# Target a specific app dir instead of a file list:
|
|
194
|
+
npx codebyplan cmux-serve --app apps/backend
|
|
195
|
+
```
|
|
196
|
+
|
|
122
197
|
---
|
|
123
198
|
|
|
124
199
|
## MCP Server
|