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.
Files changed (116) hide show
  1. package/.agent/README.md +76 -0
  2. package/.agent/agents/README.md +129 -0
  3. package/.agent/agents/architect.md +184 -0
  4. package/.agent/agents/backend-specialist.md +77 -0
  5. package/.agent/agents/build-error-resolver.md +93 -0
  6. package/.agent/agents/code-reviewer.md +161 -0
  7. package/.agent/agents/database-architect.md +119 -0
  8. package/.agent/agents/devops-engineer.md +138 -0
  9. package/.agent/agents/doc-updater.md +79 -0
  10. package/.agent/agents/e2e-runner.md +110 -0
  11. package/.agent/agents/explorer-agent.md +135 -0
  12. package/.agent/agents/frontend-specialist.md +68 -0
  13. package/.agent/agents/knowledge-agent.md +83 -0
  14. package/.agent/agents/mobile-developer.md +114 -0
  15. package/.agent/agents/performance-optimizer.md +145 -0
  16. package/.agent/agents/planner.md +190 -0
  17. package/.agent/agents/refactor-cleaner.md +92 -0
  18. package/.agent/agents/reliability-engineer.md +98 -0
  19. package/.agent/agents/security-reviewer.md +145 -0
  20. package/.agent/agents/sprint-orchestrator.md +114 -0
  21. package/.agent/agents/tdd-guide.md +178 -0
  22. package/.agent/checklists/README.md +101 -0
  23. package/.agent/checklists/pre-commit.md +93 -0
  24. package/.agent/checklists/session-end.md +84 -0
  25. package/.agent/checklists/session-start.md +86 -0
  26. package/.agent/commands/README.md +119 -0
  27. package/.agent/commands/adr.md +29 -0
  28. package/.agent/commands/ask.md +28 -0
  29. package/.agent/commands/build.md +30 -0
  30. package/.agent/commands/changelog.md +40 -0
  31. package/.agent/commands/checkpoint.md +28 -0
  32. package/.agent/commands/code-review.md +64 -0
  33. package/.agent/commands/compact.md +28 -0
  34. package/.agent/commands/cook.md +30 -0
  35. package/.agent/commands/db.md +30 -0
  36. package/.agent/commands/debug.md +30 -0
  37. package/.agent/commands/deploy.md +36 -0
  38. package/.agent/commands/design.md +29 -0
  39. package/.agent/commands/doc.md +30 -0
  40. package/.agent/commands/eval.md +30 -0
  41. package/.agent/commands/fix.md +32 -0
  42. package/.agent/commands/git.md +32 -0
  43. package/.agent/commands/help.md +31 -0
  44. package/.agent/commands/implement.md +30 -0
  45. package/.agent/commands/integrate.md +32 -0
  46. package/.agent/commands/learn.md +29 -0
  47. package/.agent/commands/perf.md +31 -0
  48. package/.agent/commands/plan.md +55 -0
  49. package/.agent/commands/pr.md +30 -0
  50. package/.agent/commands/refactor.md +32 -0
  51. package/.agent/commands/research.md +28 -0
  52. package/.agent/commands/scout.md +30 -0
  53. package/.agent/commands/security-scan.md +33 -0
  54. package/.agent/commands/setup.md +31 -0
  55. package/.agent/commands/status.md +58 -0
  56. package/.agent/commands/tdd.md +72 -0
  57. package/.agent/commands/verify.md +58 -0
  58. package/.agent/decisions/001-trust-grade-governance.md +46 -0
  59. package/.agent/engine/loading-rules.json +98 -0
  60. package/.agent/engine/workflow-state.json +120 -0
  61. package/.agent/hooks/README.md +97 -0
  62. package/.agent/hooks/hooks.json +81 -0
  63. package/.agent/hooks/templates/session-end.md +110 -0
  64. package/.agent/hooks/templates/session-start.md +95 -0
  65. package/.agent/manifest.json +84 -0
  66. package/.agent/rules/coding-style.md +30 -0
  67. package/.agent/rules/git-workflow.md +45 -0
  68. package/.agent/rules/security.md +29 -0
  69. package/.agent/rules/testing.md +37 -0
  70. package/.agent/rules.md +272 -0
  71. package/.agent/session-context.md +80 -0
  72. package/.agent/session-state.json +27 -0
  73. package/.agent/skills/README.md +127 -0
  74. package/.agent/skills/api-patterns/SKILL.md +117 -0
  75. package/.agent/skills/app-builder/SKILL.md +202 -0
  76. package/.agent/skills/architecture/SKILL.md +109 -0
  77. package/.agent/skills/behavioral-modes/SKILL.md +295 -0
  78. package/.agent/skills/brainstorming/SKILL.md +156 -0
  79. package/.agent/skills/clean-code/SKILL.md +142 -0
  80. package/.agent/skills/context-budget/SKILL.md +78 -0
  81. package/.agent/skills/continuous-learning/SKILL.md +86 -0
  82. package/.agent/skills/database-design/SKILL.md +149 -0
  83. package/.agent/skills/debugging-strategies/SKILL.md +158 -0
  84. package/.agent/skills/deployment-procedures/SKILL.md +191 -0
  85. package/.agent/skills/docker-patterns/SKILL.md +161 -0
  86. package/.agent/skills/eval-harness/SKILL.md +89 -0
  87. package/.agent/skills/frontend-patterns/SKILL.md +141 -0
  88. package/.agent/skills/git-workflow/SKILL.md +159 -0
  89. package/.agent/skills/intelligent-routing/SKILL.md +180 -0
  90. package/.agent/skills/mobile-design/SKILL.md +191 -0
  91. package/.agent/skills/nodejs-patterns/SKILL.md +164 -0
  92. package/.agent/skills/parallel-agents/SKILL.md +200 -0
  93. package/.agent/skills/performance-profiling/SKILL.md +134 -0
  94. package/.agent/skills/plan-writing/SKILL.md +144 -0
  95. package/.agent/skills/security-practices/SKILL.md +140 -0
  96. package/.agent/skills/strategic-compact/SKILL.md +62 -0
  97. package/.agent/skills/testing-patterns/SKILL.md +141 -0
  98. package/.agent/skills/typescript-expert/SKILL.md +160 -0
  99. package/.agent/skills/verification-loop/SKILL.md +89 -0
  100. package/.agent/skills/webapp-testing/SKILL.md +175 -0
  101. package/.agent/workflows/README.md +78 -0
  102. package/.agent/workflows/brainstorm.md +100 -0
  103. package/.agent/workflows/create.md +75 -0
  104. package/.agent/workflows/debug.md +98 -0
  105. package/.agent/workflows/deploy.md +144 -0
  106. package/.agent/workflows/enhance.md +65 -0
  107. package/.agent/workflows/orchestrate.md +114 -0
  108. package/.agent/workflows/plan.md +72 -0
  109. package/.agent/workflows/preview.md +83 -0
  110. package/.agent/workflows/status.md +91 -0
  111. package/.agent/workflows/test.md +95 -0
  112. package/.agent/workflows/ui-ux-pro-max.md +127 -0
  113. package/LICENSE +21 -0
  114. package/README.md +585 -0
  115. package/bin/ag-kit.js +249 -0
  116. 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 |