codymaster 4.1.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 (193) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/README.md +285 -0
  3. package/adapters/antigravity.js +15 -0
  4. package/adapters/claude-code.js +17 -0
  5. package/adapters/cursor.js +16 -0
  6. package/commands/bootstrap.md +49 -0
  7. package/commands/build.md +48 -0
  8. package/commands/content.md +48 -0
  9. package/commands/continuity.md +60 -0
  10. package/commands/debug.md +51 -0
  11. package/commands/demo.md +96 -0
  12. package/commands/deploy.md +51 -0
  13. package/commands/plan.md +42 -0
  14. package/commands/review.md +55 -0
  15. package/commands/track.md +46 -0
  16. package/commands/ux.md +46 -0
  17. package/dist/agent-dispatch.js +161 -0
  18. package/dist/chains/builtin.js +85 -0
  19. package/dist/continuity.js +385 -0
  20. package/dist/dashboard.js +926 -0
  21. package/dist/data.js +122 -0
  22. package/dist/index.js +2434 -0
  23. package/dist/judge.js +252 -0
  24. package/dist/parallel-dispatch.js +359 -0
  25. package/dist/parallel-quality.js +172 -0
  26. package/dist/skill-chain.js +258 -0
  27. package/install.sh +513 -0
  28. package/package.json +79 -0
  29. package/skills/.content-factory-state.json +132 -0
  30. package/skills/.git 2/logs/refs/heads/main +1 -0
  31. package/skills/.git 2/logs/refs/remotes/origin/main +1 -0
  32. package/skills/.git 2/objects/02/fb0956734b5f8ba3f918b7defd04a89cfe0076 +0 -0
  33. package/skills/.git 2/objects/08/1e129d75dc6feac6c02037272e6bd1a04e3324 +0 -0
  34. package/skills/.git 2/objects/0c/5393416f3c5e01c9a655a802bff0dd52f76f0a +0 -0
  35. package/skills/.git 2/objects/10/0b9be46978a946a77188f68be725098a122001 +0 -0
  36. package/skills/.git 2/objects/10/cf041167fc9843610eb3d90259ef3396315fdc +0 -0
  37. package/skills/.git 2/objects/12/5e19538dd6e1338ffe74f6c4c165b00435bf48 +0 -0
  38. package/skills/.git 2/objects/16/a9b9d0088d5c1347628b45a2620b479d8ad57c +0 -0
  39. package/skills/.git 2/objects/17/8c2a9ef93c33ae4eec9d58e82321f9229843a1 +0 -0
  40. package/skills/.git 2/objects/25/397ae41d09104d763bdcac2695209d85cdea89 +0 -0
  41. package/skills/.git 2/objects/2f/a836b7947f2d458e1f639788bf4bb0983a3305 +0 -0
  42. package/skills/.git 2/objects/3a/baaaf0a1c0909c0828335791557125fba911e0 +0 -0
  43. package/skills/.git 2/objects/42/2924221b81f5ce3c4e4daac9a64a24f9b01f9a +0 -0
  44. package/skills/.git 2/objects/42/ec0ce707447dc11446a34c9995fb8533801731 +0 -0
  45. package/skills/.git 2/objects/46/e43ce92866d56ce74b1d750db307cfe6154a15 +0 -0
  46. package/skills/.git 2/objects/48/5e41b633c63f55b8277bcc59f44f67681f671a +0 -0
  47. package/skills/.git 2/objects/49/49c596a3a89fa240642acd95dd3258e261eb09 +0 -0
  48. package/skills/.git 2/objects/50/9d42d8412ef8eaf7f7e138476bac2e4d10ce60 +0 -0
  49. package/skills/.git 2/objects/55/0c8c389d981b463ef849aeb792d8be3ccb6ec8 +0 -0
  50. package/skills/.git 2/objects/5d/82d3b18410cdda3ace3677436f0cb599dbe2d2 +0 -0
  51. package/skills/.git 2/objects/60/0617c58e871a38b33bf29e282d132bb3c381ad +0 -0
  52. package/skills/.git 2/objects/6a/8369a99c687b7245c92ffaf0e0f0dab9014504 +0 -0
  53. package/skills/.git 2/objects/79/bea435d40ab531c1aaf6be0432c6a5b7aaed21 +0 -0
  54. package/skills/.git 2/objects/7e/5ebd79251c2f14e4aceb86c74b6b6daae6b500 +0 -0
  55. package/skills/.git 2/objects/81/98a822a60178d6d5023ddb3e222cddf048742e +0 -0
  56. package/skills/.git 2/objects/86/0a0e1943dfe53411d2e499a1f16f46a96ef758 +0 -0
  57. package/skills/.git 2/objects/86/971fb55fdc081fdbae52376f0f13e57a4e9b04 +0 -0
  58. package/skills/.git 2/objects/88/b89dd609a0a03f8d4fe8bfde20d5b8fc1d326d +0 -0
  59. package/skills/.git 2/objects/90/8737edb6b7809e32cc01590b4e08ba42a9d40d +0 -0
  60. package/skills/.git 2/objects/93/d5a8a9a7d4fb7f11491cb596a6880528725118 +0 -0
  61. package/skills/.git 2/objects/98/46a2ab81d0c3b3eb00ef88fc56989aa7e9f316 +0 -0
  62. package/skills/.git 2/objects/9b/d8dd1e49cf274eaf9c555f3ab39dce7af5715e +0 -0
  63. package/skills/.git 2/objects/a1/13329fb0cec96ae78b222d33a24c3b5bc7fa1f +0 -0
  64. package/skills/.git 2/objects/a9/e6effe626e8a3aea3a8fc3364b492191c6e7d0 +0 -0
  65. package/skills/.git 2/objects/ad/6de7e48d9782cca9353d1ff0aa1aab7fe1df85 +0 -0
  66. package/skills/.git 2/objects/af/54ae316f771ff692e299ffcd8bf2f06b413b59 +0 -0
  67. package/skills/.git 2/objects/b0/4cb8b0b00dad633e731c1472161419e738d674 +0 -0
  68. package/skills/.git 2/objects/b3/094abb0b9ed46419b269e4a4e36a459690e3b0 +0 -0
  69. package/skills/.git 2/objects/b9/435c5d4baac2cfc5c83009ddd27b46b60db5f1 +0 -0
  70. package/skills/.git 2/objects/ba/5da17dbaec5ec2dcfdfd126aead518d1171d5c +0 -0
  71. package/skills/.git 2/objects/c0/bf58703aa258ba5dd63083bebaec8f223d844c +0 -0
  72. package/skills/.git 2/objects/c4/701a34edf1fc1bad58ccc57bd03f9426acb59a +0 -0
  73. package/skills/.git 2/objects/c7/5ccce9a4e5cc74d9b3174550cf6d993ca43638 +0 -0
  74. package/skills/.git 2/objects/c7/710d59b5a35b0f1f0a0399386643a0bd94c929 +0 -0
  75. package/skills/.git 2/objects/d1/fe58237112e953e5fec52da22cf38e08be3df9 +5 -0
  76. package/skills/.git 2/objects/d2/2bbe9fd2f74c95bc5583e803f5e435f1e2cd86 +0 -0
  77. package/skills/.git 2/objects/d7/e72852ea2bff74581dbf247d400120086229f4 +0 -0
  78. package/skills/.git 2/objects/d8/d4c3b5553e4fd72807e1d4b49ef07d9ef3ac35 +0 -0
  79. package/skills/.git 2/objects/dc/75050c2876f6a02ae2a53a3c886f395b622977 +0 -0
  80. package/skills/.git 2/objects/ee/e8546f95acec500187c08a28a8b9ee02db0dec +0 -0
  81. package/skills/.git 2/objects/ef/263c059208b416c2146434f10cb2b9fabcba16 +0 -0
  82. package/skills/.git 2/objects/f3/ae597e84d9a59b88acd21c99bde2eaf686d785 +0 -0
  83. package/skills/.git 2/objects/f3/f6f5673c821d3d8e76fa267a9e882e7a5387ea +0 -0
  84. package/skills/.git 2/objects/f9/6e6d0ad02624dd11d5848594d056caef7a5e8b +0 -0
  85. package/skills/.git 2/objects/ff/278988fc1edf0db3abcf18de795f4cc0b4f3e1 +0 -0
  86. package/skills/.git 2/refs/heads/main +1 -0
  87. package/skills/.git 2/refs/remotes/origin/main +1 -0
  88. package/skills/.pytest_cache 2/v/cache/nodeids +76 -0
  89. package/skills/.pytest_cache 2/v/cache/stepwise +1 -0
  90. package/skills/_shared/helpers.md +123 -0
  91. package/skills/_shared/outputs-convention.md +24 -0
  92. package/skills/cm-ads-tracker/SKILL.md +109 -0
  93. package/skills/cm-ads-tracker/evals/evals.json +55 -0
  94. package/skills/cm-ads-tracker/references/gtm-architecture.md +321 -0
  95. package/skills/cm-ads-tracker/references/industry-events.md +294 -0
  96. package/skills/cm-ads-tracker/references/platforms-api.md +238 -0
  97. package/skills/cm-ads-tracker/templates/capi-payload.md +79 -0
  98. package/skills/cm-ads-tracker/templates/datalayer-push.js +104 -0
  99. package/skills/cm-ads-tracker/templates/gtm-variables.js +56 -0
  100. package/skills/cm-brainstorm-idea/SKILL.md +423 -0
  101. package/skills/cm-code-review/SKILL.md +151 -0
  102. package/skills/cm-content-factory/SKILL.md +416 -0
  103. package/skills/cm-continuity/SKILL.md +399 -0
  104. package/skills/cm-dashboard/SKILL.md +533 -0
  105. package/skills/cm-dashboard/ui/app.js +1270 -0
  106. package/skills/cm-dashboard/ui/index.html +206 -0
  107. package/skills/cm-dashboard/ui/style.css +440 -0
  108. package/skills/cm-debugging/SKILL.md +412 -0
  109. package/skills/cm-deep-search/SKILL.md +242 -0
  110. package/skills/cm-design-system/SKILL.md +97 -0
  111. package/skills/cm-design-system/resources/halo-modern.md +40 -0
  112. package/skills/cm-design-system/resources/lunaris-advanced.md +40 -0
  113. package/skills/cm-design-system/resources/nitro-enterprise.md +39 -0
  114. package/skills/cm-design-system/resources/shadcn-default.md +37 -0
  115. package/skills/cm-dockit/README.md +100 -0
  116. package/skills/cm-dockit/SKILL.md +302 -0
  117. package/skills/cm-dockit/index.html +443 -0
  118. package/skills/cm-dockit/package-lock.json +1850 -0
  119. package/skills/cm-dockit/package.json +14 -0
  120. package/skills/cm-dockit/prompts/analysis.md +34 -0
  121. package/skills/cm-dockit/prompts/api-reference.md +24 -0
  122. package/skills/cm-dockit/prompts/architecture.md +21 -0
  123. package/skills/cm-dockit/prompts/data-flow.md +20 -0
  124. package/skills/cm-dockit/prompts/database.md +21 -0
  125. package/skills/cm-dockit/prompts/deployment.md +22 -0
  126. package/skills/cm-dockit/prompts/flows.md +21 -0
  127. package/skills/cm-dockit/prompts/jtbd.md +20 -0
  128. package/skills/cm-dockit/prompts/personas.md +24 -0
  129. package/skills/cm-dockit/prompts/sop-modules.md +40 -0
  130. package/skills/cm-dockit/scripts/doc-gen.sh +121 -0
  131. package/skills/cm-dockit/scripts/dockit-dashboard.sh +142 -0
  132. package/skills/cm-dockit/scripts/dockit-runner.sh +607 -0
  133. package/skills/cm-dockit/scripts/dockit-task.sh +166 -0
  134. package/skills/cm-dockit/skills/analyze-codebase.md +174 -0
  135. package/skills/cm-dockit/skills/api-reference.md +237 -0
  136. package/skills/cm-dockit/skills/changelog-guide.md +195 -0
  137. package/skills/cm-dockit/skills/content-guidelines.md +190 -0
  138. package/skills/cm-dockit/skills/sop-guide.md +184 -0
  139. package/skills/cm-dockit/skills/tech-docs.md +287 -0
  140. package/skills/cm-dockit/templates/markdown/structure.md +60 -0
  141. package/skills/cm-dockit/templates/vitepress-premium/.vitepress/config.mts +110 -0
  142. package/skills/cm-dockit/templates/vitepress-premium/.vitepress/theme/custom.css +189 -0
  143. package/skills/cm-dockit/templates/vitepress-premium/.vitepress/theme/index.ts +4 -0
  144. package/skills/cm-dockit/templates/vitepress-premium/package.json +19 -0
  145. package/skills/cm-dockit/templates/vitepress-premium/tests/frontend.test.ts +45 -0
  146. package/skills/cm-dockit/tests/runner.test.ts +66 -0
  147. package/skills/cm-dockit/workflows/export-markdown.md +82 -0
  148. package/skills/cm-dockit/workflows/generate-docs.md +68 -0
  149. package/skills/cm-dockit/workflows/setup-vitepress.md +181 -0
  150. package/skills/cm-example/SKILL.md +26 -0
  151. package/skills/cm-execution/SKILL.md +268 -0
  152. package/skills/cm-git-worktrees/SKILL.md +164 -0
  153. package/skills/cm-how-it-work/SKILL.md +189 -0
  154. package/skills/cm-identity-guard/SKILL.md +412 -0
  155. package/skills/cm-jtbd/SKILL.md +98 -0
  156. package/skills/cm-planning/SKILL.md +130 -0
  157. package/skills/cm-project-bootstrap/SKILL.md +161 -0
  158. package/skills/cm-project-bootstrap/templates/AGENTS.md +42 -0
  159. package/skills/cm-project-bootstrap/templates/frontend-safety.test.js +51 -0
  160. package/skills/cm-project-bootstrap/templates/i18n-sync.test.js +38 -0
  161. package/skills/cm-project-bootstrap/templates/pr-template.md +12 -0
  162. package/skills/cm-project-bootstrap/templates/project-identity.json +29 -0
  163. package/skills/cm-project-bootstrap/templates/vitest.config.js +10 -0
  164. package/skills/cm-quality-gate/SKILL.md +218 -0
  165. package/skills/cm-readit/SKILL.md +289 -0
  166. package/skills/cm-readit/audio-player.md +206 -0
  167. package/skills/cm-readit/examples/blog-reader.js +352 -0
  168. package/skills/cm-readit/examples/voice-cro.js +390 -0
  169. package/skills/cm-readit/tts-engine.md +262 -0
  170. package/skills/cm-readit/ui-patterns.md +362 -0
  171. package/skills/cm-readit/voice-cro.md +223 -0
  172. package/skills/cm-safe-deploy/SKILL.md +120 -0
  173. package/skills/cm-safe-deploy/templates/deploy.sh +89 -0
  174. package/skills/cm-safe-i18n/SKILL.md +473 -0
  175. package/skills/cm-secret-shield/SKILL.md +580 -0
  176. package/skills/cm-skill-chain/SKILL.md +78 -0
  177. package/skills/cm-skill-index/SKILL.md +318 -0
  178. package/skills/cm-skill-mastery/SKILL.md +169 -0
  179. package/skills/cm-start/SKILL.md +65 -0
  180. package/skills/cm-status/SKILL.md +12 -0
  181. package/skills/cm-tdd/SKILL.md +370 -0
  182. package/skills/cm-terminal/SKILL.md +177 -0
  183. package/skills/cm-test-gate/SKILL.md +242 -0
  184. package/skills/cm-ui-preview/SKILL.md +291 -0
  185. package/skills/cm-ux-master/DESIGN_STANDARD_TEMPLATE.md +54 -0
  186. package/skills/cm-ux-master/SKILL.md +114 -0
  187. package/skills/cro-methodology/SKILL.md +98 -0
  188. package/skills/cro-methodology/references/COPYWRITING.md +178 -0
  189. package/skills/cro-methodology/references/OBJECTIONS.md +135 -0
  190. package/skills/cro-methodology/references/PERSUASION.md +158 -0
  191. package/skills/cro-methodology/references/RESEARCH.md +220 -0
  192. package/skills/cro-methodology/references/funnel-analysis.md +365 -0
  193. package/skills/cro-methodology/references/testing-methodology.md +330 -0
@@ -0,0 +1,412 @@
1
+ ---
2
+ name: cm-identity-guard
3
+ description: Verify and lock project identity before ANY git push, Cloudflare deploy, or Supabase operation. Essential when working with multiple GitHub accounts (personal + work), multiple Cloudflare accounts, or multiple Supabase/Neon projects. Prevents wrong-account deploys, cross-project secret leaks, and git history contamination.
4
+ ---
5
+
6
+ # Identity Guard — Multi-Account Safety Protocol
7
+
8
+ ## Overview
9
+
10
+ Working across multiple projects, clients, and platforms means one wrong `git push` or `wrangler deploy` can publish work to the wrong account. This skill establishes a mandatory identity check before any operation that touches external services.
11
+
12
+ > [!CAUTION]
13
+ > **Real incidents this skill prevents:**
14
+ > - Pushed client code to personal GitHub repo
15
+ > - Deployed to wrong Cloudflare account (different org's Pages project, billing confusion)
16
+ > - Used personal Supabase `ANON_KEY` in a client project (wrong DB entirely)
17
+ > - `git config user.email` was personal email → commits show wrong author in client repo
18
+
19
+ ## The Iron Law
20
+
21
+ ```
22
+ NEVER push, deploy, or use secrets WITHOUT verifying identity first.
23
+ ASK: Which account? Which project? Which database?
24
+ ONE command verifies all three. Run it. Always.
25
+ ```
26
+
27
+ ## When to Use
28
+
29
+ **ALWAYS** before:
30
+ - `git push` or `git commit` in a project with multiple account contexts
31
+ - `wrangler pages deploy` or any Cloudflare operation
32
+ - Creating or accessing a Supabase/Neon client
33
+ - Setting up a new project from scratch
34
+ - Resuming work after switching between personal and work projects
35
+
36
+ ---
37
+
38
+ ## Account Registry (Your Known Accounts)
39
+
40
+ Maintain this table in your head (or in `.project-identity.json`):
41
+
42
+ ### GitHub Accounts
43
+
44
+ | Account | Purpose | Email | When to Use |
45
+ |---------|---------|-------|-------------|
46
+ | `my-personal` | Personal projects, experiments | personal email | Personal repos, side projects |
47
+ | `my-work-org` | Client work | `dev@workdomain.com` | All client projects |
48
+
49
+ ### Cloudflare Accounts
50
+
51
+ | Account ID | Purpose | Projects |
52
+ |-----------|---------|---------|
53
+ | `abc123def456ghi789jkl012mno345pqr` | Client A / Org | project-1, project-2, app |
54
+ | (personal) | Personal experiments | personal side projects |
55
+
56
+ ### Database Accounts
57
+
58
+ | Service | Account | Purpose |
59
+ |---------|---------|---------|
60
+ | Supabase (Org) | org account | All Client A apps |
61
+ | Supabase (personal) | personal account | Experiments |
62
+ | Neon | per project | If used |
63
+
64
+ ---
65
+
66
+ ## Phase 0: Project Identity File
67
+
68
+ Every project MUST have a `.project-identity.json` in the project root:
69
+
70
+ ```json
71
+ {
72
+ "name": "my-awesome-project",
73
+ "description": "An awesome internal tool",
74
+ "github": {
75
+ "account": "my-work-org",
76
+ "org": "my-work-org",
77
+ "repo": "my_project_repo",
78
+ "remoteUrl": "https://github.com/my-work-org/my_project_repo.git",
79
+ "userEmail": "dev@workdomain.com"
80
+ },
81
+ "cloudflare": {
82
+ "accountId": "abc123def456ghi789jkl012mno345pqr",
83
+ "projectName": "my-frontend-app",
84
+ "stagingUrl": "https://my-app-staging.pages.dev",
85
+ "productionUrl": "https://myapp.workdomain.com",
86
+ "productionBranch": "production"
87
+ },
88
+ "database": {
89
+ "provider": "supabase",
90
+ "projectName": "my-database-project",
91
+ "urlVar": "SUPABASE_URL",
92
+ "anonKeyVar": "SUPABASE_ANON_KEY",
93
+ "serviceKeyVar": "SUPABASE_SERVICE_KEY",
94
+ "secretsStore": "cloudflare-secrets"
95
+ },
96
+ "i18n": {
97
+ "primary": "vi",
98
+ "languages": ["vi", "en", "th", "ph"],
99
+ "dir": "public/static/i18n"
100
+ }
101
+ }
102
+ ```
103
+
104
+ > [!IMPORTANT]
105
+ > Add `.project-identity.json` to git but NEVER put actual secrets in it — only variable NAMES and account IDs. Secrets live in `.dev.vars` (local) or Cloudflare Secrets (production).
106
+
107
+ ---
108
+
109
+ ## Phase 1: Identity Verification
110
+
111
+ ### The One-Liner Check
112
+
113
+ Run this before any push or deploy:
114
+
115
+ ```bash
116
+ # Full identity check — GitHub + Git user + CF account + DB config
117
+ echo "=== GitHub CLI ===" && gh auth status 2>&1 | grep -E "Logged in|github.com" && \
118
+ echo "=== Git Remote ===" && git remote get-url origin && \
119
+ echo "=== Git User ===" && git config user.name && git config user.email && \
120
+ echo "=== Cloudflare ===" && cat wrangler.jsonc | grep -E "account_id|project|name" | head -5 && \
121
+ echo "=== DB Config ===" && cat .dev.vars 2>/dev/null | grep -E "URL|SUPABASE" | sed 's/=.*/=***/' && \
122
+ echo "=== Expected ===" && cat .project-identity.json 2>/dev/null | python3 -c "import sys,json; d=json.load(sys.stdin); print('GitHub:', d['github']['account'], '| CF:', d['cloudflare']['accountId'][:8]+'...', '| DB:', d['database']['provider'])"
123
+ ```
124
+
125
+ ### What to Verify (Checklist)
126
+
127
+ ```
128
+ ☐ GitHub CLI: logged in as <EXPECTED ACCOUNT>
129
+ ☐ git remote origin: points to <EXPECTED REPO URL>
130
+ ☐ git config user.email: matches <EXPECTED EMAIL>
131
+ ☐ wrangler.jsonc: account_id matches <EXPECTED CF ACCOUNT ID>
132
+ ☐ .dev.vars: SUPABASE_URL points to <EXPECTED SUPABASE PROJECT>
133
+ ```
134
+
135
+ ---
136
+
137
+ ## Phase 2: Fix Wrong Identity
138
+
139
+ ### Wrong GitHub Account
140
+
141
+ ```bash
142
+ # Check current
143
+ gh auth status
144
+
145
+ # Switch to work account
146
+ gh auth logout
147
+ gh auth login
148
+ # → Login with web browser → select my-work-org
149
+
150
+ # Fix git user for THIS repo (not global)
151
+ git config user.name "my-work-org"
152
+ git config user.email "dev@workdomain.com"
153
+
154
+ # Fix remote URL
155
+ git remote set-url origin https://github.com/my-work-org/REPO_NAME.git
156
+ ```
157
+
158
+ ### Wrong Cloudflare Account
159
+
160
+ ```bash
161
+ # Check current CF account
162
+ wrangler whoami
163
+
164
+ # Look for account_id in wrangler.jsonc
165
+ grep account_id wrangler.jsonc
166
+
167
+ # Expected for Your Project: abc123def456ghi789jkl012mno345pqr
168
+ # Fix: update account_id in wrangler.jsonc
169
+ ```
170
+
171
+ ### Wrong Supabase Project
172
+
173
+ ```bash
174
+ # Check which Supabase URL is in .dev.vars
175
+ grep SUPABASE_URL .dev.vars
176
+
177
+ # The URL pattern reveals the project: https://<PROJECT_ID>.supabase.co
178
+ # Compare with the project in .project-identity.json
179
+
180
+ # Fix: update .dev.vars with correct values
181
+ # Then restart wrangler dev
182
+ ```
183
+
184
+ ### Wrong git author on recent commits
185
+
186
+ ```bash
187
+ # See who authored the last few commits
188
+ git log --format="%h %an <%ae>" -5
189
+
190
+ # If wrong — amend last commit's author (before push only!)
191
+ git commit --amend --author="my-work-org <dev@workdomain.com>" --no-edit
192
+
193
+ # For multiple commits: rebase and re-author
194
+ git rebase -i HEAD~N # Then for each commit: edit → amend author → continue
195
+ ```
196
+
197
+ ---
198
+
199
+ ## Phase 3: Project Setup (New Projects)
200
+
201
+ When starting a new project, answer these questions FIRST:
202
+
203
+ ```markdown
204
+ Before writing any code or creating any repo, I need to lock identity:
205
+
206
+ 1. **GitHub account**: Personal (my-personal) or Work (my-work-org)?
207
+ 2. **Cloudflare account**: Which account ID?
208
+ 3. **Database**: Which Supabase org? New project or existing?
209
+ 4. **Languages**: Single locale or multi-language from day 1?
210
+ → If multi-language: list all target languages now
211
+ ```
212
+
213
+ Then create `.project-identity.json` BEFORE the first commit:
214
+
215
+ ```bash
216
+ # Lock git identity to this project immediately
217
+ git config user.name "my-work-org"
218
+ git config user.email "dev@workdomain.com"
219
+ git remote set-url origin https://github.com/my-work-org/NEW_REPO.git
220
+
221
+ # Verify before first push
222
+ git config user.email # Must match expected
223
+ git remote get-url origin # Must match expected
224
+ gh auth status # Must show correct account
225
+ ```
226
+
227
+ #### Record Identity Decision (cm-continuity)
228
+
229
+ After locking identity for a new project, write to `.cm/memory/decisions.json`:
230
+ - `decision`: "GitHub identity locked to [account], CF account [id], DB: [provider/project]"
231
+ - `rationale`: "Multi-account safety — prevents wrong-account deploys"
232
+ - `scope`: `global`
233
+ - `status`: `active`
234
+
235
+ Also update `.cm/CONTINUITY.md` Working Context with the locked identity.
236
+
237
+ ---
238
+
239
+ ## Phase 4: Multi-Account Git Setup (OS Level)
240
+
241
+ ### Using SSH Keys per Account
242
+
243
+ ```bash
244
+ # Generate separate keys for each account
245
+ ssh-keygen -t ed25519 -C "dev@workdomain.com" -f ~/.ssh/id_my_work_org
246
+ ssh-keygen -t ed25519 -C "personal@..." -f ~/.ssh/id_personal
247
+
248
+ # ~/.ssh/config — route by host alias
249
+ Host github-work
250
+ HostName github.com
251
+ User git
252
+ IdentityFile ~/.ssh/id_my_work_org
253
+
254
+ Host github-personal
255
+ HostName github.com
256
+ User git
257
+ IdentityFile ~/.ssh/id_personal
258
+ ```
259
+
260
+ ### Using SSH, reference by alias in project:
261
+
262
+ ```bash
263
+ # For work projects:
264
+ git remote set-url origin git@github-work:my-work-org/REPO.git
265
+
266
+ # For personal projects:
267
+ git remote set-url origin git@github-personal:my-personal/REPO.git
268
+ ```
269
+
270
+ ### Global vs Local git config
271
+
272
+ ```bash
273
+ # Global: personal (default for new repos)
274
+ git config --global user.name "my-personal"
275
+ git config --global user.email "personal@email.com"
276
+
277
+ # Per-repo override for work projects (run inside each work repo):
278
+ git config user.name "my-work-org"
279
+ git config user.email "dev@workdomain.com"
280
+ ```
281
+
282
+ > [!TIP]
283
+ > Use `includeIf` in `~/.gitconfig` to auto-apply work identity for repos in specific directories:
284
+ > ```ini
285
+ > [includeIf "gitdir:~/Builder/ClientA/"]
286
+ > path = ~/.gitconfig-work
287
+ > ```
288
+ > `~/.gitconfig-work`:
289
+ > ```ini
290
+ > [user]
291
+ > name = my-work-org
292
+ > email = dev@workdomain.com
293
+ > ```
294
+
295
+ ---
296
+
297
+ ## Phase 5: Token Lifecycle Management 🔄
298
+
299
+ > **NEW — Secrets don't just need to be hidden. They need to be ROTATED.**
300
+ > **Full rotation playbooks in `cm-secret-shield` Layer 5.**
301
+
302
+ ### Rotation Schedule
303
+
304
+ | Platform | Token Type | Max Lifetime | Where to Rotate |
305
+ |----------|-----------|-------------|----------------|
306
+ | **Supabase** | `anon_key` | 90 days | Dashboard → Settings → API |
307
+ | **Supabase** | `service_role_key` | 30 days | Dashboard → Settings → API |
308
+ | **Cloudflare** | API Token | 90 days | Dashboard → My Profile → API Tokens |
309
+ | **GitHub** | Personal Access Token | 90 days | Settings → Developer Settings → PAT |
310
+ | **OpenAI/Gemini** | API Key | 90 days | Platform dashboard |
311
+
312
+ ### After Rotation
313
+
314
+ ```bash
315
+ # 1. Update Cloudflare Secrets with new values
316
+ wrangler secret put SUPABASE_ANON_KEY
317
+ wrangler secret put SUPABASE_SERVICE_KEY
318
+
319
+ # 2. Update local .dev.vars
320
+ # 3. Redeploy
321
+ npm run deploy:staging
322
+
323
+ # 4. Verify: test staging URL
324
+ ```
325
+
326
+ > For emergency rotation (leaked secret), see `cm-secret-shield` Emergency Rotation Playbook.
327
+
328
+ ---
329
+
330
+ ## Red Flags — Identity Confusion
331
+
332
+ ```
333
+ ❌ git push and see "Repository not found" or "Permission denied"
334
+ → Wrong account. Run identity check.
335
+
336
+ ❌ wrangler deploy succeeded but can't find it in your CF dashboard
337
+ → Deployed to wrong CF account. Check wrangler.jsonc account_id.
338
+
339
+ ❌ Authentication fails with correct password
340
+ → `gh auth status` shows wrong account. Logout and login to correct one.
341
+
342
+ ❌ Production app shows the wrong data / can't connect to DB
343
+ → Wrong SUPABASE_URL or key. Check Cloudflare Secrets for the project.
344
+
345
+ ❌ git log shows wrong author email on commits
346
+ → git config user.email is wrong. Fix and amend before pushing.
347
+
348
+ ❌ New repo was created under wrong GitHub org
349
+ → Delete and recreate under correct org, then update remote URL.
350
+ ```
351
+
352
+ ---
353
+
354
+ ## Recovery Playbook
355
+
356
+ ### "I pushed to the wrong GitHub repo"
357
+
358
+ ```bash
359
+ # 1. Delete the push (if repo is private, remove sensitive data)
360
+ git push origin --delete <branch> # Remove the branch
361
+
362
+ # 2. If sensitive data was exposed: contact GitHub support immediately
363
+ # Also rotate any secrets that appeared in the code
364
+
365
+ # 3. Push to the correct repo:
366
+ git remote set-url origin https://github.com/CORRECT_ORG/CORRECT_REPO.git
367
+ git push origin <branch>
368
+ ```
369
+
370
+ ### "I deployed to the wrong Cloudflare account"
371
+
372
+ ```bash
373
+ # 1. Log into correct CF account
374
+ # 2. Deploy immediately to overwrite:
375
+ CLOUDFLARE_ACCOUNT_ID=<CORRECT_ID> wrangler pages deploy dist --project-name <CORRECT_PROJECT>
376
+
377
+ # 3. Go to WRONG account's CF dashboard and delete the project or rollback deployment
378
+ ```
379
+
380
+ ### "I used wrong Supabase keys in production"
381
+
382
+ ```bash
383
+ # 1. Update Cloudflare Secrets with correct values:
384
+ wrangler secret put SUPABASE_URL # Enter correct URL
385
+ wrangler secret put SUPABASE_SERVICE_KEY # Enter correct key
386
+ wrangler secret put SUPABASE_ANON_KEY # Enter correct key
387
+
388
+ # 2. Redeploy to pick up new secrets
389
+ npm run deploy
390
+
391
+ # 3. Rotate the accidentally exposed keys in Supabase dashboard
392
+ ```
393
+
394
+ ---
395
+
396
+ ## Integration with Other Skills
397
+
398
+ | Skill | When |
399
+ |-------|------|
400
+ | `cm-project-bootstrap` | Identity lock is Phase 0 of every new project |
401
+ | `cm-safe-deploy` | Gate 0 secret hygiene checks wrangler.jsonc |
402
+ | `cm-test-gate` | Phase 4 secret hygiene in test gate setup |
403
+ | `cm-secret-shield` | Layer 5 token lifecycle extends identity management |
404
+ | `cm-continuity` | Record identity decisions to decisions.json |
405
+
406
+ ## The Bottom Line
407
+
408
+ **One `.project-identity.json`. One verification command. Every push, every deploy.**
409
+
410
+ Wrong account = wasted time, broken deployments, exposed client code. The check takes 3 seconds.
411
+
412
+ This is non-negotiable.
@@ -0,0 +1,98 @@
1
+ ---
2
+ name: cm-jtbd
3
+ description: "Customer discovery framework using Jobs-To-Be-Done theory — uncover the functional, social, and emotional jobs customers hire products to do. Produces JTBD canvases with job statements, outcome metrics, and competing solutions. Use alongside cm-brainstorm-idea for evidence-based product decisions."
4
+ ---
5
+
6
+ # Jobs-To-Be-Done — Customer Discovery Framework
7
+
8
+ > **Understand the job, not the customer.**
9
+ > People don't buy products — they hire them to get a job done.
10
+
11
+ ## When to Use
12
+
13
+ - Before designing a new feature or product
14
+ - When existing features aren't converting or being used
15
+ - Alongside `cm-brainstorm-idea` for deep customer context
16
+ - User mentions: "customer discovery", "JTBD", "what do customers want", "product-market fit", "why are users churning"
17
+
18
+ ## The JTBD Framework
19
+
20
+ ### Job Statement Formula
21
+
22
+ ```
23
+ When [SITUATION], I want to [MOTIVATION], so I can [EXPECTED OUTCOME]
24
+ ```
25
+
26
+ ### Three Job Dimensions
27
+
28
+ | Dimension | Definition | Example |
29
+ |-----------|-----------|---------|
30
+ | **Functional** | The core task to accomplish | "Get from A to B quickly" |
31
+ | **Social** | How the person wants to be perceived | "Be seen as a reliable professional" |
32
+ | **Emotional** | How the person wants to feel | "Feel confident in my decision" |
33
+
34
+ ## Process
35
+
36
+ ### Phase 1: Job Discovery (Interviews)
37
+
38
+ 1. Recruit 5-8 recent customers (ideally within 90 days of purchase)
39
+ 2. Use the Switch Interview technique — ask about the moment they decided to switch/buy
40
+ 3. Key questions:
41
+ - "Walk me through the day you decided to [buy/switch/start using X]"
42
+ - "What were you doing before that solution existed?"
43
+ - "What was the first thing you tried? Why didn't that work?"
44
+ - "What almost stopped you from switching?"
45
+ 4. Record patterns: triggers → anxiety → progress → outcomes
46
+
47
+ ### Phase 2: JTBD Canvas
48
+
49
+ For each major job discovered, complete the canvas:
50
+
51
+ ```
52
+ JOB STATEMENT:
53
+ When [situation], I want to [motivation], so I can [outcome]
54
+
55
+ FUNCTIONAL DIMENSION: [core task]
56
+ SOCIAL DIMENSION: [perception goal]
57
+ EMOTIONAL DIMENSION: [feeling goal]
58
+
59
+ FORCES PUSHING TO HIRE:
60
+ (+) Push: [what makes them switch from current solution]
61
+ (+) Pull: [what attracts them to new solution]
62
+
63
+ FORCES RESISTING HIRE:
64
+ (-) Anxiety: [fears about new solution]
65
+ (-) Habit: [attachment to old solution]
66
+
67
+ COMPETING SOLUTIONS CURRENTLY HIRED:
68
+ 1. [direct competitor or workaround]
69
+ 2. [indirect solution]
70
+ 3. [do-nothing option]
71
+
72
+ OUTCOME METRICS (how customer measures success):
73
+ - Speed: [e.g., "get answer in <5 minutes"]
74
+ - Accuracy: [e.g., "zero errors in the output"]
75
+ - Effort: [e.g., "no manual steps required"]
76
+ ```
77
+
78
+ ### Phase 3: Opportunity Scoring
79
+
80
+ Rate each outcome metric:
81
+ - **Importance** (1-10): How important is this outcome to the customer?
82
+ - **Satisfaction** (1-10): How satisfied are they with current solutions?
83
+ - **Opportunity score** = Importance + max(Importance − Satisfaction, 0)
84
+
85
+ Scores ≥ 15 = underserved outcomes → highest priority to address.
86
+
87
+ ## Output
88
+
89
+ Save JTBD canvas to `docs/jtbd/jtbd-canvas-[date].md`.
90
+
91
+ ## Integration
92
+
93
+ | Skill | Relationship |
94
+ |-------|-------------|
95
+ | `cm-brainstorm-idea` | UPSTREAM: JTBD feeds into strategic analysis |
96
+ | `cm-planning` | DOWNSTREAM: Validated jobs inform feature plans |
97
+ | `cro-methodology` | COMPLEMENT: JTBD objections → CRO objection handling |
98
+ | `cm-dockit` | OUTPUT: JTBD canvases are a document type in DocKit |
@@ -0,0 +1,130 @@
1
+ ---
2
+ name: cm-planning
3
+ description: "You MUST use this before any creative work or multi-step task. Explores intent, requirements, and design before implementation. Then documents the plan before coding."
4
+ ---
5
+
6
+ # Planning — Brainstorm + Write Plans
7
+
8
+ > **Role: Product Manager** — You explore intent, define scope, and document implementation plans before any code is written.
9
+
10
+ > **Two phases, one skill:** Explore WHAT to build, then document HOW.
11
+
12
+ ## When to Use
13
+
14
+ **ALWAYS before:**
15
+ - Creating features, components, or functionality
16
+ - Modifying behavior
17
+ - Multi-step tasks
18
+ - Any work that changes user-facing behavior
19
+
20
+ ## Phase A: Brainstorm (Explore Intent)
21
+
22
+ ### The Process
23
+
24
+ 1. **Understand Intent** — What does the user ACTUALLY want?
25
+ - Ask clarifying questions
26
+ - Don't assume scope
27
+ - Identify hidden requirements
28
+
29
+ 2. **Explore Options** — What are the approaches?
30
+ - List 2-3 possible approaches
31
+ - Pros/cons of each
32
+ - Recommend one with reasoning
33
+
34
+ 3. **Define Scope** — What's in and what's out?
35
+ - Must-haves vs nice-to-haves
36
+ - Edge cases to handle
37
+ - Edge cases to explicitly NOT handle
38
+
39
+ 4. **Skill Coverage Audit** — Do I have the right skills?
40
+ - List all technologies/frameworks/tools referenced in the scope
41
+ - Cross-reference with `cm-skill-index` Layer 1 triggers
42
+ - If gap found → trigger Discovery Loop (`cm-skill-mastery` Part C):
43
+ `npx skills find "{keyword}"` → review → ask user → install
44
+ - Note any gaps in plan as: "⚠️ No skill coverage — will trigger discovery during execution"
45
+
46
+ 5. **Design** — How should it work?
47
+ - Data flow
48
+ - Component boundaries
49
+ - API contracts (if applicable)
50
+ - **If building UI:** Use `cm-ui-preview` to preview on Google Stitch before coding
51
+
52
+ ### Red Flags — STOP
53
+
54
+ - Starting code before brainstorming
55
+ - Assuming you know what the user wants
56
+ - Skipping scope definition
57
+ - "It's simple, no need to plan"
58
+
59
+ ## Phase B: Write Implementation Plan
60
+
61
+ ### When to Write a Plan
62
+
63
+ - Task has 3+ steps
64
+ - Multiple files involved
65
+ - Changes affect other components
66
+ - User explicitly asks for a plan
67
+
68
+ ### Plan Structure
69
+
70
+ ```markdown
71
+ # [Goal]
72
+
73
+ ## Context
74
+ What and why.
75
+
76
+ ## Requirements (for L2+ projects)
77
+ | ID | Type | Description | Story | Test |
78
+ |----|------|-------------|-------|------|
79
+ | FR-001 | Functional | [requirement] | S-001 | T-001 |
80
+ | NFR-001 | Non-Functional | [requirement] | Arch | Perf-001 |
81
+
82
+ ## Proposed Changes
83
+
84
+ ### [Component/File]
85
+ - What changes
86
+ - Why this approach
87
+
88
+ ## Verification
89
+ How to verify it works.
90
+ ```
91
+
92
+ > **Requirement Tracing (L2+ projects):** For medium and large projects, include FR/NFR IDs that trace from requirements → stories → tests. See `_shared/helpers.md#Project-Level-Detection` for level definitions.
93
+
94
+ ### Plan Rules
95
+
96
+ ```
97
+ ✅ DO:
98
+ - Break into small, testable steps
99
+ - Order by dependency (foundations first)
100
+ - Include verification for each step
101
+ - Keep steps bite-sized (15-30 min each)
102
+ - Include FR/NFR table for L2+ projects
103
+
104
+ ❌ DON'T:
105
+ - Write vague steps ("refactor the code")
106
+ - Skip verification steps
107
+ - Plan more than needed
108
+ - Over-engineer the plan itself
109
+ ```
110
+
111
+ ### Step FINAL: Update Working Memory
112
+
113
+ Per `_shared/helpers.md#Update-Continuity`
114
+ Per `_shared/helpers.md#Save-Decision` — for any architecture decisions made during planning
115
+
116
+ ---
117
+
118
+ ## Integration
119
+
120
+ | After planning... | Use skill |
121
+ |-------------------|-----------|
122
+ | Complex initiative/enhancement? | `cm-brainstorm-idea` (run BEFORE planning) |
123
+ | Need isolated workspace | `cm-git-worktrees` |
124
+ | Execute the plan (same session) | `cm-execution` |
125
+ | Write tests first | `cm-tdd` |
126
+ | Building UI/frontend | `cm-ui-preview` |
127
+
128
+ ## The Bottom Line
129
+
130
+ **Think before you build. Document before you code. No exceptions.**