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.
- package/.agent/ARCHITECTURE.md +99 -99
- package/.agent/GEMINI.md +52 -52
- package/.agent/agents/accessibility-reviewer.md +187 -220
- package/.agent/agents/ai-code-reviewer.md +199 -233
- package/.agent/agents/backend-specialist.md +215 -238
- package/.agent/agents/code-archaeologist.md +161 -181
- package/.agent/agents/database-architect.md +184 -207
- package/.agent/agents/debugger.md +191 -218
- package/.agent/agents/dependency-reviewer.md +103 -136
- package/.agent/agents/devops-engineer.md +218 -238
- package/.agent/agents/documentation-writer.md +201 -221
- package/.agent/agents/explorer-agent.md +160 -180
- package/.agent/agents/frontend-reviewer.md +160 -194
- package/.agent/agents/frontend-specialist.md +248 -237
- package/.agent/agents/game-developer.md +48 -52
- package/.agent/agents/logic-reviewer.md +116 -149
- package/.agent/agents/mobile-developer.md +200 -223
- package/.agent/agents/mobile-reviewer.md +162 -195
- package/.agent/agents/orchestrator.md +181 -211
- package/.agent/agents/penetration-tester.md +157 -174
- package/.agent/agents/performance-optimizer.md +183 -203
- package/.agent/agents/performance-reviewer.md +178 -211
- package/.agent/agents/precedence-reviewer.md +213 -0
- package/.agent/agents/product-manager.md +142 -162
- package/.agent/agents/product-owner.md +6 -25
- package/.agent/agents/project-planner.md +142 -162
- package/.agent/agents/qa-automation-engineer.md +225 -242
- package/.agent/agents/security-auditor.md +174 -194
- package/.agent/agents/seo-specialist.md +193 -213
- package/.agent/agents/sql-reviewer.md +161 -194
- package/.agent/agents/supervisor-agent.md +184 -203
- package/.agent/agents/swarm-worker-contracts.md +17 -17
- package/.agent/agents/swarm-worker-registry.md +46 -46
- package/.agent/agents/test-coverage-reviewer.md +160 -193
- package/.agent/agents/test-engineer.md +0 -21
- package/.agent/agents/type-safety-reviewer.md +175 -208
- package/.agent/patterns/generator.md +9 -9
- package/.agent/patterns/inversion.md +12 -12
- package/.agent/patterns/pipeline.md +9 -9
- package/.agent/patterns/reviewer.md +13 -13
- package/.agent/patterns/tool-wrapper.md +9 -9
- package/.agent/rules/GEMINI.md +63 -63
- package/.agent/scripts/append_flow.js +72 -0
- package/.agent/scripts/case_law_manager.py +525 -0
- package/.agent/scripts/compress_skills.py +167 -0
- package/.agent/scripts/consolidate_skills.py +173 -0
- package/.agent/scripts/deep_compress.py +202 -0
- package/.agent/scripts/minify_context.py +80 -0
- package/.agent/scripts/security_scan.py +1 -1
- package/.agent/scripts/skill_evolution.py +563 -0
- package/.agent/scripts/strip_tribunal.py +41 -0
- package/.agent/skills/agent-organizer/SKILL.md +100 -126
- package/.agent/skills/agentic-patterns/SKILL.md +0 -70
- package/.agent/skills/ai-prompt-injection-defense/SKILL.md +134 -160
- package/.agent/skills/api-patterns/SKILL.md +123 -215
- package/.agent/skills/api-security-auditor/SKILL.md +143 -177
- package/.agent/skills/app-builder/SKILL.md +334 -50
- package/.agent/skills/app-builder/templates/SKILL.md +13 -15
- package/.agent/skills/app-builder/templates/astro-static/TEMPLATE.md +16 -16
- package/.agent/skills/app-builder/templates/chrome-extension/TEMPLATE.md +22 -22
- package/.agent/skills/app-builder/templates/cli-tool/TEMPLATE.md +18 -18
- package/.agent/skills/app-builder/templates/electron-desktop/TEMPLATE.md +20 -20
- package/.agent/skills/app-builder/templates/express-api/TEMPLATE.md +17 -17
- package/.agent/skills/app-builder/templates/flutter-app/TEMPLATE.md +18 -18
- package/.agent/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +21 -21
- package/.agent/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +19 -19
- package/.agent/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +26 -26
- package/.agent/skills/app-builder/templates/nextjs-static/TEMPLATE.md +26 -26
- package/.agent/skills/app-builder/templates/nuxt-app/TEMPLATE.md +19 -19
- package/.agent/skills/app-builder/templates/python-fastapi/TEMPLATE.md +18 -18
- package/.agent/skills/app-builder/templates/react-native-app/TEMPLATE.md +20 -20
- package/.agent/skills/appflow-wireframe/SKILL.md +95 -121
- package/.agent/skills/architecture/SKILL.md +169 -331
- package/.agent/skills/authentication-best-practices/SKILL.md +139 -173
- package/.agent/skills/bash-linux/SKILL.md +129 -154
- package/.agent/skills/behavioral-modes/SKILL.md +8 -69
- package/.agent/skills/brainstorming/SKILL.md +436 -104
- package/.agent/skills/building-native-ui/SKILL.md +152 -174
- package/.agent/skills/clean-code/SKILL.md +331 -360
- package/.agent/skills/code-review-checklist/SKILL.md +0 -62
- package/.agent/skills/config-validator/SKILL.md +115 -141
- package/.agent/skills/csharp-developer/SKILL.md +468 -528
- package/.agent/skills/database-design/SKILL.md +104 -369
- package/.agent/skills/deployment-procedures/SKILL.md +119 -145
- package/.agent/skills/devops-engineer/SKILL.md +295 -332
- package/.agent/skills/devops-incident-responder/SKILL.md +87 -113
- package/.agent/skills/doc.md +5 -5
- package/.agent/skills/documentation-templates/SKILL.md +27 -63
- package/.agent/skills/edge-computing/SKILL.md +131 -157
- package/.agent/skills/extract-design-system/SKILL.md +108 -134
- package/.agent/skills/framer-motion-expert/SKILL.md +111 -855
- package/.agent/skills/frontend-design/SKILL.md +151 -499
- package/.agent/skills/game-design-expert/SKILL.md +79 -105
- package/.agent/skills/game-engineering-expert/SKILL.md +96 -122
- package/.agent/skills/geo-fundamentals/SKILL.md +97 -124
- package/.agent/skills/github-operations/SKILL.md +279 -314
- package/.agent/skills/gsap-expert/SKILL.md +119 -826
- package/.agent/skills/i18n-localization/SKILL.md +113 -138
- package/.agent/skills/intelligent-routing/SKILL.md +167 -127
- package/.agent/skills/lint-and-validate/SKILL.md +16 -52
- package/.agent/skills/llm-engineering/SKILL.md +344 -357
- package/.agent/skills/local-first/SKILL.md +128 -154
- package/.agent/skills/mcp-builder/SKILL.md +92 -118
- package/.agent/skills/mobile-design/SKILL.md +213 -219
- package/.agent/skills/motion-engineering/SKILL.md +184 -0
- package/.agent/skills/nextjs-react-expert/SKILL.md +99 -698
- package/.agent/skills/nodejs-best-practices/SKILL.md +498 -559
- package/.agent/skills/observability/SKILL.md +293 -330
- package/.agent/skills/parallel-agents/SKILL.md +96 -122
- package/.agent/skills/performance-profiling/SKILL.md +217 -254
- package/.agent/skills/plan-writing/SKILL.md +92 -118
- package/.agent/skills/platform-engineer/SKILL.md +97 -123
- package/.agent/skills/playwright-best-practices/SKILL.md +137 -162
- package/.agent/skills/powershell-windows/SKILL.md +112 -146
- package/.agent/skills/project-idioms/SKILL.md +87 -0
- package/.agent/skills/python-patterns/SKILL.md +15 -35
- package/.agent/skills/python-pro/SKILL.md +148 -754
- package/.agent/skills/react-specialist/SKILL.md +123 -827
- package/.agent/skills/readme-builder/SKILL.md +23 -85
- package/.agent/skills/realtime-patterns/SKILL.md +269 -304
- package/.agent/skills/red-team-tactics/SKILL.md +18 -51
- package/.agent/skills/rust-pro/SKILL.md +623 -701
- package/.agent/skills/seo-fundamentals/SKILL.md +129 -154
- package/.agent/skills/server-management/SKILL.md +164 -190
- package/.agent/skills/shadcn-ui-expert/SKILL.md +181 -206
- package/.agent/skills/skill-creator/SKILL.md +24 -56
- package/.agent/skills/sql-pro/SKILL.md +579 -633
- package/.agent/skills/supabase-postgres-best-practices/SKILL.md +35 -66
- package/.agent/skills/swiftui-expert/SKILL.md +151 -176
- package/.agent/skills/systematic-debugging/SKILL.md +92 -118
- package/.agent/skills/tailwind-patterns/SKILL.md +516 -576
- package/.agent/skills/tdd-workflow/SKILL.md +111 -137
- package/.agent/skills/test-result-analyzer/SKILL.md +33 -73
- package/.agent/skills/testing-patterns/SKILL.md +512 -573
- package/.agent/skills/trend-researcher/SKILL.md +30 -71
- package/.agent/skills/ui-ux-pro-max/SKILL.md +8 -41
- package/.agent/skills/ui-ux-researcher/SKILL.md +51 -91
- package/.agent/skills/vue-expert/SKILL.md +127 -866
- package/.agent/skills/vulnerability-scanner/SKILL.md +354 -269
- package/.agent/skills/web-accessibility-auditor/SKILL.md +168 -193
- package/.agent/skills/web-design-guidelines/SKILL.md +25 -61
- package/.agent/skills/webapp-testing/SKILL.md +119 -145
- package/.agent/skills/whimsy-injector/SKILL.md +58 -132
- package/.agent/skills/workflow-optimizer/SKILL.md +28 -68
- package/.agent/workflows/api-tester.md +151 -151
- package/.agent/workflows/audit.md +127 -138
- package/.agent/workflows/brainstorm.md +110 -110
- package/.agent/workflows/changelog.md +112 -112
- package/.agent/workflows/create.md +124 -124
- package/.agent/workflows/debug.md +165 -189
- package/.agent/workflows/deploy.md +180 -189
- package/.agent/workflows/enhance.md +128 -151
- package/.agent/workflows/fix.md +114 -135
- package/.agent/workflows/generate.md +13 -4
- package/.agent/workflows/migrate.md +160 -160
- package/.agent/workflows/orchestrate.md +168 -168
- package/.agent/workflows/performance-benchmarker.md +114 -123
- package/.agent/workflows/plan.md +173 -173
- package/.agent/workflows/preview.md +80 -80
- package/.agent/workflows/refactor.md +161 -183
- package/.agent/workflows/review-ai.md +101 -129
- package/.agent/workflows/review.md +116 -116
- package/.agent/workflows/session.md +94 -94
- package/.agent/workflows/status.md +79 -79
- package/.agent/workflows/strengthen-skills.md +138 -139
- package/.agent/workflows/swarm.md +179 -179
- package/.agent/workflows/test.md +189 -211
- package/.agent/workflows/tribunal-backend.md +94 -113
- package/.agent/workflows/tribunal-database.md +95 -115
- package/.agent/workflows/tribunal-frontend.md +96 -118
- package/.agent/workflows/tribunal-full.md +93 -133
- package/.agent/workflows/tribunal-mobile.md +95 -119
- package/.agent/workflows/tribunal-performance.md +110 -133
- package/.agent/workflows/ui-ux-pro-max.md +122 -143
- package/README.md +30 -1
- package/bin/tribunal-kit.js +175 -12
- package/package.json +25 -4
- package/.agent/skills/api-patterns/api-style.md +0 -42
- package/.agent/skills/api-patterns/auth.md +0 -24
- package/.agent/skills/api-patterns/documentation.md +0 -26
- package/.agent/skills/api-patterns/graphql.md +0 -41
- package/.agent/skills/api-patterns/rate-limiting.md +0 -31
- package/.agent/skills/api-patterns/response.md +0 -37
- package/.agent/skills/api-patterns/rest.md +0 -40
- package/.agent/skills/api-patterns/security-testing.md +0 -122
- package/.agent/skills/api-patterns/trpc.md +0 -41
- package/.agent/skills/api-patterns/versioning.md +0 -22
- package/.agent/skills/app-builder/agent-coordination.md +0 -71
- package/.agent/skills/app-builder/feature-building.md +0 -53
- package/.agent/skills/app-builder/project-detection.md +0 -34
- package/.agent/skills/app-builder/scaffolding.md +0 -118
- package/.agent/skills/app-builder/tech-stack.md +0 -40
- package/.agent/skills/architecture/context-discovery.md +0 -43
- package/.agent/skills/architecture/examples.md +0 -94
- package/.agent/skills/architecture/pattern-selection.md +0 -68
- package/.agent/skills/architecture/patterns-reference.md +0 -50
- package/.agent/skills/architecture/trade-off-analysis.md +0 -77
- package/.agent/skills/brainstorming/dynamic-questioning.md +0 -360
- package/.agent/skills/database-design/database-selection.md +0 -43
- package/.agent/skills/database-design/indexing.md +0 -39
- package/.agent/skills/database-design/migrations.md +0 -48
- package/.agent/skills/database-design/optimization.md +0 -36
- package/.agent/skills/database-design/orm-selection.md +0 -30
- package/.agent/skills/database-design/schema-design.md +0 -56
- package/.agent/skills/frontend-design/animation-guide.md +0 -331
- package/.agent/skills/frontend-design/color-system.md +0 -329
- package/.agent/skills/frontend-design/decision-trees.md +0 -418
- package/.agent/skills/frontend-design/motion-graphics.md +0 -306
- package/.agent/skills/frontend-design/typography-system.md +0 -363
- package/.agent/skills/frontend-design/ux-psychology.md +0 -1116
- package/.agent/skills/frontend-design/visual-effects.md +0 -383
- package/.agent/skills/intelligent-routing/router-manifest.md +0 -65
- package/.agent/skills/mobile-design/decision-trees.md +0 -516
- package/.agent/skills/mobile-design/mobile-backend.md +0 -491
- package/.agent/skills/mobile-design/mobile-color-system.md +0 -420
- package/.agent/skills/mobile-design/mobile-debugging.md +0 -122
- package/.agent/skills/mobile-design/mobile-design-thinking.md +0 -357
- package/.agent/skills/mobile-design/mobile-navigation.md +0 -458
- package/.agent/skills/mobile-design/mobile-performance.md +0 -767
- package/.agent/skills/mobile-design/mobile-testing.md +0 -356
- package/.agent/skills/mobile-design/mobile-typography.md +0 -433
- package/.agent/skills/mobile-design/platform-android.md +0 -666
- package/.agent/skills/mobile-design/platform-ios.md +0 -561
- package/.agent/skills/mobile-design/touch-psychology.md +0 -537
- package/.agent/skills/nextjs-react-expert/1-async-eliminating-waterfalls.md +0 -312
- package/.agent/skills/nextjs-react-expert/2-bundle-bundle-size-optimization.md +0 -240
- package/.agent/skills/nextjs-react-expert/3-server-server-side-performance.md +0 -490
- package/.agent/skills/nextjs-react-expert/4-client-client-side-data-fetching.md +0 -264
- package/.agent/skills/nextjs-react-expert/5-rerender-re-render-optimization.md +0 -581
- package/.agent/skills/nextjs-react-expert/6-rendering-rendering-performance.md +0 -432
- package/.agent/skills/nextjs-react-expert/7-js-javascript-performance.md +0 -684
- package/.agent/skills/nextjs-react-expert/8-advanced-advanced-patterns.md +0 -150
- 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
|
|
6
|
-
last-updated: 2026-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
|
57
|
-
|
|
58
|
-
|
|
|
59
|
-
|
|
|
60
|
-
|
|
|
61
|
-
|
|
|
62
|
-
|
|
|
63
|
-
|
|
|
64
|
-
|
|
|
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
|
-
|
|
|
185
|
-
|
|
186
|
-
|
|
|
187
|
-
|
|
|
188
|
-
|
|
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
|
-
##
|
|
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
|
-
|
|
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
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
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
|
-
|
|
368
|
+
### Next.js Full-Stack Structure (2025 Optimized)
|
|
211
369
|
|
|
212
|
-
|
|
213
|
-
|
|
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
|
-
###
|
|
438
|
+
### Core Files
|
|
216
439
|
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
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
|
-
|
|
450
|
+
---
|
|
224
451
|
|
|
225
|
-
|
|
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
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
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
|
-
###
|
|
514
|
+
### Alternative Options
|
|
235
515
|
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
-
|
|
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
|
-
|
|
|
15
|
+
|Template|Tech Stack|When to Use|
|
|
18
16
|
|----------|------------|-------------|
|
|
19
|
-
|
|
|
20
|
-
|
|
|
21
|
-
|
|
|
22
|
-
|
|
|
23
|
-
|
|
|
24
|
-
|
|
|
25
|
-
|
|
|
26
|
-
|
|
|
27
|
-
|
|
|
28
|
-
|
|
|
29
|
-
|
|
|
30
|
-
|
|
|
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
|
-
|
|
|
10
|
+
|Component|Technology|
|
|
11
11
|
|-----------|------------|
|
|
12
|
-
|
|
|
13
|
-
|
|
|
14
|
-
|
|
|
15
|
-
|
|
|
16
|
-
|
|
|
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
|
-
|
|
|
41
|
+
|Concept|Description|
|
|
42
42
|
|---------|-------------|
|
|
43
|
-
|
|
|
44
|
-
|
|
|
45
|
-
|
|
|
46
|
-
|
|
|
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
|
-
|
|
|
62
|
+
|Platform|Method|
|
|
63
63
|
|----------|--------|
|
|
64
|
-
|
|
|
65
|
-
|
|
|
66
|
-
|
|
|
67
|
-
|
|
|
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
|
-
|
|
|
10
|
+
|Component|Technology|
|
|
11
11
|
|-----------|------------|
|
|
12
|
-
|
|
|
13
|
-
|
|
|
14
|
-
|
|
|
15
|
-
|
|
|
16
|
-
|
|
|
17
|
-
|
|
|
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
|
-
|
|
|
45
|
+
|Component|Purpose|
|
|
46
46
|
|-----------|---------|
|
|
47
|
-
|
|
|
48
|
-
|
|
|
49
|
-
|
|
|
50
|
-
|
|
|
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
|
-
|
|
|
56
|
+
|Permission|Use|
|
|
57
57
|
|------------|-----|
|
|
58
|
-
|
|
|
59
|
-
|
|
|
60
|
-
|
|
|
61
|
-
|
|
|
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
|
-
|
|
|
78
|
+
|Task|Method|
|
|
79
79
|
|------|--------|
|
|
80
|
-
|
|
|
81
|
-
|
|
|
82
|
-
|
|
|
83
|
-
|
|
|
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
|
-
|
|
|
10
|
+
|Component|Technology|
|
|
11
11
|
|-----------|------------|
|
|
12
|
-
|
|
|
13
|
-
|
|
|
14
|
-
|
|
|
15
|
-
|
|
|
16
|
-
|
|
|
17
|
-
|
|
|
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
|
-
|
|
|
42
|
+
|Principle|Description|
|
|
43
43
|
|-----------|-------------|
|
|
44
|
-
|
|
|
45
|
-
|
|
|
46
|
-
|
|
|
47
|
-
|
|
|
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
|
-
|
|
|
53
|
+
|Component|Purpose|
|
|
54
54
|
|-----------|---------|
|
|
55
|
-
|
|
|
56
|
-
|
|
|
57
|
-
|
|
|
58
|
-
|
|
|
59
|
-
|
|
|
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
|
|