@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.
- package/.agent/CheatSheet.md +350 -0
- package/.agent/README.md +76 -0
- package/.agent/agents/README.md +155 -0
- package/.agent/agents/architect.md +185 -0
- package/.agent/agents/backend-specialist.md +276 -0
- package/.agent/agents/build-error-resolver.md +207 -0
- package/.agent/agents/code-reviewer.md +162 -0
- package/.agent/agents/database-architect.md +138 -0
- package/.agent/agents/devops-engineer.md +144 -0
- package/.agent/agents/doc-updater.md +229 -0
- package/.agent/agents/e2e-runner.md +145 -0
- package/.agent/agents/explorer-agent.md +143 -0
- package/.agent/agents/frontend-specialist.md +144 -0
- package/.agent/agents/go-reviewer.md +128 -0
- package/.agent/agents/knowledge-agent.md +197 -0
- package/.agent/agents/mobile-developer.md +150 -0
- package/.agent/agents/performance-optimizer.md +175 -0
- package/.agent/agents/planner.md +133 -0
- package/.agent/agents/pr-reviewer.md +148 -0
- package/.agent/agents/python-reviewer.md +123 -0
- package/.agent/agents/refactor-cleaner.md +201 -0
- package/.agent/agents/reliability-engineer.md +156 -0
- package/.agent/agents/security-reviewer.md +141 -0
- package/.agent/agents/sprint-orchestrator.md +124 -0
- package/.agent/agents/tdd-guide.md +179 -0
- package/.agent/agents/typescript-reviewer.md +110 -0
- package/.agent/checklists/README.md +102 -0
- package/.agent/checklists/pre-commit.md +93 -0
- package/.agent/checklists/session-end.md +99 -0
- package/.agent/checklists/session-start.md +102 -0
- package/.agent/checklists/task-complete.md +81 -0
- package/.agent/commands/README.md +130 -0
- package/.agent/commands/adr.md +29 -0
- package/.agent/commands/ask.md +28 -0
- package/.agent/commands/build.md +30 -0
- package/.agent/commands/changelog.md +40 -0
- package/.agent/commands/checkpoint.md +28 -0
- package/.agent/commands/code-review.md +65 -0
- package/.agent/commands/compact.md +28 -0
- package/.agent/commands/cook.md +30 -0
- package/.agent/commands/db.md +30 -0
- package/.agent/commands/debug.md +31 -0
- package/.agent/commands/deploy.md +37 -0
- package/.agent/commands/design.md +29 -0
- package/.agent/commands/doc.md +30 -0
- package/.agent/commands/eval.md +30 -0
- package/.agent/commands/fix.md +32 -0
- package/.agent/commands/git.md +32 -0
- package/.agent/commands/help.md +273 -0
- package/.agent/commands/implement.md +30 -0
- package/.agent/commands/integrate.md +32 -0
- package/.agent/commands/learn.md +29 -0
- package/.agent/commands/perf.md +31 -0
- package/.agent/commands/plan.md +56 -0
- package/.agent/commands/pr-describe.md +65 -0
- package/.agent/commands/pr-fix.md +45 -0
- package/.agent/commands/pr-merge.md +45 -0
- package/.agent/commands/pr-review.md +50 -0
- package/.agent/commands/pr-split.md +54 -0
- package/.agent/commands/pr-status.md +56 -0
- package/.agent/commands/pr.md +58 -0
- package/.agent/commands/refactor.md +32 -0
- package/.agent/commands/research.md +28 -0
- package/.agent/commands/scout.md +30 -0
- package/.agent/commands/security-scan.md +33 -0
- package/.agent/commands/setup.md +31 -0
- package/.agent/commands/status.md +59 -0
- package/.agent/commands/tdd.md +73 -0
- package/.agent/commands/verify.md +58 -0
- package/.agent/contexts/brainstorm.md +26 -0
- package/.agent/contexts/debug.md +28 -0
- package/.agent/contexts/implement.md +29 -0
- package/.agent/contexts/plan-quality-log.md +30 -0
- package/.agent/contexts/review.md +27 -0
- package/.agent/contexts/ship.md +28 -0
- package/.agent/decisions/001-trust-grade-governance.md +46 -0
- package/.agent/decisions/002-cross-ide-generation.md +15 -0
- package/.agent/engine/identity.json +4 -0
- package/.agent/engine/loading-rules.json +193 -0
- package/.agent/engine/marketplace-index.json +29 -0
- package/.agent/engine/mcp-servers/filesystem.json +9 -0
- package/.agent/engine/mcp-servers/github.json +11 -0
- package/.agent/engine/mcp-servers/postgres.json +11 -0
- package/.agent/engine/mcp-servers/supabase.json +11 -0
- package/.agent/engine/mcp-servers/vercel.json +11 -0
- package/.agent/engine/reliability-config.json +14 -0
- package/.agent/engine/sdlc-map.json +50 -0
- package/.agent/engine/workflow-state.json +167 -0
- package/.agent/hooks/README.md +101 -0
- package/.agent/hooks/hooks.json +104 -0
- package/.agent/hooks/templates/session-end.md +110 -0
- package/.agent/hooks/templates/session-start.md +95 -0
- package/.agent/manifest.json +466 -0
- package/.agent/rules/agent-upgrade-policy.md +56 -0
- package/.agent/rules/architecture.md +111 -0
- package/.agent/rules/coding-style.md +75 -0
- package/.agent/rules/documentation.md +74 -0
- package/.agent/rules/git-workflow.md +140 -0
- package/.agent/rules/quality-gate.md +117 -0
- package/.agent/rules/security.md +67 -0
- package/.agent/rules/sprint-tracking.md +103 -0
- package/.agent/rules/testing.md +80 -0
- package/.agent/rules/workflow-standards.md +30 -0
- package/.agent/rules.md +293 -0
- package/.agent/session-context.md +69 -0
- package/.agent/session-state.json +27 -0
- package/.agent/skills/README.md +135 -0
- package/.agent/skills/api-patterns/SKILL.md +117 -0
- package/.agent/skills/app-builder/SKILL.md +202 -0
- package/.agent/skills/architecture/SKILL.md +101 -0
- package/.agent/skills/behavioral-modes/SKILL.md +295 -0
- package/.agent/skills/brainstorming/SKILL.md +156 -0
- package/.agent/skills/clean-code/SKILL.md +142 -0
- package/.agent/skills/context-budget/SKILL.md +78 -0
- package/.agent/skills/continuous-learning/SKILL.md +145 -0
- package/.agent/skills/database-design/SKILL.md +303 -0
- package/.agent/skills/debugging-strategies/SKILL.md +158 -0
- package/.agent/skills/deployment-procedures/SKILL.md +191 -0
- package/.agent/skills/docker-patterns/SKILL.md +161 -0
- package/.agent/skills/eval-harness/SKILL.md +89 -0
- package/.agent/skills/frontend-patterns/SKILL.md +141 -0
- package/.agent/skills/git-workflow/SKILL.md +159 -0
- package/.agent/skills/i18n-localization/SKILL.md +191 -0
- package/.agent/skills/intelligent-routing/SKILL.md +180 -0
- package/.agent/skills/mcp-integration/SKILL.md +240 -0
- package/.agent/skills/mobile-design/SKILL.md +191 -0
- package/.agent/skills/nodejs-patterns/SKILL.md +164 -0
- package/.agent/skills/parallel-agents/SKILL.md +200 -0
- package/.agent/skills/performance-profiling/SKILL.md +134 -0
- package/.agent/skills/plan-validation/SKILL.md +192 -0
- package/.agent/skills/plan-writing/SKILL.md +183 -0
- package/.agent/skills/plan-writing/domain-enhancers.md +184 -0
- package/.agent/skills/plan-writing/plan-retrospective.md +116 -0
- package/.agent/skills/plan-writing/plan-schema.md +119 -0
- package/.agent/skills/pr-toolkit/SKILL.md +174 -0
- package/.agent/skills/production-readiness/SKILL.md +126 -0
- package/.agent/skills/security-practices/SKILL.md +109 -0
- package/.agent/skills/shell-conventions/SKILL.md +92 -0
- package/.agent/skills/strategic-compact/SKILL.md +62 -0
- package/.agent/skills/testing-patterns/SKILL.md +141 -0
- package/.agent/skills/typescript-expert/SKILL.md +160 -0
- package/.agent/skills/ui-ux-pro-max/SKILL.md +137 -0
- package/.agent/skills/ui-ux-pro-max/data/charts.csv +26 -0
- package/.agent/skills/ui-ux-pro-max/data/colors.csv +97 -0
- package/.agent/skills/ui-ux-pro-max/data/icons.csv +101 -0
- package/.agent/skills/ui-ux-pro-max/data/landing.csv +31 -0
- package/.agent/skills/ui-ux-pro-max/data/products.csv +97 -0
- package/.agent/skills/ui-ux-pro-max/data/react-performance.csv +45 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/astro.csv +54 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/react.csv +54 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/vue.csv +50 -0
- package/.agent/skills/ui-ux-pro-max/data/styles.csv +68 -0
- package/.agent/skills/ui-ux-pro-max/data/typography.csv +58 -0
- package/.agent/skills/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
- package/.agent/skills/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
- package/.agent/skills/ui-ux-pro-max/data/web-interface.csv +31 -0
- package/.agent/skills/ui-ux-pro-max/scripts/core.py +253 -0
- package/.agent/skills/ui-ux-pro-max/scripts/design_system.py +1067 -0
- package/.agent/skills/ui-ux-pro-max/scripts/search.py +114 -0
- package/.agent/skills/verification-loop/SKILL.md +89 -0
- package/.agent/skills/webapp-testing/SKILL.md +175 -0
- package/.agent/templates/adr-template.md +32 -0
- package/.agent/templates/bug-report.md +37 -0
- package/.agent/templates/feature-request.md +32 -0
- package/.agent/workflows/README.md +101 -0
- package/.agent/workflows/brainstorm.md +86 -0
- package/.agent/workflows/create.md +85 -0
- package/.agent/workflows/debug.md +83 -0
- package/.agent/workflows/deploy.md +114 -0
- package/.agent/workflows/enhance.md +85 -0
- package/.agent/workflows/orchestrate.md +106 -0
- package/.agent/workflows/plan.md +105 -0
- package/.agent/workflows/pr-fix.md +163 -0
- package/.agent/workflows/pr-merge.md +117 -0
- package/.agent/workflows/pr-review.md +178 -0
- package/.agent/workflows/pr-split.md +118 -0
- package/.agent/workflows/pr.md +184 -0
- package/.agent/workflows/preflight.md +107 -0
- package/.agent/workflows/preview.md +95 -0
- package/.agent/workflows/quality-gate.md +103 -0
- package/.agent/workflows/retrospective.md +100 -0
- package/.agent/workflows/review.md +104 -0
- package/.agent/workflows/status.md +89 -0
- package/.agent/workflows/test.md +98 -0
- package/.agent/workflows/ui-ux-pro-max.md +93 -0
- package/.agent/workflows/upgrade.md +97 -0
- package/LICENSE +21 -0
- package/README.md +218 -0
- package/bin/kit.js +773 -0
- package/lib/agent-registry.js +228 -0
- package/lib/agent-reputation.js +343 -0
- package/lib/circuit-breaker.js +195 -0
- package/lib/cli-commands.js +322 -0
- package/lib/config-validator.js +274 -0
- package/lib/conflict-detector.js +252 -0
- package/lib/constants.js +47 -0
- package/lib/engineering-manager.js +336 -0
- package/lib/error-budget.js +370 -0
- package/lib/hook-system.js +256 -0
- package/lib/ide-generator.js +434 -0
- package/lib/identity.js +240 -0
- package/lib/io.js +146 -0
- package/lib/learning-engine.js +163 -0
- package/lib/loading-engine.js +421 -0
- package/lib/logger.js +118 -0
- package/lib/marketplace.js +321 -0
- package/lib/plugin-system.js +604 -0
- package/lib/plugin-verifier.js +197 -0
- package/lib/rate-limiter.js +113 -0
- package/lib/security-scanner.js +312 -0
- package/lib/self-healing.js +468 -0
- package/lib/session-manager.js +264 -0
- package/lib/skill-sandbox.js +244 -0
- package/lib/task-governance.js +522 -0
- package/lib/task-model.js +332 -0
- package/lib/updater.js +240 -0
- package/lib/verify.js +279 -0
- package/lib/workflow-engine.js +373 -0
- package/lib/workflow-events.js +166 -0
- package/lib/workflow-persistence.js +160 -0
- 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 |
|