tribunal-kit 3.0.0 → 4.0.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 (233) 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/precedence-reviewer.md +213 -0
  24. package/.agent/agents/product-manager.md +142 -162
  25. package/.agent/agents/product-owner.md +6 -25
  26. package/.agent/agents/project-planner.md +142 -162
  27. package/.agent/agents/qa-automation-engineer.md +225 -242
  28. package/.agent/agents/security-auditor.md +174 -194
  29. package/.agent/agents/seo-specialist.md +193 -213
  30. package/.agent/agents/sql-reviewer.md +161 -194
  31. package/.agent/agents/supervisor-agent.md +184 -203
  32. package/.agent/agents/swarm-worker-contracts.md +17 -17
  33. package/.agent/agents/swarm-worker-registry.md +46 -46
  34. package/.agent/agents/test-coverage-reviewer.md +160 -193
  35. package/.agent/agents/test-engineer.md +0 -21
  36. package/.agent/agents/type-safety-reviewer.md +175 -208
  37. package/.agent/patterns/generator.md +9 -9
  38. package/.agent/patterns/inversion.md +12 -12
  39. package/.agent/patterns/pipeline.md +9 -9
  40. package/.agent/patterns/reviewer.md +13 -13
  41. package/.agent/patterns/tool-wrapper.md +9 -9
  42. package/.agent/rules/GEMINI.md +63 -63
  43. package/.agent/scripts/append_flow.js +72 -0
  44. package/.agent/scripts/case_law_manager.py +525 -0
  45. package/.agent/scripts/compress_skills.py +167 -0
  46. package/.agent/scripts/consolidate_skills.py +173 -0
  47. package/.agent/scripts/deep_compress.py +202 -0
  48. package/.agent/scripts/minify_context.py +80 -0
  49. package/.agent/scripts/security_scan.py +1 -1
  50. package/.agent/scripts/skill_evolution.py +563 -0
  51. package/.agent/scripts/strip_tribunal.py +41 -0
  52. package/.agent/skills/agent-organizer/SKILL.md +100 -126
  53. package/.agent/skills/agentic-patterns/SKILL.md +0 -70
  54. package/.agent/skills/ai-prompt-injection-defense/SKILL.md +134 -160
  55. package/.agent/skills/api-patterns/SKILL.md +123 -215
  56. package/.agent/skills/api-security-auditor/SKILL.md +143 -177
  57. package/.agent/skills/app-builder/SKILL.md +334 -50
  58. package/.agent/skills/app-builder/templates/SKILL.md +13 -15
  59. package/.agent/skills/app-builder/templates/astro-static/TEMPLATE.md +16 -16
  60. package/.agent/skills/app-builder/templates/chrome-extension/TEMPLATE.md +22 -22
  61. package/.agent/skills/app-builder/templates/cli-tool/TEMPLATE.md +18 -18
  62. package/.agent/skills/app-builder/templates/electron-desktop/TEMPLATE.md +20 -20
  63. package/.agent/skills/app-builder/templates/express-api/TEMPLATE.md +17 -17
  64. package/.agent/skills/app-builder/templates/flutter-app/TEMPLATE.md +18 -18
  65. package/.agent/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +21 -21
  66. package/.agent/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +19 -19
  67. package/.agent/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +26 -26
  68. package/.agent/skills/app-builder/templates/nextjs-static/TEMPLATE.md +26 -26
  69. package/.agent/skills/app-builder/templates/nuxt-app/TEMPLATE.md +19 -19
  70. package/.agent/skills/app-builder/templates/python-fastapi/TEMPLATE.md +18 -18
  71. package/.agent/skills/app-builder/templates/react-native-app/TEMPLATE.md +20 -20
  72. package/.agent/skills/appflow-wireframe/SKILL.md +95 -121
  73. package/.agent/skills/architecture/SKILL.md +169 -331
  74. package/.agent/skills/authentication-best-practices/SKILL.md +139 -173
  75. package/.agent/skills/bash-linux/SKILL.md +129 -154
  76. package/.agent/skills/behavioral-modes/SKILL.md +8 -69
  77. package/.agent/skills/brainstorming/SKILL.md +436 -104
  78. package/.agent/skills/building-native-ui/SKILL.md +152 -174
  79. package/.agent/skills/clean-code/SKILL.md +331 -360
  80. package/.agent/skills/code-review-checklist/SKILL.md +0 -62
  81. package/.agent/skills/config-validator/SKILL.md +115 -141
  82. package/.agent/skills/csharp-developer/SKILL.md +468 -528
  83. package/.agent/skills/database-design/SKILL.md +104 -369
  84. package/.agent/skills/deployment-procedures/SKILL.md +119 -145
  85. package/.agent/skills/devops-engineer/SKILL.md +295 -332
  86. package/.agent/skills/devops-incident-responder/SKILL.md +87 -113
  87. package/.agent/skills/doc.md +5 -5
  88. package/.agent/skills/documentation-templates/SKILL.md +27 -63
  89. package/.agent/skills/edge-computing/SKILL.md +131 -157
  90. package/.agent/skills/extract-design-system/SKILL.md +108 -134
  91. package/.agent/skills/framer-motion-expert/SKILL.md +111 -855
  92. package/.agent/skills/frontend-design/SKILL.md +151 -499
  93. package/.agent/skills/game-design-expert/SKILL.md +79 -105
  94. package/.agent/skills/game-engineering-expert/SKILL.md +96 -122
  95. package/.agent/skills/geo-fundamentals/SKILL.md +97 -124
  96. package/.agent/skills/github-operations/SKILL.md +279 -314
  97. package/.agent/skills/gsap-expert/SKILL.md +119 -826
  98. package/.agent/skills/i18n-localization/SKILL.md +113 -138
  99. package/.agent/skills/intelligent-routing/SKILL.md +167 -127
  100. package/.agent/skills/lint-and-validate/SKILL.md +16 -52
  101. package/.agent/skills/llm-engineering/SKILL.md +344 -357
  102. package/.agent/skills/local-first/SKILL.md +128 -154
  103. package/.agent/skills/mcp-builder/SKILL.md +92 -118
  104. package/.agent/skills/mobile-design/SKILL.md +213 -219
  105. package/.agent/skills/motion-engineering/SKILL.md +184 -0
  106. package/.agent/skills/nextjs-react-expert/SKILL.md +99 -698
  107. package/.agent/skills/nodejs-best-practices/SKILL.md +498 -559
  108. package/.agent/skills/observability/SKILL.md +293 -330
  109. package/.agent/skills/parallel-agents/SKILL.md +96 -122
  110. package/.agent/skills/performance-profiling/SKILL.md +217 -254
  111. package/.agent/skills/plan-writing/SKILL.md +92 -118
  112. package/.agent/skills/platform-engineer/SKILL.md +97 -123
  113. package/.agent/skills/playwright-best-practices/SKILL.md +137 -162
  114. package/.agent/skills/powershell-windows/SKILL.md +112 -146
  115. package/.agent/skills/project-idioms/SKILL.md +87 -0
  116. package/.agent/skills/python-patterns/SKILL.md +15 -35
  117. package/.agent/skills/python-pro/SKILL.md +148 -754
  118. package/.agent/skills/react-specialist/SKILL.md +123 -827
  119. package/.agent/skills/readme-builder/SKILL.md +23 -85
  120. package/.agent/skills/realtime-patterns/SKILL.md +269 -304
  121. package/.agent/skills/red-team-tactics/SKILL.md +18 -51
  122. package/.agent/skills/rust-pro/SKILL.md +623 -701
  123. package/.agent/skills/seo-fundamentals/SKILL.md +129 -154
  124. package/.agent/skills/server-management/SKILL.md +164 -190
  125. package/.agent/skills/shadcn-ui-expert/SKILL.md +181 -206
  126. package/.agent/skills/skill-creator/SKILL.md +24 -56
  127. package/.agent/skills/sql-pro/SKILL.md +579 -633
  128. package/.agent/skills/supabase-postgres-best-practices/SKILL.md +35 -66
  129. package/.agent/skills/swiftui-expert/SKILL.md +151 -176
  130. package/.agent/skills/systematic-debugging/SKILL.md +92 -118
  131. package/.agent/skills/tailwind-patterns/SKILL.md +516 -576
  132. package/.agent/skills/tdd-workflow/SKILL.md +111 -137
  133. package/.agent/skills/test-result-analyzer/SKILL.md +33 -73
  134. package/.agent/skills/testing-patterns/SKILL.md +512 -573
  135. package/.agent/skills/trend-researcher/SKILL.md +30 -71
  136. package/.agent/skills/ui-ux-pro-max/SKILL.md +8 -41
  137. package/.agent/skills/ui-ux-researcher/SKILL.md +51 -91
  138. package/.agent/skills/vue-expert/SKILL.md +127 -866
  139. package/.agent/skills/vulnerability-scanner/SKILL.md +354 -269
  140. package/.agent/skills/web-accessibility-auditor/SKILL.md +168 -193
  141. package/.agent/skills/web-design-guidelines/SKILL.md +25 -61
  142. package/.agent/skills/webapp-testing/SKILL.md +119 -145
  143. package/.agent/skills/whimsy-injector/SKILL.md +58 -132
  144. package/.agent/skills/workflow-optimizer/SKILL.md +28 -68
  145. package/.agent/workflows/api-tester.md +151 -151
  146. package/.agent/workflows/audit.md +127 -138
  147. package/.agent/workflows/brainstorm.md +110 -110
  148. package/.agent/workflows/changelog.md +112 -112
  149. package/.agent/workflows/create.md +124 -124
  150. package/.agent/workflows/debug.md +165 -189
  151. package/.agent/workflows/deploy.md +180 -189
  152. package/.agent/workflows/enhance.md +128 -151
  153. package/.agent/workflows/fix.md +114 -135
  154. package/.agent/workflows/generate.md +13 -4
  155. package/.agent/workflows/migrate.md +160 -160
  156. package/.agent/workflows/orchestrate.md +168 -168
  157. package/.agent/workflows/performance-benchmarker.md +114 -123
  158. package/.agent/workflows/plan.md +173 -173
  159. package/.agent/workflows/preview.md +80 -80
  160. package/.agent/workflows/refactor.md +161 -183
  161. package/.agent/workflows/review-ai.md +101 -129
  162. package/.agent/workflows/review.md +116 -116
  163. package/.agent/workflows/session.md +94 -94
  164. package/.agent/workflows/status.md +79 -79
  165. package/.agent/workflows/strengthen-skills.md +138 -139
  166. package/.agent/workflows/swarm.md +179 -179
  167. package/.agent/workflows/test.md +189 -211
  168. package/.agent/workflows/tribunal-backend.md +94 -113
  169. package/.agent/workflows/tribunal-database.md +95 -115
  170. package/.agent/workflows/tribunal-frontend.md +96 -118
  171. package/.agent/workflows/tribunal-full.md +93 -133
  172. package/.agent/workflows/tribunal-mobile.md +95 -119
  173. package/.agent/workflows/tribunal-performance.md +110 -133
  174. package/.agent/workflows/ui-ux-pro-max.md +122 -143
  175. package/README.md +30 -1
  176. package/bin/tribunal-kit.js +175 -12
  177. package/package.json +25 -4
  178. package/.agent/skills/api-patterns/api-style.md +0 -42
  179. package/.agent/skills/api-patterns/auth.md +0 -24
  180. package/.agent/skills/api-patterns/documentation.md +0 -26
  181. package/.agent/skills/api-patterns/graphql.md +0 -41
  182. package/.agent/skills/api-patterns/rate-limiting.md +0 -31
  183. package/.agent/skills/api-patterns/response.md +0 -37
  184. package/.agent/skills/api-patterns/rest.md +0 -40
  185. package/.agent/skills/api-patterns/security-testing.md +0 -122
  186. package/.agent/skills/api-patterns/trpc.md +0 -41
  187. package/.agent/skills/api-patterns/versioning.md +0 -22
  188. package/.agent/skills/app-builder/agent-coordination.md +0 -71
  189. package/.agent/skills/app-builder/feature-building.md +0 -53
  190. package/.agent/skills/app-builder/project-detection.md +0 -34
  191. package/.agent/skills/app-builder/scaffolding.md +0 -118
  192. package/.agent/skills/app-builder/tech-stack.md +0 -40
  193. package/.agent/skills/architecture/context-discovery.md +0 -43
  194. package/.agent/skills/architecture/examples.md +0 -94
  195. package/.agent/skills/architecture/pattern-selection.md +0 -68
  196. package/.agent/skills/architecture/patterns-reference.md +0 -50
  197. package/.agent/skills/architecture/trade-off-analysis.md +0 -77
  198. package/.agent/skills/brainstorming/dynamic-questioning.md +0 -360
  199. package/.agent/skills/database-design/database-selection.md +0 -43
  200. package/.agent/skills/database-design/indexing.md +0 -39
  201. package/.agent/skills/database-design/migrations.md +0 -48
  202. package/.agent/skills/database-design/optimization.md +0 -36
  203. package/.agent/skills/database-design/orm-selection.md +0 -30
  204. package/.agent/skills/database-design/schema-design.md +0 -56
  205. package/.agent/skills/frontend-design/animation-guide.md +0 -331
  206. package/.agent/skills/frontend-design/color-system.md +0 -329
  207. package/.agent/skills/frontend-design/decision-trees.md +0 -418
  208. package/.agent/skills/frontend-design/motion-graphics.md +0 -306
  209. package/.agent/skills/frontend-design/typography-system.md +0 -363
  210. package/.agent/skills/frontend-design/ux-psychology.md +0 -1116
  211. package/.agent/skills/frontend-design/visual-effects.md +0 -383
  212. package/.agent/skills/intelligent-routing/router-manifest.md +0 -65
  213. package/.agent/skills/mobile-design/decision-trees.md +0 -516
  214. package/.agent/skills/mobile-design/mobile-backend.md +0 -491
  215. package/.agent/skills/mobile-design/mobile-color-system.md +0 -420
  216. package/.agent/skills/mobile-design/mobile-debugging.md +0 -122
  217. package/.agent/skills/mobile-design/mobile-design-thinking.md +0 -357
  218. package/.agent/skills/mobile-design/mobile-navigation.md +0 -458
  219. package/.agent/skills/mobile-design/mobile-performance.md +0 -767
  220. package/.agent/skills/mobile-design/mobile-testing.md +0 -356
  221. package/.agent/skills/mobile-design/mobile-typography.md +0 -433
  222. package/.agent/skills/mobile-design/platform-android.md +0 -666
  223. package/.agent/skills/mobile-design/platform-ios.md +0 -561
  224. package/.agent/skills/mobile-design/touch-psychology.md +0 -537
  225. package/.agent/skills/nextjs-react-expert/1-async-eliminating-waterfalls.md +0 -312
  226. package/.agent/skills/nextjs-react-expert/2-bundle-bundle-size-optimization.md +0 -240
  227. package/.agent/skills/nextjs-react-expert/3-server-server-side-performance.md +0 -490
  228. package/.agent/skills/nextjs-react-expert/4-client-client-side-data-fetching.md +0 -264
  229. package/.agent/skills/nextjs-react-expert/5-rerender-re-render-optimization.md +0 -581
  230. package/.agent/skills/nextjs-react-expert/6-rendering-rendering-performance.md +0 -432
  231. package/.agent/skills/nextjs-react-expert/7-js-javascript-performance.md +0 -684
  232. package/.agent/skills/nextjs-react-expert/8-advanced-advanced-patterns.md +0 -150
  233. package/.agent/skills/vulnerability-scanner/checklists.md +0 -121
@@ -2,15 +2,20 @@
2
2
  name: app-builder
3
3
  description: Main application building orchestrator. Creates full-stack applications from natural language requests. Determines project type, selects tech stack, coordinates agents.
4
4
  allowed-tools: Read, Write, Edit, Glob, Grep
5
- version: 1.0.0
6
- last-updated: 2026-03-12
5
+ version: 3.1.0
6
+ last-updated: 2026-04-06
7
7
  applies-to-model: gemini-2.5-pro, claude-3-7-sonnet
8
8
  ---
9
9
 
10
- # App Builder Application Orchestrator
10
+ ## Hallucination Traps (Read First)
11
+ - ❌ Generating entire applications in one shot -> ✅ Build one module at a time, verify each
12
+ - ❌ Choosing a tech stack without asking the user -> ✅ Always ask about existing preferences, team skills, and deployment target
13
+ - ❌ Hardcoding API keys or secrets during scaffolding -> ✅ Use .env.example with placeholder values from day one
14
+
15
+ ---
16
+
11
17
 
12
- > Building a full application is a coordination problem, not a coding problem.
13
- > Coordinate the experts. Keep the boundaries clean.
18
+ # App Builder Application Orchestrator
14
19
 
15
20
  ---
16
21
 
@@ -53,16 +58,15 @@ Wait for answers. Stack decisions depend on these answers.
53
58
 
54
59
  ## Phase 2 — Stack Selection
55
60
 
56
- | App Type | Frontend | Backend | Database |
57
- |---|---|---|---|
58
- | Content / marketing site | Next.js | Next.js API routes | PostgreSQL (if dynamic) |
59
- | SaaS web app | Next.js | Next.js API routes / Fastify | PostgreSQL + Redis |
60
- | Mobile app (cross-platform) | React Native (Expo) | Node.js API | PostgreSQL |
61
- | Internal dashboard / admin | Next.js | Next.js API routes | Existing |
62
- | Real-time (chat, collaboration) | Next.js | Fastify + WebSockets | PostgreSQL + Redis |
63
- | Data-heavy API | | FastAPI (Python) | PostgreSQL |
64
- | AI assistant / RAG app | Next.js (streaming) | Fastify + LLM SDK | PostgreSQL + pgvector |
65
- | Edge-global, latency-critical | Next.js | Hono (Cloudflare Workers) | Turso / Cloudflare KV |
61
+ |App Type|Frontend|Backend|Database|
62
+ |Content / marketing site|Next.js|Next.js API routes|PostgreSQL (if dynamic)|
63
+ |SaaS web app|Next.js|Next.js API routes / Fastify|PostgreSQL + Redis|
64
+ |Mobile app (cross-platform)|React Native (Expo)|Node.js API|PostgreSQL|
65
+ |Internal dashboard / admin|Next.js|Next.js API routes|Existing|
66
+ |Real-time (chat, collaboration)|Next.js|Fastify + WebSockets|PostgreSQL + Redis|
67
+ |Data-heavy API|—|FastAPI (Python)|PostgreSQL|
68
+ |AI assistant / RAG app|Next.js (streaming)|Fastify + LLM SDK|PostgreSQL + pgvector|
69
+ |Edge-global, latency-critical|Next.js|Hono (Cloudflare Workers)|Turso / Cloudflare KV|
66
70
 
67
71
  **If unclear:** Next.js + PostgreSQL covers 80% of use cases and is the safest default for web apps.
68
72
 
@@ -181,58 +185,338 @@ Report the URL to the user.
181
185
 
182
186
  ## Template Index
183
187
 
184
- | Template | Path | When to Use |
185
- |---|---|---|
186
- | Next.js Full-Stack | `templates/nextjs-app/` | Web app with API routes |
187
- | React Native | `templates/react-native-app/` | Cross-platform mobile |
188
- | API Only | `templates/api-only/` | Backend service, no UI |
188
+ |Template|Path|When to Use|
189
+ |Next.js Full-Stack|`templates/nextjs-app/`|Web app with API routes|
190
+ |React Native|`templates/react-native-app/`|Cross-platform mobile|
191
+ |API Only|`templates/api-only/`|Backend service, no UI|
192
+
193
+ ---
194
+
195
+ ---
196
+
197
+ ## Agent Coordination
198
+
199
+ How App Builder orchestrates specialist agents.
200
+
201
+ ### Agent Pipeline
202
+
203
+ ```
204
+ ┌─────────────────────────────────────────────────────────────┐
205
+ │ APP BUILDER (Orchestrator) │
206
+ └─────────────────────────────────────────────────────────────┘
207
+
208
+
209
+ ┌─────────────────────────────────────────────────────────────┐
210
+ │ PROJECT PLANNER │
211
+ │ • Task breakdown │
212
+ │ • Dependency graph │
213
+ │ • File structure planning │
214
+ │ • Create {task-slug}.md in project root (MANDATORY) │
215
+ └─────────────────────────────────────────────────────────────┘
216
+
217
+
218
+ ┌─────────────────────────────────────────────────────────────┐
219
+ │ CHECKPOINT: PLAN VERIFICATION │
220
+ │ 🔴 VERIFY: Does {task-slug}.md exist in project root? │
221
+ │ 🔴 If NO → STOP → Create plan file first │
222
+ │ 🔴 If YES → Proceed to specialist agents │
223
+ └─────────────────────────────────────────────────────────────┘
224
+
225
+ ┌───────────────────┼───────────────────┐
226
+ ▼ ▼ ▼
227
+ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
228
+ │ DATABASE │ │ BACKEND │ │ FRONTEND │
229
+ │ ARCHITECT │ │ SPECIALIST │ │ SPECIALIST │
230
+ │ │ │ │ │ │
231
+ │ • Schema design │ │ • API routes │ │ • Components │
232
+ │ • Migrations │ │ • Controllers │ │ • Pages │
233
+ │ • Seed data │ │ • Middleware │ │ • Styling │
234
+ └─────────────────┘ └─────────────────┘ └─────────────────┘
235
+ │ │ │
236
+ └───────────────────┼───────────────────┘
237
+
238
+ ┌─────────────────────────────────────────────────────────────┐
239
+ │ PARALLEL PHASE (Optional) │
240
+ │ • Security Auditor → Vulnerability check │
241
+ │ • Test Engineer → Unit tests │
242
+ │ • Performance Optimizer → Bundle analysis │
243
+ └─────────────────────────────────────────────────────────────┘
244
+
245
+
246
+ ┌─────────────────────────────────────────────────────────────┐
247
+ │ DEVOPS ENGINEER │
248
+ │ • Environment setup │
249
+ │ • Preview deployment │
250
+ │ • Health check │
251
+ └─────────────────────────────────────────────────────────────┘
252
+ ```
253
+
254
+ ### Execution Order
255
+
256
+ |Phase|Agent(s)|Parallel?|Prerequisite|CHECKPOINT|
257
+ |-------|----------|-----------|--------------|------------|
258
+ |0|Socratic Gate|❌|-|✅ Ask 3 questions|
259
+ |1|Project Planner|❌|Questions answered|✅ **PLAN.md created**|
260
+ |1.5|**PLAN VERIFICATION**|❌|PLAN.md exists|✅ **File exists in root**|
261
+ |2|Database Architect|❌|Plan ready|Schema defined|
262
+ |3|Backend Specialist|❌|Schema ready|API routes created|
263
+ |4|Frontend Specialist|✅|API ready (partial)|UI components ready|
264
+ |5|Security Auditor, Test Engineer|✅|Code ready|Tests & audit pass|
265
+ |6|DevOps Engineer|❌|All code ready|Deployment ready|
266
+
267
+ > 🔴 **CRITICAL:** Phase 1.5 is MANDATORY. No specialist agents proceed without PLAN.md verification.
189
268
 
190
269
  ---
191
270
 
192
- ## Output Format
271
+ ## Feature Building
272
+
273
+ How to analyze and implement new features.
274
+
275
+ ### Feature Analysis
276
+
277
+ ```
278
+ Request: "add payment system"
279
+
280
+ Analysis:
281
+ ├── Required Changes:
282
+ │ ├── Database: orders, payments tables
283
+ │ ├── Backend: /api/checkout, /api/webhooks/stripe
284
+ │ ├── Frontend: CheckoutForm, PaymentSuccess
285
+ │ └── Config: Stripe API keys
286
+
287
+ ├── Dependencies:
288
+ │ ├── stripe package
289
+ │ └── Existing user authentication
290
+
291
+ └── Estimated Time: 15-20 minutes
292
+ ```
293
+
294
+ ### Iterative Enhancement Process
295
+
296
+ ```
297
+ 1. Analyze existing project
298
+ 2. Create change plan
299
+ 3. Present plan to user
300
+ 4. Get approval
301
+ 5. Apply changes
302
+ 6. Test
303
+ 7. Show preview
304
+ ```
305
+
306
+ ### Error Handling
307
+
308
+ |Error Type|Solution Strategy|
309
+ |------------|-------------------|
310
+ |TypeScript Error|Fix type, add missing import|
311
+ |Missing Dependency|Run npm install|
312
+ |Port Conflict|Suggest alternative port|
313
+ |Database Error|Check migration, validate connection|
314
+
315
+ ### Recovery Strategy
193
316
 
194
- When this skill produces a recommendation or design decision, structure your output as:
317
+ ```
318
+ 1. Detect error
319
+ 2. Try automatic fix
320
+ 3. If failed, report to user
321
+ 4. Suggest alternative
322
+ 5. Rollback if necessary
323
+ ```
324
+
325
+ ---
326
+
327
+ ## Project Type Detection
328
+
329
+ Analyze user requests to determine project type and template.
330
+
331
+ ### Keyword Matrix
332
+
333
+ |Keywords|Project Type|Template|
334
+ |----------|--------------|----------|
335
+ |blog, post, article|Blog|astro-static|
336
+ |e-commerce, product, cart, payment|E-commerce|nextjs-saas|
337
+ |dashboard, panel, management|Admin Dashboard|nextjs-fullstack|
338
+ |api, backend, service, rest|API Service|express-api|
339
+ |python, fastapi, django|Python API|python-fastapi|
340
+ |mobile, android, ios, react native|Mobile App (RN)|react-native-app|
341
+ |flutter, dart|Mobile App (Flutter)|flutter-app|
342
+ |portfolio, personal, cv|Portfolio|nextjs-static|
343
+ |crm, customer, sales|CRM|nextjs-fullstack|
344
+ |saas, subscription, stripe|SaaS|nextjs-saas|
345
+ |landing, promotional, marketing|Landing Page|nextjs-static|
346
+ |docs, documentation|Documentation|astro-static|
347
+ |extension, plugin, chrome|Browser Extension|chrome-extension|
348
+ |desktop, electron|Desktop App|electron-desktop|
349
+ |cli, command line, terminal|CLI Tool|cli-tool|
350
+ |monorepo, workspace|Monorepo|monorepo-turborepo|
351
+
352
+ ### Detection Process
195
353
 
196
354
  ```
197
- ━━━ App Builder Recommendation ━━━━━━━━━━━━━━━━
198
- Decision: [what was chosen / proposed]
199
- Rationale: [why one concise line]
200
- Trade-offs: [what is consciously accepted]
201
- Next action: [concrete next step for the user]
202
- ─────────────────────────────────────────────────
203
- Pre-Flight: ✅ All checks passed
204
- or ❌ [blocking item that must be resolved first]
355
+ 1. Tokenize user request
356
+ 2. Extract keywords
357
+ 3. Determine project type
358
+ 4. Detect missing information → forward to conversation-manager
359
+ 5. Suggest tech stack
205
360
  ```
206
361
 
362
+ ---
363
+
364
+ ## Project Scaffolding
207
365
 
208
366
  ---
209
367
 
210
- ## 🏛️ Tribunal Integration (Anti-Hallucination)
368
+ ### Next.js Full-Stack Structure (2025 Optimized)
211
369
 
212
- **Slash command: `/create`**
213
- **Active reviewers: `orchestrator` · `project-planner`**
370
+ ```
371
+ project-name/
372
+ ├── src/
373
+ │ ├── app/ # Routes only (thin layer)
374
+ │ │ ├── layout.tsx
375
+ │ │ ├── page.tsx
376
+ │ │ ├── globals.css
377
+ │ │ ├── (auth)/ # Route group - auth pages
378
+ │ │ │ ├── login/page.tsx
379
+ │ │ │ └── register/page.tsx
380
+ │ │ ├── (dashboard)/ # Route group - dashboard layout
381
+ │ │ │ ├── layout.tsx
382
+ │ │ │ └── page.tsx
383
+ │ │ └── api/
384
+ │ │ └── [resource]/route.ts
385
+ │ │
386
+ │ ├── features/ # Feature-based modules
387
+ │ │ ├── auth/
388
+ │ │ │ ├── components/
389
+ │ │ │ ├── hooks/
390
+ │ │ │ ├── actions.ts # Server Actions
391
+ │ │ │ ├── queries.ts # Data fetching
392
+ │ │ │ └── types.ts
393
+ │ │ ├── products/
394
+ │ │ │ ├── components/
395
+ │ │ │ ├── actions.ts
396
+ │ │ │ └── queries.ts
397
+ │ │ └── cart/
398
+ │ │ └── ...
399
+ │ │
400
+ │ ├── shared/ # Shared utilities
401
+ │ │ ├── components/ui/ # Reusable UI components
402
+ │ │ ├── lib/ # Utils, helpers
403
+ │ │ └── hooks/ # Global hooks
404
+ │ │
405
+ │ └── server/ # Server-only code
406
+ │ ├── db/ # Database client (Prisma)
407
+ │ ├── auth/ # Auth config
408
+ │ └── services/ # External API integrations
409
+
410
+ ├── prisma/
411
+ │ ├── schema.prisma
412
+ │ ├── migrations/
413
+ │ └── seed.ts
414
+
415
+ ├── public/
416
+ ├── .env.example
417
+ ├── .env.local
418
+ ├── package.json
419
+ ├── tailwind.config.ts
420
+ ├── tsconfig.json
421
+ └── README.md
422
+ ```
423
+
424
+ ---
425
+
426
+ ### Structure Principles
427
+
428
+ |Principle|Implementation|
429
+ |-----------|----------------|
430
+ |**Feature isolation**|Each feature in `features/` with its own components, hooks, actions|
431
+ |**Server/Client separation**|Server-only code in `server/`, prevents accidental client imports|
432
+ |**Thin routes**|`app/` only for routing, logic lives in `features/`|
433
+ |**Route groups**|`(groupName)/` for layout sharing without URL impact|
434
+ |**Shared code**|`shared/` for truly reusable UI and utilities|
435
+
436
+ ---
214
437
 
215
- ### Forbidden AI Tropes in App Building
438
+ ### Core Files
216
439
 
217
- 1. **Skipping Constraints** — immediately starting to generate code without asking the user about their constraints and audience.
218
- 2. **Building the Whole App at Once** — attempting to generate 50 files in a single turn.
219
- 3. **Out-of-Order Execution** — writing frontend components before the API or DB schema is actually designed.
220
- 4. **Magic Dependencies** assuming packages are installed without updating `package.json`.
221
- 5. **Ignoring Boundaries** — mismatching the API response format between the server and the frontend client.
440
+ |File|Purpose|
441
+ |------|---------|
442
+ |`package.json`|Dependencies|
443
+ |`tsconfig.json`|TypeScript + path aliases (`@/features/*`)|
444
+ |`tailwind.config.ts`|Tailwind config|
445
+ |`.env.example`|Environment template|
446
+ |`README.md`|Project documentation|
447
+ |`.gitignore`|Git ignore rules|
448
+ |`prisma/schema.prisma`|Database schema|
222
449
 
223
- ### ✅ Pre-Flight Self-Audit
450
+ ---
224
451
 
225
- Review these questions before orchestrating a full app build:
452
+ ### Path Aliases (tsconfig.json)
453
+
454
+ ```json
455
+ {
456
+ "compilerOptions": {
457
+ "paths": {
458
+ "@/*": ["./src/*"],
459
+ "@/features/*": ["./src/features/*"],
460
+ "@/shared/*": ["./src/shared/*"],
461
+ "@/server/*": ["./src/server/*"]
462
+ }
463
+ }
464
+ }
226
465
  ```
227
- ✅ Did I ask the clarifying questions regarding constraints and target audience?
228
- ✅ Is my generated plan broken into modular, sequenced steps (DB -> API -> UI)?
229
- ✅ Have I explicitly defined the API contracts so the frontend and backend match?
230
- Did I correctly track which dependencies need to be installed?
231
- ✅ Am I verifying integration at each boundary before moving to the next layer?
466
+
467
+ ---
468
+
469
+ ### When to Use What
470
+
471
+ |Need|Location|
472
+ |------|----------|
473
+ |New page/route|`app/(group)/page.tsx`|
474
+ |Feature component|`features/[name]/components/`|
475
+ |Server action|`features/[name]/actions.ts`|
476
+ |Data fetching|`features/[name]/queries.ts`|
477
+ |Reusable button/input|`shared/components/ui/`|
478
+ |Database query|`server/db/`|
479
+ |External API call|`server/services/`|
480
+
481
+ ---
482
+
483
+ ## Tech Stack Selection (2026)
484
+
485
+ Default and alternative technology choices for web applications.
486
+
487
+ ### Default Stack (Web App - 2026)
488
+
489
+ ```yaml
490
+ Frontend:
491
+ framework: Next.js 16 (Stable)
492
+ language: TypeScript 5.7+
493
+ styling: Tailwind CSS v4
494
+ state: React 19 Actions / Server Components
495
+ bundler: Turbopack (Stable for Dev)
496
+
497
+ Backend:
498
+ runtime: Node.js 23
499
+ framework: Next.js API Routes / Hono (for Edge)
500
+ validation: Zod / TypeBox
501
+
502
+ Database:
503
+ primary: PostgreSQL
504
+ orm: Prisma / Drizzle
505
+ hosting: Supabase / Neon
506
+
507
+ Auth:
508
+ provider: Auth.js (v5) / Clerk
509
+
510
+ Monorepo:
511
+ tool: Turborepo 2.0
232
512
  ```
233
513
 
234
- ### 🛑 Verification-Before-Completion (VBC) Protocol
514
+ ### Alternative Options
235
515
 
236
- **CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
237
- - ❌ **Forbidden:** Declaring an application architecture or full-stack integration complete without verifying the seams.
238
- - ✅ **Required:** You are explicitly forbidden from completing an app build or integration phase without providing **concrete terminal evidence** (e.g., successful local dev server start logs, passing build logs, or successful API local test results).
516
+ |Need|Default|Alternative|
517
+ |------|---------|-------------|
518
+ |Real-time|-|Supabase Realtime, Socket.io|
519
+ |File storage|-|Cloudinary, S3|
520
+ |Payment|Stripe|LemonSqueezy, Paddle|
521
+ |Email|-|Resend, SendGrid|
522
+ |Search|-|Algolia, Typesense|
@@ -6,28 +6,26 @@ allowed-tools: Read, Glob, Grep
6
6
 
7
7
  # Project Templates
8
8
 
9
- > Quick-start templates for scaffolding new projects.
10
-
11
9
  ---
12
10
 
13
11
  ## 🎯 Selective Reading Rule
14
12
 
15
13
  **Read ONLY the template matching user's project type!**
16
14
 
17
- | Template | Tech Stack | When to Use |
15
+ |Template|Tech Stack|When to Use|
18
16
  |----------|------------|-------------|
19
- | [nextjs-fullstack](nextjs-fullstack/TEMPLATE.md) | Next.js + Prisma | Full-stack web app |
20
- | [nextjs-saas](nextjs-saas/TEMPLATE.md) | Next.js + Stripe | SaaS product |
21
- | [nextjs-static](nextjs-static/TEMPLATE.md) | Next.js + Framer | Landing page |
22
- | [express-api](express-api/TEMPLATE.md) | Express + JWT | REST API |
23
- | [python-fastapi](python-fastapi/TEMPLATE.md) | FastAPI | Python API |
24
- | [react-native-app](react-native-app/TEMPLATE.md) | Expo + Zustand | Mobile app |
25
- | [flutter-app](flutter-app/TEMPLATE.md) | Flutter + Riverpod | Cross-platform |
26
- | [electron-desktop](electron-desktop/TEMPLATE.md) | Electron + React | Desktop app |
27
- | [chrome-extension](chrome-extension/TEMPLATE.md) | Chrome MV3 | Browser extension |
28
- | [cli-tool](cli-tool/TEMPLATE.md) | Node.js + Commander | CLI app |
29
- | [monorepo-turborepo](monorepo-turborepo/TEMPLATE.md) | Turborepo + pnpm | Monorepo |
30
- | [astro-static](astro-static/TEMPLATE.md) | Astro + MDX | Blog / Docs |
17
+ |[nextjs-fullstack](nextjs-fullstack/TEMPLATE.md)|Next.js + Prisma|Full-stack web app|
18
+ |[nextjs-saas](nextjs-saas/TEMPLATE.md)|Next.js + Stripe|SaaS product|
19
+ |[nextjs-static](nextjs-static/TEMPLATE.md)|Next.js + Framer|Landing page|
20
+ |[express-api](express-api/TEMPLATE.md)|Express + JWT|REST API|
21
+ |[python-fastapi](python-fastapi/TEMPLATE.md)|FastAPI|Python API|
22
+ |[react-native-app](react-native-app/TEMPLATE.md)|Expo + Zustand|Mobile app|
23
+ |[flutter-app](flutter-app/TEMPLATE.md)|Flutter + Riverpod|Cross-platform|
24
+ |[electron-desktop](electron-desktop/TEMPLATE.md)|Electron + React|Desktop app|
25
+ |[chrome-extension](chrome-extension/TEMPLATE.md)|Chrome MV3|Browser extension|
26
+ |[cli-tool](cli-tool/TEMPLATE.md)|Node.js + Commander|CLI app|
27
+ |[monorepo-turborepo](monorepo-turborepo/TEMPLATE.md)|Turborepo + pnpm|Monorepo|
28
+ |[astro-static](astro-static/TEMPLATE.md)|Astro + MDX|Blog / Docs|
31
29
 
32
30
  ---
33
31
 
@@ -7,13 +7,13 @@ description: Astro static site template principles. Content-focused websites, bl
7
7
 
8
8
  ## Tech Stack
9
9
 
10
- | Component | Technology |
10
+ |Component|Technology|
11
11
  |-----------|------------|
12
- | Framework | Astro 4.x |
13
- | Content | MDX + Content Collections |
14
- | Styling | Tailwind CSS |
15
- | Integrations | Sitemap, RSS, SEO |
16
- | Output | Static/SSG |
12
+ |Framework|Astro 4.x|
13
+ |Content|MDX + Content Collections|
14
+ |Styling|Tailwind CSS|
15
+ |Integrations|Sitemap, RSS, SEO|
16
+ |Output|Static/SSG|
17
17
 
18
18
  ---
19
19
 
@@ -38,12 +38,12 @@ project-name/
38
38
 
39
39
  ## Key Concepts
40
40
 
41
- | Concept | Description |
41
+ |Concept|Description|
42
42
  |---------|-------------|
43
- | Content Collections | Type-safe content with Zod schemas |
44
- | Islands Architecture | Partial hydration for interactivity |
45
- | Zero JS by default | Static HTML unless needed |
46
- | MDX Support | Markdown with components |
43
+ |Content Collections|Type-safe content with Zod schemas|
44
+ |Islands Architecture|Partial hydration for interactivity|
45
+ |Zero JS by default|Static HTML unless needed|
46
+ |MDX Support|Markdown with components|
47
47
 
48
48
  ---
49
49
 
@@ -59,12 +59,12 @@ project-name/
59
59
 
60
60
  ## Deployment
61
61
 
62
- | Platform | Method |
62
+ |Platform|Method|
63
63
  |----------|--------|
64
- | Vercel | Auto-detected |
65
- | Netlify | Auto-detected |
66
- | Cloudflare Pages | Auto-detected |
67
- | GitHub Pages | Build + deploy action |
64
+ |Vercel|Auto-detected|
65
+ |Netlify|Auto-detected|
66
+ |Cloudflare Pages|Auto-detected|
67
+ |GitHub Pages|Build + deploy action|
68
68
 
69
69
  ---
70
70
 
@@ -7,14 +7,14 @@ description: Chrome Extension template principles. Manifest V3, React, TypeScrip
7
7
 
8
8
  ## Tech Stack
9
9
 
10
- | Component | Technology |
10
+ |Component|Technology|
11
11
  |-----------|------------|
12
- | Manifest | V3 |
13
- | UI | React 19 |
14
- | Language | TypeScript |
15
- | Styling | Tailwind CSS |
16
- | Bundler | Vite |
17
- | Storage | Chrome Storage API |
12
+ |Manifest|V3|
13
+ |UI|React 19|
14
+ |Language|TypeScript|
15
+ |Styling|Tailwind CSS|
16
+ |Bundler|Vite|
17
+ |Storage|Chrome Storage API|
18
18
 
19
19
  ---
20
20
 
@@ -42,23 +42,23 @@ project-name/
42
42
 
43
43
  ## Manifest V3 Concepts
44
44
 
45
- | Component | Purpose |
45
+ |Component|Purpose|
46
46
  |-----------|---------|
47
- | Service Worker | Background processing |
48
- | Content Scripts | Page injection |
49
- | Popup | User interface |
50
- | Options Page | Settings |
47
+ |Service Worker|Background processing|
48
+ |Content Scripts|Page injection|
49
+ |Popup|User interface|
50
+ |Options Page|Settings|
51
51
 
52
52
  ---
53
53
 
54
54
  ## Permissions
55
55
 
56
- | Permission | Use |
56
+ |Permission|Use|
57
57
  |------------|-----|
58
- | storage | Save user data |
59
- | activeTab | Current tab access |
60
- | scripting | Inject scripts |
61
- | host_permissions | Site access |
58
+ |storage|Save user data|
59
+ |activeTab|Current tab access|
60
+ |scripting|Inject scripts|
61
+ |host_permissions|Site access|
62
62
 
63
63
  ---
64
64
 
@@ -75,12 +75,12 @@ project-name/
75
75
 
76
76
  ## Development Tips
77
77
 
78
- | Task | Method |
78
+ |Task|Method|
79
79
  |------|--------|
80
- | Debug Popup | Right-click icon → Inspect |
81
- | Debug Background | Extensions page → Service worker |
82
- | Debug Content | DevTools console on page |
83
- | Hot Reload | `npm run dev` with watch |
80
+ |Debug Popup|Right-click icon → Inspect|
81
+ |Debug Background|Extensions page → Service worker|
82
+ |Debug Content|DevTools console on page|
83
+ |Hot Reload|`npm run dev` with watch|
84
84
 
85
85
  ---
86
86
 
@@ -7,14 +7,14 @@ description: Node.js CLI tool template principles. Commander.js, interactive pro
7
7
 
8
8
  ## Tech Stack
9
9
 
10
- | Component | Technology |
10
+ |Component|Technology|
11
11
  |-----------|------------|
12
- | Runtime | Node.js 20+ |
13
- | Language | TypeScript |
14
- | CLI Framework | Commander.js |
15
- | Prompts | Inquirer.js |
16
- | Output | chalk + ora |
17
- | Config | cosmiconfig |
12
+ |Runtime|Node.js 20+|
13
+ |Language|TypeScript|
14
+ |CLI Framework|Commander.js|
15
+ |Prompts|Inquirer.js|
16
+ |Output|chalk + ora|
17
+ |Config|cosmiconfig|
18
18
 
19
19
  ---
20
20
 
@@ -39,24 +39,24 @@ project-name/
39
39
 
40
40
  ## CLI Design Principles
41
41
 
42
- | Principle | Description |
42
+ |Principle|Description|
43
43
  |-----------|-------------|
44
- | Subcommands | Group related actions |
45
- | Options | Flags with defaults |
46
- | Interactive | Prompts when needed |
47
- | Non-interactive | Support --yes flags |
44
+ |Subcommands|Group related actions|
45
+ |Options|Flags with defaults|
46
+ |Interactive|Prompts when needed|
47
+ |Non-interactive|Support --yes flags|
48
48
 
49
49
  ---
50
50
 
51
51
  ## Key Components
52
52
 
53
- | Component | Purpose |
53
+ |Component|Purpose|
54
54
  |-----------|---------|
55
- | Commander | Command parsing |
56
- | Inquirer | Interactive prompts |
57
- | Chalk | Colored output |
58
- | Ora | Spinners/loading |
59
- | Cosmiconfig | Config file discovery |
55
+ |Commander|Command parsing|
56
+ |Inquirer|Interactive prompts|
57
+ |Chalk|Colored output|
58
+ |Ora|Spinners/loading|
59
+ |Cosmiconfig|Config file discovery|
60
60
 
61
61
  ---
62
62