opencode-agile-agent 1.0.1 → 1.0.2

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 (66) hide show
  1. package/README.md +61 -71
  2. package/bin/cli.js +344 -434
  3. package/bin/sync-templates.js +45 -0
  4. package/bin/validate-templates.js +44 -6
  5. package/package.json +2 -1
  6. package/templates/.opencode/ARCHITECTURE.md +82 -368
  7. package/templates/.opencode/README.md +110 -391
  8. package/templates/.opencode/agents/api-designer.md +45 -312
  9. package/templates/.opencode/agents/backend-specialist.md +46 -214
  10. package/templates/.opencode/agents/code-archaeologist.md +45 -260
  11. package/templates/.opencode/agents/context-gatherer.md +51 -0
  12. package/templates/.opencode/agents/database-architect.md +45 -212
  13. package/templates/.opencode/agents/debugger.md +45 -302
  14. package/templates/.opencode/agents/developer.md +45 -523
  15. package/templates/.opencode/agents/devops-engineer.md +45 -253
  16. package/templates/.opencode/agents/documentation-writer.md +45 -247
  17. package/templates/.opencode/agents/explorer-agent.md +49 -233
  18. package/templates/.opencode/agents/feature-lead.md +62 -302
  19. package/templates/.opencode/agents/frontend-specialist.md +46 -186
  20. package/templates/.opencode/agents/game-developer.md +45 -391
  21. package/templates/.opencode/agents/mobile-developer.md +45 -264
  22. package/templates/.opencode/agents/orchestrator.md +48 -463
  23. package/templates/.opencode/agents/penetration-tester.md +44 -254
  24. package/templates/.opencode/agents/performance-optimizer.md +45 -292
  25. package/templates/.opencode/agents/pr-reviewer.md +45 -468
  26. package/templates/.opencode/agents/product-manager.md +46 -225
  27. package/templates/.opencode/agents/project-planner.md +45 -248
  28. package/templates/.opencode/agents/qa-automation-engineer.md +45 -275
  29. package/templates/.opencode/agents/security-auditor.md +44 -258
  30. package/templates/.opencode/agents/seo-specialist.md +45 -266
  31. package/templates/.opencode/agents/system-analyst.md +48 -428
  32. package/templates/.opencode/agents/test-engineer.md +45 -229
  33. package/templates/.opencode/archive/README.md +24 -0
  34. package/templates/.opencode/commands/brainstorm.md +10 -0
  35. package/templates/.opencode/commands/create.md +11 -0
  36. package/templates/.opencode/commands/debug.md +10 -0
  37. package/templates/.opencode/commands/plan.md +9 -0
  38. package/templates/.opencode/commands/review.md +11 -0
  39. package/templates/.opencode/commands/status.md +9 -0
  40. package/templates/.opencode/commands/test.md +10 -0
  41. package/templates/.opencode/skills/api-patterns/SKILL.md +25 -149
  42. package/templates/.opencode/skills/brainstorming/SKILL.md +26 -242
  43. package/templates/.opencode/skills/clean-code/SKILL.md +27 -339
  44. package/templates/.opencode/skills/code-philosophy/SKILL.md +27 -499
  45. package/templates/.opencode/skills/context-archive/SKILL.md +47 -0
  46. package/templates/.opencode/skills/context-gathering/SKILL.md +51 -0
  47. package/templates/.opencode/skills/frontend-design/SKILL.md +26 -224
  48. package/templates/.opencode/skills/intelligent-routing/SKILL.md +25 -182
  49. package/templates/.opencode/skills/parallel-agents/SKILL.md +25 -261
  50. package/templates/.opencode/skills/plan-writing/SKILL.md +28 -238
  51. package/templates/.opencode/skills/redteam-validation/SKILL.md +33 -0
  52. package/templates/.opencode/skills/security-gate/SKILL.md +33 -0
  53. package/templates/.opencode/skills/systematic-debugging/SKILL.md +25 -197
  54. package/templates/.opencode/skills/testing-patterns/SKILL.md +25 -238
  55. package/templates/AGENTS.template.md +300 -426
  56. package/templates/.opencode/agents/product-owner.md +0 -264
  57. package/templates/.opencode/workflows/brainstorm.md +0 -110
  58. package/templates/.opencode/workflows/create.md +0 -108
  59. package/templates/.opencode/workflows/debug.md +0 -128
  60. package/templates/.opencode/workflows/deploy.md +0 -160
  61. package/templates/.opencode/workflows/enhance.md +0 -253
  62. package/templates/.opencode/workflows/orchestrate.md +0 -130
  63. package/templates/.opencode/workflows/plan.md +0 -163
  64. package/templates/.opencode/workflows/review.md +0 -135
  65. package/templates/.opencode/workflows/status.md +0 -102
  66. package/templates/.opencode/workflows/test.md +0 -146
@@ -1,391 +1,110 @@
1
- # OpenCode Agent Kit
2
-
3
- > **Multi-Agent Orchestration System for OpenCode**
4
- >
5
- > Inspired by Antigravity Kit, adapted for OpenCode's native agent system
6
-
7
- ---
8
-
9
- ## What's Included
10
-
11
- ### 20 Specialist Agents
12
-
13
- | Category | Agents |
14
- |----------|--------|
15
- | **Coordination** | orchestrator, project-planner, explorer-agent |
16
- | **Development** | frontend-specialist, backend-specialist, mobile-developer, game-developer |
17
- | **Data** | database-architect, api-designer |
18
- | **Quality** | test-engineer, qa-automation-engineer, security-auditor, penetration-tester |
19
- | **Operations** | devops-engineer, performance-optimizer, seo-specialist |
20
- | **Product** | product-manager, product-owner, documentation-writer |
21
- | **Maintenance** | debugger, code-archaeologist |
22
-
23
- ### Core Skills
24
-
25
- - `clean-code` - Global coding standards
26
- - `intelligent-routing` - Automatic agent detection
27
- - `parallel-agents` - Multi-agent coordination
28
- - `brainstorming` - Socratic discovery
29
- - `plan-writing` - Task breakdown
30
- - `testing-patterns` - Testing strategies
31
- - `api-patterns` - API design
32
- - `frontend-design` - UI/UX patterns
33
- - `systematic-debugging` - Debug methodology
34
-
35
- ### 11 Workflows
36
-
37
- | Command | Description |
38
- |---------|-------------|
39
- | `/brainstorm` | Explore options, clarify requirements |
40
- | `/create` | Build new features |
41
- | `/debug` | Fix bugs systematically |
42
- | `/deploy` | Deploy to production |
43
- | `/orchestrate` | Multi-agent coordination |
44
- | `/plan` | Create task breakdowns |
45
- | `/preview` | Preview changes |
46
- | `/status` | Check project health |
47
- | `/test` | Run and generate tests |
48
- | `/review` | Code review workflow |
49
- | `/enhance` | Improve existing code |
50
-
51
- ---
52
-
53
- ## Quick Start
54
-
55
- ### 1. Use the Orchestrator
56
-
57
- The orchestrator automatically routes to the right specialist:
58
-
59
- ```
60
- You: Add JWT authentication
61
-
62
- Orchestrator: 🤖 Applying @security-auditor + @backend-specialist...
63
- [Work proceeds with expert-level assistance]
64
- ```
65
-
66
- ### 2. Use Workflows
67
-
68
- ```
69
- /brainstorm user dashboard
70
- /create checkout page
71
- /debug login error
72
- /plan feature breakdown
73
- ```
74
-
75
- ### 3. Direct Agent Invocation
76
-
77
- ```
78
- Use the frontend-specialist to build the dashboard
79
- Use the security-auditor to review authentication
80
- ```
81
-
82
- ---
83
-
84
- ## Directory Structure
85
-
86
- ```
87
- .opencode/
88
- ├── ARCHITECTURE.md # System documentation
89
- ├── README.md # This file
90
- ├── agents/ # 20 Specialist Agents
91
- │ ├── orchestrator.md # Master coordinator
92
- │ ├── project-planner.md # Discovery & planning
93
- │ ├── frontend-specialist.md
94
- │ ├── backend-specialist.md
95
- │ ├── database-architect.md
96
- │ ├── mobile-developer.md
97
- │ ├── devops-engineer.md
98
- │ ├── security-auditor.md
99
- │ ├── penetration-tester.md
100
- │ ├── test-engineer.md
101
- │ ├── debugger.md
102
- │ ├── performance-optimizer.md
103
- │ ├── seo-specialist.md
104
- │ ├── documentation-writer.md
105
- │ ├── product-manager.md
106
- │ ├── product-owner.md
107
- │ ├── qa-automation-engineer.md
108
- │ ├── code-archaeologist.md
109
- │ ├── explorer-agent.md
110
- │ ├── api-designer.md
111
- │ └── game-developer.md
112
- ├── skills/ # Domain Knowledge
113
- │ ├── clean-code/
114
- │ ├── intelligent-routing/
115
- │ ├── parallel-agents/
116
- │ ├── brainstorming/
117
- │ ├── plan-writing/
118
- │ ├── testing-patterns/
119
- │ ├── api-patterns/
120
- │ ├── frontend-design/
121
- │ └── systematic-debugging/
122
- ├── workflows/ # Slash Commands
123
- │ ├── brainstorm.md
124
- │ ├── create.md
125
- │ ├── debug.md
126
- │ ├── deploy.md
127
- │ ├── orchestrate.md
128
- │ ├── plan.md
129
- │ ├── test.md
130
- │ ├── status.md
131
- │ ├── review.md
132
- │ └── enhance.md
133
- └── rules/ # Global Standards
134
- ├── coding-standards.md
135
- └── git-conventions.md
136
- ```
137
-
138
- ---
139
-
140
- ## Intelligent Routing
141
-
142
- The system automatically detects which agent(s) to use:
143
-
144
- ```
145
- User: "Add JWT authentication"
146
- → Detected: Security + Backend
147
- → Agents: security-auditor, backend-specialist
148
-
149
- User: "Fix the dashboard button"
150
- → Detected: Frontend
151
- → Agents: frontend-specialist
152
-
153
- User: "Optimize slow queries"
154
- → Detected: Database + Performance
155
- → Agents: database-architect, performance-optimizer
156
- ```
157
-
158
- ### Keyword Detection
159
-
160
- | Keywords | Agent(s) |
161
- |----------|----------|
162
- | component, react, vue, css | frontend-specialist |
163
- | api, endpoint, server | backend-specialist |
164
- | database, schema, sql | database-architect |
165
- | security, vulnerability, auth | security-auditor |
166
- | test, jest, playwright | test-engineer |
167
- | bug, error, fix | debugger |
168
- | deploy, docker, ci/cd | devops-engineer |
169
- | performance, optimize | performance-optimizer |
170
-
171
- ---
172
-
173
- ## Multi-Agent Orchestration
174
-
175
- ### When to Orchestrate
176
-
177
- - Tasks requiring multiple perspectives
178
- - Full-stack features
179
- - Comprehensive reviews
180
- - Complex implementations
181
-
182
- ### Example
183
-
184
- ```
185
- User: /orchestrate build secure user management
186
-
187
- Orchestrator:
188
- Analyzing task...
189
- Domains: Auth, Frontend, Backend, Database, Security
190
-
191
- Agents selected:
192
- 1. database-architect (schema)
193
- 2. backend-specialist (API)
194
- 3. frontend-specialist (UI)
195
- 4. security-auditor (review)
196
- 5. test-engineer (tests)
197
-
198
- [Execution proceeds...]
199
-
200
- Synthesis Report:
201
- - Files created: 12
202
- - Files modified: 5
203
- - Tests added: 24
204
- - Security issues: 2 (fixed)
205
-
206
- ✅ Complete!
207
- ```
208
-
209
- ---
210
-
211
- ## Agent Reference
212
-
213
- ### Coordination
214
-
215
- | Agent | Use When |
216
- |-------|----------|
217
- | `orchestrator` | Multi-agent coordination |
218
- | `project-planner` | Task breakdown, planning |
219
- | `explorer-agent` | Codebase exploration |
220
-
221
- ### Development
222
-
223
- | Agent | Use When |
224
- |-------|----------|
225
- | `frontend-specialist` | UI components, React/Vue |
226
- | `backend-specialist` | APIs, server logic |
227
- | `mobile-developer` | React Native, Flutter |
228
- | `game-developer` | Unity, Godot |
229
-
230
- ### Data
231
-
232
- | Agent | Use When |
233
- |-------|----------|
234
- | `database-architect` | Schema, migrations |
235
- | `api-designer` | API design, OpenAPI |
236
-
237
- ### Quality
238
-
239
- | Agent | Use When |
240
- |-------|----------|
241
- | `test-engineer` | Writing tests |
242
- | `qa-automation-engineer` | E2E infrastructure |
243
- | `security-auditor` | Security review |
244
- | `penetration-tester` | Security testing |
245
-
246
- ### Operations
247
-
248
- | Agent | Use When |
249
- |-------|----------|
250
- | `devops-engineer` | CI/CD, deployment |
251
- | `performance-optimizer` | Performance tuning |
252
- | `seo-specialist` | SEO optimization |
253
-
254
- ### Product
255
-
256
- | Agent | Use When |
257
- |-------|----------|
258
- | `product-manager` | Requirements |
259
- | `product-owner` | Backlog, MVP |
260
- | `documentation-writer` | Docs (when requested) |
261
-
262
- ### Maintenance
263
-
264
- | Agent | Use When |
265
- |-------|----------|
266
- | `debugger` | Bug fixing |
267
- | `code-archaeologist` | Legacy code |
268
-
269
- ---
270
-
271
- ## Philosophy
272
-
273
- ### The 5 Laws of Elegant Code
274
-
275
- 1. **Guard Clauses First** - Handle unhappy paths at the beginning
276
- 2. **Parsed State at Boundaries** - Validate input at the edge
277
- 3. **Pure Functions** - Same input → same output
278
- 4. **Fail Loud** - Invalid states should throw errors
279
- 5. **Readability First** - Code reads like a sentence
280
-
281
- ### Multi-Agent Principles
282
-
283
- 1. **Specialists over generalists** - Each agent excels in their domain
284
- 2. **Boundaries respected** - Agents don't cross into other domains
285
- 3. **Intelligent routing** - System detects the right agent
286
- 4. **Parallel when possible** - Independent tasks run together
287
- 5. **Synthesis at the end** - Results combined into unified output
288
-
289
- ---
290
-
291
- ## Examples
292
-
293
- ### Example 1: Build Feature
294
-
295
- ```
296
- User: /create user dashboard
297
-
298
- Agent: I'll help you create a user dashboard.
299
-
300
- 🤖 Routing to: frontend-specialist + backend-specialist
301
-
302
- [frontend-specialist]
303
- - Created DashboardPage component
304
- - Created DashboardWidget components
305
- - Added responsive design
306
-
307
- [backend-specialist]
308
- - Created /api/dashboard endpoint
309
- - Added data aggregation
310
- - Implemented caching
311
-
312
- ✅ Dashboard complete!
313
- - Files created: 8
314
- - Files modified: 3
315
- - Tests added: 12
316
- ```
317
-
318
- ### Example 2: Debug Issue
319
-
320
- ```
321
- User: /debug login returns 500 error
322
-
323
- Agent: I'll help you debug this.
324
-
325
- 🤖 Routing to: debugger
326
-
327
- Step 1: Reproduce ✅
328
- Step 2: Gather information ✅
329
- Step 3: Hypothesize ✅
330
- Step 4: Test ✅
331
- Step 5: Fix ✅
332
- Step 6: Verify ✅
333
-
334
- Root cause: Async password hashing without await
335
- Fix: Added await to hash() call
336
-
337
- ✅ Login working!
338
- ```
339
-
340
- ### Example 3: Security Review
341
-
342
- ```
343
- User: /review authentication security
344
-
345
- Agent: I'll review the authentication system.
346
-
347
- 🤖 Routing to: security-auditor
348
-
349
- Review Findings:
350
-
351
- [CRITICAL] Timing attack vulnerability
352
- - Location: auth.service.ts:45
353
- - Issue: String comparison for tokens
354
- - Fix: Use timing-safe comparison
355
-
356
- [HIGH] Missing rate limiting
357
- - Location: /api/auth/login
358
- - Issue: No brute force protection
359
- - Fix: Add rate limiting middleware
360
-
361
- ✅ Review complete!
362
- 2 issues found, fixes provided
363
- ```
364
-
365
- ---
366
-
367
- ## Statistics
368
-
369
- | Metric | Count |
370
- |--------|-------|
371
- | **Agents** | 20 |
372
- | **Skills** | 9+ |
373
- | **Workflows** | 11 |
374
- | **Coverage** | ~90% web/mobile development |
375
-
376
- ---
377
-
378
- ## Contributing
379
-
380
- Found a better pattern? Improved an agent?
381
- → Share it back to improve this template!
382
-
383
- ---
384
-
385
- ## License
386
-
387
- MIT - Use freely in any project.
388
-
389
- ---
390
-
391
- **Built with for multi-agent AI development**
1
+ # OpenCode Agent Kit
2
+
3
+ Spec-driven multi-agent system for OpenCode.
4
+
5
+ ---
6
+
7
+ ## Included
8
+
9
+ - 25 agents
10
+ - 14 skills
11
+ - 7 commands
12
+
13
+ ## Skill Design
14
+
15
+ - Each skill is a compact mental model, not a checklist.
16
+ - The description field names the trigger and the decision domain.
17
+ - Prefer the smallest skill that answers the next choice.
18
+
19
+ ## Context Skills
20
+
21
+ - `context-gathering` maps the current project and active work.
22
+ - `context-archive` stores completed bundles in `.opencode/archive/<feature-slug>/`.
23
+ - `security-gate` decides when a change needs a security gate or redteam phase.
24
+ - `redteam-validation` simulates attacker behavior and proves exploitability.
25
+ - `orchestrator` is optional; default routing stays with `feature-lead` and the owning specialists.
26
+
27
+ ## Commands
28
+
29
+ - Custom slash commands live in `.opencode/commands/`.
30
+ - Each command file uses Markdown frontmatter plus a prompt body, matching OpenCode's command format.
31
+ - The current command set is `brainstorm`, `create`, `debug`, `plan`, `review`, `status`, and `test`.
32
+
33
+ ## Primary Flow
34
+
35
+ 1. @feature-lead receives the request.
36
+ 2. @context-gatherer maps the current project state.
37
+ 3. @project-planner and @system-analyst create the compact bundle: proposal.md, goal.md, spec.md, task.md, and important.md.
38
+ 4. @developer implements the approved spec.
39
+ 5. @test-engineer, @security-auditor, @penetration-tester, and @pr-reviewer close the loop.
40
+ 6. @feature-lead archives the completed bundle.
41
+
42
+ ## Context Bundle
43
+
44
+ - proposal.md: why, value, scope
45
+ - goal.md: target outcome, constraints, default choice
46
+ - spec.md: contract, data flow, edge cases, risks
47
+ - task.md: ordered checklist, dependencies, owners
48
+ - important.md: facts, blockers, links, decisions
49
+
50
+ ## Archive
51
+
52
+ - Completed bundles live in `.opencode/archive/<feature-slug>/`.
53
+ - Keep the archive copy approved, compact, and read-only in practice.
54
+
55
+ ## Agent Groups
56
+
57
+ | Group | Agents |
58
+ |-------|--------|
59
+ | Context | `context-gatherer` |
60
+ | Primary | `feature-lead` |
61
+ | Coordination | `project-planner`, `explorer-agent` |
62
+ | Advanced | `orchestrator` |
63
+ | Product | `product-manager` |
64
+ | Spec | `system-analyst`, `api-designer`, `database-architect` |
65
+ | Build | `developer`, `frontend-specialist`, `backend-specialist`, `mobile-developer`, `game-developer`, `devops-engineer` |
66
+ | Quality | `test-engineer`, `security-auditor`, `penetration-tester`, `performance-optimizer`, `debugger`, `pr-reviewer` |
67
+ | Automation | `qa-automation-engineer` |
68
+ | Output | `documentation-writer`, `seo-specialist` |
69
+ | Maintenance | `code-archaeologist` |
70
+
71
+ ## Command Catalog
72
+
73
+ | Command | Use When |
74
+ |---------|----------|
75
+ | brainstorm | Explore options and clarify requirements before planning. |
76
+ | create | Build new features, components, or project slices with a spec-driven flow. |
77
+ | debug | Diagnose and fix bugs using a root-cause approach. |
78
+ | plan | Create structured task breakdowns and spec artifacts. |
79
+ | review | Review code against the spec, standards, and quality gates. |
80
+ | status | Check project health, docs, and operating readiness. |
81
+ | test | Run and generate tests for the codebase. |
82
+
83
+ ## Skills
84
+
85
+ - context-gathering
86
+ - context-archive
87
+ - clean-code
88
+ - brainstorming
89
+ - plan-writing
90
+ - parallel-agents
91
+ - intelligent-routing
92
+ - frontend-design
93
+ - api-patterns
94
+ - testing-patterns
95
+ - systematic-debugging
96
+ - code-philosophy
97
+ - security-gate
98
+ - redteam-validation
99
+
100
+ ## Routing Examples
101
+
102
+ - Add JWT auth -> @feature-lead -> @system-analyst -> @backend-specialist + @security-auditor + @penetration-tester -> @test-engineer
103
+ - Fix a UI bug -> @feature-lead -> @frontend-specialist -> @test-engineer -> @pr-reviewer
104
+ - Ship a multi-domain feature -> @feature-lead -> @project-planner -> specialist agents -> @pr-reviewer
105
+
106
+ ## Rules
107
+
108
+ - Use the safest default when the downside is small.
109
+ - Ask only when scope, security, or architecture changes materially.
110
+ - Keep every handoff compact and explicit.