| name | ai-agent-engineer |
| description | Specialist skill for AI agent engineering in the IdeaFlow codebase. Use when (1) improving agent configurations (CMZ.json, oh-my-opencode.json), (2) creating or modifying agent skills, (3) enhancing agent orchestration patterns, (4) implementing self-* capabilities (self-heal, self-learn, self-evolve), (5) working with OpenCode CLI, OhMyOpenCode, or Superpowers frameworks, or (6) labeled issues with 'ai-agent-engineer'. Provides domain-specific knowledge for multi-agent systems, delegation patterns, and agent best practices. Use when this capability is needed. |
| metadata | {"author":"cpa03"} |
AI Agent Engineer
Expert guidance for engineering and improving AI agents in the IdeaFlow multi-agent system.
Domain Scope
This skill covers the ai-agent-engineer domain within IdeaFlow:
| Area | Files | Purpose |
| ------------------- | ------------------------------------------------------------ | --------------------------------------- | ----------------------------- | --------------------- |
| Agent Configuration | .opencode/agents/CMZ.json, .opencode/oh-my-opencode.json | Agent definitions, models, capabilities |
| YH | | Skills Library | .opencode/skills/*/SKILL.md | 33 specialized skills |
| Agent Guidelines | docs/agent-guidelines.md | 10 core principles, workflows |
| System Integration | opencode.json, AGENTS.md | CLI config, documentation |
Agent Architecture
Primary Orchestrator: CMZ
CMZ (Cognitive Meta-Z) is the main orchestrating agent with three core capabilities:
- Self-Heal: Detect errors, diagnose root cause, implement recovery
- Self-Learn: Integrate feedback, analyze outcomes, build knowledge
- Self-Evolve: Expand capabilities, optimize performance, meta-improve
Specialized Agents (OhMyOpenCode)
| Agent | Model | Purpose |
|---|
| Sisyphus | minimax-m2.5-free | Main orchestrator, relentless execution |
| Hephaestus | glm-4.7-free | Autonomous deep worker |
| Oracle | minimax-m2.5-free | Architecture, debugging, reasoning |
| Librarian | glm-4.7-free | Documentation, exploration |
| Explore | glm-4.7-free | Fast codebase search |
Categories
| Category | Model | Use Case |
|---|
| visual-engineering | glm-4.7-free | UI/Frontend work |
| ultrabrain | minimax-m2.5-free | Complex logic, architecture |
| quick | minimax-m2.1-free | Fast, simple tasks |
| deep | minimax-m2.5-free | Thorough analysis |
Delegation Patterns
When to Delegate
Task Type → Delegate To
─────────────────────────────────────
Codebase exploration → explore (background)
Documentation lookup → librarian (background)
Complex reasoning → oracle (blocking)
UI/Frontend work → visual-engineering category
Quick fixes → quick category
Delegation Commands
task(subagent_type="explore", run_in_background=true, prompt="...")
task(subagent_type="oracle", run_in_background=false, prompt="...")
task(category="visual-engineering", load_skills=["frontend-ui-ux"])
Configuration Management
Key Files
| File | Purpose |
|---|
opencode.json | CLI config, model selection, MCP servers |
.opencode/oh-my-opencode.json | Agent definitions, categories, hooks |
.opencode/agents/CMZ.json | CMZ-specific configuration |
Adding a New Agent
- Define in
.opencode/oh-my-opencode.json:
"agents": {
"new_agent": {
"model": "opencode/model-name",
"category": "category-name"
}
}
- Add to CMZ.json if orchestrator integration needed
Adding a New Skill
- Create directory:
.opencode/skills/skill-name/
- Create
SKILL.md with frontmatter (name, description)
- Add references in
references/ if needed
- Follow skill-creator guidelines for structure
Self-* Capabilities
Self-Heal Implementation
Error → Detect → Diagnose → Recover → Learn
- Detect: Monitor for exceptions, failed tests, CI failures
- Diagnose: Use systematic-debugging skill, analyze stack traces
- Recover: Implement fix, verify with tests
- Learn: Document in memory, prevent recurrence
Self-Learn Implementation
Feedback → Analyze → Extract → Apply
- Collect: User feedback, test outcomes, performance metrics
- Analyze: Identify patterns, successful approaches
- Extract: Generalize into reusable patterns
- Apply: Update skills, configs, documentation
Self-Evolve Implementation
Evaluate → Identify → Implement → Verify
- Evaluate: Current capabilities vs requirements
- Identify: Gaps, optimization opportunities
- Implement: New skills, improved delegation
- Verify: Tests pass, metrics improve
Agent Improvement Workflow
RESEARCH → PLAN → IMPLEMENT → VERIFY → SELF-REVIEW → DELIVER
- RESEARCH: Explore codebase, gather context
- PLAN: Create detailed work breakdown
- IMPLEMENT: Make atomic changes
- VERIFY: Run tests, lint, type-check
- SELF-REVIEW: Check against requirements
- DELIVER: Create PR with proper labeling
Verification Checklist
Common Tasks
Improve Agent Configuration
- Read current config from
.opencode/oh-my-opencode.json
- Identify improvement (model change, capability addition)
- Make atomic change
- Verify with
opencode CLI if possible
- Document change in commit message
Create New Skill
- Use
skill-creator skill for guidance
- Run
init_skill.py from skill-creator
- Write SKILL.md with clear frontmatter
- Add references for detailed content
- Validate and test
Fix Agent Issue
- Reproduce issue
- Use
systematic-debugging skill
- Implement minimal fix
- Add regression test
- Verify fix
Reference Files
For detailed patterns and examples, see:
Anti-Patterns
| Anti-Pattern | Why Bad | Instead |
|---|
| Direct main commits | Bypasses review | Use feature branches |
| Skipping tests | Regressions | Always run tests |
| Large atomic changes | Hard to review | Small, focused changes |
| Ignoring CI failures | Ships bugs | Fix all failures |
| Undocumented changes | Knowledge loss | Update documentation |
Source: cpa03/ai-first — distributed by TomeVault.