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.
- package/README.md +61 -71
- package/bin/cli.js +344 -434
- package/bin/sync-templates.js +45 -0
- package/bin/validate-templates.js +44 -6
- package/package.json +2 -1
- package/templates/.opencode/ARCHITECTURE.md +82 -368
- package/templates/.opencode/README.md +110 -391
- package/templates/.opencode/agents/api-designer.md +45 -312
- package/templates/.opencode/agents/backend-specialist.md +46 -214
- package/templates/.opencode/agents/code-archaeologist.md +45 -260
- package/templates/.opencode/agents/context-gatherer.md +51 -0
- package/templates/.opencode/agents/database-architect.md +45 -212
- package/templates/.opencode/agents/debugger.md +45 -302
- package/templates/.opencode/agents/developer.md +45 -523
- package/templates/.opencode/agents/devops-engineer.md +45 -253
- package/templates/.opencode/agents/documentation-writer.md +45 -247
- package/templates/.opencode/agents/explorer-agent.md +49 -233
- package/templates/.opencode/agents/feature-lead.md +62 -302
- package/templates/.opencode/agents/frontend-specialist.md +46 -186
- package/templates/.opencode/agents/game-developer.md +45 -391
- package/templates/.opencode/agents/mobile-developer.md +45 -264
- package/templates/.opencode/agents/orchestrator.md +48 -463
- package/templates/.opencode/agents/penetration-tester.md +44 -254
- package/templates/.opencode/agents/performance-optimizer.md +45 -292
- package/templates/.opencode/agents/pr-reviewer.md +45 -468
- package/templates/.opencode/agents/product-manager.md +46 -225
- package/templates/.opencode/agents/project-planner.md +45 -248
- package/templates/.opencode/agents/qa-automation-engineer.md +45 -275
- package/templates/.opencode/agents/security-auditor.md +44 -258
- package/templates/.opencode/agents/seo-specialist.md +45 -266
- package/templates/.opencode/agents/system-analyst.md +48 -428
- package/templates/.opencode/agents/test-engineer.md +45 -229
- package/templates/.opencode/archive/README.md +24 -0
- package/templates/.opencode/commands/brainstorm.md +10 -0
- package/templates/.opencode/commands/create.md +11 -0
- package/templates/.opencode/commands/debug.md +10 -0
- package/templates/.opencode/commands/plan.md +9 -0
- package/templates/.opencode/commands/review.md +11 -0
- package/templates/.opencode/commands/status.md +9 -0
- package/templates/.opencode/commands/test.md +10 -0
- package/templates/.opencode/skills/api-patterns/SKILL.md +25 -149
- package/templates/.opencode/skills/brainstorming/SKILL.md +26 -242
- package/templates/.opencode/skills/clean-code/SKILL.md +27 -339
- package/templates/.opencode/skills/code-philosophy/SKILL.md +27 -499
- package/templates/.opencode/skills/context-archive/SKILL.md +47 -0
- package/templates/.opencode/skills/context-gathering/SKILL.md +51 -0
- package/templates/.opencode/skills/frontend-design/SKILL.md +26 -224
- package/templates/.opencode/skills/intelligent-routing/SKILL.md +25 -182
- package/templates/.opencode/skills/parallel-agents/SKILL.md +25 -261
- package/templates/.opencode/skills/plan-writing/SKILL.md +28 -238
- package/templates/.opencode/skills/redteam-validation/SKILL.md +33 -0
- package/templates/.opencode/skills/security-gate/SKILL.md +33 -0
- package/templates/.opencode/skills/systematic-debugging/SKILL.md +25 -197
- package/templates/.opencode/skills/testing-patterns/SKILL.md +25 -238
- package/templates/AGENTS.template.md +300 -426
- package/templates/.opencode/agents/product-owner.md +0 -264
- package/templates/.opencode/workflows/brainstorm.md +0 -110
- package/templates/.opencode/workflows/create.md +0 -108
- package/templates/.opencode/workflows/debug.md +0 -128
- package/templates/.opencode/workflows/deploy.md +0 -160
- package/templates/.opencode/workflows/enhance.md +0 -253
- package/templates/.opencode/workflows/orchestrate.md +0 -130
- package/templates/.opencode/workflows/plan.md +0 -163
- package/templates/.opencode/workflows/review.md +0 -135
- package/templates/.opencode/workflows/status.md +0 -102
- package/templates/.opencode/workflows/test.md +0 -146
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { fileURLToPath } from 'url';
|
|
4
|
+
import { dirname, join, sep } from 'path';
|
|
5
|
+
import { cpSync, existsSync, rmSync } from 'fs';
|
|
6
|
+
|
|
7
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
8
|
+
const __dirname = dirname(__filename);
|
|
9
|
+
const rootDir = join(__dirname, '..');
|
|
10
|
+
const sourceOpencode = join(rootDir, '.opencode');
|
|
11
|
+
const targetTemplates = join(rootDir, 'templates');
|
|
12
|
+
const sourceTemplate = join(rootDir, 'AGENTS.template.md');
|
|
13
|
+
const targetTemplate = join(targetTemplates, 'AGENTS.template.md');
|
|
14
|
+
|
|
15
|
+
function skipNodeModules(path) {
|
|
16
|
+
return !path.includes(`${sep}node_modules${sep}`) && !path.endsWith(`${sep}node_modules`);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
if (!existsSync(sourceOpencode)) {
|
|
20
|
+
console.error('Missing .opencode source directory.');
|
|
21
|
+
process.exit(1);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
if (!existsSync(targetTemplates)) {
|
|
25
|
+
console.error('Missing templates directory.');
|
|
26
|
+
process.exit(1);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const targetOpencode = join(targetTemplates, '.opencode');
|
|
30
|
+
|
|
31
|
+
if (existsSync(targetOpencode)) {
|
|
32
|
+
rmSync(targetOpencode, { recursive: true, force: true });
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
cpSync(sourceOpencode, join(targetTemplates, '.opencode'), {
|
|
36
|
+
recursive: true,
|
|
37
|
+
overwrite: true,
|
|
38
|
+
filter: skipNodeModules,
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
if (existsSync(sourceTemplate)) {
|
|
42
|
+
cpSync(sourceTemplate, targetTemplate, { force: true });
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
console.log('Synced .opencode and AGENTS.template.md to templates/');
|
|
@@ -10,21 +10,59 @@ const templatesDir = join(__dirname, '..', 'templates');
|
|
|
10
10
|
|
|
11
11
|
// Required files for templates
|
|
12
12
|
const requiredFiles = [
|
|
13
|
+
'AGENTS.template.md',
|
|
13
14
|
'.opencode/README.md',
|
|
14
15
|
'.opencode/ARCHITECTURE.md',
|
|
16
|
+
'.opencode/archive/README.md',
|
|
15
17
|
'.opencode/config.template.json',
|
|
16
18
|
'.opencode/package.json',
|
|
17
|
-
'.opencode/
|
|
18
|
-
'.opencode/agents/
|
|
19
|
+
'.opencode/memory/project.md',
|
|
20
|
+
'.opencode/agents/context-gatherer.md',
|
|
21
|
+
'.opencode/agents/api-designer.md',
|
|
22
|
+
'.opencode/agents/backend-specialist.md',
|
|
23
|
+
'.opencode/agents/code-archaeologist.md',
|
|
24
|
+
'.opencode/agents/database-architect.md',
|
|
25
|
+
'.opencode/agents/debugger.md',
|
|
19
26
|
'.opencode/agents/developer.md',
|
|
20
|
-
'.opencode/agents/
|
|
27
|
+
'.opencode/agents/devops-engineer.md',
|
|
28
|
+
'.opencode/agents/documentation-writer.md',
|
|
29
|
+
'.opencode/agents/explorer-agent.md',
|
|
30
|
+
'.opencode/agents/feature-lead.md',
|
|
31
|
+
'.opencode/agents/frontend-specialist.md',
|
|
32
|
+
'.opencode/agents/game-developer.md',
|
|
33
|
+
'.opencode/agents/mobile-developer.md',
|
|
34
|
+
'.opencode/agents/orchestrator.md',
|
|
35
|
+
'.opencode/agents/penetration-tester.md',
|
|
36
|
+
'.opencode/agents/performance-optimizer.md',
|
|
21
37
|
'.opencode/agents/pr-reviewer.md',
|
|
38
|
+
'.opencode/agents/product-manager.md',
|
|
39
|
+
'.opencode/agents/project-planner.md',
|
|
40
|
+
'.opencode/agents/qa-automation-engineer.md',
|
|
41
|
+
'.opencode/agents/security-auditor.md',
|
|
42
|
+
'.opencode/agents/seo-specialist.md',
|
|
43
|
+
'.opencode/agents/system-analyst.md',
|
|
44
|
+
'.opencode/agents/test-engineer.md',
|
|
45
|
+
'.opencode/commands/brainstorm.md',
|
|
46
|
+
'.opencode/commands/create.md',
|
|
47
|
+
'.opencode/commands/debug.md',
|
|
48
|
+
'.opencode/commands/plan.md',
|
|
49
|
+
'.opencode/commands/review.md',
|
|
50
|
+
'.opencode/commands/status.md',
|
|
51
|
+
'.opencode/commands/test.md',
|
|
52
|
+
'.opencode/skills/api-patterns/SKILL.md',
|
|
53
|
+
'.opencode/skills/brainstorming/SKILL.md',
|
|
22
54
|
'.opencode/skills/clean-code/SKILL.md',
|
|
55
|
+
'.opencode/skills/code-philosophy/SKILL.md',
|
|
56
|
+
'.opencode/skills/context-archive/SKILL.md',
|
|
57
|
+
'.opencode/skills/context-gathering/SKILL.md',
|
|
58
|
+
'.opencode/skills/frontend-design/SKILL.md',
|
|
59
|
+
'.opencode/skills/intelligent-routing/SKILL.md',
|
|
60
|
+
'.opencode/skills/parallel-agents/SKILL.md',
|
|
23
61
|
'.opencode/skills/plan-writing/SKILL.md',
|
|
62
|
+
'.opencode/skills/redteam-validation/SKILL.md',
|
|
63
|
+
'.opencode/skills/security-gate/SKILL.md',
|
|
64
|
+
'.opencode/skills/systematic-debugging/SKILL.md',
|
|
24
65
|
'.opencode/skills/testing-patterns/SKILL.md',
|
|
25
|
-
'.opencode/workflows/create.md',
|
|
26
|
-
'.opencode/workflows/plan.md',
|
|
27
|
-
'.opencode/workflows/review.md',
|
|
28
66
|
'.opencode/rules/coding-standards.md',
|
|
29
67
|
'.opencode/rules/git-conventions.md',
|
|
30
68
|
];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-agile-agent",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "AI Agile Spec-Driven Development - Install .opencode agile agent system into any project",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
},
|
|
32
32
|
"scripts": {
|
|
33
33
|
"test": "node bin/cli.js --help",
|
|
34
|
+
"sync:templates": "node bin/sync-templates.js",
|
|
34
35
|
"prepublishOnly": "node bin/validate-templates.js"
|
|
35
36
|
},
|
|
36
37
|
"dependencies": {
|
|
@@ -1,368 +1,82 @@
|
|
|
1
|
-
# OpenCode Agent Kit - Architecture
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
---
|
|
85
|
-
|
|
86
|
-
## Agents (20)
|
|
87
|
-
|
|
88
|
-
Specialist AI personas for different domains.
|
|
89
|
-
|
|
90
|
-
| Agent | Focus | Skills Used |
|
|
91
|
-
|-------|-------|-------------|
|
|
92
|
-
| `orchestrator` | Multi-agent coordination | parallel-agents, behavioral-modes |
|
|
93
|
-
| `project-planner` | Discovery, task planning | brainstorming, plan-writing, architecture |
|
|
94
|
-
| `frontend-specialist` | Web UI/UX | frontend-design, react-patterns, tailwind |
|
|
95
|
-
| `backend-specialist` | API, business logic | api-patterns, nodejs-patterns, database-design |
|
|
96
|
-
| `database-architect` | Schema, SQL | database-design, prisma-expert |
|
|
97
|
-
| `mobile-developer` | iOS, Android, RN | mobile-design |
|
|
98
|
-
| `devops-engineer` | CI/CD, Docker | deployment-procedures, docker-expert |
|
|
99
|
-
| `security-auditor` | Security compliance | vulnerability-scanner, security-rules |
|
|
100
|
-
| `penetration-tester` | Offensive security | red-team-tactics |
|
|
101
|
-
| `test-engineer` | Testing strategies | testing-patterns, tdd-workflow, e2e-testing |
|
|
102
|
-
| `debugger` | Root cause analysis | systematic-debugging |
|
|
103
|
-
| `performance-optimizer` | Speed, Web Vitals | performance-profiling |
|
|
104
|
-
| `seo-specialist` | Ranking, visibility | seo-fundamentals |
|
|
105
|
-
| `documentation-writer` | Manuals, docs | documentation-templates |
|
|
106
|
-
| `product-manager` | Requirements, user stories | plan-writing, brainstorming |
|
|
107
|
-
| `product-owner` | Strategy, backlog, MVP | plan-writing, brainstorming |
|
|
108
|
-
| `qa-automation-engineer` | E2E testing, CI pipelines | e2e-testing, testing-patterns |
|
|
109
|
-
| `code-archaeologist` | Legacy code, refactoring | clean-code, code-review |
|
|
110
|
-
| `explorer-agent` | Codebase analysis | - |
|
|
111
|
-
| `api-designer` | API architecture | api-patterns, openapi |
|
|
112
|
-
| `game-developer` | Game logic, mechanics | game-development |
|
|
113
|
-
|
|
114
|
-
---
|
|
115
|
-
|
|
116
|
-
## Skills (37)
|
|
117
|
-
|
|
118
|
-
Modular knowledge domains that agents load on-demand.
|
|
119
|
-
|
|
120
|
-
### Frontend & UI
|
|
121
|
-
|
|
122
|
-
| Skill | Description |
|
|
123
|
-
|-------|-------------|
|
|
124
|
-
| `react-patterns` | React & Next.js best practices |
|
|
125
|
-
| `vue-patterns` | Vue 3 composition API patterns |
|
|
126
|
-
| `tailwind-patterns` | Tailwind CSS v4 utilities |
|
|
127
|
-
| `frontend-design` | UI/UX patterns, design systems |
|
|
128
|
-
| `web-design-guidelines` | Web UI audit - accessibility, UX, performance |
|
|
129
|
-
| `responsive-design` | Mobile-first responsive patterns |
|
|
130
|
-
|
|
131
|
-
### Backend & API
|
|
132
|
-
|
|
133
|
-
| Skill | Description |
|
|
134
|
-
|-------|-------------|
|
|
135
|
-
| `api-patterns` | REST, GraphQL, tRPC patterns |
|
|
136
|
-
| `nodejs-patterns` | Node.js async, modules |
|
|
137
|
-
| `python-patterns` | Python standards, FastAPI |
|
|
138
|
-
| `nestjs-expert` | NestJS modules, DI, decorators |
|
|
139
|
-
|
|
140
|
-
### Database
|
|
141
|
-
|
|
142
|
-
| Skill | Description |
|
|
143
|
-
|-------|-------------|
|
|
144
|
-
| `database-design` | Schema design, optimization |
|
|
145
|
-
| `prisma-expert` | Prisma ORM, migrations |
|
|
146
|
-
| `sql-optimization` | Query optimization, indexing |
|
|
147
|
-
|
|
148
|
-
### TypeScript/JavaScript
|
|
149
|
-
|
|
150
|
-
| Skill | Description |
|
|
151
|
-
|-------|-------------|
|
|
152
|
-
| `typescript-expert` | Type-level programming, performance |
|
|
153
|
-
| `javascript-patterns` | Modern JS patterns |
|
|
154
|
-
|
|
155
|
-
### Cloud & Infrastructure
|
|
156
|
-
|
|
157
|
-
| Skill | Description |
|
|
158
|
-
|-------|-------------|
|
|
159
|
-
| `docker-expert` | Containerization, Compose |
|
|
160
|
-
| `deployment-procedures` | CI/CD, deploy workflows |
|
|
161
|
-
| `server-management` | Infrastructure management |
|
|
162
|
-
| `kubernetes-patterns` | K8s deployment patterns |
|
|
163
|
-
|
|
164
|
-
### Testing & Quality
|
|
165
|
-
|
|
166
|
-
| Skill | Description |
|
|
167
|
-
|-------|-------------|
|
|
168
|
-
| `testing-patterns` | Jest, Vitest, strategies |
|
|
169
|
-
| `e2e-testing` | Playwright, Cypress |
|
|
170
|
-
| `tdd-workflow` | Test-driven development |
|
|
171
|
-
| `code-review-checklist` | Code review standards |
|
|
172
|
-
| `lint-and-validate` | Linting, validation |
|
|
173
|
-
|
|
174
|
-
### Security
|
|
175
|
-
|
|
176
|
-
| Skill | Description |
|
|
177
|
-
|-------|-------------|
|
|
178
|
-
| `vulnerability-scanner` | Security auditing, OWASP |
|
|
179
|
-
| `red-team-tactics` | Offensive security |
|
|
180
|
-
| `security-rules` | Security best practices |
|
|
181
|
-
|
|
182
|
-
### Architecture & Planning
|
|
183
|
-
|
|
184
|
-
| Skill | Description |
|
|
185
|
-
|-------|-------------|
|
|
186
|
-
| `app-builder` | Full-stack app scaffolding |
|
|
187
|
-
| `architecture` | System design patterns |
|
|
188
|
-
| `plan-writing` | Task planning, breakdown |
|
|
189
|
-
| `brainstorming` | Socratic questioning |
|
|
190
|
-
|
|
191
|
-
### Other
|
|
192
|
-
|
|
193
|
-
| Skill | Description |
|
|
194
|
-
|-------|-------------|
|
|
195
|
-
| `clean-code` | Coding standards (Global) |
|
|
196
|
-
| `behavioral-modes` | Agent personas |
|
|
197
|
-
| `parallel-agents` | Multi-agent patterns |
|
|
198
|
-
| `intelligent-routing` | Automatic agent selection |
|
|
199
|
-
| `documentation-templates` | Doc formats |
|
|
200
|
-
| `i18n-localization` | Internationalization |
|
|
201
|
-
| `performance-profiling` | Web Vitals, optimization |
|
|
202
|
-
| `systematic-debugging` | Troubleshooting |
|
|
203
|
-
| `seo-fundamentals` | SEO, E-E-A-T, Core Web Vitals |
|
|
204
|
-
| `mobile-design` | Mobile UI/UX patterns |
|
|
205
|
-
| `game-development` | Game logic, mechanics |
|
|
206
|
-
| `bash-linux` | Linux commands, scripting |
|
|
207
|
-
| `powershell-windows` | Windows PowerShell |
|
|
208
|
-
| `git-conventions` | Git workflow patterns |
|
|
209
|
-
|
|
210
|
-
---
|
|
211
|
-
|
|
212
|
-
## Workflows (11)
|
|
213
|
-
|
|
214
|
-
Slash command procedures. Invoke with `/command`.
|
|
215
|
-
|
|
216
|
-
| Command | Description |
|
|
217
|
-
|---------|-------------|
|
|
218
|
-
| `/brainstorm` | Socratic discovery |
|
|
219
|
-
| `/create` | Create new features |
|
|
220
|
-
| `/debug` | Debug issues |
|
|
221
|
-
| `/deploy` | Deploy application |
|
|
222
|
-
| `/enhance` | Improve existing code |
|
|
223
|
-
| `/orchestrate` | Multi-agent coordination |
|
|
224
|
-
| `/plan` | Task breakdown |
|
|
225
|
-
| `/preview` | Preview changes |
|
|
226
|
-
| `/status` | Check project status |
|
|
227
|
-
| `/test` | Run tests |
|
|
228
|
-
| `/review` | Code review workflow |
|
|
229
|
-
|
|
230
|
-
---
|
|
231
|
-
|
|
232
|
-
## Intelligent Agent Routing
|
|
233
|
-
|
|
234
|
-
The system automatically detects and applies the right specialist(s):
|
|
235
|
-
|
|
236
|
-
```
|
|
237
|
-
User: "Add JWT authentication"
|
|
238
|
-
AI: 🤖 Applying @security-auditor + @backend-specialist...
|
|
239
|
-
|
|
240
|
-
User: "Fix the dark mode button"
|
|
241
|
-
AI: 🤖 Using @frontend-specialist...
|
|
242
|
-
|
|
243
|
-
User: "Login returns 500 error"
|
|
244
|
-
AI: 🤖 Using @debugger for systematic analysis...
|
|
245
|
-
```
|
|
246
|
-
|
|
247
|
-
### How It Works:
|
|
248
|
-
|
|
249
|
-
1. Analyzes request silently
|
|
250
|
-
2. Detects domain(s) automatically (frontend, backend, security, etc.)
|
|
251
|
-
3. Selects the best specialist(s)
|
|
252
|
-
4. Informs you which expertise is being applied
|
|
253
|
-
5. You get specialist-level responses without needing to know the system architecture
|
|
254
|
-
|
|
255
|
-
---
|
|
256
|
-
|
|
257
|
-
## Request Flow
|
|
258
|
-
|
|
259
|
-
```
|
|
260
|
-
┌─────────────────────────────────────────────────────────────────┐
|
|
261
|
-
│ USER REQUEST │
|
|
262
|
-
└────────────────────────────┬────────────────────────────────────┘
|
|
263
|
-
│
|
|
264
|
-
▼
|
|
265
|
-
┌─────────────────────────────────────────────────────────────────┐
|
|
266
|
-
│ REQUEST CLASSIFICATION │
|
|
267
|
-
│ • Analyze intent (build, debug, test, deploy, etc.) │
|
|
268
|
-
│ • Identify domain (frontend, backend, mobile, etc.) │
|
|
269
|
-
│ • Detect complexity (simple, medium, complex) │
|
|
270
|
-
└────────────────────────────┬────────────────────────────────────┘
|
|
271
|
-
│
|
|
272
|
-
┌────────────┴────────────┐
|
|
273
|
-
│ │
|
|
274
|
-
▼ ▼
|
|
275
|
-
┌───────────────────┐ ┌──────────────────┐
|
|
276
|
-
│ WORKFLOW COMMAND │ │ DIRECT AGENT │
|
|
277
|
-
│ (Slash Command) │ │ ASSIGNMENT │
|
|
278
|
-
└─────────┬─────────┘ └────────┬─────────┘
|
|
279
|
-
│ │
|
|
280
|
-
└────────────┬────────────┘
|
|
281
|
-
│
|
|
282
|
-
▼
|
|
283
|
-
┌─────────────────────────────────────┐
|
|
284
|
-
│ AGENT INITIALIZATION │
|
|
285
|
-
│ • Load agent persona/role │
|
|
286
|
-
│ • Load required skills │
|
|
287
|
-
│ • Set behavioral mode │
|
|
288
|
-
└──────────────┬──────────────────────┘
|
|
289
|
-
│
|
|
290
|
-
▼
|
|
291
|
-
┌─────────────────────────────────────┐
|
|
292
|
-
│ TASK EXECUTION │
|
|
293
|
-
│ • Analyze codebase │
|
|
294
|
-
│ • Apply best practices │
|
|
295
|
-
│ • Generate/modify code │
|
|
296
|
-
│ • Run validations │
|
|
297
|
-
└──────────────┬──────────────────────┘
|
|
298
|
-
│
|
|
299
|
-
▼
|
|
300
|
-
┌─────────────────────────────────────┐
|
|
301
|
-
│ RESULT DELIVERY │
|
|
302
|
-
│ • Present changes to user │
|
|
303
|
-
│ • Provide explanations │
|
|
304
|
-
│ • Suggest next steps │
|
|
305
|
-
└─────────────────────────────────────┘
|
|
306
|
-
```
|
|
307
|
-
|
|
308
|
-
---
|
|
309
|
-
|
|
310
|
-
## Statistics
|
|
311
|
-
|
|
312
|
-
| Metric | Value |
|
|
313
|
-
|--------|-------|
|
|
314
|
-
| **Total Agents** | 20 |
|
|
315
|
-
| **Total Skills** | 37 |
|
|
316
|
-
| **Total Workflows** | 11 |
|
|
317
|
-
| **Coverage** | ~90% web/mobile development |
|
|
318
|
-
|
|
319
|
-
---
|
|
320
|
-
|
|
321
|
-
## Quick Reference
|
|
322
|
-
|
|
323
|
-
| Need | Agent | Skills |
|
|
324
|
-
|------|-------|--------|
|
|
325
|
-
| Web App | `frontend-specialist` | react-patterns, frontend-design |
|
|
326
|
-
| API | `backend-specialist` | api-patterns, nodejs-patterns |
|
|
327
|
-
| Mobile | `mobile-developer` | mobile-design |
|
|
328
|
-
| Database | `database-architect` | database-design, prisma-expert |
|
|
329
|
-
| Security | `security-auditor` | vulnerability-scanner |
|
|
330
|
-
| Testing | `test-engineer` | testing-patterns, e2e-testing |
|
|
331
|
-
| Debug | `debugger` | systematic-debugging |
|
|
332
|
-
| Plan | `project-planner` | brainstorming, plan-writing |
|
|
333
|
-
| Multi-agent | `orchestrator` | parallel-agents, behavioral-modes |
|
|
334
|
-
|
|
335
|
-
---
|
|
336
|
-
|
|
337
|
-
## Getting Started
|
|
338
|
-
|
|
339
|
-
### Quick Start
|
|
340
|
-
|
|
341
|
-
1. The orchestrator agent is your main entry point
|
|
342
|
-
2. Just describe what you need in natural language
|
|
343
|
-
3. The system will route to the right specialist(s)
|
|
344
|
-
4. Receive expert-level assistance automatically
|
|
345
|
-
|
|
346
|
-
### Manual Agent Selection
|
|
347
|
-
|
|
348
|
-
You can also explicitly invoke agents:
|
|
349
|
-
|
|
350
|
-
```
|
|
351
|
-
Use the security-auditor agent to review authentication
|
|
352
|
-
Use the frontend-specialist to build the dashboard
|
|
353
|
-
Use the test-engineer to add test coverage
|
|
354
|
-
```
|
|
355
|
-
|
|
356
|
-
### Using Workflows
|
|
357
|
-
|
|
358
|
-
```
|
|
359
|
-
/brainstorm authentication system
|
|
360
|
-
/create landing page with hero section
|
|
361
|
-
/debug why login fails
|
|
362
|
-
/plan feature breakdown
|
|
363
|
-
```
|
|
364
|
-
|
|
365
|
-
---
|
|
366
|
-
|
|
367
|
-
**Last Updated**: 2026-03-13
|
|
368
|
-
**Version**: 1.0.0
|
|
1
|
+
# OpenCode Agent Kit - Architecture
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
- 26 agents
|
|
6
|
+
- 25 agents
|
|
7
|
+
- 14 skills
|
|
8
|
+
- 7 commands
|
|
9
|
+
- Primary agent: feature-lead
|
|
10
|
+
- All other agents are subagents and communicate through @ handoffs
|
|
11
|
+
|
|
12
|
+
## Request Lifecycle
|
|
13
|
+
|
|
14
|
+
1. User request lands with @feature-lead.
|
|
15
|
+
2. @context-gatherer maps the current project and active work.
|
|
16
|
+
3. Discovery and planning create the compact context bundle.
|
|
17
|
+
4. Build agents implement the approved spec.
|
|
18
|
+
5. Quality agents review, test, and harden the change.
|
|
19
|
+
6. Security-sensitive changes pass through @security-auditor and @penetration-tester before approval.
|
|
20
|
+
7. Any failure loops back to the owning agent.
|
|
21
|
+
8. Approved feature bundles are archived under .opencode/archive/<feature-slug>/.
|
|
22
|
+
9. feature-lead synthesizes the final outcome.
|
|
23
|
+
|
|
24
|
+
## Context Bundle
|
|
25
|
+
|
|
26
|
+
- proposal.md: why, value, scope
|
|
27
|
+
- goal.md: target outcome, constraints, default choice
|
|
28
|
+
- spec.md: contract, data flow, edge cases, risks
|
|
29
|
+
- task.md: ordered checklist, dependencies, owners
|
|
30
|
+
- important.md: facts, blockers, links, decisions
|
|
31
|
+
|
|
32
|
+
## Archive
|
|
33
|
+
|
|
34
|
+
- Archive completed bundles in `.opencode/archive/<feature-slug>/`.
|
|
35
|
+
- Keep archive entries compact and aligned with the approved bundle.
|
|
36
|
+
|
|
37
|
+
## Skill Design
|
|
38
|
+
|
|
39
|
+
- Skills are small, philosophy-first mental models.
|
|
40
|
+
- Skill descriptions should state the trigger and the decision domain.
|
|
41
|
+
- Prefer the smallest skill that changes the next decision.
|
|
42
|
+
|
|
43
|
+
## Role Map
|
|
44
|
+
|
|
45
|
+
| Stage | Agents | Responsibility |
|
|
46
|
+
|-------|--------|----------------|
|
|
47
|
+
| Primary | feature-lead | Owns the request, tradeoffs, and the final gate loop |
|
|
48
|
+
| Context | context-gatherer | Map the current project state and archive-ready history |
|
|
49
|
+
| Coordination | project-planner, explorer-agent | Split, map, and sequence the work |
|
|
50
|
+
| Advanced | orchestrator | Optional multi-domain synthesis pass |
|
|
51
|
+
| Product | product-manager | Define problem, value, priorities, and release scope |
|
|
52
|
+
| Spec | system-analyst, api-designer, database-architect | Create the compact context bundle and contracts |
|
|
53
|
+
| Build | developer, frontend-specialist, backend-specialist, mobile-developer, game-developer, devops-engineer | Implement the approved spec |
|
|
54
|
+
| Quality | test-engineer, security-auditor, penetration-tester, performance-optimizer, debugger, pr-reviewer | Verify, review, and harden |
|
|
55
|
+
| Automation | qa-automation-engineer | Build and maintain test harnesses and repeatable validation |
|
|
56
|
+
| Output | documentation-writer, seo-specialist | Explain and publish clearly |
|
|
57
|
+
| Maintenance | code-archaeologist | Clean and simplify legacy code |
|
|
58
|
+
|
|
59
|
+
## Command Map
|
|
60
|
+
|
|
61
|
+
| Command | Entry | Exit |
|
|
62
|
+
|---------|-------|------|
|
|
63
|
+
| brainstorm | @feature-lead receives the request. | One recommended path is clear. |
|
|
64
|
+
| create | @feature-lead receives the feature request. | Implementation matches the spec. |
|
|
65
|
+
| debug | @feature-lead scopes the bug and the impact. | The original failure no longer reproduces. |
|
|
66
|
+
| plan | @feature-lead receives the request. | The planning bundle is short and complete. |
|
|
67
|
+
| review | @feature-lead hands the change to @pr-reviewer. | Either APPROVED or CHANGES REQUESTED is clear. |
|
|
68
|
+
| status | @feature-lead asks for the current project state. | The current health is easy to understand. |
|
|
69
|
+
| test | @feature-lead defines the test scope. | The important paths are covered. |
|
|
70
|
+
|
|
71
|
+
## Gate Rules
|
|
72
|
+
|
|
73
|
+
- Do not hand off to build until the spec bundle is clear.
|
|
74
|
+
- Do not hand off to review until implementation is complete.
|
|
75
|
+
- Do not ship until the review gate is clean.
|
|
76
|
+
- Loop back to the owning agent when a gate fails.
|
|
77
|
+
|
|
78
|
+
## Decision Rule
|
|
79
|
+
|
|
80
|
+
- Prefer defaults when the tradeoff is low risk.
|
|
81
|
+
- Escalate to the user only when scope, security, or architecture changes materially.
|
|
82
|
+
- Keep all context compact enough for a subagent to finish without asking again.
|