|
| 1 | +# OpenCode Integration for Codingbuddy |
| 2 | + |
| 3 | +This directory contains OpenCode-specific configuration and templates for integrating with the `.ai-rules` system. |
| 4 | + |
| 5 | +## Quick Start |
| 6 | + |
| 7 | +1. **Use existing configuration**: The main `opencode.json` is already configured |
| 8 | +2. **For Crush users**: Use `crush.json` instead |
| 9 | +3. **Custom commands**: Available in `commands/` directory |
| 10 | + |
| 11 | +## Available Files |
| 12 | + |
| 13 | +### Configuration |
| 14 | +- `../opencode.json` - Main OpenCode configuration with .ai-rules integration |
| 15 | +- `../crush.json` - Crush-compatible configuration |
| 16 | + |
| 17 | +### Custom Commands |
| 18 | +- `commands/plan-feature.md` - PLAN mode workflow command |
| 19 | +- `commands/implement-tdd.md` - ACT mode TDD implementation |
| 20 | +- `commands/code-review.md` - EVAL mode code review |
| 21 | + |
| 22 | +## Usage Examples |
| 23 | + |
| 24 | +### Basic Workflow |
| 25 | +```bash |
| 26 | +# 1. Planning |
| 27 | +/agent plan |
| 28 | +새로운 기능을 계획해줘 |
| 29 | + |
| 30 | +# 2. Implementation |
| 31 | +/agent build |
| 32 | +ACT |
| 33 | + |
| 34 | +# 3. Review |
| 35 | +/agent reviewer |
| 36 | +EVAL |
| 37 | +``` |
| 38 | + |
| 39 | +### Using Skills |
| 40 | +```bash |
| 41 | +/skill brainstorming "대시보드 UI" |
| 42 | +/skill test-driven-development "API 구현" |
| 43 | +/skill systematic-debugging "성능 이슈" |
| 44 | +``` |
| 45 | + |
| 46 | +### Custom Commands |
| 47 | +```bash |
| 48 | +/plan-feature "사용자 인증" |
| 49 | +/implement-tdd |
| 50 | +/code-review |
| 51 | +``` |
| 52 | + |
| 53 | +## Agent Overview |
| 54 | + |
| 55 | +| Agent | Mode | Purpose | |
| 56 | +|-------|------|---------| |
| 57 | +| `plan` | PLAN | Analysis and planning (read-only) | |
| 58 | +| `build` | ACT | Full development with file editing | |
| 59 | +| `reviewer` | EVAL | Code quality evaluation | |
| 60 | +| `architect` | Specialist | Architecture guidance | |
| 61 | +| `security` | Specialist | Security assessment | |
| 62 | +| `performance` | Specialist | Performance optimization | |
| 63 | +| `a11y` | Specialist | Accessibility compliance | |
| 64 | + |
| 65 | +All agents respond in Korean (한국어) and follow .ai-rules standards. |
| 66 | + |
| 67 | +## MCP Integration |
| 68 | + |
| 69 | +The configuration includes these MCP servers: |
| 70 | +- `codingbuddy` - Rules search and agent details |
| 71 | +- `context7` - Documentation lookup |
| 72 | +- `github` - GitHub integration |
| 73 | +- `filesystem` - File system operations |
| 74 | + |
| 75 | +## Troubleshooting |
| 76 | + |
| 77 | +### Common Issues |
| 78 | + |
| 79 | +**Agent not responding in Korean:** |
| 80 | +- Verify OpenCode Override includes Korean setting |
| 81 | +- Check agent prompt configuration |
| 82 | + |
| 83 | +**Permission denied:** |
| 84 | +- Use `/agent build` for file editing |
| 85 | +- Use `/agent plan` for read-only analysis |
| 86 | + |
| 87 | +**MCP connection issues:** |
| 88 | +- Ensure `npx codingbuddy@latest` works |
| 89 | +- Check MCP server logs |
| 90 | + |
| 91 | +### Getting Help |
| 92 | + |
| 93 | +1. Read the full guide: `packages/rules/.ai-rules/adapters/opencode.md` |
| 94 | +2. Check skills documentation: `packages/rules/.ai-rules/adapters/opencode-skills.md` |
| 95 | +3. Review .ai-rules core: `packages/rules/.ai-rules/rules/core.md` |
| 96 | + |
| 97 | +## Migration Notes |
| 98 | + |
| 99 | +### From OpenCode to Crush |
| 100 | +- Copy settings from `opencode.json` to `crush.json` |
| 101 | +- Update schema reference |
| 102 | +- Install Crush: `brew install charmbracelet/tap/crush` |
| 103 | + |
| 104 | +### Adding New Agents |
| 105 | +- Define in `agent` section of configuration |
| 106 | +- Include Korean language override |
| 107 | +- Set appropriate permissions |
| 108 | +- Reference .ai-rules agent JSON files |
0 commit comments