cp-toolkit 2.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 (196) hide show
  1. package/README.md +130 -0
  2. package/bin/cp-kit.js +72 -0
  3. package/package.json +46 -0
  4. package/src/commands/add.js +212 -0
  5. package/src/commands/doctor.js +149 -0
  6. package/src/commands/init.js +662 -0
  7. package/src/commands/list.js +128 -0
  8. package/src/index.js +13 -0
  9. package/templates/agents/backend-specialist.md +263 -0
  10. package/templates/agents/code-archaeologist.md +106 -0
  11. package/templates/agents/database-architect.md +226 -0
  12. package/templates/agents/debugger.md +225 -0
  13. package/templates/agents/devops-engineer.md +242 -0
  14. package/templates/agents/documentation-writer.md +104 -0
  15. package/templates/agents/explorer-agent.md +73 -0
  16. package/templates/agents/frontend-specialist.md +556 -0
  17. package/templates/agents/game-developer.md +162 -0
  18. package/templates/agents/mobile-developer.md +377 -0
  19. package/templates/agents/orchestrator.md +416 -0
  20. package/templates/agents/penetration-tester.md +188 -0
  21. package/templates/agents/performance-optimizer.md +187 -0
  22. package/templates/agents/product-manager.md +112 -0
  23. package/templates/agents/product-owner.md +95 -0
  24. package/templates/agents/project-planner.md +406 -0
  25. package/templates/agents/qa-automation-engineer.md +103 -0
  26. package/templates/agents/security-auditor.md +170 -0
  27. package/templates/agents/seo-specialist.md +111 -0
  28. package/templates/agents/test-engineer.md +158 -0
  29. package/templates/github/agents/backend-specialist.md +67 -0
  30. package/templates/github/agents/code-archaeologist.md +61 -0
  31. package/templates/github/agents/database-architect.md +73 -0
  32. package/templates/github/agents/debugger.md +71 -0
  33. package/templates/github/agents/devops-engineer.md +85 -0
  34. package/templates/github/agents/documentation-writer.md +107 -0
  35. package/templates/github/agents/explorer-agent.md +87 -0
  36. package/templates/github/agents/frontend-specialist.md +54 -0
  37. package/templates/github/agents/game-developer.md +94 -0
  38. package/templates/github/agents/mobile-developer.md +75 -0
  39. package/templates/github/agents/orchestrator.md +48 -0
  40. package/templates/github/agents/penetration-tester.md +87 -0
  41. package/templates/github/agents/performance-optimizer.md +70 -0
  42. package/templates/github/agents/product-manager.md +85 -0
  43. package/templates/github/agents/product-owner.md +77 -0
  44. package/templates/github/agents/project-planner.md +83 -0
  45. package/templates/github/agents/qa-automation-engineer.md +95 -0
  46. package/templates/github/agents/security-auditor.md +72 -0
  47. package/templates/github/agents/seo-specialist.md +78 -0
  48. package/templates/github/agents/test-engineer.md +79 -0
  49. package/templates/github/instructions/database.instructions.md +74 -0
  50. package/templates/github/instructions/python.instructions.md +76 -0
  51. package/templates/github/instructions/security.instructions.md +73 -0
  52. package/templates/github/instructions/typescript.instructions.md +50 -0
  53. package/templates/rules/GEMINI.md +273 -0
  54. package/templates/scripts/mcp-server.js +704 -0
  55. package/templates/skills/core/behavioral-modes/SKILL.md +242 -0
  56. package/templates/skills/core/brainstorming/SKILL.md +163 -0
  57. package/templates/skills/core/brainstorming/dynamic-questioning.md +350 -0
  58. package/templates/skills/core/clean-code/SKILL.md +201 -0
  59. package/templates/skills/core/intelligent-routing/SKILL.md +335 -0
  60. package/templates/skills/core/mcp-builder/SKILL.md +176 -0
  61. package/templates/skills/core/parallel-agents/SKILL.md +175 -0
  62. package/templates/skills/core/plan-writing/SKILL.md +152 -0
  63. package/templates/skills/optional/api-patterns/SKILL.md +81 -0
  64. package/templates/skills/optional/api-patterns/api-style.md +42 -0
  65. package/templates/skills/optional/api-patterns/auth.md +24 -0
  66. package/templates/skills/optional/api-patterns/documentation.md +26 -0
  67. package/templates/skills/optional/api-patterns/graphql.md +41 -0
  68. package/templates/skills/optional/api-patterns/rate-limiting.md +31 -0
  69. package/templates/skills/optional/api-patterns/response.md +37 -0
  70. package/templates/skills/optional/api-patterns/rest.md +40 -0
  71. package/templates/skills/optional/api-patterns/scripts/api_validator.py +211 -0
  72. package/templates/skills/optional/api-patterns/security-testing.md +122 -0
  73. package/templates/skills/optional/api-patterns/trpc.md +41 -0
  74. package/templates/skills/optional/api-patterns/versioning.md +22 -0
  75. package/templates/skills/optional/app-builder/SKILL.md +75 -0
  76. package/templates/skills/optional/app-builder/agent-coordination.md +71 -0
  77. package/templates/skills/optional/app-builder/feature-building.md +53 -0
  78. package/templates/skills/optional/app-builder/project-detection.md +34 -0
  79. package/templates/skills/optional/app-builder/scaffolding.md +118 -0
  80. package/templates/skills/optional/app-builder/tech-stack.md +40 -0
  81. package/templates/skills/optional/app-builder/templates/SKILL.md +39 -0
  82. package/templates/skills/optional/app-builder/templates/astro-static/TEMPLATE.md +76 -0
  83. package/templates/skills/optional/app-builder/templates/chrome-extension/TEMPLATE.md +92 -0
  84. package/templates/skills/optional/app-builder/templates/cli-tool/TEMPLATE.md +88 -0
  85. package/templates/skills/optional/app-builder/templates/electron-desktop/TEMPLATE.md +88 -0
  86. package/templates/skills/optional/app-builder/templates/express-api/TEMPLATE.md +83 -0
  87. package/templates/skills/optional/app-builder/templates/flutter-app/TEMPLATE.md +90 -0
  88. package/templates/skills/optional/app-builder/templates/monorepo-turborepo/TEMPLATE.md +90 -0
  89. package/templates/skills/optional/app-builder/templates/nextjs-fullstack/TEMPLATE.md +82 -0
  90. package/templates/skills/optional/app-builder/templates/nextjs-saas/TEMPLATE.md +100 -0
  91. package/templates/skills/optional/app-builder/templates/nextjs-static/TEMPLATE.md +106 -0
  92. package/templates/skills/optional/app-builder/templates/nuxt-app/TEMPLATE.md +101 -0
  93. package/templates/skills/optional/app-builder/templates/python-fastapi/TEMPLATE.md +83 -0
  94. package/templates/skills/optional/app-builder/templates/react-native-app/TEMPLATE.md +93 -0
  95. package/templates/skills/optional/architecture/SKILL.md +55 -0
  96. package/templates/skills/optional/architecture/context-discovery.md +43 -0
  97. package/templates/skills/optional/architecture/examples.md +94 -0
  98. package/templates/skills/optional/architecture/pattern-selection.md +68 -0
  99. package/templates/skills/optional/architecture/patterns-reference.md +50 -0
  100. package/templates/skills/optional/architecture/trade-off-analysis.md +77 -0
  101. package/templates/skills/optional/bash-linux/SKILL.md +199 -0
  102. package/templates/skills/optional/code-review-checklist/SKILL.md +109 -0
  103. package/templates/skills/optional/database-design/SKILL.md +52 -0
  104. package/templates/skills/optional/database-design/database-selection.md +43 -0
  105. package/templates/skills/optional/database-design/indexing.md +39 -0
  106. package/templates/skills/optional/database-design/migrations.md +48 -0
  107. package/templates/skills/optional/database-design/optimization.md +36 -0
  108. package/templates/skills/optional/database-design/orm-selection.md +30 -0
  109. package/templates/skills/optional/database-design/schema-design.md +56 -0
  110. package/templates/skills/optional/database-design/scripts/schema_validator.py +172 -0
  111. package/templates/skills/optional/deployment-procedures/SKILL.md +241 -0
  112. package/templates/skills/optional/documentation-templates/SKILL.md +194 -0
  113. package/templates/skills/optional/frontend-design/SKILL.md +418 -0
  114. package/templates/skills/optional/frontend-design/animation-guide.md +331 -0
  115. package/templates/skills/optional/frontend-design/color-system.md +311 -0
  116. package/templates/skills/optional/frontend-design/decision-trees.md +418 -0
  117. package/templates/skills/optional/frontend-design/motion-graphics.md +306 -0
  118. package/templates/skills/optional/frontend-design/scripts/accessibility_checker.py +183 -0
  119. package/templates/skills/optional/frontend-design/scripts/ux_audit.py +722 -0
  120. package/templates/skills/optional/frontend-design/typography-system.md +345 -0
  121. package/templates/skills/optional/frontend-design/ux-psychology.md +541 -0
  122. package/templates/skills/optional/frontend-design/visual-effects.md +383 -0
  123. package/templates/skills/optional/game-development/2d-games/SKILL.md +119 -0
  124. package/templates/skills/optional/game-development/3d-games/SKILL.md +135 -0
  125. package/templates/skills/optional/game-development/SKILL.md +167 -0
  126. package/templates/skills/optional/game-development/game-art/SKILL.md +185 -0
  127. package/templates/skills/optional/game-development/game-audio/SKILL.md +190 -0
  128. package/templates/skills/optional/game-development/game-design/SKILL.md +129 -0
  129. package/templates/skills/optional/game-development/mobile-games/SKILL.md +108 -0
  130. package/templates/skills/optional/game-development/multiplayer/SKILL.md +132 -0
  131. package/templates/skills/optional/game-development/pc-games/SKILL.md +144 -0
  132. package/templates/skills/optional/game-development/vr-ar/SKILL.md +123 -0
  133. package/templates/skills/optional/game-development/web-games/SKILL.md +150 -0
  134. package/templates/skills/optional/geo-fundamentals/SKILL.md +156 -0
  135. package/templates/skills/optional/geo-fundamentals/scripts/geo_checker.py +289 -0
  136. package/templates/skills/optional/i18n-localization/SKILL.md +154 -0
  137. package/templates/skills/optional/i18n-localization/scripts/i18n_checker.py +241 -0
  138. package/templates/skills/optional/lint-and-validate/SKILL.md +45 -0
  139. package/templates/skills/optional/lint-and-validate/scripts/lint_runner.py +172 -0
  140. package/templates/skills/optional/lint-and-validate/scripts/type_coverage.py +173 -0
  141. package/templates/skills/optional/mobile-design/SKILL.md +394 -0
  142. package/templates/skills/optional/mobile-design/decision-trees.md +516 -0
  143. package/templates/skills/optional/mobile-design/mobile-backend.md +491 -0
  144. package/templates/skills/optional/mobile-design/mobile-color-system.md +420 -0
  145. package/templates/skills/optional/mobile-design/mobile-debugging.md +122 -0
  146. package/templates/skills/optional/mobile-design/mobile-design-thinking.md +357 -0
  147. package/templates/skills/optional/mobile-design/mobile-navigation.md +458 -0
  148. package/templates/skills/optional/mobile-design/mobile-performance.md +767 -0
  149. package/templates/skills/optional/mobile-design/mobile-testing.md +356 -0
  150. package/templates/skills/optional/mobile-design/mobile-typography.md +433 -0
  151. package/templates/skills/optional/mobile-design/platform-android.md +666 -0
  152. package/templates/skills/optional/mobile-design/platform-ios.md +561 -0
  153. package/templates/skills/optional/mobile-design/scripts/mobile_audit.py +670 -0
  154. package/templates/skills/optional/mobile-design/touch-psychology.md +537 -0
  155. package/templates/skills/optional/nextjs-react-expert/1-async-eliminating-waterfalls.md +312 -0
  156. package/templates/skills/optional/nextjs-react-expert/2-bundle-bundle-size-optimization.md +240 -0
  157. package/templates/skills/optional/nextjs-react-expert/3-server-server-side-performance.md +490 -0
  158. package/templates/skills/optional/nextjs-react-expert/4-client-client-side-data-fetching.md +264 -0
  159. package/templates/skills/optional/nextjs-react-expert/5-rerender-re-render-optimization.md +581 -0
  160. package/templates/skills/optional/nextjs-react-expert/6-rendering-rendering-performance.md +432 -0
  161. package/templates/skills/optional/nextjs-react-expert/7-js-javascript-performance.md +684 -0
  162. package/templates/skills/optional/nextjs-react-expert/8-advanced-advanced-patterns.md +150 -0
  163. package/templates/skills/optional/nextjs-react-expert/SKILL.md +267 -0
  164. package/templates/skills/optional/nextjs-react-expert/scripts/convert_rules.py +222 -0
  165. package/templates/skills/optional/nextjs-react-expert/scripts/react_performance_checker.py +252 -0
  166. package/templates/skills/optional/nodejs-best-practices/SKILL.md +333 -0
  167. package/templates/skills/optional/performance-profiling/SKILL.md +143 -0
  168. package/templates/skills/optional/performance-profiling/scripts/lighthouse_audit.py +76 -0
  169. package/templates/skills/optional/powershell-windows/SKILL.md +167 -0
  170. package/templates/skills/optional/python-patterns/SKILL.md +441 -0
  171. package/templates/skills/optional/red-team-tactics/SKILL.md +199 -0
  172. package/templates/skills/optional/seo-fundamentals/SKILL.md +129 -0
  173. package/templates/skills/optional/seo-fundamentals/scripts/seo_checker.py +219 -0
  174. package/templates/skills/optional/server-management/SKILL.md +161 -0
  175. package/templates/skills/optional/systematic-debugging/SKILL.md +109 -0
  176. package/templates/skills/optional/tailwind-patterns/SKILL.md +269 -0
  177. package/templates/skills/optional/tdd-workflow/SKILL.md +149 -0
  178. package/templates/skills/optional/testing-patterns/SKILL.md +178 -0
  179. package/templates/skills/optional/testing-patterns/scripts/test_runner.py +219 -0
  180. package/templates/skills/optional/vulnerability-scanner/SKILL.md +276 -0
  181. package/templates/skills/optional/vulnerability-scanner/checklists.md +121 -0
  182. package/templates/skills/optional/vulnerability-scanner/scripts/security_scan.py +458 -0
  183. package/templates/skills/optional/web-design-guidelines/SKILL.md +57 -0
  184. package/templates/skills/optional/webapp-testing/SKILL.md +187 -0
  185. package/templates/skills/optional/webapp-testing/scripts/playwright_runner.py +173 -0
  186. package/templates/workflows/brainstorm.md +113 -0
  187. package/templates/workflows/create.md +59 -0
  188. package/templates/workflows/debug.md +103 -0
  189. package/templates/workflows/deploy.md +176 -0
  190. package/templates/workflows/enhance.md +63 -0
  191. package/templates/workflows/orchestrate.md +237 -0
  192. package/templates/workflows/plan.md +89 -0
  193. package/templates/workflows/preview.md +81 -0
  194. package/templates/workflows/status.md +86 -0
  195. package/templates/workflows/test.md +144 -0
  196. package/templates/workflows/ui-ux-pro-max.md +296 -0
@@ -0,0 +1,122 @@
1
+ # API Security Testing
2
+
3
+ > Principles for testing API security. OWASP API Top 10, authentication, authorization testing.
4
+
5
+ ---
6
+
7
+ ## OWASP API Security Top 10
8
+
9
+ | Vulnerability | Test Focus |
10
+ |---------------|------------|
11
+ | **API1: BOLA** | Access other users' resources |
12
+ | **API2: Broken Auth** | JWT, session, credentials |
13
+ | **API3: Property Auth** | Mass assignment, data exposure |
14
+ | **API4: Resource Consumption** | Rate limiting, DoS |
15
+ | **API5: Function Auth** | Admin endpoints, role bypass |
16
+ | **API6: Business Flow** | Logic abuse, automation |
17
+ | **API7: SSRF** | Internal network access |
18
+ | **API8: Misconfiguration** | Debug endpoints, CORS |
19
+ | **API9: Inventory** | Shadow APIs, old versions |
20
+ | **API10: Unsafe Consumption** | Third-party API trust |
21
+
22
+ ---
23
+
24
+ ## Authentication Testing
25
+
26
+ ### JWT Testing
27
+
28
+ | Check | What to Test |
29
+ |-------|--------------|
30
+ | Algorithm | None, algorithm confusion |
31
+ | Secret | Weak secrets, brute force |
32
+ | Claims | Expiration, issuer, audience |
33
+ | Signature | Manipulation, key injection |
34
+
35
+ ### Session Testing
36
+
37
+ | Check | What to Test |
38
+ |-------|--------------|
39
+ | Generation | Predictability |
40
+ | Storage | Client-side security |
41
+ | Expiration | Timeout enforcement |
42
+ | Invalidation | Logout effectiveness |
43
+
44
+ ---
45
+
46
+ ## Authorization Testing
47
+
48
+ | Test Type | Approach |
49
+ |-----------|----------|
50
+ | **Horizontal** | Access peer users' data |
51
+ | **Vertical** | Access higher privilege functions |
52
+ | **Context** | Access outside allowed scope |
53
+
54
+ ### BOLA/IDOR Testing
55
+
56
+ 1. Identify resource IDs in requests
57
+ 2. Capture request with user A's session
58
+ 3. Replay with user B's session
59
+ 4. Check for unauthorized access
60
+
61
+ ---
62
+
63
+ ## Input Validation Testing
64
+
65
+ | Injection Type | Test Focus |
66
+ |----------------|------------|
67
+ | SQL | Query manipulation |
68
+ | NoSQL | Document queries |
69
+ | Command | System commands |
70
+ | LDAP | Directory queries |
71
+
72
+ **Approach:** Test all parameters, try type coercion, test boundaries, check error messages.
73
+
74
+ ---
75
+
76
+ ## Rate Limiting Testing
77
+
78
+ | Aspect | Check |
79
+ |--------|-------|
80
+ | Existence | Is there any limit? |
81
+ | Bypass | Headers, IP rotation |
82
+ | Scope | Per-user, per-IP, global |
83
+
84
+ **Bypass techniques:** X-Forwarded-For, different HTTP methods, case variations, API versioning.
85
+
86
+ ---
87
+
88
+ ## GraphQL Security
89
+
90
+ | Test | Focus |
91
+ |------|-------|
92
+ | Introspection | Schema disclosure |
93
+ | Batching | Query DoS |
94
+ | Nesting | Depth-based DoS |
95
+ | Authorization | Field-level access |
96
+
97
+ ---
98
+
99
+ ## Security Testing Checklist
100
+
101
+ **Authentication:**
102
+ - [ ] Test for bypass
103
+ - [ ] Check credential strength
104
+ - [ ] Verify token security
105
+
106
+ **Authorization:**
107
+ - [ ] Test BOLA/IDOR
108
+ - [ ] Check privilege escalation
109
+ - [ ] Verify function access
110
+
111
+ **Input:**
112
+ - [ ] Test all parameters
113
+ - [ ] Check for injection
114
+
115
+ **Config:**
116
+ - [ ] Check CORS
117
+ - [ ] Verify headers
118
+ - [ ] Test error handling
119
+
120
+ ---
121
+
122
+ > **Remember:** APIs are the backbone of modern apps. Test them like attackers will.
@@ -0,0 +1,41 @@
1
+ # tRPC Principles
2
+
3
+ > End-to-end type safety for TypeScript monorepos.
4
+
5
+ ## When to Use
6
+
7
+ ```
8
+ ✅ Perfect fit:
9
+ ├── TypeScript on both ends
10
+ ├── Monorepo structure
11
+ ├── Internal tools
12
+ ├── Rapid development
13
+ └── Type safety critical
14
+
15
+ ❌ Poor fit:
16
+ ├── Non-TypeScript clients
17
+ ├── Public API
18
+ ├── Need REST conventions
19
+ └── Multiple language backends
20
+ ```
21
+
22
+ ## Key Benefits
23
+
24
+ ```
25
+ Why tRPC:
26
+ ├── Zero schema maintenance
27
+ ├── End-to-end type inference
28
+ ├── IDE autocomplete across stack
29
+ ├── Instant API changes reflected
30
+ └── No code generation step
31
+ ```
32
+
33
+ ## Integration Patterns
34
+
35
+ ```
36
+ Common setups:
37
+ ├── Next.js + tRPC (most common)
38
+ ├── Monorepo with shared types
39
+ ├── Remix + tRPC
40
+ └── Any TS frontend + backend
41
+ ```
@@ -0,0 +1,22 @@
1
+ # Versioning Strategies
2
+
3
+ > Plan for API evolution from day one.
4
+
5
+ ## Decision Factors
6
+
7
+ | Strategy | Implementation | Trade-offs |
8
+ |----------|---------------|------------|
9
+ | **URI** | /v1/users | Clear, easy caching |
10
+ | **Header** | Accept-Version: 1 | Cleaner URLs, harder discovery |
11
+ | **Query** | ?version=1 | Easy to add, messy |
12
+ | **None** | Evolve carefully | Best for internal, risky for public |
13
+
14
+ ## Versioning Philosophy
15
+
16
+ ```
17
+ Consider:
18
+ ├── Public API? → Version in URI
19
+ ├── Internal only? → May not need versioning
20
+ ├── GraphQL? → Typically no versions (evolve schema)
21
+ ├── tRPC? → Types enforce compatibility
22
+ ```
@@ -0,0 +1,75 @@
1
+ ---
2
+ name: app-builder
3
+ description: Main application building orchestrator. Creates full-stack applications from natural language requests. Determines project type, selects tech stack, coordinates agents.
4
+ allowed-tools: Read, Write, Edit, Glob, Grep, Bash, Agent
5
+ ---
6
+
7
+ # App Builder - Application Building Orchestrator
8
+
9
+ > Analyzes user's requests, determines tech stack, plans structure, and coordinates agents.
10
+
11
+ ## 🎯 Selective Reading Rule
12
+
13
+ **Read ONLY files relevant to the request!** Check the content map, find what you need.
14
+
15
+ | File | Description | When to Read |
16
+ |------|-------------|--------------|
17
+ | `project-detection.md` | Keyword matrix, project type detection | Starting new project |
18
+ | `tech-stack.md` | 2025 default stack, alternatives | Choosing technologies |
19
+ | `agent-coordination.md` | Agent pipeline, execution order | Coordinating multi-agent work |
20
+ | `scaffolding.md` | Directory structure, core files | Creating project structure |
21
+ | `feature-building.md` | Feature analysis, error handling | Adding features to existing project |
22
+ | `templates/SKILL.md` | **Project templates** | Scaffolding new project |
23
+
24
+ ---
25
+
26
+ ## 📦 Templates (13)
27
+
28
+ Quick-start scaffolding for new projects. **Read the matching template only!**
29
+
30
+ | Template | Tech Stack | When to Use |
31
+ |----------|------------|-------------|
32
+ | [nextjs-fullstack](templates/nextjs-fullstack/TEMPLATE.md) | Next.js + Prisma | Full-stack web app |
33
+ | [nextjs-saas](templates/nextjs-saas/TEMPLATE.md) | Next.js + Stripe | SaaS product |
34
+ | [nextjs-static](templates/nextjs-static/TEMPLATE.md) | Next.js + Framer | Landing page |
35
+ | [nuxt-app](templates/nuxt-app/TEMPLATE.md) | Nuxt 3 + Pinia | Vue full-stack app |
36
+ | [express-api](templates/express-api/TEMPLATE.md) | Express + JWT | REST API |
37
+ | [python-fastapi](templates/python-fastapi/TEMPLATE.md) | FastAPI | Python API |
38
+ | [react-native-app](templates/react-native-app/TEMPLATE.md) | Expo + Zustand | Mobile app |
39
+ | [flutter-app](templates/flutter-app/TEMPLATE.md) | Flutter + Riverpod | Cross-platform mobile |
40
+ | [electron-desktop](templates/electron-desktop/TEMPLATE.md) | Electron + React | Desktop app |
41
+ | [chrome-extension](templates/chrome-extension/TEMPLATE.md) | Chrome MV3 | Browser extension |
42
+ | [cli-tool](templates/cli-tool/TEMPLATE.md) | Node.js + Commander | CLI app |
43
+ | [monorepo-turborepo](templates/monorepo-turborepo/TEMPLATE.md) | Turborepo + pnpm | Monorepo |
44
+
45
+ ---
46
+
47
+ ## 🔗 Related Agents
48
+
49
+ | Agent | Role |
50
+ |-------|------|
51
+ | `project-planner` | Task breakdown, dependency graph |
52
+ | `frontend-specialist` | UI components, pages |
53
+ | `backend-specialist` | API, business logic |
54
+ | `database-architect` | Schema, migrations |
55
+ | `devops-engineer` | Deployment, preview |
56
+
57
+ ---
58
+
59
+ ## Usage Example
60
+
61
+ ```
62
+ User: "Make an Instagram clone with photo sharing and likes"
63
+
64
+ App Builder Process:
65
+ 1. Project type: Social Media App
66
+ 2. Tech stack: Next.js + Prisma + Cloudinary + Clerk
67
+ 3. Create plan:
68
+ ├─ Database schema (users, posts, likes, follows)
69
+ ├─ API routes (12 endpoints)
70
+ ├─ Pages (feed, profile, upload)
71
+ └─ Components (PostCard, Feed, LikeButton)
72
+ 4. Coordinate agents
73
+ 5. Report progress
74
+ 6. Start preview
75
+ ```
@@ -0,0 +1,71 @@
1
+ # Agent Coordination
2
+
3
+ > How App Builder orchestrates specialist agents.
4
+
5
+ ## Agent Pipeline
6
+
7
+ ```
8
+ ┌─────────────────────────────────────────────────────────────┐
9
+ │ APP BUILDER (Orchestrator) │
10
+ └─────────────────────────────────────────────────────────────┘
11
+
12
+
13
+ ┌─────────────────────────────────────────────────────────────┐
14
+ │ PROJECT PLANNER │
15
+ │ • Task breakdown │
16
+ │ • Dependency graph │
17
+ │ • File structure planning │
18
+ │ • Create {task-slug}.md in project root (MANDATORY) │
19
+ └─────────────────────────────────────────────────────────────┘
20
+
21
+
22
+ ┌─────────────────────────────────────────────────────────────┐
23
+ │ CHECKPOINT: PLAN VERIFICATION │
24
+ │ 🔴 VERIFY: Does {task-slug}.md exist in project root? │
25
+ │ 🔴 If NO → STOP → Create plan file first │
26
+ │ 🔴 If YES → Proceed to specialist agents │
27
+ └─────────────────────────────────────────────────────────────┘
28
+
29
+ ┌───────────────────┼───────────────────┐
30
+ ▼ ▼ ▼
31
+ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
32
+ │ DATABASE │ │ BACKEND │ │ FRONTEND │
33
+ │ ARCHITECT │ │ SPECIALIST │ │ SPECIALIST │
34
+ │ │ │ │ │ │
35
+ │ • Schema design │ │ • API routes │ │ • Components │
36
+ │ • Migrations │ │ • Controllers │ │ • Pages │
37
+ │ • Seed data │ │ • Middleware │ │ • Styling │
38
+ └─────────────────┘ └─────────────────┘ └─────────────────┘
39
+ │ │ │
40
+ └───────────────────┼───────────────────┘
41
+
42
+ ┌─────────────────────────────────────────────────────────────┐
43
+ │ PARALLEL PHASE (Optional) │
44
+ │ • Security Auditor → Vulnerability check │
45
+ │ • Test Engineer → Unit tests │
46
+ │ • Performance Optimizer → Bundle analysis │
47
+ └─────────────────────────────────────────────────────────────┘
48
+
49
+
50
+ ┌─────────────────────────────────────────────────────────────┐
51
+ │ DEVOPS ENGINEER │
52
+ │ • Environment setup │
53
+ │ • Preview deployment │
54
+ │ • Health check │
55
+ └─────────────────────────────────────────────────────────────┘
56
+ ```
57
+
58
+ ## Execution Order
59
+
60
+ | Phase | Agent(s) | Parallel? | Prerequisite | CHECKPOINT |
61
+ |-------|----------|-----------|--------------|------------|
62
+ | 0 | Socratic Gate | ❌ | - | ✅ Ask 3 questions |
63
+ | 1 | Project Planner | ❌ | Questions answered | ✅ **PLAN.md created** |
64
+ | 1.5 | **PLAN VERIFICATION** | ❌ | PLAN.md exists | ✅ **File exists in root** |
65
+ | 2 | Database Architect | ❌ | Plan ready | Schema defined |
66
+ | 3 | Backend Specialist | ❌ | Schema ready | API routes created |
67
+ | 4 | Frontend Specialist | ✅ | API ready (partial) | UI components ready |
68
+ | 5 | Security Auditor, Test Engineer | ✅ | Code ready | Tests & audit pass |
69
+ | 6 | DevOps Engineer | ❌ | All code ready | Deployment ready |
70
+
71
+ > 🔴 **CRITICAL:** Phase 1.5 is MANDATORY. No specialist agents proceed without PLAN.md verification.
@@ -0,0 +1,53 @@
1
+ # Feature Building
2
+
3
+ > How to analyze and implement new features.
4
+
5
+ ## Feature Analysis
6
+
7
+ ```
8
+ Request: "add payment system"
9
+
10
+ Analysis:
11
+ ├── Required Changes:
12
+ │ ├── Database: orders, payments tables
13
+ │ ├── Backend: /api/checkout, /api/webhooks/stripe
14
+ │ ├── Frontend: CheckoutForm, PaymentSuccess
15
+ │ └── Config: Stripe API keys
16
+
17
+ ├── Dependencies:
18
+ │ ├── stripe package
19
+ │ └── Existing user authentication
20
+
21
+ └── Estimated Time: 15-20 minutes
22
+ ```
23
+
24
+ ## Iterative Enhancement Process
25
+
26
+ ```
27
+ 1. Analyze existing project
28
+ 2. Create change plan
29
+ 3. Present plan to user
30
+ 4. Get approval
31
+ 5. Apply changes
32
+ 6. Test
33
+ 7. Show preview
34
+ ```
35
+
36
+ ## Error Handling
37
+
38
+ | Error Type | Solution Strategy |
39
+ |------------|-------------------|
40
+ | TypeScript Error | Fix type, add missing import |
41
+ | Missing Dependency | Run npm install |
42
+ | Port Conflict | Suggest alternative port |
43
+ | Database Error | Check migration, validate connection |
44
+
45
+ ## Recovery Strategy
46
+
47
+ ```
48
+ 1. Detect error
49
+ 2. Try automatic fix
50
+ 3. If failed, report to user
51
+ 4. Suggest alternative
52
+ 5. Rollback if necessary
53
+ ```
@@ -0,0 +1,34 @@
1
+ # Project Type Detection
2
+
3
+ > Analyze user requests to determine project type and template.
4
+
5
+ ## Keyword Matrix
6
+
7
+ | Keywords | Project Type | Template |
8
+ |----------|--------------|----------|
9
+ | blog, post, article | Blog | astro-static |
10
+ | e-commerce, product, cart, payment | E-commerce | nextjs-saas |
11
+ | dashboard, panel, management | Admin Dashboard | nextjs-fullstack |
12
+ | api, backend, service, rest | API Service | express-api |
13
+ | python, fastapi, django | Python API | python-fastapi |
14
+ | mobile, android, ios, react native | Mobile App (RN) | react-native-app |
15
+ | flutter, dart | Mobile App (Flutter) | flutter-app |
16
+ | portfolio, personal, cv | Portfolio | nextjs-static |
17
+ | crm, customer, sales | CRM | nextjs-fullstack |
18
+ | saas, subscription, stripe | SaaS | nextjs-saas |
19
+ | landing, promotional, marketing | Landing Page | nextjs-static |
20
+ | docs, documentation | Documentation | astro-static |
21
+ | extension, plugin, chrome | Browser Extension | chrome-extension |
22
+ | desktop, electron | Desktop App | electron-desktop |
23
+ | cli, command line, terminal | CLI Tool | cli-tool |
24
+ | monorepo, workspace | Monorepo | monorepo-turborepo |
25
+
26
+ ## Detection Process
27
+
28
+ ```
29
+ 1. Tokenize user request
30
+ 2. Extract keywords
31
+ 3. Determine project type
32
+ 4. Detect missing information → forward to conversation-manager
33
+ 5. Suggest tech stack
34
+ ```
@@ -0,0 +1,118 @@
1
+ # Project Scaffolding
2
+
3
+ > Directory structure and core files for new projects.
4
+
5
+ ---
6
+
7
+ ## Next.js Full-Stack Structure (2025 Optimized)
8
+
9
+ ```
10
+ project-name/
11
+ ├── src/
12
+ │ ├── app/ # Routes only (thin layer)
13
+ │ │ ├── layout.tsx
14
+ │ │ ├── page.tsx
15
+ │ │ ├── globals.css
16
+ │ │ ├── (auth)/ # Route group - auth pages
17
+ │ │ │ ├── login/page.tsx
18
+ │ │ │ └── register/page.tsx
19
+ │ │ ├── (dashboard)/ # Route group - dashboard layout
20
+ │ │ │ ├── layout.tsx
21
+ │ │ │ └── page.tsx
22
+ │ │ └── api/
23
+ │ │ └── [resource]/route.ts
24
+ │ │
25
+ │ ├── features/ # Feature-based modules
26
+ │ │ ├── auth/
27
+ │ │ │ ├── components/
28
+ │ │ │ ├── hooks/
29
+ │ │ │ ├── actions.ts # Server Actions
30
+ │ │ │ ├── queries.ts # Data fetching
31
+ │ │ │ └── types.ts
32
+ │ │ ├── products/
33
+ │ │ │ ├── components/
34
+ │ │ │ ├── actions.ts
35
+ │ │ │ └── queries.ts
36
+ │ │ └── cart/
37
+ │ │ └── ...
38
+ │ │
39
+ │ ├── shared/ # Shared utilities
40
+ │ │ ├── components/ui/ # Reusable UI components
41
+ │ │ ├── lib/ # Utils, helpers
42
+ │ │ └── hooks/ # Global hooks
43
+ │ │
44
+ │ └── server/ # Server-only code
45
+ │ ├── db/ # Database client (Prisma)
46
+ │ ├── auth/ # Auth config
47
+ │ └── services/ # External API integrations
48
+
49
+ ├── prisma/
50
+ │ ├── schema.prisma
51
+ │ ├── migrations/
52
+ │ └── seed.ts
53
+
54
+ ├── public/
55
+ ├── .env.example
56
+ ├── .env.local
57
+ ├── package.json
58
+ ├── tailwind.config.ts
59
+ ├── tsconfig.json
60
+ └── README.md
61
+ ```
62
+
63
+ ---
64
+
65
+ ## Structure Principles
66
+
67
+ | Principle | Implementation |
68
+ |-----------|----------------|
69
+ | **Feature isolation** | Each feature in `features/` with its own components, hooks, actions |
70
+ | **Server/Client separation** | Server-only code in `server/`, prevents accidental client imports |
71
+ | **Thin routes** | `app/` only for routing, logic lives in `features/` |
72
+ | **Route groups** | `(groupName)/` for layout sharing without URL impact |
73
+ | **Shared code** | `shared/` for truly reusable UI and utilities |
74
+
75
+ ---
76
+
77
+ ## Core Files
78
+
79
+ | File | Purpose |
80
+ |------|---------|
81
+ | `package.json` | Dependencies |
82
+ | `tsconfig.json` | TypeScript + path aliases (`@/features/*`) |
83
+ | `tailwind.config.ts` | Tailwind config |
84
+ | `.env.example` | Environment template |
85
+ | `README.md` | Project documentation |
86
+ | `.gitignore` | Git ignore rules |
87
+ | `prisma/schema.prisma` | Database schema |
88
+
89
+ ---
90
+
91
+ ## Path Aliases (tsconfig.json)
92
+
93
+ ```json
94
+ {
95
+ "compilerOptions": {
96
+ "paths": {
97
+ "@/*": ["./src/*"],
98
+ "@/features/*": ["./src/features/*"],
99
+ "@/shared/*": ["./src/shared/*"],
100
+ "@/server/*": ["./src/server/*"]
101
+ }
102
+ }
103
+ }
104
+ ```
105
+
106
+ ---
107
+
108
+ ## When to Use What
109
+
110
+ | Need | Location |
111
+ |------|----------|
112
+ | New page/route | `app/(group)/page.tsx` |
113
+ | Feature component | `features/[name]/components/` |
114
+ | Server action | `features/[name]/actions.ts` |
115
+ | Data fetching | `features/[name]/queries.ts` |
116
+ | Reusable button/input | `shared/components/ui/` |
117
+ | Database query | `server/db/` |
118
+ | External API call | `server/services/` |
@@ -0,0 +1,40 @@
1
+ # Tech Stack Selection (2025)
2
+
3
+ > Default and alternative technology choices for web applications.
4
+
5
+ ## Default Stack (Web App - 2025)
6
+
7
+ ```yaml
8
+ Frontend:
9
+ framework: Next.js 16 (Stable)
10
+ language: TypeScript 5.7+
11
+ styling: Tailwind CSS v4
12
+ state: React 19 Actions / Server Components
13
+ bundler: Turbopack (Stable for Dev)
14
+
15
+ Backend:
16
+ runtime: Node.js 23
17
+ framework: Next.js API Routes / Hono (for Edge)
18
+ validation: Zod / TypeBox
19
+
20
+ Database:
21
+ primary: PostgreSQL
22
+ orm: Prisma / Drizzle
23
+ hosting: Supabase / Neon
24
+
25
+ Auth:
26
+ provider: Auth.js (v5) / Clerk
27
+
28
+ Monorepo:
29
+ tool: Turborepo 2.0
30
+ ```
31
+
32
+ ## Alternative Options
33
+
34
+ | Need | Default | Alternative |
35
+ |------|---------|-------------|
36
+ | Real-time | - | Supabase Realtime, Socket.io |
37
+ | File storage | - | Cloudinary, S3 |
38
+ | Payment | Stripe | LemonSqueezy, Paddle |
39
+ | Email | - | Resend, SendGrid |
40
+ | Search | - | Algolia, Typesense |
@@ -0,0 +1,39 @@
1
+ ---
2
+ name: templates
3
+ description: Project scaffolding templates for new applications. Use when creating new projects from scratch. Contains 12 templates for various tech stacks.
4
+ allowed-tools: Read, Glob, Grep
5
+ ---
6
+
7
+ # Project Templates
8
+
9
+ > Quick-start templates for scaffolding new projects.
10
+
11
+ ---
12
+
13
+ ## 🎯 Selective Reading Rule
14
+
15
+ **Read ONLY the template matching user's project type!**
16
+
17
+ | Template | Tech Stack | When to Use |
18
+ |----------|------------|-------------|
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 |
31
+
32
+ ---
33
+
34
+ ## Usage
35
+
36
+ 1. User says "create [type] app"
37
+ 2. Match to appropriate template
38
+ 3. Read ONLY that template's TEMPLATE.md
39
+ 4. Follow its tech stack and structure