codebyplan 1.5.1 → 1.8.0

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.
Files changed (205) hide show
  1. package/dist/cli.js +4462 -748
  2. package/package.json +5 -1
  3. package/templates/.gitkeep +0 -0
  4. package/templates/README.md +20 -0
  5. package/templates/agents/cbp-cc-executor.md +213 -0
  6. package/templates/agents/cbp-database-agent.md +229 -0
  7. package/templates/agents/cbp-improve-claude.md +245 -0
  8. package/templates/agents/cbp-improve-round.md +284 -0
  9. package/templates/agents/cbp-mechanical-edits.md +111 -0
  10. package/templates/agents/cbp-research.md +282 -0
  11. package/templates/agents/cbp-round-executor.md +604 -0
  12. package/templates/agents/cbp-security-agent.md +134 -0
  13. package/templates/agents/cbp-task-check.md +213 -0
  14. package/templates/agents/cbp-task-planner.md +582 -0
  15. package/templates/agents/cbp-test-e2e-agent.md +363 -0
  16. package/templates/agents/cbp-testing-qa-agent.md +400 -0
  17. package/templates/context/mcp-docs.md +139 -0
  18. package/templates/hooks/README.md +236 -0
  19. package/templates/hooks/cbp-auto-test-hooks.sh +44 -0
  20. package/templates/hooks/cbp-lint-format-on-edit.sh +159 -0
  21. package/templates/hooks/cbp-maestro-yaml-validate.sh +100 -0
  22. package/templates/hooks/cbp-mcp-migration-guard.sh +32 -0
  23. package/templates/hooks/cbp-mcp-round-sync.sh +79 -0
  24. package/templates/hooks/cbp-mcp-worktree-inject.sh +76 -0
  25. package/templates/hooks/cbp-notify.sh +68 -0
  26. package/templates/hooks/cbp-plugin-dispatch.sh +29 -0
  27. package/templates/hooks/cbp-pre-commit-quality-gate.sh +204 -0
  28. package/templates/hooks/cbp-statusline.sh +347 -0
  29. package/templates/hooks/cbp-subagent-statusline.sh +182 -0
  30. package/templates/hooks/cbp-test-coverage-gate.sh +144 -0
  31. package/templates/hooks/cbp-test-hooks.sh +320 -0
  32. package/templates/hooks/hooks.json +85 -0
  33. package/templates/hooks/validate-context-usage.sh +59 -0
  34. package/templates/hooks/validate-git-commit.sh +78 -0
  35. package/templates/hooks/validate-git-stash-deny.sh +32 -0
  36. package/templates/hooks/validate-structure-lengths.sh +57 -0
  37. package/templates/hooks/validate-structure-lib.sh +104 -0
  38. package/templates/hooks/validate-structure-patterns.sh +54 -0
  39. package/templates/hooks/validate-structure-scope.sh +33 -0
  40. package/templates/hooks/validate-structure-smoke.sh +95 -0
  41. package/templates/hooks/validate-structure-templates.sh +34 -0
  42. package/templates/hooks/validate-structure.sh +69 -0
  43. package/templates/rules/.gitkeep +0 -0
  44. package/templates/rules/README.md +47 -0
  45. package/templates/rules/context-file-loading.md +52 -0
  46. package/templates/rules/scope-vocabulary.md +64 -0
  47. package/templates/rules/todo-backend.md +109 -0
  48. package/templates/settings.project.base.json +55 -0
  49. package/templates/settings.user.base.json +25 -0
  50. package/templates/skills/cbp-build-cc-agent/SKILL.md +139 -0
  51. package/templates/skills/cbp-build-cc-agent/examples/read-only-reviewer.md +32 -0
  52. package/templates/skills/cbp-build-cc-agent/examples/with-hooks.md +41 -0
  53. package/templates/skills/cbp-build-cc-agent/examples/with-skills-preload.md +25 -0
  54. package/templates/skills/cbp-build-cc-agent/reference/cbp-quality.md +153 -0
  55. package/templates/skills/cbp-build-cc-agent/reference/frontmatter-fields.md +37 -0
  56. package/templates/skills/cbp-build-cc-agent/reference/permission-modes.md +18 -0
  57. package/templates/skills/cbp-build-cc-agent/scripts/validate-agent.sh +67 -0
  58. package/templates/skills/cbp-build-cc-agent/templates/agent.md +66 -0
  59. package/templates/skills/cbp-build-cc-claude-file/SKILL.md +178 -0
  60. package/templates/skills/cbp-build-cc-claude-file/examples/minimal-project.md +33 -0
  61. package/templates/skills/cbp-build-cc-claude-file/examples/monorepo-with-imports.md +39 -0
  62. package/templates/skills/cbp-build-cc-claude-file/reference/imports.md +72 -0
  63. package/templates/skills/cbp-build-cc-claude-file/reference/what-belongs.md +39 -0
  64. package/templates/skills/cbp-build-cc-claude-file/templates/project-claude-md.md +48 -0
  65. package/templates/skills/cbp-build-cc-claude-file/templates/user-claude-md.md +22 -0
  66. package/templates/skills/cbp-build-cc-memory/SKILL.md +201 -0
  67. package/templates/skills/cbp-build-cc-memory/examples/feedback-memory.md +11 -0
  68. package/templates/skills/cbp-build-cc-memory/examples/project-memory.md +11 -0
  69. package/templates/skills/cbp-build-cc-memory/examples/reference-memory.md +13 -0
  70. package/templates/skills/cbp-build-cc-memory/examples/user-memory.md +14 -0
  71. package/templates/skills/cbp-build-cc-memory/reference/memory-types.md +59 -0
  72. package/templates/skills/cbp-build-cc-memory/reference/when-to-save.md +62 -0
  73. package/templates/skills/cbp-build-cc-memory/templates/MEMORY-index.md +4 -0
  74. package/templates/skills/cbp-build-cc-memory/templates/memory-entry.md +15 -0
  75. package/templates/skills/cbp-build-cc-mode/SKILL.md +99 -0
  76. package/templates/skills/cbp-build-cc-rule/SKILL.md +176 -0
  77. package/templates/skills/cbp-build-cc-rule/examples/global-rule.md +19 -0
  78. package/templates/skills/cbp-build-cc-rule/examples/scoped-rule.md +41 -0
  79. package/templates/skills/cbp-build-cc-rule/reference/paths-patterns.md +48 -0
  80. package/templates/skills/cbp-build-cc-rule/templates/rule.md +32 -0
  81. package/templates/skills/cbp-build-cc-settings/SKILL.md +220 -0
  82. package/templates/skills/cbp-build-cc-settings/examples/hooks-config.json +64 -0
  83. package/templates/skills/cbp-build-cc-settings/examples/permissions-config.json +34 -0
  84. package/templates/skills/cbp-build-cc-settings/examples/sandbox-config.json +42 -0
  85. package/templates/skills/cbp-build-cc-settings/reference/cbp-conventions.md +104 -0
  86. package/templates/skills/cbp-build-cc-settings/reference/permission-rules.md +61 -0
  87. package/templates/skills/cbp-build-cc-settings/reference/scope-precedence.md +73 -0
  88. package/templates/skills/cbp-build-cc-settings/reference/settings-fields.md +166 -0
  89. package/templates/skills/cbp-build-cc-settings/templates/settings.json +23 -0
  90. package/templates/skills/cbp-build-cc-settings/templates/settings.local.json +10 -0
  91. package/templates/skills/cbp-build-cc-skill/SKILL.md +154 -0
  92. package/templates/skills/cbp-build-cc-skill/examples/dynamic-context.md +31 -0
  93. package/templates/skills/cbp-build-cc-skill/examples/fork-skill.md +22 -0
  94. package/templates/skills/cbp-build-cc-skill/examples/knowledge-skill.md +25 -0
  95. package/templates/skills/cbp-build-cc-skill/examples/task-skill.md +29 -0
  96. package/templates/skills/cbp-build-cc-skill/reference/cbp-quality.md +157 -0
  97. package/templates/skills/cbp-build-cc-skill/reference/frontmatter-fields.md +35 -0
  98. package/templates/skills/cbp-build-cc-skill/reference/string-substitutions.md +60 -0
  99. package/templates/skills/cbp-build-cc-skill/scripts/validate-skill.sh +90 -0
  100. package/templates/skills/cbp-build-cc-skill/templates/skill.md +51 -0
  101. package/templates/skills/cbp-checkpoint-check/SKILL.md +156 -0
  102. package/templates/skills/cbp-checkpoint-complete/SKILL.md +109 -0
  103. package/templates/skills/cbp-checkpoint-create/SKILL.md +287 -0
  104. package/templates/skills/cbp-checkpoint-end/SKILL.md +241 -0
  105. package/templates/skills/cbp-checkpoint-update/SKILL.md +115 -0
  106. package/templates/skills/cbp-frontend-a11y/SKILL.md +109 -0
  107. package/templates/skills/cbp-frontend-a11y/reference/aria-roles-states.md +130 -0
  108. package/templates/skills/cbp-frontend-a11y/reference/contrast-visual.md +122 -0
  109. package/templates/skills/cbp-frontend-a11y/reference/keyboard-patterns.md +154 -0
  110. package/templates/skills/cbp-frontend-a11y/reference/semantic-html.md +111 -0
  111. package/templates/skills/cbp-frontend-design/SKILL.md +145 -0
  112. package/templates/skills/cbp-frontend-design/reference/nextjs-scss.md +118 -0
  113. package/templates/skills/cbp-frontend-design/reference/rn-expo.md +101 -0
  114. package/templates/skills/cbp-frontend-design/reference/tauri-react.md +82 -0
  115. package/templates/skills/cbp-frontend-ui/SKILL.md +262 -0
  116. package/templates/skills/cbp-frontend-ui/reference/ui-label-maps.md +42 -0
  117. package/templates/skills/cbp-frontend-ui/reference/ui-layout-patterns.md +105 -0
  118. package/templates/skills/cbp-frontend-ui/reference/variant-defaults.md +149 -0
  119. package/templates/skills/cbp-frontend-ux/SKILL.md +181 -0
  120. package/templates/skills/cbp-git-branch-feat-create/SKILL.md +115 -0
  121. package/templates/skills/cbp-git-commit/SKILL.md +278 -0
  122. package/templates/skills/cbp-git-worktree-create/SKILL.md +226 -0
  123. package/templates/skills/cbp-git-worktree-remove/SKILL.md +145 -0
  124. package/templates/skills/cbp-merge-main/SKILL.md +228 -0
  125. package/templates/skills/cbp-round-check/SKILL.md +104 -0
  126. package/templates/skills/cbp-round-end/SKILL.md +183 -0
  127. package/templates/skills/cbp-round-end/reference/findings-presentation.md +44 -0
  128. package/templates/skills/cbp-round-end/reference/inline-fallback.md +35 -0
  129. package/templates/skills/cbp-round-execute/SKILL.md +211 -0
  130. package/templates/skills/cbp-round-execute/reference/inline-fallback.md +59 -0
  131. package/templates/skills/cbp-round-input/SKILL.md +165 -0
  132. package/templates/skills/cbp-round-start/SKILL.md +222 -0
  133. package/templates/skills/cbp-round-update/SKILL.md +163 -0
  134. package/templates/skills/cbp-session-end/SKILL.md +187 -0
  135. package/templates/skills/cbp-session-start/SKILL.md +155 -0
  136. package/templates/skills/cbp-ship/SKILL.md +332 -0
  137. package/templates/skills/cbp-ship/reference/changesets-overview.md +120 -0
  138. package/templates/skills/cbp-ship/reference/eas-cli-overview.md +60 -0
  139. package/templates/skills/cbp-ship/reference/gh-cli-overview.md +135 -0
  140. package/templates/skills/cbp-ship/reference/gh-cli-shipment-commands.md +283 -0
  141. package/templates/skills/cbp-ship/reference/npm-publish-monorepo.md +252 -0
  142. package/templates/skills/cbp-ship/reference/npm-publish-oidc-trusted.md +157 -0
  143. package/templates/skills/cbp-ship/reference/npm-publish-overview.md +171 -0
  144. package/templates/skills/cbp-ship/reference/preflight-checklist.md +88 -0
  145. package/templates/skills/cbp-ship/reference/railway-nestjs-deployment.md +169 -0
  146. package/templates/skills/cbp-ship/reference/railway-overview.md +120 -0
  147. package/templates/skills/cbp-ship/reference/railway-troubleshooting.md +168 -0
  148. package/templates/skills/cbp-ship/reference/release-please-overview.md +99 -0
  149. package/templates/skills/cbp-ship/reference/surface-expo-eas.md +155 -0
  150. package/templates/skills/cbp-ship/reference/surface-npm.md +180 -0
  151. package/templates/skills/cbp-ship/reference/surface-railway.md +152 -0
  152. package/templates/skills/cbp-ship/reference/surface-supabase.md +178 -0
  153. package/templates/skills/cbp-ship/reference/surface-tauri.md +138 -0
  154. package/templates/skills/cbp-ship/reference/surface-vercel.md +124 -0
  155. package/templates/skills/cbp-ship/reference/surface-vscode-ext.md +144 -0
  156. package/templates/skills/cbp-ship/reference/surfaces.md +60 -0
  157. package/templates/skills/cbp-ship/reference/testflight-automation.md +215 -0
  158. package/templates/skills/cbp-ship/reference/testflight-internal-vs-external.md +69 -0
  159. package/templates/skills/cbp-ship/reference/testflight-overview.md +98 -0
  160. package/templates/skills/cbp-ship/reference/versioning.md +116 -0
  161. package/templates/skills/cbp-ship/scripts/detect-surfaces.sh +217 -0
  162. package/templates/skills/cbp-ship/scripts/verify-expo-eas.sh +35 -0
  163. package/templates/skills/cbp-ship/scripts/verify-npm.sh +21 -0
  164. package/templates/skills/cbp-ship/scripts/verify-railway.sh +41 -0
  165. package/templates/skills/cbp-ship/scripts/verify-supabase.sh +19 -0
  166. package/templates/skills/cbp-ship/scripts/verify-tauri.sh +24 -0
  167. package/templates/skills/cbp-ship/scripts/verify-vercel.sh +32 -0
  168. package/templates/skills/cbp-ship/scripts/verify-vscode-ext.sh +25 -0
  169. package/templates/skills/cbp-ship/templates/eas.json +66 -0
  170. package/templates/skills/cbp-ship/templates/railway.toml +15 -0
  171. package/templates/skills/cbp-ship/templates/release-please-config.json +17 -0
  172. package/templates/skills/cbp-ship/templates/vercel.json +19 -0
  173. package/templates/skills/cbp-ship/templates/vscodeignore +21 -0
  174. package/templates/skills/cbp-ship/templates/workflow-changesets.yml +41 -0
  175. package/templates/skills/cbp-ship/templates/workflow-eas-submit.yml +53 -0
  176. package/templates/skills/cbp-ship/templates/workflow-npm-publish.yml +36 -0
  177. package/templates/skills/cbp-ship/templates/workflow-release-please.yml +21 -0
  178. package/templates/skills/cbp-ship/templates/workflow-tauri-release.yml +69 -0
  179. package/templates/skills/cbp-ship/templates/workflow-vsce-publish.yml +31 -0
  180. package/templates/skills/cbp-ship-configure/SKILL.md +296 -0
  181. package/templates/skills/cbp-ship-configure/reference/expo-mobile.md +204 -0
  182. package/templates/skills/cbp-ship-configure/reference/npm-package.md +165 -0
  183. package/templates/skills/cbp-ship-configure/reference/railway-backend.md +199 -0
  184. package/templates/skills/cbp-ship-configure/reference/supabase.md +200 -0
  185. package/templates/skills/cbp-ship-configure/reference/tauri-desktop.md +181 -0
  186. package/templates/skills/cbp-ship-configure/reference/vercel.md +117 -0
  187. package/templates/skills/cbp-ship-configure/reference/vscode-ext.md +155 -0
  188. package/templates/skills/cbp-ship-main/SKILL.md +65 -0
  189. package/templates/skills/cbp-supabase-branch-check/SKILL.md +337 -0
  190. package/templates/skills/cbp-supabase-branch-check/reference/dag-steps.md +29 -0
  191. package/templates/skills/cbp-supabase-migrate/SKILL.md +314 -0
  192. package/templates/skills/cbp-supabase-migrate/reference/advisor-triage.md +70 -0
  193. package/templates/skills/cbp-supabase-migrate/reference/cli-fallback.md +87 -0
  194. package/templates/skills/cbp-supabase-migrate/reference/preflight-dry-run.md +58 -0
  195. package/templates/skills/cbp-supabase-setup/SKILL.md +239 -0
  196. package/templates/skills/cbp-supabase-setup/reference/branching-setup.md +121 -0
  197. package/templates/skills/cbp-supabase-setup/reference/cli-fallback.md +109 -0
  198. package/templates/skills/cbp-task-check/SKILL.md +166 -0
  199. package/templates/skills/cbp-task-complete/SKILL.md +206 -0
  200. package/templates/skills/cbp-task-complete/reference/checkpoint-done-branching.md +48 -0
  201. package/templates/skills/cbp-task-complete/reference/next-step-heuristic.md +56 -0
  202. package/templates/skills/cbp-task-create/SKILL.md +167 -0
  203. package/templates/skills/cbp-task-start/SKILL.md +239 -0
  204. package/templates/skills/cbp-task-testing/SKILL.md +277 -0
  205. package/templates/skills/cbp-todo/SKILL.md +97 -0
@@ -0,0 +1,296 @@
1
+ ---
2
+ scope: org-shared
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 release-please), 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
+ argument-hint: [--surface=<id>]
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
+ effort: xhigh
8
+ ---
9
+
10
+ # Ship Configure Command
11
+
12
+ Set up shipment for a surface so `/cbp-ship` can deploy it. Each surface is configured independently — runs once per repo per surface, persists in `.codebyplan/shipment.json` `surfaces.{id}`, then never asks again unless re-invoked.
13
+
14
+ ## When to Use
15
+
16
+ - First-time shipment setup for a fresh repo
17
+ - Adding a new surface to an existing repo (e.g., adding mobile to a web-only project)
18
+ - Auto-suggested by `/cbp-ship` when it detects a surface that's not configured
19
+ - Rotating credentials (re-runs the credential check, doesn't store anything)
20
+
21
+ ## Arguments
22
+
23
+ `$ARGUMENTS`:
24
+
25
+ - `--surface=<id>` — configure one surface. Valid: `vercel-web`, `expo-mobile`, `tauri-desktop`, `npm-package`, `vscode-ext`, `railway-backend`, `supabase`
26
+ - No args — interactive picker; lists undetected/unconfigured surfaces and asks which to set up
27
+
28
+ ## Instructions
29
+
30
+ ### Step 1 — Pick the surface
31
+
32
+ If `--surface=<id>` is set, use it. Otherwise:
33
+
34
+ ```bash
35
+ bash "${CLAUDE_SKILL_DIR}/../ship/scripts/detect-surfaces.sh"
36
+ ```
37
+
38
+ Show the detection result and ask which to configure via AskUserQuestion (multi-select allowed).
39
+
40
+ ### Step 2 — Load the surface configurator
41
+
42
+ For each chosen surface, read its configurator block from this skill's reference. Each block has the same shape:
43
+
44
+ 1. **Prerequisites** — what the user must have before starting (e.g., Apple Developer account, Vercel team)
45
+ 2. **Probe** — non-destructive checks (CLI installed, credential reachable, account permissions)
46
+ 3. **Setup** — the interactive walkthrough
47
+ 4. **Persist** — write to `.codebyplan/shipment.json` `surfaces.{id}`
48
+ 5. **Verify** — final check that the surface is now ready for `/cbp-ship` to use
49
+
50
+ References:
51
+
52
+ | Surface | Reference |
53
+ | --------------- | ------------------------------------------------------------ |
54
+ | vercel-web | [reference/vercel.md](reference/vercel.md) |
55
+ | expo-mobile | [reference/expo-mobile.md](reference/expo-mobile.md) |
56
+ | tauri-desktop | [reference/tauri-desktop.md](reference/tauri-desktop.md) |
57
+ | npm-package | [reference/npm-package.md](reference/npm-package.md) |
58
+ | vscode-ext | [reference/vscode-ext.md](reference/vscode-ext.md) |
59
+ | railway-backend | [reference/railway-backend.md](reference/railway-backend.md) |
60
+ | supabase | [reference/supabase.md](reference/supabase.md) |
61
+
62
+ **Supabase — branching integration** (run AFTER Step 5 — Verify completes for the
63
+ supabase surface; do NOT invoke during Steps 1–4): once Step 5 has finished and
64
+ `shipment.surfaces.supabase` is persisted, run
65
+ `jq '.shipment.surfaces.supabase.branching_configured // empty' .codebyplan.json`.
66
+ If empty, invoke `/cbp-supabase-setup` (GitHub integration, required-status-check,
67
+ persistent branch). Delegate fully — do NOT duplicate steps inline. If already set,
68
+ note as already-done in the Step 6 report.
69
+
70
+ ### Step 3 — Walk the user through setup, step by step
71
+
72
+ This skill NEVER dumps "here's a 200-line guide, follow it." Every step is one-at-a-time, interactive:
73
+
74
+ ```
75
+ Step 1/6: Check Vercel CLI is installed
76
+ [runs: which vercel]
77
+ ✓ vercel 35.0.1 found at /usr/local/bin/vercel
78
+
79
+ Step 2/6: Check you're logged in
80
+ [runs: vercel whoami]
81
+ ✓ Logged in as midevyou
82
+
83
+ Step 3/6: Link this repo to a Vercel project
84
+ You'll run: vercel link
85
+ This creates .vercel/project.json. Choose: existing project / create new.
86
+
87
+ Press Enter when ready to run, or type 'skip' to do it yourself.
88
+ ```
89
+
90
+ For commands the user must run (vsce login, npm login, eas login, supabase login — any 2FA/OTP flow), display the command and wait for the user to run it themselves, then verify by re-probing. Never run interactive auth commands via Bash.
91
+
92
+ For commands that are safe to run on the user's behalf (CLI version checks, file scaffolding, JSON read/write), run them directly with the user's pre-confirmation.
93
+
94
+ ### Step 4 — Persist what was configured
95
+
96
+ Write to `.codebyplan/shipment.json` (create the file if missing):
97
+
98
+ ```json
99
+ {
100
+ "surfaces": {
101
+ "vercel-web": {
102
+ "configured_at": "2026-04-29T14:32:00Z",
103
+ "project_id": "prj_abc123",
104
+ "team_id": "team_xyz789",
105
+ "framework": "nextjs",
106
+ "production_branch": "main"
107
+ }
108
+ }
109
+ }
110
+ ```
111
+
112
+ The block contains references and IDs only — NO credentials, tokens, or secrets. Credentials live in:
113
+
114
+ - Vercel: `~/.local/share/com.vercel.cli/auth.json` (CLI session)
115
+ - npm: `~/.npmrc` (auth token) or 2FA per-publish
116
+ - EAS: `~/.expo/state.json` (CLI session)
117
+ - Apple: Keychain + ASC API key files
118
+ - Supabase: `~/.supabase/access-token` (CLI session)
119
+ - Railway: `~/.railway/config.json` (CLI session)
120
+ - vsce (VS Code): `~/.vscode/.vsce` (PAT)
121
+
122
+ The skill's job is to verify these credentials EXIST and are valid; never to store or copy them.
123
+
124
+ ### Step 5 — Verify shipment-readiness
125
+
126
+ Run the verification step from the surface reference. For Vercel, this is:
127
+
128
+ ```bash
129
+ vercel inspect "$(jq -r '.surfaces."vercel-web".project_id' .codebyplan/shipment.json)" 2>&1 | head -20
130
+ ```
131
+
132
+ If verification passes, mark the surface as configured. If it fails, surface the error and offer to retry the failing step.
133
+
134
+ ### Step 6 — Report
135
+
136
+ ```
137
+ ## Surface configured: vercel-web
138
+
139
+ Project: codebyplan-web (prj_abc123)
140
+ Team: midevy-eu (team_xyz789)
141
+ Framework: Next.js
142
+ Production branch: main
143
+
144
+ Saved to .codebyplan/shipment.json: surfaces.vercel-web
145
+
146
+ Ready for /cbp-ship.
147
+ ```
148
+
149
+ If multiple surfaces were configured, list each one's status. If any failed, list those at the end with the next-step prompt.
150
+
151
+ ## Re-run safety
152
+
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
+
155
+ ## Special case: opt-in to release-please
156
+
157
+ `release-please` is one of three versioning modes (manual, release-please, changesets). Opt-in is part of npm-package configure:
158
+
159
+ ```
160
+ Step N/M: Versioning mode
161
+ A) Manual — bump package.json version yourself before /cbp-ship
162
+ B) release-please — GH Action opens version-bump PRs based on conventional commits (recommended for npm packages)
163
+ C) changesets — manual changeset entries; tooling aggregates into version PRs (recommended for monorepos with many published packages)
164
+ ```
165
+
166
+ If B or C, the skill scaffolds the GitHub Actions workflow + config file (`templates/workflows/release-please.yml` or `.changeset/config.json`).
167
+
168
+ ## Special case: `codebyplan` asset-publish automation
169
+
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 release-please can autopublish on merge to main. (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
+ 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
+ ### Probe 1 — npm whoami
175
+
176
+ ```bash
177
+ npm whoami 2>&1 || echo "RUN: npm login (need: https://www.npmjs.com/login)"
178
+ ```
179
+
180
+ If 401 / not logged in, STOP and surface the login URL. Re-run after the user logs in.
181
+
182
+ ### Probe 2 — @codebyplan scope membership
183
+
184
+ ```bash
185
+ npm access list packages @codebyplan 2>&1 | head -20
186
+ ```
187
+
188
+ Confirms the logged-in account has read on the `@codebyplan` org scope. If 404 / no access:
189
+
190
+ - Either the user does not belong to the `@codebyplan` org → STOP, request invitation from org owner
191
+ - 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
+ ### Scaffold 1 — release-please workflow
194
+
195
+ If `.github/workflows/release-please.yml` is absent:
196
+
197
+ ```bash
198
+ mkdir -p .github/workflows
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`)
201
+ ```
202
+
203
+ The mechanics + commit-prefix → bump-tier mapping live in [../ship/reference/release-please-overview.md](../ship/reference/release-please-overview.md).
204
+
205
+ ### Scaffold 2 — release-please-config.json at repo root
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.)
225
+
226
+ ### Verify — publishConfig.access on the package
227
+
228
+ ```bash
229
+ jq -r '.publishConfig.access // "missing"' packages/codebyplan-package/package.json
230
+ ```
231
+
232
+ Required value: `public`. If `missing` or `restricted`, instruct the user to add:
233
+
234
+ ```json
235
+ {
236
+ "publishConfig": {
237
+ "access": "public",
238
+ "registry": "https://registry.npmjs.org/"
239
+ }
240
+ }
241
+ ```
242
+
243
+ ### Persist
244
+
245
+ ```json
246
+ {
247
+ "surfaces": {
248
+ "npm-package": {
249
+ "packages/codebyplan-package": {
250
+ "package_name": "codebyplan",
251
+ "bin_name": "codebyplan",
252
+ "versioning": "release-please",
253
+ "publish_mode": "release-please-on-merge-to-main",
254
+ "access": "public"
255
+ }
256
+ }
257
+ }
258
+ }
259
+ ```
260
+
261
+ After this branch completes, every merge to main with `feat:` / `fix:` / `feat!:` Conventional Commits will trigger release-please to open a version-bump PR. When the maintainer merges that PR, release-please tags the release and `npm publish` runs from the workflow (auth via `NODE_AUTH_TOKEN` GH secret or OIDC trusted publishing — see [../ship/reference/npm-publish-oidc-trusted.md](../ship/reference/npm-publish-oidc-trusted.md)). Siblings then pick up the new asset content via `npx codebyplan claude update`.
262
+
263
+ ## Special case: Apple credentials for TestFlight
264
+
265
+ Apple credential setup is by far the most error-prone step. The reference lays out:
266
+
267
+ 1. Apple Developer Program enrollment ($99/yr) — user-side, link only
268
+ 2. App Store Connect API key creation — user-side, walk-through
269
+ 3. Local p8 file storage — user does, skill verifies path
270
+ 4. Tauri-style p12 + signing identity — only needed if also configuring tauri-desktop
271
+ 5. EAS credentials sync — `eas credentials` walkthrough
272
+
273
+ The configurator confirms each piece is reachable; it never stores them. See [reference/expo-mobile.md](reference/expo-mobile.md) and [reference/tauri-desktop.md](reference/tauri-desktop.md).
274
+
275
+ ## Key Rules
276
+
277
+ - **Step-by-step always** — never paste a 200-line "do all of this" block; one step, wait for confirmation, next
278
+ - **Run safe commands directly, instruct unsafe ones** — version checks and JSON edits run via Bash; auth commands and 2FA flows are user-run
279
+ - **Never store credentials in `.codebyplan/repo.json`** — only IDs, project refs, branch names
280
+ - **Re-running is idempotent** — re-runs refresh the probe + persist block, never overwrite credentials
281
+ - **One surface per invocation when via `--surface`** — multi-select picker for the no-args path
282
+ - **Verify at the end** — final probe must succeed before marking configured
283
+
284
+ ## Additional resources
285
+
286
+ - Per-surface configurators: [reference/](reference/) — one file per surface
287
+ - GH Actions workflow templates: [scripts/](scripts/) — scaffolded into `.github/workflows/` when versioning mode is opt-in
288
+ - Detection script (shared with `/cbp-ship`): `${CLAUDE_PLUGIN_ROOT}/skills/ship/scripts/detect-surfaces.sh`
289
+
290
+ ## Integration
291
+
292
+ - **Triggered by**: user invocation; auto-suggested by `/cbp-ship` when an unconfigured surface is detected
293
+ - **Reads**: `.codebyplan/shipment.json`, repo filesystem (vercel.json, eas.json, supabase/, etc.), CLI session state via probe commands
294
+ - **Writes**: `.codebyplan/shipment.json` `surfaces.{id}`; optionally scaffolds `eas.json`, `vercel.json`, `.github/workflows/*.yml`, `.changeset/config.json` from templates
295
+ - **Calls**: shared detection script; per-surface CLI tools (vercel, eas, supabase, railway, npm, vsce) for probes
296
+ - **Triggers**: returns control to user; if invoked from `/cbp-ship`, returns there for resume
@@ -0,0 +1,204 @@
1
+ # Configure: expo-mobile
2
+
3
+ Walkthrough for first-time Expo + EAS + TestFlight setup.
4
+
5
+ ## Prerequisites
6
+
7
+ - Apple Developer Program enrollment ($99/yr) — https://developer.apple.com/programs/enroll/
8
+ - Google Play Developer account ($25 one-time, optional if Android-only later)
9
+ - Expo account (free) — https://expo.dev/signup
10
+ - App Store Connect record for the app (created in ASC dashboard)
11
+
12
+ ## Probe
13
+
14
+ ```bash
15
+ which npx
16
+ npx eas-cli --version || { echo "Will install eas-cli on first use"; }
17
+ npx eas whoami || { echo "Run: npx eas login"; exit 1; }
18
+ ```
19
+
20
+ ## Setup walkthrough
21
+
22
+ ### Step 1/9: Verify Expo account + EAS access
23
+
24
+ ```bash
25
+ npx eas whoami
26
+ ```
27
+
28
+ If not logged in:
29
+
30
+ ```
31
+ Run: npx eas login
32
+ Use your expo.dev account credentials.
33
+ ```
34
+
35
+ ### Step 2/9: Initialize EAS project
36
+
37
+ ```bash
38
+ cd "$APP_PATH"
39
+ npx eas init
40
+ ```
41
+
42
+ This creates `eas.json` skeleton + adds `expo.extra.eas.projectId` to `app.json`.
43
+
44
+ ### Step 3/9: Configure `app.json`
45
+
46
+ Verify these fields are set:
47
+
48
+ ```json
49
+ {
50
+ "expo": {
51
+ "name": "Your App",
52
+ "slug": "your-app",
53
+ "version": "1.0.0",
54
+ "ios": {
55
+ "bundleIdentifier": "com.yourcompany.yourapp",
56
+ "buildNumber": "1"
57
+ },
58
+ "android": {
59
+ "package": "com.yourcompany.yourapp",
60
+ "versionCode": 1
61
+ }
62
+ }
63
+ }
64
+ ```
65
+
66
+ The bundle ID and package name **must match** your App Store Connect / Play Console records.
67
+
68
+ ### Step 4/9: Configure `eas.json`
69
+
70
+ Use the template at `${CLAUDE_PLUGIN_ROOT}/skills/ship/templates/eas.json`. Customize:
71
+
72
+ ```json
73
+ {
74
+ "cli": { "version": ">= 5.0.0" },
75
+ "build": {
76
+ "development": {
77
+ "developmentClient": true,
78
+ "distribution": "internal"
79
+ },
80
+ "preview": {
81
+ "distribution": "internal",
82
+ "ios": { "simulator": false },
83
+ "channel": "preview",
84
+ "autoIncrement": "buildNumber"
85
+ },
86
+ "production": {
87
+ "channel": "production",
88
+ "autoIncrement": "buildNumber"
89
+ }
90
+ },
91
+ "submit": {
92
+ "production": {
93
+ "ios": {
94
+ "appleId": "<your apple id email>",
95
+ "ascAppId": "<from App Store Connect — App Information → Apple ID>",
96
+ "appleTeamId": "<from developer.apple.com → Membership>"
97
+ },
98
+ "android": {
99
+ "serviceAccountKeyPath": "./google-play-service-account.json",
100
+ "track": "internal"
101
+ }
102
+ }
103
+ }
104
+ }
105
+ ```
106
+
107
+ ### Step 5/9: Apple Developer credentials
108
+
109
+ The skill walks the user through these one at a time:
110
+
111
+ #### 5a. App Store Connect API key
112
+
113
+ ```
114
+ 1. Go to https://appstoreconnect.apple.com/access/api
115
+ 2. Click 'Generate API Key' (or 'Add Key' if you have access)
116
+ 3. Name it 'EAS Build', role 'App Manager'
117
+ 4. Download the .p8 file (you can only download ONCE)
118
+ 5. Note the Key ID and Issuer ID
119
+
120
+ Save the .p8 file to ~/private_keys/AuthKey_<KEYID>.p8
121
+ Reply with the Key ID and Issuer ID when ready.
122
+ ```
123
+
124
+ #### 5b. Sync credentials with EAS
125
+
126
+ ```bash
127
+ cd "$APP_PATH"
128
+ npx eas credentials
129
+ ```
130
+
131
+ This is interactive. The skill instructs:
132
+
133
+ ```
134
+ - Select platform: iOS
135
+ - Select build profile: production
136
+ - Select 'Distribution Certificate' → Set up new
137
+ - Use the App Store Connect API key from step 5a
138
+ - Select 'Provisioning Profile' → Set up new
139
+
140
+ Reply 'done' when finished.
141
+ ```
142
+
143
+ #### 5c. Same for Android (if shipping Android)
144
+
145
+ ```
146
+ 1. Generate Service Account: https://console.cloud.google.com/iam-admin/serviceaccounts
147
+ 2. Grant 'Service Account User' role on Play Console (Users & Permissions)
148
+ 3. Download JSON key, save as ./google-play-service-account.json
149
+ 4. Add path to .gitignore (NEVER commit)
150
+ ```
151
+
152
+ ### Step 6/9: Persist to `.codebyplan/shipment.json`
153
+
154
+ ```json
155
+ {
156
+ "surfaces": {
157
+ "expo-mobile": {
158
+ "configured_at": "<now>",
159
+ "app_path": "apps/mobile",
160
+ "eas_project_id": "<from app.json>",
161
+ "ios_bundle_id": "com.yourcompany.yourapp",
162
+ "android_package": "com.yourcompany.yourapp",
163
+ "default_testflight_group": "internal",
164
+ "versioning": "auto-build-number"
165
+ }
166
+ }
167
+ }
168
+ ```
169
+
170
+ ### Step 7/9: Test build (dev profile)
171
+
172
+ Before committing the config, verify the credential setup with a dev build:
173
+
174
+ ```bash
175
+ npx eas build --profile development --platform ios --non-interactive
176
+ ```
177
+
178
+ This is fast (~10 min) and confirms the iOS credential chain works without uploading to TestFlight.
179
+
180
+ If it fails, the skill walks the user through `npx eas credentials` audit again.
181
+
182
+ ### Step 8/9: Stage `eas.json` + `app.json`
183
+
184
+ The user reviews the diff and commits these files. The skill does NOT commit on the user's behalf.
185
+
186
+ ### Step 9/9: Verify the surface
187
+
188
+ ```bash
189
+ bash "${CLAUDE_PLUGIN_ROOT}/skills/ship/scripts/detect-surfaces.sh" --filter=expo-mobile | jq
190
+ # Expect: configured: true
191
+ ```
192
+
193
+ ## Done
194
+
195
+ Surface is ready. `/cbp-ship` will offer mobile shipment options at next checkpoint end.
196
+
197
+ ## Common setup issues
198
+
199
+ | Symptom | Fix |
200
+ |---|---|
201
+ | `eas init` fails "user does not have access" | Add the user to the Expo organization: https://expo.dev/accounts/{org}/members |
202
+ | `eas credentials` shows "Distribution Certificate is invalid" | Renew via Apple Developer; Apple revokes after team ID changes or expiry |
203
+ | TestFlight build rejected with ITMS-90xxx | Common: missing `NSCalendarsUsageDescription` etc. in `app.json` `expo.ios.infoPlist` |
204
+ | Bundle ID rejected | Already in use by another developer; pick a different bundle ID |
@@ -0,0 +1,165 @@
1
+ # Configure: npm-package
2
+
3
+ Walkthrough for first-time npm publish setup.
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 (`release-please-config.json`, `.release-please-manifest.json` at repo root) 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
+
7
+ ## Prerequisites
8
+
9
+ - npm account (https://www.npmjs.com/signup) — free
10
+ - 2FA enabled (mandatory for publish): npm web → Profile → 2FA Settings → "Authorization and writes"
11
+ - For scoped packages (`@scope/pkg`): the scope owned by your account or org
12
+
13
+ ## Probe
14
+
15
+ ```bash
16
+ which npm
17
+ npm whoami || { echo "Run: npm login"; exit 1; }
18
+ npm profile get tfa | grep -q "auth-and-writes" || { echo "Enable 2FA: npm profile enable-2fa auth-and-writes"; exit 1; }
19
+ ```
20
+
21
+ ## Setup walkthrough
22
+
23
+ ### Step 1/7: Pick the package
24
+
25
+ If monorepo with multiple publishable packages, configure each separately. The skill detects which `package.json` files have `private: false` (or absent) and asks which to configure.
26
+
27
+ ### Step 2/7: Verify package.json metadata
28
+
29
+ The skill checks each required field one at a time:
30
+
31
+ ```
32
+ ✓ name: @codebyplan/web-package
33
+ ✓ version: 0.1.0
34
+ ✗ description: missing — what does this package do?
35
+ ✓ keywords: [...]
36
+ ✗ repository: missing — public GH URL?
37
+ ✓ license: MIT
38
+ ✗ author: missing
39
+ ```
40
+
41
+ For each missing/wrong field, the skill prompts and writes the answer.
42
+
43
+ ### Step 3/7: Verify entrypoints
44
+
45
+ ```bash
46
+ cd "$PKG_PATH"
47
+ MAIN=$(jq -r .main package.json)
48
+ [ -f "$MAIN" ] || echo "WARN: main entry $MAIN missing — needs build first"
49
+
50
+ # Better: exports map
51
+ EXPORTS=$(jq -r '.exports."."' package.json)
52
+ [ "$EXPORTS" != "null" ] || echo "Recommend adding exports map for ESM/CJS dual support"
53
+ ```
54
+
55
+ If `exports` is missing, suggest:
56
+
57
+ ```json
58
+ {
59
+ "exports": {
60
+ ".": {
61
+ "types": "./dist/index.d.ts",
62
+ "import": "./dist/index.js",
63
+ "require": "./dist/index.cjs"
64
+ }
65
+ },
66
+ "main": "./dist/index.cjs",
67
+ "module": "./dist/index.js",
68
+ "types": "./dist/index.d.ts",
69
+ "files": ["dist", "README.md", "LICENSE"]
70
+ }
71
+ ```
72
+
73
+ ### Step 4/7: Run package validators
74
+
75
+ ```bash
76
+ cd "$PKG_PATH"
77
+ npm pack --dry-run # what's in the tarball
78
+ pnpm publint # package.json lint
79
+ pnpm attw --pack # ESM/CJS resolution check
80
+ ```
81
+
82
+ Surface any errors/warnings; offer to fix obvious ones (missing `files`, wrong `main`).
83
+
84
+ ### Step 5/7: Pick versioning mode
85
+
86
+ ```
87
+ A) Manual — bump package.json version yourself before each release
88
+ B) release-please — GH Action opens version-bump PRs based on conventional commits (recommended)
89
+ C) changesets — manual changeset entries; aggregator PR (recommended for monorepos)
90
+ ```
91
+
92
+ If B, scaffold:
93
+
94
+ ```bash
95
+ cp ${CLAUDE_PLUGIN_ROOT}/skills/ship/templates/workflow-release-please.yml .github/workflows/release-please.yml
96
+ cp ${CLAUDE_PLUGIN_ROOT}/skills/ship/templates/release-please-config.json release-please-config.json
97
+ echo '{".":"<current version>"}' > .release-please-manifest.json
98
+ ```
99
+
100
+ If C:
101
+
102
+ ```bash
103
+ cd "$REPO_ROOT"
104
+ pnpm add -Dw @changesets/cli
105
+ npx changeset init
106
+ cp ${CLAUDE_PLUGIN_ROOT}/skills/ship/templates/workflow-changesets.yml .github/workflows/changesets.yml
107
+ ```
108
+
109
+ ### Step 6/7: Pick publish mode
110
+
111
+ ```
112
+ A) Local publish (manual OTP per release) — works immediately
113
+ B) OIDC trusted publishing from GH Actions — no token, no leak risk (recommended for prod)
114
+ ```
115
+
116
+ If B:
117
+
118
+ 1. https://www.npmjs.com/settings/{account}/trusted-publishers
119
+ 2. Add: `<owner>/<repo>` → workflow `.github/workflows/npm-publish.yml`, environment `release`
120
+ 3. Skill scaffolds:
121
+
122
+ ```bash
123
+ cp ${CLAUDE_PLUGIN_ROOT}/skills/ship/templates/workflow-npm-publish.yml .github/workflows/npm-publish.yml
124
+ ```
125
+
126
+ The workflow uses `permissions: id-token: write` and runs `npm publish --provenance --access public`.
127
+
128
+ ### Step 7/7: Persist + verify
129
+
130
+ ```json
131
+ {
132
+ "surfaces": {
133
+ "npm-package": {
134
+ "configured_at": "<now>",
135
+ "packages/codebyplan-package": {
136
+ "package_name": "codebyplan",
137
+ "versioning": "release-please",
138
+ "publish_mode": "oidc",
139
+ "access": "public"
140
+ }
141
+ }
142
+ }
143
+ }
144
+ ```
145
+
146
+ Verify (no actual publish — just dry-run the publish command):
147
+
148
+ ```bash
149
+ cd "$PKG_PATH"
150
+ npm publish --dry-run
151
+ # Inspect output for warnings; no upload happens
152
+ ```
153
+
154
+ ## Done
155
+
156
+ Surface is ready. `/cbp-ship` will offer publish when version bumps.
157
+
158
+ ## Common setup issues
159
+
160
+ | Symptom | Fix |
161
+ | -------------------------------------- | --------------------------------------------------------------------------- |
162
+ | `npm publish` 402 (paid plan required) | Scoped public package needs `--access public` (default is private for orgs) |
163
+ | 403 on first publish | Scope not owned by you; create org or use unscoped name |
164
+ | `attw` reports "FalseESM" | `package.json` `type: "module"` but exports point to .cjs files |
165
+ | Tarball missing TypeScript types | Add `"types"` to `exports` map AND add `dist/**/*.d.ts` to `files` |