codebyplan 1.5.1 → 1.9.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.
- package/dist/cli.js +4462 -748
- package/package.json +5 -1
- package/templates/.gitkeep +0 -0
- package/templates/README.md +20 -0
- package/templates/agents/cbp-cc-executor.md +213 -0
- package/templates/agents/cbp-database-agent.md +229 -0
- package/templates/agents/cbp-improve-claude.md +245 -0
- package/templates/agents/cbp-improve-round.md +284 -0
- package/templates/agents/cbp-mechanical-edits.md +111 -0
- package/templates/agents/cbp-research.md +282 -0
- package/templates/agents/cbp-round-executor.md +604 -0
- package/templates/agents/cbp-security-agent.md +134 -0
- package/templates/agents/cbp-task-check.md +213 -0
- package/templates/agents/cbp-task-planner.md +582 -0
- package/templates/agents/cbp-test-e2e-agent.md +363 -0
- package/templates/agents/cbp-testing-qa-agent.md +400 -0
- package/templates/context/mcp-docs.md +139 -0
- package/templates/hooks/README.md +236 -0
- package/templates/hooks/cbp-auto-test-hooks.sh +44 -0
- package/templates/hooks/cbp-lint-format-on-edit.sh +159 -0
- package/templates/hooks/cbp-maestro-yaml-validate.sh +100 -0
- package/templates/hooks/cbp-mcp-migration-guard.sh +32 -0
- package/templates/hooks/cbp-mcp-round-sync.sh +79 -0
- package/templates/hooks/cbp-mcp-worktree-inject.sh +76 -0
- package/templates/hooks/cbp-notify.sh +68 -0
- package/templates/hooks/cbp-plugin-dispatch.sh +29 -0
- package/templates/hooks/cbp-pre-commit-quality-gate.sh +204 -0
- package/templates/hooks/cbp-statusline.sh +347 -0
- package/templates/hooks/cbp-subagent-statusline.sh +182 -0
- package/templates/hooks/cbp-test-coverage-gate.sh +144 -0
- package/templates/hooks/cbp-test-hooks.sh +320 -0
- package/templates/hooks/hooks.json +85 -0
- package/templates/hooks/validate-context-usage.sh +59 -0
- package/templates/hooks/validate-git-commit.sh +78 -0
- package/templates/hooks/validate-git-stash-deny.sh +32 -0
- package/templates/hooks/validate-structure-lengths.sh +57 -0
- package/templates/hooks/validate-structure-lib.sh +104 -0
- package/templates/hooks/validate-structure-patterns.sh +54 -0
- package/templates/hooks/validate-structure-scope.sh +33 -0
- package/templates/hooks/validate-structure-smoke.sh +95 -0
- package/templates/hooks/validate-structure-templates.sh +34 -0
- package/templates/hooks/validate-structure.sh +69 -0
- package/templates/rules/.gitkeep +0 -0
- package/templates/rules/README.md +47 -0
- package/templates/rules/context-file-loading.md +52 -0
- package/templates/rules/scope-vocabulary.md +64 -0
- package/templates/rules/todo-backend.md +109 -0
- package/templates/settings.project.base.json +55 -0
- package/templates/settings.user.base.json +25 -0
- package/templates/skills/cbp-build-cc-agent/SKILL.md +139 -0
- package/templates/skills/cbp-build-cc-agent/examples/read-only-reviewer.md +32 -0
- package/templates/skills/cbp-build-cc-agent/examples/with-hooks.md +41 -0
- package/templates/skills/cbp-build-cc-agent/examples/with-skills-preload.md +25 -0
- package/templates/skills/cbp-build-cc-agent/reference/cbp-quality.md +153 -0
- package/templates/skills/cbp-build-cc-agent/reference/frontmatter-fields.md +37 -0
- package/templates/skills/cbp-build-cc-agent/reference/permission-modes.md +18 -0
- package/templates/skills/cbp-build-cc-agent/scripts/validate-agent.sh +67 -0
- package/templates/skills/cbp-build-cc-agent/templates/agent.md +66 -0
- package/templates/skills/cbp-build-cc-claude-file/SKILL.md +178 -0
- package/templates/skills/cbp-build-cc-claude-file/examples/minimal-project.md +33 -0
- package/templates/skills/cbp-build-cc-claude-file/examples/monorepo-with-imports.md +39 -0
- package/templates/skills/cbp-build-cc-claude-file/reference/imports.md +72 -0
- package/templates/skills/cbp-build-cc-claude-file/reference/what-belongs.md +39 -0
- package/templates/skills/cbp-build-cc-claude-file/templates/project-claude-md.md +48 -0
- package/templates/skills/cbp-build-cc-claude-file/templates/user-claude-md.md +22 -0
- package/templates/skills/cbp-build-cc-memory/SKILL.md +201 -0
- package/templates/skills/cbp-build-cc-memory/examples/feedback-memory.md +11 -0
- package/templates/skills/cbp-build-cc-memory/examples/project-memory.md +11 -0
- package/templates/skills/cbp-build-cc-memory/examples/reference-memory.md +13 -0
- package/templates/skills/cbp-build-cc-memory/examples/user-memory.md +14 -0
- package/templates/skills/cbp-build-cc-memory/reference/memory-types.md +59 -0
- package/templates/skills/cbp-build-cc-memory/reference/when-to-save.md +62 -0
- package/templates/skills/cbp-build-cc-memory/templates/MEMORY-index.md +4 -0
- package/templates/skills/cbp-build-cc-memory/templates/memory-entry.md +15 -0
- package/templates/skills/cbp-build-cc-mode/SKILL.md +99 -0
- package/templates/skills/cbp-build-cc-rule/SKILL.md +176 -0
- package/templates/skills/cbp-build-cc-rule/examples/global-rule.md +19 -0
- package/templates/skills/cbp-build-cc-rule/examples/scoped-rule.md +41 -0
- package/templates/skills/cbp-build-cc-rule/reference/paths-patterns.md +48 -0
- package/templates/skills/cbp-build-cc-rule/templates/rule.md +32 -0
- package/templates/skills/cbp-build-cc-settings/SKILL.md +220 -0
- package/templates/skills/cbp-build-cc-settings/examples/hooks-config.json +64 -0
- package/templates/skills/cbp-build-cc-settings/examples/permissions-config.json +34 -0
- package/templates/skills/cbp-build-cc-settings/examples/sandbox-config.json +42 -0
- package/templates/skills/cbp-build-cc-settings/reference/cbp-conventions.md +104 -0
- package/templates/skills/cbp-build-cc-settings/reference/permission-rules.md +61 -0
- package/templates/skills/cbp-build-cc-settings/reference/scope-precedence.md +73 -0
- package/templates/skills/cbp-build-cc-settings/reference/settings-fields.md +166 -0
- package/templates/skills/cbp-build-cc-settings/templates/settings.json +23 -0
- package/templates/skills/cbp-build-cc-settings/templates/settings.local.json +10 -0
- package/templates/skills/cbp-build-cc-skill/SKILL.md +154 -0
- package/templates/skills/cbp-build-cc-skill/examples/dynamic-context.md +31 -0
- package/templates/skills/cbp-build-cc-skill/examples/fork-skill.md +22 -0
- package/templates/skills/cbp-build-cc-skill/examples/knowledge-skill.md +25 -0
- package/templates/skills/cbp-build-cc-skill/examples/task-skill.md +29 -0
- package/templates/skills/cbp-build-cc-skill/reference/cbp-quality.md +157 -0
- package/templates/skills/cbp-build-cc-skill/reference/frontmatter-fields.md +35 -0
- package/templates/skills/cbp-build-cc-skill/reference/string-substitutions.md +60 -0
- package/templates/skills/cbp-build-cc-skill/scripts/validate-skill.sh +90 -0
- package/templates/skills/cbp-build-cc-skill/templates/skill.md +51 -0
- package/templates/skills/cbp-checkpoint-check/SKILL.md +156 -0
- package/templates/skills/cbp-checkpoint-complete/SKILL.md +109 -0
- package/templates/skills/cbp-checkpoint-create/SKILL.md +116 -0
- package/templates/skills/cbp-checkpoint-end/SKILL.md +241 -0
- package/templates/skills/cbp-checkpoint-plan/SKILL.md +137 -0
- package/templates/skills/cbp-checkpoint-plan/reference/alternative-comparison-template.md +54 -0
- package/templates/skills/cbp-checkpoint-plan/reference/dep-decision-rubric.md +50 -0
- package/templates/skills/cbp-checkpoint-plan/reference/e2e-discovery-probe.md +57 -0
- package/templates/skills/cbp-checkpoint-plan/reference/gap-analysis-playbook.md +47 -0
- package/templates/skills/cbp-checkpoint-start/SKILL.md +84 -0
- package/templates/skills/cbp-checkpoint-update/SKILL.md +115 -0
- package/templates/skills/cbp-frontend-a11y/SKILL.md +109 -0
- package/templates/skills/cbp-frontend-a11y/reference/aria-roles-states.md +130 -0
- package/templates/skills/cbp-frontend-a11y/reference/contrast-visual.md +122 -0
- package/templates/skills/cbp-frontend-a11y/reference/keyboard-patterns.md +154 -0
- package/templates/skills/cbp-frontend-a11y/reference/semantic-html.md +111 -0
- package/templates/skills/cbp-frontend-design/SKILL.md +145 -0
- package/templates/skills/cbp-frontend-design/reference/nextjs-scss.md +118 -0
- package/templates/skills/cbp-frontend-design/reference/rn-expo.md +101 -0
- package/templates/skills/cbp-frontend-design/reference/tauri-react.md +82 -0
- package/templates/skills/cbp-frontend-ui/SKILL.md +262 -0
- package/templates/skills/cbp-frontend-ui/reference/ui-label-maps.md +42 -0
- package/templates/skills/cbp-frontend-ui/reference/ui-layout-patterns.md +105 -0
- package/templates/skills/cbp-frontend-ui/reference/variant-defaults.md +149 -0
- package/templates/skills/cbp-frontend-ux/SKILL.md +181 -0
- package/templates/skills/cbp-git-branch-feat-create/SKILL.md +115 -0
- package/templates/skills/cbp-git-commit/SKILL.md +278 -0
- package/templates/skills/cbp-git-worktree-create/SKILL.md +226 -0
- package/templates/skills/cbp-git-worktree-remove/SKILL.md +145 -0
- package/templates/skills/cbp-merge-main/SKILL.md +228 -0
- package/templates/skills/cbp-round-check/SKILL.md +104 -0
- package/templates/skills/cbp-round-end/SKILL.md +183 -0
- package/templates/skills/cbp-round-end/reference/findings-presentation.md +44 -0
- package/templates/skills/cbp-round-end/reference/inline-fallback.md +35 -0
- package/templates/skills/cbp-round-execute/SKILL.md +211 -0
- package/templates/skills/cbp-round-execute/reference/inline-fallback.md +59 -0
- package/templates/skills/cbp-round-input/SKILL.md +165 -0
- package/templates/skills/cbp-round-start/SKILL.md +222 -0
- package/templates/skills/cbp-round-update/SKILL.md +163 -0
- package/templates/skills/cbp-session-end/SKILL.md +187 -0
- package/templates/skills/cbp-session-start/SKILL.md +155 -0
- package/templates/skills/cbp-ship/SKILL.md +332 -0
- package/templates/skills/cbp-ship/reference/changesets-overview.md +120 -0
- package/templates/skills/cbp-ship/reference/eas-cli-overview.md +60 -0
- package/templates/skills/cbp-ship/reference/gh-cli-overview.md +135 -0
- package/templates/skills/cbp-ship/reference/gh-cli-shipment-commands.md +283 -0
- package/templates/skills/cbp-ship/reference/npm-publish-monorepo.md +252 -0
- package/templates/skills/cbp-ship/reference/npm-publish-oidc-trusted.md +157 -0
- package/templates/skills/cbp-ship/reference/npm-publish-overview.md +171 -0
- package/templates/skills/cbp-ship/reference/preflight-checklist.md +88 -0
- package/templates/skills/cbp-ship/reference/railway-nestjs-deployment.md +169 -0
- package/templates/skills/cbp-ship/reference/railway-overview.md +120 -0
- package/templates/skills/cbp-ship/reference/railway-troubleshooting.md +168 -0
- package/templates/skills/cbp-ship/reference/release-please-overview.md +99 -0
- package/templates/skills/cbp-ship/reference/surface-expo-eas.md +155 -0
- package/templates/skills/cbp-ship/reference/surface-npm.md +180 -0
- package/templates/skills/cbp-ship/reference/surface-railway.md +152 -0
- package/templates/skills/cbp-ship/reference/surface-supabase.md +178 -0
- package/templates/skills/cbp-ship/reference/surface-tauri.md +138 -0
- package/templates/skills/cbp-ship/reference/surface-vercel.md +124 -0
- package/templates/skills/cbp-ship/reference/surface-vscode-ext.md +144 -0
- package/templates/skills/cbp-ship/reference/surfaces.md +60 -0
- package/templates/skills/cbp-ship/reference/testflight-automation.md +215 -0
- package/templates/skills/cbp-ship/reference/testflight-internal-vs-external.md +69 -0
- package/templates/skills/cbp-ship/reference/testflight-overview.md +98 -0
- package/templates/skills/cbp-ship/reference/versioning.md +116 -0
- package/templates/skills/cbp-ship/scripts/detect-surfaces.sh +217 -0
- package/templates/skills/cbp-ship/scripts/verify-expo-eas.sh +35 -0
- package/templates/skills/cbp-ship/scripts/verify-npm.sh +21 -0
- package/templates/skills/cbp-ship/scripts/verify-railway.sh +41 -0
- package/templates/skills/cbp-ship/scripts/verify-supabase.sh +19 -0
- package/templates/skills/cbp-ship/scripts/verify-tauri.sh +24 -0
- package/templates/skills/cbp-ship/scripts/verify-vercel.sh +32 -0
- package/templates/skills/cbp-ship/scripts/verify-vscode-ext.sh +25 -0
- package/templates/skills/cbp-ship/templates/eas.json +66 -0
- package/templates/skills/cbp-ship/templates/railway.toml +15 -0
- package/templates/skills/cbp-ship/templates/release-please-config.json +17 -0
- package/templates/skills/cbp-ship/templates/vercel.json +19 -0
- package/templates/skills/cbp-ship/templates/vscodeignore +21 -0
- package/templates/skills/cbp-ship/templates/workflow-changesets.yml +41 -0
- package/templates/skills/cbp-ship/templates/workflow-eas-submit.yml +53 -0
- package/templates/skills/cbp-ship/templates/workflow-npm-publish.yml +36 -0
- package/templates/skills/cbp-ship/templates/workflow-release-please.yml +21 -0
- package/templates/skills/cbp-ship/templates/workflow-tauri-release.yml +69 -0
- package/templates/skills/cbp-ship/templates/workflow-vsce-publish.yml +31 -0
- package/templates/skills/cbp-ship-configure/SKILL.md +296 -0
- package/templates/skills/cbp-ship-configure/reference/expo-mobile.md +204 -0
- package/templates/skills/cbp-ship-configure/reference/npm-package.md +165 -0
- package/templates/skills/cbp-ship-configure/reference/railway-backend.md +199 -0
- package/templates/skills/cbp-ship-configure/reference/supabase.md +200 -0
- package/templates/skills/cbp-ship-configure/reference/tauri-desktop.md +181 -0
- package/templates/skills/cbp-ship-configure/reference/vercel.md +117 -0
- package/templates/skills/cbp-ship-configure/reference/vscode-ext.md +155 -0
- package/templates/skills/cbp-ship-main/SKILL.md +65 -0
- package/templates/skills/cbp-supabase-branch-check/SKILL.md +337 -0
- package/templates/skills/cbp-supabase-branch-check/reference/dag-steps.md +29 -0
- package/templates/skills/cbp-supabase-migrate/SKILL.md +314 -0
- package/templates/skills/cbp-supabase-migrate/reference/advisor-triage.md +70 -0
- package/templates/skills/cbp-supabase-migrate/reference/cli-fallback.md +87 -0
- package/templates/skills/cbp-supabase-migrate/reference/preflight-dry-run.md +58 -0
- package/templates/skills/cbp-supabase-setup/SKILL.md +239 -0
- package/templates/skills/cbp-supabase-setup/reference/branching-setup.md +121 -0
- package/templates/skills/cbp-supabase-setup/reference/cli-fallback.md +109 -0
- package/templates/skills/cbp-task-check/SKILL.md +166 -0
- package/templates/skills/cbp-task-complete/SKILL.md +206 -0
- package/templates/skills/cbp-task-complete/reference/checkpoint-done-branching.md +48 -0
- package/templates/skills/cbp-task-complete/reference/next-step-heuristic.md +56 -0
- package/templates/skills/cbp-task-create/SKILL.md +167 -0
- package/templates/skills/cbp-task-start/SKILL.md +239 -0
- package/templates/skills/cbp-task-testing/SKILL.md +277 -0
- package/templates/skills/cbp-todo/SKILL.md +111 -0
|
@@ -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` |
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
# Configure: railway-backend
|
|
2
|
+
|
|
3
|
+
Walkthrough for first-time Railway backend setup.
|
|
4
|
+
|
|
5
|
+
Railway is the standard backend platform for the CBP family. This walkthrough covers the typical pattern: NestJS / Node service with optional Postgres / Redis Railway add-ons.
|
|
6
|
+
|
|
7
|
+
## Prerequisites
|
|
8
|
+
|
|
9
|
+
- Railway account (free trial; pay-as-you-go after $5 credit) — https://railway.app
|
|
10
|
+
- Backend service code with a `Dockerfile` OR `package.json` with a `start` script
|
|
11
|
+
- Health endpoint in your service code (e.g., `/health` returning 200) — recommended
|
|
12
|
+
|
|
13
|
+
## Probe
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
which railway || { echo "Install: brew install railway OR npm i -g @railway/cli"; exit 1; }
|
|
17
|
+
railway --version
|
|
18
|
+
railway whoami || { echo "Run: railway login"; exit 1; }
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Setup walkthrough
|
|
22
|
+
|
|
23
|
+
### Step 1/8: Create or pick a Railway project
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
cd "$BACKEND_PATH"
|
|
27
|
+
railway init
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Choose:
|
|
31
|
+
- **New project** — name it after the repo
|
|
32
|
+
- **Existing project** — pick from list
|
|
33
|
+
|
|
34
|
+
This creates `.railway/config.json` linking the local dir to the Railway project.
|
|
35
|
+
|
|
36
|
+
### Step 2/8: Add a service (if new project)
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
railway add
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Pick:
|
|
43
|
+
- **Service** — empty service for your code (the typical case)
|
|
44
|
+
- **Database** — Postgres / Redis / MySQL add-on (only if you don't use Supabase)
|
|
45
|
+
|
|
46
|
+
For CBP repos using Supabase, you typically only need a service (no Railway DB add-on).
|
|
47
|
+
|
|
48
|
+
### Step 3/8: Link the GH repo (auto-deploy mode)
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
railway service connect
|
|
52
|
+
# Pick GitHub → authorize → choose repo → choose branch
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Set the deploy branch to your PRODUCTION branch (per `.codebyplan/git.json` `branch_config.production`):
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
Settings → Source → Branch: main
|
|
59
|
+
Settings → Source → Path: apps/backend (if monorepo)
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
If you don't want auto-deploy (e.g., to ship deliberately via `railway up`), skip this step.
|
|
63
|
+
|
|
64
|
+
### Step 4/8: Configure build mode
|
|
65
|
+
|
|
66
|
+
Railway supports two build modes — pick based on your service:
|
|
67
|
+
|
|
68
|
+
#### Dockerfile (recommended for NestJS)
|
|
69
|
+
|
|
70
|
+
If `apps/backend/Dockerfile` exists, Railway uses it automatically. Verify:
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
Settings → Source → Builder: Dockerfile
|
|
74
|
+
Settings → Source → Dockerfile Path: apps/backend/Dockerfile
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
#### Nixpacks (auto-detect)
|
|
78
|
+
|
|
79
|
+
If no Dockerfile, Railway auto-detects via Nixpacks. For Node:
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
Settings → Source → Builder: Nixpacks
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Set the start command if non-standard:
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
Settings → Deploy → Start Command: pnpm start
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Step 5/8: Set environment variables
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
# Read from .env.example for the keys
|
|
95
|
+
KEYS=$(grep -E '^[A-Z_]+=' "$BACKEND_PATH/.env.example" | cut -d= -f1)
|
|
96
|
+
for KEY in $KEYS; do
|
|
97
|
+
echo "Set $KEY:"
|
|
98
|
+
echo " railway variables --set $KEY=<value> --service <service-name>"
|
|
99
|
+
done
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Set each via CLI or Railway dashboard. Railway auto-injects `PORT` — your service must bind to `process.env.PORT`.
|
|
103
|
+
|
|
104
|
+
For Supabase integration, set:
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
railway variables --set SUPABASE_URL=https://...
|
|
108
|
+
railway variables --set SUPABASE_SERVICE_ROLE_KEY=...
|
|
109
|
+
railway variables --set DATABASE_URL=postgresql://... # use Supabase pooler URL for Railway
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### Step 6/8: Add a health endpoint (if missing)
|
|
113
|
+
|
|
114
|
+
If your service doesn't have a `/health` endpoint, add one:
|
|
115
|
+
|
|
116
|
+
```typescript
|
|
117
|
+
// NestJS example
|
|
118
|
+
@Get('/health')
|
|
119
|
+
health() { return { status: 'ok', uptime: process.uptime() }; }
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Configure Railway to use it:
|
|
123
|
+
|
|
124
|
+
```
|
|
125
|
+
Settings → Deploy → Healthcheck Path: /health
|
|
126
|
+
Settings → Deploy → Healthcheck Timeout: 30s
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Without a health endpoint, Railway considers any 2xx on `/` as healthy — fragile.
|
|
130
|
+
|
|
131
|
+
### Step 7/8: Custom domain (optional)
|
|
132
|
+
|
|
133
|
+
If you have a domain:
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
railway domain
|
|
137
|
+
# Pick: Custom domain → enter domain
|
|
138
|
+
# Update DNS: CNAME <your-domain> → <railway-domain>
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### Step 8/8: Persist + verify
|
|
142
|
+
|
|
143
|
+
```json
|
|
144
|
+
{
|
|
145
|
+
"surfaces": {
|
|
146
|
+
"railway-backend": {
|
|
147
|
+
"configured_at": "<now>",
|
|
148
|
+
"platform": "railway",
|
|
149
|
+
"app_path": "apps/backend",
|
|
150
|
+
"project_id": "<from .railway/config.json>",
|
|
151
|
+
"service_id": "<from railway service --json>",
|
|
152
|
+
"environment_id": "<usually 'production'>",
|
|
153
|
+
"auto_deploy": true,
|
|
154
|
+
"production_branch": "main",
|
|
155
|
+
"url": "https://your-app.railway.app"
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
Verify:
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
PROJECT_ID=$(jq -r '.surfaces."railway-backend".project_id' .codebyplan/shipment.json)
|
|
165
|
+
railway status --json | jq
|
|
166
|
+
# Expect: project + service info matching saved IDs
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
Test deploy:
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
railway up --detach
|
|
173
|
+
# Wait, then verify URL responds
|
|
174
|
+
URL=$(jq -r '.surfaces."railway-backend".url' .codebyplan/shipment.json)
|
|
175
|
+
curl -sI "$URL/health" | head -1
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
## Done
|
|
179
|
+
|
|
180
|
+
Surface is ready. `/cbp-ship` will deploy the backend at checkpoint end.
|
|
181
|
+
|
|
182
|
+
## Common setup issues
|
|
183
|
+
|
|
184
|
+
| Symptom | Fix |
|
|
185
|
+
|---|---|
|
|
186
|
+
| Build fails "no such file or directory: apps/backend/Dockerfile" | Set `Dockerfile Path` correctly in Railway settings; or move Dockerfile |
|
|
187
|
+
| Service starts but health check fails | Healthcheck path wrong, or service is binding to hardcoded port instead of `$PORT` |
|
|
188
|
+
| GH webhook doesn't fire on push | Disconnect+reconnect Source in Railway dashboard |
|
|
189
|
+
| `railway variables` says "no service" | Pass `--service <name>`, or `cd` into the linked dir |
|
|
190
|
+
| Deploy succeeds, app crashes immediately | Most common: missing env var; check `railway logs` |
|
|
191
|
+
|
|
192
|
+
## Switching from another platform
|
|
193
|
+
|
|
194
|
+
If migrating from Vercel functions / Render / Fly:
|
|
195
|
+
|
|
196
|
+
1. Configure Railway as above
|
|
197
|
+
2. Update DNS to point at Railway domain
|
|
198
|
+
3. Add the old platform's URL to a redirect path during transition
|
|
199
|
+
4. Once Railway is verified healthy, decommission the old platform
|