opencode-agile-agent 1.0.4 → 1.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.
Files changed (49) hide show
  1. package/README.md +6 -5
  2. package/bin/cli.js +13 -241
  3. package/bin/sync-templates.js +1 -7
  4. package/bin/validate-templates.js +0 -2
  5. package/package.json +1 -1
  6. package/templates/.opencode/ARCHITECTURE.md +10 -4
  7. package/templates/.opencode/README.md +17 -7
  8. package/templates/.opencode/agents/api-designer.md +52 -43
  9. package/templates/.opencode/agents/backend-specialist.md +53 -44
  10. package/templates/.opencode/agents/code-archaeologist.md +52 -43
  11. package/templates/.opencode/agents/context-gatherer.md +19 -8
  12. package/templates/.opencode/agents/database-architect.md +52 -43
  13. package/templates/.opencode/agents/debugger.md +52 -43
  14. package/templates/.opencode/agents/developer.md +56 -43
  15. package/templates/.opencode/agents/devops-engineer.md +51 -43
  16. package/templates/.opencode/agents/documentation-writer.md +50 -43
  17. package/templates/.opencode/agents/explorer-agent.md +17 -11
  18. package/templates/.opencode/agents/feature-lead.md +42 -30
  19. package/templates/.opencode/agents/feature-loop.md +100 -0
  20. package/templates/.opencode/agents/frontend-specialist.md +52 -44
  21. package/templates/.opencode/agents/game-developer.md +51 -43
  22. package/templates/.opencode/agents/mobile-developer.md +52 -43
  23. package/templates/.opencode/agents/orchestrator.md +46 -34
  24. package/templates/.opencode/agents/penetration-tester.md +46 -39
  25. package/templates/.opencode/agents/performance-optimizer.md +52 -43
  26. package/templates/.opencode/agents/pr-reviewer.md +61 -43
  27. package/templates/.opencode/agents/product-manager.md +44 -35
  28. package/templates/.opencode/agents/project-planner.md +52 -43
  29. package/templates/.opencode/agents/qa-automation-engineer.md +44 -35
  30. package/templates/.opencode/agents/security-auditor.md +43 -36
  31. package/templates/.opencode/agents/seo-specialist.md +52 -43
  32. package/templates/.opencode/agents/system-analyst.md +46 -37
  33. package/templates/.opencode/agents/test-engineer.md +46 -39
  34. package/templates/.opencode/commands/brainstorm.md +1 -1
  35. package/templates/.opencode/commands/create.md +1 -1
  36. package/templates/.opencode/commands/debug.md +1 -1
  37. package/templates/.opencode/commands/plan.md +1 -1
  38. package/templates/.opencode/commands/progress.md +20 -0
  39. package/templates/.opencode/commands/reframe.md +17 -0
  40. package/templates/.opencode/commands/rubber-duck.md +14 -0
  41. package/templates/.opencode/config.template.json +61 -17
  42. package/templates/.opencode/package-lock.json +115 -0
  43. package/templates/.opencode/skills/plan-writing/SKILL.md +5 -5
  44. package/templates/.opencode/templates/brief.template.md +20 -0
  45. package/templates/.opencode/templates/notes.template.md +13 -0
  46. package/templates/.opencode/templates/spec.template.md +17 -0
  47. package/templates/.opencode/templates/status.template.yaml +14 -0
  48. package/templates/.opencode/templates/task.template.md +13 -0
  49. package/templates/AGENTS.template.md +0 -300
@@ -0,0 +1,115 @@
1
+ {
2
+ "name": ".opencode",
3
+ "lockfileVersion": 3,
4
+ "requires": true,
5
+ "packages": {
6
+ "": {
7
+ "dependencies": {
8
+ "@opencode-ai/plugin": "1.4.3"
9
+ }
10
+ },
11
+ "node_modules/@opencode-ai/plugin": {
12
+ "version": "1.4.3",
13
+ "resolved": "https://registry.npmjs.org/@opencode-ai/plugin/-/plugin-1.4.3.tgz",
14
+ "integrity": "sha512-Ob/3tVSIeuMRJBr2O23RtrnC5djRe01Lglx+TwGEmjrH9yDBJ2tftegYLnNEjRoMuzITgq9LD8168p4pzv+U/A==",
15
+ "license": "MIT",
16
+ "dependencies": {
17
+ "@opencode-ai/sdk": "1.4.3",
18
+ "zod": "4.1.8"
19
+ },
20
+ "peerDependencies": {
21
+ "@opentui/core": ">=0.1.97",
22
+ "@opentui/solid": ">=0.1.97"
23
+ },
24
+ "peerDependenciesMeta": {
25
+ "@opentui/core": {
26
+ "optional": true
27
+ },
28
+ "@opentui/solid": {
29
+ "optional": true
30
+ }
31
+ }
32
+ },
33
+ "node_modules/@opencode-ai/sdk": {
34
+ "version": "1.4.3",
35
+ "resolved": "https://registry.npmjs.org/@opencode-ai/sdk/-/sdk-1.4.3.tgz",
36
+ "integrity": "sha512-X0CAVbwoGAjTY2iecpWkx2B+GAa2jSaQKYpJ+xILopeF/OGKZUN15mjqci+L7cEuwLHV5wk3x2TStUOVCa5p0A==",
37
+ "license": "MIT",
38
+ "dependencies": {
39
+ "cross-spawn": "7.0.6"
40
+ }
41
+ },
42
+ "node_modules/cross-spawn": {
43
+ "version": "7.0.6",
44
+ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
45
+ "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
46
+ "license": "MIT",
47
+ "dependencies": {
48
+ "path-key": "^3.1.0",
49
+ "shebang-command": "^2.0.0",
50
+ "which": "^2.0.1"
51
+ },
52
+ "engines": {
53
+ "node": ">= 8"
54
+ }
55
+ },
56
+ "node_modules/isexe": {
57
+ "version": "2.0.0",
58
+ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
59
+ "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",
60
+ "license": "ISC"
61
+ },
62
+ "node_modules/path-key": {
63
+ "version": "3.1.1",
64
+ "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
65
+ "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
66
+ "license": "MIT",
67
+ "engines": {
68
+ "node": ">=8"
69
+ }
70
+ },
71
+ "node_modules/shebang-command": {
72
+ "version": "2.0.0",
73
+ "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
74
+ "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
75
+ "license": "MIT",
76
+ "dependencies": {
77
+ "shebang-regex": "^3.0.0"
78
+ },
79
+ "engines": {
80
+ "node": ">=8"
81
+ }
82
+ },
83
+ "node_modules/shebang-regex": {
84
+ "version": "3.0.0",
85
+ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
86
+ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
87
+ "license": "MIT",
88
+ "engines": {
89
+ "node": ">=8"
90
+ }
91
+ },
92
+ "node_modules/which": {
93
+ "version": "2.0.2",
94
+ "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
95
+ "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
96
+ "license": "ISC",
97
+ "dependencies": {
98
+ "isexe": "^2.0.0"
99
+ },
100
+ "bin": {
101
+ "node-which": "bin/node-which"
102
+ },
103
+ "engines": {
104
+ "node": ">= 8"
105
+ }
106
+ },
107
+ "node_modules/zod": {
108
+ "version": "4.1.8",
109
+ "license": "MIT",
110
+ "funding": {
111
+ "url": "https://github.com/sponsors/colinhacks"
112
+ }
113
+ }
114
+ }
115
+ }
@@ -20,12 +20,12 @@ Planning is compression: make the next agent's job obvious without wasting conte
20
20
  - Capture only the facts that matter for execution.
21
21
 
22
22
  ## Default Moves
23
- - Use the compact bundle: proposal.md, goal.md, spec.md, task.md, important.md.
24
- - proposal = why, value, scope.
25
- - goal = outcome, constraints, default choice.
26
- - spec = contracts, flow, edge cases, risks.
23
+ - Use the compact bundle: brief.md, spec.md, task.md, notes.md, status.yaml.
24
+ - brief = why, outcome, scope, constraints, default choice.
25
+ - spec = contract, data flow, edge cases, risks, acceptance criteria.
27
26
  - task = ordered checklist and dependencies.
28
- - important = facts, owners, links, blockers.
27
+ - notes = facts, decisions, blockers, links.
28
+ - status.yaml = live execution state.
29
29
 
30
30
  ## Anti-Patterns
31
31
  - Monolithic tasks, long prose, hidden assumptions, single-point estimates, and unresolved questions with no owner.
@@ -0,0 +1,20 @@
1
+ # Brief
2
+
3
+ ## Why
4
+ -
5
+
6
+ ## Outcome
7
+ -
8
+
9
+ ## Scope
10
+ - In:
11
+ - Out:
12
+
13
+ ## Constraints
14
+ -
15
+
16
+ ## Default Choice
17
+ -
18
+
19
+ ## Non-Goals
20
+ -
@@ -0,0 +1,13 @@
1
+ # Notes
2
+
3
+ ## Facts
4
+ -
5
+
6
+ ## Decisions
7
+ -
8
+
9
+ ## Blockers
10
+ -
11
+
12
+ ## Links
13
+ -
@@ -0,0 +1,17 @@
1
+ # Spec
2
+
3
+ ## Contract
4
+ - Inputs:
5
+ - Outputs:
6
+
7
+ ## Data Flow
8
+ -
9
+
10
+ ## Edge Cases
11
+ -
12
+
13
+ ## Risks
14
+ -
15
+
16
+ ## Acceptance Criteria
17
+ -
@@ -0,0 +1,14 @@
1
+ feature: <feature-slug>
2
+ owner: <agent-or-person>
3
+ handoff_to: <next-agent-or-person>
4
+ stage: planning
5
+ status: active # allowed: active | blocked | review | done
6
+ review_outcome: <pending-or-result>
7
+ summary: <one-line state>
8
+ done: []
9
+ in_progress: []
10
+ remaining: []
11
+ blockers: []
12
+ last_verification: <command-or-check>
13
+ next_step: <next action>
14
+ updated_at: <ISO-8601>
@@ -0,0 +1,13 @@
1
+ # Task
2
+
3
+ 1. [ ] Task
4
+ - Owner:
5
+ - Depends on:
6
+
7
+ 2. [ ] Task
8
+ - Owner:
9
+ - Depends on:
10
+
11
+ 3. [ ] Verify
12
+ - Owner:
13
+ - Depends on:
@@ -1,300 +0,0 @@
1
- # AGENTS.md - [Project Name]
2
-
3
- > Instructions for AI agents working on this project.
4
- >
5
- > How to build lives here; what to build comes from feature specs.
6
-
7
- ---
8
-
9
- ## Project Stack
10
-
11
- <!-- CUSTOMIZE THIS SECTION -->
12
-
13
- - Framework: [e.g. React, Vue, Next.js, NestJS, Express]
14
- - Language: [e.g. TypeScript, JavaScript, Python, Go]
15
- - State Management: [e.g. Redux, Pinia, Zustand, None]
16
- - Routing: [e.g. React Router, Vue Router, Next Router]
17
- - HTTP Client: [e.g. Axios, Fetch, SWR]
18
- - Build Tool: [e.g. Vite, Webpack, esbuild]
19
- - Testing: [e.g. Jest, Vitest, Playwright]
20
- - Styling: [e.g. Tailwind, CSS Modules, Styled Components]
21
-
22
- ---
23
-
24
- ## Core Documentation
25
-
26
- Review these before making architectural or styling decisions:
27
-
28
- | Document | Purpose | Location |
29
- |----------|---------|----------|
30
- | OpenCode README | Kit overview and flow | `.opencode/README.md` |
31
- | OpenCode Architecture | Agent lifecycle and gates | `.opencode/ARCHITECTURE.md` |
32
- | Agent prompts | Role-specific behavior | `.opencode/agents/*.md` |
33
- | Commands | Custom slash commands | `.opencode/commands/*.md` |
34
- | Rules | Shared coding standards | `.opencode/rules/*.md` |
35
-
36
- ---
37
-
38
- ## OpenCode Delivery Model
39
-
40
- - Primary agent: `@feature-lead`
41
- - First call: `@context-gatherer` maps the current project state before planning or proof.
42
- - Other agents are subagents and are called with `@` awareness.
43
- - Security-sensitive work: `@security-auditor` first, then `@penetration-tester` for redteam validation when needed.
44
- - Compact context bundle:
45
- - `proposal.md`: why, value, scope
46
- - `goal.md`: target outcome, constraints, default choice
47
- - `spec.md`: contract, data flow, edge cases, risks
48
- - `task.md`: ordered checklist, dependencies, owners
49
- - `important.md`: facts, blockers, links, decisions
50
- - Archive completed bundles in `.opencode/archive/<feature-slug>/`.
51
- - Default first: choose a safe default when the downside is small.
52
- - Ask only when scope, security, or architecture changes materially.
53
- - Keep handoffs compact and explicit.
54
-
55
- ## Skill Design
56
-
57
- - Keep each skill small, philosophy-first, and single-purpose.
58
- - Put the trigger in the description field so agents can load it by intent.
59
- - Prefer the smallest skill that answers the next decision.
60
-
61
- ---
62
-
63
- ## Code Conventions
64
-
65
- ### File Naming
66
-
67
- | Type | Pattern | Example |
68
- |------|---------|---------|
69
- | Components | `PascalCase.tsx` | `UserCard.tsx` |
70
- | Pages | `PascalCasePage.tsx` | `LoginPage.tsx` |
71
- | Stores | `camelCase.store.ts` | `auth.store.ts` |
72
- | Hooks/Composables | `useCamelCase.ts` | `useAuth.ts` |
73
- | Types | `camelCase.types.ts` | `user.types.ts` |
74
- | Utils | `camelCase.utils.ts` | `date.utils.ts` |
75
- | API | `camelCase.api.ts` | `auth.api.ts` |
76
- | Tests | `*.test.ts` or `*.spec.ts` | `auth.test.ts` |
77
-
78
- ### Code Style
79
-
80
- - Indentation: [2 spaces / 4 spaces / tabs]
81
- - Quotes: [single / double]
82
- - Semicolons: [required / none]
83
- - Line Width: [80 / 100 / 120]
84
- - Trailing Commas: [always / none / es5]
85
-
86
- ---
87
-
88
- ## Project-Specific Rules
89
-
90
- <!-- ADD YOUR CUSTOM RULES HERE -->
91
-
92
- - [Add the defaults, tradeoffs, and exceptions for this project]
93
- - [Call out anything the agents should never do]
94
-
95
- ---
96
-
97
- ## Architecture Patterns
98
-
99
- ### State Management
100
-
101
- <!-- CUSTOMIZE FOR YOUR STATE SOLUTION -->
102
-
103
- - [Describe your store pattern]
104
- - [Describe where state lives]
105
- - [Describe how async work is handled]
106
-
107
- ### API Layer
108
-
109
- - [Describe request and response patterns]
110
- - [Describe how errors are normalized]
111
- - [Describe versioning or contract rules]
112
-
113
- ### Component Structure
114
-
115
- - [Describe component conventions]
116
- - [Describe where logic belongs]
117
- - [Describe how loading and error states appear]
118
-
119
- ---
120
-
121
- ## Testing Standards
122
-
123
- - Unit tests: [what to test]
124
- - Integration tests: [what to test]
125
- - E2E tests: [critical flows]
126
- - Quality gate: [coverage or manual verification target]
127
-
128
- ---
129
-
130
- ## Quick Reference
131
-
132
- - Validate templates: `node bin/validate-templates.js`
133
- - Sync templates: `node bin/sync-templates.js`
134
- - Entry point: `@feature-lead`
135
-
136
- ### Test Coverage
137
-
138
- - **Minimum:** 70% coverage
139
- - **Target:** 80% coverage
140
- - **Critical paths:** 100% coverage (auth, payments, etc.)
141
-
142
- ---
143
-
144
- ## Git Workflow
145
-
146
- ### Commit Messages
147
-
148
- ```
149
- <type>(<scope>): <subject>
150
-
151
- <body>
152
-
153
- <footer>
154
- ```
155
-
156
- **Types:**
157
- - `feat`: New feature
158
- - `fix`: Bug fix
159
- - `refactor`: Code refactor
160
- - `docs`: Documentation
161
- - `test`: Tests
162
- - `chore`: Maintenance
163
-
164
- **Example:**
165
- ```
166
- feat(auth): add JWT refresh token support
167
-
168
- - Implement refresh token rotation
169
- - Add automatic token refresh on 401
170
- - Store tokens in httpOnly cookies
171
-
172
- Closes #123
173
- ```
174
-
175
- ### Branch Naming
176
-
177
- ```
178
- <type>/<ticket>-<short-description>
179
-
180
- Examples:
181
- - feature/AUTH-123-jwt-refresh
182
- - fix/PAY-456-payment-timeout
183
- - refactor/CORE-789-state-management
184
- ```
185
-
186
- ---
187
-
188
- ## Performance Guidelines
189
-
190
- ### Do's
191
-
192
- - Lazy load components and routes
193
- - Memoize expensive computations
194
- - Paginate large lists
195
- - Use virtual scrolling for long lists
196
- - Optimize images and assets
197
- - Cache API responses when appropriate
198
-
199
- ### Don'ts
200
-
201
- - Render all items in large lists
202
- - Call expensive functions in render
203
- - Watch large objects unnecessarily
204
- - Block the main thread
205
- - Make unnecessary API calls
206
- - Ignore bundle size warnings
207
-
208
- ---
209
-
210
- ## Security Guidelines
211
-
212
- ### Authentication & Authorization
213
-
214
- - Never store sensitive data in localStorage
215
- - Use httpOnly cookies for tokens
216
- - Implement CSRF protection
217
- - Validate all user input
218
- - Sanitize data before rendering
219
- - Use parameterized queries
220
-
221
- ### Data Validation
222
-
223
- ```typescript
224
- // ✅ Validate at boundaries
225
- import { z } from 'zod';
226
-
227
- const UserSchema = z.object({
228
- email: z.string().email(),
229
- name: z.string().min(2).max(100),
230
- age: z.number().min(0).max(150).optional(),
231
- });
232
-
233
- function createUser(data: unknown): User {
234
- return UserSchema.parse(data); // Throws on invalid
235
- }
236
- ```
237
-
238
- ---
239
-
240
- ## Accessibility (a11y)
241
-
242
- - Use semantic HTML
243
- - Provide alt text for images
244
- - Ensure keyboard navigation
245
- - Maintain color contrast ratios
246
- - Use ARIA labels when needed
247
- - Test with screen readers
248
-
249
- ---
250
-
251
- ## Key Reminders
252
-
253
- <!-- ADD PROJECT-SPECIFIC REMINDERS -->
254
-
255
- 1. **[Reminder 1]** - Description
256
- 2. **[Reminder 2]** - Description
257
- 3. **[Reminder 3]** - Description
258
-
259
- ---
260
-
261
- ## Quick Reference
262
-
263
- ### Commands
264
-
265
- ```bash
266
- # Development
267
- npm run dev # Start dev server
268
- npm run build # Production build
269
- npm run test # Run tests
270
- npm run lint # Lint check
271
- npm run format # Format code
272
- npm run type-check # TypeScript check
273
- ```
274
-
275
- ### Important Files
276
-
277
- ```
278
- src/
279
- ├── components/ # Reusable components
280
- ├── pages/ # Page components
281
- ├── stores/ # State management
282
- ├── api/ # API calls
283
- ├── types/ # TypeScript types
284
- ├── utils/ # Utility functions
285
- └── hooks/ # Custom hooks/composables
286
- ```
287
-
288
- ---
289
-
290
- ## Questions?
291
-
292
- When in doubt:
293
- 1. Check existing code for patterns
294
- 2. Read the relevant docs
295
- 3. Ask the team lead
296
- 4. Follow the principle of least surprise
297
-
298
- ---
299
-
300
- **Keep this file updated as the project evolves.**