ai-eng-system 0.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.
- package/LICENSE +21 -0
- package/README.md +115 -0
- package/dist/.claude-plugin/agents/agent-creator.md +206 -0
- package/dist/.claude-plugin/agents/ai_engineer.md +187 -0
- package/dist/.claude-plugin/agents/api_builder_enhanced.md +82 -0
- package/dist/.claude-plugin/agents/architect-advisor.md +88 -0
- package/dist/.claude-plugin/agents/backend_architect.md +88 -0
- package/dist/.claude-plugin/agents/code_reviewer.md +208 -0
- package/dist/.claude-plugin/agents/command-creator.md +331 -0
- package/dist/.claude-plugin/agents/cost_optimizer.md +284 -0
- package/dist/.claude-plugin/agents/database_optimizer.md +175 -0
- package/dist/.claude-plugin/agents/deployment_engineer.md +186 -0
- package/dist/.claude-plugin/agents/docs-writer.md +99 -0
- package/dist/.claude-plugin/agents/documentation_specialist.md +212 -0
- package/dist/.claude-plugin/agents/frontend-reviewer.md +51 -0
- package/dist/.claude-plugin/agents/full_stack_developer.md +391 -0
- package/dist/.claude-plugin/agents/infrastructure_builder.md +77 -0
- package/dist/.claude-plugin/agents/java-pro.md +182 -0
- package/dist/.claude-plugin/agents/ml_engineer.md +176 -0
- package/dist/.claude-plugin/agents/monitoring_expert.md +79 -0
- package/dist/.claude-plugin/agents/performance_engineer.md +193 -0
- package/dist/.claude-plugin/agents/plugin-validator.md +378 -0
- package/dist/.claude-plugin/agents/prompt-optimizer.md +63 -0
- package/dist/.claude-plugin/agents/security_scanner.md +332 -0
- package/dist/.claude-plugin/agents/seo-specialist.md +73 -0
- package/dist/.claude-plugin/agents/skill-creator.md +311 -0
- package/dist/.claude-plugin/agents/test-docs-writer-2.md +46 -0
- package/dist/.claude-plugin/agents/test-docs-writer-usage.md +40 -0
- package/dist/.claude-plugin/agents/test-docs-writer.md +98 -0
- package/dist/.claude-plugin/agents/test_generator.md +260 -0
- package/dist/.claude-plugin/agents/tool-creator.md +474 -0
- package/dist/.claude-plugin/commands/compound.md +26 -0
- package/dist/.claude-plugin/commands/context.md +318 -0
- package/dist/.claude-plugin/commands/create-agent.md +48 -0
- package/dist/.claude-plugin/commands/create-command.md +48 -0
- package/dist/.claude-plugin/commands/create-plugin.md +400 -0
- package/dist/.claude-plugin/commands/create-skill.md +48 -0
- package/dist/.claude-plugin/commands/create-tool.md +53 -0
- package/dist/.claude-plugin/commands/deploy.md +35 -0
- package/dist/.claude-plugin/commands/optimize.md +79 -0
- package/dist/.claude-plugin/commands/plan.md +215 -0
- package/dist/.claude-plugin/commands/recursive-init.md +217 -0
- package/dist/.claude-plugin/commands/research.md +199 -0
- package/dist/.claude-plugin/commands/review.md +73 -0
- package/dist/.claude-plugin/commands/seo.md +40 -0
- package/dist/.claude-plugin/commands/work.md +460 -0
- package/dist/.claude-plugin/hooks.json +15 -0
- package/dist/.claude-plugin/marketplace.json +54 -0
- package/dist/.claude-plugin/plugin.json +24 -0
- package/dist/.claude-plugin/skills/AGENTS.md +37 -0
- package/dist/.claude-plugin/skills/devops/coolify-deploy/SKILL.md +8 -0
- package/dist/.claude-plugin/skills/devops/git-worktree/SKILL.md +11 -0
- package/dist/.claude-plugin/skills/plugin-dev/SKILL.md +322 -0
- package/dist/.claude-plugin/skills/plugin-dev/references/agent-format.md +248 -0
- package/dist/.claude-plugin/skills/plugin-dev/references/claude-code-plugins.md +372 -0
- package/dist/.claude-plugin/skills/plugin-dev/references/command-format.md +312 -0
- package/dist/.claude-plugin/skills/plugin-dev/references/opencode-plugins.md +406 -0
- package/dist/.claude-plugin/skills/plugin-dev/references/opencode-tools.md +470 -0
- package/dist/.claude-plugin/skills/plugin-dev/references/skill-format.md +328 -0
- package/dist/.claude-plugin/skills/prompting/incentive-prompting/SKILL.md +162 -0
- package/dist/.claude-plugin/skills/research/comprehensive-research/SKILL.md +343 -0
- package/dist/.opencode/agent/ai-eng/ai-innovation/ai_engineer.md +186 -0
- package/dist/.opencode/agent/ai-eng/ai-innovation/ml_engineer.md +175 -0
- package/dist/.opencode/agent/ai-eng/ai-innovation/prompt-optimizer.md +62 -0
- package/dist/.opencode/agent/ai-eng/business-analytics/seo-specialist.md +72 -0
- package/dist/.opencode/agent/ai-eng/development/api_builder_enhanced.md +81 -0
- package/dist/.opencode/agent/ai-eng/development/architect-advisor.md +87 -0
- package/dist/.opencode/agent/ai-eng/development/backend_architect.md +87 -0
- package/dist/.opencode/agent/ai-eng/development/database_optimizer.md +174 -0
- package/dist/.opencode/agent/ai-eng/development/docs-writer.md +98 -0
- package/dist/.opencode/agent/ai-eng/development/documentation_specialist.md +211 -0
- package/dist/.opencode/agent/ai-eng/development/frontend-reviewer.md +50 -0
- package/dist/.opencode/agent/ai-eng/development/full_stack_developer.md +390 -0
- package/dist/.opencode/agent/ai-eng/development/java-pro.md +181 -0
- package/dist/.opencode/agent/ai-eng/development/test-docs-writer-2.md +45 -0
- package/dist/.opencode/agent/ai-eng/development/test-docs-writer-usage.md +39 -0
- package/dist/.opencode/agent/ai-eng/development/test-docs-writer.md +97 -0
- package/dist/.opencode/agent/ai-eng/meta/agent-creator.md +208 -0
- package/dist/.opencode/agent/ai-eng/meta/command-creator.md +333 -0
- package/dist/.opencode/agent/ai-eng/meta/skill-creator.md +313 -0
- package/dist/.opencode/agent/ai-eng/meta/tool-creator.md +476 -0
- package/dist/.opencode/agent/ai-eng/operations/cost_optimizer.md +283 -0
- package/dist/.opencode/agent/ai-eng/operations/deployment_engineer.md +185 -0
- package/dist/.opencode/agent/ai-eng/operations/infrastructure_builder.md +76 -0
- package/dist/.opencode/agent/ai-eng/operations/monitoring_expert.md +78 -0
- package/dist/.opencode/agent/ai-eng/quality-testing/code_reviewer.md +207 -0
- package/dist/.opencode/agent/ai-eng/quality-testing/performance_engineer.md +192 -0
- package/dist/.opencode/agent/ai-eng/quality-testing/plugin-validator.md +380 -0
- package/dist/.opencode/agent/ai-eng/quality-testing/security_scanner.md +331 -0
- package/dist/.opencode/agent/ai-eng/quality-testing/test_generator.md +259 -0
- package/dist/.opencode/command/ai-eng/compound.md +26 -0
- package/dist/.opencode/command/ai-eng/context.md +318 -0
- package/dist/.opencode/command/ai-eng/create-agent.md +48 -0
- package/dist/.opencode/command/ai-eng/create-command.md +48 -0
- package/dist/.opencode/command/ai-eng/create-plugin.md +400 -0
- package/dist/.opencode/command/ai-eng/create-skill.md +48 -0
- package/dist/.opencode/command/ai-eng/create-tool.md +53 -0
- package/dist/.opencode/command/ai-eng/deploy.md +35 -0
- package/dist/.opencode/command/ai-eng/optimize.md +79 -0
- package/dist/.opencode/command/ai-eng/plan.md +215 -0
- package/dist/.opencode/command/ai-eng/recursive-init.md +217 -0
- package/dist/.opencode/command/ai-eng/research.md +199 -0
- package/dist/.opencode/command/ai-eng/review.md +73 -0
- package/dist/.opencode/command/ai-eng/seo.md +40 -0
- package/dist/.opencode/command/ai-eng/work.md +460 -0
- package/dist/.opencode/opencode.jsonc +8 -0
- package/dist/.opencode/plugin/ai-eng-system.ts +10 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +13 -0
- package/dist/skills/AGENTS.md +37 -0
- package/dist/skills/devops/coolify-deploy/SKILL.md +8 -0
- package/dist/skills/devops/git-worktree/SKILL.md +11 -0
- package/dist/skills/plugin-dev/SKILL.md +322 -0
- package/dist/skills/plugin-dev/references/agent-format.md +248 -0
- package/dist/skills/plugin-dev/references/claude-code-plugins.md +372 -0
- package/dist/skills/plugin-dev/references/command-format.md +312 -0
- package/dist/skills/plugin-dev/references/opencode-plugins.md +406 -0
- package/dist/skills/plugin-dev/references/opencode-tools.md +470 -0
- package/dist/skills/plugin-dev/references/skill-format.md +328 -0
- package/dist/skills/prompting/incentive-prompting/SKILL.md +162 -0
- package/dist/skills/research/comprehensive-research/SKILL.md +343 -0
- package/package.json +73 -0
|
@@ -0,0 +1,400 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ai-eng/create-plugin
|
|
3
|
+
description: Guided end-to-end plugin creation workflow for OpenCode extensions. Creates plugins, commands, agents, skills, and custom tools with AI assistance. Follows systematic 8-phase process from discovery to documentation.
|
|
4
|
+
agent: plan
|
|
5
|
+
subtask: false
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Plugin Creation Workflow
|
|
9
|
+
|
|
10
|
+
Create a complete, high-quality OpenCode extension from initial concept to tested implementation. Follow a systematic approach: understand requirements, design components, clarify details, implement following best practices, validate, and test.
|
|
11
|
+
|
|
12
|
+
## Core Principles
|
|
13
|
+
|
|
14
|
+
- **Ask clarifying questions**: Identify all ambiguities about plugin purpose, triggering, scope, and components. Ask specific, concrete questions rather than making assumptions. Wait for user answers before proceeding with implementation.
|
|
15
|
+
- **Load relevant skills**: Use skills_plugin_dev to load plugin-dev knowledge when needed
|
|
16
|
+
- **Use specialized agents**: Leverage agent-creator, command-creator, skill-creator, tool-creator, and plugin-validator agents for AI-assisted development
|
|
17
|
+
- **Follow best practices**: Apply patterns from plugin-dev's own implementation
|
|
18
|
+
- **Progressive disclosure**: Create lean skills with references/examples
|
|
19
|
+
- **Use TodoWrite**: Track all progress throughout all phases
|
|
20
|
+
|
|
21
|
+
**Initial request:** $ARGUMENTS
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Phase 1: Discovery
|
|
26
|
+
|
|
27
|
+
**Goal**: Understand what plugin needs to be built and what problem it solves
|
|
28
|
+
|
|
29
|
+
**Actions**:
|
|
30
|
+
1. Create todo list with all 8 phases
|
|
31
|
+
2. If plugin purpose is clear from arguments:
|
|
32
|
+
- Summarize understanding
|
|
33
|
+
- Identify plugin type (integration, workflow, analysis, toolkit, etc.)
|
|
34
|
+
- Determine target platform (OpenCode, Claude Code, or both)
|
|
35
|
+
3. If plugin purpose is unclear, ask user:
|
|
36
|
+
- What problem does this plugin solve?
|
|
37
|
+
- Who will use it and when?
|
|
38
|
+
- What should it do?
|
|
39
|
+
- Any similar plugins to reference?
|
|
40
|
+
- Which platform(s) should it support?
|
|
41
|
+
4. Summarize understanding and confirm with user before proceeding
|
|
42
|
+
|
|
43
|
+
**Output**: Clear statement of plugin purpose and target users
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## Phase 2: Component Planning
|
|
48
|
+
|
|
49
|
+
**Goal**: Determine what plugin components are needed
|
|
50
|
+
|
|
51
|
+
**MUST load plugin-dev skill** using skills_plugin_dev before this phase.
|
|
52
|
+
|
|
53
|
+
**Actions**:
|
|
54
|
+
1. Load plugin-dev skill to understand component types
|
|
55
|
+
2. Analyze plugin requirements and determine needed components:
|
|
56
|
+
- **Plugins**: Does it need plugin-level hooks or events? (OpenCode only)
|
|
57
|
+
- **Commands**: User-initiated actions? (deploy, configure, analyze)
|
|
58
|
+
- **Agents**: Autonomous tasks? (validation, generation, analysis)
|
|
59
|
+
- **Skills**: Specialized knowledge? (domain expertise, patterns)
|
|
60
|
+
- **Custom Tools**: External integrations? (databases, APIs, utilities)
|
|
61
|
+
3. For each component type needed, identify:
|
|
62
|
+
- How many of each type
|
|
63
|
+
- What each one does
|
|
64
|
+
- Rough triggering/usage patterns
|
|
65
|
+
4. Present component plan to user as table:
|
|
66
|
+
```
|
|
67
|
+
| Component Type | Count | Purpose |
|
|
68
|
+
|----------------|-------|---------|
|
|
69
|
+
| Plugins | 1 | OpenCode event hooks |
|
|
70
|
+
| Commands | 3 | Deploy, configure, validate |
|
|
71
|
+
| Agents | 2 | Autonomous validation, generation |
|
|
72
|
+
| Skills | 1 | Database optimization patterns |
|
|
73
|
+
| Custom Tools | 1 | PostgreSQL integration |
|
|
74
|
+
```
|
|
75
|
+
5. Get user confirmation or adjustments
|
|
76
|
+
|
|
77
|
+
**Output**: Confirmed list of components to create
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## Phase 3: Detailed Design & Clarifying Questions
|
|
82
|
+
|
|
83
|
+
**Goal**: Specify each component in detail and resolve all ambiguities
|
|
84
|
+
|
|
85
|
+
**CRITICAL**: This is one of the most important phases. DO NOT SKIP.
|
|
86
|
+
|
|
87
|
+
**Actions**:
|
|
88
|
+
1. For each component in the plan, identify underspecified aspects:
|
|
89
|
+
- **Plugins**: What events should it hook into? What permissions needed?
|
|
90
|
+
- **Commands**: What arguments? What tools? Interactive or automated?
|
|
91
|
+
- **Agents**: When to trigger (proactive/reactive)? What tools? Output format?
|
|
92
|
+
- **Skills**: What triggers them? What knowledge do they provide? How detailed?
|
|
93
|
+
- **Custom Tools**: What external services? Authentication? Data formats?
|
|
94
|
+
2. **Present all questions to user in organized sections** (one section per component type)
|
|
95
|
+
3. **Wait for answers before proceeding to implementation**
|
|
96
|
+
|
|
97
|
+
4. If user says "whatever you think is best", provide specific recommendations and get explicit confirmation
|
|
98
|
+
|
|
99
|
+
**Example questions for a skill**:
|
|
100
|
+
- What specific user queries should trigger this skill?
|
|
101
|
+
- Should it include utility scripts or just guidance?
|
|
102
|
+
- How detailed should the core SKILL.md be vs references/?
|
|
103
|
+
- Any real-world examples to include?
|
|
104
|
+
|
|
105
|
+
**Example questions for an agent**:
|
|
106
|
+
- Should this agent trigger proactively after certain actions, or only when explicitly requested?
|
|
107
|
+
- What tools does it need (read, write, bash, etc.)?
|
|
108
|
+
- What should the output format be?
|
|
109
|
+
- Any specific domain expertise required?
|
|
110
|
+
|
|
111
|
+
**Output**: Detailed specification for each component
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## Phase 4: Structure Creation
|
|
116
|
+
|
|
117
|
+
**Goal**: Create plugin directory structure and manifest
|
|
118
|
+
|
|
119
|
+
**Actions**:
|
|
120
|
+
1. Determine plugin name (kebab-case, descriptive)
|
|
121
|
+
2. Choose plugin location:
|
|
122
|
+
- Ask user: "Where should I create the plugin?"
|
|
123
|
+
- Offer options: current directory, new directory, custom path
|
|
124
|
+
3. Create directory structure using bash:
|
|
125
|
+
```bash
|
|
126
|
+
mkdir -p plugin-name/.opencode/{command,agent,tool,skills}
|
|
127
|
+
mkdir -p plugin-name/.claude-plugin/{commands,agents,skills}
|
|
128
|
+
```
|
|
129
|
+
4. Create plugin.json manifest for Claude Code if needed:
|
|
130
|
+
```json
|
|
131
|
+
{
|
|
132
|
+
"name": "plugin-name",
|
|
133
|
+
"version": "0.1.0",
|
|
134
|
+
"description": "[brief description]",
|
|
135
|
+
"commands": ["./commands/*"],
|
|
136
|
+
"agents": ["./agents/*"],
|
|
137
|
+
"skills": ["./skills/*"]
|
|
138
|
+
}
|
|
139
|
+
```
|
|
140
|
+
5. Create plugin.ts for OpenCode if needed:
|
|
141
|
+
```typescript
|
|
142
|
+
import { Plugin } from "@opencode-ai/plugin"
|
|
143
|
+
export default (async ({ project, client, $, directory, worktree }) => {
|
|
144
|
+
return {
|
|
145
|
+
// Plugin hooks here
|
|
146
|
+
}
|
|
147
|
+
}) satisfies Plugin
|
|
148
|
+
```
|
|
149
|
+
6. Create README.md template
|
|
150
|
+
7. Initialize git repo if creating new directory
|
|
151
|
+
|
|
152
|
+
**Output**: Plugin directory structure created and ready for components
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
## Phase 5: Component Implementation
|
|
157
|
+
|
|
158
|
+
**Goal**: Create each component following best practices
|
|
159
|
+
|
|
160
|
+
**LOAD RELEVANT SKILLS** before implementing each component type:
|
|
161
|
+
- **Commands**: Load plugin-dev skill for command format guidance
|
|
162
|
+
- **Agents**: Load plugin-dev skill for agent creation patterns
|
|
163
|
+
- **Skills**: Load plugin-dev skill for skill structure guidance
|
|
164
|
+
- **Custom Tools**: Load plugin-dev skill for tool development patterns
|
|
165
|
+
- **Plugins**: Load plugin-dev skill for OpenCode plugin events
|
|
166
|
+
|
|
167
|
+
**Actions for each component**:
|
|
168
|
+
|
|
169
|
+
### For Commands:
|
|
170
|
+
1. Use @command-creator agent to generate each command
|
|
171
|
+
2. Save to appropriate location based on context
|
|
172
|
+
3. Validate command format
|
|
173
|
+
|
|
174
|
+
### For Agents:
|
|
175
|
+
1. Use @agent-creator agent to generate each agent
|
|
176
|
+
2. Save to appropriate location based on context
|
|
177
|
+
3. Validate agent format and triggering
|
|
178
|
+
|
|
179
|
+
### For Skills:
|
|
180
|
+
1. Use @skill-creator agent to generate each skill
|
|
181
|
+
2. Create proper directory structure with SKILL.md
|
|
182
|
+
3. Add references/examples as needed
|
|
183
|
+
4. Validate skill format
|
|
184
|
+
|
|
185
|
+
### For Custom Tools:
|
|
186
|
+
1. Use @tool-creator agent to generate each tool
|
|
187
|
+
2. Save to `.opencode/tool/` directory
|
|
188
|
+
3. Validate TypeScript compilation
|
|
189
|
+
|
|
190
|
+
### For Plugins (OpenCode only):
|
|
191
|
+
1. Create plugin.ts with appropriate hooks
|
|
192
|
+
2. Define event handlers for plugin functionality
|
|
193
|
+
3. Test plugin registration
|
|
194
|
+
|
|
195
|
+
**Progress tracking**: Update todos as each component is completed
|
|
196
|
+
|
|
197
|
+
**Output**: All plugin components implemented
|
|
198
|
+
|
|
199
|
+
---
|
|
200
|
+
|
|
201
|
+
## Phase 6: Validation & Quality Check
|
|
202
|
+
|
|
203
|
+
**Goal**: Ensure plugin meets quality standards and works correctly
|
|
204
|
+
|
|
205
|
+
**Actions**:
|
|
206
|
+
1. **Run plugin-validator agent**:
|
|
207
|
+
- Use @plugin-validator to comprehensively validate plugin
|
|
208
|
+
- Check: manifest, structure, naming, components, security
|
|
209
|
+
- Review validation report
|
|
210
|
+
|
|
211
|
+
2. **Fix critical issues**:
|
|
212
|
+
- Address any critical errors from validation
|
|
213
|
+
- Fix any warnings that indicate real problems
|
|
214
|
+
|
|
215
|
+
3. **Review with skill-reviewer** (if plugin has skills):
|
|
216
|
+
- For each skill, use @skill-reviewer agent to check:
|
|
217
|
+
- Description quality, progressive disclosure, writing style
|
|
218
|
+
- Apply recommendations
|
|
219
|
+
|
|
220
|
+
4. **Test component triggering** (if plugin has agents):
|
|
221
|
+
- For each agent, verify triggering examples are clear
|
|
222
|
+
- Check triggering conditions are specific
|
|
223
|
+
- Test agent access and permissions
|
|
224
|
+
|
|
225
|
+
5. **Test command functionality**:
|
|
226
|
+
- Verify commands appear in help and execute correctly
|
|
227
|
+
- Test with various arguments
|
|
228
|
+
- Check shell integration and file references
|
|
229
|
+
|
|
230
|
+
6. **Test skill loading** (if plugin has skills):
|
|
231
|
+
- Verify skills load via opencode-skills plugin
|
|
232
|
+
- Test skill triggering with example queries
|
|
233
|
+
- Check progressive disclosure works
|
|
234
|
+
|
|
235
|
+
7. **Test custom tools** (if plugin has tools):
|
|
236
|
+
- Verify tools compile without TypeScript errors
|
|
237
|
+
- Test tool functionality with sample inputs
|
|
238
|
+
- Check error handling and validation
|
|
239
|
+
|
|
240
|
+
8. **Present findings**:
|
|
241
|
+
- Summary of validation results
|
|
242
|
+
- Any remaining issues
|
|
243
|
+
- Overall quality assessment
|
|
244
|
+
|
|
245
|
+
9. **Ask user**: "Validation complete. Issues found: [count critical], [count warnings]. Would you like me to fix them now, or proceed to testing?"
|
|
246
|
+
|
|
247
|
+
**Output**: Plugin validated and ready for testing
|
|
248
|
+
|
|
249
|
+
---
|
|
250
|
+
|
|
251
|
+
## Phase 7: Testing & Verification
|
|
252
|
+
|
|
253
|
+
**Goal**: Test that plugin works correctly in target environment
|
|
254
|
+
|
|
255
|
+
**Actions**:
|
|
256
|
+
1. **Installation instructions**:
|
|
257
|
+
- Show user how to test locally:
|
|
258
|
+
```bash
|
|
259
|
+
# For OpenCode project-local
|
|
260
|
+
cd /path/to/plugin
|
|
261
|
+
opencode # Plugin loads automatically
|
|
262
|
+
|
|
263
|
+
# For global installation
|
|
264
|
+
./setup-global.sh # Installs to ~/.config/opencode/
|
|
265
|
+
```
|
|
266
|
+
- Or copy to appropriate directory
|
|
267
|
+
- Restart OpenCode to reload components
|
|
268
|
+
|
|
269
|
+
2. **Verification checklist** for user to perform:
|
|
270
|
+
```
|
|
271
|
+
[ ] Commands appear in help and execute correctly
|
|
272
|
+
[ ] Agents trigger on appropriate scenarios
|
|
273
|
+
[ ] Skills load when triggered (if applicable)
|
|
274
|
+
[ ] Custom tools register and function (if applicable)
|
|
275
|
+
[ ] Plugin events work (if applicable)
|
|
276
|
+
[ ] No errors in OpenCode logs
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
3. **Testing recommendations**:
|
|
280
|
+
- For commands: Run with various arguments and edge cases
|
|
281
|
+
- For agents: Create scenarios matching agent examples
|
|
282
|
+
- For skills: Ask questions using trigger phrases from descriptions
|
|
283
|
+
- For tools: Test with different input types and error conditions
|
|
284
|
+
|
|
285
|
+
4. **Ask user**: "I've prepared the plugin for testing. Would you like me to guide you through testing each component, or do you want to test it yourself?"
|
|
286
|
+
|
|
287
|
+
5. **If user wants guidance**, walk through testing each component with specific test cases
|
|
288
|
+
|
|
289
|
+
**Output**: Plugin tested and verified working
|
|
290
|
+
|
|
291
|
+
---
|
|
292
|
+
|
|
293
|
+
## Phase 8: Documentation & Next Steps
|
|
294
|
+
|
|
295
|
+
**Goal**: Ensure plugin is well-documented and ready for distribution
|
|
296
|
+
|
|
297
|
+
**Actions**:
|
|
298
|
+
1. **Verify README completeness**:
|
|
299
|
+
- Check README has: overview, features, installation, prerequisites, usage
|
|
300
|
+
- For custom tools: Document required environment variables
|
|
301
|
+
- For skills: Document triggering phrases and examples
|
|
302
|
+
- For agents: Document when to use and expected behavior
|
|
303
|
+
|
|
304
|
+
2. **Add marketplace entry** (if publishing):
|
|
305
|
+
- Show user how to add to package.json for npm publishing
|
|
306
|
+
- Help draft marketplace description
|
|
307
|
+
- Suggest appropriate keywords and categories
|
|
308
|
+
|
|
309
|
+
3. **Create summary**:
|
|
310
|
+
- Mark all todos complete
|
|
311
|
+
- List what was created:
|
|
312
|
+
- Plugin name and purpose
|
|
313
|
+
- Components created (X skills, Y commands, Z agents, N tools)
|
|
314
|
+
- Key files and their purposes
|
|
315
|
+
- Total file count and structure
|
|
316
|
+
- Next steps:
|
|
317
|
+
- Testing recommendations
|
|
318
|
+
- Publishing to npm (if desired)
|
|
319
|
+
- Iteration based on usage
|
|
320
|
+
|
|
321
|
+
4. **Suggest improvements** (optional):
|
|
322
|
+
- Additional components that could enhance plugin
|
|
323
|
+
- Integration opportunities with existing ai-eng-system components
|
|
324
|
+
- Testing strategies for robustness
|
|
325
|
+
|
|
326
|
+
**Output**: Complete, documented plugin ready for use or publication
|
|
327
|
+
|
|
328
|
+
---
|
|
329
|
+
|
|
330
|
+
## Important Notes
|
|
331
|
+
|
|
332
|
+
### Throughout All Phases
|
|
333
|
+
|
|
334
|
+
- **Use TodoWrite** to track progress at every phase
|
|
335
|
+
- **Load skills with skills_plugin_dev** when working on specific component types
|
|
336
|
+
- **Use specialized agents** (agent-creator, command-creator, skill-creator, tool-creator, plugin-validator)
|
|
337
|
+
- **Ask for user confirmation** at key decision points
|
|
338
|
+
- **Follow plugin-dev's own patterns** as reference examples
|
|
339
|
+
- **Apply best practices**:
|
|
340
|
+
- Third-person descriptions for skills
|
|
341
|
+
- Imperative form in skill bodies
|
|
342
|
+
- Commands written FOR Claude
|
|
343
|
+
- Strong trigger phrases
|
|
344
|
+
- Progressive disclosure
|
|
345
|
+
- Security-first (HTTPS, no hardcoded credentials)
|
|
346
|
+
|
|
347
|
+
### Key Decision Points (Wait for User)
|
|
348
|
+
|
|
349
|
+
1. After Phase 1: Confirm plugin purpose and target platform
|
|
350
|
+
2. After Phase 2: Approve component plan
|
|
351
|
+
3. After Phase 3: Proceed to implementation
|
|
352
|
+
4. After Phase 6: Fix issues or proceed to testing
|
|
353
|
+
5. After Phase 7: Continue to documentation
|
|
354
|
+
|
|
355
|
+
### Skills to Load by Phase
|
|
356
|
+
|
|
357
|
+
- **Phase 2**: plugin-dev (for component planning)
|
|
358
|
+
- **Phase 5**: command-development, agent-development, skill-development, tool-development (as needed)
|
|
359
|
+
- **Phase 6**: (agents will use skills automatically)
|
|
360
|
+
|
|
361
|
+
### Quality Standards
|
|
362
|
+
|
|
363
|
+
Every component must meet these standards:
|
|
364
|
+
- ✅ Follows plugin-dev's proven patterns
|
|
365
|
+
- ✅ Uses correct naming conventions
|
|
366
|
+
- ✅ Has strong trigger conditions (skills/agents)
|
|
367
|
+
- ✅ Includes working examples
|
|
368
|
+
- ✅ Properly documented
|
|
369
|
+
- ✅ Validated with utilities
|
|
370
|
+
- ✅ Tested in target environment
|
|
371
|
+
|
|
372
|
+
---
|
|
373
|
+
|
|
374
|
+
## Example Workflow
|
|
375
|
+
|
|
376
|
+
### User Request
|
|
377
|
+
"Create a plugin for managing database migrations"
|
|
378
|
+
|
|
379
|
+
### Phase 1: Discovery
|
|
380
|
+
- Understand: Migration management, database schema versioning
|
|
381
|
+
- Confirm: User wants to create, run, rollback migrations
|
|
382
|
+
- Target: OpenCode
|
|
383
|
+
|
|
384
|
+
### Phase 2: Component Planning
|
|
385
|
+
- Skills: 1 (migration best practices)
|
|
386
|
+
- Commands: 3 (create-migration, run-migrations, rollback)
|
|
387
|
+
- Agents: 1 (migration-validator)
|
|
388
|
+
- Custom Tools: 1 (database connection)
|
|
389
|
+
|
|
390
|
+
### Phase 3: Clarifying Questions
|
|
391
|
+
- Which databases? (PostgreSQL, MySQL, etc.)
|
|
392
|
+
- Migration file format? (SQL, code-based?)
|
|
393
|
+
- Should agent validate before applying?
|
|
394
|
+
- What database connection details needed?
|
|
395
|
+
|
|
396
|
+
### Phase 4-8: Implementation, Validation, Testing, Documentation
|
|
397
|
+
|
|
398
|
+
---
|
|
399
|
+
|
|
400
|
+
**Begin with Phase 1: Discovery**
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ai-eng/create-skill
|
|
3
|
+
description: Create a new OpenCode skill with AI assistance. Uses skill-creator for intelligent skill generation.
|
|
4
|
+
agent: skill-creator
|
|
5
|
+
subtask: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Create Skill Command
|
|
9
|
+
|
|
10
|
+
Create a new OpenCode skill using AI assistance.
|
|
11
|
+
|
|
12
|
+
## Process
|
|
13
|
+
1. **Understand Requirements**: What domain knowledge should the skill provide?
|
|
14
|
+
2. **Generate Skill**: Use @skill-creator to create properly formatted skill
|
|
15
|
+
3. **Save Skill**: Write to appropriate location
|
|
16
|
+
4. **Validate**: Run basic validation checks
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
/ai-eng/create-skill "database optimization for PostgreSQL"
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Output Location
|
|
25
|
+
|
|
26
|
+
Skill will be saved to:
|
|
27
|
+
- Project-local: `.opencode/skills/[skill-name]/SKILL.md`
|
|
28
|
+
- Global: `~/.config/opencode/skills/[skill-name]/SKILL.md`
|
|
29
|
+
- Ferg content: `content/skills/[skill-name]/SKILL.md`
|
|
30
|
+
|
|
31
|
+
## Examples
|
|
32
|
+
|
|
33
|
+
### Database Skill
|
|
34
|
+
```bash
|
|
35
|
+
/ai-eng/create-skill "database query optimization"
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### API Integration Skill
|
|
39
|
+
```bash
|
|
40
|
+
/ai-eng/create-skill "REST API client for external service"
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Security Skill
|
|
44
|
+
```bash
|
|
45
|
+
/ai-eng/create-skill "security vulnerability scanning"
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
The skill-creator will handle progressive disclosure, proper frontmatter, and ensure compatibility with opencode-skills plugin.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ai-eng/create-tool
|
|
3
|
+
description: Create a new OpenCode custom tool with AI assistance. Uses tool-creator for intelligent TypeScript tool generation.
|
|
4
|
+
agent: tool-creator
|
|
5
|
+
subtask: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Create Tool Command
|
|
9
|
+
|
|
10
|
+
Create a new OpenCode custom tool using AI assistance.
|
|
11
|
+
|
|
12
|
+
## Process
|
|
13
|
+
1. **Understand Requirements**: What functionality should the tool provide?
|
|
14
|
+
2. **Generate Tool**: Use @tool-creator to create properly formatted TypeScript tool
|
|
15
|
+
3. **Save Tool**: Write to appropriate location
|
|
16
|
+
4. **Validate**: Run basic validation checks
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
/ai-eng/create-tool "database query executor with connection pooling"
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Output Location
|
|
25
|
+
|
|
26
|
+
Tool will be saved to:
|
|
27
|
+
- Project-local: `.opencode/tool/[name].ts`
|
|
28
|
+
- Global: `~/.config/opencode/tool/[name].ts`
|
|
29
|
+
- Ferg content: `content/tools/[name].ts`
|
|
30
|
+
|
|
31
|
+
## Examples
|
|
32
|
+
|
|
33
|
+
### Database Tool
|
|
34
|
+
```bash
|
|
35
|
+
/ai-eng/create-tool "PostgreSQL query builder with parameter binding"
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### File Processing Tool
|
|
39
|
+
```bash
|
|
40
|
+
/ai-eng/create-tool "CSV processor with validation and transformation"
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### API Client Tool
|
|
44
|
+
```bash
|
|
45
|
+
/ai-eng/create-tool "REST API client with retry logic and authentication"
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### System Integration Tool
|
|
49
|
+
```bash
|
|
50
|
+
/ai-eng/create-tool "Docker container management with status monitoring"
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
The tool-creator will handle TypeScript compilation, Zod validation, error handling, and OpenCode tool integration patterns.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ai-eng/deploy
|
|
3
|
+
description: Pre-deployment verification and Coolify deployment
|
|
4
|
+
agent: build
|
|
5
|
+
subtask: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Deploy Command
|
|
9
|
+
|
|
10
|
+
Run pre-deployment verification and prepare for Coolify deployment.
|
|
11
|
+
|
|
12
|
+
## Pre-flight Checks
|
|
13
|
+
|
|
14
|
+
- [ ] All tests pass
|
|
15
|
+
- [ ] Type checks pass
|
|
16
|
+
- [ ] Linting passes
|
|
17
|
+
- [ ] Build succeeds
|
|
18
|
+
- [ ] Environment variables configured
|
|
19
|
+
- [ ] Database migrations ready
|
|
20
|
+
- [ ] Performance benchmarks acceptable
|
|
21
|
+
|
|
22
|
+
## Coolify Deployment
|
|
23
|
+
|
|
24
|
+
Provide deployment instructions for Coolify including:
|
|
25
|
+
- Application configuration
|
|
26
|
+
- Environment variable setup
|
|
27
|
+
- Domain/SSL configuration
|
|
28
|
+
- Health check endpoints
|
|
29
|
+
|
|
30
|
+
## Post-Deploy Verification
|
|
31
|
+
|
|
32
|
+
- [ ] Application accessible
|
|
33
|
+
- [ ] Health checks passing
|
|
34
|
+
- [ ] Logs showing normal operation
|
|
35
|
+
- [ ] Key user flows working
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ai-eng/optimize
|
|
3
|
+
description: Optimize a prompt or task description using research-backed techniques
|
|
4
|
+
agent: build
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Optimize Command
|
|
8
|
+
|
|
9
|
+
Transforms any prompt into a more effective version using research-backed incentive prompting techniques from Bsharat et al. (MBZUAI), Google DeepMind, and ICLR 2024 research.
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
/optimize [prompt or task description]
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Process
|
|
18
|
+
|
|
19
|
+
1. **Analyze** the original prompt for:
|
|
20
|
+
- Task complexity (low/medium/high)
|
|
21
|
+
- Domain (technical, creative, analytical, etc.)
|
|
22
|
+
- Missing optimization elements
|
|
23
|
+
|
|
24
|
+
2. **Apply** appropriate techniques:
|
|
25
|
+
- Expert persona assignment (24% → 84% accuracy gains)
|
|
26
|
+
- Step-by-step reasoning priming (+46% accuracy)
|
|
27
|
+
- Stakes/incentive language (+45% quality)
|
|
28
|
+
- Challenge framing (+115% on hard tasks)
|
|
29
|
+
- Self-evaluation request
|
|
30
|
+
|
|
31
|
+
3. **Output** the optimized prompt with:
|
|
32
|
+
- Enhanced version ready to use
|
|
33
|
+
- Techniques applied and why
|
|
34
|
+
- Expected improvement estimate
|
|
35
|
+
|
|
36
|
+
## Example
|
|
37
|
+
|
|
38
|
+
**Input:**
|
|
39
|
+
```
|
|
40
|
+
/optimize Help me fix this database query that's slow
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
**Output:**
|
|
44
|
+
```
|
|
45
|
+
## Optimized Prompt
|
|
46
|
+
|
|
47
|
+
You are a senior database architect with 15 years of PostgreSQL optimization
|
|
48
|
+
experience, having worked at companies like Stripe and Shopify where you
|
|
49
|
+
optimized queries handling millions of transactions daily.
|
|
50
|
+
|
|
51
|
+
Take a deep breath and analyze this step by step. This query optimization
|
|
52
|
+
is critical to our application's performance.
|
|
53
|
+
|
|
54
|
+
[Original query details]
|
|
55
|
+
|
|
56
|
+
Please:
|
|
57
|
+
1. Identify the performance bottleneck
|
|
58
|
+
2. Explain why it's slow
|
|
59
|
+
3. Provide the optimized query with explanation
|
|
60
|
+
4. Rate your confidence in this solution from 0-1
|
|
61
|
+
|
|
62
|
+
## Techniques Applied
|
|
63
|
+
- Expert Persona: Database architect with notable company experience
|
|
64
|
+
- Step-by-Step: "Take a deep breath and analyze step by step"
|
|
65
|
+
- Stakes: "Critical to our application's performance"
|
|
66
|
+
- Self-Evaluation: Confidence rating request
|
|
67
|
+
|
|
68
|
+
## Expected Improvement
|
|
69
|
+
~45-60% improvement for technical optimization tasks based on MBZUAI research.
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Research Basis
|
|
73
|
+
|
|
74
|
+
- **Bsharat et al. (2023)**: 26 principled prompting instructions
|
|
75
|
+
- **Yang et al. (2023)**: "Take a deep breath" optimization
|
|
76
|
+
- **Li et al. (2023)**: Challenge framing techniques
|
|
77
|
+
- **Kong et al. (2023)**: Persona prompting research
|
|
78
|
+
|
|
79
|
+
See `skills/prompting/incentive-prompting/SKILL.md` for full documentation.
|