opencode-agile-agent 1.0.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 (55) hide show
  1. package/README.md +71 -0
  2. package/bin/cli.js +434 -0
  3. package/bin/validate-templates.js +58 -0
  4. package/package.json +52 -0
  5. package/templates/.opencode/ARCHITECTURE.md +368 -0
  6. package/templates/.opencode/README.md +391 -0
  7. package/templates/.opencode/agents/api-designer.md +312 -0
  8. package/templates/.opencode/agents/backend-specialist.md +214 -0
  9. package/templates/.opencode/agents/code-archaeologist.md +260 -0
  10. package/templates/.opencode/agents/database-architect.md +212 -0
  11. package/templates/.opencode/agents/debugger.md +302 -0
  12. package/templates/.opencode/agents/developer.md +523 -0
  13. package/templates/.opencode/agents/devops-engineer.md +253 -0
  14. package/templates/.opencode/agents/documentation-writer.md +247 -0
  15. package/templates/.opencode/agents/explorer-agent.md +239 -0
  16. package/templates/.opencode/agents/feature-lead.md +302 -0
  17. package/templates/.opencode/agents/frontend-specialist.md +186 -0
  18. package/templates/.opencode/agents/game-developer.md +391 -0
  19. package/templates/.opencode/agents/mobile-developer.md +264 -0
  20. package/templates/.opencode/agents/orchestrator.md +463 -0
  21. package/templates/.opencode/agents/penetration-tester.md +256 -0
  22. package/templates/.opencode/agents/performance-optimizer.md +292 -0
  23. package/templates/.opencode/agents/pr-reviewer.md +468 -0
  24. package/templates/.opencode/agents/product-manager.md +225 -0
  25. package/templates/.opencode/agents/product-owner.md +264 -0
  26. package/templates/.opencode/agents/project-planner.md +248 -0
  27. package/templates/.opencode/agents/qa-automation-engineer.md +276 -0
  28. package/templates/.opencode/agents/security-auditor.md +260 -0
  29. package/templates/.opencode/agents/seo-specialist.md +266 -0
  30. package/templates/.opencode/agents/system-analyst.md +428 -0
  31. package/templates/.opencode/agents/test-engineer.md +229 -0
  32. package/templates/.opencode/config.template.json +129 -0
  33. package/templates/.opencode/rules/coding-standards.md +250 -0
  34. package/templates/.opencode/rules/git-conventions.md +149 -0
  35. package/templates/.opencode/skills/api-patterns/SKILL.md +162 -0
  36. package/templates/.opencode/skills/brainstorming/SKILL.md +255 -0
  37. package/templates/.opencode/skills/clean-code/SKILL.md +351 -0
  38. package/templates/.opencode/skills/code-philosophy/SKILL.md +512 -0
  39. package/templates/.opencode/skills/frontend-design/SKILL.md +237 -0
  40. package/templates/.opencode/skills/intelligent-routing/SKILL.md +195 -0
  41. package/templates/.opencode/skills/parallel-agents/SKILL.md +274 -0
  42. package/templates/.opencode/skills/plan-writing/SKILL.md +251 -0
  43. package/templates/.opencode/skills/systematic-debugging/SKILL.md +210 -0
  44. package/templates/.opencode/skills/testing-patterns/SKILL.md +252 -0
  45. package/templates/.opencode/workflows/brainstorm.md +110 -0
  46. package/templates/.opencode/workflows/create.md +108 -0
  47. package/templates/.opencode/workflows/debug.md +128 -0
  48. package/templates/.opencode/workflows/deploy.md +160 -0
  49. package/templates/.opencode/workflows/enhance.md +253 -0
  50. package/templates/.opencode/workflows/orchestrate.md +130 -0
  51. package/templates/.opencode/workflows/plan.md +163 -0
  52. package/templates/.opencode/workflows/review.md +135 -0
  53. package/templates/.opencode/workflows/status.md +102 -0
  54. package/templates/.opencode/workflows/test.md +146 -0
  55. package/templates/AGENTS.template.md +426 -0
@@ -0,0 +1,149 @@
1
+ # Git Conventions
2
+
3
+ Standardized git workflow and commit conventions.
4
+
5
+ ## Branch Strategy
6
+
7
+ ### Branch Types
8
+
9
+ | Type | Pattern | Purpose |
10
+ |------|---------|---------|
11
+ | Feature | `feature/description` | New features |
12
+ | Fix | `fix/description` | Bug fixes |
13
+ | Refactor | `refactor/description` | Code improvements |
14
+ | Docs | `docs/description` | Documentation |
15
+ | Release | `release/v1.0.0` | Release preparation |
16
+ | Hotfix | `hotfix/description` | Production fixes |
17
+
18
+ ### Branch Workflow
19
+
20
+ ```
21
+ main ─────●─────●─────●─────●─────→
22
+ \ /
23
+ feature/a ●───●───● merge
24
+
25
+ \ /
26
+ feature/b ●───●───● merge
27
+ ```
28
+
29
+ ## Commit Messages
30
+
31
+ ### Format
32
+
33
+ ```
34
+ <type>(<scope>): <description>
35
+
36
+ [optional body]
37
+
38
+ [optional footer]
39
+ ```
40
+
41
+ ### Types
42
+
43
+ | Type | Description |
44
+ |------|-------------|
45
+ | `feat` | New feature |
46
+ | `fix` | Bug fix |
47
+ | `docs` | Documentation only |
48
+ | `style` | Formatting, no code change |
49
+ | `refactor` | Code refactoring |
50
+ | `test` | Adding/updating tests |
51
+ | `chore` | Maintenance tasks |
52
+ | `perf` | Performance improvement |
53
+
54
+ ### Examples
55
+
56
+ ```bash
57
+ # Feature
58
+ feat(auth): add JWT refresh token support
59
+
60
+ # Fix
61
+ fix(api): handle null response from user service
62
+
63
+ # Breaking change
64
+ feat(api)!: change user endpoint response format
65
+
66
+ BREAKING CHANGE: The /api/user endpoint now returns
67
+ a different structure. See migration guide.
68
+ ```
69
+
70
+ ## Pull Request Process
71
+
72
+ ### PR Title
73
+
74
+ Use the same format as commit messages:
75
+
76
+ ```
77
+ feat(auth): add JWT refresh token support
78
+ ```
79
+
80
+ ### PR Description
81
+
82
+ ```markdown
83
+ ## What
84
+ Brief description of changes.
85
+
86
+ ## Why
87
+ Why this change is needed.
88
+
89
+ ## How
90
+ Technical approach taken.
91
+
92
+ ## Testing
93
+ - [ ] Unit tests added
94
+ - [ ] Integration tests added
95
+ - [ ] Manual testing done
96
+
97
+ ## Screenshots
98
+ [If applicable]
99
+
100
+ ## Checklist
101
+ - [ ] Code follows conventions
102
+ - [ ] Tests pass
103
+ - [ ] Documentation updated
104
+ - [ ] No breaking changes (or documented)
105
+ ```
106
+
107
+ ### Review Process
108
+
109
+ 1. Create PR with description
110
+ 2. Assign reviewers
111
+ 3. Address review comments
112
+ 4. Get approval
113
+ 5. Squash and merge
114
+
115
+ ## Merge Strategies
116
+
117
+ ### Squash and Merge (Default)
118
+
119
+ - Combines all commits into one
120
+ - Clean history on main
121
+ - PR description preserved
122
+
123
+ ### Rebase and Merge
124
+
125
+ - Preserves individual commits
126
+ - Linear history
127
+ - Use for feature branches with clean commits
128
+
129
+ ### Merge Commit
130
+
131
+ - Preserves branch history
132
+ - Use for release branches
133
+ - Creates merge commit
134
+
135
+ ## Git Aliases
136
+
137
+ ```bash
138
+ # Useful aliases
139
+ git config --global alias.co checkout
140
+ git config --global alias.br branch
141
+ git config --global alias.ci commit
142
+ git config --global alias.st status
143
+ git config --global alias.lg "log --oneline --graph"
144
+ git config --global alias.unstage "reset HEAD --"
145
+ ```
146
+
147
+ ---
148
+
149
+ **Consistent git practices enable smooth collaboration.**
@@ -0,0 +1,162 @@
1
+ ---
2
+ name: api-patterns
3
+ description: REST and GraphQL API design patterns and best practices.
4
+ version: 1.0.0
5
+ ---
6
+
7
+ # API Patterns
8
+
9
+ Best practices for designing REST and GraphQL APIs.
10
+
11
+ ## REST API Design
12
+
13
+ ### Resource Naming
14
+
15
+ ```
16
+ ✅ GOOD:
17
+ GET /users # List users
18
+ GET /users/{id} # Get user
19
+ POST /users # Create user
20
+ PUT /users/{id} # Replace user
21
+ PATCH /users/{id} # Update user
22
+ DELETE /users/{id} # Delete user
23
+ GET /users/{id}/orders # Get user's orders
24
+
25
+ ❌ BAD:
26
+ GET /getUsers
27
+ POST /createUser
28
+ GET /user-orders/{userId}
29
+ ```
30
+
31
+ ### HTTP Status Codes
32
+
33
+ | Code | Use When |
34
+ |------|----------|
35
+ | 200 | Successful GET, PUT, PATCH |
36
+ | 201 | Resource created (POST) |
37
+ | 204 | Success with no content (DELETE) |
38
+ | 400 | Invalid request |
39
+ | 401 | Not authenticated |
40
+ | 403 | Not authorized |
41
+ | 404 | Resource not found |
42
+ | 409 | Conflict (duplicate) |
43
+ | 422 | Validation error |
44
+ | 429 | Rate limited |
45
+ | 500 | Server error |
46
+
47
+ ### Response Envelope
48
+
49
+ ```json
50
+ // Success
51
+ {
52
+ "success": true,
53
+ "data": { ... },
54
+ "meta": {
55
+ "timestamp": "2024-01-15T10:30:00Z",
56
+ "requestId": "abc-123"
57
+ }
58
+ }
59
+
60
+ // Error
61
+ {
62
+ "success": false,
63
+ "error": {
64
+ "code": "VALIDATION_ERROR",
65
+ "message": "Invalid input",
66
+ "details": [...]
67
+ }
68
+ }
69
+ ```
70
+
71
+ ### Pagination
72
+
73
+ ```json
74
+ // Cursor-based (preferred)
75
+ {
76
+ "data": [...],
77
+ "pagination": {
78
+ "nextCursor": "eyJpZCI6MTAwfQ==",
79
+ "hasMore": true
80
+ }
81
+ }
82
+
83
+ // Offset-based
84
+ {
85
+ "data": [...],
86
+ "pagination": {
87
+ "page": 1,
88
+ "pageSize": 20,
89
+ "totalCount": 100
90
+ }
91
+ }
92
+ ```
93
+
94
+ ## GraphQL Design
95
+
96
+ ### Schema Structure
97
+
98
+ ```graphql
99
+ type Query {
100
+ user(id: ID!): User
101
+ users(filter: UserFilter, pagination: PaginationInput): UserConnection!
102
+ }
103
+
104
+ type Mutation {
105
+ createUser(input: CreateUserInput!): User!
106
+ updateUser(id: ID!, input: UpdateUserInput!): User!
107
+ }
108
+
109
+ type User {
110
+ id: ID!
111
+ name: String!
112
+ email: String!
113
+ orders: [Order!]!
114
+ }
115
+ ```
116
+
117
+ ### Best Practices
118
+
119
+ - Use meaningful names (camelCase for fields)
120
+ - Provide descriptions
121
+ - Use enums for fixed values
122
+ - Implement pagination for lists
123
+ - Use input types for mutations
124
+
125
+ ## Authentication Patterns
126
+
127
+ ### JWT Pattern
128
+
129
+ ```typescript
130
+ // Access token: short-lived (15 min)
131
+ const accessToken = jwt.sign(payload, secret, { expiresIn: '15m' });
132
+
133
+ // Refresh token: long-lived (7 days)
134
+ const refreshToken = crypto.randomBytes(64).toString('hex');
135
+
136
+ // Store: httpOnly cookie for refresh, memory for access
137
+ ```
138
+
139
+ ### API Key Pattern
140
+
141
+ ```typescript
142
+ // Header-based
143
+ Authorization: Bearer sk_live_xxx
144
+
145
+ // Query param (less secure)
146
+ ?api_key=sk_live_xxx
147
+ ```
148
+
149
+ ## Rate Limiting
150
+
151
+ ```typescript
152
+ // Per-user limiting
153
+ const limiter = rateLimit({
154
+ windowMs: 15 * 60 * 1000, // 15 minutes
155
+ max: 100, // 100 requests per window
156
+ keyGenerator: (req) => req.user.id
157
+ });
158
+ ```
159
+
160
+ ---
161
+
162
+ **Consistent APIs enable great developer experience.**
@@ -0,0 +1,255 @@
1
+ ---
2
+ name: brainstorming
3
+ description: Socratic questioning and discovery techniques for exploring ideas and requirements.
4
+ version: 1.0.0
5
+ ---
6
+
7
+ # Brainstorming
8
+
9
+ Socratic questioning and discovery techniques for exploring ideas and clarifying requirements.
10
+
11
+ ## The Socratic Method
12
+
13
+ Ask questions to guide discovery rather than providing answers.
14
+
15
+ ### Core Questions
16
+
17
+ 1. **What is the problem?**
18
+ - What are you trying to solve?
19
+ - Who has this problem?
20
+ - Why does it matter?
21
+
22
+ 2. **What are the constraints?**
23
+ - What's the timeline?
24
+ - What's the budget?
25
+ - What technical limitations exist?
26
+
27
+ 3. **What does success look like?**
28
+ - How will you measure success?
29
+ - What's the definition of done?
30
+ - What would failure look like?
31
+
32
+ ## Question Frameworks
33
+
34
+ ### 5 Whys
35
+
36
+ Dig deeper into root causes:
37
+
38
+ ```
39
+ Problem: Users aren't completing checkout
40
+
41
+ Why? → Form is too long
42
+ Why? → We're asking for too much information
43
+ Why? → We want complete user profiles
44
+ Why? → Marketing wants demographic data
45
+ Why? → To improve targeting
46
+
47
+ Root cause: Marketing needs vs. UX needs conflict
48
+ ```
49
+
50
+ ### SCAMPER
51
+
52
+ Explore alternatives:
53
+
54
+ | Question | Prompt |
55
+ |----------|--------|
56
+ | **S**ubstitute | What can be replaced? |
57
+ | **C**ombine | What can be merged? |
58
+ | **A**dapt | What can be adjusted? |
59
+ | **M**odify | What can be changed? |
60
+ | **P**ut to other use | What else can it do? |
61
+ | **E**liminate | What can be removed? |
62
+ | **R**everse | What can be inverted? |
63
+
64
+ ### Six Thinking Hats
65
+
66
+ Explore from different perspectives:
67
+
68
+ | Hat | Focus |
69
+ |-----|-------|
70
+ | **White** | Facts and data |
71
+ | **Red** | Emotions and feelings |
72
+ | **Black** | Risks and problems |
73
+ | **Yellow** | Benefits and value |
74
+ | **Green** | Creativity and alternatives |
75
+ | **Blue** | Process and control |
76
+
77
+ ## Discovery Process
78
+
79
+ ### Phase 1: Understand the Request
80
+
81
+ ```markdown
82
+ Initial request: "Build a dashboard"
83
+
84
+ Questions to ask:
85
+ - Who will use this dashboard?
86
+ - What decisions will they make from it?
87
+ - What data do they need?
88
+ - How often will they use it?
89
+ - What devices will they use?
90
+ ```
91
+
92
+ ### Phase 2: Explore Options
93
+
94
+ ```markdown
95
+ Options for dashboard:
96
+ 1. Real-time monitoring dashboard
97
+ 2. Analytics dashboard with charts
98
+ 3. Task management dashboard
99
+ 4. Executive summary dashboard
100
+
101
+ Trade-offs:
102
+ - Real-time vs. historical data
103
+ - Simple vs. detailed
104
+ - Mobile vs. desktop priority
105
+ ```
106
+
107
+ ### Phase 3: Define Scope
108
+
109
+ ```markdown
110
+ In Scope:
111
+ - [Feature 1]
112
+ - [Feature 2]
113
+
114
+ Out of Scope:
115
+ - [Feature X]
116
+ - [Feature Y]
117
+
118
+ MVP:
119
+ - [Minimum viable feature set]
120
+ ```
121
+
122
+ ### Phase 4: Validate Understanding
123
+
124
+ ```markdown
125
+ "So what I'm hearing is:
126
+ - You need [X]
127
+ - For [audience]
128
+ - To solve [problem]
129
+ - With [constraints]
130
+
131
+ Is that correct?"
132
+ ```
133
+
134
+ ## Question Templates
135
+
136
+ ### For New Features
137
+
138
+ ```markdown
139
+ 1. What problem does this solve?
140
+ 2. Who is the target user?
141
+ 3. How are they solving this today?
142
+ 4. What would make this feature a success?
143
+ 5. What are the must-haves vs. nice-to-haves?
144
+ 6. What's the timeline?
145
+ 7. Are there any technical constraints?
146
+ 8. Are there any design preferences?
147
+ ```
148
+
149
+ ### For Bug Fixes
150
+
151
+ ```markdown
152
+ 1. What's the expected behavior?
153
+ 2. What's the actual behavior?
154
+ 3. When did this start happening?
155
+ 4. Can you reproduce it reliably?
156
+ 5. What steps reproduce it?
157
+ 6. What have you tried to fix it?
158
+ 7. Who is affected by this?
159
+ 8. How urgent is this?
160
+ ```
161
+
162
+ ### For Performance Issues
163
+
164
+ ```markdown
165
+ 1. What's slow?
166
+ 2. How slow is it? (measure)
167
+ 3. When is it slow?
168
+ 4. Has it always been slow?
169
+ 5. What changed recently?
170
+ 6. What's the target performance?
171
+ 7. What metrics matter most?
172
+ ```
173
+
174
+ ### For Architecture Decisions
175
+
176
+ ```markdown
177
+ 1. What are we trying to achieve?
178
+ 2. What are the constraints?
179
+ 3. What are the options?
180
+ 4. What are the trade-offs of each?
181
+ 5. What's the impact of each option?
182
+ 6. How reversible is this decision?
183
+ 7. What's the cost of waiting?
184
+ ```
185
+
186
+ ## Facilitation Techniques
187
+
188
+ ### Dot Voting
189
+
190
+ ```markdown
191
+ Options:
192
+ - Option A •••• (4 votes)
193
+ - Option B •• (2 votes)
194
+ - Option C ••• (3 votes)
195
+
196
+ → Proceed with Option A
197
+ ```
198
+
199
+ ### Impact/Effort Matrix
200
+
201
+ ```
202
+ High Impact
203
+
204
+ Quick Wins │ Major Projects
205
+ ──────────────┼──────────────
206
+ Fill-ins │ Money Pits
207
+
208
+ Low Impact
209
+ Low Effort High Effort
210
+ ```
211
+
212
+ ### Affinity Mapping
213
+
214
+ ```markdown
215
+ Group related ideas:
216
+
217
+ [Performance] [Security] [UX]
218
+ - Load time - Auth - Navigation
219
+ - Caching - Encryption - Responsive
220
+ - CDN - Validation - Accessibility
221
+ ```
222
+
223
+ ## Anti-Patterns to Avoid
224
+
225
+ ### Leading Questions
226
+
227
+ ```
228
+ ❌ "Don't you think we should use React?"
229
+ ✅ "What frontend framework are you considering?"
230
+ ```
231
+
232
+ ### Yes/No Questions
233
+
234
+ ```
235
+ ❌ "Do you need authentication?"
236
+ ✅ "Tell me about your authentication requirements."
237
+ ```
238
+
239
+ ### Assumptions
240
+
241
+ ```
242
+ ❌ "I assume you want dark mode."
243
+ ✅ "Do you have preferences for the visual theme?"
244
+ ```
245
+
246
+ ### Solutionizing
247
+
248
+ ```
249
+ ❌ "We should build it with microservices."
250
+ ✅ "What are your scalability requirements?"
251
+ ```
252
+
253
+ ---
254
+
255
+ **Good questions lead to better solutions.**