tribunal-kit 4.5.1 โ†’ 4.6.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 (214) hide show
  1. package/.agent/.shared/ui-ux-pro-max/README.md +4 -4
  2. package/.agent/ARCHITECTURE.md +282 -277
  3. package/.agent/agents/accessibility-reviewer.md +187 -187
  4. package/.agent/agents/ai-code-reviewer.md +199 -199
  5. package/.agent/agents/api-architect.md +71 -66
  6. package/.agent/agents/backend-specialist.md +219 -215
  7. package/.agent/agents/cloud-engineer.md +98 -0
  8. package/.agent/agents/code-archaeologist.md +168 -161
  9. package/.agent/agents/database-architect.md +184 -184
  10. package/.agent/agents/db-latency-auditor.md +213 -216
  11. package/.agent/agents/debugger.md +198 -191
  12. package/.agent/agents/dependency-reviewer.md +106 -103
  13. package/.agent/agents/devops-engineer.md +218 -218
  14. package/.agent/agents/documentation-writer.md +209 -201
  15. package/.agent/agents/explorer-agent.md +167 -160
  16. package/.agent/agents/frontend-reviewer.md +162 -160
  17. package/.agent/agents/frontend-specialist.md +257 -248
  18. package/.agent/agents/game-developer.md +48 -48
  19. package/.agent/agents/logic-reviewer.md +118 -116
  20. package/.agent/agents/mobile-developer.md +197 -200
  21. package/.agent/agents/mobile-reviewer.md +159 -162
  22. package/.agent/agents/orchestrator.md +187 -181
  23. package/.agent/agents/penetration-tester.md +160 -157
  24. package/.agent/agents/performance-optimizer.md +183 -183
  25. package/.agent/agents/performance-reviewer.md +178 -178
  26. package/.agent/agents/precedence-reviewer.md +251 -250
  27. package/.agent/agents/product-manager.md +149 -142
  28. package/.agent/agents/product-owner.md +81 -80
  29. package/.agent/agents/project-planner.md +152 -142
  30. package/.agent/agents/qa-automation-engineer.md +216 -225
  31. package/.agent/agents/resilience-reviewer.md +88 -88
  32. package/.agent/agents/schema-reviewer.md +67 -67
  33. package/.agent/agents/security-auditor.md +180 -174
  34. package/.agent/agents/seo-specialist.md +188 -193
  35. package/.agent/agents/sql-reviewer.md +159 -161
  36. package/.agent/agents/supervisor-agent.md +173 -184
  37. package/.agent/agents/swarm-worker-contracts.md +170 -166
  38. package/.agent/agents/swarm-worker-registry.md +92 -92
  39. package/.agent/agents/system-architect.md +85 -0
  40. package/.agent/agents/test-coverage-reviewer.md +158 -160
  41. package/.agent/agents/test-engineer.md +118 -118
  42. package/.agent/agents/throughput-optimizer.md +291 -299
  43. package/.agent/agents/type-safety-reviewer.md +182 -175
  44. package/.agent/agents/ui-ux-auditor.md +300 -292
  45. package/.agent/agents/vitals-reviewer.md +223 -223
  46. package/.agent/mcp_config.json +37 -40
  47. package/.agent/patterns/generator.md +11 -9
  48. package/.agent/patterns/inversion.md +14 -12
  49. package/.agent/patterns/pipeline.md +11 -9
  50. package/.agent/patterns/reviewer.md +15 -13
  51. package/.agent/patterns/tool-wrapper.md +11 -9
  52. package/.agent/routing_index.json +714 -0
  53. package/.agent/rules/GEMINI.md +359 -352
  54. package/.agent/scripts/compile_router.py +112 -0
  55. package/.agent/scripts/migrate_skills_frontmatter.py +64 -0
  56. package/.agent/scripts/strengthen_skills.js +1 -1
  57. package/.agent/skills/advanced-rag-pipelines/SKILL.md +56 -0
  58. package/.agent/skills/agent-organizer/SKILL.md +156 -150
  59. package/.agent/skills/agentic-patterns/SKILL.md +313 -315
  60. package/.agent/skills/ai-prompt-injection-defense/SKILL.md +190 -184
  61. package/.agent/skills/api-patterns/SKILL.md +253 -247
  62. package/.agent/skills/api-security-auditor/SKILL.md +195 -193
  63. package/.agent/skills/app-builder/SKILL.md +573 -572
  64. package/.agent/skills/app-builder/templates/SKILL.md +108 -115
  65. package/.agent/skills/app-builder/templates/astro-static/TEMPLATE.md +76 -76
  66. package/.agent/skills/app-builder/templates/chrome-extension/TEMPLATE.md +92 -92
  67. package/.agent/skills/app-builder/templates/cli-tool/TEMPLATE.md +88 -88
  68. package/.agent/skills/app-builder/templates/electron-desktop/TEMPLATE.md +88 -88
  69. package/.agent/skills/app-builder/templates/express-api/TEMPLATE.md +83 -83
  70. package/.agent/skills/app-builder/templates/flutter-app/TEMPLATE.md +90 -90
  71. package/.agent/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +90 -90
  72. package/.agent/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +126 -122
  73. package/.agent/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +127 -122
  74. package/.agent/skills/app-builder/templates/nextjs-static/TEMPLATE.md +172 -169
  75. package/.agent/skills/app-builder/templates/nuxt-app/TEMPLATE.md +139 -134
  76. package/.agent/skills/app-builder/templates/python-fastapi/TEMPLATE.md +83 -83
  77. package/.agent/skills/app-builder/templates/react-native-app/TEMPLATE.md +122 -119
  78. package/.agent/skills/appflow-wireframe/SKILL.md +146 -145
  79. package/.agent/skills/architecture/SKILL.md +226 -219
  80. package/.agent/skills/authentication-best-practices/SKILL.md +197 -189
  81. package/.agent/skills/backend-security-expert/SKILL.md +16 -2
  82. package/.agent/skills/bash-linux/SKILL.md +179 -179
  83. package/.agent/skills/behavioral-modes/SKILL.md +239 -223
  84. package/.agent/skills/brainstorming/SKILL.md +498 -486
  85. package/.agent/skills/browser-native-ai/SKILL.md +57 -4
  86. package/.agent/skills/building-native-ui/SKILL.md +202 -202
  87. package/.agent/skills/cicd-pro/SKILL.md +442 -0
  88. package/.agent/skills/clean-code/SKILL.md +400 -381
  89. package/.agent/skills/cloud-architect/SKILL.md +439 -0
  90. package/.agent/skills/code-review-checklist/SKILL.md +203 -194
  91. package/.agent/skills/config-validator/SKILL.md +165 -165
  92. package/.agent/skills/containerization-pro/SKILL.md +452 -0
  93. package/.agent/skills/csharp-developer/SKILL.md +518 -518
  94. package/.agent/skills/data-validation-schemas/SKILL.md +333 -328
  95. package/.agent/skills/database-design/SKILL.md +247 -240
  96. package/.agent/skills/deployment-procedures/SKILL.md +172 -169
  97. package/.agent/skills/devops-engineer/SKILL.md +345 -345
  98. package/.agent/skills/devops-incident-responder/SKILL.md +143 -137
  99. package/.agent/skills/documentation-templates/SKILL.md +291 -279
  100. package/.agent/skills/edge-computing/SKILL.md +183 -181
  101. package/.agent/skills/emil-design-eng/SKILL.md +147 -0
  102. package/.agent/skills/error-resilience/SKILL.md +411 -428
  103. package/.agent/skills/extract-design-system/SKILL.md +160 -158
  104. package/.agent/skills/framer-motion-expert/SKILL.md +253 -244
  105. package/.agent/skills/frontend-design/SKILL.md +208 -201
  106. package/.agent/skills/frontend-security-expert/SKILL.md +16 -3
  107. package/.agent/skills/game-design-expert/SKILL.md +132 -129
  108. package/.agent/skills/game-engineering-expert/SKILL.md +148 -146
  109. package/.agent/skills/generative-ui-expert/SKILL.md +57 -1
  110. package/.agent/skills/geo-fundamentals/SKILL.md +148 -147
  111. package/.agent/skills/git-pro/SKILL.md +435 -0
  112. package/.agent/skills/github-operations/SKILL.md +335 -329
  113. package/.agent/skills/gsap-core/SKILL.md +319 -308
  114. package/.agent/skills/gsap-frameworks/SKILL.md +213 -207
  115. package/.agent/skills/gsap-performance/SKILL.md +139 -133
  116. package/.agent/skills/gsap-plugins/SKILL.md +486 -480
  117. package/.agent/skills/gsap-react/SKILL.md +202 -189
  118. package/.agent/skills/gsap-scrolltrigger/SKILL.md +357 -350
  119. package/.agent/skills/gsap-timeline/SKILL.md +165 -161
  120. package/.agent/skills/gsap-utils/SKILL.md +344 -338
  121. package/.agent/skills/harness-protocol/SKILL.md +48 -0
  122. package/.agent/skills/i18n-localization/SKILL.md +174 -163
  123. package/.agent/skills/intelligent-routing/SKILL.md +202 -246
  124. package/.agent/skills/knowledge-graph/SKILL.md +60 -52
  125. package/.agent/skills/lint-and-validate/SKILL.md +261 -261
  126. package/.agent/skills/llm-engineering/SKILL.md +400 -394
  127. package/.agent/skills/local-first/SKILL.md +178 -178
  128. package/.agent/skills/mcp-builder/SKILL.md +143 -142
  129. package/.agent/skills/mobile-design/SKILL.md +272 -263
  130. package/.agent/skills/monorepo-management/SKILL.md +335 -334
  131. package/.agent/skills/motion-engineering/SKILL.md +266 -234
  132. package/.agent/skills/nextjs-react-expert/SKILL.md +236 -234
  133. package/.agent/skills/nodejs-best-practices/SKILL.md +547 -548
  134. package/.agent/skills/observability/SKILL.md +343 -343
  135. package/.agent/skills/parallel-agents/SKILL.md +143 -146
  136. package/.agent/skills/performance-profiling/SKILL.md +259 -267
  137. package/.agent/skills/plan-writing/SKILL.md +150 -142
  138. package/.agent/skills/platform-engineer/SKILL.md +148 -147
  139. package/.agent/skills/playwright-best-practices/SKILL.md +188 -187
  140. package/.agent/skills/powershell-windows/SKILL.md +162 -162
  141. package/.agent/skills/project-idioms/SKILL.md +137 -137
  142. package/.agent/skills/python-patterns/SKILL.md +260 -259
  143. package/.agent/skills/python-pro/SKILL.md +324 -323
  144. package/.agent/skills/react-specialist/SKILL.md +305 -277
  145. package/.agent/skills/readme-builder/SKILL.md +310 -300
  146. package/.agent/skills/realtime-patterns/SKILL.md +323 -319
  147. package/.agent/skills/red-team-tactics/SKILL.md +231 -218
  148. package/.agent/skills/review-animations/SKILL.md +72 -0
  149. package/.agent/skills/review-animations/STANDARDS.md +73 -0
  150. package/.agent/skills/rust-pro/SKILL.md +671 -673
  151. package/.agent/skills/seo-fundamentals/SKILL.md +179 -179
  152. package/.agent/skills/server-management/SKILL.md +218 -214
  153. package/.agent/skills/shadcn-ui-expert/SKILL.md +231 -231
  154. package/.agent/skills/skill-creator/SKILL.md +87 -86
  155. package/.agent/skills/sql-pro/SKILL.md +629 -629
  156. package/.agent/skills/supabase-postgres-best-practices/SKILL.md +97 -97
  157. package/.agent/skills/swiftui-expert/SKILL.md +204 -201
  158. package/.agent/skills/system-design-pro/SKILL.md +345 -0
  159. package/.agent/skills/systematic-debugging/SKILL.md +153 -142
  160. package/.agent/skills/tailwind-patterns/SKILL.md +610 -566
  161. package/.agent/skills/tdd-workflow/SKILL.md +169 -161
  162. package/.agent/skills/test-result-analyzer/SKILL.md +313 -309
  163. package/.agent/skills/testing-patterns/SKILL.md +566 -579
  164. package/.agent/skills/trend-researcher/SKILL.md +243 -237
  165. package/.agent/skills/typescript-advanced/SKILL.md +336 -335
  166. package/.agent/skills/ui-ux-pro-max/SKILL.md +590 -562
  167. package/.agent/skills/ui-ux-researcher/SKILL.md +244 -244
  168. package/.agent/skills/vue-expert/SKILL.md +294 -275
  169. package/.agent/skills/vulnerability-scanner/SKILL.md +416 -404
  170. package/.agent/skills/web-accessibility-auditor/SKILL.md +219 -218
  171. package/.agent/skills/web-design-guidelines/SKILL.md +192 -186
  172. package/.agent/skills/webapp-testing/SKILL.md +167 -169
  173. package/.agent/skills/webgpu-performance/SKILL.md +56 -2
  174. package/.agent/skills/whimsy-injector/SKILL.md +346 -325
  175. package/.agent/skills/workflow-optimizer/SKILL.md +231 -229
  176. package/.agent/workflows/acf.md +141 -0
  177. package/.agent/workflows/api-tester.md +176 -151
  178. package/.agent/workflows/audit.md +150 -127
  179. package/.agent/workflows/brainstorm.md +134 -110
  180. package/.agent/workflows/changelog.md +140 -112
  181. package/.agent/workflows/create.md +168 -124
  182. package/.agent/workflows/debug.md +190 -165
  183. package/.agent/workflows/deploy.md +201 -180
  184. package/.agent/workflows/enhance.md +154 -128
  185. package/.agent/workflows/fix.md +136 -114
  186. package/.agent/workflows/generate.md +198 -183
  187. package/.agent/workflows/marathon.md +37 -11
  188. package/.agent/workflows/migrate.md +184 -160
  189. package/.agent/workflows/orchestrate.md +192 -168
  190. package/.agent/workflows/performance-benchmarker.md +135 -114
  191. package/.agent/workflows/plan.md +196 -173
  192. package/.agent/workflows/preview.md +103 -80
  193. package/.agent/workflows/refactor.md +192 -161
  194. package/.agent/workflows/review-ai.md +125 -101
  195. package/.agent/workflows/review.md +141 -116
  196. package/.agent/workflows/session.md +122 -94
  197. package/.agent/workflows/status.md +101 -79
  198. package/.agent/workflows/strengthen-skills.md +164 -138
  199. package/.agent/workflows/super-prompt.md +24 -0
  200. package/.agent/workflows/swarm.md +193 -179
  201. package/.agent/workflows/test.md +211 -189
  202. package/.agent/workflows/tribunal-backend.md +136 -105
  203. package/.agent/workflows/tribunal-database.md +129 -95
  204. package/.agent/workflows/tribunal-frontend.md +140 -96
  205. package/.agent/workflows/tribunal-full.md +131 -100
  206. package/.agent/workflows/tribunal-mobile.md +129 -95
  207. package/.agent/workflows/tribunal-performance.md +136 -110
  208. package/.agent/workflows/tribunal-speed.md +209 -183
  209. package/.agent/workflows/ui-ux-pro-max.md +155 -122
  210. package/README.md +107 -55
  211. package/mcp_config.json +1 -3
  212. package/package.json +94 -94
  213. package/.agent/GEMINI.md +0 -121
  214. package/.agent/skills/doc.md +0 -177
@@ -1,490 +1,500 @@
1
- ---
2
- name: brainstorming
3
- description: Socratic methodology, ideation, and architectural exploration mastery. Generating extensive feature options, analyzing trade-offs, questioning assumptions, mind-mapping components, and delaying execution. Use when evaluating new features, defining project goals, or guiding users through ambiguous design spaces.
4
- allowed-tools: Read, Write, Edit, Glob, Grep
5
- version: 3.1.0
6
- last-updated: 2026-04-06
7
- applies-to-model: gemini-2.5-pro, claude-3-7-sonnet
8
- ---
9
-
10
- ## Hallucination Traps (Read First)
11
- - โŒ Jumping to implementation during brainstorming -> โœ… Brainstorming is exploration only; no code is written in this phase
12
- - โŒ Presenting only one option -> โœ… Always present 3+ distinct approaches with tradeoffs
13
- - โŒ Assuming the user's first request is their real need -> โœ… Ask 'what problem does this solve for your users?' before generating ideas
14
-
15
- ---
16
-
17
-
18
- # Brainstorming โ€” Socratic Exploration Mastery
19
-
20
- ---
21
-
22
- ## 1. The Socratic Protocol (Mandatory Delay)
23
-
24
- When a user provides a vague or complex prompt like *"I want to build a marketplace app,"* DO NOT start generating boilerplate code or database schemas.
25
-
26
- **You must act as a Socratic filter.**
27
- 1. Acknowledge the ambition of the goal.
28
- 2. Provide 3-5 distinct architectural/functional pathways the user could take.
29
- 3. Pause execution. Demand the user makes definitive decisions regarding the permutations before proceeding.
30
-
31
- ### Example Socratic Prompting:
32
- Instead of: *"Here is the React code for your marketplace,"*
33
- Output: *"Before we write the code, we must lock down the payment flow. Do you want to: A) Handle escrow directly (High liability, complex payout logic), B) Use Stripe Connect (Easy routing, strict KYC requirements), or C) Operate free-listing only (Zero liability, requires external monetization)?"*
34
-
35
- ---
36
-
37
- ## 2. Multi-Dimensional Tradeoff Analysis
38
-
39
- Every design choice has drawbacks. The brainstorming agent must illuminate the implicit consequences of the user's requests.
40
-
41
- When comparing options, strict tabular formatting clarifies friction:
42
-
43
- |Approach|Speed to Market|Operational Cost|Latency / UX|Maintenance Burden|
44
- |:---|:---|:---|:---|:---|
45
- |**Serverless Functions**|Very high|Low initially (pay-per-use)|Cold starts (500ms delay)|Complex local testing|
46
- |**Monolithic Node VPS**|Moderate|Flat ($10/mo fixed)|Extremely fast (0ms start)|Requires manual OS patching|
47
- |**Edge Compute (V8)**|Low|Moderate|Global low-latency|Strict 1MB limits / V8 restrictions|
48
-
49
- *Result:* The user chooses the approach mapped to their business reality, not a generic AI default.
50
-
51
- ---
52
-
53
- ## 3. Lateral Expansion (The "What If?" Matrix)
54
-
55
- Users frequently suffer from tunnel-vision regarding their requested feature. The Brainstormer introduces lateral features the user hasn't considered yet to solidify the schema boundaries.
56
-
57
- If user asks for: **"A habit tracking calendar."**
58
- *Expand laterally:*
59
- - "What if a user crosses timezones frequently? Do streaks break?"
60
- - "What if they track binary habits (Read: Yes/No) versus quantitative habits (Drink 6 Liters of water)?"
61
- - "What if they require offline capability while on airplanes?"
62
-
63
- ---
64
-
65
- ## 4. Distilling Decisions into Assertions
66
-
67
- Brainstorming is useless if it does not produce an actionable blueprint.
68
- At the end of a brainstorming session, the output MUST be distilled into a rigid requirements document or transition into `plan-writing`.
69
-
70
- ```markdown
71
- # Final Brainstorming Assertions
72
- 1. **Architecture:** Next.js SSR Monolith
73
- 2. **Database:** Postgres via Prisma (Required for complex relational queries)
74
- 3. **Payment:** Stripe Connect (Subverted liability)
75
- 4. **Auth:** NextAuth (Google Provider only for MVP)
76
- ```
77
-
78
- ---
79
-
80
- ## Dynamic Question Generation
81
-
82
- **PRINCIPLE:** Questions are not about gathering dataโ€”they are about **revealing architectural consequences**.
83
-
84
- Every question must connect to a concrete implementation decision that affects cost, complexity, or timeline.
85
-
86
- ---
87
-
88
- ### ๐Ÿง  Core Principles
89
-
90
- #### 1. Questions Reveal Consequences
91
-
92
- A good question is not "What color do you want?" but:
93
-
94
- ```markdown
95
- โŒ BAD: "What authentication method?"
96
- โœ… GOOD: "Should users sign up with email/password or social login?
97
-
98
- Impact:
99
- - Email/Pass โ†’ Need password reset, hashing, 2FA infrastructure
100
- - Social โ†’ OAuth providers, user profile mapping, less control
101
-
102
- Trade-off: Security vs. Development time vs. User friction"
103
- ```
104
-
105
- #### 2. Context Before Content
106
-
107
- First understand **where** this request fits:
108
-
109
- |Context|Question Focus|
110
- |---------|----------------|
111
- |**Greenfield** (new project)|Foundation decisions: stack, hosting, scale|
112
- |**Feature Addition**|Integration points, existing patterns, breaking changes|
113
- |**Refactor**|Why refactor? Performance? Maintainability? What's broken?|
114
-
115
- #### 3. Minimum Viable Questions
116
-
117
- **PRINCIPLE:** Each question must eliminate a fork in the implementation road.
118
-
119
- ```
120
- Before Question:
121
- โ”œโ”€โ”€ Path A: Do X (5 min)
122
- โ”œโ”€โ”€ Path B: Do Y (15 min)
123
- โ””โ”€โ”€ Path C: Do Z (1 hour)
124
-
125
- After Question:
126
- โ””โ”€โ”€ Path Confirmed: Do X (5 min)
127
- ```
128
-
129
- If a question doesn't reduce implementation paths โ†’ **DELETE IT**.
130
-
131
- #### 4. Questions Generate Data, Not Assumptions
132
-
133
- ```markdown
134
- โŒ ASSUMPTION: "User probably wants Stripe for payments"
135
- โœ… QUESTION: "Which payment provider fits your needs?
136
-
137
- Stripe โ†’ Best documentation, 2.9% + $0.30, US-centric
138
- LemonSqueezy โ†’ Merchant of Record, 5% + $0.50, global taxes
139
- Paddle โ†’ Complex pricing, handles EU VAT, enterprise focus"
140
- ```
141
-
142
- ---
143
-
144
- ### ๐Ÿ“‹ Question Generation Algorithm
145
-
146
- ```
147
- INPUT: User request + Context (greenfield/feature/refactor/debug)
148
- โ”‚
149
- โ”œโ”€โ”€ STEP 1: Parse Request
150
- โ”‚ โ”œโ”€โ”€ Extract domain (ecommerce, auth, realtime, cms, etc.)
151
- โ”‚ โ”œโ”€โ”€ Extract features (explicit and implied)
152
- โ”‚ โ””โ”€โ”€ Extract scale indicators (users, data volume, frequency)
153
- โ”‚
154
- โ”œโ”€โ”€ STEP 2: Identify Decision Points
155
- โ”‚ โ”œโ”€โ”€ What MUST be decided before coding? (blocking)
156
- โ”‚ โ”œโ”€โ”€ What COULD be decided later? (deferable)
157
- โ”‚ โ””โ”€โ”€ What has ARCHITECTURAL impact? (high-leverage)
158
- โ”‚
159
- โ”œโ”€โ”€ STEP 3: Generate Questions (Priority Order)
160
- โ”‚ โ”œโ”€โ”€ P0: Blocking decisions (cannot proceed without answer)
161
- โ”‚ โ”œโ”€โ”€ P1: High-leverage (affects >30% of implementation)
162
- โ”‚ โ”œโ”€โ”€ P2: Medium-leverage (affects specific features)
163
- โ”‚ โ””โ”€โ”€ P3: Nice-to-have (edge cases, optimization)
164
- โ”‚
165
- โ””โ”€โ”€ STEP 4: Format Each Question
166
- โ”œโ”€โ”€ What: Clear question
167
- โ”œโ”€โ”€ Why: Impact on implementation
168
- โ”œโ”€โ”€ Options: Trade-offs (not just A vs B)
169
- โ”œโ”€โ”€ Fun/Superpower Option: Inject at least one highly creative, unconventional approach
170
- โ””โ”€โ”€ Default: What happens if user doesn't answer
171
- ```
172
-
173
- ---
174
-
175
- ### ๐ŸŽฏ Domain-Specific Question Banks
176
-
177
- #### E-Commerce
178
-
179
- |Question|Why It Matters|Trade-offs|
180
- |----------|----------------|------------|
181
- |**Single or Multi-vendor?**|Multi-vendor โ†’ Commission logic, vendor dashboards, split payments|+Revenue, -Complexity|
182
- |**Inventory Tracking?**|Needs stock tables, reservation logic, low-stock alerts|+Accuracy, -Development time|
183
- |**Digital or Physical Products?**|Digital โ†’ Download links, no shipping|Physical โ†’ Shipping APIs, tracking|
184
- |**Subscription or One-time?**|Subscription โ†’ Recurring billing, dunning, proration|+Revenue, -Complexity|
185
-
186
- #### Authentication
187
-
188
- |Question|Why It Matters|Trade-offs|
189
- |----------|----------------|------------|
190
- |**Social Login Needed?**|OAuth providers vs. password reset infrastructure|+UX, -Control|
191
- |**Role-Based Permissions?**|RBAC tables, policy enforcement, admin UI|+Security, -Development time|
192
- |**2FA Required?**|TOTP/SMI infrastructure, backup codes, recovery flow|+Security, -UX friction|
193
- |**Email Verification?**|Verification tokens, email service, resend logic|+Security, -Sign-up friction|
194
-
195
- #### Real-time
196
-
197
- |Question|Why It Matters|Trade-offs|
198
- |----------|----------------|------------|
199
- |**WebSocket or Polling?**|WS โ†’ Server scaling, connection management|Polling โ†’ Simpler, higher latency|
200
- |**Expected Concurrent Users?**|<100 โ†’ Single server, >1000 โ†’ Redis pub/sub, >10k โ†’ specialized infra|+Scale, -Complexity|
201
- |**Message Persistence?**|History tables, storage costs, pagination|+UX, -Storage|
202
- |**Ephemeral or Durable?**|Ephemeral โ†’ In-memory, Durable โ†’ Database write before emit|+Reliability, -Latency|
203
-
204
- #### Content/CMS
205
-
206
- |Question|Why It Matters|Trade-offs|
207
- |----------|----------------|------------|
208
- |**Rich Text or Markdown?**|Rich Text โ†’ Sanitization, XSS risks|Markdown โ†’ Simple, no WYSIWYG|
209
- |**Draft/Publish Workflow?**|Status field, scheduled jobs, versioning|+Control, -Complexity|
210
- |**Media Handling?**|Upload endpoints, storage, optimization|+Features, -Development time|
211
- |**Multi-language?**|i18n tables, translation UI, fallback logic|+Reach, -Complexity|
212
-
213
- #### Business & Product Strategy
214
-
215
- |Question|Why It Matters|Trade-offs|
216
- |----------|----------------|------------|
217
- |**Monetization Approach?**|Freemium vs. Paywall vs. Ads affects user flow|+Revenue, -User Acquisition|
218
- |**Onboarding CRO?**|Wizard vs. self-serve dictates state management|+Activation, -Dev Time|
219
- |**Competitor Differentiator?**|Must highlight this UI feature above all else|+Standout, -Standardization|
220
- |**Marketing Psychology?**|FOMO (urgency) vs. Trust (social proof) layout|+Conversion, -Aesthetics|
221
-
222
- ---
223
-
224
- ### ๐Ÿ“ Dynamic Question Template
225
-
226
- ```markdown
227
-
228
- ### ๐Ÿ”ด CRITICAL (Blocking Decisions)
229
-
230
- #### 1. **[DECISION POINT]**
231
-
232
- **Question:** [Clear, specific question]
233
-
234
- **Why This Matters:**
235
- - [Explain architectural consequence]
236
- - [Affects: cost / complexity / timeline / scale]
237
-
238
- **Options:**
239
- |Option|Pros|Cons|Best For|
240
- |--------|------|------|----------|
241
- |A|[Advantage]|[Disadvantage]|[Use case]|
242
- |B|[Advantage]|[Disadvantage]|[Use case]|
243
-
244
- **If Not Specified:** [Default choice + rationale]
245
-
246
- ---
247
-
248
- ### ๐ŸŸก HIGH-LEVERAGE (Affects Implementation)
249
-
250
- #### 2. **[DECISION POINT]**
251
- [Same format]
252
-
253
- ---
254
-
255
- ### ๐ŸŸข NICE-TO-HAVE (Edge Cases)
256
-
257
- #### 3. **[DECISION POINT]**
258
- [Same format]
259
- ```
260
-
261
- ---
262
-
263
- ### ๐Ÿ”„ Iterative Questioning
264
-
265
- #### First Pass (3-5 Questions)
266
- Focus on **blocking decisions**. Don't proceed without answers.
267
-
268
- #### Second Pass (After Initial Implementation)
269
- As patterns emerge, ask:
270
- - "This feature implies [X]. Should we handle [edge case] now or defer?"
271
- - "We're using [Pattern A]. Should [Feature B] follow the same pattern?"
272
-
273
- #### Third Pass (Optimization)
274
- When functionality works:
275
- - "Performance bottleneck at [X]. Optimize now or acceptable for now?"
276
- - "Refactor [Y] for maintainability or ship as-is?"
277
-
278
- ---
279
-
280
- ### ๐ŸŽญ Example: Full Question Generation
281
-
282
- ```
283
- USER REQUEST: "Build an Instagram clone"
284
-
285
- STEP 1: Parse
286
- โ”œโ”€โ”€ Domain: Social Media
287
- โ”œโ”€โ”€ Features: Photo sharing, engagement (likes/comments), user profiles
288
- โ”œโ”€โ”€ Implied: Feed, following, authentication
289
- โ””โ”€โ”€ Scale: Potentially high (social apps go viral)
290
-
291
- STEP 2: Decision Points
292
- โ”œโ”€โ”€ Blocking: Storage strategy, authentication method, feed type
293
- โ”œโ”€โ”€ High-leverage: Real-time notifications, data model complexity
294
- โ””โ”€โ”€ Deferable: Analytics, advanced search, reels/video
295
-
296
- STEP 3: Generate Questions (Priority)
297
-
298
- P0 (Blocking):
299
- 1. Storage Strategy โ†’ Affects architecture, cost, speed
300
- 2. Feed Algorithm โ†’ Affects database queries, complexity
301
- 3. Auth Method โ†’ Affects dev time, UX, security
302
-
303
- P1 (High-leverage):
304
- 4. Real-time Notifications โ†’ WebSocket vs polling
305
- 5. Media Processing โ†’ Client-side vs server-side optimization
306
-
307
- P2 (Deferable):
308
- 6. Story/Reels โ†’ Major feature creep, defer to v2
309
- 7. DM/Chat โ†’ Separate subsystem, defer to v2
310
-
311
- STEP 4: Format Output
312
- ```
313
-
314
- ---
315
-
316
- ### ๐Ÿ“Š Generated Output (Example)
317
-
318
- ```
319
-
320
- ### ๐Ÿ”ด CRITICAL DECISIONS (Cannot Proceed Without Answers)
321
-
322
- #### 1. **Photo Storage Strategy**
323
-
324
- **Question:** Where will user photos be stored and served?
325
-
326
- **Why This Matters:**
327
- - Affects: Monthly hosting costs, page load speed, CDN complexity
328
- - High-volume social apps: 1000 users ร— 10 photos ร— 2MB = 20GB storage
329
-
330
- **Options:**
331
- |Option|Cost|Speed|Complexity|Best For|
332
- |--------|------|-------|------------|----------|
333
- |**Cloudinary**|$89/mo (25GB)|Fast (CDN)|Low|MVP, rapid launch|
334
- |**AWS S3 + CloudFront**|$0.023/GB|Fast (CDN)|Medium|Production, cost-optimized|
335
- |**Supabase Storage**|Free tier 1GB|Medium|Low|Small scale, simple|
336
- |**Local Storage**|Server cost|Slow|Low|Development only|
337
-
338
- **If Not Specified:** Cloudinary (balanced for MVP)
339
-
340
- ---
341
-
342
- #### 2. **Feed Algorithm Choice**
343
-
344
- **Question:** How should the main feed work?
345
-
346
- **Why This Matters:**
347
- - Affects: Database query complexity, caching strategy, development time
348
- - Algorithmic feeds require ML infrastructure, ranking signals
349
-
350
- **Options:**
351
- |Option|Complexity|Database Impact|Best For|
352
- |--------|------------|-----------------|----------|
353
- |**Chronological**|Low|Simple query|Early stage, transparency|
354
- |**Follow-Only**|Medium|JOIN with pagination|Most social apps|
355
- |**Algorithmic**|High|Pre-computed feed tables|Instagram competitor|
356
-
357
- **If Not Specified:** Follow-Only (balanced for social app)
358
-
359
- ---
360
-
361
- #### 3. **Authentication Approach**
362
-
363
- **Question:** How do users sign up and login?
364
-
365
- **Why This Matters:**
366
- - Affects: Development time (2-5 hours), security posture, UX friction
367
-
368
- **Options:**
369
- |Option|Dev Time|Security|UX|Best For|
370
- |--------|----------|----------|-----|----------|
371
- |**Email/Password**|4-5 hrs|High (if 2FA)|Medium|Full control needed|
372
- |**Social Only**|1-2 hrs|Provider-dependent|Smooth|B2C, rapid launch|
373
- |**Magic Link**|2-3 hrs|Medium|Very smooth|Security-focused|
374
- |**Clerk/Auth0**|1 hr|High|Smooth|Fastest to market|
375
-
376
- **If Not Specified:** Clerk (fastest for MVP)
377
-
378
- ---
379
-
380
- ### ๐ŸŸก HIGH-LEVERAGE (Affects Architecture)
381
-
382
- #### 4. **Real-time Notifications**
383
-
384
- **Question:** Do users need instant notifications for likes/comments?
385
-
386
- **Why This Matters:**
387
- - WebSocket adds infrastructure complexity (Redis pub/sub for scaling)
388
- - Polling is simpler but higher latency
389
-
390
- **Options:**
391
- |Option|Complexity|Scale Cost|Best For|
392
- |--------|------------|------------|----------|
393
- |**WebSocket + Redis**|High|$10+/mo|>1000 concurrent users|
394
- |**Polling (30s)**|Low|DB queries|<1000 users|
395
- |**No Real-time**|None|None|MVP, validate first|
396
-
397
- **If Not Specified:** Polling for MVP (defer WebSocket until validated)
398
-
399
- ---
400
-
401
- ### ๐ŸŸข NICE-TO-HAVE (Defer to v2)
402
-
403
- #### 5. **Video/Reels Support**
404
- - Major complexity (video processing, streaming infrastructure)
405
- - Recommendation: Launch with photos only, add video after validation
406
-
407
- #### 6. **Direct Messaging**
408
- - Separate subsystem (chat infrastructure different from feed)
409
- - Recommendation: Use Pusher/Stream for real-time or defer entirely
410
-
411
- ---
412
-
413
- ### ๐Ÿ“‹ Summary
414
-
415
- |Decision|Recommendation|If Changed|
416
- |----------|----------------|------------|
417
- |Storage|Cloudinary|+3 hrs setup|
418
- |Feed|Follow-only|+2 hrs query optimization|
419
- |Auth|Clerk|-3 hrs dev time|
420
- |Real-time|Polling|+5 hrs WebSocket setup|
421
- |Video|Defer to v2|N/A|
422
- |DM|Defer to v2|N/A|
423
-
424
- **Total Estimated MVP Time:** 15-20 hours with recommendations above
425
- ```
426
-
427
- ---
428
-
429
- ### ๐ŸŽฏ Principles Recap
430
-
431
- 1. **Every question = Architectural decision** โ†’ Not data gathering
432
- 2. **Show trade-offs** โ†’ User understands consequences
433
- 3. **Prioritize blocking decisions** โ†’ Cannot proceed without
434
- 4. **Provide defaults** โ†’ If user doesn't answer, we proceed anyway
435
- 5. **Domain-aware** โ†’ Ecommerce questions โ‰  Auth questions โ‰  Real-time questions
436
- 6. **Iterative** โ†’ More questions as patterns emerge during implementation
437
-
438
-
439
- ---
440
-
441
-
442
-
443
- AI coding assistants often fall into specific bad habits when dealing with this domain. These are strictly forbidden:
444
-
445
- 1. **Over-engineering:** Proposing complex abstractions or distributed systems when a simpler approach suffices.
446
- 2. **Hallucinated Libraries/Methods:** Using non-existent methods or packages. Always `// VERIFY` or check `package.json` / `requirements.txt`.
447
- 3. **Skipping Edge Cases:** Writing the "happy path" and ignoring error handling, timeouts, or data validation.
448
- 4. **Context Amnesia:** Forgetting the user's constraints and offering generic advice instead of tailored solutions.
449
- 5. **Silent Degradation:** Catching and suppressing errors without logging or re-raising.
450
-
451
- ---
452
-
453
-
454
-
455
- **Slash command: `/review` or `/tribunal-full`**
456
- **Active reviewers: `logic-reviewer` ยท `security-auditor`**
457
-
458
- ### โŒ Forbidden AI Tropes
459
-
460
- 1. **Blind Assumptions:** Never make an assumption without documenting it clearly with `// VERIFY: [reason]`.
461
- 2. **Silent Degradation:** Catching and suppressing errors without logging or handling.
462
- 3. **Context Amnesia:** Forgetting the user's constraints and offering generic advice instead of tailored solutions.
463
-
464
-
465
-
466
- Review these questions before confirming output:
467
- ```
468
- โœ… Did I rely ONLY on real, verified tools and methods?
469
- โœ… Is this solution appropriately scoped to the user's constraints?
470
- โœ… Did I handle potential failure modes and edge cases?
471
- โœ… Have I avoided generic boilerplate that doesn't add value?
472
- ```
473
-
474
- ### ๐Ÿ›‘ Verification-Before-Completion (VBC) Protocol
475
-
476
- **CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
477
- - โŒ **Forbidden:** Declaring a task complete because the output "looks correct."
478
- - โœ… **Required:** You are explicitly forbidden from finalizing any task without providing **concrete evidence** (terminal output, passing tests, compile success, or equivalent proof) that your output works as intended.
479
-
480
-
481
- ## Pre-Flight Checklist
482
- - [ ] Have I reviewed the user's specific constraints and requests?
483
- - [ ] Have I checked the environment for relevant existing implementations?
484
-
485
- ## VBC Protocol (Verification-Before-Completion)
486
- You MUST verify existing code signatures and variables before attempting to modify or call them. No hallucination is permitted.
1
+ ---
2
+ name: brainstorming
3
+ description: Socratic methodology, ideation, and architectural exploration mastery. Generating extensive feature options, analyzing trade-offs, questioning assumptions, mind-mapping components, and delaying execution. Use when evaluating new features, defining project goals, or guiding users through ambiguous design spaces.
4
+ allowed-tools: Read, Write, Edit, Glob, Grep
5
+ version: 3.1.0
6
+ last-updated: 2026-04-06
7
+ applies-to-model: gemini-2.5-pro, claude-3-7-sonnet
8
+ routing:
9
+ domain: general
10
+ tier: basic
11
+ ---
12
+
13
+ ## Hallucination Traps (Read First)
14
+
15
+ - โŒ Jumping to implementation during brainstorming -> โœ… Brainstorming is exploration only; no code is written in this phase
16
+ - โŒ Presenting only one option -> โœ… Always present 3+ distinct approaches with tradeoffs
17
+ - โŒ Assuming the user's first request is their real need -> โœ… Ask 'what problem does this solve for your users?' before generating ideas
18
+
19
+ ---
20
+
21
+ # Brainstorming โ€” Socratic Exploration Mastery
22
+
23
+ ---
24
+
25
+ ## 1. The Socratic Protocol (Mandatory Delay)
26
+
27
+ When a user provides a vague or complex prompt like _"I want to build a marketplace app,"_ DO NOT start generating boilerplate code or database schemas.
28
+
29
+ **You must act as a Socratic filter.**
30
+
31
+ 1. Acknowledge the ambition of the goal.
32
+ 2. Provide 3-5 distinct architectural/functional pathways the user could take.
33
+ 3. Pause execution. Demand the user makes definitive decisions regarding the permutations before proceeding.
34
+
35
+ ### Example Socratic Prompting:
36
+
37
+ Instead of: _"Here is the React code for your marketplace,"_
38
+ Output: _"Before we write the code, we must lock down the payment flow. Do you want to: A) Handle escrow directly (High liability, complex payout logic), B) Use Stripe Connect (Easy routing, strict KYC requirements), or C) Operate free-listing only (Zero liability, requires external monetization)?"_
39
+
40
+ ---
41
+
42
+ ## 2. Multi-Dimensional Tradeoff Analysis
43
+
44
+ Every design choice has drawbacks. The brainstorming agent must illuminate the implicit consequences of the user's requests.
45
+
46
+ When comparing options, strict tabular formatting clarifies friction:
47
+
48
+ | Approach | Speed to Market | Operational Cost | Latency / UX | Maintenance Burden |
49
+ | :----------------------- | :-------------- | :-------------------------- | :------------------------- | :---------------------------------- |
50
+ | **Serverless Functions** | Very high | Low initially (pay-per-use) | Cold starts (500ms delay) | Complex local testing |
51
+ | **Monolithic Node VPS** | Moderate | Flat ($10/mo fixed) | Extremely fast (0ms start) | Requires manual OS patching |
52
+ | **Edge Compute (V8)** | Low | Moderate | Global low-latency | Strict 1MB limits / V8 restrictions |
53
+
54
+ _Result:_ The user chooses the approach mapped to their business reality, not a generic AI default.
55
+
56
+ ---
57
+
58
+ ## 3. Lateral Expansion (The "What If?" Matrix)
59
+
60
+ Users frequently suffer from tunnel-vision regarding their requested feature. The Brainstormer introduces lateral features the user hasn't considered yet to solidify the schema boundaries.
61
+
62
+ If user asks for: **"A habit tracking calendar."**
63
+ _Expand laterally:_
64
+
65
+ - "What if a user crosses timezones frequently? Do streaks break?"
66
+ - "What if they track binary habits (Read: Yes/No) versus quantitative habits (Drink 6 Liters of water)?"
67
+ - "What if they require offline capability while on airplanes?"
68
+
69
+ ---
70
+
71
+ ## 4. Distilling Decisions into Assertions
72
+
73
+ Brainstorming is useless if it does not produce an actionable blueprint.
74
+ At the end of a brainstorming session, the output MUST be distilled into a rigid requirements document or transition into `plan-writing`.
75
+
76
+ ```markdown
77
+ # Final Brainstorming Assertions
78
+
79
+ 1. **Architecture:** Next.js SSR Monolith
80
+ 2. **Database:** Postgres via Prisma (Required for complex relational queries)
81
+ 3. **Payment:** Stripe Connect (Subverted liability)
82
+ 4. **Auth:** NextAuth (Google Provider only for MVP)
83
+ ```
84
+
85
+ ---
86
+
87
+ ## Dynamic Question Generation
88
+
89
+ **PRINCIPLE:** Questions are not about gathering dataโ€”they are about **revealing architectural consequences**.
90
+
91
+ Every question must connect to a concrete implementation decision that affects cost, complexity, or timeline.
92
+
93
+ ---
94
+
95
+ ### ๐Ÿง  Core Principles
96
+
97
+ #### 1. Questions Reveal Consequences
98
+
99
+ A good question is not "What color do you want?" but:
100
+
101
+ ```markdown
102
+ โŒ BAD: "What authentication method?"
103
+ โœ… GOOD: "Should users sign up with email/password or social login?
104
+
105
+ Impact:
106
+
107
+ - Email/Pass โ†’ Need password reset, hashing, 2FA infrastructure
108
+ - Social โ†’ OAuth providers, user profile mapping, less control
109
+
110
+ Trade-off: Security vs. Development time vs. User friction"
111
+ ```
112
+
113
+ #### 2. Context Before Content
114
+
115
+ First understand **where** this request fits:
116
+
117
+ | Context | Question Focus |
118
+ | ---------------------------- | ---------------------------------------------------------- |
119
+ | **Greenfield** (new project) | Foundation decisions: stack, hosting, scale |
120
+ | **Feature Addition** | Integration points, existing patterns, breaking changes |
121
+ | **Refactor** | Why refactor? Performance? Maintainability? What's broken? |
122
+
123
+ #### 3. Minimum Viable Questions
124
+
125
+ **PRINCIPLE:** Each question must eliminate a fork in the implementation road.
126
+
127
+ ```
128
+ Before Question:
129
+ โ”œโ”€โ”€ Path A: Do X (5 min)
130
+ โ”œโ”€โ”€ Path B: Do Y (15 min)
131
+ โ””โ”€โ”€ Path C: Do Z (1 hour)
132
+
133
+ After Question:
134
+ โ””โ”€โ”€ Path Confirmed: Do X (5 min)
135
+ ```
136
+
137
+ If a question doesn't reduce implementation paths โ†’ **DELETE IT**.
138
+
139
+ #### 4. Questions Generate Data, Not Assumptions
140
+
141
+ ```markdown
142
+ โŒ ASSUMPTION: "User probably wants Stripe for payments"
143
+ โœ… QUESTION: "Which payment provider fits your needs?
144
+
145
+ Stripe โ†’ Best documentation, 2.9% + $0.30, US-centric
146
+ LemonSqueezy โ†’ Merchant of Record, 5% + $0.50, global taxes
147
+ Paddle โ†’ Complex pricing, handles EU VAT, enterprise focus"
148
+ ```
149
+
150
+ ---
151
+
152
+ ### ๐Ÿ“‹ Question Generation Algorithm
153
+
154
+ ```
155
+ INPUT: User request + Context (greenfield/feature/refactor/debug)
156
+ โ”‚
157
+ โ”œโ”€โ”€ STEP 1: Parse Request
158
+ โ”‚ โ”œโ”€โ”€ Extract domain (ecommerce, auth, realtime, cms, etc.)
159
+ โ”‚ โ”œโ”€โ”€ Extract features (explicit and implied)
160
+ โ”‚ โ””โ”€โ”€ Extract scale indicators (users, data volume, frequency)
161
+ โ”‚
162
+ โ”œโ”€โ”€ STEP 2: Identify Decision Points
163
+ โ”‚ โ”œโ”€โ”€ What MUST be decided before coding? (blocking)
164
+ โ”‚ โ”œโ”€โ”€ What COULD be decided later? (deferable)
165
+ โ”‚ โ””โ”€โ”€ What has ARCHITECTURAL impact? (high-leverage)
166
+ โ”‚
167
+ โ”œโ”€โ”€ STEP 3: Generate Questions (Priority Order)
168
+ โ”‚ โ”œโ”€โ”€ P0: Blocking decisions (cannot proceed without answer)
169
+ โ”‚ โ”œโ”€โ”€ P1: High-leverage (affects >30% of implementation)
170
+ โ”‚ โ”œโ”€โ”€ P2: Medium-leverage (affects specific features)
171
+ โ”‚ โ””โ”€โ”€ P3: Nice-to-have (edge cases, optimization)
172
+ โ”‚
173
+ โ””โ”€โ”€ STEP 4: Format Each Question
174
+ โ”œโ”€โ”€ What: Clear question
175
+ โ”œโ”€โ”€ Why: Impact on implementation
176
+ โ”œโ”€โ”€ Options: Trade-offs (not just A vs B)
177
+ โ”œโ”€โ”€ Fun/Superpower Option: Inject at least one highly creative, unconventional approach
178
+ โ””โ”€โ”€ Default: What happens if user doesn't answer
179
+ ```
180
+
181
+ ---
182
+
183
+ ### ๐ŸŽฏ Domain-Specific Question Banks
184
+
185
+ #### E-Commerce
186
+
187
+ | Question | Why It Matters | Trade-offs |
188
+ | --------------------------------- | ------------------------------------------------------------------ | ---------------------------------- |
189
+ | **Single or Multi-vendor?** | Multi-vendor โ†’ Commission logic, vendor dashboards, split payments | +Revenue, -Complexity |
190
+ | **Inventory Tracking?** | Needs stock tables, reservation logic, low-stock alerts | +Accuracy, -Development time |
191
+ | **Digital or Physical Products?** | Digital โ†’ Download links, no shipping | Physical โ†’ Shipping APIs, tracking |
192
+ | **Subscription or One-time?** | Subscription โ†’ Recurring billing, dunning, proration | +Revenue, -Complexity |
193
+
194
+ #### Authentication
195
+
196
+ | Question | Why It Matters | Trade-offs |
197
+ | --------------------------- | ---------------------------------------------------- | ---------------------------- |
198
+ | **Social Login Needed?** | OAuth providers vs. password reset infrastructure | +UX, -Control |
199
+ | **Role-Based Permissions?** | RBAC tables, policy enforcement, admin UI | +Security, -Development time |
200
+ | **2FA Required?** | TOTP/SMI infrastructure, backup codes, recovery flow | +Security, -UX friction |
201
+ | **Email Verification?** | Verification tokens, email service, resend logic | +Security, -Sign-up friction |
202
+
203
+ #### Real-time
204
+
205
+ | Question | Why It Matters | Trade-offs |
206
+ | ------------------------------ | --------------------------------------------------------------------- | --------------------------------- |
207
+ | **WebSocket or Polling?** | WS โ†’ Server scaling, connection management | Polling โ†’ Simpler, higher latency |
208
+ | **Expected Concurrent Users?** | <100 โ†’ Single server, >1000 โ†’ Redis pub/sub, >10k โ†’ specialized infra | +Scale, -Complexity |
209
+ | **Message Persistence?** | History tables, storage costs, pagination | +UX, -Storage |
210
+ | **Ephemeral or Durable?** | Ephemeral โ†’ In-memory, Durable โ†’ Database write before emit | +Reliability, -Latency |
211
+
212
+ #### Content/CMS
213
+
214
+ | Question | Why It Matters | Trade-offs |
215
+ | --------------------------- | ------------------------------------------- | ----------------------------- |
216
+ | **Rich Text or Markdown?** | Rich Text โ†’ Sanitization, XSS risks | Markdown โ†’ Simple, no WYSIWYG |
217
+ | **Draft/Publish Workflow?** | Status field, scheduled jobs, versioning | +Control, -Complexity |
218
+ | **Media Handling?** | Upload endpoints, storage, optimization | +Features, -Development time |
219
+ | **Multi-language?** | i18n tables, translation UI, fallback logic | +Reach, -Complexity |
220
+
221
+ #### Business & Product Strategy
222
+
223
+ | Question | Why It Matters | Trade-offs |
224
+ | ------------------------------ | ----------------------------------------------- | --------------------------- |
225
+ | **Monetization Approach?** | Freemium vs. Paywall vs. Ads affects user flow | +Revenue, -User Acquisition |
226
+ | **Onboarding CRO?** | Wizard vs. self-serve dictates state management | +Activation, -Dev Time |
227
+ | **Competitor Differentiator?** | Must highlight this UI feature above all else | +Standout, -Standardization |
228
+ | **Marketing Psychology?** | FOMO (urgency) vs. Trust (social proof) layout | +Conversion, -Aesthetics |
229
+
230
+ ---
231
+
232
+ ### ๐Ÿ“ Dynamic Question Template
233
+
234
+ ```markdown
235
+ ### ๐Ÿ”ด CRITICAL (Blocking Decisions)
236
+
237
+ #### 1. **[DECISION POINT]**
238
+
239
+ **Question:** [Clear, specific question]
240
+
241
+ **Why This Matters:**
242
+
243
+ - [Explain architectural consequence]
244
+ - [Affects: cost / complexity / timeline / scale]
245
+
246
+ **Options:**
247
+ |Option|Pros|Cons|Best For|
248
+ |--------|------|------|----------|
249
+ |A|[Advantage]|[Disadvantage]|[Use case]|
250
+ |B|[Advantage]|[Disadvantage]|[Use case]|
251
+
252
+ **If Not Specified:** [Default choice + rationale]
253
+
254
+ ---
255
+
256
+ ### ๐ŸŸก HIGH-LEVERAGE (Affects Implementation)
257
+
258
+ #### 2. **[DECISION POINT]**
259
+
260
+ [Same format]
261
+
262
+ ---
263
+
264
+ ### ๐ŸŸข NICE-TO-HAVE (Edge Cases)
265
+
266
+ #### 3. **[DECISION POINT]**
267
+
268
+ [Same format]
269
+ ```
270
+
271
+ ---
272
+
273
+ ### ๐Ÿ”„ Iterative Questioning
274
+
275
+ #### First Pass (3-5 Questions)
276
+
277
+ Focus on **blocking decisions**. Don't proceed without answers.
487
278
 
279
+ #### Second Pass (After Initial Implementation)
280
+
281
+ As patterns emerge, ask:
282
+
283
+ - "This feature implies [X]. Should we handle [edge case] now or defer?"
284
+ - "We're using [Pattern A]. Should [Feature B] follow the same pattern?"
285
+
286
+ #### Third Pass (Optimization)
287
+
288
+ When functionality works:
289
+
290
+ - "Performance bottleneck at [X]. Optimize now or acceptable for now?"
291
+ - "Refactor [Y] for maintainability or ship as-is?"
292
+
293
+ ---
294
+
295
+ ### ๐ŸŽญ Example: Full Question Generation
296
+
297
+ ```
298
+ USER REQUEST: "Build an Instagram clone"
299
+
300
+ STEP 1: Parse
301
+ โ”œโ”€โ”€ Domain: Social Media
302
+ โ”œโ”€โ”€ Features: Photo sharing, engagement (likes/comments), user profiles
303
+ โ”œโ”€โ”€ Implied: Feed, following, authentication
304
+ โ””โ”€โ”€ Scale: Potentially high (social apps go viral)
305
+
306
+ STEP 2: Decision Points
307
+ โ”œโ”€โ”€ Blocking: Storage strategy, authentication method, feed type
308
+ โ”œโ”€โ”€ High-leverage: Real-time notifications, data model complexity
309
+ โ””โ”€โ”€ Deferable: Analytics, advanced search, reels/video
310
+
311
+ STEP 3: Generate Questions (Priority)
312
+
313
+ P0 (Blocking):
314
+ 1. Storage Strategy โ†’ Affects architecture, cost, speed
315
+ 2. Feed Algorithm โ†’ Affects database queries, complexity
316
+ 3. Auth Method โ†’ Affects dev time, UX, security
317
+
318
+ P1 (High-leverage):
319
+ 4. Real-time Notifications โ†’ WebSocket vs polling
320
+ 5. Media Processing โ†’ Client-side vs server-side optimization
321
+
322
+ P2 (Deferable):
323
+ 6. Story/Reels โ†’ Major feature creep, defer to v2
324
+ 7. DM/Chat โ†’ Separate subsystem, defer to v2
325
+
326
+ STEP 4: Format Output
327
+ ```
328
+
329
+ ---
330
+
331
+ ### ๐Ÿ“Š Generated Output (Example)
332
+
333
+ ```
334
+
335
+ ### ๐Ÿ”ด CRITICAL DECISIONS (Cannot Proceed Without Answers)
336
+
337
+ #### 1. **Photo Storage Strategy**
338
+
339
+ **Question:** Where will user photos be stored and served?
340
+
341
+ **Why This Matters:**
342
+ - Affects: Monthly hosting costs, page load speed, CDN complexity
343
+ - High-volume social apps: 1000 users ร— 10 photos ร— 2MB = 20GB storage
344
+
345
+ **Options:**
346
+ |Option|Cost|Speed|Complexity|Best For|
347
+ |--------|------|-------|------------|----------|
348
+ |**Cloudinary**|$89/mo (25GB)|Fast (CDN)|Low|MVP, rapid launch|
349
+ |**AWS S3 + CloudFront**|$0.023/GB|Fast (CDN)|Medium|Production, cost-optimized|
350
+ |**Supabase Storage**|Free tier 1GB|Medium|Low|Small scale, simple|
351
+ |**Local Storage**|Server cost|Slow|Low|Development only|
352
+
353
+ **If Not Specified:** Cloudinary (balanced for MVP)
354
+
355
+ ---
356
+
357
+ #### 2. **Feed Algorithm Choice**
358
+
359
+ **Question:** How should the main feed work?
360
+
361
+ **Why This Matters:**
362
+ - Affects: Database query complexity, caching strategy, development time
363
+ - Algorithmic feeds require ML infrastructure, ranking signals
364
+
365
+ **Options:**
366
+ |Option|Complexity|Database Impact|Best For|
367
+ |--------|------------|-----------------|----------|
368
+ |**Chronological**|Low|Simple query|Early stage, transparency|
369
+ |**Follow-Only**|Medium|JOIN with pagination|Most social apps|
370
+ |**Algorithmic**|High|Pre-computed feed tables|Instagram competitor|
371
+
372
+ **If Not Specified:** Follow-Only (balanced for social app)
373
+
374
+ ---
375
+
376
+ #### 3. **Authentication Approach**
377
+
378
+ **Question:** How do users sign up and login?
379
+
380
+ **Why This Matters:**
381
+ - Affects: Development time (2-5 hours), security posture, UX friction
382
+
383
+ **Options:**
384
+ |Option|Dev Time|Security|UX|Best For|
385
+ |--------|----------|----------|-----|----------|
386
+ |**Email/Password**|4-5 hrs|High (if 2FA)|Medium|Full control needed|
387
+ |**Social Only**|1-2 hrs|Provider-dependent|Smooth|B2C, rapid launch|
388
+ |**Magic Link**|2-3 hrs|Medium|Very smooth|Security-focused|
389
+ |**Clerk/Auth0**|1 hr|High|Smooth|Fastest to market|
390
+
391
+ **If Not Specified:** Clerk (fastest for MVP)
392
+
393
+ ---
394
+
395
+ ### ๐ŸŸก HIGH-LEVERAGE (Affects Architecture)
396
+
397
+ #### 4. **Real-time Notifications**
398
+
399
+ **Question:** Do users need instant notifications for likes/comments?
400
+
401
+ **Why This Matters:**
402
+ - WebSocket adds infrastructure complexity (Redis pub/sub for scaling)
403
+ - Polling is simpler but higher latency
404
+
405
+ **Options:**
406
+ |Option|Complexity|Scale Cost|Best For|
407
+ |--------|------------|------------|----------|
408
+ |**WebSocket + Redis**|High|$10+/mo|>1000 concurrent users|
409
+ |**Polling (30s)**|Low|DB queries|<1000 users|
410
+ |**No Real-time**|None|None|MVP, validate first|
411
+
412
+ **If Not Specified:** Polling for MVP (defer WebSocket until validated)
413
+
414
+ ---
415
+
416
+ ### ๐ŸŸข NICE-TO-HAVE (Defer to v2)
417
+
418
+ #### 5. **Video/Reels Support**
419
+ - Major complexity (video processing, streaming infrastructure)
420
+ - Recommendation: Launch with photos only, add video after validation
421
+
422
+ #### 6. **Direct Messaging**
423
+ - Separate subsystem (chat infrastructure different from feed)
424
+ - Recommendation: Use Pusher/Stream for real-time or defer entirely
425
+
426
+ ---
427
+
428
+ ### ๐Ÿ“‹ Summary
429
+
430
+ |Decision|Recommendation|If Changed|
431
+ |----------|----------------|------------|
432
+ |Storage|Cloudinary|+3 hrs setup|
433
+ |Feed|Follow-only|+2 hrs query optimization|
434
+ |Auth|Clerk|-3 hrs dev time|
435
+ |Real-time|Polling|+5 hrs WebSocket setup|
436
+ |Video|Defer to v2|N/A|
437
+ |DM|Defer to v2|N/A|
438
+
439
+ **Total Estimated MVP Time:** 15-20 hours with recommendations above
440
+ ```
441
+
442
+ ---
443
+
444
+ ### ๐ŸŽฏ Principles Recap
445
+
446
+ 1. **Every question = Architectural decision** โ†’ Not data gathering
447
+ 2. **Show trade-offs** โ†’ User understands consequences
448
+ 3. **Prioritize blocking decisions** โ†’ Cannot proceed without
449
+ 4. **Provide defaults** โ†’ If user doesn't answer, we proceed anyway
450
+ 5. **Domain-aware** โ†’ Ecommerce questions โ‰  Auth questions โ‰  Real-time questions
451
+ 6. **Iterative** โ†’ More questions as patterns emerge during implementation
452
+
453
+ ---
454
+
455
+ AI coding assistants often fall into specific bad habits when dealing with this domain. These are strictly forbidden:
456
+
457
+ 1. **Over-engineering:** Proposing complex abstractions or distributed systems when a simpler approach suffices.
458
+ 2. **Hallucinated Libraries/Methods:** Using non-existent methods or packages. Always `// VERIFY` or check `package.json` / `requirements.txt`.
459
+ 3. **Skipping Edge Cases:** Writing the "happy path" and ignoring error handling, timeouts, or data validation.
460
+ 4. **Context Amnesia:** Forgetting the user's constraints and offering generic advice instead of tailored solutions.
461
+ 5. **Silent Degradation:** Catching and suppressing errors without logging or re-raising.
462
+
463
+ ---
464
+
465
+ **Slash command: `/review` or `/tribunal-full`**
466
+ **Active reviewers: `logic-reviewer` ยท `security-auditor`**
467
+
468
+ ### โŒ Forbidden AI Tropes
469
+
470
+ 1. **Blind Assumptions:** Never make an assumption without documenting it clearly with `// VERIFY: [reason]`.
471
+ 2. **Silent Degradation:** Catching and suppressing errors without logging or handling.
472
+ 3. **Context Amnesia:** Forgetting the user's constraints and offering generic advice instead of tailored solutions.
473
+
474
+ Review these questions before confirming output:
475
+
476
+ ```
477
+ โœ… Did I rely ONLY on real, verified tools and methods?
478
+ โœ… Is this solution appropriately scoped to the user's constraints?
479
+ โœ… Did I handle potential failure modes and edge cases?
480
+ โœ… Have I avoided generic boilerplate that doesn't add value?
481
+ ```
482
+
483
+ ### ๐Ÿ›‘ Verification-Before-Completion (VBC) Protocol
484
+
485
+ **CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
486
+
487
+ - โŒ **Forbidden:** Declaring a task complete because the output "looks correct."
488
+ - โœ… **Required:** You are explicitly forbidden from finalizing any task without providing **concrete evidence** (terminal output, passing tests, compile success, or equivalent proof) that your output works as intended.
489
+
490
+ ## Pre-Flight Checklist
491
+
492
+ - [ ] Have I reviewed the user's specific constraints and requests?
493
+ - [ ] Have I checked the environment for relevant existing implementations?
494
+
495
+ ## VBC Protocol (Verification-Before-Completion)
496
+
497
+ You MUST verify existing code signatures and variables before attempting to modify or call them. No hallucination is permitted.
488
498
 
489
499
  ---
490
500
 
@@ -514,6 +524,7 @@ AI coding assistants often fall into specific bad habits when dealing with this
514
524
  ### โœ… Pre-Flight Self-Audit
515
525
 
516
526
  Review these questions before confirming output:
527
+
517
528
  ```
518
529
  โœ… Did I rely ONLY on real, verified tools and methods?
519
530
  โœ… Is this solution appropriately scoped to the user's constraints?
@@ -524,5 +535,6 @@ Review these questions before confirming output:
524
535
  ### ๐Ÿ›‘ Verification-Before-Completion (VBC) Protocol
525
536
 
526
537
  **CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
538
+
527
539
  - โŒ **Forbidden:** Declaring a task complete because the output "looks correct."
528
540
  - โœ… **Required:** You are explicitly forbidden from finalizing any task without providing **concrete evidence** (terminal output, passing tests, compile success, or equivalent proof) that your output works as intended.