antigravity-ai-kit 2.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/README.md +76 -0
- package/.agent/agents/README.md +129 -0
- package/.agent/agents/architect.md +184 -0
- package/.agent/agents/backend-specialist.md +77 -0
- package/.agent/agents/build-error-resolver.md +93 -0
- package/.agent/agents/code-reviewer.md +161 -0
- package/.agent/agents/database-architect.md +119 -0
- package/.agent/agents/devops-engineer.md +138 -0
- package/.agent/agents/doc-updater.md +79 -0
- package/.agent/agents/e2e-runner.md +110 -0
- package/.agent/agents/explorer-agent.md +135 -0
- package/.agent/agents/frontend-specialist.md +68 -0
- package/.agent/agents/knowledge-agent.md +83 -0
- package/.agent/agents/mobile-developer.md +114 -0
- package/.agent/agents/performance-optimizer.md +145 -0
- package/.agent/agents/planner.md +190 -0
- package/.agent/agents/refactor-cleaner.md +92 -0
- package/.agent/agents/reliability-engineer.md +98 -0
- package/.agent/agents/security-reviewer.md +145 -0
- package/.agent/agents/sprint-orchestrator.md +114 -0
- package/.agent/agents/tdd-guide.md +178 -0
- package/.agent/checklists/README.md +101 -0
- package/.agent/checklists/pre-commit.md +93 -0
- package/.agent/checklists/session-end.md +84 -0
- package/.agent/checklists/session-start.md +86 -0
- package/.agent/commands/README.md +119 -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 +64 -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 +30 -0
- package/.agent/commands/deploy.md +36 -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 +31 -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 +55 -0
- package/.agent/commands/pr.md +30 -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 +58 -0
- package/.agent/commands/tdd.md +72 -0
- package/.agent/commands/verify.md +58 -0
- package/.agent/decisions/001-trust-grade-governance.md +46 -0
- package/.agent/engine/loading-rules.json +98 -0
- package/.agent/engine/workflow-state.json +120 -0
- package/.agent/hooks/README.md +97 -0
- package/.agent/hooks/hooks.json +81 -0
- package/.agent/hooks/templates/session-end.md +110 -0
- package/.agent/hooks/templates/session-start.md +95 -0
- package/.agent/manifest.json +84 -0
- package/.agent/rules/coding-style.md +30 -0
- package/.agent/rules/git-workflow.md +45 -0
- package/.agent/rules/security.md +29 -0
- package/.agent/rules/testing.md +37 -0
- package/.agent/rules.md +272 -0
- package/.agent/session-context.md +80 -0
- package/.agent/session-state.json +27 -0
- package/.agent/skills/README.md +127 -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 +109 -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 +86 -0
- package/.agent/skills/database-design/SKILL.md +149 -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/intelligent-routing/SKILL.md +180 -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-writing/SKILL.md +144 -0
- package/.agent/skills/security-practices/SKILL.md +140 -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/verification-loop/SKILL.md +89 -0
- package/.agent/skills/webapp-testing/SKILL.md +175 -0
- package/.agent/workflows/README.md +78 -0
- package/.agent/workflows/brainstorm.md +100 -0
- package/.agent/workflows/create.md +75 -0
- package/.agent/workflows/debug.md +98 -0
- package/.agent/workflows/deploy.md +144 -0
- package/.agent/workflows/enhance.md +65 -0
- package/.agent/workflows/orchestrate.md +114 -0
- package/.agent/workflows/plan.md +72 -0
- package/.agent/workflows/preview.md +83 -0
- package/.agent/workflows/status.md +91 -0
- package/.agent/workflows/test.md +95 -0
- package/.agent/workflows/ui-ux-pro-max.md +127 -0
- package/LICENSE +21 -0
- package/README.md +585 -0
- package/bin/ag-kit.js +249 -0
- package/package.json +48 -0
|
@@ -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
|
+
## π¦ BeSync 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,109 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: architecture
|
|
3
|
+
description: System design patterns and architectural principles
|
|
4
|
+
triggers: [context, architecture, design, system]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Architecture Skill
|
|
8
|
+
|
|
9
|
+
> **Purpose**: Apply proven architectural patterns for scalable systems
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Overview
|
|
14
|
+
|
|
15
|
+
This skill provides guidance for designing maintainable, scalable software architectures using industry-standard patterns.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Architectural Patterns
|
|
20
|
+
|
|
21
|
+
### 1. Layered Architecture
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
βββββββββββββββββββββββββββ
|
|
25
|
+
β Presentation Layer β β Controllers, Views
|
|
26
|
+
βββββββββββββββββββββββββββ€
|
|
27
|
+
β Application Layer β β Use Cases, Services
|
|
28
|
+
βββββββββββββββββββββββββββ€
|
|
29
|
+
β Domain Layer β β Entities, Business Logic
|
|
30
|
+
βββββββββββββββββββββββββββ€
|
|
31
|
+
β Infrastructure Layer β β Database, External APIs
|
|
32
|
+
βββββββββββββββββββββββββββ
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### 2. Clean Architecture
|
|
36
|
+
|
|
37
|
+
- **Entities**: Core business objects
|
|
38
|
+
- **Use Cases**: Application-specific business rules
|
|
39
|
+
- **Interface Adapters**: Controllers, Presenters, Gateways
|
|
40
|
+
- **Frameworks**: External concerns (DB, Web, Devices)
|
|
41
|
+
|
|
42
|
+
### 3. Hexagonal Architecture (Ports & Adapters)
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
βββββββββββββββββββ
|
|
46
|
+
βββββββ Ports βββββββ
|
|
47
|
+
β (Interfaces) β
|
|
48
|
+
β β
|
|
49
|
+
β Domain Core β
|
|
50
|
+
β β
|
|
51
|
+
βββββββ Adapters βββββββ
|
|
52
|
+
βββββββββββββββββββ
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## Design Principles
|
|
58
|
+
|
|
59
|
+
### SOLID
|
|
60
|
+
|
|
61
|
+
| Principle | Description |
|
|
62
|
+
| :------------------------ | :------------------------------------------ |
|
|
63
|
+
| **S**ingle Responsibility | One reason to change |
|
|
64
|
+
| **O**pen/Closed | Open for extension, closed for modification |
|
|
65
|
+
| **L**iskov Substitution | Subtypes must be substitutable |
|
|
66
|
+
| **I**nterface Segregation | Many specific interfaces |
|
|
67
|
+
| **D**ependency Inversion | Depend on abstractions |
|
|
68
|
+
|
|
69
|
+
### DRY, KISS, YAGNI
|
|
70
|
+
|
|
71
|
+
- **DRY**: Don't Repeat Yourself
|
|
72
|
+
- **KISS**: Keep It Simple, Stupid
|
|
73
|
+
- **YAGNI**: You Aren't Gonna Need It
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## Module Structure
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
src/
|
|
81
|
+
βββ domain/ # Core business logic
|
|
82
|
+
β βββ entities/
|
|
83
|
+
β βββ value-objects/
|
|
84
|
+
β βββ services/
|
|
85
|
+
βββ application/ # Use cases
|
|
86
|
+
β βββ commands/
|
|
87
|
+
β βββ queries/
|
|
88
|
+
β βββ handlers/
|
|
89
|
+
βββ infrastructure/ # External concerns
|
|
90
|
+
β βββ database/
|
|
91
|
+
β βββ messaging/
|
|
92
|
+
β βββ external-apis/
|
|
93
|
+
βββ interfaces/ # Entry points
|
|
94
|
+
βββ http/
|
|
95
|
+
βββ graphql/
|
|
96
|
+
βββ cli/
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## Quick Reference
|
|
102
|
+
|
|
103
|
+
| Pattern | When to Use |
|
|
104
|
+
| :------------ | :------------------------------- |
|
|
105
|
+
| Monolith | MVP, small team |
|
|
106
|
+
| Microservices | Scale, team autonomy |
|
|
107
|
+
| Event-Driven | Async, decoupling |
|
|
108
|
+
| CQRS | Read/write separation |
|
|
109
|
+
| Serverless | Variable load, cost optimization |
|
|
@@ -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 |
|