@ekkos/cli 0.2.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/dist/cache/LocalSessionStore.d.ts +129 -0
- package/dist/cache/LocalSessionStore.js +688 -0
- package/dist/cache/capture.d.ts +26 -0
- package/dist/cache/capture.js +461 -0
- package/dist/cache/index.d.ts +7 -0
- package/dist/cache/index.js +23 -0
- package/dist/cache/types.d.ts +147 -0
- package/dist/cache/types.js +40 -0
- package/dist/commands/init.d.ts +9 -0
- package/dist/commands/init.js +478 -0
- package/dist/commands/run.d.ts +12 -0
- package/dist/commands/run.js +829 -0
- package/dist/commands/setup.d.ts +6 -0
- package/dist/commands/setup.js +658 -0
- package/dist/commands/status.d.ts +1 -0
- package/dist/commands/status.js +109 -0
- package/dist/commands/test.d.ts +1 -0
- package/dist/commands/test.js +157 -0
- package/dist/deploy/agents.d.ts +15 -0
- package/dist/deploy/agents.js +72 -0
- package/dist/deploy/hooks.d.ts +16 -0
- package/dist/deploy/hooks.js +121 -0
- package/dist/deploy/index.d.ts +7 -0
- package/dist/deploy/index.js +24 -0
- package/dist/deploy/instructions.d.ts +12 -0
- package/dist/deploy/instructions.js +36 -0
- package/dist/deploy/mcp.d.ts +19 -0
- package/dist/deploy/mcp.js +109 -0
- package/dist/deploy/plugins.d.ts +19 -0
- package/dist/deploy/plugins.js +62 -0
- package/dist/deploy/settings.d.ts +8 -0
- package/dist/deploy/settings.js +84 -0
- package/dist/deploy/skills.d.ts +19 -0
- package/dist/deploy/skills.js +60 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +71 -0
- package/dist/restore/RestoreOrchestrator.d.ts +48 -0
- package/dist/restore/RestoreOrchestrator.js +481 -0
- package/dist/restore/index.d.ts +4 -0
- package/dist/restore/index.js +20 -0
- package/dist/utils/platform.d.ts +29 -0
- package/dist/utils/platform.js +65 -0
- package/dist/utils/session-words.json +119 -0
- package/dist/utils/state.d.ts +57 -0
- package/dist/utils/state.js +186 -0
- package/dist/utils/templates.d.ts +24 -0
- package/dist/utils/templates.js +118 -0
- package/package.json +48 -0
- package/templates/CLAUDE.md +287 -0
- package/templates/README.md +378 -0
- package/templates/agents/README.md +182 -0
- package/templates/agents/code-reviewer.md +166 -0
- package/templates/agents/debug-detective.md +169 -0
- package/templates/agents/ekkOS_Vercel.md +99 -0
- package/templates/agents/extension-manager.md +229 -0
- package/templates/agents/git-companion.md +185 -0
- package/templates/agents/github-test-agent.md +321 -0
- package/templates/agents/railway-manager.md +179 -0
- package/templates/claude-plugins/PHASE2_COMPLETION.md +346 -0
- package/templates/claude-plugins/PLUGIN_PROPOSALS.md +1776 -0
- package/templates/claude-plugins/README.md +587 -0
- package/templates/claude-plugins/agents/code-reviewer.json +14 -0
- package/templates/claude-plugins/agents/debug-detective.json +15 -0
- package/templates/claude-plugins/agents/git-companion.json +14 -0
- package/templates/claude-plugins/blog-manager/.claude-plugin/plugin.json +8 -0
- package/templates/claude-plugins/blog-manager/commands/blog.md +691 -0
- package/templates/claude-plugins/golden-loop-monitor/.claude-plugin/plugin.json +8 -0
- package/templates/claude-plugins/golden-loop-monitor/commands/loop-status.md +434 -0
- package/templates/claude-plugins/learning-tracker/.claude-plugin/plugin.json +8 -0
- package/templates/claude-plugins/learning-tracker/commands/my-patterns.md +282 -0
- package/templates/claude-plugins/memory-lens/.claude-plugin/plugin.json +8 -0
- package/templates/claude-plugins/memory-lens/commands/memory-search.md +181 -0
- package/templates/claude-plugins/pattern-coach/.claude-plugin/plugin.json +8 -0
- package/templates/claude-plugins/pattern-coach/commands/forge.md +365 -0
- package/templates/claude-plugins/project-schema-validator/.claude-plugin/plugin.json +8 -0
- package/templates/claude-plugins/project-schema-validator/commands/validate-schema.md +582 -0
- package/templates/claude-plugins-admin/AGENT_TEAM_PROPOSALS.md +819 -0
- package/templates/claude-plugins-admin/README.md +446 -0
- package/templates/claude-plugins-admin/autonomous-admin-agent/.claude-plugin/plugin.json +8 -0
- package/templates/claude-plugins-admin/autonomous-admin-agent/commands/agent.md +595 -0
- package/templates/claude-plugins-admin/backend-agent/.claude-plugin/plugin.json +8 -0
- package/templates/claude-plugins-admin/backend-agent/commands/backend.md +798 -0
- package/templates/claude-plugins-admin/deploy-guardian/.claude-plugin/plugin.json +8 -0
- package/templates/claude-plugins-admin/deploy-guardian/commands/deploy.md +554 -0
- package/templates/claude-plugins-admin/frontend-agent/.claude-plugin/plugin.json +8 -0
- package/templates/claude-plugins-admin/frontend-agent/commands/frontend.md +881 -0
- package/templates/claude-plugins-admin/mcp-server-manager/.claude-plugin/plugin.json +8 -0
- package/templates/claude-plugins-admin/mcp-server-manager/commands/mcp.md +85 -0
- package/templates/claude-plugins-admin/memory-system-monitor/.claude-plugin/plugin.json +8 -0
- package/templates/claude-plugins-admin/memory-system-monitor/commands/memory-health.md +569 -0
- package/templates/claude-plugins-admin/qa-agent/.claude-plugin/plugin.json +8 -0
- package/templates/claude-plugins-admin/qa-agent/commands/qa.md +863 -0
- package/templates/claude-plugins-admin/tech-lead-agent/.claude-plugin/plugin.json +8 -0
- package/templates/claude-plugins-admin/tech-lead-agent/commands/lead.md +732 -0
- package/templates/commands/continue.md +47 -0
- package/templates/cursor-hooks/after-agent-response.sh +117 -0
- package/templates/cursor-hooks/before-submit-prompt.sh +419 -0
- package/templates/cursor-hooks/hooks.json +20 -0
- package/templates/cursor-hooks/lib/contract.sh +320 -0
- package/templates/cursor-hooks/stop.sh +75 -0
- package/templates/cursor-rules/ekkos-memory.md +187 -0
- package/templates/hooks/assistant-response.sh +96 -0
- package/templates/hooks/hooks.json +28 -0
- package/templates/hooks/lib/contract.sh +320 -0
- package/templates/hooks/lib/state.sh +158 -0
- package/templates/hooks/session-start.ps1 +41 -0
- package/templates/hooks/session-start.sh +318 -0
- package/templates/hooks/stop.ps1 +16 -0
- package/templates/hooks/stop.sh +989 -0
- package/templates/hooks/user-prompt-submit.ps1 +174 -0
- package/templates/hooks/user-prompt-submit.sh +587 -0
- package/templates/hooks-node/lib/state.js +187 -0
- package/templates/hooks-node/stop.js +416 -0
- package/templates/hooks-node/user-prompt-submit.js +337 -0
- package/templates/plan-template.md +306 -0
- package/templates/rules/00-hooks-contract.mdc +89 -0
- package/templates/rules/30-ekkos-core.mdc +188 -0
- package/templates/rules/31-ekkos-messages.mdc +78 -0
- package/templates/skills/continue/SKILL.md +169 -0
- package/templates/skills/ekkOS_Deep_Recall/Skill.md +282 -0
- package/templates/skills/ekkOS_Learn/Skill.md +265 -0
- package/templates/skills/ekkOS_Memory_First/Skill.md +206 -0
- package/templates/skills/ekkOS_Plan_Assist/Skill.md +302 -0
- package/templates/skills/ekkOS_Preferences/Skill.md +247 -0
- package/templates/skills/ekkOS_Reflect/Skill.md +257 -0
- package/templates/skills/ekkOS_Safety/Skill.md +265 -0
- package/templates/skills/ekkOS_Schema/Skill.md +251 -0
- package/templates/skills/ekkOS_Summary/Skill.md +257 -0
- package/templates/skills/ekkOS_Vault/Skill.md +287 -0
- package/templates/skills/permissions/Skill.md +322 -0
- package/templates/spec-template.md +159 -0
- package/templates/windsurf-hooks/before-submit-prompt.sh +238 -0
- package/templates/windsurf-hooks/hooks.json +10 -0
- package/templates/windsurf-hooks/lib/contract.sh +320 -0
- package/templates/windsurf-rules/ekkos-memory.md +129 -0
|
@@ -0,0 +1,819 @@
|
|
|
1
|
+
# ekkOS Dev Team: Autonomous Agents
|
|
2
|
+
|
|
3
|
+
**Building ekkOS with AI Team Members**
|
|
4
|
+
|
|
5
|
+
Instead of hiring a full team, create autonomous agents that act like specialized team members, each handling their domain of the massive ekkOS project.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Team Architecture
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
┌─────────────────┐
|
|
13
|
+
│ Tech Lead │
|
|
14
|
+
│ (Orchestrator) │
|
|
15
|
+
└────────┬────────┘
|
|
16
|
+
│
|
|
17
|
+
┌──────────────────┼──────────────────┐
|
|
18
|
+
│ │ │
|
|
19
|
+
┌─────▼─────┐ ┌─────▼─────┐ ┌─────▼─────┐
|
|
20
|
+
│ Frontend │ │ Backend │ │ DevOps │
|
|
21
|
+
│ Agent │ │ Agent │ │ Agent │
|
|
22
|
+
└─────┬─────┘ └─────┬─────┘ └─────┬─────┘
|
|
23
|
+
│ │ │
|
|
24
|
+
┌─────▼─────┐ ┌─────▼─────┐ ┌─────▼─────┐
|
|
25
|
+
│ QA │ │ Docs │ │ Security │
|
|
26
|
+
│ Agent │ │ Agent │ │ Agent │
|
|
27
|
+
└───────────┘ └───────────┘ └───────────┘
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## 🎯 Tech Lead Agent (Orchestrator)
|
|
33
|
+
|
|
34
|
+
**Role:** Project manager + architect who coordinates all other agents
|
|
35
|
+
|
|
36
|
+
**Responsibilities:**
|
|
37
|
+
- Assigns tasks to specialist agents
|
|
38
|
+
- Tracks progress on features/bugs
|
|
39
|
+
- Makes architectural decisions
|
|
40
|
+
- Prioritizes work
|
|
41
|
+
- Reviews PRs before merge
|
|
42
|
+
- Coordinates releases
|
|
43
|
+
|
|
44
|
+
**Triggers:**
|
|
45
|
+
- `/lead plan` - Plan a new feature
|
|
46
|
+
- `/lead assign` - Assign work to specialist agents
|
|
47
|
+
- `/lead review` - Review all pending work
|
|
48
|
+
- `/lead release` - Coordinate a release
|
|
49
|
+
|
|
50
|
+
**Tools Used:**
|
|
51
|
+
- `ekkOS_Plan` - Create feature implementation plans
|
|
52
|
+
- `ekkOS_Plans` - Track all ongoing work
|
|
53
|
+
- `ekkOS_Search` - Find relevant patterns
|
|
54
|
+
- `ekkOS_Codebase` - Understand current code
|
|
55
|
+
- `GitHub API` - PR management
|
|
56
|
+
- `Bash(git)` - Repository operations
|
|
57
|
+
|
|
58
|
+
**Example:**
|
|
59
|
+
```bash
|
|
60
|
+
/lead plan "Add Teams feature to platform"
|
|
61
|
+
|
|
62
|
+
🎯 Tech Lead Agent: Planning Feature
|
|
63
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
64
|
+
|
|
65
|
+
Feature: Teams functionality
|
|
66
|
+
Complexity: High (8-10 days)
|
|
67
|
+
|
|
68
|
+
Breaking down into tasks...
|
|
69
|
+
|
|
70
|
+
Tasks Created:
|
|
71
|
+
1. Backend Agent: Design teams database schema
|
|
72
|
+
2. Backend Agent: Build teams API endpoints
|
|
73
|
+
3. Frontend Agent: Create Teams UI components
|
|
74
|
+
4. Frontend Agent: Integrate teams in dashboard
|
|
75
|
+
5. QA Agent: Write integration tests
|
|
76
|
+
6. Docs Agent: Document Teams feature
|
|
77
|
+
7. Security Agent: Audit permissions system
|
|
78
|
+
|
|
79
|
+
Plan saved: plan_teams_abc123
|
|
80
|
+
|
|
81
|
+
Assigning to agents...
|
|
82
|
+
✅ Backend Agent: Tasks 1-2 assigned
|
|
83
|
+
✅ Frontend Agent: Tasks 3-4 assigned
|
|
84
|
+
✅ QA Agent: Task 5 pending (after backend)
|
|
85
|
+
✅ Docs Agent: Task 6 pending (after MVP)
|
|
86
|
+
✅ Security Agent: Task 7 in parallel
|
|
87
|
+
|
|
88
|
+
Estimated completion: 8 days
|
|
89
|
+
Next check-in: Daily standup via /lead status
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
**Value:**
|
|
93
|
+
- You don't need to break down features yourself
|
|
94
|
+
- Agents work in parallel on different parts
|
|
95
|
+
- Automatic dependency management
|
|
96
|
+
- Progress tracking built-in
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## 🎨 Frontend Agent
|
|
101
|
+
|
|
102
|
+
**Role:** React/Next.js developer who builds UI
|
|
103
|
+
|
|
104
|
+
**Responsibilities:**
|
|
105
|
+
- Build new UI components
|
|
106
|
+
- Update existing pages
|
|
107
|
+
- Implement designs
|
|
108
|
+
- Handle Tailwind styling
|
|
109
|
+
- Optimize performance
|
|
110
|
+
- Fix frontend bugs
|
|
111
|
+
|
|
112
|
+
**Triggers:**
|
|
113
|
+
- `/frontend build` - Build new component/page
|
|
114
|
+
- `/frontend fix` - Fix frontend bug
|
|
115
|
+
- `/frontend optimize` - Performance optimization
|
|
116
|
+
- `/frontend review` - Review frontend code
|
|
117
|
+
|
|
118
|
+
**Tools Used:**
|
|
119
|
+
- `ekkOS_Search` - Find UI patterns
|
|
120
|
+
- `ekkOS_Codebase` - Understand component structure
|
|
121
|
+
- `Read/Edit/Write` - Code manipulation
|
|
122
|
+
- `Bash(npm)` - Run dev server, tests
|
|
123
|
+
- `Glob` - Find components
|
|
124
|
+
|
|
125
|
+
**Example:**
|
|
126
|
+
```bash
|
|
127
|
+
/frontend build "Teams settings page"
|
|
128
|
+
|
|
129
|
+
🎨 Frontend Agent: Building Component
|
|
130
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
131
|
+
|
|
132
|
+
Task: Teams settings page
|
|
133
|
+
Location: apps/web/app/teams/settings/page.tsx
|
|
134
|
+
|
|
135
|
+
Searching for patterns...
|
|
136
|
+
✅ Found: "Settings page layout" (95% success)
|
|
137
|
+
✅ Found: "Form with Tailwind" (92% success)
|
|
138
|
+
|
|
139
|
+
Analyzing existing code...
|
|
140
|
+
📂 apps/web/app/settings/page.tsx (reference)
|
|
141
|
+
📂 components/SettingsLayout.tsx (reusable)
|
|
142
|
+
|
|
143
|
+
Building component...
|
|
144
|
+
|
|
145
|
+
[████████████████████] 100%
|
|
146
|
+
|
|
147
|
+
✅ Created: apps/web/app/teams/settings/page.tsx
|
|
148
|
+
✅ Created: components/teams/TeamSettingsForm.tsx
|
|
149
|
+
✅ Updated: types/teams.ts
|
|
150
|
+
|
|
151
|
+
Code follows patterns:
|
|
152
|
+
• Uses SettingsLayout wrapper
|
|
153
|
+
• Tailwind for styling
|
|
154
|
+
• React Hook Form for state
|
|
155
|
+
• Proper TypeScript types
|
|
156
|
+
|
|
157
|
+
Ready to test:
|
|
158
|
+
npm run dev
|
|
159
|
+
Navigate to: http://localhost:3000/teams/settings
|
|
160
|
+
|
|
161
|
+
Next:
|
|
162
|
+
• Test the UI
|
|
163
|
+
• /frontend review (self-check)
|
|
164
|
+
• Assign to QA Agent for testing
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
**Value:**
|
|
168
|
+
- Builds UI components automatically
|
|
169
|
+
- Follows existing patterns
|
|
170
|
+
- Consistent with codebase style
|
|
171
|
+
- You just review, not write
|
|
172
|
+
|
|
173
|
+
---
|
|
174
|
+
|
|
175
|
+
## ⚙️ Backend Agent
|
|
176
|
+
|
|
177
|
+
**Role:** API/database developer
|
|
178
|
+
|
|
179
|
+
**Responsibilities:**
|
|
180
|
+
- Design database schemas
|
|
181
|
+
- Build API endpoints
|
|
182
|
+
- Write business logic
|
|
183
|
+
- Handle authentication
|
|
184
|
+
- Optimize queries
|
|
185
|
+
- Fix backend bugs
|
|
186
|
+
|
|
187
|
+
**Triggers:**
|
|
188
|
+
- `/backend api` - Create new API endpoint
|
|
189
|
+
- `/backend schema` - Design database schema
|
|
190
|
+
- `/backend fix` - Fix backend bug
|
|
191
|
+
- `/backend optimize` - Optimize queries
|
|
192
|
+
|
|
193
|
+
**Tools Used:**
|
|
194
|
+
- `ekkOS_Search` - Find backend patterns
|
|
195
|
+
- `ekkOS_IndexSchema` - Store schema designs
|
|
196
|
+
- `supabase_*` - Database operations
|
|
197
|
+
- `Read/Edit/Write` - Code manipulation
|
|
198
|
+
- `Bash` - Run migrations
|
|
199
|
+
|
|
200
|
+
**Example:**
|
|
201
|
+
```bash
|
|
202
|
+
/backend schema "Teams feature"
|
|
203
|
+
|
|
204
|
+
⚙️ Backend Agent: Designing Schema
|
|
205
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
206
|
+
|
|
207
|
+
Task: Teams database schema
|
|
208
|
+
Context: Multi-user teams with roles
|
|
209
|
+
|
|
210
|
+
Searching for patterns...
|
|
211
|
+
✅ Found: "Multi-tenant schema design" (89% success)
|
|
212
|
+
✅ Found: "Role-based permissions" (94% success)
|
|
213
|
+
|
|
214
|
+
Proposed Schema:
|
|
215
|
+
|
|
216
|
+
Table: teams
|
|
217
|
+
- id: uuid (PK)
|
|
218
|
+
- name: text
|
|
219
|
+
- owner_id: uuid (FK users.id)
|
|
220
|
+
- created_at: timestamp
|
|
221
|
+
- updated_at: timestamp
|
|
222
|
+
|
|
223
|
+
Table: team_members
|
|
224
|
+
- id: uuid (PK)
|
|
225
|
+
- team_id: uuid (FK teams.id)
|
|
226
|
+
- user_id: uuid (FK users.id)
|
|
227
|
+
- role: enum(owner, admin, member)
|
|
228
|
+
- joined_at: timestamp
|
|
229
|
+
|
|
230
|
+
Table: team_invites
|
|
231
|
+
- id: uuid (PK)
|
|
232
|
+
- team_id: uuid (FK teams.id)
|
|
233
|
+
- email: text
|
|
234
|
+
- role: enum(admin, member)
|
|
235
|
+
- token: text (unique)
|
|
236
|
+
- expires_at: timestamp
|
|
237
|
+
|
|
238
|
+
Indexes:
|
|
239
|
+
- team_members(team_id, user_id) UNIQUE
|
|
240
|
+
- team_invites(token) UNIQUE
|
|
241
|
+
- team_invites(email, team_id) UNIQUE
|
|
242
|
+
|
|
243
|
+
RLS Policies:
|
|
244
|
+
- teams: Users see only their teams
|
|
245
|
+
- team_members: Users see members of their teams
|
|
246
|
+
- team_invites: Only team admins can manage
|
|
247
|
+
|
|
248
|
+
Migration created: supabase/migrations/20260107_create_teams.sql
|
|
249
|
+
|
|
250
|
+
Ready to apply:
|
|
251
|
+
supabase db push
|
|
252
|
+
|
|
253
|
+
Next:
|
|
254
|
+
• Review schema
|
|
255
|
+
• Apply migration
|
|
256
|
+
• /backend api "Teams CRUD endpoints"
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
**Value:**
|
|
260
|
+
- Designs schemas based on best practices
|
|
261
|
+
- Considers security (RLS)
|
|
262
|
+
- Creates migrations automatically
|
|
263
|
+
- You review, not design from scratch
|
|
264
|
+
|
|
265
|
+
---
|
|
266
|
+
|
|
267
|
+
## 🧪 QA Agent (Quality Assurance)
|
|
268
|
+
|
|
269
|
+
**Role:** Tester who ensures quality
|
|
270
|
+
|
|
271
|
+
**Responsibilities:**
|
|
272
|
+
- Write integration tests
|
|
273
|
+
- Run test suites
|
|
274
|
+
- Catch bugs before production
|
|
275
|
+
- Validate edge cases
|
|
276
|
+
- Performance testing
|
|
277
|
+
- Generate test reports
|
|
278
|
+
|
|
279
|
+
**Triggers:**
|
|
280
|
+
- `/qa test` - Run test suite
|
|
281
|
+
- `/qa write` - Write tests for feature
|
|
282
|
+
- `/qa regression` - Regression testing
|
|
283
|
+
- `/qa performance` - Performance testing
|
|
284
|
+
|
|
285
|
+
**Tools Used:**
|
|
286
|
+
- `Bash(npm test)` - Run tests
|
|
287
|
+
- `Read/Edit/Write` - Write test files
|
|
288
|
+
- `ekkOS_Search` - Find test patterns
|
|
289
|
+
- `ekkOS_Forge` - Capture test patterns
|
|
290
|
+
|
|
291
|
+
**Example:**
|
|
292
|
+
```bash
|
|
293
|
+
/qa write "Teams API endpoints"
|
|
294
|
+
|
|
295
|
+
🧪 QA Agent: Writing Tests
|
|
296
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
297
|
+
|
|
298
|
+
Target: Teams API endpoints
|
|
299
|
+
Location: apps/web/tests/api/teams.test.ts
|
|
300
|
+
|
|
301
|
+
Analyzing API...
|
|
302
|
+
Endpoints found:
|
|
303
|
+
- POST /api/teams (create)
|
|
304
|
+
- GET /api/teams (list)
|
|
305
|
+
- GET /api/teams/[id] (get)
|
|
306
|
+
- PATCH /api/teams/[id] (update)
|
|
307
|
+
- DELETE /api/teams/[id] (delete)
|
|
308
|
+
- POST /api/teams/[id]/members (add member)
|
|
309
|
+
- DELETE /api/teams/[id]/members/[userId] (remove)
|
|
310
|
+
|
|
311
|
+
Writing tests...
|
|
312
|
+
|
|
313
|
+
[████████████████████] 100%
|
|
314
|
+
|
|
315
|
+
✅ Created: tests/api/teams.test.ts (247 lines)
|
|
316
|
+
|
|
317
|
+
Test Coverage:
|
|
318
|
+
✅ Happy paths (create, read, update, delete)
|
|
319
|
+
✅ Edge cases (empty name, duplicate team)
|
|
320
|
+
✅ Auth checks (unauthenticated, unauthorized)
|
|
321
|
+
✅ Permissions (only owner can delete)
|
|
322
|
+
✅ Validation (invalid IDs, missing fields)
|
|
323
|
+
|
|
324
|
+
Total: 28 test cases
|
|
325
|
+
|
|
326
|
+
Running tests...
|
|
327
|
+
|
|
328
|
+
PASS tests/api/teams.test.ts
|
|
329
|
+
Teams API
|
|
330
|
+
✓ creates team successfully (234ms)
|
|
331
|
+
✓ requires authentication (45ms)
|
|
332
|
+
✓ validates team name (67ms)
|
|
333
|
+
... 25 more tests ...
|
|
334
|
+
|
|
335
|
+
Test Suites: 1 passed, 1 total
|
|
336
|
+
Tests: 28 passed, 28 total
|
|
337
|
+
|
|
338
|
+
✅ All tests passing!
|
|
339
|
+
|
|
340
|
+
Coverage: 94% (target: 90%+)
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
**Value:**
|
|
344
|
+
- Tests written automatically
|
|
345
|
+
- Comprehensive coverage
|
|
346
|
+
- Catches bugs before you ship
|
|
347
|
+
- Regression testing built-in
|
|
348
|
+
|
|
349
|
+
---
|
|
350
|
+
|
|
351
|
+
## 📝 Docs Agent (Technical Writer)
|
|
352
|
+
|
|
353
|
+
**Role:** Documentation writer
|
|
354
|
+
|
|
355
|
+
**Responsibilities:**
|
|
356
|
+
- Write API documentation
|
|
357
|
+
- Update user guides
|
|
358
|
+
- Create internal docs
|
|
359
|
+
- Document patterns
|
|
360
|
+
- Keep docs in sync with code
|
|
361
|
+
- Write READMEs
|
|
362
|
+
|
|
363
|
+
**Triggers:**
|
|
364
|
+
- `/docs api` - Document API endpoints
|
|
365
|
+
- `/docs guide` - Write user guide
|
|
366
|
+
- `/docs update` - Update existing docs
|
|
367
|
+
- `/docs review` - Review all docs
|
|
368
|
+
|
|
369
|
+
**Tools Used:**
|
|
370
|
+
- `Read` - Understand code
|
|
371
|
+
- `Write/Edit` - Update docs
|
|
372
|
+
- `ekkOS_Search` - Find doc patterns
|
|
373
|
+
- `Glob` - Find existing docs
|
|
374
|
+
|
|
375
|
+
**Example:**
|
|
376
|
+
```bash
|
|
377
|
+
/docs api "Teams endpoints"
|
|
378
|
+
|
|
379
|
+
📝 Docs Agent: Writing API Documentation
|
|
380
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
381
|
+
|
|
382
|
+
Target: Teams API endpoints
|
|
383
|
+
Output: apps/docs/content/api/teams.mdx
|
|
384
|
+
|
|
385
|
+
Analyzing API code...
|
|
386
|
+
Found: apps/web/app/api/teams/route.ts
|
|
387
|
+
Endpoints: 7 total
|
|
388
|
+
|
|
389
|
+
Extracting:
|
|
390
|
+
• Request/response types
|
|
391
|
+
• Authentication requirements
|
|
392
|
+
• Example requests
|
|
393
|
+
• Error codes
|
|
394
|
+
|
|
395
|
+
Writing documentation...
|
|
396
|
+
|
|
397
|
+
✅ Created: apps/docs/content/api/teams.mdx
|
|
398
|
+
|
|
399
|
+
Preview:
|
|
400
|
+
|
|
401
|
+
# Teams API
|
|
402
|
+
|
|
403
|
+
Manage teams and team memberships.
|
|
404
|
+
|
|
405
|
+
## Create Team
|
|
406
|
+
|
|
407
|
+
`POST /api/teams`
|
|
408
|
+
|
|
409
|
+
Create a new team.
|
|
410
|
+
|
|
411
|
+
**Authentication:** Required
|
|
412
|
+
|
|
413
|
+
**Request Body:**
|
|
414
|
+
```typescript
|
|
415
|
+
{
|
|
416
|
+
name: string // Team name (3-50 chars)
|
|
417
|
+
}
|
|
418
|
+
```
|
|
419
|
+
|
|
420
|
+
**Response (201):**
|
|
421
|
+
```typescript
|
|
422
|
+
{
|
|
423
|
+
id: string
|
|
424
|
+
name: string
|
|
425
|
+
owner_id: string
|
|
426
|
+
created_at: string
|
|
427
|
+
}
|
|
428
|
+
```
|
|
429
|
+
|
|
430
|
+
**Errors:**
|
|
431
|
+
- 400: Invalid team name
|
|
432
|
+
- 401: Unauthorized
|
|
433
|
+
- 409: Team name already exists
|
|
434
|
+
|
|
435
|
+
[... 6 more endpoints documented ...]
|
|
436
|
+
|
|
437
|
+
Documentation complete!
|
|
438
|
+
View: http://localhost:3000/docs/api/teams
|
|
439
|
+
```
|
|
440
|
+
|
|
441
|
+
**Value:**
|
|
442
|
+
- Docs stay in sync with code
|
|
443
|
+
- API docs generated automatically
|
|
444
|
+
- Consistent documentation style
|
|
445
|
+
- You don't have to write docs manually
|
|
446
|
+
|
|
447
|
+
---
|
|
448
|
+
|
|
449
|
+
## 🔒 Security Agent
|
|
450
|
+
|
|
451
|
+
**Role:** Security engineer
|
|
452
|
+
|
|
453
|
+
**Responsibilities:**
|
|
454
|
+
- Audit code for vulnerabilities
|
|
455
|
+
- Check authentication/authorization
|
|
456
|
+
- Scan dependencies
|
|
457
|
+
- Review RLS policies
|
|
458
|
+
- Test for OWASP Top 10
|
|
459
|
+
- Generate security reports
|
|
460
|
+
|
|
461
|
+
**Triggers:**
|
|
462
|
+
- `/security audit` - Full security audit
|
|
463
|
+
- `/security rls` - Check RLS policies
|
|
464
|
+
- `/security deps` - Scan dependencies
|
|
465
|
+
- `/security review` - Review PR for security
|
|
466
|
+
|
|
467
|
+
**Tools Used:**
|
|
468
|
+
- `ekkOS_Search` - Security patterns
|
|
469
|
+
- `Bash(npm audit)` - Dependency scanning
|
|
470
|
+
- `supabase_execute_sql` - Check RLS
|
|
471
|
+
- `Read` - Code analysis
|
|
472
|
+
|
|
473
|
+
**Example:**
|
|
474
|
+
```bash
|
|
475
|
+
/security audit "Teams feature"
|
|
476
|
+
|
|
477
|
+
🔒 Security Agent: Security Audit
|
|
478
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
479
|
+
|
|
480
|
+
Target: Teams feature (all files)
|
|
481
|
+
Scope: Full security review
|
|
482
|
+
|
|
483
|
+
Scanning...
|
|
484
|
+
|
|
485
|
+
───────────────────────────────────────────────────────────────────
|
|
486
|
+
✅ Authentication
|
|
487
|
+
|
|
488
|
+
✓ All API endpoints require authentication
|
|
489
|
+
✓ Tokens validated correctly
|
|
490
|
+
✓ Session management secure
|
|
491
|
+
|
|
492
|
+
───────────────────────────────────────────────────────────────────
|
|
493
|
+
⚠️ Authorization
|
|
494
|
+
|
|
495
|
+
✓ Team creation restricted to authenticated users
|
|
496
|
+
⚠️ ISSUE: Missing permission check in PATCH /api/teams/[id]
|
|
497
|
+
Location: apps/web/app/api/teams/[id]/route.ts:45
|
|
498
|
+
Risk: Medium
|
|
499
|
+
Issue: Any team member can update team name, should be admin only
|
|
500
|
+
|
|
501
|
+
Fix: Add role check:
|
|
502
|
+
```typescript
|
|
503
|
+
if (member.role !== 'admin' && member.role !== 'owner') {
|
|
504
|
+
return new Response('Forbidden', { status: 403 })
|
|
505
|
+
}
|
|
506
|
+
```
|
|
507
|
+
|
|
508
|
+
───────────────────────────────────────────────────────────────────
|
|
509
|
+
✅ Input Validation
|
|
510
|
+
|
|
511
|
+
✓ Team name validated (length, format)
|
|
512
|
+
✓ User IDs validated (UUID format)
|
|
513
|
+
✓ SQL injection prevented (parameterized queries)
|
|
514
|
+
|
|
515
|
+
───────────────────────────────────────────────────────────────────
|
|
516
|
+
✅ RLS Policies
|
|
517
|
+
|
|
518
|
+
Checked 5 policies:
|
|
519
|
+
✓ teams: SELECT (users see only their teams)
|
|
520
|
+
✓ teams: INSERT (authenticated users can create)
|
|
521
|
+
✓ teams: UPDATE (owners/admins only)
|
|
522
|
+
✓ teams: DELETE (owners only)
|
|
523
|
+
✓ team_members: SELECT (team members only)
|
|
524
|
+
|
|
525
|
+
All policies secure ✅
|
|
526
|
+
|
|
527
|
+
───────────────────────────────────────────────────────────────────
|
|
528
|
+
✅ Dependencies
|
|
529
|
+
|
|
530
|
+
Scanned package.json:
|
|
531
|
+
0 high vulnerabilities
|
|
532
|
+
0 moderate vulnerabilities
|
|
533
|
+
2 low vulnerabilities (non-critical)
|
|
534
|
+
|
|
535
|
+
───────────────────────────────────────────────────────────────────
|
|
536
|
+
📊 Security Score: 92/100 (Good)
|
|
537
|
+
|
|
538
|
+
Issues Found: 1 medium
|
|
539
|
+
Required Actions: Fix authorization check
|
|
540
|
+
|
|
541
|
+
Recommendation: Fix issue before production deploy
|
|
542
|
+
```
|
|
543
|
+
|
|
544
|
+
**Value:**
|
|
545
|
+
- Security issues caught early
|
|
546
|
+
- Automated vulnerability scanning
|
|
547
|
+
- Best practices enforced
|
|
548
|
+
- Prevents security bugs
|
|
549
|
+
|
|
550
|
+
---
|
|
551
|
+
|
|
552
|
+
## 🚀 DevOps Agent
|
|
553
|
+
|
|
554
|
+
**Role:** Infrastructure engineer
|
|
555
|
+
|
|
556
|
+
**Responsibilities:**
|
|
557
|
+
- Manage deployments
|
|
558
|
+
- Monitor services
|
|
559
|
+
- Optimize performance
|
|
560
|
+
- Handle incidents
|
|
561
|
+
- Manage secrets
|
|
562
|
+
- Infrastructure as code
|
|
563
|
+
|
|
564
|
+
**Triggers:**
|
|
565
|
+
- `/devops deploy` - Deploy services
|
|
566
|
+
- `/devops monitor` - Monitor infrastructure
|
|
567
|
+
- `/devops incident` - Handle incident
|
|
568
|
+
- `/devops optimize` - Performance optimization
|
|
569
|
+
|
|
570
|
+
**Tools Used:**
|
|
571
|
+
- All the tools from Deploy Guardian, Memory Monitor, MCP Manager
|
|
572
|
+
- `Bash(vercel)` - Deployments
|
|
573
|
+
- `Bash(railway)` - Worker management
|
|
574
|
+
- `supabase_*` - Database operations
|
|
575
|
+
|
|
576
|
+
**(We already designed this one above!)**
|
|
577
|
+
|
|
578
|
+
---
|
|
579
|
+
|
|
580
|
+
## 📊 Data Agent (Memory Engineer)
|
|
581
|
+
|
|
582
|
+
**Role:** Data engineer specializing in memory system
|
|
583
|
+
|
|
584
|
+
**Responsibilities:**
|
|
585
|
+
- Optimize 11-layer memory
|
|
586
|
+
- Tune vector searches
|
|
587
|
+
- Manage pattern quality
|
|
588
|
+
- Run brain workers
|
|
589
|
+
- Data integrity
|
|
590
|
+
- Performance tuning
|
|
591
|
+
|
|
592
|
+
**Triggers:**
|
|
593
|
+
- `/data optimize` - Optimize memory layers
|
|
594
|
+
- `/data quality` - Check pattern quality
|
|
595
|
+
- `/data migrate` - Run data migrations
|
|
596
|
+
- `/data analyze` - Analyze memory usage
|
|
597
|
+
|
|
598
|
+
**Tools Used:**
|
|
599
|
+
- All the tools from Memory System Monitor
|
|
600
|
+
- `ekkOS_Stats` - Memory metrics
|
|
601
|
+
- Vector DB operations
|
|
602
|
+
- Pattern management tools
|
|
603
|
+
|
|
604
|
+
**(We already designed this one above!)**
|
|
605
|
+
|
|
606
|
+
---
|
|
607
|
+
|
|
608
|
+
## 🎯 Product Agent
|
|
609
|
+
|
|
610
|
+
**Role:** Product manager
|
|
611
|
+
|
|
612
|
+
**Responsibilities:**
|
|
613
|
+
- Prioritize features
|
|
614
|
+
- Track user feedback
|
|
615
|
+
- Analyze usage metrics
|
|
616
|
+
- Plan roadmap
|
|
617
|
+
- Make product decisions
|
|
618
|
+
- A/B testing
|
|
619
|
+
|
|
620
|
+
**Triggers:**
|
|
621
|
+
- `/product prioritize` - Prioritize backlog
|
|
622
|
+
- `/product metrics` - Analyze usage data
|
|
623
|
+
- `/product feedback` - Review user feedback
|
|
624
|
+
- `/product roadmap` - Plan next quarter
|
|
625
|
+
|
|
626
|
+
**Tools Used:**
|
|
627
|
+
- `ekkOS_Search` - Find user feedback patterns
|
|
628
|
+
- `ekkOS_Stats` - Usage statistics
|
|
629
|
+
- Analytics APIs
|
|
630
|
+
- User feedback tools
|
|
631
|
+
|
|
632
|
+
**Example:**
|
|
633
|
+
```bash
|
|
634
|
+
/product prioritize
|
|
635
|
+
|
|
636
|
+
🎯 Product Agent: Feature Prioritization
|
|
637
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
638
|
+
|
|
639
|
+
Analyzing backlog...
|
|
640
|
+
|
|
641
|
+
Features (23 total):
|
|
642
|
+
- Teams functionality
|
|
643
|
+
- Export memory data
|
|
644
|
+
- API rate limiting
|
|
645
|
+
- Dark mode
|
|
646
|
+
... 19 more ...
|
|
647
|
+
|
|
648
|
+
Analyzing each feature:
|
|
649
|
+
• User demand (from feedback)
|
|
650
|
+
• Business impact
|
|
651
|
+
• Engineering effort
|
|
652
|
+
• Dependencies
|
|
653
|
+
|
|
654
|
+
───────────────────────────────────────────────────────────────────
|
|
655
|
+
🏆 Top Priority (Do First)
|
|
656
|
+
|
|
657
|
+
1. Teams Functionality
|
|
658
|
+
User Demand: 🔥🔥🔥🔥🔥 (89 requests)
|
|
659
|
+
Business Impact: $15K MRR potential
|
|
660
|
+
Effort: High (8-10 days)
|
|
661
|
+
ROI Score: 9.2/10
|
|
662
|
+
Reason: Most requested, unlocks Enterprise tier
|
|
663
|
+
|
|
664
|
+
2. Export Memory Data
|
|
665
|
+
User Demand: 🔥🔥🔥🔥 (67 requests)
|
|
666
|
+
Business Impact: Retention +15%
|
|
667
|
+
Effort: Low (2-3 days)
|
|
668
|
+
ROI Score: 8.8/10
|
|
669
|
+
Reason: Quick win, high retention impact
|
|
670
|
+
|
|
671
|
+
3. API Rate Limiting
|
|
672
|
+
User Demand: 🔥🔥🔥 (34 requests)
|
|
673
|
+
Business Impact: Reduce abuse, cost savings
|
|
674
|
+
Effort: Medium (4-5 days)
|
|
675
|
+
ROI Score: 7.9/10
|
|
676
|
+
Reason: Necessary for scaling
|
|
677
|
+
|
|
678
|
+
───────────────────────────────────────────────────────────────────
|
|
679
|
+
Recommended Q1 Roadmap:
|
|
680
|
+
|
|
681
|
+
Week 1-2: Teams functionality
|
|
682
|
+
Week 3: Export memory data
|
|
683
|
+
Week 4-5: API rate limiting
|
|
684
|
+
Week 6: Performance optimization
|
|
685
|
+
Week 7-8: Mobile app MVP
|
|
686
|
+
|
|
687
|
+
Assign to Tech Lead: /lead plan "Teams functionality"
|
|
688
|
+
```
|
|
689
|
+
|
|
690
|
+
**Value:**
|
|
691
|
+
- Data-driven prioritization
|
|
692
|
+
- You make product decisions based on data
|
|
693
|
+
- ROI calculated automatically
|
|
694
|
+
- Roadmap planning automated
|
|
695
|
+
|
|
696
|
+
---
|
|
697
|
+
|
|
698
|
+
## Summary: Your AI Dev Team
|
|
699
|
+
|
|
700
|
+
| Agent | Role | Time Savings | Replaces |
|
|
701
|
+
|-------|------|--------------|----------|
|
|
702
|
+
| **Tech Lead** | Orchestrator | 80% planning | Project manager |
|
|
703
|
+
| **Frontend** | UI Developer | 70% coding | React developer |
|
|
704
|
+
| **Backend** | API Developer | 70% coding | Backend developer |
|
|
705
|
+
| **QA** | Tester | 90% testing | QA engineer |
|
|
706
|
+
| **Docs** | Writer | 95% docs | Technical writer |
|
|
707
|
+
| **Security** | Security Engineer | 85% audits | Security specialist |
|
|
708
|
+
| **DevOps** | Infrastructure | 80% ops | DevOps engineer |
|
|
709
|
+
| **Data** | Memory Engineer | 75% optimization | Data engineer |
|
|
710
|
+
| **Product** | Product Manager | 60% analysis | Product manager |
|
|
711
|
+
|
|
712
|
+
**Total:** ~9 specialized team members automated
|
|
713
|
+
|
|
714
|
+
---
|
|
715
|
+
|
|
716
|
+
## Implementation Plan
|
|
717
|
+
|
|
718
|
+
### Phase 1: Core Team (Weeks 1-2)
|
|
719
|
+
1. Tech Lead Agent (orchestrator)
|
|
720
|
+
2. Frontend Agent (most UI work)
|
|
721
|
+
3. Backend Agent (most API work)
|
|
722
|
+
|
|
723
|
+
**Impact:** 70% of development work automated
|
|
724
|
+
|
|
725
|
+
### Phase 2: Quality & Ops (Weeks 3-4)
|
|
726
|
+
4. QA Agent (testing)
|
|
727
|
+
5. DevOps Agent (infrastructure)
|
|
728
|
+
6. Security Agent (audits)
|
|
729
|
+
|
|
730
|
+
**Impact:** +20% (90% total automated)
|
|
731
|
+
|
|
732
|
+
### Phase 3: Polish & Product (Weeks 5-6)
|
|
733
|
+
7. Docs Agent (documentation)
|
|
734
|
+
8. Data Agent (memory optimization)
|
|
735
|
+
9. Product Agent (prioritization)
|
|
736
|
+
|
|
737
|
+
**Impact:** +10% (100% team automated!)
|
|
738
|
+
|
|
739
|
+
---
|
|
740
|
+
|
|
741
|
+
## Usage Example: Building Teams Feature
|
|
742
|
+
|
|
743
|
+
```bash
|
|
744
|
+
# 1. Product Agent analyzes and prioritizes
|
|
745
|
+
/product prioritize
|
|
746
|
+
→ "Teams" is #1 priority
|
|
747
|
+
|
|
748
|
+
# 2. Tech Lead creates plan
|
|
749
|
+
/lead plan "Add Teams feature"
|
|
750
|
+
→ Breaks into 7 tasks across agents
|
|
751
|
+
|
|
752
|
+
# 3. Backend Agent designs schema
|
|
753
|
+
/backend schema "Teams"
|
|
754
|
+
→ Creates migrations, RLS policies
|
|
755
|
+
|
|
756
|
+
# 4. Backend Agent builds API
|
|
757
|
+
/backend api "Teams CRUD"
|
|
758
|
+
→ Creates all endpoints
|
|
759
|
+
|
|
760
|
+
# 5. Frontend Agent builds UI
|
|
761
|
+
/frontend build "Teams pages"
|
|
762
|
+
→ Creates team dashboard, settings
|
|
763
|
+
|
|
764
|
+
# 6. QA Agent writes tests
|
|
765
|
+
/qa write "Teams feature"
|
|
766
|
+
→ 28 test cases, 94% coverage
|
|
767
|
+
|
|
768
|
+
# 7. Security Agent audits
|
|
769
|
+
/security audit "Teams"
|
|
770
|
+
→ Finds 1 issue, suggests fix
|
|
771
|
+
|
|
772
|
+
# 8. Docs Agent documents
|
|
773
|
+
/docs api "Teams endpoints"
|
|
774
|
+
→ Full API docs generated
|
|
775
|
+
|
|
776
|
+
# 9. DevOps Agent deploys
|
|
777
|
+
/devops deploy "Teams feature"
|
|
778
|
+
→ Safely deploys to production
|
|
779
|
+
|
|
780
|
+
# 10. Product Agent tracks
|
|
781
|
+
/product metrics "Teams adoption"
|
|
782
|
+
→ Shows 23% of users created teams
|
|
783
|
+
```
|
|
784
|
+
|
|
785
|
+
**Total time:** 8 days → 2 days (with agents)
|
|
786
|
+
**Your involvement:** Review & approve each step
|
|
787
|
+
**Agents do:** 90% of the work
|
|
788
|
+
|
|
789
|
+
---
|
|
790
|
+
|
|
791
|
+
## Cost Analysis
|
|
792
|
+
|
|
793
|
+
**Without agents:**
|
|
794
|
+
- Senior React Dev: $150K/year
|
|
795
|
+
- Senior Backend Dev: $160K/year
|
|
796
|
+
- QA Engineer: $120K/year
|
|
797
|
+
- DevOps Engineer: $170K/year
|
|
798
|
+
- Technical Writer: $100K/year
|
|
799
|
+
- Security Engineer: $180K/year
|
|
800
|
+
- Product Manager: $140K/year
|
|
801
|
+
- **Total: $1,020,000/year**
|
|
802
|
+
|
|
803
|
+
**With agents:**
|
|
804
|
+
- Claude Code + API costs: ~$500/month = $6,000/year
|
|
805
|
+
- Your time saved: 80%+
|
|
806
|
+
- **Savings: $1,014,000/year**
|
|
807
|
+
|
|
808
|
+
**ROI:** 17,000% 🚀
|
|
809
|
+
|
|
810
|
+
---
|
|
811
|
+
|
|
812
|
+
## Next Steps
|
|
813
|
+
|
|
814
|
+
1. **Start with Tech Lead Agent** - Get orchestration working
|
|
815
|
+
2. **Add Frontend + Backend Agents** - Cover 70% of coding
|
|
816
|
+
3. **Layer in QA + DevOps** - Ensure quality and reliability
|
|
817
|
+
4. **Add remaining specialists** - Complete the team
|
|
818
|
+
|
|
819
|
+
**You become the CEO, agents are your team.** 🎯
|