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,423 @@
1
+ ---
2
+ name: cm-brainstorm-idea
3
+ description: "Strategic analysis gate for existing products — multi-dimensional evaluation (tech, product, design, business) using Design Thinking + 9 Windows (TRIZ) + Double Diamond. Outputs 2-3 qualified options with recommendations. Use BEFORE cm-planning for complex initiatives and enhancements on existing codebases."
4
+ ---
5
+
6
+ # Brainstorm Idea — Strategic Analysis Gate
7
+
8
+ > **Role: Strategic Analyst** — You evaluate problems from tech, product, design, and business dimensions.
9
+
10
+ > **Understand deeply. Evaluate multi-dimensionally. Propose qualified options. Then — and only then — plan.**
11
+ > This skill is the BRIDGE between an existing product and its next evolution.
12
+
13
+ ## When to Use
14
+
15
+ **ALWAYS when:**
16
+ - User requests complex changes to an existing product
17
+ - Initiatives or enhancements that touch multiple system areas
18
+ - User jumps straight into hard/complex tasks without analysis
19
+ - Post `cm-project-bootstrap` — product exists, needs improvement
20
+ - Feature requests that could be solved in fundamentally different ways
21
+ - "What should we do next?" / "What to improve?" / "Enhancement" / "Initiative"
22
+
23
+ **Skip when:**
24
+ - Simple bug fixes (use `cm-debugging`)
25
+ - New project from scratch (use `cm-project-bootstrap`)
26
+ - Task is already clearly defined and scoped (go to `cm-planning`)
27
+ - Quick one-off changes (< 30 min work)
28
+
29
+ ## Gate Function
30
+
31
+ ```
32
+ User requests complex task
33
+ → Is the problem clearly understood and qualified?
34
+ → NO → Run cm-brainstorm-idea FIRST
35
+ → YES → Go to cm-planning directly
36
+ ```
37
+
38
+ When downstream skills detect an unqualified complex request, they should REDIRECT here:
39
+ ```
40
+ cm-planning detects ambiguity → "Problem not clear. Run cm-brainstorm-idea first."
41
+ cm-execution gets vague plan → "Plan lacks context. Go back to cm-brainstorm-idea."
42
+ ```
43
+
44
+ ---
45
+
46
+ ## The Process
47
+
48
+ ```
49
+ Phase 1: DISCOVER (Diamond 1 — Diverge) → Scan wide, understand current state
50
+ Phase 2: DEFINE (Diamond 1 — Converge) → Qualify the REAL problem
51
+ Phase 3: DEVELOP (Diamond 2 — Diverge) → Generate 2-3 solution options
52
+ Phase 4: EVALUATE (Diamond 2 — Converge) → Score, compare, recommend
53
+ Phase 4.5: UI PREVIEW (Visual Validation) → See it before you build it
54
+ Phase 5: HANDOFF (Bridge to cm-planning) → Package for downstream skills
55
+ ```
56
+
57
+ ### Phase 1: DISCOVER — Scan & Empathize
58
+
59
+ > **Goal:** Understand the current state of the product from all angles.
60
+
61
+ #### 1a-pre. Load Working Memory
62
+
63
+ Per `_shared/helpers.md#Load-Working-Memory`
64
+
65
+ #### 1a. Codebase Scan
66
+
67
+ Read and map the existing system:
68
+
69
+ ```
70
+ ✅ DO:
71
+ - Read AGENTS.md for project overview
72
+ - Scan project structure (list_dir)
73
+ - Read key config files (package.json, wrangler.toml, etc.)
74
+ - Identify tech stack, patterns, dependencies
75
+ - Check test coverage and existing quality
76
+
77
+ 📋 OUTPUT: Codebase Summary
78
+ - Tech stack: [...]
79
+ - Architecture pattern: [...]
80
+ - Key dependencies: [...]
81
+ - Test coverage: [high/medium/low/none]
82
+ - Code health signals: [...]
83
+ - Corpus size: [total source files] src / [total doc files] docs
84
+
85
+ 🔍 SIZE CHECK (auto — triggers cm-deep-search):
86
+ IF docs/ > 50 files OR source > 200 files:
87
+ → Suggest: "This project is quite large. See cm-deep-search to setup semantic search with qmd."
88
+ → Non-blocking: continue Phase 1 regardless of user response
89
+ ```
90
+
91
+ #### 1b. User Context Interview
92
+
93
+ Ask targeted questions to understand intent:
94
+
95
+ ```
96
+ 📋 DISCOVERY QUESTIONS:
97
+ 1. Who does the current product serve? (Target users?)
98
+ 2. What is the biggest pain point right now? (Biggest pain point?)
99
+ 3. What is the next business goal? (Next business goal?)
100
+ 4. Are there any tech/budget/timeline constraints? (Constraints?)
101
+ 5. What solutions have already been tried? (What's been tried?)
102
+ ```
103
+
104
+ #### 1c. Multi-Dimensional Current State
105
+
106
+ | Dimension | What to Assess | Sources |
107
+ |-----------|---------------|---------|
108
+ | **Tech** | Code quality, scalability, tech debt, performance | Codebase scan, test results |
109
+ | **Product** | Feature completeness, user satisfaction, funnel gaps | User interview, analytics |
110
+ | **Design** | UX quality, accessibility, mobile readiness, design system | UI review, `cm-ux-master` |
111
+ | **Business** | Revenue impact, market position, competitive landscape | User interview, research |
112
+
113
+ ---
114
+
115
+ ### Phase 2: DEFINE — Qualify the Problem
116
+
117
+ > **Goal:** Use 9 Windows to see the problem from all time × system perspectives, then converge on the REAL problem.
118
+
119
+ #### 9 Windows Analysis (TRIZ)
120
+
121
+ Map the situation across time and system levels:
122
+
123
+ ```
124
+ ┌─────────────────┬──────────────────┬──────────────────┬──────────────────┐
125
+ │ │ PAST │ PRESENT │ FUTURE │
126
+ ├─────────────────┼──────────────────┼──────────────────┼──────────────────┤
127
+ │ SUPER-SYSTEM │ Market/industry │ Current market │ Where market │
128
+ │ (ecosystem) │ was like this... │ looks like... │ is heading... │
129
+ ├─────────────────┼──────────────────┼──────────────────┼──────────────────┤
130
+ │ SYSTEM │ Product used to │ Product now │ Product should │
131
+ │ (the product) │ be like this... │ does this... │ become this... │
132
+ ├─────────────────┼──────────────────┼──────────────────┼──────────────────┤
133
+ │ SUB-SYSTEM │ Components were │ Components now │ Components need │
134
+ │ (components) │ built this way...│ work this way... │ to evolve to... │
135
+ └─────────────────┴──────────────────┴──────────────────┴──────────────────┘
136
+ ```
137
+
138
+ **Fill all 9 windows** based on Phase 1 findings. This reveals:
139
+ - Evolution patterns (Past → Present trends)
140
+ - System-level tensions (Super-system demands vs Sub-system capabilities)
141
+ - Future opportunities (where convergence creates value)
142
+
143
+ #### Problem Qualification Statement
144
+
145
+ After 9 Windows analysis, write a qualified problem statement:
146
+
147
+ ```markdown
148
+ ## Qualified Problem
149
+
150
+ **For:** [user/customer segment]
151
+ **Who:** [current pain/need]
152
+ **The:** [product/feature] is a [category]
153
+ **That:** [key benefit/change needed]
154
+ **Unlike:** [current state / alternative]
155
+ **Our approach:** [high-level direction]
156
+
157
+ ### Root Cause(s):
158
+ 1. [Technical root cause]
159
+ 2. [Product root cause]
160
+ 3. [Design root cause]
161
+
162
+ ### Impact if NOT addressed:
163
+ - [Business impact]
164
+ - [User impact]
165
+ - [Technical debt impact]
166
+ ```
167
+
168
+ ---
169
+
170
+ ### Phase 3: DEVELOP — Generate Options
171
+
172
+ > **Goal:** Create 2-3 fundamentally different approaches. Not variations of one idea.
173
+
174
+ #### Design Thinking Ideation Rules
175
+
176
+ ```
177
+ ✅ DO:
178
+ - Generate at LEAST 2, at MOST 3 options
179
+ - Each option must be FUNDAMENTALLY different in approach
180
+ - Think from different perspectives: user-first, tech-first, business-first
181
+ - Consider both quick-win and long-term approaches
182
+ - Include rough effort estimation for each
183
+
184
+ ❌ DON'T:
185
+ - Propose only 1 option (no choice = bad analysis)
186
+ - Propose 4+ options (decision paralysis)
187
+ - Make all options "the same idea with different UIs"
188
+ - Skip effort estimation
189
+ - Ignore existing constraints from Phase 1
190
+ ```
191
+
192
+ #### Option Template
193
+
194
+ For each option, document:
195
+
196
+ ```markdown
197
+ ### Option [A/B/C]: [Descriptive Name]
198
+
199
+ **Approach:** [1-2 sentence summary]
200
+ **Philosophy:** [User-first / Tech-first / Business-first / Balanced]
201
+
202
+ **What changes:**
203
+ - [Component 1]: [change description]
204
+ - [Component 2]: [change description]
205
+
206
+ **Effort:** [S/M/L/XL] (~[time estimate])
207
+ **Risk level:** [Low/Medium/High]
208
+
209
+ **Pros:**
210
+ - [Pro 1]
211
+ - [Pro 2]
212
+
213
+ **Cons:**
214
+ - [Con 1]
215
+ - [Con 2]
216
+
217
+ **Best when:** [scenario where this option shines]
218
+ ```
219
+
220
+ ---
221
+
222
+ ### Phase 4: EVALUATE — Score & Recommend
223
+
224
+ > **Goal:** Compare options objectively across 4 dimensions. Make a clear recommendation.
225
+
226
+ #### Multi-Dimensional Scoring Matrix
227
+
228
+ | Dimension | Weight | Option A | Option B | Option C |
229
+ |-----------|--------|----------|----------|----------|
230
+ | **Tech** (feasibility, maintainability, scalability) | 25% | ?/10 | ?/10 | ?/10 |
231
+ | **Product** (user value, feature completeness, PMF) | 30% | ?/10 | ?/10 | ?/10 |
232
+ | **Design** (UX quality, accessibility, polish) | 20% | ?/10 | ?/10 | ?/10 |
233
+ | **Business** (ROI, time-to-market, strategic fit) | 25% | ?/10 | ?/10 | ?/10 |
234
+ | **Weighted Total** | 100% | ?/10 | ?/10 | ?/10 |
235
+
236
+ > Adjust weights based on project context. A consumer app might weight Design higher. A B2B SaaS might weight Business higher.
237
+
238
+ #### Recommendation Format
239
+
240
+ ```markdown
241
+ ## 🎯 Recommendation
242
+
243
+ **Choose Option [X]: [Name]**
244
+
245
+ ### Why Option X:
246
+ 1. [Strongest reason — tied to qualified problem]
247
+ 2. [Second reason — tied to constraint/context]
248
+ 3. [Third reason — tied to future evolution]
249
+
250
+ ### Why NOT the other options:
251
+ - **Option [Y]:** [specific deal-breaker]
252
+ - **Option [Z]:** [specific deal-breaker]
253
+
254
+ ### Quick-win suggestion:
255
+ If you want to see results quickly, you can start with [subset of Option X]
256
+ before implementing the full solution.
257
+ ```
258
+
259
+ ---
260
+
261
+ ### Phase 4.5: UI PREVIEW — See It Before You Build It
262
+
263
+ > **Goal:** After recommending an option, offer the user a visual preview to validate the direction before investing in planning & coding.
264
+
265
+ #### When to Trigger
266
+
267
+ After Phase 4 recommendation is clear, ALWAYS ask:
268
+
269
+ ```markdown
270
+ 🎨 **Want to preview the design?**
271
+
272
+ Option [X] has been recommended. Would you like to create a UI concept before detailed planning?
273
+
274
+ 1. ✅ **Yes** — Quick preview to visualize better
275
+ 2. ⏭️ **No** — Go straight to planning
276
+ ```
277
+
278
+ #### Smart Tool Detection
279
+
280
+ Auto-detect which design tool is available and best suited:
281
+
282
+ ```
283
+ Check available MCP tools:
284
+ → Stitch MCP available? (create_project, generate_screen_from_text)
285
+ → Pencil MCP available? (batch_design, get_editor_state)
286
+
287
+ ┌─────────────────────────────────────────────────────────────┐
288
+ │ TOOL SELECTION MATRIX │
289
+ ├──────────────┬──────────────┬───────────────────────────────┤
290
+ │ Stitch only │ Pencil only │ Both available │
291
+ ├──────────────┼──────────────┼───────────────────────────────┤
292
+ │ Use Stitch │ Use Pencil │ Ask user preference: │
293
+ │ (quick │ (detailed │ - "Quick" → Stitch │
294
+ │ concept) │ control) │ - "Control" → Pencil │
295
+ │ │ │ - Default: Stitch (faster) │
296
+ └──────────────┴──────────────┴───────────────────────────────┘
297
+ ```
298
+
299
+ **Stitch path** (fast concept generation):
300
+ - Best for: Quick visual validation, non-technical stakeholders
301
+ - Auto-creates project, generates screens from the recommended option
302
+ - Uses `cm-ui-preview` Step 3 prompt enhancement pipeline
303
+
304
+ **Pencil path** (developer control):
305
+ - Best for: Devs who want pixel-level control, design system alignment
306
+ - Opens .pen editor, follows design guidelines for component layout
307
+ - Can export to code-ready assets
308
+
309
+ #### Execution Flow
310
+
311
+ ```
312
+ User says "Yes" (Yes to preview):
313
+ 1. Detect available tools (Stitch / Pencil / both)
314
+ 2. If both → ask preference or auto-select based on context
315
+ 3. Delegate to cm-ui-preview with brainstorm context:
316
+ - Pass: qualified problem, recommended option, design constraints
317
+ - cm-ui-preview creates concept screens
318
+ 4. User reviews preview:
319
+ → ✅ Confirm → Proceed to Phase 5 (Handoff) with visual reference
320
+ → ✏️ Edit → Iterate on preview
321
+ → ❌ Change option → Go back to Phase 4, pick different option
322
+
323
+ User says "No" (Skip preview):
324
+ → Proceed directly to Phase 5 (Handoff)
325
+ ```
326
+
327
+ #### Context Passed to cm-ui-preview
328
+
329
+ ```markdown
330
+ ## Brainstorm Context for UI Preview
331
+
332
+ **Initiative:** [Name from Phase 2]
333
+ **Recommended Option:** [Option X summary]
334
+ **Target Users:** [From Phase 1 discovery]
335
+ **Design Constraints:** [From codebase scan — existing design system, tokens, etc.]
336
+ **Key Screens Needed:** [List from recommended option's "What changes"]
337
+ **Device Type:** [DESKTOP / MOBILE — from project context]
338
+ ```
339
+
340
+ ---
341
+
342
+ ### Phase 5: HANDOFF — Package for Downstream
343
+
344
+ > **Goal:** Create a clean handoff document that `cm-planning` can use immediately.
345
+
346
+ #### Handoff Output: `brainstorm-output.md`
347
+
348
+ Save to `docs/brainstorm/` or project root:
349
+
350
+ ```markdown
351
+ # Brainstorm Output: [Initiative Name]
352
+ Generated by: cm-brainstorm-idea
353
+ Date: [date]
354
+
355
+ ## Qualified Problem
356
+ [From Phase 2]
357
+
358
+ ## 9 Windows Analysis
359
+ [Summary table from Phase 2]
360
+
361
+ ## Options Evaluated
362
+ [Summary from Phase 3-4]
363
+
364
+ ## Recommendation
365
+ [From Phase 4]
366
+
367
+ ## Next Steps for cm-planning:
368
+ 1. [Specific scope to plan]
369
+ 2. [Key constraints to respect]
370
+ 3. [Technical decisions already made]
371
+ 4. [Open questions for implementation]
372
+
373
+ ## Context for downstream skills:
374
+ - cm-planning: [what to focus the plan on]
375
+ - cm-tdd: [key areas that need test coverage]
376
+ - cm-ux-master: [design considerations]
377
+ - cm-execution: [suggested execution mode]
378
+ ```
379
+
380
+ #### 5b. Record Decision & Update Memory
381
+
382
+ Per `_shared/helpers.md#Save-Decision` — record the recommended option.
383
+ Per `_shared/helpers.md#Update-Continuity` — update Active Goal and Next Actions.
384
+
385
+ ---
386
+
387
+ ## Red Flags — STOP
388
+
389
+ | Thought | Reality |
390
+ |---------|---------|
391
+ | "The user knows what they want, skip analysis" | Complex requests ALWAYS benefit from analysis |
392
+ | "Let me just start coding" | Code without analysis = rework later |
393
+ | "One option is obviously right" | If you can't articulate 2+ options, you haven't explored enough |
394
+ | "All options look the same" | Dig deeper — change the lens (user-first vs tech-first) |
395
+ | "This will take too long" | 30-60 min analysis saves 3-5 days of rework |
396
+ | "The 9 Windows are overkill" | They reveal blind spots you WILL miss otherwise |
397
+
398
+ ---
399
+
400
+ ## Integration
401
+
402
+ | Skill | Relationship |
403
+ |-------|-------------|
404
+ | `cm-project-bootstrap` | UPSTREAM: Product must exist before brainstorming improvements |
405
+ | `cm-ui-preview` | USED IN Phase 4.5: Visual preview with Stitch or Pencil (auto-detected) |
406
+ | `cm-deep-search` | TRIGGERED IN Phase 1a: Suggests qmd when project corpus exceeds thresholds |
407
+ | `cm-planning` | DOWNSTREAM: Receives qualified output, writes implementation plan |
408
+ | `cm-execution` | DOWNSTREAM: Executes the plan that originated from this analysis |
409
+ | `cm-ux-master` | USED IN Phase 1 & 3: UX assessment and design ideation |
410
+ | `cm-debugging` | REDIRECT: Simple bugs don't need brainstorming |
411
+ | `cro-methodology` | COMPLEMENT: CRO analysis for conversion-specific improvements |
412
+ | `cm-jtbd` | COMPLEMENT: JTBD research for user-need discovery |
413
+
414
+ ### Lifecycle Position
415
+
416
+ ```
417
+ cm-project-bootstrap → cm-brainstorm-idea → [UI Preview?] → cm-planning → cm-execution
418
+ (build) (analyze) (visualize) (plan) (implement)
419
+ ```
420
+
421
+ ## The Bottom Line
422
+
423
+ **Don't rush to solutions. Qualify the problem. Evaluate options. Recommend with evidence. Then — plan.**
@@ -0,0 +1,151 @@
1
+ ---
2
+ name: cm-code-review
3
+ description: "Full review lifecycle — request reviews, handle feedback with technical rigor, and complete branch integration. Use when completing tasks, receiving feedback, or finishing feature branches."
4
+ ---
5
+
6
+ # Code Review — Request + Receive + Complete
7
+
8
+ > **Full review lifecycle in one skill:** Request → Receive → Integrate.
9
+
10
+ ## Part A: Requesting Code Review
11
+
12
+ ### When to Request
13
+
14
+ **Mandatory:**
15
+ - After each task in `cm-execution`
16
+ - After completing major features
17
+ - Before merge to main
18
+
19
+ **Optional but valuable:**
20
+ - When stuck (fresh perspective)
21
+ - Before refactoring (baseline check)
22
+ - After fixing complex bugs
23
+
24
+ ### How to Request
25
+
26
+ 1. **Get git SHAs:**
27
+ ```bash
28
+ BASE_SHA=$(git rev-parse HEAD~1)
29
+ HEAD_SHA=$(git rev-parse HEAD)
30
+ ```
31
+
32
+ 2. **Dispatch reviewer subagent** with:
33
+ - What was implemented
34
+ - Plan/requirements reference
35
+ - Base and head SHAs
36
+ - Brief description
37
+
38
+ 3. **Act on feedback:**
39
+ - Fix Critical issues immediately
40
+ - Fix Important issues before proceeding
41
+ - Note Minor issues for later
42
+ - Push back if reviewer is wrong (with reasoning)
43
+
44
+ ---
45
+
46
+ ## Part B: Receiving Code Review
47
+
48
+ ### When to Use
49
+ When receiving feedback — whether from human reviewers, AI reviewers, or code review subagents.
50
+
51
+ ### The Protocol
52
+
53
+ ```
54
+ 1. READ feedback completely before responding
55
+ 2. UNDERSTAND the technical reasoning
56
+ 3. VERIFY if the feedback is technically correct
57
+ 4. RESPOND with evidence, not agreement
58
+ ```
59
+
60
+ ### Response Framework
61
+
62
+ | Feedback Type | Response |
63
+ |--------------|----------|
64
+ | **Technically correct** | Fix it. Thank reviewer. |
65
+ | **Unclear intent** | Ask for clarification with specific questions |
66
+ | **Technically questionable** | Challenge with evidence (code, tests, docs) |
67
+ | **Stylistic preference** | Discuss trade-offs, defer to team convention |
68
+
69
+ ### Red Flags — STOP
70
+
71
+ - Blindly implementing all suggestions without verification
72
+ - "Performative agreement" — saying yes without understanding
73
+ - Implementing a suggestion that breaks existing tests
74
+ - Making changes you can't justify technically
75
+
76
+ ### Anti-Pattern: Performative Agreement
77
+
78
+ ```
79
+ ❌ "Good catch! Fixed." (without verifying it's actually a problem)
80
+ ✅ "I verified this: [evidence]. The suggestion is correct because [reason]. Fixed."
81
+ ✅ "I investigated this: [evidence]. The current code is correct because [reason]."
82
+ ```
83
+
84
+ ---
85
+
86
+ ## Part C: Finishing a Development Branch
87
+
88
+ ### When to Use
89
+ When implementation is complete and all tests pass.
90
+
91
+ ### The Process
92
+
93
+ 1. **Verify current state:**
94
+ ```bash
95
+ npm run test:gate # All tests must pass
96
+ git status # Working tree should be clean
97
+ ```
98
+
99
+ 2. **Present options to user:**
100
+
101
+ | Option | When | Command |
102
+ |--------|------|---------|
103
+ | **Merge to main** | Feature ready | `git checkout main && git merge feature-branch` |
104
+ | **Create PR** | Needs team review | `git push origin feature-branch` |
105
+ | **Keep working** | More tasks remain | Continue on branch |
106
+ | **Cleanup only** | Abandoned/merged | `git worktree remove path` |
107
+
108
+ 3. **Execute chosen option**
109
+
110
+ 4. **Cleanup:**
111
+ - Remove worktree if using `cm-git-worktrees`
112
+ - Delete feature branch if merged
113
+ - Update task tracking
114
+
115
+ ### Rules
116
+ - Never merge with failing tests
117
+ - Never force push main/production
118
+ - Always use `cm-identity-guard` before git push
119
+
120
+ ---
121
+
122
+ ### Step FINAL: Record Review Learnings
123
+
124
+ After processing review feedback, ALWAYS update `.cm/CONTINUITY.md`:
125
+
126
+ - **Key Decisions:** If reviewer changed architecture approach, record with scope:
127
+ `[Decision]: [Rationale] — scope: [global|module:{name}]`
128
+ - **Mistakes & Learnings:** If reviewer caught a pattern mistake, record with scope:
129
+ - What Failed: [the pattern that was wrong]
130
+ - How to Prevent: [correct pattern going forward]
131
+ - Scope: [global | module:{name} | file:{path}]
132
+
133
+ **Anti-duplicate:** If similar learning exists, reinforce it instead of creating new.
134
+
135
+ > **Token savings:** Future code reviews in same project avoid repeating
136
+ > the same feedback. Reviewer patterns become accumulated knowledge.
137
+
138
+ ---
139
+
140
+ ## Integration
141
+
142
+ | Skill | Relationship |
143
+ |-------|-------------|
144
+ | `cm-execution` | Reviews after each task in execution |
145
+ | `cm-quality-gate` | Tests must pass before finishing branch |
146
+ | `cm-identity-guard` | Before git push |
147
+ | `cm-git-worktrees` | Cleanup worktree after completion |
148
+
149
+ ## The Bottom Line
150
+
151
+ **Review early. Verify feedback. Ship with evidence, not hope.**