codebyplan 1.13.0 → 1.13.3
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 +2337 -1701
- package/package.json +2 -2
- package/templates/github-workflows/publish.yml +207 -0
- package/templates/settings.project.base.json +154 -3
- package/templates/skills/cbp-build-cc-settings/SKILL.md +2 -0
- package/templates/skills/cbp-build-cc-settings/reference/cbp-permission-policy.md +48 -0
- package/templates/skills/cbp-checkpoint-end/SKILL.md +7 -0
- package/templates/skills/cbp-ship/reference/versioning.md +31 -3
- package/templates/skills/cbp-ship-configure/SKILL.md +16 -36
- package/templates/skills/cbp-ship-configure/reference/npm-package.md +15 -6
- package/templates/skills/cbp-ship-main/SKILL.md +4 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
scope: org-shared
|
|
3
3
|
name: cbp-ship-configure
|
|
4
|
-
description: Configure shipment for one or more surfaces in the current repo — Vercel link, EAS project + eas.json scaffold, Apple credentials probe, npm publish auth check (including `codebyplan` asset-publish automation via
|
|
4
|
+
description: Configure shipment for one or more surfaces in the current repo — Vercel link, EAS project + eas.json scaffold, Apple credentials probe, npm publish auth check (including `codebyplan` asset-publish automation via the publish-on-main workflow), Railway project link, Supabase access token verify; Supabase GitHub branching integration via /cbp-supabase-setup. Interactive step-by-step; never stores credentials in the repo.
|
|
5
5
|
argument-hint: [--surface=<id>]
|
|
6
6
|
allowed-tools: Read, Write, Edit, Bash(which *), Bash(vercel *), Bash(eas *), Bash(npm *), Bash(railway *), Bash(jq *), Bash(mkdir *), Bash(cp *), Bash(echo *), Skill(cbp-supabase-setup)
|
|
7
7
|
effort: xhigh
|
|
@@ -152,22 +152,23 @@ If multiple surfaces were configured, list each one's status. If any failed, lis
|
|
|
152
152
|
|
|
153
153
|
Re-running on an already-configured surface re-runs the probe (CLI installed? logged in? token still valid?) and refreshes the `.codebyplan/shipment.json` block. It does NOT replace credentials — those stay where the CLI keeps them. This is the primary path for "I rotated my npm token, does shipment still work?" — re-run, the probe catches the bad token immediately.
|
|
154
154
|
|
|
155
|
-
## Special case:
|
|
155
|
+
## Special case: versioning mode (npm-package)
|
|
156
156
|
|
|
157
|
-
|
|
157
|
+
Picking a versioning mode is part of npm-package configure:
|
|
158
158
|
|
|
159
159
|
```
|
|
160
160
|
Step N/M: Versioning mode
|
|
161
161
|
A) Manual — bump package.json version yourself before /cbp-ship
|
|
162
|
-
B)
|
|
163
|
-
C)
|
|
162
|
+
B) in-branch-bump — `codebyplan ship` patch-bumps changed packages in the feat branch; merge to main auto-publishes via the publish-on-main workflow (recommended for codebyplan-CLI repos)
|
|
163
|
+
C) release-please — GH Action opens version-bump PRs based on conventional commits
|
|
164
|
+
D) changesets — manual changeset entries; tooling aggregates into version PRs (recommended for monorepos with many published packages)
|
|
164
165
|
```
|
|
165
166
|
|
|
166
|
-
If B or
|
|
167
|
+
If B, the skill scaffolds the publish-on-main workflow via `codebyplan scaffold-publish-workflow` (see the `codebyplan` asset-publish automation section below). If C or D, the skill scaffolds the GitHub Actions workflow + config file (`templates/workflows/release-please.yml` or `.changeset/config.json`). See [../ship/reference/versioning.md](../ship/reference/versioning.md) for the full mode comparison.
|
|
167
168
|
|
|
168
169
|
## Special case: `codebyplan` asset-publish automation
|
|
169
170
|
|
|
170
|
-
The canonical-owner repo publishes the `codebyplan` npm package — the distribution mechanism for `scope: org-shared` skills/agents/hooks (via its `claude install|update|uninstall` subcommand group). Sibling repos consume it via `npx codebyplan claude update` (the merged CLI; package path `packages/codebyplan-package/`). This branch handles the once-per-repo setup so
|
|
171
|
+
The canonical-owner repo publishes the `codebyplan` npm package — the distribution mechanism for `scope: org-shared` skills/agents/hooks (via its `claude install|update|uninstall` subcommand group). Sibling repos consume it via `npx codebyplan claude update` (the merged CLI; package path `packages/codebyplan-package/`). This branch handles the once-per-repo setup so the package autopublishes on merge to main via the publish-on-main workflow. (CHK-132 consolidated the prior standalone `@codebyplan/claude` package into `codebyplan`; the legacy `@codebyplan/claude` package on npm stays un-deprecated at its last published version for backward-compat, but receives no further updates.)
|
|
171
172
|
|
|
172
173
|
When the user picks `--surface=npm-package` AND the detected package is `packages/codebyplan-package`, the walkthrough runs these extra probes / scaffolds in addition to the standard npm-package configurator (see [reference/npm-package.md](reference/npm-package.md)):
|
|
173
174
|
|
|
@@ -190,38 +191,17 @@ Confirms the logged-in account has read on the `@codebyplan` org scope. If 404 /
|
|
|
190
191
|
- Either the user does not belong to the `@codebyplan` org → STOP, request invitation from org owner
|
|
191
192
|
- Or the scope is unclaimed → user creates the org at https://www.npmjs.com/org/create (org name `codebyplan`, free public-packages tier)
|
|
192
193
|
|
|
193
|
-
### Scaffold
|
|
194
|
+
### Scaffold — publish-on-main workflow
|
|
194
195
|
|
|
195
|
-
|
|
196
|
+
The package autopublishes via `.github/workflows/publish.yml` (the publish-on-main model — version-change detection on merge to main, no Release PR). Scaffold it with the CLI:
|
|
196
197
|
|
|
197
198
|
```bash
|
|
198
|
-
|
|
199
|
-
cp "${CLAUDE_SKILL_DIR}/../ship/templates/workflow-release-please.yml" .github/workflows/release-please.yml
|
|
200
|
-
# Then replace REPLACE_WITH_INTEGRATION_BRANCH with the production branch from .codebyplan/git.json branch_config.production (typically `main`)
|
|
199
|
+
codebyplan scaffold-publish-workflow
|
|
201
200
|
```
|
|
202
201
|
|
|
203
|
-
|
|
202
|
+
This writes `templates/github-workflows/publish.yml` into `.github/workflows/publish.yml` (idempotent — re-running on an identical file is a no-op; pass `--force` to overwrite a divergent one, `--dry-run` to preview). `.github/` is outside the `codebyplan claude install` target (which only writes under `.claude/`), so the publish workflow has its own scaffold command rather than riding `claude install`.
|
|
204
203
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
If `release-please-config.json` is absent:
|
|
208
|
-
|
|
209
|
-
```bash
|
|
210
|
-
cp "${CLAUDE_SKILL_DIR}/../ship/templates/release-please-config.json" release-please-config.json
|
|
211
|
-
# Then replace REPLACE_WITH_PACKAGE_NAME with codebyplan
|
|
212
|
-
# Confirm `packages."."` block is replaced with `packages."packages/codebyplan-package"`
|
|
213
|
-
```
|
|
214
|
-
|
|
215
|
-
### Scaffold 3 — .release-please-manifest.json at repo root
|
|
216
|
-
|
|
217
|
-
If `.release-please-manifest.json` is absent:
|
|
218
|
-
|
|
219
|
-
```bash
|
|
220
|
-
VERSION=$(jq -r '.version' packages/codebyplan-package/package.json)
|
|
221
|
-
echo "{\"packages/codebyplan-package\": \"${VERSION}\"}" > .release-please-manifest.json
|
|
222
|
-
```
|
|
223
|
-
|
|
224
|
-
(Bootstrap version reads from `packages/codebyplan-package/package.json` `version` field at scaffold time.)
|
|
204
|
+
The workflow needs no per-bump editing: it reads `package.json` `version` at run time, compares it to `npm view`, and publishes only when the committed version is greater. `package.json` is the sole version-of-record — there is no `release-please-config.json` / `.release-please-manifest.json`. (Repos that prefer the conventional-commit Release-PR flow can still scaffold release-please from `../ship/templates/` instead — see [../ship/reference/release-please-overview.md](../ship/reference/release-please-overview.md).)
|
|
225
205
|
|
|
226
206
|
### Verify — publishConfig.access on the package
|
|
227
207
|
|
|
@@ -249,8 +229,8 @@ Required value: `public`. If `missing` or `restricted`, instruct the user to add
|
|
|
249
229
|
"packages/codebyplan-package": {
|
|
250
230
|
"package_name": "codebyplan",
|
|
251
231
|
"bin_name": "codebyplan",
|
|
252
|
-
"versioning": "
|
|
253
|
-
"publish_mode": "
|
|
232
|
+
"versioning": "in-branch-bump",
|
|
233
|
+
"publish_mode": "publish-on-main",
|
|
254
234
|
"access": "public"
|
|
255
235
|
}
|
|
256
236
|
}
|
|
@@ -258,7 +238,7 @@ Required value: `public`. If `missing` or `restricted`, instruct the user to add
|
|
|
258
238
|
}
|
|
259
239
|
```
|
|
260
240
|
|
|
261
|
-
After this branch completes,
|
|
241
|
+
After this branch completes, the publish loop is fully automatic: `codebyplan ship` patch-bumps the package in the feat branch (rides the single feat→main PR), and on merge to main `publish.yml` detects the committed version exceeds the npm-published version and runs `npm publish` via OIDC trusted publishing (see [../ship/reference/npm-publish-oidc-trusted.md](../ship/reference/npm-publish-oidc-trusted.md)), then tags `v{version}` + cuts a GitHub release. No separate Release PR. Siblings then pick up the new asset content via `npx codebyplan claude update`.
|
|
262
242
|
|
|
263
243
|
## Special case: Apple credentials for TestFlight
|
|
264
244
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Walkthrough for first-time npm publish setup.
|
|
4
4
|
|
|
5
|
-
> **Special case** — when the package being configured is `packages/codebyplan-package` (i.e., the `codebyplan` npm package that ships `scope: org-shared` skills/agents/hooks via its `claude` asset subcommand group), the parent SKILL.md "Special case: `codebyplan` asset-publish automation" section runs additional probes (npm whoami, npm publish auth) and scaffolds
|
|
5
|
+
> **Special case** — when the package being configured is `packages/codebyplan-package` (i.e., the `codebyplan` npm package that ships `scope: org-shared` skills/agents/hooks via its `claude` asset subcommand group), the parent SKILL.md "Special case: `codebyplan` asset-publish automation" section runs additional probes (npm whoami, npm publish auth) and scaffolds the publish-on-main workflow (`.github/workflows/publish.yml` via `codebyplan scaffold-publish-workflow`) on top of the generic walkthrough below. See SKILL.md for the full extra flow. (CHK-132 consolidated the prior `@codebyplan/claude` package into `codebyplan`.)
|
|
6
6
|
|
|
7
7
|
## Prerequisites
|
|
8
8
|
|
|
@@ -85,11 +85,20 @@ Surface any errors/warnings; offer to fix obvious ones (missing `files`, wrong `
|
|
|
85
85
|
|
|
86
86
|
```
|
|
87
87
|
A) Manual — bump package.json version yourself before each release
|
|
88
|
-
B)
|
|
89
|
-
C)
|
|
88
|
+
B) in-branch-bump — `codebyplan ship` patch-bumps changed packages in the feat branch; merge to main auto-publishes via the publish-on-main workflow (recommended for codebyplan-CLI repos)
|
|
89
|
+
C) release-please — GH Action opens version-bump PRs based on conventional commits
|
|
90
|
+
D) changesets — manual changeset entries; aggregator PR (recommended for monorepos)
|
|
90
91
|
```
|
|
91
92
|
|
|
92
|
-
If B, scaffold:
|
|
93
|
+
If B, scaffold the publish-on-main workflow (idempotent; `--force` overwrites, `--dry-run` previews):
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
codebyplan scaffold-publish-workflow
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
`package.json` is the sole version-of-record — no `release-please-config.json` / `.release-please-manifest.json`. See [../../ship/reference/versioning.md](../../ship/reference/versioning.md) for the full model.
|
|
100
|
+
|
|
101
|
+
If C, scaffold:
|
|
93
102
|
|
|
94
103
|
```bash
|
|
95
104
|
cp ${CLAUDE_PLUGIN_ROOT}/skills/ship/templates/workflow-release-please.yml .github/workflows/release-please.yml
|
|
@@ -97,7 +106,7 @@ cp ${CLAUDE_PLUGIN_ROOT}/skills/ship/templates/release-please-config.json releas
|
|
|
97
106
|
echo '{".":"<current version>"}' > .release-please-manifest.json
|
|
98
107
|
```
|
|
99
108
|
|
|
100
|
-
If
|
|
109
|
+
If D:
|
|
101
110
|
|
|
102
111
|
```bash
|
|
103
112
|
cd "$REPO_ROOT"
|
|
@@ -134,7 +143,7 @@ The workflow uses `permissions: id-token: write` and runs `npm publish --provena
|
|
|
134
143
|
"configured_at": "<now>",
|
|
135
144
|
"packages/codebyplan-package": {
|
|
136
145
|
"package_name": "codebyplan",
|
|
137
|
-
"versioning": "
|
|
146
|
+
"versioning": "in-branch-bump",
|
|
138
147
|
"publish_mode": "oidc",
|
|
139
148
|
"access": "public"
|
|
140
149
|
}
|
|
@@ -48,10 +48,14 @@ codebyplan ship --body-file /tmp/cbp-ship-main-body.md --json${DRY_RUN:+ --dry-r
|
|
|
48
48
|
|
|
49
49
|
Pass `--dry-run` through if the skill was invoked with a dry-run arg.
|
|
50
50
|
|
|
51
|
+
`codebyplan ship` patch-bumps every changed workspace package and commits `chore(release): bump versions` on the feat branch BEFORE creating the PR, so the bump rides this same feat→main PR (see `cbp-ship/reference/versioning.md`, `in-branch-bump` mode). Pass `--no-bump` to skip for a single ship.
|
|
52
|
+
|
|
51
53
|
### Step 4: Report
|
|
52
54
|
|
|
53
55
|
Parse JSON from Step 3. Report `pr_url`, `merge_commit`, `branch_deleted`. If `checks_failed: true`, surface `checks_failure_reason` and stop.
|
|
54
56
|
|
|
57
|
+
If `bumps[]` is present with any non-skipped entry, surface a **Version bumps** line per package — `<name>: <currentVersion> → <nextVersion>` — so the user sees what this PR will publish on merge.
|
|
58
|
+
|
|
55
59
|
If `branch_deleted === true`, run a conditional Supabase preview-branch teardown for the feat branch that was just merged:
|
|
56
60
|
|
|
57
61
|
> Lifecycle contract: see [[supabase-branch-lifecycle]].
|