100xprism 2.3.1

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 (207) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +196 -0
  3. package/VERSION +1 -0
  4. package/adapters/antigravity.sh +14 -0
  5. package/adapters/claude-code.sh +160 -0
  6. package/adapters/codex.sh +13 -0
  7. package/adapters/copilot.sh +13 -0
  8. package/adapters/cursor.sh +13 -0
  9. package/adapters/gemini.sh +13 -0
  10. package/adapters/lib/__pycache__/modules.cpython-312.pyc +0 -0
  11. package/adapters/lib/modules.py +592 -0
  12. package/adapters/lib/shared.sh +83 -0
  13. package/adapters/lib/sync_plugins.py +113 -0
  14. package/adapters/windsurf.sh +15 -0
  15. package/bin/100xprism.js +29 -0
  16. package/get.sh +24 -0
  17. package/install-project.sh +82 -0
  18. package/install.sh +281 -0
  19. package/lib/adapters/windows.js +429 -0
  20. package/lib/bootstrap.js +33 -0
  21. package/lib/init.js +19 -0
  22. package/lib/install.js +18 -0
  23. package/lib/migrate.js +52 -0
  24. package/lib/platform.js +22 -0
  25. package/lib/update.js +29 -0
  26. package/modules/_lib/reference.md +77 -0
  27. package/modules/a11y-auditor/SKILL.md +151 -0
  28. package/modules/ab-test-setup/SKILL.md +266 -0
  29. package/modules/ab-test-setup/evals/evals.json +105 -0
  30. package/modules/ab-test-setup/references/sample-size-guide.md +263 -0
  31. package/modules/ab-test-setup/references/test-templates.md +277 -0
  32. package/modules/ad-creative/SKILL.md +362 -0
  33. package/modules/ad-creative/evals/evals.json +90 -0
  34. package/modules/ad-creative/references/generative-tools.md +637 -0
  35. package/modules/ad-creative/references/platform-specs.md +213 -0
  36. package/modules/ai-seo/SKILL.md +398 -0
  37. package/modules/ai-seo/evals/evals.json +90 -0
  38. package/modules/ai-seo/references/content-patterns.md +285 -0
  39. package/modules/ai-seo/references/platform-ranking-factors.md +152 -0
  40. package/modules/analytics-tracking/SKILL.md +309 -0
  41. package/modules/analytics-tracking/evals/evals.json +90 -0
  42. package/modules/analytics-tracking/references/event-library.md +260 -0
  43. package/modules/analytics-tracking/references/ga4-implementation.md +300 -0
  44. package/modules/analytics-tracking/references/gtm-implementation.md +390 -0
  45. package/modules/architect/SKILL.md +282 -0
  46. package/modules/branch/SKILL.md +105 -0
  47. package/modules/churn-prevention/SKILL.md +424 -0
  48. package/modules/churn-prevention/evals/evals.json +93 -0
  49. package/modules/churn-prevention/references/cancel-flow-patterns.md +316 -0
  50. package/modules/churn-prevention/references/dunning-playbook.md +408 -0
  51. package/modules/cloud-security/SKILL.md +240 -0
  52. package/modules/cold-email/SKILL.md +178 -0
  53. package/modules/cold-email/evals/evals.json +94 -0
  54. package/modules/cold-email/references/benchmarks.md +83 -0
  55. package/modules/cold-email/references/follow-up-sequences.md +81 -0
  56. package/modules/cold-email/references/frameworks.md +90 -0
  57. package/modules/cold-email/references/personalization.md +79 -0
  58. package/modules/cold-email/references/subject-lines.md +53 -0
  59. package/modules/commit/SKILL.md +195 -0
  60. package/modules/competitor-alternatives/SKILL.md +256 -0
  61. package/modules/competitor-alternatives/evals/evals.json +93 -0
  62. package/modules/competitor-alternatives/references/content-architecture.md +271 -0
  63. package/modules/competitor-alternatives/references/templates.md +223 -0
  64. package/modules/connect/SKILL.md +894 -0
  65. package/modules/content-strategy/SKILL.md +359 -0
  66. package/modules/content-strategy/evals/evals.json +90 -0
  67. package/modules/context-dump/SKILL.md +67 -0
  68. package/modules/copy-editing/SKILL.md +447 -0
  69. package/modules/copy-editing/evals/evals.json +89 -0
  70. package/modules/copy-editing/references/plain-english-alternatives.md +394 -0
  71. package/modules/copywriting/SKILL.md +271 -0
  72. package/modules/copywriting/evals/evals.json +111 -0
  73. package/modules/copywriting/references/cold-email-benchmarks.md +83 -0
  74. package/modules/copywriting/references/cold-email-follow-ups.md +81 -0
  75. package/modules/copywriting/references/cold-email-frameworks.md +90 -0
  76. package/modules/copywriting/references/cold-email-personalization.md +79 -0
  77. package/modules/copywriting/references/cold-email-subject-lines.md +53 -0
  78. package/modules/copywriting/references/copy-frameworks.md +344 -0
  79. package/modules/copywriting/references/email-copy-guidelines.md +113 -0
  80. package/modules/copywriting/references/email-types.md +515 -0
  81. package/modules/copywriting/references/natural-transitions.md +272 -0
  82. package/modules/copywriting/references/sequence-templates.md +168 -0
  83. package/modules/data-query/SKILL.md +58 -0
  84. package/modules/data-viz/SKILL.md +225 -0
  85. package/modules/db/SKILL.md +205 -0
  86. package/modules/db/db-engines/_router.md +24 -0
  87. package/modules/db/db-engines/athena.md +16 -0
  88. package/modules/db/db-engines/cloud-sql.md +16 -0
  89. package/modules/db/db-engines/databricks.md +14 -0
  90. package/modules/db/db-engines/oracle.md +14 -0
  91. package/modules/db/db-engines/postgres.md +15 -0
  92. package/modules/db/db-engines/presto.md +14 -0
  93. package/modules/db/db-engines/snowflake.md +14 -0
  94. package/modules/docs/SKILL.md +100 -0
  95. package/modules/email-sequence/SKILL.md +309 -0
  96. package/modules/email-sequence/evals/evals.json +93 -0
  97. package/modules/email-sequence/references/copy-guidelines.md +113 -0
  98. package/modules/email-sequence/references/email-types.md +515 -0
  99. package/modules/email-sequence/references/sequence-templates.md +168 -0
  100. package/modules/enterprise-design/SKILL.md +75 -0
  101. package/modules/eval/SKILL.md +105 -0
  102. package/modules/figma-translator/SKILL.md +49 -0
  103. package/modules/fix-bugs/SKILL.md +104 -0
  104. package/modules/form-cro/SKILL.md +429 -0
  105. package/modules/form-cro/evals/evals.json +90 -0
  106. package/modules/free-tool-strategy/SKILL.md +178 -0
  107. package/modules/free-tool-strategy/evals/evals.json +90 -0
  108. package/modules/free-tool-strategy/references/tool-types.md +217 -0
  109. package/modules/gate/SKILL.md +232 -0
  110. package/modules/grill-me/SKILL.md +59 -0
  111. package/modules/interaction-engineer/SKILL.md +49 -0
  112. package/modules/issue/SKILL.md +272 -0
  113. package/modules/launch/SKILL.md +345 -0
  114. package/modules/launch-strategy/SKILL.md +353 -0
  115. package/modules/launch-strategy/evals/evals.json +91 -0
  116. package/modules/lint/SKILL.md +126 -0
  117. package/modules/marketing-ideas/SKILL.md +167 -0
  118. package/modules/marketing-ideas/evals/evals.json +90 -0
  119. package/modules/marketing-ideas/references/ideas-by-category.md +366 -0
  120. package/modules/marketing-psychology/SKILL.md +455 -0
  121. package/modules/marketing-psychology/evals/evals.json +88 -0
  122. package/modules/motion-designer/SKILL.md +214 -0
  123. package/modules/onboarding-cro/SKILL.md +220 -0
  124. package/modules/onboarding-cro/evals/evals.json +92 -0
  125. package/modules/onboarding-cro/references/experiments.md +258 -0
  126. package/modules/orchestrate/SKILL.md +77 -0
  127. package/modules/page-cro/SKILL.md +182 -0
  128. package/modules/page-cro/evals/evals.json +111 -0
  129. package/modules/page-cro/references/experiments.md +248 -0
  130. package/modules/page-cro/references/paywall-experiments.md +164 -0
  131. package/modules/paid-ads/SKILL.md +315 -0
  132. package/modules/paid-ads/evals/evals.json +90 -0
  133. package/modules/paid-ads/references/ad-copy-templates.md +207 -0
  134. package/modules/paid-ads/references/audience-targeting.md +243 -0
  135. package/modules/paid-ads/references/platform-setup-checklists.md +277 -0
  136. package/modules/paywall-upgrade-cro/SKILL.md +227 -0
  137. package/modules/paywall-upgrade-cro/evals/evals.json +93 -0
  138. package/modules/paywall-upgrade-cro/references/experiments.md +164 -0
  139. package/modules/popup-cro/SKILL.md +453 -0
  140. package/modules/popup-cro/evals/evals.json +94 -0
  141. package/modules/pr/SKILL.md +203 -0
  142. package/modules/pricing-strategy/SKILL.md +231 -0
  143. package/modules/pricing-strategy/evals/evals.json +90 -0
  144. package/modules/pricing-strategy/references/research-methods.md +152 -0
  145. package/modules/pricing-strategy/references/tier-structure.md +232 -0
  146. package/modules/product-marketing-context/SKILL.md +241 -0
  147. package/modules/product-marketing-context/evals/evals.json +85 -0
  148. package/modules/programmatic-seo/SKILL.md +238 -0
  149. package/modules/programmatic-seo/evals/evals.json +94 -0
  150. package/modules/programmatic-seo/references/playbooks.md +308 -0
  151. package/modules/push/SKILL.md +202 -0
  152. package/modules/referral-program/SKILL.md +255 -0
  153. package/modules/referral-program/evals/evals.json +89 -0
  154. package/modules/referral-program/references/affiliate-programs.md +164 -0
  155. package/modules/referral-program/references/program-examples.md +143 -0
  156. package/modules/release/SKILL.md +293 -0
  157. package/modules/revops/SKILL.md +343 -0
  158. package/modules/revops/evals/evals.json +91 -0
  159. package/modules/revops/references/automation-playbooks.md +290 -0
  160. package/modules/revops/references/lifecycle-definitions.md +278 -0
  161. package/modules/revops/references/routing-rules.md +203 -0
  162. package/modules/revops/references/scoring-models.md +247 -0
  163. package/modules/sales-enablement/SKILL.md +349 -0
  164. package/modules/sales-enablement/evals/evals.json +91 -0
  165. package/modules/sales-enablement/references/deck-frameworks.md +263 -0
  166. package/modules/sales-enablement/references/demo-scripts.md +355 -0
  167. package/modules/sales-enablement/references/objection-library.md +270 -0
  168. package/modules/sales-enablement/references/one-pager-templates.md +208 -0
  169. package/modules/schema-markup/SKILL.md +179 -0
  170. package/modules/schema-markup/evals/evals.json +87 -0
  171. package/modules/schema-markup/references/schema-examples.md +398 -0
  172. package/modules/security/SKILL.md +138 -0
  173. package/modules/seo-audit/SKILL.md +412 -0
  174. package/modules/seo-audit/evals/evals.json +136 -0
  175. package/modules/seo-audit/references/ai-writing-detection.md +200 -0
  176. package/modules/seo-audit/references/content-patterns.md +285 -0
  177. package/modules/seo-audit/references/platform-ranking-factors.md +152 -0
  178. package/modules/signup-flow-cro/SKILL.md +359 -0
  179. package/modules/signup-flow-cro/evals/evals.json +88 -0
  180. package/modules/site-architecture/SKILL.md +357 -0
  181. package/modules/site-architecture/evals/evals.json +88 -0
  182. package/modules/site-architecture/references/mermaid-templates.md +216 -0
  183. package/modules/site-architecture/references/navigation-patterns.md +305 -0
  184. package/modules/site-architecture/references/site-type-templates.md +293 -0
  185. package/modules/social-content/SKILL.md +278 -0
  186. package/modules/social-content/evals/evals.json +92 -0
  187. package/modules/social-content/references/platforms.md +170 -0
  188. package/modules/social-content/references/post-templates.md +177 -0
  189. package/modules/social-content/references/reverse-engineering.md +195 -0
  190. package/modules/spec/SKILL.md +81 -0
  191. package/modules/subagents/SKILL.md +123 -0
  192. package/modules/techdebt/SKILL.md +71 -0
  193. package/modules/terminal-setup/SKILL.md +49 -0
  194. package/modules/test/SKILL.md +493 -0
  195. package/modules/test/references/e2e-patterns.md +294 -0
  196. package/modules/update-claude-md/SKILL.md +52 -0
  197. package/modules/visual-system-architect/SKILL.md +53 -0
  198. package/package.json +44 -0
  199. package/plugins/plugins.json +43 -0
  200. package/shell/aliases.sh +24 -0
  201. package/shell/check-update.sh +212 -0
  202. package/templates/.env.example +199 -0
  203. package/templates/docker-compose.md +46 -0
  204. package/templates/node-frontend.md +56 -0
  205. package/templates/node-fullstack.md +59 -0
  206. package/templates/python-api.md +57 -0
  207. package/update.sh +231 -0
@@ -0,0 +1,272 @@
1
+ ---
2
+ name: issue
3
+ description: You are a senior engineering lead and product architect. Given an observation, bug, or gap, conduct a thorough multi-dimensional investigation, find the root cause, plan the resolution, and create a detailed actionable GitHub issue.
4
+ category: docs
5
+ tier: on-demand
6
+ slash_command: /issue
7
+ ---
8
+
9
+ # Issue — Investigate & Create Detailed GitHub Issue
10
+
11
+ You are a senior engineering lead and product architect. Given an observation, bug, or gap, conduct a thorough multi-dimensional investigation, find the root cause, plan the resolution, and create a detailed actionable GitHub issue.
12
+
13
+ ## Do NOT ask for permission — investigate thoroughly, then create the issue.
14
+
15
+ ---
16
+
17
+ ## Phase 1 — Codebase Investigation
18
+
19
+ Understand the problem in full context before forming any opinion.
20
+
21
+ ```bash
22
+ PROJECT_ROOT=$(git rev-parse --show-toplevel); cd "$PROJECT_ROOT"
23
+ git log --oneline -20
24
+ git status
25
+
26
+ # Detect the stack so later steps don't assume GCP/npm (canonical block — source: _lib/reference.md)
27
+ INSTRUCTION_FILE=$(for f in CLAUDE.md AGENTS.md .cursorrules .windsurfrules .github/copilot-instructions.md GEMINI.md; do [ -f "$PROJECT_ROOT/$f" ] && echo "$PROJECT_ROOT/$f" && break; done)
28
+ CLOUD=""
29
+ if command -v gcloud >/dev/null 2>&1 && gcloud config get-value project >/dev/null 2>&1; then CLOUD=gcp; fi
30
+ [ -z "$CLOUD" ] && grep -rqiE "aws_|amazonaws|::aws" "$PROJECT_ROOT"/terraform "$PROJECT_ROOT"/infra "$PROJECT_ROOT"/cdk.json 2>/dev/null && CLOUD=aws
31
+ [ -z "$CLOUD" ] && [ -n "$INSTRUCTION_FILE" ] && grep -qiE "gcloud|Cloud Run|Firebase" "$INSTRUCTION_FILE" && CLOUD=gcp
32
+ CI_SYSTEM=""; ls "$PROJECT_ROOT"/.github/workflows/*.y*ml >/dev/null 2>&1 && CI_SYSTEM=github-actions
33
+ echo "stack: cloud=${CLOUD:-none} ci=${CI_SYSTEM:-none}"
34
+ ```
35
+
36
+ 1. Search for all code relevant to the observation (routes, components, services, DB queries, migrations, tests)
37
+ 2. Read the relevant source files — do not guess at behavior, read the actual code
38
+ 3. Check recent commits in the affected area:
39
+ ```bash
40
+ git log --oneline --since="60 days ago" -- <relevant-paths>
41
+ ```
42
+ 4. Check for existing related issues (only if `gh` is available). Pull titles **and
43
+ bodies**, then match on *meaning*, not just a keyword grep — a dupe often uses
44
+ different words for the same root cause:
45
+ ```bash
46
+ command -v gh >/dev/null 2>&1 && gh issue list --state all --limit 100 \
47
+ --json number,title,body -q '.[] | "#\(.number) \(.title)\n\(.body)\n---"' 2>/dev/null
48
+ ```
49
+ Read the results and judge whether any existing issue describes the same underlying
50
+ problem; if so, reference or update it instead of filing a duplicate.
51
+ 5. Check current test coverage for the affected code paths
52
+ 6. **If this is a production issue and `CLOUD=gcp`**, check Cloud Run logs (resolve the
53
+ project from gcloud config — never pass a literal placeholder):
54
+ ```bash
55
+ if [ "$CLOUD" = gcp ]; then
56
+ PROJECT=$(gcloud config get-value project 2>/dev/null)
57
+ gcloud logging read "resource.type=cloud_run_revision AND severity>=ERROR" \
58
+ --project="$PROJECT" --limit=20 --format="value(textPayload)" 2>/dev/null || true
59
+ fi
60
+ ```
61
+ For other providers, read logs the platform-appropriate way (AWS: `aws logs tail`;
62
+ Vercel: `vercel logs`; or the project's configured log viewer). Skip if not a
63
+ production issue.
64
+
65
+ ---
66
+
67
+ ## Phase 2 — Multi-Dimensional Impact Analysis
68
+
69
+ Analyze from ALL FIVE perspectives before forming a resolution plan.
70
+
71
+ ### 2.1 Product & Business
72
+ - Which feature/journey/tier is affected? Regression or known gap?
73
+ - Severity: Critical (blocks core flow) / High (degrades key feature) / Medium / Low
74
+ - Revenue, retention, or compliance risk?
75
+
76
+ ### 2.2 User Experience
77
+ - What does the user actually see? Exact errors or broken states?
78
+ - Data loss, incorrect data, or silent failure? Accessibility / performance impact?
79
+
80
+ ### 2.3 Cloud / Infrastructure
81
+ - Which `$CLOUD` services are involved? (GCP: Cloud Run/Cloud SQL/GCS/Pub-Sub/Memorystore/Firebase ·
82
+ AWS: ECS-Lambda/RDS/S3/SNS-SQS/ElastiCache/Cognito · Azure / Vercel equivalents.) Map to the detected stack.
83
+ - Scaling, concurrency, IAM, networking, or cold-start related?
84
+
85
+ ### 2.4 Data Architecture
86
+ - Which tables/columns/indexes involved? Data integrity risk?
87
+ - Migration needed? Cache invalidation? PII/compliance concern?
88
+
89
+ ### 2.5 SaaS / Distributed Systems
90
+ - Race condition, multi-tenancy isolation risk, or async/webhook issue?
91
+ - Third-party dependency — payment / auth / email / SMS provider (e.g. Stripe, the auth
92
+ provider, the email sender)? Retry/idempotency gap?
93
+
94
+ ---
95
+
96
+ ## Phase 3 — Root Cause Analysis
97
+
98
+ State the root cause with precision:
99
+
100
+ - **Immediate cause**: the exact line of code, config value, query, or missing guard that causes the problem
101
+ - **Contributing factors**: conditions required for it to manifest (specific data state, load, timing, tier, user type)
102
+ - **Detection gap**: what test, review step, or monitoring was missing that let this reach production
103
+ - **First introduced**: if determinable from git log, when and which commit introduced this
104
+
105
+ ---
106
+
107
+ ## Phase 4 — Resolution Plan
108
+
109
+ ### Files to change
110
+ List every file requiring modification:
111
+ ```
112
+ src/components/Foo.tsx — add null check before accessing .property
113
+ api/src/routes/bar.ts — replace string interpolation with parameterized query ($1, $2)
114
+ api/src/db/migrations/004_fix.sql — add index on (user_id, created_at)
115
+ src/lib/subscriptionTiers.ts — add missing feature key
116
+ ```
117
+
118
+ ### Code changes needed
119
+ Be precise about what changes are required:
120
+ - Exact logic that needs to change (not a full diff, but specific enough to implement)
121
+ - Validation or error handling to add
122
+ - Type guards, null checks, or defensive coding needed
123
+ - New abstractions or helpers required
124
+ - Configuration changes (env vars, feature flags)
125
+
126
+ ### Architecture / design changes needed
127
+ If structural change is required:
128
+ - DB schema changes (new column, table, index, constraint, migration)
129
+ - New API route or service
130
+ - Cloud infrastructure change (IAM policy, Cloud Run env var, firewall rule, Cloud SQL SSL)
131
+ - Cache strategy change (new Redis key, TTL adjustment, invalidation logic)
132
+ - API contract change — specify if breaking or non-breaking
133
+ - If none required, state: **No architecture changes needed**
134
+
135
+ ### Tests to add or update
136
+ ```
137
+ tests/unit/test_foo.py — add: null input, boundary values, error path
138
+ api/src/__tests__/unit/bar.test.ts — update: mock to cover new validation branch
139
+ api/src/__tests__/integration/bar.test.ts — add: end-to-end happy path + error case
140
+ e2e/tests/05-foo.spec.ts — add: user-facing regression test
141
+ ```
142
+
143
+ ---
144
+
145
+ ## Phase 5 — Regression Risk Assessment
146
+
147
+ Assess each risk area. Be honest — do not mark everything as "None".
148
+
149
+ | Risk Area | Level | Rationale |
150
+ |---|---|---|
151
+ | Functionality regression | None / Low / Medium / High | Which adjacent features could break? |
152
+ | Security regression | None / Low / Medium / High | Auth, permissions, data exposure change? |
153
+ | Performance regression | None / Low / Medium / High | Hot path affected? DB query cost change? |
154
+ | Data integrity | None / Low / Medium / High | Existing data affected by fix or migration? |
155
+ | Third-party integrations | None / Low / Medium / High | Stripe/Firebase/Resend/API contract change? |
156
+ | Multi-tenancy isolation | None / Low / Medium / High | Could data leak between tenants? |
157
+
158
+ **Mitigation strategy:**
159
+ - What tests close these risks?
160
+ - Feature flag / gradual rollout needed?
161
+ - Is the DB migration reversible?
162
+ - Rollback plan if deploy goes wrong?
163
+
164
+ ---
165
+
166
+ ## Phase 6 — Effort Estimate
167
+
168
+ | Category | Estimate |
169
+ |---|---|
170
+ | Investigation | Xh |
171
+ | Implementation | Xh / Xd |
172
+ | Tests | Xh |
173
+ - Review & Deploy | Xh |
174
+ | **Total** | **X days** |
175
+
176
+ T-shirt size: **XS** (< 2h) / **S** (< 1d) / **M** (1–3d) / **L** (3–7d) / **XL** (> 1 week)
177
+
178
+ Priority: **P0** (production down) / **P1** (critical UX broken) / **P2** (important, not blocking) / **P3** (nice to have)
179
+
180
+ ---
181
+
182
+ ## Phase 7 — Create GitHub Issue
183
+
184
+ Compose and create the issue:
185
+
186
+ ```bash
187
+ gh issue create \
188
+ --title "<type>(<scope>): <concise title — under 72 chars>" \
189
+ --body "$(cat <<'ISSUEEOF'
190
+ ## Summary
191
+ <!-- One paragraph: what is broken, who is affected, and the proposed fix -->
192
+
193
+ ## Observation
194
+ <!-- What was observed — exact symptoms, error messages, steps to reproduce -->
195
+
196
+ **Steps to reproduce:**
197
+ 1.
198
+ 2.
199
+ 3.
200
+
201
+ **Expected:**
202
+ **Actual:**
203
+
204
+ ## Root Cause
205
+ <!-- Specific file:line or config — not "unknown" -->
206
+
207
+ ## Impact Analysis
208
+
209
+ ### Product & Business
210
+ <!-- tier/user segment affected, revenue/retention risk, severity -->
211
+
212
+ ### User Experience
213
+ <!-- what the user sees, data loss risk, accessibility/perf impact -->
214
+
215
+ ### Cloud / Infrastructure
216
+ <!-- which cloud services involved (map to the project's provider), scaling/infra implications -->
217
+
218
+ ### Data Architecture
219
+ <!-- tables/queries affected, migration needed, data integrity risk -->
220
+
221
+ ### SaaS / Distributed Systems
222
+ <!-- race conditions, multi-tenancy, async/webhook, third-party deps (payment/auth/email) -->
223
+
224
+ ## Resolution Plan
225
+
226
+ ### Files to change
227
+ \`\`\`
228
+ <file> — <what changes>
229
+ \`\`\`
230
+
231
+ ### Code changes
232
+ <!-- Specific logic changes needed -->
233
+
234
+ ### Architecture / design changes
235
+ <!-- Schema, infra, API contract changes — or "None" -->
236
+
237
+ ### Tests to add / update
238
+ \`\`\`
239
+ <test file> — <what to add/update>
240
+ \`\`\`
241
+
242
+ ## Regression Risk
243
+
244
+ | Risk Area | Level | Notes |
245
+ |---|---|---|
246
+ | Functionality | None/Low/Medium/High | |
247
+ | Security | None/Low/Medium/High | |
248
+ | Performance | None/Low/Medium/High | |
249
+ | Data Integrity | None/Low/Medium/High | |
250
+ | Integrations | None/Low/Medium/High | |
251
+ | Multi-tenancy | None/Low/Medium/High | |
252
+
253
+ **Mitigation:** <!-- rollback plan, feature flag, reversible migration -->
254
+
255
+ ## Effort & Priority
256
+ - **Size:** XS / S / M / L / XL
257
+ - **Priority:** P0 / P1 / P2 / P3
258
+ - **Estimate:** X days
259
+
260
+ ## Acceptance Criteria
261
+ - [ ] Root cause fixed
262
+ - [ ] Tests added/updated for affected code paths
263
+ - [ ] All regression risks mitigated
264
+ - [ ] The **gate** workflow passes (≥95% coverage, no vulns, build clean, cloud security clean)
265
+ - [ ] Deployed and verified in production
266
+ ISSUEEOF
267
+ )" \
268
+ --label "bug" \
269
+ --assignee "@me"
270
+ ```
271
+
272
+ Print the created issue URL and number.
@@ -0,0 +1,345 @@
1
+ ---
2
+ name: launch
3
+ description: You are a release engineer. Execute each phase in order. Each must fully complete before advancing. Do NOT ask for permission. Stop only if something is truly unfixable.
4
+ category: data
5
+ tier: on-demand
6
+ slash_command: /launch
7
+ ---
8
+
9
+ # Launch — Pre-flight Pipeline: Docker → Test → Lint → Security → Build → Commit → Push → Cleanup
10
+
11
+ You are a release engineer. Execute each phase in order. Each must fully complete before advancing. Do NOT ask for permission. Stop only if something is truly unfixable.
12
+
13
+ ---
14
+
15
+ ## Phase 0 — Docker Build & Smoke Test (if applicable)
16
+
17
+ ```bash
18
+ PROJECT_ROOT=$(git rev-parse --show-toplevel)
19
+ ls "$PROJECT_ROOT/Dockerfile" 2>/dev/null && echo "HAS_DOCKERFILE" || echo "NO_DOCKERFILE"
20
+ ```
21
+
22
+ **Skip this phase if no Dockerfile exists.**
23
+
24
+ If Dockerfile exists:
25
+
26
+ ### 0a. Build images
27
+ Detect from `docker-compose.yml` whether there are multiple services. Build all:
28
+ ```bash
29
+ cd "$PROJECT_ROOT"
30
+ docker build -t $(basename $PROJECT_ROOT)-api:local . 2>&1
31
+ # If dashboard/frontend Dockerfile exists:
32
+ docker build -t $(basename $PROJECT_ROOT)-dashboard:local ./dashboard 2>&1 || true
33
+ ```
34
+ Fix any build errors. Iterate until all images build successfully.
35
+
36
+ ### 0b. Start stack
37
+ ```bash
38
+ # Use docker-compose.yml or compose.yml if present
39
+ COMPOSE_FILE=$(ls docker-compose.yml compose.yml deploy/docker-compose.yml 2>/dev/null | head -1)
40
+ [ -n "$COMPOSE_FILE" ] && docker compose -f "$COMPOSE_FILE" up -d || docker compose up -d
41
+ docker compose ps
42
+ ```
43
+ Expected: all services running/healthy.
44
+
45
+ ### 0c. Run migrations (if applicable)
46
+ ```bash
47
+ docker compose run --rm migrate 2>/dev/null || true
48
+ ```
49
+
50
+ ### 0d. Smoke test
51
+ Read the project instruction file or `README.md` for health endpoint. Fall back to common defaults:
52
+ ```bash
53
+ curl -s http://localhost:8000/health 2>/dev/null || \
54
+ curl -s http://localhost:3000/health 2>/dev/null || \
55
+ curl -s http://localhost:8080/health 2>/dev/null || echo "No health endpoint found"
56
+ ```
57
+
58
+ ### 0e. Cleanup
59
+ ```bash
60
+ docker compose down 2>/dev/null || true
61
+ ```
62
+
63
+ **GATE: All images build, containers healthy, smoke test passes.**
64
+
65
+ ---
66
+
67
+ ## Phase 1 — Tests
68
+
69
+ Run the **test** workflow. The test workflow will:
70
+ 1. Auto-start required Docker services (DB, Redis, etc.) for integration tests
71
+ 2. Run unit tests against real services — no DB mocks
72
+ 3. Run integration tests against a real Docker DB
73
+ 4. Run E2E tests against the full docker compose stack
74
+ 5. Loop until all thresholds are met with zero failures
75
+
76
+ Thresholds: Lines ≥ 95% | Functions ≥ 95% | Statements ≥ 95% | Branches ≥ 90%
77
+
78
+ **GATE: The test workflow reports "COVERAGE MET ✅" with zero failures.**
79
+
80
+ ---
81
+
82
+ ## Phases 2–4 — Lint ‖ Security ‖ Build (fan out)
83
+
84
+ Phase 1 (tests) is the long pole and must pass first. **Phases 2, 3, and 4 — lint,
85
+ security, and build — are mutually independent** (they read the tree, not each other's
86
+ results), so run them in parallel rather than serially. Use the fan-out ladder from the
87
+ `subagents` skill: prefer the `Workflow` tool (one stage per phase, `schema`-validated
88
+ return), else parallel `Agent`/`Task` subagents, else run them serially.
89
+
90
+ Each returns `{ phase, status, findings[] }`; **all three must report `passed`** before
91
+ the gate-cache write below. The phase descriptions that follow define what each one does.
92
+
93
+ ---
94
+
95
+ ## Phase 2 — Lint
96
+
97
+ Run the **lint** workflow. Fix all errors across frontend, backend, and type checks.
98
+
99
+ **GATE: Zero lint errors remaining.**
100
+
101
+ ---
102
+
103
+ ## Phase 3 — Security
104
+
105
+ Run the **security** workflow. Fix critical/high vulnerabilities. Confirm no real secrets in source.
106
+
107
+ **GATE: No critical/high vulns (outside documented known exceptions) AND no real secrets.**
108
+
109
+ ---
110
+
111
+ ## Phase 4 — Build
112
+
113
+ ```bash
114
+ PROJECT_ROOT=$(git rev-parse --show-toplevel)
115
+ cd "$PROJECT_ROOT"
116
+ ```
117
+
118
+ Detect and run applicable builds:
119
+ - **npm frontend**: `npm run build`
120
+ - **npm backend**: `cd api && npm run build`
121
+ - **Python**: `./venv/bin/python -m build 2>/dev/null || true`
122
+
123
+ Fix any compiler errors. Re-build only the failing target.
124
+
125
+ **GATE: All applicable builds succeed with zero errors.**
126
+
127
+ Phases 1–4 constitute a full gate pass. Record it so the `gate-on-commit` hook and the
128
+ commit/push workflows skip re-running the gate:
129
+ ```bash
130
+ python3 ~/100xprism/hooks/gate-pass.py 2>/dev/null || true
131
+ ```
132
+ This writes a token for the **current tree state** (HEAD + tracked diff + untracked
133
+ files), so any later edit re-arms the gate. Only run it when all of Phases 1–4 passed.
134
+
135
+ ---
136
+
137
+ ## Phase 5 — Commit
138
+
139
+ Run the **commit** workflow. Stage, write, and create a conventional commit.
140
+
141
+ ---
142
+
143
+ ## Phase 6 — Push & Deploy
144
+
145
+ Run the **push** workflow. Push, handle hooks, monitor CI/CD, auto-fix failures if needed.
146
+
147
+ ---
148
+
149
+ ## Phase 6b — Deployment Verification
150
+
151
+ After CI/CD passes and deployment completes, run the full verification pipeline.
152
+
153
+ ```bash
154
+ # Detect project instruction file
155
+ INSTRUCTION_FILE=$(for f in CLAUDE.md AGENTS.md .cursorrules .windsurfrules .github/copilot-instructions.md GEMINI.md; do [ -f "$PROJECT_ROOT/$f" ] && echo "$PROJECT_ROOT/$f" && break; done)
156
+ ```
157
+
158
+ ### Step 1 — Health checks
159
+
160
+ Read health endpoint URLs from the project instruction file, README, or use common defaults:
161
+
162
+ ```bash
163
+ # From project instruction file
164
+ [ -n "$INSTRUCTION_FILE" ] && grep -E "https?://[^ ]*/health" "$INSTRUCTION_FILE" 2>/dev/null | head -3
165
+
166
+ # Common defaults to try
167
+ # /health, /healthz, /api/health, /status
168
+ ```
169
+
170
+ Hit each endpoint with a **bounded exponential backoff** loop — a fresh deploy may still
171
+ be rolling out, so don't hammer it at a fixed interval or wait forever:
172
+
173
+ ```bash
174
+ HEALTH_URL="$1" # resolved above
175
+ attempt=0; max_attempts=6; delay=2
176
+ until curl -fsS --max-time 5 "$HEALTH_URL" >/dev/null 2>&1; do
177
+ attempt=$((attempt + 1))
178
+ if [ "$attempt" -ge "$max_attempts" ]; then
179
+ echo "Health check failed after $max_attempts attempts (~$((2 ** max_attempts))s)"; exit 1
180
+ fi
181
+ echo "Health not ready (attempt $attempt/$max_attempts) — retrying in ${delay}s"
182
+ sleep "$delay"; delay=$((delay * 2)) # 2,4,8,16,32s — caps total wait, backs off cleanly
183
+ done
184
+ echo "Health OK after $attempt retr$([ "$attempt" = 1 ] && echo y || echo ies)"
185
+ ```
186
+
187
+ Confirm HTTP 200 and a healthy response body.
188
+
189
+ **If the loop exhausts `max_attempts` → trigger rollback (Step 4).**
190
+
191
+ ### Step 2 — Smoke tests
192
+
193
+ If E2E or smoke tests exist, run a targeted subset against production:
194
+
195
+ ```bash
196
+ # Detect smoke test locations
197
+ ls tests/smoke/ e2e/smoke/ tests/critical/ 2>/dev/null || true
198
+ ```
199
+
200
+ Detection patterns:
201
+ - Directories: `tests/smoke/`, `e2e/smoke/`, `tests/critical/`
202
+ - Tagged tests: `@smoke`, `@critical`, `mark.smoke`
203
+ - If no smoke tests exist, skip this step gracefully
204
+
205
+ Run detected smoke tests against the production URL configured in the project instruction file:
206
+
207
+ ```bash
208
+ # Look for production URL in project instruction file
209
+ [ -n "$INSTRUCTION_FILE" ] && grep -E "https?://[^ ]+" "$INSTRUCTION_FILE" 2>/dev/null | grep -iE "prod|production|live" | head -1
210
+ ```
211
+
212
+ **If smoke tests fail → trigger rollback (Step 4).**
213
+
214
+ ### Step 3 — Metrics check
215
+
216
+ If a monitoring URL is configured in the project instruction file:
217
+
218
+ ```bash
219
+ [ -n "$INSTRUCTION_FILE" ] && grep -iE "monitoring|grafana|datadog|newrelic" "$INSTRUCTION_FILE" 2>/dev/null | head -1
220
+ ```
221
+
222
+ If found:
223
+ - Note the monitoring URL for manual review
224
+ - Check for error rate information if accessible via API
225
+ - Flag if error rate appears elevated compared to normal
226
+
227
+ If no monitoring URL configured, skip this step gracefully.
228
+
229
+ ### Step 4 — Auto-rollback (on failure)
230
+
231
+ If any verification step fails:
232
+
233
+ ```bash
234
+ echo "Deployment verification FAILED. Rolling back..."
235
+
236
+ # Revert the last commit (safe — creates a new commit, not destructive)
237
+ git revert HEAD --no-edit
238
+
239
+ # Push the revert
240
+ git push origin "$(git branch --show-current)"
241
+ ```
242
+
243
+ After rollback:
244
+ 1. Re-run health checks to confirm rollback succeeded
245
+ 2. Report which verification step failed and why
246
+ 3. Provide full diagnosis
247
+
248
+ ```
249
+ ╔══════════════════════════════════════════════════════╗
250
+ ║ DEPLOYMENT FAILED — ROLLED BACK ║
251
+ ╠══════════════════════════════════════════════════════╣
252
+ ║ Health: ✅ PASSED / ❌ FAILED ║
253
+ ║ Smoke tests: ✅ PASSED / ❌ FAILED (details) ║
254
+ ║ Metrics: ✅ NORMAL / ⚠️ ELEVATED / skipped ║
255
+ ║ Action: Auto-reverted commit <hash> ║
256
+ ║ Rollback: ✅ Health confirms rollback OK ║
257
+ ╠══════════════════════════════════════════════════════╣
258
+ ║ STATUS: ROLLED BACK — human review required ║
259
+ ║ Diagnosis: [what failed and why] ║
260
+ ╚══════════════════════════════════════════════════════╝
261
+ ```
262
+
263
+ If rollback is set to `manual` in the project instruction file (`rollback: manual`), report the failure but do NOT auto-revert. Wait for human decision.
264
+
265
+ ### Verification output (on success)
266
+
267
+ ```
268
+ ╔══════════════════════════════════════════════════════╗
269
+ ║ DEPLOYMENT VERIFIED ║
270
+ ╠══════════════════════════════════════════════════════╣
271
+ ║ Health: ✅ All endpoints responding (200) ║
272
+ ║ Smoke tests: ✅ N/N passed | skipped ║
273
+ ║ Metrics: ✅ Error rate normal | skipped ║
274
+ ╠══════════════════════════════════════════════════════╣
275
+ ║ STATUS: DEPLOYED & VERIFIED ✅ ║
276
+ ╚══════════════════════════════════════════════════════╝
277
+ ```
278
+
279
+ ---
280
+
281
+ ## Phase 7 — Post-launch cleanup
282
+
283
+ ### 7a. Close related GitHub issues
284
+ Scan commit messages from this launch for issue references:
285
+ ```bash
286
+ git log $(git rev-parse HEAD~10 2>/dev/null || git rev-list --max-parents=0 HEAD)..HEAD \
287
+ --format='%s %b' 2>/dev/null | grep -oE '#[0-9]+' | sort -u
288
+ ```
289
+ For each referenced issue that is still open:
290
+ ```bash
291
+ gh issue close <N> --comment "Resolved in $(git log -1 --format='%h') — $(git log -1 --format='%s')" 2>/dev/null || true
292
+ ```
293
+ Skip issues already closed or in different repos.
294
+
295
+ ### 7b. Update ROADMAP.md (if exists)
296
+ ```bash
297
+ [ -f "$PROJECT_ROOT/ROADMAP.md" ] || exit 0
298
+ OPEN=$(gh issue list --state open --json number 2>/dev/null | python3 -c "import sys,json; print(len(json.load(sys.stdin)))" 2>/dev/null)
299
+ CLOSED=$(gh issue list --state closed --json number --limit 1000 2>/dev/null | python3 -c "import sys,json; print(len(json.load(sys.stdin)))" 2>/dev/null)
300
+ echo "Open: $OPEN | Closed: $CLOSED"
301
+ ```
302
+ Update the issue count summary line in `ROADMAP.md` if counts changed. Update `Last updated` date.
303
+
304
+ ### 7c. Update project instruction file (if features changed)
305
+ If new features were implemented or bugs fixed, update the feature audit table. Update `Last updated` date.
306
+
307
+ ### 7d. Commit doc updates (if any changed)
308
+ ```bash
309
+ git diff --name-only ROADMAP.md CLAUDE.md AGENTS.md .cursorrules .windsurfrules GEMINI.md 2>/dev/null | grep -q . && \
310
+ git add ROADMAP.md CLAUDE.md AGENTS.md .cursorrules .windsurfrules GEMINI.md 2>/dev/null && \
311
+ git commit -m "docs: update issue tracker counts and documentation after launch" && \
312
+ git push origin main || true
313
+ ```
314
+
315
+ ---
316
+
317
+ ## Summary output
318
+
319
+ ```
320
+ === Launch Summary ===
321
+ Phase 0 Docker: ✅ Built + healthy | skipped (no Dockerfile)
322
+ Phase 1 test: ✅ COVERAGE MET (XX%)
323
+ Phase 2 lint: ✅ PASSED
324
+ Phase 3 security: ✅ PASSED
325
+ Phase 4 Build: ✅ CLEAN
326
+ Phase 5 commit: <short-hash> <message> | Review ✅ no critical issues | ⚠️ N minor notes
327
+ Phase 6 Push: ✅ CI/CD passed | Health ✅ | Smoke ✅ | Metrics ✅
328
+ Phase 7 Cleanup: Issues closed: #N, #M ✅ | Docs updated ✅ | no changes
329
+ Status: LAUNCHED ✅
330
+ ```
331
+
332
+ ---
333
+
334
+ ## Troubleshooting
335
+
336
+ | Problem | Fix |
337
+ |---|---|
338
+ | Docker build fails | Fix Python/dependency or TypeScript errors, iterate |
339
+ | Coverage below 95% | `/test` loops automatically — let it finish |
340
+ | Test fails after fix | Re-run only that suite |
341
+ | Build fails with TS errors | Run `npm run typecheck` to isolate first |
342
+ | Pre-push hook fails | Fix → NEW commit → push again. Never `--no-verify` |
343
+ | Push rejected (non-fast-forward) | `git pull --rebase origin main` then push |
344
+ | `gh issue close` fails | Issue may be in a different repo — check `gh repo view` |
345
+ | ROADMAP counts don't match | Re-run `gh issue list` and reconcile manually |