tribunal-kit 3.0.0 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (226) hide show
  1. package/.agent/ARCHITECTURE.md +99 -99
  2. package/.agent/GEMINI.md +52 -52
  3. package/.agent/agents/accessibility-reviewer.md +187 -220
  4. package/.agent/agents/ai-code-reviewer.md +199 -233
  5. package/.agent/agents/backend-specialist.md +215 -238
  6. package/.agent/agents/code-archaeologist.md +161 -181
  7. package/.agent/agents/database-architect.md +184 -207
  8. package/.agent/agents/debugger.md +191 -218
  9. package/.agent/agents/dependency-reviewer.md +103 -136
  10. package/.agent/agents/devops-engineer.md +218 -238
  11. package/.agent/agents/documentation-writer.md +201 -221
  12. package/.agent/agents/explorer-agent.md +160 -180
  13. package/.agent/agents/frontend-reviewer.md +160 -194
  14. package/.agent/agents/frontend-specialist.md +248 -237
  15. package/.agent/agents/game-developer.md +48 -52
  16. package/.agent/agents/logic-reviewer.md +116 -149
  17. package/.agent/agents/mobile-developer.md +200 -223
  18. package/.agent/agents/mobile-reviewer.md +162 -195
  19. package/.agent/agents/orchestrator.md +181 -211
  20. package/.agent/agents/penetration-tester.md +157 -174
  21. package/.agent/agents/performance-optimizer.md +183 -203
  22. package/.agent/agents/performance-reviewer.md +178 -211
  23. package/.agent/agents/product-manager.md +142 -162
  24. package/.agent/agents/product-owner.md +6 -25
  25. package/.agent/agents/project-planner.md +142 -162
  26. package/.agent/agents/qa-automation-engineer.md +225 -242
  27. package/.agent/agents/security-auditor.md +174 -194
  28. package/.agent/agents/seo-specialist.md +193 -213
  29. package/.agent/agents/sql-reviewer.md +161 -194
  30. package/.agent/agents/supervisor-agent.md +184 -203
  31. package/.agent/agents/swarm-worker-contracts.md +17 -17
  32. package/.agent/agents/swarm-worker-registry.md +46 -46
  33. package/.agent/agents/test-coverage-reviewer.md +160 -193
  34. package/.agent/agents/test-engineer.md +0 -21
  35. package/.agent/agents/type-safety-reviewer.md +175 -208
  36. package/.agent/patterns/generator.md +9 -9
  37. package/.agent/patterns/inversion.md +12 -12
  38. package/.agent/patterns/pipeline.md +9 -9
  39. package/.agent/patterns/reviewer.md +13 -13
  40. package/.agent/patterns/tool-wrapper.md +9 -9
  41. package/.agent/rules/GEMINI.md +63 -63
  42. package/.agent/scripts/compress_skills.py +167 -0
  43. package/.agent/scripts/consolidate_skills.py +173 -0
  44. package/.agent/scripts/deep_compress.py +202 -0
  45. package/.agent/scripts/minify_context.py +80 -0
  46. package/.agent/scripts/security_scan.py +1 -1
  47. package/.agent/scripts/strip_tribunal.py +41 -0
  48. package/.agent/skills/agent-organizer/SKILL.md +92 -126
  49. package/.agent/skills/agentic-patterns/SKILL.md +0 -70
  50. package/.agent/skills/ai-prompt-injection-defense/SKILL.md +126 -160
  51. package/.agent/skills/api-patterns/SKILL.md +123 -215
  52. package/.agent/skills/api-security-auditor/SKILL.md +143 -177
  53. package/.agent/skills/app-builder/SKILL.md +326 -50
  54. package/.agent/skills/app-builder/templates/SKILL.md +13 -15
  55. package/.agent/skills/app-builder/templates/astro-static/TEMPLATE.md +16 -16
  56. package/.agent/skills/app-builder/templates/chrome-extension/TEMPLATE.md +22 -22
  57. package/.agent/skills/app-builder/templates/cli-tool/TEMPLATE.md +18 -18
  58. package/.agent/skills/app-builder/templates/electron-desktop/TEMPLATE.md +20 -20
  59. package/.agent/skills/app-builder/templates/express-api/TEMPLATE.md +17 -17
  60. package/.agent/skills/app-builder/templates/flutter-app/TEMPLATE.md +18 -18
  61. package/.agent/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +21 -21
  62. package/.agent/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +19 -19
  63. package/.agent/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +26 -26
  64. package/.agent/skills/app-builder/templates/nextjs-static/TEMPLATE.md +26 -26
  65. package/.agent/skills/app-builder/templates/nuxt-app/TEMPLATE.md +19 -19
  66. package/.agent/skills/app-builder/templates/python-fastapi/TEMPLATE.md +18 -18
  67. package/.agent/skills/app-builder/templates/react-native-app/TEMPLATE.md +20 -20
  68. package/.agent/skills/appflow-wireframe/SKILL.md +87 -121
  69. package/.agent/skills/architecture/SKILL.md +82 -252
  70. package/.agent/skills/authentication-best-practices/SKILL.md +139 -173
  71. package/.agent/skills/bash-linux/SKILL.md +120 -154
  72. package/.agent/skills/behavioral-modes/SKILL.md +8 -69
  73. package/.agent/skills/brainstorming/SKILL.md +428 -104
  74. package/.agent/skills/building-native-ui/SKILL.md +143 -174
  75. package/.agent/skills/clean-code/SKILL.md +323 -360
  76. package/.agent/skills/code-review-checklist/SKILL.md +0 -62
  77. package/.agent/skills/config-validator/SKILL.md +107 -141
  78. package/.agent/skills/csharp-developer/SKILL.md +468 -528
  79. package/.agent/skills/database-design/SKILL.md +104 -369
  80. package/.agent/skills/deployment-procedures/SKILL.md +111 -145
  81. package/.agent/skills/devops-engineer/SKILL.md +295 -332
  82. package/.agent/skills/devops-incident-responder/SKILL.md +79 -113
  83. package/.agent/skills/doc.md +5 -5
  84. package/.agent/skills/documentation-templates/SKILL.md +19 -63
  85. package/.agent/skills/edge-computing/SKILL.md +123 -157
  86. package/.agent/skills/extract-design-system/SKILL.md +100 -134
  87. package/.agent/skills/framer-motion-expert/SKILL.md +111 -855
  88. package/.agent/skills/frontend-design/SKILL.md +151 -499
  89. package/.agent/skills/game-design-expert/SKILL.md +71 -105
  90. package/.agent/skills/game-engineering-expert/SKILL.md +88 -122
  91. package/.agent/skills/geo-fundamentals/SKILL.md +89 -124
  92. package/.agent/skills/github-operations/SKILL.md +279 -314
  93. package/.agent/skills/gsap-expert/SKILL.md +119 -826
  94. package/.agent/skills/i18n-localization/SKILL.md +104 -138
  95. package/.agent/skills/intelligent-routing/SKILL.md +159 -127
  96. package/.agent/skills/lint-and-validate/SKILL.md +8 -52
  97. package/.agent/skills/llm-engineering/SKILL.md +344 -357
  98. package/.agent/skills/local-first/SKILL.md +120 -154
  99. package/.agent/skills/mcp-builder/SKILL.md +84 -118
  100. package/.agent/skills/mobile-design/SKILL.md +213 -219
  101. package/.agent/skills/motion-engineering/SKILL.md +184 -0
  102. package/.agent/skills/nextjs-react-expert/SKILL.md +99 -698
  103. package/.agent/skills/nodejs-best-practices/SKILL.md +498 -559
  104. package/.agent/skills/observability/SKILL.md +293 -330
  105. package/.agent/skills/parallel-agents/SKILL.md +88 -122
  106. package/.agent/skills/performance-profiling/SKILL.md +217 -254
  107. package/.agent/skills/plan-writing/SKILL.md +84 -118
  108. package/.agent/skills/platform-engineer/SKILL.md +89 -123
  109. package/.agent/skills/playwright-best-practices/SKILL.md +128 -162
  110. package/.agent/skills/powershell-windows/SKILL.md +112 -146
  111. package/.agent/skills/python-patterns/SKILL.md +7 -35
  112. package/.agent/skills/python-pro/SKILL.md +148 -754
  113. package/.agent/skills/react-specialist/SKILL.md +123 -827
  114. package/.agent/skills/readme-builder/SKILL.md +15 -85
  115. package/.agent/skills/realtime-patterns/SKILL.md +269 -304
  116. package/.agent/skills/red-team-tactics/SKILL.md +10 -51
  117. package/.agent/skills/rust-pro/SKILL.md +623 -701
  118. package/.agent/skills/seo-fundamentals/SKILL.md +120 -154
  119. package/.agent/skills/server-management/SKILL.md +156 -190
  120. package/.agent/skills/shadcn-ui-expert/SKILL.md +172 -206
  121. package/.agent/skills/skill-creator/SKILL.md +18 -58
  122. package/.agent/skills/sql-pro/SKILL.md +579 -633
  123. package/.agent/skills/supabase-postgres-best-practices/SKILL.md +28 -68
  124. package/.agent/skills/swiftui-expert/SKILL.md +142 -176
  125. package/.agent/skills/systematic-debugging/SKILL.md +84 -118
  126. package/.agent/skills/tailwind-patterns/SKILL.md +516 -576
  127. package/.agent/skills/tdd-workflow/SKILL.md +103 -137
  128. package/.agent/skills/test-result-analyzer/SKILL.md +33 -73
  129. package/.agent/skills/testing-patterns/SKILL.md +512 -573
  130. package/.agent/skills/trend-researcher/SKILL.md +30 -71
  131. package/.agent/skills/ui-ux-pro-max/SKILL.md +0 -41
  132. package/.agent/skills/ui-ux-researcher/SKILL.md +51 -91
  133. package/.agent/skills/vue-expert/SKILL.md +127 -866
  134. package/.agent/skills/vulnerability-scanner/SKILL.md +354 -269
  135. package/.agent/skills/web-accessibility-auditor/SKILL.md +159 -193
  136. package/.agent/skills/web-design-guidelines/SKILL.md +17 -61
  137. package/.agent/skills/webapp-testing/SKILL.md +111 -145
  138. package/.agent/skills/whimsy-injector/SKILL.md +58 -132
  139. package/.agent/skills/workflow-optimizer/SKILL.md +28 -68
  140. package/.agent/workflows/api-tester.md +151 -151
  141. package/.agent/workflows/audit.md +127 -138
  142. package/.agent/workflows/brainstorm.md +110 -110
  143. package/.agent/workflows/changelog.md +112 -112
  144. package/.agent/workflows/create.md +124 -124
  145. package/.agent/workflows/debug.md +165 -189
  146. package/.agent/workflows/deploy.md +180 -189
  147. package/.agent/workflows/enhance.md +128 -151
  148. package/.agent/workflows/fix.md +114 -135
  149. package/.agent/workflows/generate.md +12 -4
  150. package/.agent/workflows/migrate.md +160 -160
  151. package/.agent/workflows/orchestrate.md +168 -168
  152. package/.agent/workflows/performance-benchmarker.md +114 -123
  153. package/.agent/workflows/plan.md +173 -173
  154. package/.agent/workflows/preview.md +80 -80
  155. package/.agent/workflows/refactor.md +161 -183
  156. package/.agent/workflows/review-ai.md +101 -129
  157. package/.agent/workflows/review.md +116 -116
  158. package/.agent/workflows/session.md +94 -94
  159. package/.agent/workflows/status.md +79 -79
  160. package/.agent/workflows/strengthen-skills.md +138 -139
  161. package/.agent/workflows/swarm.md +179 -179
  162. package/.agent/workflows/test.md +189 -211
  163. package/.agent/workflows/tribunal-backend.md +93 -113
  164. package/.agent/workflows/tribunal-database.md +94 -115
  165. package/.agent/workflows/tribunal-frontend.md +95 -118
  166. package/.agent/workflows/tribunal-full.md +92 -133
  167. package/.agent/workflows/tribunal-mobile.md +94 -119
  168. package/.agent/workflows/tribunal-performance.md +109 -133
  169. package/.agent/workflows/ui-ux-pro-max.md +122 -143
  170. package/package.json +1 -1
  171. package/.agent/skills/api-patterns/api-style.md +0 -42
  172. package/.agent/skills/api-patterns/auth.md +0 -24
  173. package/.agent/skills/api-patterns/documentation.md +0 -26
  174. package/.agent/skills/api-patterns/graphql.md +0 -41
  175. package/.agent/skills/api-patterns/rate-limiting.md +0 -31
  176. package/.agent/skills/api-patterns/response.md +0 -37
  177. package/.agent/skills/api-patterns/rest.md +0 -40
  178. package/.agent/skills/api-patterns/security-testing.md +0 -122
  179. package/.agent/skills/api-patterns/trpc.md +0 -41
  180. package/.agent/skills/api-patterns/versioning.md +0 -22
  181. package/.agent/skills/app-builder/agent-coordination.md +0 -71
  182. package/.agent/skills/app-builder/feature-building.md +0 -53
  183. package/.agent/skills/app-builder/project-detection.md +0 -34
  184. package/.agent/skills/app-builder/scaffolding.md +0 -118
  185. package/.agent/skills/app-builder/tech-stack.md +0 -40
  186. package/.agent/skills/architecture/context-discovery.md +0 -43
  187. package/.agent/skills/architecture/examples.md +0 -94
  188. package/.agent/skills/architecture/pattern-selection.md +0 -68
  189. package/.agent/skills/architecture/patterns-reference.md +0 -50
  190. package/.agent/skills/architecture/trade-off-analysis.md +0 -77
  191. package/.agent/skills/brainstorming/dynamic-questioning.md +0 -360
  192. package/.agent/skills/database-design/database-selection.md +0 -43
  193. package/.agent/skills/database-design/indexing.md +0 -39
  194. package/.agent/skills/database-design/migrations.md +0 -48
  195. package/.agent/skills/database-design/optimization.md +0 -36
  196. package/.agent/skills/database-design/orm-selection.md +0 -30
  197. package/.agent/skills/database-design/schema-design.md +0 -56
  198. package/.agent/skills/frontend-design/animation-guide.md +0 -331
  199. package/.agent/skills/frontend-design/color-system.md +0 -329
  200. package/.agent/skills/frontend-design/decision-trees.md +0 -418
  201. package/.agent/skills/frontend-design/motion-graphics.md +0 -306
  202. package/.agent/skills/frontend-design/typography-system.md +0 -363
  203. package/.agent/skills/frontend-design/ux-psychology.md +0 -1116
  204. package/.agent/skills/frontend-design/visual-effects.md +0 -383
  205. package/.agent/skills/intelligent-routing/router-manifest.md +0 -65
  206. package/.agent/skills/mobile-design/decision-trees.md +0 -516
  207. package/.agent/skills/mobile-design/mobile-backend.md +0 -491
  208. package/.agent/skills/mobile-design/mobile-color-system.md +0 -420
  209. package/.agent/skills/mobile-design/mobile-debugging.md +0 -122
  210. package/.agent/skills/mobile-design/mobile-design-thinking.md +0 -357
  211. package/.agent/skills/mobile-design/mobile-navigation.md +0 -458
  212. package/.agent/skills/mobile-design/mobile-performance.md +0 -767
  213. package/.agent/skills/mobile-design/mobile-testing.md +0 -356
  214. package/.agent/skills/mobile-design/mobile-typography.md +0 -433
  215. package/.agent/skills/mobile-design/platform-android.md +0 -666
  216. package/.agent/skills/mobile-design/platform-ios.md +0 -561
  217. package/.agent/skills/mobile-design/touch-psychology.md +0 -537
  218. package/.agent/skills/nextjs-react-expert/1-async-eliminating-waterfalls.md +0 -312
  219. package/.agent/skills/nextjs-react-expert/2-bundle-bundle-size-optimization.md +0 -240
  220. package/.agent/skills/nextjs-react-expert/3-server-server-side-performance.md +0 -490
  221. package/.agent/skills/nextjs-react-expert/4-client-client-side-data-fetching.md +0 -264
  222. package/.agent/skills/nextjs-react-expert/5-rerender-re-render-optimization.md +0 -581
  223. package/.agent/skills/nextjs-react-expert/6-rendering-rendering-performance.md +0 -432
  224. package/.agent/skills/nextjs-react-expert/7-js-javascript-performance.md +0 -684
  225. package/.agent/skills/nextjs-react-expert/8-advanced-advanced-patterns.md +0 -150
  226. package/.agent/skills/vulnerability-scanner/checklists.md +0 -121
@@ -9,9 +9,6 @@ applies-to-model: gemini-2.5-pro, claude-3-7-sonnet
9
9
 
10
10
  # Behavioral Modes
11
11
 
12
- > The same task handled carelessly vs. carefully looks identical until it fails.
13
- > Mode selection is about matching rigor to risk.
14
-
15
12
  ---
16
13
 
17
14
  ## Overview
@@ -130,15 +127,15 @@ This skill defines how to behave in each context — not just what to produce.
130
127
 
131
128
  ## Mode Selection Rules
132
129
 
133
- | Signal in Request | Activate |
130
+ |Signal in Request|Activate|
134
131
  |---|---|
135
- | "how does", "explain", "what is" | TEACH |
136
- | "why is X broken", "error:", traceback | DEBUG |
137
- | "review this", "audit", "check" | REVIEW |
138
- | "build", "create", "implement" | PLAN → BUILD |
139
- | "I'm not sure what I need" | DISCOVER |
140
- | "deploy", "release", "publish" | SHIP |
141
- | Multiple domains in one request | ORCHESTRATE |
132
+ |"how does", "explain", "what is"|TEACH|
133
+ |"why is X broken", "error:", traceback|DEBUG|
134
+ |"review this", "audit", "check"|REVIEW|
135
+ |"build", "create", "implement"|PLAN → BUILD|
136
+ |"I'm not sure what I need"|DISCOVER|
137
+ |"deploy", "release", "publish"|SHIP|
138
+ |Multiple domains in one request|ORCHESTRATE|
142
139
 
143
140
  ---
144
141
 
@@ -173,62 +170,4 @@ Pre-Flight: ✅ All checks passed
173
170
  or ❌ [blocking item that must be resolved first]
174
171
  ```
175
172
 
176
-
177
- ---
178
-
179
- ## 🏛️ Tribunal Integration
180
-
181
- **Slash command: Contextually applied based on user intent**
182
- **Active reviewers: `logic-reviewer` (monitors for mode adherence)**
183
-
184
- ### ✅ Pre-Flight Self-Audit
185
-
186
- Review these questions before sending any response to ensure you are in the correct mode:
187
- ```
188
- ✅ Have I explicitly announced which mode I am operating in?
189
- ✅ If in DISCOVER or TEACH, have I successfully suppressed the urge to write implementation code?
190
- ✅ If in DEBUG, am I proving a hypothesis or just guessing a fix?
191
- ✅ If in REVIEW, am I commenting on the existing code rather than silently rewriting it?
192
- ```
193
-
194
-
195
- ---
196
-
197
- ## 🤖 LLM-Specific Traps
198
-
199
- AI coding assistants often fall into specific bad habits when dealing with this domain. These are strictly forbidden:
200
-
201
- 1. **Over-engineering:** Proposing complex abstractions or distributed systems when a simpler approach suffices.
202
- 2. **Hallucinated Libraries/Methods:** Using non-existent methods or packages. Always `// VERIFY` or check `package.json` / `requirements.txt`.
203
- 3. **Skipping Edge Cases:** Writing the "happy path" and ignoring error handling, timeouts, or data validation.
204
- 4. **Context Amnesia:** Forgetting the user's constraints and offering generic advice instead of tailored solutions.
205
- 5. **Silent Degradation:** Catching and suppressing errors without logging or re-raising.
206
-
207
173
  ---
208
-
209
- ## 🏛️ Tribunal Integration (Anti-Hallucination)
210
-
211
- **Slash command: `/review` or `/tribunal-full`**
212
- **Active reviewers: `logic-reviewer` · `security-auditor`**
213
-
214
- ### ❌ Forbidden AI Tropes
215
-
216
- 1. **Blind Assumptions:** Never make an assumption without documenting it clearly with `// VERIFY: [reason]`.
217
- 2. **Silent Degradation:** Catching and suppressing errors without logging or handling.
218
- 3. **Context Amnesia:** Forgetting the user's constraints and offering generic advice instead of tailored solutions.
219
-
220
- ### ✅ Pre-Flight Self-Audit
221
-
222
- Review these questions before confirming output:
223
- ```
224
- ✅ Did I rely ONLY on real, verified tools and methods?
225
- ✅ Is this solution appropriately scoped to the user's constraints?
226
- ✅ Did I handle potential failure modes and edge cases?
227
- ✅ Have I avoided generic boilerplate that doesn't add value?
228
- ```
229
-
230
- ### 🛑 Verification-Before-Completion (VBC) Protocol
231
-
232
- **CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
233
- - ❌ **Forbidden:** Declaring a task complete because the output "looks correct."
234
- - ✅ **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.
@@ -1,104 +1,428 @@
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: 2.0.0
6
- last-updated: 2026-04-02
7
- applies-to-model: gemini-2.5-pro, claude-3-7-sonnet
8
- ---
9
-
10
- # Brainstorming — Socratic Exploration Mastery
11
-
12
- > Writing code is expensive. Deleting code is dangerous.
13
- > Thinking is cheap. Explore the permutation space rigorously before committing to an architecture.
14
-
15
- ---
16
-
17
- ## 1. The Socratic Protocol (Mandatory Delay)
18
-
19
- 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.
20
-
21
- **You must act as a Socratic filter.**
22
- 1. Acknowledge the ambition of the goal.
23
- 2. Provide 3-5 distinct architectural/functional pathways the user could take.
24
- 3. Pause execution. Demand the user makes definitive decisions regarding the permutations before proceeding.
25
-
26
- ### Example Socratic Prompting:
27
- Instead of: *"Here is the React code for your marketplace,"*
28
- 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)?"*
29
-
30
- ---
31
-
32
- ## 2. Multi-Dimensional Tradeoff Analysis
33
-
34
- Every design choice has drawbacks. The brainstorming agent must illuminate the implicit consequences of the user's requests.
35
-
36
- When comparing options, strict tabular formatting clarifies friction:
37
-
38
- | Approach | Speed to Market | Operational Cost | Latency / UX | Maintenance Burden |
39
- |:---|:---|:---|:---|:---|
40
- | **Serverless Functions** | Very high | Low initially (pay-per-use) | Cold starts (500ms delay) | Complex local testing |
41
- | **Monolithic Node VPS** | Moderate | Flat ($10/mo fixed) | Extremely fast (0ms start) | Requires manual OS patching |
42
- | **Edge Compute (V8)** | Low | Moderate | Global low-latency | Strict 1MB limits / V8 restrictions |
43
-
44
- *Result:* The user chooses the approach mapped to their business reality, not a generic AI default.
45
-
46
- ---
47
-
48
- ## 3. Lateral Expansion (The "What If?" Matrix)
49
-
50
- 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.
51
-
52
- If user asks for: **"A habit tracking calendar."**
53
- *Expand laterally:*
54
- - "What if a user crosses timezones frequently? Do streaks break?"
55
- - "What if they track binary habits (Read: Yes/No) versus quantitative habits (Drink 6 Liters of water)?"
56
- - "What if they require offline capability while on airplanes?"
57
-
58
- ---
59
-
60
- ## 4. Distilling Decisions into Assertions
61
-
62
- Brainstorming is useless if it does not produce an actionable blueprint.
63
- At the end of a brainstorming session, the output MUST be distilled into a rigid requirements document or transition into `plan-writing`.
64
-
65
- ```markdown
66
- # Final Brainstorming Assertions
67
- 1. **Architecture:** Next.js SSR Monolith
68
- 2. **Database:** Postgres via Prisma (Required for complex relational queries)
69
- 3. **Payment:** Stripe Connect (Subverted liability)
70
- 4. **Auth:** NextAuth (Google Provider only for MVP)
71
- ```
72
-
73
- ---
74
-
75
- ## 🤖 LLM-Specific Traps (Brainstorming)
76
-
77
- 1. **Premature Execution:** The AI receives a vague feature idea and immediately dumps 600 lines of unproven boilerplate code, creating enormous context waste and confusing the user.
78
- 2. **Yes-Man Syndrome:** Agreeing with a user's terrible, insecure, or archaic technical proposal blindly. If a user asks to "store passwords in base64," the Brainstormer MUST aggressively intervene and correct the user.
79
- 3. **Analysis Paralysis:** Asking the user 25 minute unanswerable questions at once (e.g., "What will your AWS scaling limits be?"). Keep Socratic questions limited to 3-5 high-impact, immediate blockers.
80
- 4. **Binary Fallacy:** Trapping the user into "You must either use Python or JavaScript" scenarios, neglecting hybrid architectures or novel edge deployments.
81
- 5. **Ignoring The "Why":** Solving for the requested feature execution without asking *why* the user needs it. (e.g., User asks to build a complex PDF parser to extract totals. Ask if the vendor has a CSV/JSON API first).
82
- 6. **Framework Zealotry:** Defaulting exclusively to React/Next.js for simple static blogs instead of proposing Astro or Eleventy tradeoffs. Evaluate based on the precise domain.
83
- 7. **Scale Hallucination:** Architecting a system designed for 10 million DAU utilizing Kubernetes microservices when the user is explicitly building a local internal tool for 5 warehouse employees.
84
- 8. **Forgetting State Continuity:** Conducting a brilliant 10-message brainstorm session, and then beginning the implementation phase entirely forgetting the 3 tradeoff decisions the user made in message #2.
85
- 9. **Monolithic Summaries:** Providing a dense, impenetrable wall of text. Use bullet points, bolded keywords, and markdown tables to highlight divergent permutations.
86
- 10. **The Echo Chamber:** Repeating the user's prompt back to them in a slightly modified structure without adding any lateral expansion, novelty, or tradeoff friction.
87
-
88
- ---
89
-
90
- ## 🏛️ Tribunal Integration
91
-
92
- ### Pre-Flight Self-Audit
93
- ```
94
- Have I explicitly delayed code generation until unambiguous requirements are approved?
95
- ✅ Did I outline 3-5 structural pathways with explicit, balanced tradeoff comparisons?
96
- ✅ Were lateral considerations (edge cases, scale caps, timezones) introduced rigorously?
97
- Have Socratic questions been capped at ~3 digestible choices to avoid analysis paralysis?
98
- ✅ Did I aggressively correct any fundamentally insecure or anti-pattern directives from the user?
99
- Are architectural suggestions appropriately matched to the user's actual predicted traffic scale?
100
- ✅ Did I use structured tables to map divergent consequences efficiently?
101
- Are the user's business objectives deeply represented in the proposed technical choices?
102
- ✅ Is the final output distilled into rigorous functional assertions transitioning to execution?
103
- Has conversational "Yes-man" echo-looping been strictly expelled from the dialogue?
104
- ```
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
+ # Brainstorming — Socratic Exploration Mastery
11
+
12
+ ---
13
+
14
+ ## 1. The Socratic Protocol (Mandatory Delay)
15
+
16
+ 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.
17
+
18
+ **You must act as a Socratic filter.**
19
+ 1. Acknowledge the ambition of the goal.
20
+ 2. Provide 3-5 distinct architectural/functional pathways the user could take.
21
+ 3. Pause execution. Demand the user makes definitive decisions regarding the permutations before proceeding.
22
+
23
+ ### Example Socratic Prompting:
24
+ Instead of: *"Here is the React code for your marketplace,"*
25
+ 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)?"*
26
+
27
+ ---
28
+
29
+ ## 2. Multi-Dimensional Tradeoff Analysis
30
+
31
+ Every design choice has drawbacks. The brainstorming agent must illuminate the implicit consequences of the user's requests.
32
+
33
+ When comparing options, strict tabular formatting clarifies friction:
34
+
35
+ |Approach|Speed to Market|Operational Cost|Latency / UX|Maintenance Burden|
36
+ |:---|:---|:---|:---|:---|
37
+ |**Serverless Functions**|Very high|Low initially (pay-per-use)|Cold starts (500ms delay)|Complex local testing|
38
+ |**Monolithic Node VPS**|Moderate|Flat ($10/mo fixed)|Extremely fast (0ms start)|Requires manual OS patching|
39
+ |**Edge Compute (V8)**|Low|Moderate|Global low-latency|Strict 1MB limits / V8 restrictions|
40
+
41
+ *Result:* The user chooses the approach mapped to their business reality, not a generic AI default.
42
+
43
+ ---
44
+
45
+ ## 3. Lateral Expansion (The "What If?" Matrix)
46
+
47
+ 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.
48
+
49
+ If user asks for: **"A habit tracking calendar."**
50
+ *Expand laterally:*
51
+ - "What if a user crosses timezones frequently? Do streaks break?"
52
+ - "What if they track binary habits (Read: Yes/No) versus quantitative habits (Drink 6 Liters of water)?"
53
+ - "What if they require offline capability while on airplanes?"
54
+
55
+ ---
56
+
57
+ ## 4. Distilling Decisions into Assertions
58
+
59
+ Brainstorming is useless if it does not produce an actionable blueprint.
60
+ At the end of a brainstorming session, the output MUST be distilled into a rigid requirements document or transition into `plan-writing`.
61
+
62
+ ```markdown
63
+ # Final Brainstorming Assertions
64
+ 1. **Architecture:** Next.js SSR Monolith
65
+ 2. **Database:** Postgres via Prisma (Required for complex relational queries)
66
+ 3. **Payment:** Stripe Connect (Subverted liability)
67
+ 4. **Auth:** NextAuth (Google Provider only for MVP)
68
+ ```
69
+
70
+ ---
71
+
72
+ ## Dynamic Question Generation
73
+
74
+ **PRINCIPLE:** Questions are not about gathering data—they are about **revealing architectural consequences**.
75
+
76
+ Every question must connect to a concrete implementation decision that affects cost, complexity, or timeline.
77
+
78
+ ---
79
+
80
+ ### 🧠 Core Principles
81
+
82
+ #### 1. Questions Reveal Consequences
83
+
84
+ A good question is not "What color do you want?" but:
85
+
86
+ ```markdown
87
+ ❌ BAD: "What authentication method?"
88
+ ✅ GOOD: "Should users sign up with email/password or social login?
89
+
90
+ Impact:
91
+ - Email/Pass → Need password reset, hashing, 2FA infrastructure
92
+ - Social OAuth providers, user profile mapping, less control
93
+
94
+ Trade-off: Security vs. Development time vs. User friction"
95
+ ```
96
+
97
+ #### 2. Context Before Content
98
+
99
+ First understand **where** this request fits:
100
+
101
+ |Context|Question Focus|
102
+ |---------|----------------|
103
+ |**Greenfield** (new project)|Foundation decisions: stack, hosting, scale|
104
+ |**Feature Addition**|Integration points, existing patterns, breaking changes|
105
+ |**Refactor**|Why refactor? Performance? Maintainability? What's broken?|
106
+
107
+ #### 3. Minimum Viable Questions
108
+
109
+ **PRINCIPLE:** Each question must eliminate a fork in the implementation road.
110
+
111
+ ```
112
+ Before Question:
113
+ ├── Path A: Do X (5 min)
114
+ ├── Path B: Do Y (15 min)
115
+ └── Path C: Do Z (1 hour)
116
+
117
+ After Question:
118
+ └── Path Confirmed: Do X (5 min)
119
+ ```
120
+
121
+ If a question doesn't reduce implementation paths → **DELETE IT**.
122
+
123
+ #### 4. Questions Generate Data, Not Assumptions
124
+
125
+ ```markdown
126
+ ❌ ASSUMPTION: "User probably wants Stripe for payments"
127
+ ✅ QUESTION: "Which payment provider fits your needs?
128
+
129
+ Stripe → Best documentation, 2.9% + $0.30, US-centric
130
+ LemonSqueezy → Merchant of Record, 5% + $0.50, global taxes
131
+ Paddle → Complex pricing, handles EU VAT, enterprise focus"
132
+ ```
133
+
134
+ ---
135
+
136
+ ### 📋 Question Generation Algorithm
137
+
138
+ ```
139
+ INPUT: User request + Context (greenfield/feature/refactor/debug)
140
+
141
+ ├── STEP 1: Parse Request
142
+ │ ├── Extract domain (ecommerce, auth, realtime, cms, etc.)
143
+ │ ├── Extract features (explicit and implied)
144
+ │ └── Extract scale indicators (users, data volume, frequency)
145
+
146
+ ├── STEP 2: Identify Decision Points
147
+ │ ├── What MUST be decided before coding? (blocking)
148
+ │ ├── What COULD be decided later? (deferable)
149
+ │ └── What has ARCHITECTURAL impact? (high-leverage)
150
+
151
+ ├── STEP 3: Generate Questions (Priority Order)
152
+ │ ├── P0: Blocking decisions (cannot proceed without answer)
153
+ │ ├── P1: High-leverage (affects >30% of implementation)
154
+ │ ├── P2: Medium-leverage (affects specific features)
155
+ │ └── P3: Nice-to-have (edge cases, optimization)
156
+
157
+ └── STEP 4: Format Each Question
158
+ ├── What: Clear question
159
+ ├── Why: Impact on implementation
160
+ ├── Options: Trade-offs (not just A vs B)
161
+ ├── Fun/Superpower Option: Inject at least one highly creative, unconventional approach
162
+ └── Default: What happens if user doesn't answer
163
+ ```
164
+
165
+ ---
166
+
167
+ ### 🎯 Domain-Specific Question Banks
168
+
169
+ #### E-Commerce
170
+
171
+ |Question|Why It Matters|Trade-offs|
172
+ |----------|----------------|------------|
173
+ |**Single or Multi-vendor?**|Multi-vendor → Commission logic, vendor dashboards, split payments|+Revenue, -Complexity|
174
+ |**Inventory Tracking?**|Needs stock tables, reservation logic, low-stock alerts|+Accuracy, -Development time|
175
+ |**Digital or Physical Products?**|Digital → Download links, no shipping|Physical → Shipping APIs, tracking|
176
+ |**Subscription or One-time?**|Subscription → Recurring billing, dunning, proration|+Revenue, -Complexity|
177
+
178
+ #### Authentication
179
+
180
+ |Question|Why It Matters|Trade-offs|
181
+ |----------|----------------|------------|
182
+ |**Social Login Needed?**|OAuth providers vs. password reset infrastructure|+UX, -Control|
183
+ |**Role-Based Permissions?**|RBAC tables, policy enforcement, admin UI|+Security, -Development time|
184
+ |**2FA Required?**|TOTP/SMI infrastructure, backup codes, recovery flow|+Security, -UX friction|
185
+ |**Email Verification?**|Verification tokens, email service, resend logic|+Security, -Sign-up friction|
186
+
187
+ #### Real-time
188
+
189
+ |Question|Why It Matters|Trade-offs|
190
+ |----------|----------------|------------|
191
+ |**WebSocket or Polling?**|WS → Server scaling, connection management|Polling → Simpler, higher latency|
192
+ |**Expected Concurrent Users?**|<100 → Single server, >1000 → Redis pub/sub, >10k → specialized infra|+Scale, -Complexity|
193
+ |**Message Persistence?**|History tables, storage costs, pagination|+UX, -Storage|
194
+ |**Ephemeral or Durable?**|Ephemeral → In-memory, Durable → Database write before emit|+Reliability, -Latency|
195
+
196
+ #### Content/CMS
197
+
198
+ |Question|Why It Matters|Trade-offs|
199
+ |----------|----------------|------------|
200
+ |**Rich Text or Markdown?**|Rich Text → Sanitization, XSS risks|Markdown → Simple, no WYSIWYG|
201
+ |**Draft/Publish Workflow?**|Status field, scheduled jobs, versioning|+Control, -Complexity|
202
+ |**Media Handling?**|Upload endpoints, storage, optimization|+Features, -Development time|
203
+ |**Multi-language?**|i18n tables, translation UI, fallback logic|+Reach, -Complexity|
204
+
205
+ #### Business & Product Strategy
206
+
207
+ |Question|Why It Matters|Trade-offs|
208
+ |----------|----------------|------------|
209
+ |**Monetization Approach?**|Freemium vs. Paywall vs. Ads affects user flow|+Revenue, -User Acquisition|
210
+ |**Onboarding CRO?**|Wizard vs. self-serve dictates state management|+Activation, -Dev Time|
211
+ |**Competitor Differentiator?**|Must highlight this UI feature above all else|+Standout, -Standardization|
212
+ |**Marketing Psychology?**|FOMO (urgency) vs. Trust (social proof) layout|+Conversion, -Aesthetics|
213
+
214
+ ---
215
+
216
+ ### 📐 Dynamic Question Template
217
+
218
+ ```markdown
219
+
220
+ ### 🔴 CRITICAL (Blocking Decisions)
221
+
222
+ #### 1. **[DECISION POINT]**
223
+
224
+ **Question:** [Clear, specific question]
225
+
226
+ **Why This Matters:**
227
+ - [Explain architectural consequence]
228
+ - [Affects: cost / complexity / timeline / scale]
229
+
230
+ **Options:**
231
+ |Option|Pros|Cons|Best For|
232
+ |--------|------|------|----------|
233
+ |A|[Advantage]|[Disadvantage]|[Use case]|
234
+ |B|[Advantage]|[Disadvantage]|[Use case]|
235
+
236
+ **If Not Specified:** [Default choice + rationale]
237
+
238
+ ---
239
+
240
+ ### 🟡 HIGH-LEVERAGE (Affects Implementation)
241
+
242
+ #### 2. **[DECISION POINT]**
243
+ [Same format]
244
+
245
+ ---
246
+
247
+ ### 🟢 NICE-TO-HAVE (Edge Cases)
248
+
249
+ #### 3. **[DECISION POINT]**
250
+ [Same format]
251
+ ```
252
+
253
+ ---
254
+
255
+ ### 🔄 Iterative Questioning
256
+
257
+ #### First Pass (3-5 Questions)
258
+ Focus on **blocking decisions**. Don't proceed without answers.
259
+
260
+ #### Second Pass (After Initial Implementation)
261
+ As patterns emerge, ask:
262
+ - "This feature implies [X]. Should we handle [edge case] now or defer?"
263
+ - "We're using [Pattern A]. Should [Feature B] follow the same pattern?"
264
+
265
+ #### Third Pass (Optimization)
266
+ When functionality works:
267
+ - "Performance bottleneck at [X]. Optimize now or acceptable for now?"
268
+ - "Refactor [Y] for maintainability or ship as-is?"
269
+
270
+ ---
271
+
272
+ ### 🎭 Example: Full Question Generation
273
+
274
+ ```
275
+ USER REQUEST: "Build an Instagram clone"
276
+
277
+ STEP 1: Parse
278
+ ├── Domain: Social Media
279
+ ├── Features: Photo sharing, engagement (likes/comments), user profiles
280
+ ├── Implied: Feed, following, authentication
281
+ └── Scale: Potentially high (social apps go viral)
282
+
283
+ STEP 2: Decision Points
284
+ ├── Blocking: Storage strategy, authentication method, feed type
285
+ ├── High-leverage: Real-time notifications, data model complexity
286
+ └── Deferable: Analytics, advanced search, reels/video
287
+
288
+ STEP 3: Generate Questions (Priority)
289
+
290
+ P0 (Blocking):
291
+ 1. Storage Strategy → Affects architecture, cost, speed
292
+ 2. Feed Algorithm → Affects database queries, complexity
293
+ 3. Auth Method → Affects dev time, UX, security
294
+
295
+ P1 (High-leverage):
296
+ 4. Real-time Notifications → WebSocket vs polling
297
+ 5. Media Processing → Client-side vs server-side optimization
298
+
299
+ P2 (Deferable):
300
+ 6. Story/Reels → Major feature creep, defer to v2
301
+ 7. DM/Chat → Separate subsystem, defer to v2
302
+
303
+ STEP 4: Format Output
304
+ ```
305
+
306
+ ---
307
+
308
+ ### 📊 Generated Output (Example)
309
+
310
+ ```
311
+
312
+ ### 🔴 CRITICAL DECISIONS (Cannot Proceed Without Answers)
313
+
314
+ #### 1. **Photo Storage Strategy**
315
+
316
+ **Question:** Where will user photos be stored and served?
317
+
318
+ **Why This Matters:**
319
+ - Affects: Monthly hosting costs, page load speed, CDN complexity
320
+ - High-volume social apps: 1000 users × 10 photos × 2MB = 20GB storage
321
+
322
+ **Options:**
323
+ |Option|Cost|Speed|Complexity|Best For|
324
+ |--------|------|-------|------------|----------|
325
+ |**Cloudinary**|$89/mo (25GB)|Fast (CDN)|Low|MVP, rapid launch|
326
+ |**AWS S3 + CloudFront**|$0.023/GB|Fast (CDN)|Medium|Production, cost-optimized|
327
+ |**Supabase Storage**|Free tier 1GB|Medium|Low|Small scale, simple|
328
+ |**Local Storage**|Server cost|Slow|Low|Development only|
329
+
330
+ **If Not Specified:** Cloudinary (balanced for MVP)
331
+
332
+ ---
333
+
334
+ #### 2. **Feed Algorithm Choice**
335
+
336
+ **Question:** How should the main feed work?
337
+
338
+ **Why This Matters:**
339
+ - Affects: Database query complexity, caching strategy, development time
340
+ - Algorithmic feeds require ML infrastructure, ranking signals
341
+
342
+ **Options:**
343
+ |Option|Complexity|Database Impact|Best For|
344
+ |--------|------------|-----------------|----------|
345
+ |**Chronological**|Low|Simple query|Early stage, transparency|
346
+ |**Follow-Only**|Medium|JOIN with pagination|Most social apps|
347
+ |**Algorithmic**|High|Pre-computed feed tables|Instagram competitor|
348
+
349
+ **If Not Specified:** Follow-Only (balanced for social app)
350
+
351
+ ---
352
+
353
+ #### 3. **Authentication Approach**
354
+
355
+ **Question:** How do users sign up and login?
356
+
357
+ **Why This Matters:**
358
+ - Affects: Development time (2-5 hours), security posture, UX friction
359
+
360
+ **Options:**
361
+ |Option|Dev Time|Security|UX|Best For|
362
+ |--------|----------|----------|-----|----------|
363
+ |**Email/Password**|4-5 hrs|High (if 2FA)|Medium|Full control needed|
364
+ |**Social Only**|1-2 hrs|Provider-dependent|Smooth|B2C, rapid launch|
365
+ |**Magic Link**|2-3 hrs|Medium|Very smooth|Security-focused|
366
+ |**Clerk/Auth0**|1 hr|High|Smooth|Fastest to market|
367
+
368
+ **If Not Specified:** Clerk (fastest for MVP)
369
+
370
+ ---
371
+
372
+ ### 🟡 HIGH-LEVERAGE (Affects Architecture)
373
+
374
+ #### 4. **Real-time Notifications**
375
+
376
+ **Question:** Do users need instant notifications for likes/comments?
377
+
378
+ **Why This Matters:**
379
+ - WebSocket adds infrastructure complexity (Redis pub/sub for scaling)
380
+ - Polling is simpler but higher latency
381
+
382
+ **Options:**
383
+ |Option|Complexity|Scale Cost|Best For|
384
+ |--------|------------|------------|----------|
385
+ |**WebSocket + Redis**|High|$10+/mo|>1000 concurrent users|
386
+ |**Polling (30s)**|Low|DB queries|<1000 users|
387
+ |**No Real-time**|None|None|MVP, validate first|
388
+
389
+ **If Not Specified:** Polling for MVP (defer WebSocket until validated)
390
+
391
+ ---
392
+
393
+ ### 🟢 NICE-TO-HAVE (Defer to v2)
394
+
395
+ #### 5. **Video/Reels Support**
396
+ - Major complexity (video processing, streaming infrastructure)
397
+ - Recommendation: Launch with photos only, add video after validation
398
+
399
+ #### 6. **Direct Messaging**
400
+ - Separate subsystem (chat infrastructure different from feed)
401
+ - Recommendation: Use Pusher/Stream for real-time or defer entirely
402
+
403
+ ---
404
+
405
+ ### 📋 Summary
406
+
407
+ |Decision|Recommendation|If Changed|
408
+ |----------|----------------|------------|
409
+ |Storage|Cloudinary|+3 hrs setup|
410
+ |Feed|Follow-only|+2 hrs query optimization|
411
+ |Auth|Clerk|-3 hrs dev time|
412
+ |Real-time|Polling|+5 hrs WebSocket setup|
413
+ |Video|Defer to v2|N/A|
414
+ |DM|Defer to v2|N/A|
415
+
416
+ **Total Estimated MVP Time:** 15-20 hours with recommendations above
417
+ ```
418
+
419
+ ---
420
+
421
+ ### 🎯 Principles Recap
422
+
423
+ 1. **Every question = Architectural decision** → Not data gathering
424
+ 2. **Show trade-offs** → User understands consequences
425
+ 3. **Prioritize blocking decisions** → Cannot proceed without
426
+ 4. **Provide defaults** → If user doesn't answer, we proceed anyway
427
+ 5. **Domain-aware** → Ecommerce questions ≠ Auth questions ≠ Real-time questions
428
+ 6. **Iterative** → More questions as patterns emerge during implementation