@devran-ai/kit 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (231) hide show
  1. package/.agent/CheatSheet.md +350 -0
  2. package/.agent/README.md +76 -0
  3. package/.agent/agents/README.md +155 -0
  4. package/.agent/agents/architect.md +185 -0
  5. package/.agent/agents/backend-specialist.md +276 -0
  6. package/.agent/agents/build-error-resolver.md +207 -0
  7. package/.agent/agents/code-reviewer.md +162 -0
  8. package/.agent/agents/database-architect.md +138 -0
  9. package/.agent/agents/devops-engineer.md +144 -0
  10. package/.agent/agents/doc-updater.md +229 -0
  11. package/.agent/agents/e2e-runner.md +145 -0
  12. package/.agent/agents/explorer-agent.md +143 -0
  13. package/.agent/agents/frontend-specialist.md +144 -0
  14. package/.agent/agents/go-reviewer.md +128 -0
  15. package/.agent/agents/knowledge-agent.md +197 -0
  16. package/.agent/agents/mobile-developer.md +150 -0
  17. package/.agent/agents/performance-optimizer.md +175 -0
  18. package/.agent/agents/planner.md +133 -0
  19. package/.agent/agents/pr-reviewer.md +148 -0
  20. package/.agent/agents/python-reviewer.md +123 -0
  21. package/.agent/agents/refactor-cleaner.md +201 -0
  22. package/.agent/agents/reliability-engineer.md +156 -0
  23. package/.agent/agents/security-reviewer.md +141 -0
  24. package/.agent/agents/sprint-orchestrator.md +124 -0
  25. package/.agent/agents/tdd-guide.md +179 -0
  26. package/.agent/agents/typescript-reviewer.md +110 -0
  27. package/.agent/checklists/README.md +102 -0
  28. package/.agent/checklists/pre-commit.md +93 -0
  29. package/.agent/checklists/session-end.md +99 -0
  30. package/.agent/checklists/session-start.md +102 -0
  31. package/.agent/checklists/task-complete.md +81 -0
  32. package/.agent/commands/README.md +130 -0
  33. package/.agent/commands/adr.md +29 -0
  34. package/.agent/commands/ask.md +28 -0
  35. package/.agent/commands/build.md +30 -0
  36. package/.agent/commands/changelog.md +40 -0
  37. package/.agent/commands/checkpoint.md +28 -0
  38. package/.agent/commands/code-review.md +65 -0
  39. package/.agent/commands/compact.md +28 -0
  40. package/.agent/commands/cook.md +30 -0
  41. package/.agent/commands/db.md +30 -0
  42. package/.agent/commands/debug.md +31 -0
  43. package/.agent/commands/deploy.md +37 -0
  44. package/.agent/commands/design.md +29 -0
  45. package/.agent/commands/doc.md +30 -0
  46. package/.agent/commands/eval.md +30 -0
  47. package/.agent/commands/fix.md +32 -0
  48. package/.agent/commands/git.md +32 -0
  49. package/.agent/commands/help.md +273 -0
  50. package/.agent/commands/implement.md +30 -0
  51. package/.agent/commands/integrate.md +32 -0
  52. package/.agent/commands/learn.md +29 -0
  53. package/.agent/commands/perf.md +31 -0
  54. package/.agent/commands/plan.md +56 -0
  55. package/.agent/commands/pr-describe.md +65 -0
  56. package/.agent/commands/pr-fix.md +45 -0
  57. package/.agent/commands/pr-merge.md +45 -0
  58. package/.agent/commands/pr-review.md +50 -0
  59. package/.agent/commands/pr-split.md +54 -0
  60. package/.agent/commands/pr-status.md +56 -0
  61. package/.agent/commands/pr.md +58 -0
  62. package/.agent/commands/refactor.md +32 -0
  63. package/.agent/commands/research.md +28 -0
  64. package/.agent/commands/scout.md +30 -0
  65. package/.agent/commands/security-scan.md +33 -0
  66. package/.agent/commands/setup.md +31 -0
  67. package/.agent/commands/status.md +59 -0
  68. package/.agent/commands/tdd.md +73 -0
  69. package/.agent/commands/verify.md +58 -0
  70. package/.agent/contexts/brainstorm.md +26 -0
  71. package/.agent/contexts/debug.md +28 -0
  72. package/.agent/contexts/implement.md +29 -0
  73. package/.agent/contexts/plan-quality-log.md +30 -0
  74. package/.agent/contexts/review.md +27 -0
  75. package/.agent/contexts/ship.md +28 -0
  76. package/.agent/decisions/001-trust-grade-governance.md +46 -0
  77. package/.agent/decisions/002-cross-ide-generation.md +15 -0
  78. package/.agent/engine/identity.json +4 -0
  79. package/.agent/engine/loading-rules.json +193 -0
  80. package/.agent/engine/marketplace-index.json +29 -0
  81. package/.agent/engine/mcp-servers/filesystem.json +9 -0
  82. package/.agent/engine/mcp-servers/github.json +11 -0
  83. package/.agent/engine/mcp-servers/postgres.json +11 -0
  84. package/.agent/engine/mcp-servers/supabase.json +11 -0
  85. package/.agent/engine/mcp-servers/vercel.json +11 -0
  86. package/.agent/engine/reliability-config.json +14 -0
  87. package/.agent/engine/sdlc-map.json +50 -0
  88. package/.agent/engine/workflow-state.json +167 -0
  89. package/.agent/hooks/README.md +101 -0
  90. package/.agent/hooks/hooks.json +104 -0
  91. package/.agent/hooks/templates/session-end.md +110 -0
  92. package/.agent/hooks/templates/session-start.md +95 -0
  93. package/.agent/manifest.json +466 -0
  94. package/.agent/rules/agent-upgrade-policy.md +56 -0
  95. package/.agent/rules/architecture.md +111 -0
  96. package/.agent/rules/coding-style.md +75 -0
  97. package/.agent/rules/documentation.md +74 -0
  98. package/.agent/rules/git-workflow.md +140 -0
  99. package/.agent/rules/quality-gate.md +117 -0
  100. package/.agent/rules/security.md +67 -0
  101. package/.agent/rules/sprint-tracking.md +103 -0
  102. package/.agent/rules/testing.md +80 -0
  103. package/.agent/rules/workflow-standards.md +30 -0
  104. package/.agent/rules.md +293 -0
  105. package/.agent/session-context.md +69 -0
  106. package/.agent/session-state.json +27 -0
  107. package/.agent/skills/README.md +135 -0
  108. package/.agent/skills/api-patterns/SKILL.md +117 -0
  109. package/.agent/skills/app-builder/SKILL.md +202 -0
  110. package/.agent/skills/architecture/SKILL.md +101 -0
  111. package/.agent/skills/behavioral-modes/SKILL.md +295 -0
  112. package/.agent/skills/brainstorming/SKILL.md +156 -0
  113. package/.agent/skills/clean-code/SKILL.md +142 -0
  114. package/.agent/skills/context-budget/SKILL.md +78 -0
  115. package/.agent/skills/continuous-learning/SKILL.md +145 -0
  116. package/.agent/skills/database-design/SKILL.md +303 -0
  117. package/.agent/skills/debugging-strategies/SKILL.md +158 -0
  118. package/.agent/skills/deployment-procedures/SKILL.md +191 -0
  119. package/.agent/skills/docker-patterns/SKILL.md +161 -0
  120. package/.agent/skills/eval-harness/SKILL.md +89 -0
  121. package/.agent/skills/frontend-patterns/SKILL.md +141 -0
  122. package/.agent/skills/git-workflow/SKILL.md +159 -0
  123. package/.agent/skills/i18n-localization/SKILL.md +191 -0
  124. package/.agent/skills/intelligent-routing/SKILL.md +180 -0
  125. package/.agent/skills/mcp-integration/SKILL.md +240 -0
  126. package/.agent/skills/mobile-design/SKILL.md +191 -0
  127. package/.agent/skills/nodejs-patterns/SKILL.md +164 -0
  128. package/.agent/skills/parallel-agents/SKILL.md +200 -0
  129. package/.agent/skills/performance-profiling/SKILL.md +134 -0
  130. package/.agent/skills/plan-validation/SKILL.md +192 -0
  131. package/.agent/skills/plan-writing/SKILL.md +183 -0
  132. package/.agent/skills/plan-writing/domain-enhancers.md +184 -0
  133. package/.agent/skills/plan-writing/plan-retrospective.md +116 -0
  134. package/.agent/skills/plan-writing/plan-schema.md +119 -0
  135. package/.agent/skills/pr-toolkit/SKILL.md +174 -0
  136. package/.agent/skills/production-readiness/SKILL.md +126 -0
  137. package/.agent/skills/security-practices/SKILL.md +109 -0
  138. package/.agent/skills/shell-conventions/SKILL.md +92 -0
  139. package/.agent/skills/strategic-compact/SKILL.md +62 -0
  140. package/.agent/skills/testing-patterns/SKILL.md +141 -0
  141. package/.agent/skills/typescript-expert/SKILL.md +160 -0
  142. package/.agent/skills/ui-ux-pro-max/SKILL.md +137 -0
  143. package/.agent/skills/ui-ux-pro-max/data/charts.csv +26 -0
  144. package/.agent/skills/ui-ux-pro-max/data/colors.csv +97 -0
  145. package/.agent/skills/ui-ux-pro-max/data/icons.csv +101 -0
  146. package/.agent/skills/ui-ux-pro-max/data/landing.csv +31 -0
  147. package/.agent/skills/ui-ux-pro-max/data/products.csv +97 -0
  148. package/.agent/skills/ui-ux-pro-max/data/react-performance.csv +45 -0
  149. package/.agent/skills/ui-ux-pro-max/data/stacks/astro.csv +54 -0
  150. package/.agent/skills/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
  151. package/.agent/skills/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
  152. package/.agent/skills/ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
  153. package/.agent/skills/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
  154. package/.agent/skills/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
  155. package/.agent/skills/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
  156. package/.agent/skills/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
  157. package/.agent/skills/ui-ux-pro-max/data/stacks/react.csv +54 -0
  158. package/.agent/skills/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
  159. package/.agent/skills/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
  160. package/.agent/skills/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
  161. package/.agent/skills/ui-ux-pro-max/data/stacks/vue.csv +50 -0
  162. package/.agent/skills/ui-ux-pro-max/data/styles.csv +68 -0
  163. package/.agent/skills/ui-ux-pro-max/data/typography.csv +58 -0
  164. package/.agent/skills/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
  165. package/.agent/skills/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
  166. package/.agent/skills/ui-ux-pro-max/data/web-interface.csv +31 -0
  167. package/.agent/skills/ui-ux-pro-max/scripts/core.py +253 -0
  168. package/.agent/skills/ui-ux-pro-max/scripts/design_system.py +1067 -0
  169. package/.agent/skills/ui-ux-pro-max/scripts/search.py +114 -0
  170. package/.agent/skills/verification-loop/SKILL.md +89 -0
  171. package/.agent/skills/webapp-testing/SKILL.md +175 -0
  172. package/.agent/templates/adr-template.md +32 -0
  173. package/.agent/templates/bug-report.md +37 -0
  174. package/.agent/templates/feature-request.md +32 -0
  175. package/.agent/workflows/README.md +101 -0
  176. package/.agent/workflows/brainstorm.md +86 -0
  177. package/.agent/workflows/create.md +85 -0
  178. package/.agent/workflows/debug.md +83 -0
  179. package/.agent/workflows/deploy.md +114 -0
  180. package/.agent/workflows/enhance.md +85 -0
  181. package/.agent/workflows/orchestrate.md +106 -0
  182. package/.agent/workflows/plan.md +105 -0
  183. package/.agent/workflows/pr-fix.md +163 -0
  184. package/.agent/workflows/pr-merge.md +117 -0
  185. package/.agent/workflows/pr-review.md +178 -0
  186. package/.agent/workflows/pr-split.md +118 -0
  187. package/.agent/workflows/pr.md +184 -0
  188. package/.agent/workflows/preflight.md +107 -0
  189. package/.agent/workflows/preview.md +95 -0
  190. package/.agent/workflows/quality-gate.md +103 -0
  191. package/.agent/workflows/retrospective.md +100 -0
  192. package/.agent/workflows/review.md +104 -0
  193. package/.agent/workflows/status.md +89 -0
  194. package/.agent/workflows/test.md +98 -0
  195. package/.agent/workflows/ui-ux-pro-max.md +93 -0
  196. package/.agent/workflows/upgrade.md +97 -0
  197. package/LICENSE +21 -0
  198. package/README.md +218 -0
  199. package/bin/kit.js +773 -0
  200. package/lib/agent-registry.js +228 -0
  201. package/lib/agent-reputation.js +343 -0
  202. package/lib/circuit-breaker.js +195 -0
  203. package/lib/cli-commands.js +322 -0
  204. package/lib/config-validator.js +274 -0
  205. package/lib/conflict-detector.js +252 -0
  206. package/lib/constants.js +47 -0
  207. package/lib/engineering-manager.js +336 -0
  208. package/lib/error-budget.js +370 -0
  209. package/lib/hook-system.js +256 -0
  210. package/lib/ide-generator.js +434 -0
  211. package/lib/identity.js +240 -0
  212. package/lib/io.js +146 -0
  213. package/lib/learning-engine.js +163 -0
  214. package/lib/loading-engine.js +421 -0
  215. package/lib/logger.js +118 -0
  216. package/lib/marketplace.js +321 -0
  217. package/lib/plugin-system.js +604 -0
  218. package/lib/plugin-verifier.js +197 -0
  219. package/lib/rate-limiter.js +113 -0
  220. package/lib/security-scanner.js +312 -0
  221. package/lib/self-healing.js +468 -0
  222. package/lib/session-manager.js +264 -0
  223. package/lib/skill-sandbox.js +244 -0
  224. package/lib/task-governance.js +522 -0
  225. package/lib/task-model.js +332 -0
  226. package/lib/updater.js +240 -0
  227. package/lib/verify.js +279 -0
  228. package/lib/workflow-engine.js +373 -0
  229. package/lib/workflow-events.js +166 -0
  230. package/lib/workflow-persistence.js +160 -0
  231. package/package.json +57 -0
@@ -0,0 +1,117 @@
1
+ ---
2
+ name: api-patterns
3
+ description: RESTful API design patterns and best practices
4
+ triggers: [context, api, backend, endpoint]
5
+ ---
6
+
7
+ # API Patterns Skill
8
+
9
+ > **Purpose**: Apply professional RESTful API design principles
10
+
11
+ ---
12
+
13
+ ## Overview
14
+
15
+ This skill provides guidance for designing clean, consistent, and scalable APIs following industry best practices.
16
+
17
+ ---
18
+
19
+ ## Core Principles
20
+
21
+ ### 1. Resource-Oriented Design
22
+
23
+ - Use **nouns** for resources: `/users`, `/orders`, `/products`
24
+ - Use HTTP verbs for actions: GET, POST, PUT, PATCH, DELETE
25
+ - Avoid verbs in URLs: ❌ `/getUsers` β†’ βœ… `/users`
26
+
27
+ ### 2. Consistent Naming
28
+
29
+ ```
30
+ GET /api/v1/users # List users
31
+ POST /api/v1/users # Create user
32
+ GET /api/v1/users/:id # Get user
33
+ PATCH /api/v1/users/:id # Update user
34
+ DELETE /api/v1/users/:id # Delete user
35
+ ```
36
+
37
+ ### 3. Versioning
38
+
39
+ - Use URL versioning: `/api/v1/`, `/api/v2/`
40
+ - Or header versioning: `Accept: application/vnd.api+json;version=1`
41
+
42
+ ---
43
+
44
+ ## Response Structure
45
+
46
+ ### Success Response
47
+
48
+ ```json
49
+ {
50
+ "data": { ... },
51
+ "meta": {
52
+ "timestamp": "2026-02-06T00:00:00Z",
53
+ "requestId": "uuid"
54
+ }
55
+ }
56
+ ```
57
+
58
+ ### Error Response
59
+
60
+ ```json
61
+ {
62
+ "error": {
63
+ "code": "VALIDATION_ERROR",
64
+ "message": "Email is required",
65
+ "details": [{ "field": "email", "issue": "required" }]
66
+ }
67
+ }
68
+ ```
69
+
70
+ ---
71
+
72
+ ## Status Codes
73
+
74
+ | Code | Usage |
75
+ | :--- | :-------------------- |
76
+ | 200 | Success |
77
+ | 201 | Created |
78
+ | 204 | No Content (delete) |
79
+ | 400 | Bad Request |
80
+ | 401 | Unauthorized |
81
+ | 403 | Forbidden |
82
+ | 404 | Not Found |
83
+ | 409 | Conflict |
84
+ | 422 | Unprocessable Entity |
85
+ | 500 | Internal Server Error |
86
+
87
+ ---
88
+
89
+ ## Pagination
90
+
91
+ ```json
92
+ {
93
+ "data": [...],
94
+ "pagination": {
95
+ "page": 1,
96
+ "limit": 20,
97
+ "total": 100,
98
+ "totalPages": 5
99
+ }
100
+ }
101
+ ```
102
+
103
+ ---
104
+
105
+ ## Quick Reference
106
+
107
+ | Pattern | Example |
108
+ | :------ | :--------------------------- |
109
+ | List | `GET /users` |
110
+ | Create | `POST /users` |
111
+ | Get | `GET /users/123` |
112
+ | Update | `PATCH /users/123` |
113
+ | Delete | `DELETE /users/123` |
114
+ | Nested | `GET /users/123/orders` |
115
+ | Filter | `GET /users?status=active` |
116
+ | Search | `GET /users?q=john` |
117
+ | Sort | `GET /users?sort=-createdAt` |
@@ -0,0 +1,202 @@
1
+ ---
2
+ name: app-builder
3
+ description: Application scaffolding orchestrator. Creates full-stack applications from requirements, selects tech stack, coordinates agents.
4
+ version: 1.0.0
5
+ allowed-tools: Read, Write, Edit, Glob, Grep, Bash, Agent
6
+ ---
7
+
8
+ # App Builder β€” Application Building Orchestrator
9
+
10
+ > Analyzes requirements, determines tech stack, plans structure, and coordinates agents.
11
+
12
+ ---
13
+
14
+ ## 🎯 Process Overview
15
+
16
+ ```
17
+ User Request β†’ Analyze β†’ Select Stack β†’ Plan β†’ Scaffold β†’ Coordinate β†’ Verify
18
+ ```
19
+
20
+ ---
21
+
22
+ ## πŸ“¦ Recommended Default Stack
23
+
24
+ | Layer | Technology | Alternative |
25
+ | ---------------- | ----------------------------- | ----------- |
26
+ | **Web Frontend** | Next.js 14+ | Nuxt 3 |
27
+ | **Mobile** | Expo (React Native) | Flutter |
28
+ | **Backend** | NestJS | FastAPI |
29
+ | **Database** | PostgreSQL + Prisma | Supabase |
30
+ | **Auth** | NextAuth / Firebase Auth | Clerk |
31
+ | **Hosting** | Vercel | Firebase |
32
+ | **Storage** | Cloudinary / Firebase Storage | S3 |
33
+
34
+ ---
35
+
36
+ ## πŸ”— Agent Coordination
37
+
38
+ | Agent | Role | When to Invoke |
39
+ | ------------------- | ---------------------------- | ---------------------------- |
40
+ | `planner` | Task breakdown, dependencies | Starting any project |
41
+ | `architect` | System design, patterns | Architecture decisions |
42
+ | `code-reviewer` | Quality, patterns | After implementation |
43
+ | `security-reviewer` | Security posture | Auth, payment features |
44
+ | `tdd-guide` | Test specifications | Before/during implementation |
45
+
46
+ ---
47
+
48
+ ## πŸ“‹ Project Type Detection
49
+
50
+ | Keywords | Project Type | Default Stack |
51
+ | --------------------------------- | ----------------- | ----------------------- |
52
+ | "web app", "website", "dashboard" | Web Application | Next.js + Prisma |
53
+ | "mobile app", "iOS", "Android" | Mobile App | Expo + NestJS API |
54
+ | "API", "backend", "server" | API Service | NestJS + Prisma |
55
+ | "landing page", "marketing" | Static Site | Next.js (static export) |
56
+ | "CLI", "command line" | CLI Tool | Node.js + Commander |
57
+ | "extension", "plugin" | Browser Extension | Chrome MV3 |
58
+
59
+ ---
60
+
61
+ ## πŸ—οΈ Scaffolding Process
62
+
63
+ ### Step 1: Clarify Requirements
64
+
65
+ ```markdown
66
+ Before scaffolding, confirm:
67
+
68
+ 1. Project type (web/mobile/API/etc.)
69
+ 2. Core features (3-5 max for MVP)
70
+ 3. Auth requirements (none/social/email)
71
+ 4. Database needs (none/simple/complex)
72
+ ```
73
+
74
+ ### Step 2: Create Plan
75
+
76
+ ```markdown
77
+ ## Project Plan: [Name]
78
+
79
+ ### Core Features
80
+
81
+ 1. [Feature 1]
82
+ 2. [Feature 2]
83
+ 3. [Feature 3]
84
+
85
+ ### Tech Stack
86
+
87
+ - Frontend: [choice]
88
+ - Backend: [choice]
89
+ - Database: [choice]
90
+
91
+ ### File Structure
92
+
93
+ [directory tree]
94
+
95
+ ### Implementation Order
96
+
97
+ 1. Setup & configuration
98
+ 2. Database schema
99
+ 3. API endpoints
100
+ 4. Frontend pages
101
+ 5. Authentication
102
+ 6. Testing
103
+ ```
104
+
105
+ ### Step 3: Scaffold
106
+
107
+ ```bash
108
+ # Example: Next.js project
109
+ npx create-next-app@latest ./project-name \
110
+ --typescript \
111
+ --eslint \
112
+ --tailwind \
113
+ --app \
114
+ --src-dir
115
+ ```
116
+
117
+ ### Step 4: Coordinate Agents
118
+
119
+ ```
120
+ 1. Invoke planner β†’ Task breakdown
121
+ 2. Invoke architect β†’ Design decisions
122
+ 3. Execute tasks sequentially
123
+ 4. Invoke tdd-guide β†’ Add tests
124
+ 5. Invoke code-reviewer β†’ Final review
125
+ ```
126
+
127
+ ---
128
+
129
+ ## πŸ“ Standard Directory Structures
130
+
131
+ ### Next.js Full-Stack
132
+
133
+ ```
134
+ src/
135
+ β”œβ”€β”€ app/ # Pages & routes
136
+ β”‚ β”œβ”€β”€ api/ # API routes
137
+ β”‚ └── (auth)/ # Auth pages
138
+ β”œβ”€β”€ components/ # React components
139
+ β”œβ”€β”€ lib/ # Utilities
140
+ β”œβ”€β”€ server/ # Server-side logic
141
+ β”‚ β”œβ”€β”€ db/ # Prisma client
142
+ β”‚ └── services/ # Business logic
143
+ └── types/ # TypeScript types
144
+ ```
145
+
146
+ ### NestJS API
147
+
148
+ ```
149
+ src/
150
+ β”œβ”€β”€ modules/ # Feature modules
151
+ β”‚ β”œβ”€β”€ auth/
152
+ β”‚ β”œβ”€β”€ users/
153
+ β”‚ └── [feature]/
154
+ β”œβ”€β”€ common/ # Shared utilities
155
+ β”‚ β”œβ”€β”€ decorators/
156
+ β”‚ β”œβ”€β”€ guards/
157
+ β”‚ └── interceptors/
158
+ └── config/ # Configuration
159
+ ```
160
+
161
+ ### Expo Mobile
162
+
163
+ ```
164
+ src/
165
+ β”œβ”€β”€ app/ # Expo Router screens
166
+ β”œβ”€β”€ components/ # UI components
167
+ β”œβ”€β”€ hooks/ # Custom hooks
168
+ β”œβ”€β”€ services/ # API clients
169
+ β”œβ”€β”€ stores/ # Zustand stores
170
+ └── utils/ # Helpers
171
+ ```
172
+
173
+ ---
174
+
175
+ ## βœ… Post-Scaffold Checklist
176
+
177
+ - [ ] Dependencies installed
178
+ - [ ] Environment variables documented
179
+ - [ ] README updated
180
+ - [ ] Git initialized
181
+ - [ ] Basic tests passing
182
+ - [ ] Development server runs
183
+
184
+ ---
185
+
186
+ ## Usage Example
187
+
188
+ ```
189
+ User: "Create a task management app with user auth"
190
+
191
+ App Builder Process:
192
+ 1. Project type: Web Application
193
+ 2. Tech stack: Next.js + Prisma + NextAuth
194
+ 3. Create plan:
195
+ β”œβ”€ Database schema (users, tasks, lists)
196
+ β”œβ”€ API routes (CRUD for tasks)
197
+ β”œβ”€ Pages (dashboard, tasks, settings)
198
+ └─ Components (TaskCard, TaskList, etc.)
199
+ 4. Scaffold project
200
+ 5. Coordinate agents for implementation
201
+ 6. Run verification loop
202
+ ```
@@ -0,0 +1,101 @@
1
+ ---
2
+ name: architecture
3
+ description: "System design patterns, DDD, 12-Factor App, SOLID principles, event-driven architecture, and architectural decision frameworks"
4
+ triggers: [context, architecture, design, system]
5
+ ---
6
+
7
+ # Architecture Skill
8
+
9
+ > **Purpose**: Apply proven architectural patterns for scalable, maintainable systems
10
+
11
+ ---
12
+
13
+ ## Architectural Patterns β€” When to Use
14
+
15
+ | Pattern | When to Use |
16
+ |:--------|:-----------|
17
+ | Layered | Simple apps with clear separation; each layer imports only from below |
18
+ | Clean Architecture | Complex domains; dependency rule: source code deps always point inward |
19
+ | Hexagonal (Ports & Adapters) | Testable domain cores; domain defines ports, adapters implement them |
20
+ | Monolith | MVP, small team, simple domain |
21
+ | Modular Monolith | Growing team, clear bounded contexts, not ready for distributed |
22
+ | Microservices | Large team, independent scaling, domain maturity |
23
+ | Serverless | Variable load, cost optimization, simple functions |
24
+
25
+ ---
26
+
27
+ ## Domain-Driven Design (DDD)
28
+
29
+ ### Strategic DDD
30
+
31
+ - **Bounded Context**: Boundary where a domain model is consistent ("Order" differs in Sales vs Shipping)
32
+ - **Ubiquitous Language**: Shared vocabulary within a bounded context
33
+ - **Context Map**: Visual map of relationships between contexts
34
+ - **Anti-Corruption Layer**: Translation layer between contexts with different models
35
+
36
+ ### Tactical DDD Building Blocks
37
+
38
+ | Block | Purpose | Key Rule |
39
+ |:------|:--------|:---------|
40
+ | Entity | Object with identity over time | Has unique ID, mutable state |
41
+ | Value Object | Immutable, defined by attributes | No ID, compared by value |
42
+ | Aggregate | Cluster with root enforcing invariants | External access through root only |
43
+ | Repository | Interface for aggregate persistence | One per aggregate |
44
+ | Domain Service | Stateless logic spanning aggregates | When logic doesn't belong to one entity |
45
+ | Domain Event | Record of something that happened | Immutable, past tense (OrderPlaced) |
46
+ | Factory | Complex creation logic | Encapsulates invariant enforcement |
47
+
48
+ ### Aggregate Design Rules
49
+
50
+ 1. Protect invariants within aggregate boundaries
51
+ 2. Reference other aggregates by ID only
52
+ 3. One transaction per aggregate
53
+ 4. Design small aggregates
54
+ 5. Eventual consistency between aggregates via domain events
55
+
56
+ ---
57
+
58
+ ## 12-Factor App
59
+
60
+ Apply all 12 factors (codebase in VCS, explicit deps, config in env, backing services as resources, separate build/release/run, stateless processes, port binding, process-model concurrency, fast startup + graceful shutdown, dev/prod parity, logs as event streams, admin tasks as one-off processes). Reference the 12-Factor methodology for implementation details.
61
+
62
+ ---
63
+
64
+ ## Event-Driven Architecture β€” Pattern Selection
65
+
66
+ | Pattern | Use When | Consistency |
67
+ |:--------|:---------|:-----------|
68
+ | Request/Response | Synchronous, simple ops | Strong |
69
+ | Event Notification | Inform services something happened | Eventual |
70
+ | Event-Carried State Transfer | Share data without coupling | Eventual |
71
+ | Event Sourcing | Full audit trail, state reconstruction | Strong (per aggregate) |
72
+ | CQRS | Different read/write models needed | Eventual (between models) |
73
+
74
+ **Event design**: Events are immutable facts (past tense), carry sufficient data, have versioned schemas, ordered within aggregate.
75
+
76
+ ---
77
+
78
+ ## Design Principles
79
+
80
+ Apply SOLID principles: Single Responsibility, Open/Closed, Liskov Substitution, Interface Segregation, Dependency Inversion. Also DRY (but avoid premature abstraction), KISS, YAGNI.
81
+
82
+ ---
83
+
84
+ ## Module Structure (DDD-Aligned)
85
+
86
+ ```
87
+ src/
88
+ β”œβ”€β”€ domain/ # Core business logic (no framework imports)
89
+ β”‚ β”œβ”€β”€ entities/ # value-objects/ events/ services/ repositories/ (ports)
90
+ β”œβ”€β”€ application/ # Use cases: commands/ queries/ handlers/
91
+ β”œβ”€β”€ infrastructure/ # Adapters: database/ messaging/ external-apis/ config/
92
+ └── interfaces/ # Entry points: http/ events/ cli/
93
+ ```
94
+
95
+ ---
96
+
97
+ ## Architecture Decision Records (ADRs)
98
+
99
+ Write when choosing between approaches, technologies, patterns, or making trade-offs.
100
+
101
+ Template: Status (Proposed/Accepted/Deprecated/Superseded) β†’ Date β†’ Context β†’ Decision β†’ Consequences β†’ Alternatives Considered.
@@ -0,0 +1,295 @@
1
+ ---
2
+ name: behavioral-modes
3
+ description: AI operational modes (brainstorm, implement, debug, review, teach, ship). Adapts behavior based on task type for Trust-Grade execution.
4
+ version: 1.0.0
5
+ allowed-tools: Read, Glob, Grep
6
+ ---
7
+
8
+ # Behavioral Modes β€” Adaptive AI Operating Modes
9
+
10
+ > **Purpose**: Define distinct behavioral modes that optimize AI performance for specific tasks while maintaining Trust-Grade governance.
11
+
12
+ ---
13
+
14
+ ## Available Modes
15
+
16
+ ### 1. 🧠 BRAINSTORM Mode
17
+
18
+ **When to use:** Early project planning, feature ideation, architecture decisions
19
+
20
+ **Behavior:**
21
+
22
+ - Ask clarifying questions before assumptions
23
+ - Offer multiple alternatives (at least 3)
24
+ - Think divergently - explore unconventional solutions
25
+ - No code yet - focus on ideas and options
26
+ - Use visual diagrams (mermaid) to explain concepts
27
+ - Apply Socratic questioning patterns
28
+
29
+ **Output style:**
30
+
31
+ ```
32
+ "Let's explore this together. Here are some approaches:
33
+
34
+ Option A: [description]
35
+ βœ… Pros: ...
36
+ ❌ Cons: ...
37
+
38
+ Option B: [description]
39
+ βœ… Pros: ...
40
+ ❌ Cons: ...
41
+
42
+ What resonates with you? Or should we explore a different direction?"
43
+ ```
44
+
45
+ ---
46
+
47
+ ### 2. ⚑ IMPLEMENT Mode
48
+
49
+ **When to use:** Writing code, building features, executing plans
50
+
51
+ **Behavior:**
52
+
53
+ - **CRITICAL: Use `clean-code` skill standards**
54
+ - Fast execution - minimize questions
55
+ - Use established patterns and best practices
56
+ - Write complete, production-ready code
57
+ - Include error handling and edge cases
58
+ - **NO tutorial-style explanations** - just code
59
+ - **NO unnecessary comments** - let code self-document
60
+ - **Quality > Speed** - Read ALL references before coding
61
+
62
+ **Output style:**
63
+
64
+ ```
65
+ [Code block]
66
+
67
+ [Brief summary, max 1-2 sentences]
68
+ ```
69
+
70
+ ---
71
+
72
+ ### 3. πŸ” DEBUG Mode
73
+
74
+ **When to use:** Fixing bugs, troubleshooting errors, investigating issues
75
+
76
+ **Behavior:**
77
+
78
+ - Ask for error messages and reproduction steps
79
+ - Think systematically - check logs, trace data flow
80
+ - Form hypothesis β†’ test β†’ verify
81
+ - Explain the root cause, not just the fix
82
+ - Prevent future occurrences
83
+ - Apply systematic-debugging skill
84
+
85
+ **Output style:**
86
+
87
+ ```
88
+ "Investigating...
89
+
90
+ πŸ” Symptom: [what's happening]
91
+ 🎯 Root cause: [why it's happening]
92
+ βœ… Fix: [the solution]
93
+ πŸ›‘οΈ Prevention: [how to avoid in future]
94
+ ```
95
+
96
+ ---
97
+
98
+ ### 4. πŸ“‹ REVIEW Mode
99
+
100
+ **When to use:** Code review, architecture review, security audit
101
+
102
+ **Behavior:**
103
+
104
+ - Be thorough but constructive
105
+ - Categorize by severity (Critical/High/Medium/Low)
106
+ - Explain the "why" behind suggestions
107
+ - Offer improved code examples
108
+ - Acknowledge what's done well
109
+
110
+ **Output style:**
111
+
112
+ ```markdown
113
+ ## Code Review: [file/feature]
114
+
115
+ ### πŸ”΄ Critical
116
+
117
+ - [issue with explanation]
118
+
119
+ ### 🟠 Improvements
120
+
121
+ - [suggestion with example]
122
+
123
+ ### 🟒 Good
124
+
125
+ - [positive observation]
126
+ ```
127
+
128
+ ---
129
+
130
+ ### 5. πŸ“š TEACH Mode
131
+
132
+ **When to use:** Explaining concepts, documentation, onboarding
133
+
134
+ **Behavior:**
135
+
136
+ - Explain from fundamentals
137
+ - Use analogies and examples
138
+ - Progress from simple to complex
139
+ - Include practical exercises
140
+ - Check understanding
141
+
142
+ **Output style:**
143
+
144
+ ```markdown
145
+ ## Understanding [Concept]
146
+
147
+ ### What is it?
148
+
149
+ [Simple explanation with analogy]
150
+
151
+ ### How it works
152
+
153
+ [Technical explanation with diagram]
154
+
155
+ ### Example
156
+
157
+ [Code example with comments]
158
+
159
+ ### Try it yourself
160
+
161
+ [Exercise or task]
162
+ ```
163
+
164
+ ---
165
+
166
+ ### 6. πŸš€ SHIP Mode
167
+
168
+ **When to use:** Production deployment, final polish, release preparation
169
+
170
+ **Behavior:**
171
+
172
+ - Focus on stability over features
173
+ - Check for missing error handling
174
+ - Verify environment configs
175
+ - Run all tests
176
+ - Create deployment checklist
177
+ - Apply verification-loop skill
178
+
179
+ **Output style:**
180
+
181
+ ```markdown
182
+ ## Pre-Ship Checklist
183
+
184
+ ### βœ… Code Quality
185
+
186
+ - [ ] No TypeScript errors
187
+ - [ ] ESLint passing
188
+ - [ ] All tests passing
189
+
190
+ ### βœ… Security
191
+
192
+ - [ ] No exposed secrets
193
+ - [ ] Input validation complete
194
+
195
+ ### βœ… Performance
196
+
197
+ - [ ] Bundle size acceptable
198
+ - [ ] No console.logs
199
+
200
+ ### πŸš€ Ready to deploy
201
+ ```
202
+
203
+ ---
204
+
205
+ ## Mode Detection
206
+
207
+ The AI should automatically detect the appropriate mode based on:
208
+
209
+ | Trigger | Mode |
210
+ | ----------------------------------------- | ---------- |
211
+ | "what if", "ideas", "options", "explore" | BRAINSTORM |
212
+ | "build", "create", "add", "implement" | IMPLEMENT |
213
+ | "not working", "error", "bug", "fix" | DEBUG |
214
+ | "review", "check", "audit", "assess" | REVIEW |
215
+ | "explain", "how does", "learn", "teach" | TEACH |
216
+ | "deploy", "release", "production", "ship" | SHIP |
217
+
218
+ ---
219
+
220
+ ## Multi-Agent Collaboration Patterns
221
+
222
+ ### 1. πŸ”­ EXPLORE Mode
223
+
224
+ **When to use:** Codebase discovery, dependency mapping
225
+
226
+ **Behavior:**
227
+
228
+ - Map file structure systematically
229
+ - Identify patterns and conventions
230
+ - Document findings for future reference
231
+ - No modifications - read-only analysis
232
+
233
+ ### 2. πŸ—ΊοΈ PLAN-EXECUTE-CRITIC (PEC)
234
+
235
+ **When to use:** Complex multi-step tasks
236
+
237
+ **Flow:**
238
+
239
+ 1. **Plan**: Break down into atomic steps
240
+ 2. **Execute**: Implement one step at a time
241
+ 3. **Critic**: Verify each step before proceeding
242
+
243
+ ### 3. 🧠 MENTAL MODEL SYNC
244
+
245
+ **When to use:** Aligning understanding with user
246
+
247
+ **Behavior:**
248
+
249
+ - State current understanding explicitly
250
+ - Ask for confirmation or correction
251
+ - Update model based on feedback
252
+ - Document in session state
253
+
254
+ ---
255
+
256
+ ## Combining Modes
257
+
258
+ Modes can transition during a task:
259
+
260
+ ```
261
+ BRAINSTORM β†’ IMPLEMENT β†’ DEBUG β†’ REVIEW β†’ SHIP
262
+ ```
263
+
264
+ Each transition should be announced:
265
+
266
+ ```
267
+ "Switching to IMPLEMENT mode to build the solution we discussed."
268
+ ```
269
+
270
+ ---
271
+
272
+ ## Manual Mode Switching
273
+
274
+ Users can explicitly request a mode:
275
+
276
+ ```
277
+ "Switch to DEBUG mode"
278
+ "Use BRAINSTORM mode for this"
279
+ "Let's REVIEW the code"
280
+ ```
281
+
282
+ ---
283
+
284
+ ## Trust-Grade Integration
285
+
286
+ Each mode inherits Trust-Grade governance:
287
+
288
+ | Mode | Governance Focus |
289
+ | ---------- | ---------------------------------------------- |
290
+ | BRAINSTORM | Load governance rules, consider constraints |
291
+ | IMPLEMENT | Apply clean-code, follow architecture patterns |
292
+ | DEBUG | Use systematic-debugging, document root causes |
293
+ | REVIEW | Apply security standards, check compliance |
294
+ | TEACH | Reference official docs, maintain accuracy |
295
+ | SHIP | Run verification-loop, update documentation |