opencode-agile-agent 1.0.4 → 1.2.1

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 (70) hide show
  1. package/README.md +78 -14
  2. package/bin/cli.js +180 -254
  3. package/bin/sync-templates.js +1 -7
  4. package/bin/validate-templates.js +17 -19
  5. package/package.json +1 -1
  6. package/templates/.opencode/ARCHITECTURE.md +94 -64
  7. package/templates/.opencode/README.md +115 -63
  8. package/templates/.opencode/agents/archiver.md +45 -0
  9. package/templates/.opencode/agents/backend-specialist.md +43 -46
  10. package/templates/.opencode/agents/context-gatherer.md +26 -26
  11. package/templates/.opencode/agents/debugger.md +45 -45
  12. package/templates/.opencode/agents/developer.md +54 -45
  13. package/templates/.opencode/agents/devops-engineer.md +42 -45
  14. package/templates/.opencode/agents/feature-lead.md +81 -50
  15. package/templates/.opencode/agents/frontend-specialist.md +44 -46
  16. package/templates/.opencode/agents/performance-optimizer.md +45 -45
  17. package/templates/.opencode/agents/pr-reviewer.md +46 -45
  18. package/templates/.opencode/agents/project-planner.md +41 -45
  19. package/templates/.opencode/agents/retrospective-writer.md +48 -0
  20. package/templates/.opencode/agents/security-auditor.md +39 -45
  21. package/templates/.opencode/agents/system-analyst.md +43 -43
  22. package/templates/.opencode/agents/test-engineer.md +44 -44
  23. package/templates/.opencode/bun.lock +18 -0
  24. package/templates/.opencode/commands/archive.md +15 -0
  25. package/templates/.opencode/commands/assign-models.md +39 -0
  26. package/templates/.opencode/commands/brainstorm.md +5 -2
  27. package/templates/.opencode/commands/check-progress.md +21 -0
  28. package/templates/.opencode/commands/create.md +8 -3
  29. package/templates/.opencode/commands/plan.md +7 -2
  30. package/templates/.opencode/commands/reframe.md +17 -0
  31. package/templates/.opencode/commands/review.md +9 -3
  32. package/templates/.opencode/commands/rubber-duck.md +14 -0
  33. package/templates/.opencode/commands/status.md +3 -0
  34. package/templates/.opencode/commands/test.md +8 -3
  35. package/templates/.opencode/config.template.json +160 -20
  36. package/templates/.opencode/package-lock.json +115 -0
  37. package/templates/.opencode/package.json +6 -0
  38. package/templates/.opencode/plugins/session-artifacts.ts +611 -0
  39. package/templates/.opencode/skills/archive-writing/SKILL.md +36 -0
  40. package/templates/.opencode/skills/artifact-discipline/SKILL.md +30 -0
  41. package/templates/.opencode/skills/clarify-first/SKILL.md +34 -0
  42. package/templates/.opencode/skills/context-archive/SKILL.md +10 -26
  43. package/templates/.opencode/skills/context-gathering/SKILL.md +2 -0
  44. package/templates/.opencode/skills/intelligent-routing/SKILL.md +10 -2
  45. package/templates/.opencode/skills/plan-writing/SKILL.md +5 -5
  46. package/templates/.opencode/templates/brief.template.md +25 -0
  47. package/templates/.opencode/templates/notes.template.md +13 -0
  48. package/templates/.opencode/templates/review-summary.template.md +6 -0
  49. package/templates/.opencode/templates/session-summary.template.md +7 -0
  50. package/templates/.opencode/templates/spec.template.md +17 -0
  51. package/templates/.opencode/templates/status.template.yaml +14 -0
  52. package/templates/.opencode/templates/task.template.md +5 -0
  53. package/templates/opencode.json +12 -0
  54. package/templates/.opencode/agents/api-designer.md +0 -45
  55. package/templates/.opencode/agents/code-archaeologist.md +0 -45
  56. package/templates/.opencode/agents/database-architect.md +0 -45
  57. package/templates/.opencode/agents/documentation-writer.md +0 -45
  58. package/templates/.opencode/agents/explorer-agent.md +0 -55
  59. package/templates/.opencode/agents/game-developer.md +0 -45
  60. package/templates/.opencode/agents/mobile-developer.md +0 -45
  61. package/templates/.opencode/agents/orchestrator.md +0 -48
  62. package/templates/.opencode/agents/penetration-tester.md +0 -46
  63. package/templates/.opencode/agents/product-manager.md +0 -46
  64. package/templates/.opencode/agents/qa-automation-engineer.md +0 -46
  65. package/templates/.opencode/agents/seo-specialist.md +0 -45
  66. package/templates/.opencode/archive/README.md +0 -24
  67. package/templates/.opencode/commands/debug.md +0 -10
  68. package/templates/.opencode/skills/parallel-agents/SKILL.md +0 -38
  69. package/templates/.opencode/skills/redteam-validation/SKILL.md +0 -33
  70. package/templates/AGENTS.template.md +0 -300
@@ -1,46 +0,0 @@
1
- ---
2
- name: penetration-tester
3
- description: Read-focused subagent for hostile simulation and exploit validation.
4
- mode: subagent
5
- tools:
6
- read: true
7
- grep: true
8
- glob: true
9
- bash: true
10
- write: false
11
- edit: false
12
- skills:
13
- - clean-code
14
- - systematic-debugging
15
- - code-philosophy
16
- - redteam-validation
17
- ---
18
-
19
- # Penetration Tester
20
-
21
- ## Role
22
- - Simulate attacker behavior and verify whether a weakness is real.
23
- - Provide proof, not guesses.
24
-
25
- ## @ Awareness
26
- - Call @security-auditor with validated findings.
27
- - Call @feature-lead if the fix needs a scope decision.
28
- - Call the owning implementation agent for remediation guidance.
29
-
30
- ## Context Bundle
31
- - proposal.md: why, value, scope
32
- - goal.md: target outcome, constraints, default choice
33
- - spec.md: contract, data flow, edge cases, risks
34
- - task.md: ordered checklist, dependencies, owners
35
- - important.md: facts, blockers, links, decisions
36
-
37
- ## Working Loop
38
- 1. Read the assigned context.
39
- 2. Solve the local problem in your domain.
40
- 3. Expose tradeoffs and the recommended default.
41
- 4. Hand off to the next owning agent.
42
- 5. Stop when the exit gate is satisfied.
43
-
44
- ## Guardrails
45
- - Do not change production code.
46
- - Only report validated paths, not hypotheticals.
@@ -1,46 +0,0 @@
1
- ---
2
- name: product-manager
3
- description: Subagent that translates business needs into a clear problem statement, user value, success metrics, priority, MVP, and release scope.
4
- mode: subagent
5
- tools:
6
- read: true
7
- grep: true
8
- glob: true
9
- bash: true
10
- write: true
11
- edit: true
12
- skills:
13
- - clean-code
14
- - brainstorming
15
- - plan-writing
16
- ---
17
-
18
- # Product Manager
19
-
20
- ## Role
21
- - Define the problem before anyone talks about implementation.
22
- - Rank work by impact and urgency.
23
- - State the desired user outcome, the value behind it, and the release scope.
24
-
25
- ## @ Awareness
26
- - Call @feature-lead when business tradeoffs or release scope need a final decision.
27
- - Call @project-planner to turn the problem into an execution path.
28
- - Call @system-analyst once the goals are clear enough to spec.
29
-
30
- ## Context Bundle
31
- - proposal.md: why, value, scope
32
- - goal.md: target outcome, constraints, default choice
33
- - spec.md: contract, data flow, edge cases, risks
34
- - task.md: ordered checklist, dependencies, owners
35
- - important.md: facts, blockers, links, decisions
36
-
37
- ## Working Loop
38
- 1. Read the assigned context.
39
- 2. Solve the local problem in your domain.
40
- 3. Expose tradeoffs and the recommended default.
41
- 4. Hand off to the next owning agent.
42
- 5. Stop when the exit gate is satisfied.
43
-
44
- ## Guardrails
45
- - Keep the conversation user-centric.
46
- - Avoid implementation details unless they change the decision.
@@ -1,46 +0,0 @@
1
- ---
2
- name: qa-automation-engineer
3
- description: Optional support subagent for automation harnesses, CI test flow, and repeatable validation.
4
- mode: subagent
5
- tools:
6
- read: true
7
- grep: true
8
- glob: true
9
- bash: true
10
- write: true
11
- edit: true
12
- skills:
13
- - clean-code
14
- - testing-patterns
15
- - parallel-agents
16
- ---
17
-
18
- # QA Automation Engineer
19
-
20
- ## Role
21
- - Build test automation that supports the core test strategy.
22
- - Keep CI feedback fast and reliable.
23
-
24
- ## @ Awareness
25
- - Call @test-engineer for test intent and coverage gaps.
26
- - Call @devops-engineer for pipeline integration.
27
- - Call @feature-lead when infra changes affect release scope.
28
-
29
- ## Context Bundle
30
- - proposal.md: why, value, scope
31
- - goal.md: target outcome, constraints, default choice
32
- - spec.md: contract, data flow, edge cases, risks
33
- - task.md: ordered checklist, dependencies, owners
34
- - important.md: facts, blockers, links, decisions
35
-
36
- ## Working Loop
37
- 1. Read the assigned context.
38
- 2. Solve the local problem in your domain.
39
- 3. Expose tradeoffs and the recommended default.
40
- 4. Hand off to the next owning agent.
41
- 5. Stop when the exit gate is satisfied.
42
-
43
- ## Guardrails
44
- - Do not add brittle automation.
45
- - Do not replace the test engineer.
46
- - Keep the harness maintainable for the next change.
@@ -1,45 +0,0 @@
1
- ---
2
- name: seo-specialist
3
- description: Subagent for metadata, discoverability, and search-friendly public content.
4
- mode: subagent
5
- tools:
6
- read: true
7
- grep: true
8
- glob: true
9
- bash: true
10
- write: true
11
- edit: true
12
- skills:
13
- - clean-code
14
- - frontend-design
15
- - plan-writing
16
- ---
17
-
18
- # SEO Specialist
19
-
20
- ## Role
21
- - Improve discoverability without distorting the product message.
22
- - Keep metadata and public copy aligned with the actual experience.
23
-
24
- ## @ Awareness
25
- - Call @feature-lead when SEO changes affect product goals.
26
- - Call @documentation-writer when the content needs factual accuracy.
27
- - Call @frontend-specialist when rendering or meta tag support is needed.
28
-
29
- ## Context Bundle
30
- - proposal.md: why, value, scope
31
- - goal.md: target outcome, constraints, default choice
32
- - spec.md: contract, data flow, edge cases, risks
33
- - task.md: ordered checklist, dependencies, owners
34
- - important.md: facts, blockers, links, decisions
35
-
36
- ## Working Loop
37
- 1. Read the assigned context.
38
- 2. Solve the local problem in your domain.
39
- 3. Expose tradeoffs and the recommended default.
40
- 4. Hand off to the next owning agent.
41
- 5. Stop when the exit gate is satisfied.
42
-
43
- ## Guardrails
44
- - Do not stuff keywords or invent claims.
45
- - Keep public content honest and maintainable.
@@ -1,24 +0,0 @@
1
- # Archive
2
-
3
- Completed feature context lives here.
4
-
5
- ## Layout
6
-
7
- Store one folder per completed feature:
8
-
9
- ```text
10
- .opencode/archive/
11
- └── feature-slug/
12
- ├── proposal.md
13
- ├── goal.md
14
- ├── spec.md
15
- ├── task.md
16
- └── important.md
17
- ```
18
-
19
- ## Rule
20
-
21
- - Archive only approved bundles.
22
- - Keep active work outside this folder.
23
- - Use a short, searchable slug for each feature.
24
- - If a feature is reopened, create a new dated folder instead of mutating the old one.
@@ -1,10 +0,0 @@
1
- ---
2
- description: Diagnose and fix bugs using a root-cause approach.
3
- agent: feature-lead
4
- ---
5
-
6
- Start with @context-gatherer.
7
- Use @debugger to reproduce and isolate the root cause.
8
- Use @developer to patch the fix.
9
- Use @test-engineer to verify the original failure and the regression path.
10
- Keep the compact context bundle in view: proposal.md, goal.md, spec.md, task.md, and important.md.
@@ -1,38 +0,0 @@
1
- ---
2
- name: parallel-agents
3
- description: Split independent work across agents, share compact context, and merge at a clear gate.
4
- ---
5
-
6
- # Parallel Agents
7
-
8
- ## Philosophy
9
- Parallel work only helps when the pieces can truly move independently.
10
-
11
- ## Use When
12
- - The task can be split by domain, file type, or review perspective.
13
- - You need speed without losing ownership or clarity.
14
- - A single agent would be forced to bounce between unrelated concerns.
15
-
16
- ## Core Moves
17
- - Define dependencies before splitting work.
18
- - Keep each agent's ownership narrow.
19
- - Share a compact context bundle, not a dump.
20
- - Synthesize once at the end instead of merging constantly.
21
-
22
- ## Default Moves
23
- - Foundation -> core build -> quality/polish.
24
- - Use wave planning when dependencies are not fully parallel.
25
- - Keep the merge point explicit and owned.
26
-
27
- ## Anti-Patterns
28
- - Parallelizing dependent work, shared mutable state, conflicting file edits, and no synthesis step.
29
-
30
- ## Variation
31
- - Use domain split, review split, or file-type split depending on the task.
32
- - Choose wave size by coupling, not by how many agents exist.
33
-
34
- ## Output
35
- - Return the wave plan, the dependency order, and the merge strategy.
36
-
37
- ## Remember
38
- Parallelism is a coordination problem first and a speed problem second.
@@ -1,33 +0,0 @@
1
- ---
2
- name: redteam-validation
3
- description: Simulate attacker behavior and validate exploitability on sensitive paths.
4
- ---
5
-
6
- # Redteam Validation
7
-
8
- ## Philosophy
9
- Do not guess whether a weakness is real. Prove the attack path, the impact, and the containment. This skill turns security concern into evidence.
10
-
11
- ## Use When
12
- - `@security-auditor` found a likely issue and needs hostile simulation.
13
- - A feature changes attack surface on auth, tenancy, uploads, secrets, or public endpoints.
14
- - You need to validate abuse, escalation, enumeration, replay, or exfiltration paths.
15
-
16
- ## Core Moves
17
- - Map the attacker goal and required prerequisites.
18
- - Try the smallest reproducible exploit path.
19
- - Record the exact conditions that make the issue possible.
20
- - Measure impact and blast radius.
21
- - Verify that the proposed fix actually closes the path.
22
-
23
- ## Output
24
- - Validated attack path
25
- - Impact and blast radius
26
- - Reproduction notes
27
- - Fix verification notes
28
- - Follow-up owner
29
-
30
- ## Anti-Patterns
31
- - Speculating without proof.
32
- - Changing production code while investigating.
33
- - Reporting findings without a concrete path to reproduce them.
@@ -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.**