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,237 +1,39 @@
1
1
  ---
2
2
  name: frontend-design
3
- description: UI/UX patterns, component design, and frontend architecture best practices.
4
- version: 1.0.0
3
+ description: Shape responsive, accessible, intentional UI with strong hierarchy and sensible performance.
5
4
  ---
6
5
 
7
6
  # Frontend Design
8
7
 
9
- Patterns and best practices for building maintainable frontend applications.
8
+ ## Philosophy
9
+ Interface design should clarify the task, not just decorate it.
10
10
 
11
- ## Component Design Principles
11
+ ## Use When
12
+ - You are building UI, layout, components, or responsive behavior.
13
+ - The screen needs better hierarchy, state handling, or accessibility.
14
+ - You want a design direction that feels intentional instead of generic.
12
15
 
13
- ### Single Responsibility
16
+ ## Core Moves
17
+ - Give each screen one clear job.
18
+ - Compose smaller parts instead of building one giant component.
19
+ - Design mobile-first and scale up.
20
+ - Use semantic, accessible markup for interactive content.
21
+ - Treat loading, empty, error, and success states as first-class UI.
14
22
 
15
- ```typescript
16
- // Does too much
17
- function UserDashboard() {
18
- // Fetches data
19
- // Renders charts
20
- // Handles settings
21
- // Manages notifications
22
- }
23
+ ## Default Moves
24
+ - Start with legible hierarchy and strong spacing.
25
+ - Use design tokens or shared styles instead of one-off values.
26
+ - Measure motion and performance; do not animate for decoration alone.
23
27
 
24
- // ✅ Focused components
25
- function UserDashboard() {
26
- return (
27
- <DashboardLayout>
28
- <UserProfile />
29
- <ActivityChart />
30
- <SettingsPanel />
31
- <NotificationList />
32
- </DashboardLayout>
33
- );
34
- }
35
- ```
28
+ ## Anti-Patterns
29
+ - Giant components, prop drilling as a default, div soup, hidden states, and over-animated UIs.
36
30
 
37
- ### Component Composition
31
+ ## Variation
32
+ - Be bolder for marketing, quieter for admin tools, denser for dashboards.
33
+ - Use more motion only when it clarifies or delights the user.
38
34
 
39
- ```typescript
40
- // Prop drilling
41
- <Parent user={user} onUserChange={setUser} />
35
+ ## Output
36
+ - Return the structure, states, accessibility notes, and the visual direction.
42
37
 
43
- // ✅ Composition
44
- <Card>
45
- <CardHeader title="Profile" />
46
- <CardSection>
47
- <UserProfile />
48
- </CardSection>
49
- <CardFooter>
50
- <EditButton />
51
- </CardFooter>
52
- </Card>
53
- ```
54
-
55
- ### Controlled vs Uncontrolled
56
-
57
- ```typescript
58
- // Controlled (parent manages state)
59
- function ControlledInput({ value, onChange }) {
60
- return <input value={value} onChange={onChange} />;
61
- }
62
-
63
- // Uncontrolled (component manages state)
64
- function UncontrolledInput({ defaultValue, onChange }) {
65
- const [value, setValue] = useState(defaultValue);
66
- return <input value={value} onChange={e => setValue(e.target.value)} />;
67
- }
68
- ```
69
-
70
- ## State Management
71
-
72
- ### Local State (Default)
73
-
74
- ```typescript
75
- // Component-level state
76
- const [isOpen, setIsOpen] = useState(false);
77
- const [formData, setFormData] = useState({});
78
- ```
79
-
80
- ### Lift State Up
81
-
82
- ```typescript
83
- // When multiple components need the same state
84
- function Parent() {
85
- const [selected, setSelected] = useState(null);
86
- return (
87
- <>
88
- <List items={items} selected={selected} onSelect={setSelected} />
89
- <Details item={selected} />
90
- </>
91
- );
92
- }
93
- ```
94
-
95
- ### Global State (Zustand)
96
-
97
- ```typescript
98
- const useStore = create((set) => ({
99
- user: null,
100
- setUser: (user) => set({ user }),
101
- logout: () => set({ user: null }),
102
- }));
103
- ```
104
-
105
- ### Server State (React Query)
106
-
107
- ```typescript
108
- const { data, isLoading, error } = useQuery({
109
- queryKey: ['user', userId],
110
- queryFn: () => fetchUser(userId),
111
- staleTime: 5 * 60 * 1000,
112
- });
113
- ```
114
-
115
- ## Styling Patterns
116
-
117
- ### Tailwind Best Practices
118
-
119
- ```typescript
120
- // ❌ Inline everything
121
- <div className="flex flex-col items-center justify-center p-4 m-2 bg-white rounded-lg shadow-md hover:shadow-lg transition-shadow duration-200">
122
-
123
- // ✅ Extract variants with cva
124
- const cardVariants = cva("rounded-lg p-4", {
125
- variants: {
126
- variant: {
127
- default: "bg-white shadow",
128
- outlined: "border border-gray-200",
129
- elevated: "bg-white shadow-lg"
130
- }
131
- }
132
- });
133
-
134
- <div className={cardVariants({ variant })}>
135
- ```
136
-
137
- ### Responsive Design
138
-
139
- ```typescript
140
- // Mobile-first approach
141
- <div className="
142
- p-4 // Mobile: padding
143
- md:p-6 // Tablet: more padding
144
- lg:p-8 // Desktop: even more
145
- grid
146
- grid-cols-1 // Mobile: 1 column
147
- md:grid-cols-2 // Tablet: 2 columns
148
- lg:grid-cols-3 // Desktop: 3 columns
149
- ">
150
- ```
151
-
152
- ## Performance Patterns
153
-
154
- ### Code Splitting
155
-
156
- ```typescript
157
- // Route-based splitting
158
- const Dashboard = lazy(() => import('./Dashboard'));
159
- const Settings = lazy(() => import('./Settings'));
160
-
161
- // Component-based splitting
162
- const HeavyChart = lazy(() => import('./HeavyChart'));
163
- ```
164
-
165
- ### Memoization
166
-
167
- ```typescript
168
- // Only when needed (measure first!)
169
- const MemoizedList = memo(function List({ items }) {
170
- return items.map(item => <Item key={item.id} {...item} />);
171
- });
172
-
173
- // Memoize callbacks
174
- const handleSubmit = useCallback((data) => {
175
- submit(data);
176
- }, [submit]);
177
-
178
- // Memoize computations
179
- const sortedItems = useMemo(() => {
180
- return [...items].sort(compareFn);
181
- }, [items]);
182
- ```
183
-
184
- ### Virtualization
185
-
186
- ```typescript
187
- // For long lists
188
- import { FixedSizeList } from 'react-window';
189
-
190
- function VirtualList({ items }) {
191
- return (
192
- <FixedSizeList height={600} itemCount={items.length} itemSize={50}>
193
- {({ index, style }) => (
194
- <div style={style}>{items[index].name}</div>
195
- )}
196
- </FixedSizeList>
197
- );
198
- }
199
- ```
200
-
201
- ## Accessibility
202
-
203
- ### Semantic HTML
204
-
205
- ```typescript
206
- // ❌ Divs everywhere
207
- <div onClick={handleClick}>Click me</div>
208
-
209
- // ✅ Semantic elements
210
- <button onClick={handleClick}>Click me</button>
211
- ```
212
-
213
- ### ARIA Labels
214
-
215
- ```typescript
216
- <button aria-label="Close dialog" onClick={onClose}>
217
- <XIcon />
218
- </button>
219
-
220
- <div role="alert" aria-live="polite">
221
- {errorMessage}
222
- </div>
223
- ```
224
-
225
- ### Focus Management
226
-
227
- ```typescript
228
- // Trap focus in modal
229
- const modalRef = useRef();
230
- useEffect(() => {
231
- modalRef.current?.focus();
232
- }, []);
233
- ```
234
-
235
- ---
236
-
237
- **Good frontend design balances UX, DX, and performance.**
38
+ ## Remember
39
+ The best UI makes the next click obvious.
@@ -1,195 +1,38 @@
1
1
  ---
2
2
  name: intelligent-routing
3
- description: Automatic agent detection and routing based on task keywords and context.
4
- version: 1.0.0
3
+ description: Route requests to the smallest set of owning agents and announce @ handoffs clearly.
5
4
  ---
6
5
 
7
6
  # Intelligent Routing
8
7
 
9
- Automatically detect which agent(s) should handle a task based on keywords and context.
8
+ ## Philosophy
9
+ Route by ownership, not convenience. Specialists should only see the work they can improve.
10
10
 
11
- ## How It Works
11
+ ## Use When
12
+ - A request touches more than one domain.
13
+ - You need to choose which agent owns the next step.
14
+ - The right specialist is not obvious from the first read.
12
15
 
13
- 1. **Analyze** the user request for keywords and patterns
14
- 2. **Detect** relevant domains (frontend, backend, security, etc.)
15
- 3. **Select** appropriate specialist agent(s)
16
- 4. **Announce** which agent is being used
17
- 5. **Execute** with specialist expertise
16
+ ## Core Moves
17
+ - Detect the intent first, then the domain.
18
+ - Prefer one specialist for one domain, and a small set for multi-domain work.
19
+ - Preserve context in the handoff instead of re-explaining from scratch.
20
+ - Announce the route with explicit @-mentions.
18
21
 
19
- ## Keyword Detection Matrix
22
+ ## Default Moves
23
+ - Single domain -> one specialist.
24
+ - Two or more domains -> feature-lead plus the needed specialists.
25
+ - If uncertain, start with explorer-agent or project-planner before deep work.
20
26
 
21
- ### Frontend
27
+ ## Anti-Patterns
28
+ - Over-routing, sending everything to orchestrator, missing file ownership, and handoff without context.
22
29
 
23
- | Keywords | Agent |
24
- |----------|-------|
25
- | component, react, vue, angular, svelte | `frontend-specialist` |
26
- | css, style, tailwind, scss, styled | `frontend-specialist` |
27
- | ui, ux, design, layout, responsive | `frontend-specialist` |
28
- | page, route, navigation, menu | `frontend-specialist` |
29
- | form, input, button, modal | `frontend-specialist` |
30
- | state, redux, zustand, context | `frontend-specialist` |
30
+ ## Variation
31
+ - Use keyword signals, file ownership, and recent task history together.
32
+ - Escalate security and testing automatically when risk is present.
31
33
 
32
- ### Backend
34
+ ## Output
35
+ - Return the route, the owning agent, and why that choice is the safest default.
33
36
 
34
- | Keywords | Agent |
35
- |----------|-------|
36
- | api, endpoint, route, rest, graphql | `backend-specialist` |
37
- | server, express, fastify, nestjs | `backend-specialist` |
38
- | authentication, auth, login, jwt | `backend-specialist` + `security-auditor` |
39
- | database, sql, prisma, sequelize | `database-architect` |
40
- | migration, schema, table, index | `database-architect` |
41
-
42
- ### Security
43
-
44
- | Keywords | Agent |
45
- |----------|-------|
46
- | security, vulnerability, cve, owasp | `security-auditor` |
47
- | encrypt, decrypt, hash, password | `security-auditor` |
48
- | xss, sql injection, csrf | `security-auditor` |
49
- | penetration, pentest, exploit | `penetration-tester` |
50
- | audit, compliance, gdpr | `security-auditor` |
51
-
52
- ### Testing
53
-
54
- | Keywords | Agent |
55
- |----------|-------|
56
- | test, jest, vitest, mocha | `test-engineer` |
57
- | e2e, playwright, cypress | `test-engineer` |
58
- | coverage, tdd, unit test | `test-engineer` |
59
- | qa, automation, pipeline | `qa-automation-engineer` |
60
-
61
- ### DevOps
62
-
63
- | Keywords | Agent |
64
- |----------|-------|
65
- | deploy, deployment, release | `devops-engineer` |
66
- | docker, container, kubernetes | `devops-engineer` |
67
- | ci/cd, pipeline, github actions | `devops-engineer` |
68
- | infrastructure, terraform, aws | `devops-engineer` |
69
-
70
- ### Performance
71
-
72
- | Keywords | Agent |
73
- |----------|-------|
74
- | performance, slow, optimize, fast | `performance-optimizer` |
75
- | bundle, size, lazy load | `performance-optimizer` |
76
- | lighthouse, core web vitals | `performance-optimizer` |
77
-
78
- ### Debugging
79
-
80
- | Keywords | Agent |
81
- |----------|-------|
82
- | bug, error, fix, broken | `debugger` |
83
- | debug, crash, exception | `debugger` |
84
- | issue, problem, not working | `debugger` |
85
-
86
- ### Planning
87
-
88
- | Keywords | Agent |
89
- |----------|-------|
90
- | plan, roadmap, milestone | `project-planner` |
91
- | feature, requirement, spec | `project-planner` |
92
- | architecture, design, decision | `project-planner` |
93
- | brainstorm, idea, explore | `project-planner` |
94
-
95
- ### Mobile
96
-
97
- | Keywords | Agent |
98
- |----------|-------|
99
- | mobile, ios, android, app | `mobile-developer` |
100
- | react native, flutter, expo | `mobile-developer` |
101
- | app store, play store | `mobile-developer` |
102
-
103
- ### SEO
104
-
105
- | Keywords | Agent |
106
- |----------|-------|
107
- | seo, search, ranking, google | `seo-specialist` |
108
- | meta, sitemap, robots | `seo-specialist` |
109
- | structured data, schema | `seo-specialist` |
110
-
111
- ### Documentation
112
-
113
- | Keywords | Agent |
114
- |----------|-------|
115
- | documentation, docs, readme | `documentation-writer` |
116
- | api docs, reference, guide | `documentation-writer` |
117
-
118
- ### Games
119
-
120
- | Keywords | Agent |
121
- |----------|-------|
122
- | game, unity, godot, unreal | `game-developer` |
123
- | gameplay, mechanics, level | `game-developer` |
124
-
125
- ## Multi-Agent Detection
126
-
127
- When multiple domains are detected, combine agents:
128
-
129
- ### Common Combinations
130
-
131
- | Request Pattern | Agents |
132
- |-----------------|--------|
133
- | "Build a secure API" | `backend-specialist` + `security-auditor` |
134
- | "Create a dashboard with database" | `frontend-specialist` + `database-architect` |
135
- | "Fix slow page with tests" | `performance-optimizer` + `test-engineer` |
136
- | "Deploy with monitoring" | `devops-engineer` + `performance-optimizer` |
137
- | "Mobile app with auth" | `mobile-developer` + `security-auditor` |
138
-
139
- ## Detection Algorithm
140
-
141
- ```typescript
142
- function detectAgents(request: string): Agent[] {
143
- const agents: Agent[] = [];
144
- const keywords = extractKeywords(request);
145
-
146
- // Check each domain
147
- if (matchesAny(keywords, FRONTEND_KEYWORDS)) {
148
- agents.push('frontend-specialist');
149
- }
150
-
151
- if (matchesAny(keywords, BACKEND_KEYWORDS)) {
152
- agents.push('backend-specialist');
153
- }
154
-
155
- if (matchesAny(keywords, SECURITY_KEYWORDS)) {
156
- agents.push('security-auditor');
157
- }
158
-
159
- // ... more domains
160
-
161
- // Default to orchestrator if no specific match
162
- if (agents.length === 0) {
163
- agents.push('orchestrator');
164
- }
165
-
166
- return agents;
167
- }
168
- ```
169
-
170
- ## Announcement Pattern
171
-
172
- When routing to an agent, announce the selection:
173
-
174
- ```
175
- 🤖 Applying @frontend-specialist + @backend-specialist...
176
- ```
177
-
178
- ## Context Passing
179
-
180
- When invoking agents, pass full context:
181
-
182
- ```typescript
183
- invokeAgent('backend-specialist', {
184
- task: 'Create authentication API',
185
- context: {
186
- userRequest: originalRequest,
187
- previousFindings: explorerResults,
188
- constraints: userPreferences
189
- }
190
- });
191
- ```
192
-
193
- ---
194
-
195
- **Intelligent routing ensures users get specialist help without needing to know the agent system.**
37
+ ## Remember
38
+ The best routing is the one the user barely notices.