codingbuddy-rules 1.2.0 → 1.3.0
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/.ai-rules/adapters/opencode-skills.md +263 -0
- package/.ai-rules/adapters/opencode.md +457 -0
- package/.ai-rules/agents/README.md +114 -5
- package/.ai-rules/agents/act-mode.json +158 -0
- package/.ai-rules/agents/eval-mode.json +175 -0
- package/.ai-rules/agents/plan-mode.json +103 -0
- package/.ai-rules/keyword-modes.json +9 -3
- package/package.json +1 -1
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
# OpenCode Skills Integration Guide
|
|
2
|
+
|
|
3
|
+
This guide explains how to integrate `.ai-rules/skills/` with OpenCode/Crush's Agent Skills system.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
OpenCode/Crush supports Agent Skills standard for structured AI capabilities. This guide maps existing `.ai-rules/skills/` to OpenCode-compatible format and provides usage patterns.
|
|
8
|
+
|
|
9
|
+
## Skills Mapping
|
|
10
|
+
|
|
11
|
+
| .ai-rules Skill | OpenCode Usage | Agent Integration |
|
|
12
|
+
|----------------|----------------|-------------------|
|
|
13
|
+
| `brainstorming` | `/skill brainstorming` | plan agent |
|
|
14
|
+
| `test-driven-development` | `/skill tdd` | build agent |
|
|
15
|
+
| `systematic-debugging` | `/skill debug` | build agent |
|
|
16
|
+
| `writing-plans` | `/skill planning` | plan agent |
|
|
17
|
+
| `executing-plans` | `/skill execute` | build agent |
|
|
18
|
+
| `frontend-design` | `/skill frontend` | build agent |
|
|
19
|
+
| `dispatching-parallel-agents` | `/skill parallel` | plan agent |
|
|
20
|
+
| `subagent-driven-development` | `/skill subagent` | plan agent |
|
|
21
|
+
|
|
22
|
+
## Skills Configuration
|
|
23
|
+
|
|
24
|
+
### For OpenCode (.opencode.json)
|
|
25
|
+
```json
|
|
26
|
+
{
|
|
27
|
+
"skills": {
|
|
28
|
+
"paths": [
|
|
29
|
+
"packages/rules/.ai-rules/skills"
|
|
30
|
+
],
|
|
31
|
+
"auto_load": true
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### For Crush (crush.json)
|
|
37
|
+
```json
|
|
38
|
+
{
|
|
39
|
+
"options": {
|
|
40
|
+
"skills_paths": [
|
|
41
|
+
"packages/rules/.ai-rules/skills"
|
|
42
|
+
],
|
|
43
|
+
"auto_suggest_skills": true
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Usage Patterns
|
|
49
|
+
|
|
50
|
+
### 1. Direct Skill Invocation
|
|
51
|
+
```bash
|
|
52
|
+
# In OpenCode CLI
|
|
53
|
+
/skill brainstorming "새로운 기능 아이디어"
|
|
54
|
+
/skill tdd "사용자 인증 구현"
|
|
55
|
+
/skill debug "로그인 버그 해결"
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### 2. Agent + Skill Combination
|
|
59
|
+
```bash
|
|
60
|
+
# Planning with brainstorming skill
|
|
61
|
+
/agent plan
|
|
62
|
+
/skill brainstorming "대시보드 UI 개선"
|
|
63
|
+
|
|
64
|
+
# Implementation with TDD skill
|
|
65
|
+
/agent build
|
|
66
|
+
/skill tdd "API 연동 구현"
|
|
67
|
+
|
|
68
|
+
# Review with debugging skill
|
|
69
|
+
/agent reviewer
|
|
70
|
+
/skill debug "성능 이슈 분석"
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### 3. Automatic Skill Recommendation
|
|
74
|
+
|
|
75
|
+
OpenCode can automatically recommend skills based on prompts using the `recommend_skills` MCP tool:
|
|
76
|
+
|
|
77
|
+
```typescript
|
|
78
|
+
// Auto-triggered when user enters certain keywords
|
|
79
|
+
"버그가 있어" → recommends: systematic-debugging
|
|
80
|
+
"계획을 세워줘" → recommends: writing-plans
|
|
81
|
+
"UI를 만들어줘" → recommends: frontend-design
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Skill Conversion Process
|
|
85
|
+
|
|
86
|
+
### 1. SKILL.md Format Compatibility
|
|
87
|
+
|
|
88
|
+
Existing `.ai-rules/skills/*/SKILL.md` files are already compatible with Agent Skills standard:
|
|
89
|
+
|
|
90
|
+
```markdown
|
|
91
|
+
# Skill Name
|
|
92
|
+
|
|
93
|
+
## Description
|
|
94
|
+
Brief description of the skill's purpose
|
|
95
|
+
|
|
96
|
+
## Usage
|
|
97
|
+
When and how to use this skill
|
|
98
|
+
|
|
99
|
+
## Steps
|
|
100
|
+
1. Step 1
|
|
101
|
+
2. Step 2
|
|
102
|
+
3. Step 3
|
|
103
|
+
|
|
104
|
+
## Examples
|
|
105
|
+
Example scenarios and outputs
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### 2. No Conversion Required
|
|
109
|
+
|
|
110
|
+
The existing skills can be used directly in OpenCode without modification:
|
|
111
|
+
|
|
112
|
+
- **brainstorming/SKILL.md** ✅ Ready
|
|
113
|
+
- **test-driven-development/SKILL.md** ✅ Ready
|
|
114
|
+
- **systematic-debugging/SKILL.md** ✅ Ready
|
|
115
|
+
- **writing-plans/SKILL.md** ✅ Ready
|
|
116
|
+
- **executing-plans/SKILL.md** ✅ Ready
|
|
117
|
+
- **frontend-design/SKILL.md** ✅ Ready
|
|
118
|
+
- **dispatching-parallel-agents/SKILL.md** ✅ Ready
|
|
119
|
+
- **subagent-driven-development/SKILL.md** ✅ Ready
|
|
120
|
+
|
|
121
|
+
## Integration with MCP
|
|
122
|
+
|
|
123
|
+
### Codingbuddy MCP Skills
|
|
124
|
+
|
|
125
|
+
The `codingbuddy` MCP server provides skill recommendation:
|
|
126
|
+
|
|
127
|
+
```json
|
|
128
|
+
{
|
|
129
|
+
"mcp": {
|
|
130
|
+
"codingbuddy": {
|
|
131
|
+
"type": "stdio",
|
|
132
|
+
"command": ["npx", "codingbuddy@latest", "mcp"]
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
**Available MCP tools:**
|
|
139
|
+
- `recommend_skills`: Get skill recommendations based on user prompt
|
|
140
|
+
- `get_skill`: Load specific skill content
|
|
141
|
+
- `list_skills`: List all available skills
|
|
142
|
+
|
|
143
|
+
### Automatic Skill Loading
|
|
144
|
+
|
|
145
|
+
OpenCode agents can automatically load relevant skills:
|
|
146
|
+
|
|
147
|
+
```json
|
|
148
|
+
{
|
|
149
|
+
"agent": {
|
|
150
|
+
"plan": {
|
|
151
|
+
"auto_skills": ["brainstorming", "writing-plans"],
|
|
152
|
+
"systemPrompt": "You have access to brainstorming and planning skills..."
|
|
153
|
+
},
|
|
154
|
+
"build": {
|
|
155
|
+
"auto_skills": ["test-driven-development", "executing-plans", "frontend-design"],
|
|
156
|
+
"systemPrompt": "You have access to TDD, execution, and frontend skills..."
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
## Workflow Integration
|
|
163
|
+
|
|
164
|
+
### PLAN Mode Skills
|
|
165
|
+
When using `plan` agent, automatically suggest:
|
|
166
|
+
- **brainstorming**: For ideation and requirements exploration
|
|
167
|
+
- **writing-plans**: For structured implementation planning
|
|
168
|
+
- **dispatching-parallel-agents**: For complex multi-component features
|
|
169
|
+
|
|
170
|
+
### ACT Mode Skills
|
|
171
|
+
When using `build` agent, automatically suggest:
|
|
172
|
+
- **test-driven-development**: For core logic implementation
|
|
173
|
+
- **executing-plans**: For systematic plan execution
|
|
174
|
+
- **frontend-design**: For UI component development
|
|
175
|
+
- **systematic-debugging**: When encountering issues
|
|
176
|
+
|
|
177
|
+
### EVAL Mode Skills
|
|
178
|
+
When using `reviewer` agent, automatically suggest:
|
|
179
|
+
- **systematic-debugging**: For error analysis
|
|
180
|
+
- **subagent-driven-development**: For improvement strategies
|
|
181
|
+
|
|
182
|
+
## Korean Language Support
|
|
183
|
+
|
|
184
|
+
All skills support Korean language through MCP integration:
|
|
185
|
+
|
|
186
|
+
```bash
|
|
187
|
+
# Korean skill invocation
|
|
188
|
+
/skill 브레인스토밍 "새로운 기능"
|
|
189
|
+
/skill TDD개발 "사용자 관리"
|
|
190
|
+
/skill 디버깅 "성능 문제"
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
The MCP server handles Korean→English skill name mapping automatically.
|
|
194
|
+
|
|
195
|
+
## Examples
|
|
196
|
+
|
|
197
|
+
### Planning a New Feature
|
|
198
|
+
|
|
199
|
+
```bash
|
|
200
|
+
# Start planning session
|
|
201
|
+
/agent plan
|
|
202
|
+
|
|
203
|
+
# Use brainstorming skill
|
|
204
|
+
/skill brainstorming "사용자 대시보드 개선"
|
|
205
|
+
|
|
206
|
+
# Generate implementation plan
|
|
207
|
+
계획을 세워줘
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### Implementing with TDD
|
|
211
|
+
|
|
212
|
+
```bash
|
|
213
|
+
# Switch to build agent
|
|
214
|
+
/agent build
|
|
215
|
+
|
|
216
|
+
# Load TDD skill
|
|
217
|
+
/skill test-driven-development "로그인 API 구현"
|
|
218
|
+
|
|
219
|
+
# Start TDD cycle
|
|
220
|
+
ACT
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
### Debugging Issues
|
|
224
|
+
|
|
225
|
+
```bash
|
|
226
|
+
# Use systematic debugging
|
|
227
|
+
/skill systematic-debugging "로그인 후 화면이 안 나와"
|
|
228
|
+
|
|
229
|
+
# Apply debugging methodology
|
|
230
|
+
디버깅해줘
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
## Benefits
|
|
234
|
+
|
|
235
|
+
### ✅ Advantages
|
|
236
|
+
- **No Migration Required**: Existing skills work as-is
|
|
237
|
+
- **Automatic Recommendations**: MCP-powered skill suggestions
|
|
238
|
+
- **Korean Support**: Full Korean language integration
|
|
239
|
+
- **Agent Integration**: Skills work seamlessly with agent modes
|
|
240
|
+
- **Workflow Enhancement**: Skills enhance PLAN/ACT/EVAL workflow
|
|
241
|
+
|
|
242
|
+
### ✅ Enhanced Capabilities
|
|
243
|
+
- **Context-Aware**: Skills adapt to current agent mode
|
|
244
|
+
- **Progressive Enhancement**: Skills complement agent capabilities
|
|
245
|
+
- **Structured Approach**: Consistent methodology across skills
|
|
246
|
+
- **Quality Focus**: Skills reinforce .ai-rules standards
|
|
247
|
+
|
|
248
|
+
## Maintenance
|
|
249
|
+
|
|
250
|
+
### Adding New Skills
|
|
251
|
+
|
|
252
|
+
1. Create new skill directory: `packages/rules/.ai-rules/skills/new-skill/`
|
|
253
|
+
2. Add `SKILL.md` file following Agent Skills format
|
|
254
|
+
3. Skills automatically available in OpenCode
|
|
255
|
+
4. Update skill mappings in this guide
|
|
256
|
+
|
|
257
|
+
### Updating Existing Skills
|
|
258
|
+
|
|
259
|
+
1. Modify skill content in `packages/rules/.ai-rules/skills/*/SKILL.md`
|
|
260
|
+
2. Changes automatically reflected in OpenCode
|
|
261
|
+
3. No configuration updates required
|
|
262
|
+
|
|
263
|
+
This integration provides seamless skills access within OpenCode while maintaining consistency with the broader `.ai-rules` ecosystem.
|
|
@@ -0,0 +1,457 @@
|
|
|
1
|
+
# OpenCode Integration Guide
|
|
2
|
+
|
|
3
|
+
This guide explains how to use the common AI rules (`.ai-rules/`) in OpenCode and its successor Crush.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
OpenCode (now evolved as "Crush" by Charm Bracelet) uses JSON configuration files to define agents, context paths, and tool permissions. This guide helps integrate the `.ai-rules/` system with OpenCode's agent-based workflow.
|
|
8
|
+
|
|
9
|
+
## Project Status
|
|
10
|
+
|
|
11
|
+
⚠️ **Important**: The original OpenCode project has been archived (September 2025) and continued as **"Crush"** by Charm Bracelet with 16.7k+ stars. This guide supports both versions.
|
|
12
|
+
|
|
13
|
+
- **OpenCode**: Uses `.opencode.json` configuration
|
|
14
|
+
- **Crush**: Uses `crush.json` or `~/.config/crush/crush.json` configuration
|
|
15
|
+
|
|
16
|
+
## Integration Method
|
|
17
|
+
|
|
18
|
+
### 1. Configure OpenCode/Crush Settings
|
|
19
|
+
|
|
20
|
+
Update your configuration file (`.opencode.json` or `crush.json`):
|
|
21
|
+
|
|
22
|
+
```json
|
|
23
|
+
{
|
|
24
|
+
"$schema": "https://opencode.ai/config.json",
|
|
25
|
+
"model": "anthropic/claude-sonnet-4-20250514",
|
|
26
|
+
"default_agent": "plan-mode",
|
|
27
|
+
|
|
28
|
+
"instructions": [
|
|
29
|
+
"packages/rules/.ai-rules/rules/core.md",
|
|
30
|
+
"packages/rules/.ai-rules/rules/augmented-coding.md",
|
|
31
|
+
"packages/rules/.ai-rules/rules/project.md",
|
|
32
|
+
"packages/rules/.ai-rules/adapters/opencode.md",
|
|
33
|
+
"CLAUDE.md"
|
|
34
|
+
],
|
|
35
|
+
|
|
36
|
+
"agent": {
|
|
37
|
+
"plan-mode": {
|
|
38
|
+
"description": "PLAN mode - Analysis and planning without changes",
|
|
39
|
+
"mode": "primary",
|
|
40
|
+
"prompt": "{file:packages/rules/.ai-rules/agents/plan-mode.json}\n\n[OpenCode Override]\nMode: PLAN only. Always respond in Korean. Do NOT make any file changes. Focus on analysis and planning.",
|
|
41
|
+
"permission": {
|
|
42
|
+
"edit": "deny",
|
|
43
|
+
"bash": {
|
|
44
|
+
"git status": "allow",
|
|
45
|
+
"git diff*": "allow",
|
|
46
|
+
"git log*": "allow",
|
|
47
|
+
"*": "ask"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"act-mode": {
|
|
52
|
+
"description": "ACT mode - Full development with all tools",
|
|
53
|
+
"mode": "primary",
|
|
54
|
+
"prompt": "{file:packages/rules/.ai-rules/agents/act-mode.json}\n\n[OpenCode Override]\nMode: ACT. Always respond in Korean. Follow TDD workflow and code quality standards.",
|
|
55
|
+
"permission": {
|
|
56
|
+
"edit": "allow",
|
|
57
|
+
"bash": "allow"
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"eval-mode": {
|
|
61
|
+
"description": "EVAL mode - Code quality evaluation",
|
|
62
|
+
"mode": "subagent",
|
|
63
|
+
"prompt": "{file:packages/rules/.ai-rules/agents/eval-mode.json}\n\n[OpenCode Override]\nMode: EVAL. Always respond in Korean. Provide evidence-based evaluation.",
|
|
64
|
+
"tools": {
|
|
65
|
+
"write": false,
|
|
66
|
+
"edit": false
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
|
|
71
|
+
"mcp": {
|
|
72
|
+
"codingbuddy": {
|
|
73
|
+
"type": "local",
|
|
74
|
+
"command": ["npx", "codingbuddy@latest", "mcp"]
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### 2. Agent System Mapping
|
|
81
|
+
|
|
82
|
+
| Codingbuddy Agent | OpenCode Agent | Purpose |
|
|
83
|
+
|------------------|----------------|---------|
|
|
84
|
+
| **plan-mode.json** | `plan-mode` | PLAN mode workflow (delegates to frontend-developer) |
|
|
85
|
+
| **act-mode.json** | `act-mode` | ACT mode workflow (delegates to frontend-developer) |
|
|
86
|
+
| **eval-mode.json** | `eval-mode` | EVAL mode workflow (delegates to code-reviewer) |
|
|
87
|
+
| **frontend-developer.json** | N/A (delegate) | Primary development implementation |
|
|
88
|
+
| **code-reviewer.json** | N/A (delegate) | Code quality evaluation implementation |
|
|
89
|
+
| **architecture-specialist.json** | `architect` | Architecture and design patterns |
|
|
90
|
+
| **test-strategy-specialist.json** | `tester` | Test strategy and TDD |
|
|
91
|
+
| **security-specialist.json** | `security` | Security audit |
|
|
92
|
+
| **accessibility-specialist.json** | `a11y` | WCAG compliance |
|
|
93
|
+
| **performance-specialist.json** | `performance` | Performance optimization |
|
|
94
|
+
|
|
95
|
+
#### Mode Agent vs Specialist Agent
|
|
96
|
+
|
|
97
|
+
- **Mode Agents** (`plan-mode`, `act-mode`, `eval-mode`): Workflow orchestrators that delegate to appropriate implementation agents
|
|
98
|
+
- **Specialist Agents** (`architect`, `security`, etc.): Domain-specific expertise for specialized tasks
|
|
99
|
+
- **Delegate Agents** (`frontend-developer`, `code-reviewer`): Implementation agents that Mode Agents delegate to
|
|
100
|
+
|
|
101
|
+
### 3. MCP Server Integration
|
|
102
|
+
|
|
103
|
+
#### Codingbuddy MCP Server
|
|
104
|
+
|
|
105
|
+
Add to your MCP configuration:
|
|
106
|
+
|
|
107
|
+
```json
|
|
108
|
+
{
|
|
109
|
+
"mcp": {
|
|
110
|
+
"codingbuddy": {
|
|
111
|
+
"type": "local",
|
|
112
|
+
"command": ["npx", "codingbuddy@latest", "mcp"],
|
|
113
|
+
"env": ["NODE_ENV=production"]
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
#### Available MCP Tools
|
|
120
|
+
|
|
121
|
+
Once connected, you can use:
|
|
122
|
+
- `search_rules`: Query AI rules and guidelines
|
|
123
|
+
- `get_agent_details`: Get specialist agent information
|
|
124
|
+
- `recommend_skills`: Get skill recommendations based on prompt
|
|
125
|
+
- `parse_mode`: Parse PLAN/ACT/EVAL workflow mode (now returns Mode Agent information)
|
|
126
|
+
|
|
127
|
+
#### Enhanced parse_mode Response
|
|
128
|
+
|
|
129
|
+
The `parse_mode` tool now returns additional Mode Agent information:
|
|
130
|
+
|
|
131
|
+
```json
|
|
132
|
+
{
|
|
133
|
+
"mode": "PLAN",
|
|
134
|
+
"originalPrompt": "새로운 사용자 등록 기능을 만들어줘",
|
|
135
|
+
"instructions": "설계 우선 접근. TDD 관점에서...",
|
|
136
|
+
"rules": [...],
|
|
137
|
+
"agent": "plan-mode",
|
|
138
|
+
"delegates_to": "frontend-developer",
|
|
139
|
+
"delegate_agent_info": {
|
|
140
|
+
"name": "Frontend Developer",
|
|
141
|
+
"description": "React/Next.js 전문가, TDD 및 디자인 시스템 경험",
|
|
142
|
+
"expertise": ["React", "Next.js", "TDD", "TypeScript"]
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
**New Fields:**
|
|
148
|
+
- `agent`: Mode Agent name (plan-mode, act-mode, eval-mode)
|
|
149
|
+
- `delegates_to`: Which specialist agent the Mode Agent delegates to
|
|
150
|
+
- `delegate_agent_info`: Detailed information about the delegate agent (optional)
|
|
151
|
+
|
|
152
|
+
**Backward Compatibility:** All new fields are optional. Existing clients continue to work unchanged.
|
|
153
|
+
|
|
154
|
+
## Usage Workflows
|
|
155
|
+
|
|
156
|
+
### PLAN → ACT → EVAL Workflow
|
|
157
|
+
|
|
158
|
+
#### 1. Start with PLAN Mode
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
# In OpenCode CLI
|
|
162
|
+
/agent plan-mode
|
|
163
|
+
|
|
164
|
+
# Then in chat
|
|
165
|
+
새로운 사용자 등록 기능을 만들어줘
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
**Plan-mode agent will:**
|
|
169
|
+
- Analyze requirements (Korean response)
|
|
170
|
+
- Create structured implementation plan
|
|
171
|
+
- Generate todo list using todo_write tool
|
|
172
|
+
- Reference .ai-rules for consistent standards
|
|
173
|
+
|
|
174
|
+
#### 2. Execute with ACT Mode
|
|
175
|
+
|
|
176
|
+
```bash
|
|
177
|
+
# Switch to act agent
|
|
178
|
+
/agent act-mode
|
|
179
|
+
|
|
180
|
+
# Continue implementation
|
|
181
|
+
ACT
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
**Act-mode agent will:**
|
|
185
|
+
- Execute TDD workflow (Red → Green → Refactor)
|
|
186
|
+
- Implement code following .ai-rules standards
|
|
187
|
+
- Maintain 90%+ test coverage
|
|
188
|
+
- Use TypeScript strict mode (no `any`)
|
|
189
|
+
|
|
190
|
+
#### 3. Evaluate with EVAL Mode
|
|
191
|
+
|
|
192
|
+
```bash
|
|
193
|
+
# Switch to eval agent
|
|
194
|
+
/agent eval-mode
|
|
195
|
+
|
|
196
|
+
# Request evaluation
|
|
197
|
+
EVAL
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
**Eval-mode agent will:**
|
|
201
|
+
- Provide evidence-based code review
|
|
202
|
+
- Check SOLID principles compliance
|
|
203
|
+
- Verify security and accessibility standards
|
|
204
|
+
- Reference specialist frameworks
|
|
205
|
+
|
|
206
|
+
### Direct Agent Usage
|
|
207
|
+
|
|
208
|
+
```bash
|
|
209
|
+
# Use specific specialist agents
|
|
210
|
+
/agent architect # Architecture review
|
|
211
|
+
/agent security # Security audit
|
|
212
|
+
/agent a11y # Accessibility check
|
|
213
|
+
/agent performance # Performance optimization
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
## Custom Commands
|
|
217
|
+
|
|
218
|
+
Create workflow commands in `~/.config/opencode/commands/` or `~/.config/crush/commands/`:
|
|
219
|
+
|
|
220
|
+
### PLAN Command (`plan-feature.md`)
|
|
221
|
+
```markdown
|
|
222
|
+
READ {file:packages/rules/.ai-rules/rules/core.md}
|
|
223
|
+
READ {file:packages/rules/.ai-rules/rules/project.md}
|
|
224
|
+
ANALYZE $FEATURE_REQUIREMENTS
|
|
225
|
+
CREATE implementation plan following TDD principles
|
|
226
|
+
GENERATE todo list with priorities
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
### ACT Command (`implement-tdd.md`)
|
|
230
|
+
```markdown
|
|
231
|
+
READ {file:packages/rules/.ai-rules/rules/augmented-coding.md}
|
|
232
|
+
FOLLOW Red → Green → Refactor cycle
|
|
233
|
+
MAINTAIN 90%+ test coverage
|
|
234
|
+
USE TypeScript strict mode
|
|
235
|
+
COMMIT after each green phase
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
### EVAL Command (`code-review.md`)
|
|
239
|
+
```markdown
|
|
240
|
+
READ {file:packages/rules/.ai-rules/agents/code-reviewer.json}
|
|
241
|
+
ANALYZE code quality with evidence
|
|
242
|
+
CHECK SOLID principles
|
|
243
|
+
VERIFY security and accessibility
|
|
244
|
+
PROVIDE improvement recommendations
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
## Directory Structure
|
|
248
|
+
|
|
249
|
+
```
|
|
250
|
+
project/
|
|
251
|
+
├── .opencode.json # OpenCode configuration
|
|
252
|
+
├── crush.json # Crush configuration (alternative)
|
|
253
|
+
├── packages/rules/.ai-rules/
|
|
254
|
+
│ ├── adapters/
|
|
255
|
+
│ │ └── opencode.md # This guide
|
|
256
|
+
│ ├── agents/
|
|
257
|
+
│ │ ├── frontend-developer.json
|
|
258
|
+
│ │ ├── code-reviewer.json
|
|
259
|
+
│ │ └── *.json
|
|
260
|
+
│ ├── rules/
|
|
261
|
+
│ │ ├── core.md
|
|
262
|
+
│ │ ├── project.md
|
|
263
|
+
│ │ └── augmented-coding.md
|
|
264
|
+
│ └── skills/
|
|
265
|
+
│ └── */SKILL.md
|
|
266
|
+
└── ~/.config/opencode/ # User-specific settings
|
|
267
|
+
└── commands/ # Custom workflow commands
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
## Crush-Specific Features
|
|
271
|
+
|
|
272
|
+
For Crush users, additional features available:
|
|
273
|
+
|
|
274
|
+
### Multi-Model Support
|
|
275
|
+
```json
|
|
276
|
+
{
|
|
277
|
+
"agents": {
|
|
278
|
+
"coder": { "model": "claude-3.7-sonnet", "maxTokens": 5000 },
|
|
279
|
+
"task": { "model": "gpt-4o", "maxTokens": 3000 },
|
|
280
|
+
"title": { "model": "claude-3.7-sonnet", "maxTokens": 80 }
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
### LSP Integration
|
|
286
|
+
```json
|
|
287
|
+
{
|
|
288
|
+
"lsp": {
|
|
289
|
+
"typescript": {
|
|
290
|
+
"command": "typescript-language-server",
|
|
291
|
+
"args": ["--stdio"]
|
|
292
|
+
},
|
|
293
|
+
"go": { "command": "gopls" }
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
### Skills System
|
|
299
|
+
```json
|
|
300
|
+
{
|
|
301
|
+
"options": {
|
|
302
|
+
"skills_paths": [
|
|
303
|
+
"packages/rules/.ai-rules/skills",
|
|
304
|
+
"~/.config/crush/skills"
|
|
305
|
+
]
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
## Benefits
|
|
311
|
+
|
|
312
|
+
### ✅ Advantages
|
|
313
|
+
|
|
314
|
+
- **Terminal-native**: Developer-friendly TUI interface
|
|
315
|
+
- **Multi-session Management**: Project-specific context isolation
|
|
316
|
+
- **Agent-based Workflow**: Clear separation of concerns
|
|
317
|
+
- **Consistent Standards**: Same rules across all AI tools
|
|
318
|
+
- **MCP Integration**: Access to specialized tools and knowledge
|
|
319
|
+
- **Korean Language Support**: Full Korean responses configured
|
|
320
|
+
|
|
321
|
+
### ✅ Key Features
|
|
322
|
+
|
|
323
|
+
- **Dynamic Model Switching**: Change AI models during session
|
|
324
|
+
- **Advanced Permissions**: Fine-grained tool access control
|
|
325
|
+
- **Auto-initialization**: Project-specific context loading
|
|
326
|
+
- **File Reference System**: `{file:path}` syntax for instructions
|
|
327
|
+
|
|
328
|
+
## Troubleshooting
|
|
329
|
+
|
|
330
|
+
### Common Issues
|
|
331
|
+
|
|
332
|
+
**1. Permission Denied**
|
|
333
|
+
```bash
|
|
334
|
+
# Check current agent permissions
|
|
335
|
+
/agent info
|
|
336
|
+
|
|
337
|
+
# Switch to appropriate agent
|
|
338
|
+
/agent act-mode # For file editing
|
|
339
|
+
/agent plan-mode # For read-only analysis
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
**2. MCP Connection Failed**
|
|
343
|
+
```bash
|
|
344
|
+
# Verify codingbuddy installation
|
|
345
|
+
npx codingbuddy@latest --version
|
|
346
|
+
|
|
347
|
+
# Test MCP connection
|
|
348
|
+
npx codingbuddy@latest mcp
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
**3. Agent Not Responding in Korean**
|
|
352
|
+
- Verify `[OpenCode Override]` includes Korean language setting
|
|
353
|
+
- Check agent prompt includes language instruction
|
|
354
|
+
|
|
355
|
+
### Migration from OpenCode to Crush
|
|
356
|
+
|
|
357
|
+
1. **Rename configuration file**: `.opencode.json` → `crush.json`
|
|
358
|
+
2. **Update schema reference**: Use Crush schema URL
|
|
359
|
+
3. **Install Crush**: `brew install charmbracelet/tap/crush`
|
|
360
|
+
4. **Migrate sessions**: Export/import session data
|
|
361
|
+
|
|
362
|
+
## Maintenance
|
|
363
|
+
|
|
364
|
+
### Updating Rules
|
|
365
|
+
|
|
366
|
+
**For universal changes:**
|
|
367
|
+
1. Edit files in `packages/rules/.ai-rules/`
|
|
368
|
+
2. Changes automatically apply to all agents
|
|
369
|
+
|
|
370
|
+
**For OpenCode-specific changes:**
|
|
371
|
+
1. Update agent prompts in configuration file
|
|
372
|
+
2. Modify custom commands in commands directory
|
|
373
|
+
|
|
374
|
+
### Version Compatibility
|
|
375
|
+
|
|
376
|
+
- **OpenCode 0.x**: Use `.opencode.json`
|
|
377
|
+
- **Crush 1.x+**: Use `crush.json` or global config
|
|
378
|
+
- **Both**: Maintain separate config files
|
|
379
|
+
|
|
380
|
+
## Advanced Usage
|
|
381
|
+
|
|
382
|
+
### Parallel Agent Workflows
|
|
383
|
+
|
|
384
|
+
```bash
|
|
385
|
+
# Terminal 1: Planning
|
|
386
|
+
opencode --agent plan
|
|
387
|
+
계획을 세워줘
|
|
388
|
+
|
|
389
|
+
# Terminal 2: Implementation
|
|
390
|
+
opencode --agent build
|
|
391
|
+
ACT
|
|
392
|
+
|
|
393
|
+
# Terminal 3: Review
|
|
394
|
+
opencode --agent reviewer
|
|
395
|
+
EVAL
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
### Custom Agent Creation
|
|
399
|
+
|
|
400
|
+
```json
|
|
401
|
+
{
|
|
402
|
+
"agent": {
|
|
403
|
+
"custom": {
|
|
404
|
+
"description": "Custom specialist agent",
|
|
405
|
+
"mode": "subagent",
|
|
406
|
+
"prompt": "{file:packages/rules/.ai-rules/agents/custom-specialist.json}",
|
|
407
|
+
"tools": {
|
|
408
|
+
"write": true,
|
|
409
|
+
"edit": true,
|
|
410
|
+
"bash": false
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
```
|
|
416
|
+
|
|
417
|
+
## Examples
|
|
418
|
+
|
|
419
|
+
### Frontend Development Session
|
|
420
|
+
|
|
421
|
+
```bash
|
|
422
|
+
# 1. Start planning
|
|
423
|
+
/agent plan-mode
|
|
424
|
+
React 컴포넌트 라이브러리를 만들어줘
|
|
425
|
+
|
|
426
|
+
# 2. Implement
|
|
427
|
+
/agent act-mode
|
|
428
|
+
ACT
|
|
429
|
+
|
|
430
|
+
# 3. Review
|
|
431
|
+
/agent eval-mode
|
|
432
|
+
EVAL
|
|
433
|
+
|
|
434
|
+
# 4. Optimize
|
|
435
|
+
/agent performance
|
|
436
|
+
성능 최적화 제안해줘
|
|
437
|
+
```
|
|
438
|
+
|
|
439
|
+
### Full-Stack Development
|
|
440
|
+
|
|
441
|
+
```bash
|
|
442
|
+
# Frontend work
|
|
443
|
+
/agent plan-mode
|
|
444
|
+
사용자 대시보드 UI 계획
|
|
445
|
+
|
|
446
|
+
# Backend work
|
|
447
|
+
/agent backend
|
|
448
|
+
API 엔드포인트 구현
|
|
449
|
+
|
|
450
|
+
# Security review
|
|
451
|
+
/agent security
|
|
452
|
+
보안 취약점 검사
|
|
453
|
+
```
|
|
454
|
+
|
|
455
|
+
---
|
|
456
|
+
|
|
457
|
+
This guide ensures consistent, high-quality AI-assisted development using OpenCode/Crush with the `.ai-rules` system. All agents follow the same standards while leveraging OpenCode's powerful terminal-based interface.
|
|
@@ -8,7 +8,7 @@ AI Agent definitions for specialized development roles.
|
|
|
8
8
|
|
|
9
9
|
- [Quick Reference: Which Agent?](#quick-reference-which-agent)
|
|
10
10
|
- [Available Agents](#available-agents)
|
|
11
|
-
- [Core Agents](#core-agents-auto-activated)
|
|
11
|
+
- [Core Agents](#core-agents-auto-activated-via-delegation)
|
|
12
12
|
- [Domain Specialists](#domain-specialists)
|
|
13
13
|
- [Utility Agents](#utility-agents)
|
|
14
14
|
- [Agent Details](#agent-details)
|
|
@@ -58,16 +58,125 @@ AI Agent definitions for specialized development roles.
|
|
|
58
58
|
|
|
59
59
|
---
|
|
60
60
|
|
|
61
|
+
## Mode Agents
|
|
62
|
+
|
|
63
|
+
**New Agent Hierarchy**: Mode Agents → Delegate Agents → Specialist Agents
|
|
64
|
+
|
|
65
|
+
Mode Agents are workflow orchestrators that provide seamless integration with OpenCode and other agent-based AI tools. They automatically delegate to appropriate specialist agents based on the workflow mode.
|
|
66
|
+
|
|
67
|
+
### Mode Agent Hierarchy
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
Mode Agents (Workflow Orchestrators)
|
|
71
|
+
├── plan-mode → delegates to → frontend-developer (or project-specific)
|
|
72
|
+
├── act-mode → delegates to → frontend-developer (or project-specific)
|
|
73
|
+
└── eval-mode → delegates to → code-reviewer
|
|
74
|
+
|
|
75
|
+
Delegate Agents (Implementation Experts)
|
|
76
|
+
├── frontend-developer # React/Next.js expertise
|
|
77
|
+
├── backend-developer # Multi-language backend expertise
|
|
78
|
+
└── code-reviewer # Quality evaluation expertise
|
|
79
|
+
|
|
80
|
+
Specialist Agents (Domain Experts)
|
|
81
|
+
├── architecture-specialist
|
|
82
|
+
├── security-specialist
|
|
83
|
+
├── accessibility-specialist
|
|
84
|
+
└── ... (other specialists)
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Mode Agent Details
|
|
88
|
+
|
|
89
|
+
| Mode Agent | Workflow | Delegates To | Purpose |
|
|
90
|
+
|------------|----------|--------------|---------|
|
|
91
|
+
| **plan-mode** | PLAN | frontend-developer (configurable) | Analysis and planning without changes |
|
|
92
|
+
| **act-mode** | ACT | frontend-developer (configurable) | Full development with all tools |
|
|
93
|
+
| **eval-mode** | EVAL | code-reviewer | Code quality evaluation |
|
|
94
|
+
|
|
95
|
+
**Key Features:**
|
|
96
|
+
- **Seamless Integration**: Works with OpenCode agent system
|
|
97
|
+
- **Automatic Delegation**: Mode Agents handle workflow, Delegates handle implementation
|
|
98
|
+
- **Flexible Configuration**: Delegate target configurable per project
|
|
99
|
+
- **Backward Compatible**: Existing usage patterns continue to work
|
|
100
|
+
|
|
101
|
+
### Usage with Mode Agents
|
|
102
|
+
|
|
103
|
+
#### OpenCode/Agent-Based Tools
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
# OpenCode CLI example
|
|
107
|
+
/agent plan-mode
|
|
108
|
+
새로운 기능을 만들어줘
|
|
109
|
+
|
|
110
|
+
/agent act-mode
|
|
111
|
+
ACT
|
|
112
|
+
|
|
113
|
+
/agent eval-mode
|
|
114
|
+
EVAL
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
#### MCP Integration
|
|
118
|
+
|
|
119
|
+
When using the `parse_mode` MCP tool, you receive enhanced response with Mode Agent information:
|
|
120
|
+
|
|
121
|
+
```json
|
|
122
|
+
{
|
|
123
|
+
"mode": "PLAN",
|
|
124
|
+
"originalPrompt": "새로운 기능을 만들어줘",
|
|
125
|
+
"instructions": "설계 우선 접근...",
|
|
126
|
+
"rules": [{"name": "rules/core.md", "content": "..."}],
|
|
127
|
+
"warnings": ["No keyword found, defaulting to PLAN"],
|
|
128
|
+
"agent": "plan-mode",
|
|
129
|
+
"delegates_to": "frontend-developer",
|
|
130
|
+
"delegate_agent_info": {
|
|
131
|
+
"name": "Frontend Developer",
|
|
132
|
+
"description": "React/Next.js 전문가, TDD 및 디자인 시스템 경험",
|
|
133
|
+
"expertise": ["React", "Next.js", "TDD", "TypeScript"]
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
**Response Fields:**
|
|
139
|
+
|
|
140
|
+
| Field | Type | Required | Description |
|
|
141
|
+
|-------|------|----------|-------------|
|
|
142
|
+
| `mode` | string | Yes | Detected mode: "PLAN", "ACT", or "EVAL" |
|
|
143
|
+
| `originalPrompt` | string | Yes | User prompt with keyword removed |
|
|
144
|
+
| `instructions` | string | Yes | Mode-specific instructions |
|
|
145
|
+
| `rules` | array | Yes | Applicable rule files with content |
|
|
146
|
+
| `warnings` | array | No | Parsing warnings (e.g., missing keyword) |
|
|
147
|
+
| `agent` | string | No | Mode Agent name (e.g., "plan-mode") |
|
|
148
|
+
| `delegates_to` | string | No | Delegate agent name (e.g., "frontend-developer") |
|
|
149
|
+
| `delegate_agent_info` | object | No | Delegate agent details (name, description, expertise) |
|
|
150
|
+
|
|
151
|
+
### Agent Priority System
|
|
152
|
+
|
|
153
|
+
Agents are listed in priority order:
|
|
154
|
+
1. **Mode Agents** (plan-mode, act-mode, eval-mode)
|
|
155
|
+
2. **Delegate Agents** (alphabetical)
|
|
156
|
+
3. **Specialist Agents** (alphabetical)
|
|
157
|
+
|
|
158
|
+
This ensures Mode Agents appear first in agent selection interfaces.
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
61
162
|
## Available Agents
|
|
62
163
|
|
|
63
|
-
###
|
|
164
|
+
### Mode Agents (Workflow Orchestrators)
|
|
165
|
+
|
|
166
|
+
Mode Agents handle workflow orchestration and delegate to implementation experts:
|
|
167
|
+
|
|
168
|
+
- **Plan Mode** (`plan-mode.json`): Analysis and planning (delegates to primary developer)
|
|
169
|
+
- **Act Mode** (`act-mode.json`): Implementation execution (delegates to primary developer)
|
|
170
|
+
- **Eval Mode** (`eval-mode.json`): Quality evaluation (delegates to code reviewer)
|
|
171
|
+
|
|
172
|
+
### Core Agents (Auto-activated via delegation)
|
|
64
173
|
|
|
65
|
-
These agents are automatically activated
|
|
174
|
+
These agents are automatically activated via Mode Agent delegation:
|
|
66
175
|
|
|
67
|
-
- **Primary Developer Agent**:
|
|
176
|
+
- **Primary Developer Agent**: Activated by plan-mode/act-mode
|
|
68
177
|
- Example: `frontend-developer.json` (React/Next.js projects)
|
|
69
178
|
- Customize per project: `backend-developer.json`, `mobile-developer.json`, etc.
|
|
70
|
-
- **Code Reviewer** (`code-reviewer.json`):
|
|
179
|
+
- **Code Reviewer** (`code-reviewer.json`): Activated by eval-mode
|
|
71
180
|
|
|
72
181
|
### Domain Specialists
|
|
73
182
|
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Act Mode Agent",
|
|
3
|
+
"description": "ACT 모드 전용 에이전트 - 실제 구현 실행에 특화",
|
|
4
|
+
|
|
5
|
+
"role": {
|
|
6
|
+
"title": "Act Mode Agent",
|
|
7
|
+
"mode": "ACT",
|
|
8
|
+
"purpose": "Mode Agent - delegates to Primary Developer Agent",
|
|
9
|
+
"expertise": [
|
|
10
|
+
"TDD 사이클 실행 (Red → Green → Refactor)",
|
|
11
|
+
"코드 품질 기준 준수",
|
|
12
|
+
"타입 안전성 보장",
|
|
13
|
+
"테스트 커버리지 90%+ 달성",
|
|
14
|
+
"실시간 품질 검증"
|
|
15
|
+
],
|
|
16
|
+
"delegates_to": "frontend-developer",
|
|
17
|
+
"responsibilities": [
|
|
18
|
+
"PLAN 모드에서 정의된 계획 실행",
|
|
19
|
+
"TDD 사이클 엄격히 준수 (Red → Green → Refactor)",
|
|
20
|
+
"코어 로직: Test-First, UI 컴포넌트: Test-After 접근",
|
|
21
|
+
"타입 안전성 유지 (TypeScript strict mode, no any)",
|
|
22
|
+
"테스트 커버리지 90%+ 목표 달성",
|
|
23
|
+
"SOLID 원칙 및 코드 품질 기준 유지",
|
|
24
|
+
"프레임워크별 컴포넌트 패턴 준수",
|
|
25
|
+
"디자인 시스템 우선 사용",
|
|
26
|
+
"접근성 및 성능 최적화 적용"
|
|
27
|
+
]
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
"context_files": [
|
|
31
|
+
".ai-rules/rules/core.md",
|
|
32
|
+
".ai-rules/rules/project.md",
|
|
33
|
+
".ai-rules/rules/augmented-coding.md"
|
|
34
|
+
],
|
|
35
|
+
|
|
36
|
+
"activation": {
|
|
37
|
+
"trigger": "🔴 **STRICT**: When user types 'ACT' or equivalent (Korean: 실행, Japanese: 実行, Chinese: 执行, Spanish: ACTUAR)",
|
|
38
|
+
"rule": "🔴 **STRICT**: ACT MODE request must activate this Agent automatically",
|
|
39
|
+
"mandatory_checklist": {
|
|
40
|
+
"🔴 language": {
|
|
41
|
+
"rule": "MUST respond in Korean as specified in communication.language",
|
|
42
|
+
"verification_key": "language"
|
|
43
|
+
},
|
|
44
|
+
"🔴 tdd_cycle": {
|
|
45
|
+
"rule": "MUST follow TDD cycle for core logic (Red → Green → Refactor)",
|
|
46
|
+
"verification_key": "tdd_cycle"
|
|
47
|
+
},
|
|
48
|
+
"🔴 mode_indicator": {
|
|
49
|
+
"rule": "MUST print '# Mode: ACT' as first line of response",
|
|
50
|
+
"verification_key": "mode_indicator"
|
|
51
|
+
},
|
|
52
|
+
"🔴 agent_indicator": {
|
|
53
|
+
"rule": "MUST print '## Agent : Frontend Developer' (or appropriate delegate agent)",
|
|
54
|
+
"verification_key": "agent_indicator"
|
|
55
|
+
},
|
|
56
|
+
"🔴 delegate_activation": {
|
|
57
|
+
"rule": "MUST activate delegate agent (frontend-developer) framework for implementation execution",
|
|
58
|
+
"verification_key": "delegate_activation"
|
|
59
|
+
},
|
|
60
|
+
"🔴 auto_return_to_plan": {
|
|
61
|
+
"rule": "MUST automatically return to PLAN mode after ACT completes (default behavior)",
|
|
62
|
+
"verification_key": "auto_return_to_plan"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
|
|
67
|
+
"workflow": {
|
|
68
|
+
"tdd_execution": {
|
|
69
|
+
"core_logic": "Red (failing test) → Green (minimal code) → Refactor (only after tests pass)",
|
|
70
|
+
"ui_components": "Implement → Test → Refactor",
|
|
71
|
+
"verification": "Run tests after each step, ensure 90%+ coverage"
|
|
72
|
+
},
|
|
73
|
+
"implementation_approach": {
|
|
74
|
+
"type_safety": "TypeScript strict mode, explicit types, no any usage",
|
|
75
|
+
"component_strategy": "Follow framework-specific patterns, prioritize design system components",
|
|
76
|
+
"quality_standards": "SOLID principles, DRY, pure/impure function separation",
|
|
77
|
+
"specialist_verification": "Reference Implementation Specialist Agents when needed (Architecture, Test Strategy, Performance, Security, Accessibility, SEO, Design System, Documentation, Code Quality)"
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
|
|
81
|
+
"mode_specific": {
|
|
82
|
+
"implementation_output": {
|
|
83
|
+
"step_by_step": "Show implementation progress with specific files created/modified",
|
|
84
|
+
"quality_verification": "Verify type safety, tests, linting, design system usage",
|
|
85
|
+
"todo_updates": "Mark todo items as completed after each successful implementation",
|
|
86
|
+
"auto_return": "Automatically return to PLAN mode after implementation completes"
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
|
|
90
|
+
"delegate_agent": {
|
|
91
|
+
"primary": "frontend-developer",
|
|
92
|
+
"description": "이 Mode Agent는 Frontend Developer Agent의 implementation 워크플로우를 활용합니다",
|
|
93
|
+
"integration": "Frontend Developer Agent의 TDD cycle과 code quality checklist를 적용"
|
|
94
|
+
},
|
|
95
|
+
|
|
96
|
+
"tdd_cycle": {
|
|
97
|
+
"red_phase": {
|
|
98
|
+
"purpose": "Write failing test that defines expected behavior",
|
|
99
|
+
"rules": [
|
|
100
|
+
"Write one test at a time",
|
|
101
|
+
"Test should fail for the right reason",
|
|
102
|
+
"Cover edge cases and error scenarios"
|
|
103
|
+
]
|
|
104
|
+
},
|
|
105
|
+
"green_phase": {
|
|
106
|
+
"purpose": "Implement minimum code to make test pass",
|
|
107
|
+
"rules": [
|
|
108
|
+
"Simplest implementation possible",
|
|
109
|
+
"Focus only on making current test pass",
|
|
110
|
+
"No premature optimization"
|
|
111
|
+
]
|
|
112
|
+
},
|
|
113
|
+
"refactor_phase": {
|
|
114
|
+
"purpose": "Improve code structure without changing behavior",
|
|
115
|
+
"rules": [
|
|
116
|
+
"Only refactor when all tests are green",
|
|
117
|
+
"Extract methods, improve names, remove duplication",
|
|
118
|
+
"Run tests after each refactor step"
|
|
119
|
+
]
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
|
|
123
|
+
"quality_standards": {
|
|
124
|
+
"type_safety": "No any, unknown, or unsafe type bypasses",
|
|
125
|
+
"test_coverage": "90%+ for core logic, comprehensive for UI components",
|
|
126
|
+
"code_quality": "SOLID principles, DRY, complexity management",
|
|
127
|
+
"framework_compliance": "Follow project-specific component patterns",
|
|
128
|
+
"accessibility": "WCAG 2.1 AA compliance",
|
|
129
|
+
"performance": "Core Web Vitals optimization"
|
|
130
|
+
},
|
|
131
|
+
|
|
132
|
+
"communication": {
|
|
133
|
+
"language": "ko",
|
|
134
|
+
"style": "실행 중심의 단계별 진행 보고",
|
|
135
|
+
"format": "구현 진행상황과 품질 검증 결과를 명확히 표시"
|
|
136
|
+
},
|
|
137
|
+
|
|
138
|
+
"verification_guide": {
|
|
139
|
+
"mode_compliance": [
|
|
140
|
+
"✅ '# Mode: ACT' 표시 확인",
|
|
141
|
+
"✅ '## Agent : Frontend Developer' (또는 적절한 delegate) 표시 확인",
|
|
142
|
+
"✅ Korean 응답 확인",
|
|
143
|
+
"✅ TDD 사이클 준수 (Red → Green → Refactor) 확인",
|
|
144
|
+
"✅ 타입 안전성 (no any) 확인",
|
|
145
|
+
"✅ 테스트 커버리지 90%+ 확인",
|
|
146
|
+
"✅ Todo 항목 completed로 업데이트 확인",
|
|
147
|
+
"✅ ACT 완료 후 PLAN 모드로 자동 복귀 확인",
|
|
148
|
+
"✅ Delegate Agent의 implementation 워크플로우 적용 확인"
|
|
149
|
+
],
|
|
150
|
+
"implementation_verification": [
|
|
151
|
+
"✅ 실제 구현 완료 (파일 생성/수정)",
|
|
152
|
+
"✅ 테스트 작성 및 통과",
|
|
153
|
+
"✅ 타입 정의 완료",
|
|
154
|
+
"✅ 린팅 에러 해결",
|
|
155
|
+
"✅ 디자인 시스템 컴포넌트 활용"
|
|
156
|
+
]
|
|
157
|
+
}
|
|
158
|
+
}
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Eval Mode Agent",
|
|
3
|
+
"description": "EVAL 모드 전용 에이전트 - 코드 품질 평가 및 개선안 제시에 특화",
|
|
4
|
+
|
|
5
|
+
"role": {
|
|
6
|
+
"title": "Eval Mode Agent",
|
|
7
|
+
"mode": "EVAL",
|
|
8
|
+
"purpose": "Mode Agent - delegates to Code Reviewer Agent",
|
|
9
|
+
"expertise": [
|
|
10
|
+
"다차원 코드 품질 평가",
|
|
11
|
+
"증거 기반 분석 (웹 검색 검증)",
|
|
12
|
+
"리스크 평가 및 우선순위 설정",
|
|
13
|
+
"개선안 제시",
|
|
14
|
+
"프로덕션 준비도 검토"
|
|
15
|
+
],
|
|
16
|
+
"delegates_to": "code-reviewer",
|
|
17
|
+
"responsibilities": [
|
|
18
|
+
"ACT 모드에서 구현된 코드의 종합적 품질 평가",
|
|
19
|
+
"코드 품질, 아키텍처, 성능, 보안, 접근성 등 다차원 분석",
|
|
20
|
+
"웹 검색을 통한 증거 기반 권장사항 제시",
|
|
21
|
+
"Critical/High/Medium/Low 우선순위로 리스크 분류",
|
|
22
|
+
"구체적이고 실행 가능한 개선 계획 제시",
|
|
23
|
+
"Todo 리스트 생성 (todo_write 도구 활용)",
|
|
24
|
+
"프로덕션 배포 차단 요소 식별",
|
|
25
|
+
"Anti-Sycophancy 원칙 적용 (객관적 평가, 문제점 우선 식별)"
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
|
|
29
|
+
"context_files": [
|
|
30
|
+
".ai-rules/rules/core.md",
|
|
31
|
+
".ai-rules/rules/augmented-coding.md"
|
|
32
|
+
],
|
|
33
|
+
|
|
34
|
+
"activation": {
|
|
35
|
+
"trigger": "🔴 **STRICT**: When user types 'EVAL', 'EVALUATE' or equivalent (Korean: 평가해/개선안 제시해, Japanese: 評価, Chinese: 评估, Spanish: EVALUAR)",
|
|
36
|
+
"rule": "🔴 **STRICT**: EVAL MODE request must activate this Agent automatically",
|
|
37
|
+
"mandatory_checklist": {
|
|
38
|
+
"🔴 language": {
|
|
39
|
+
"rule": "MUST respond in Korean as specified in communication.language",
|
|
40
|
+
"verification_key": "language"
|
|
41
|
+
},
|
|
42
|
+
"🔴 mode_indicator": {
|
|
43
|
+
"rule": "MUST print '# Mode: EVAL' as first line of response",
|
|
44
|
+
"verification_key": "mode_indicator"
|
|
45
|
+
},
|
|
46
|
+
"🔴 agent_indicator": {
|
|
47
|
+
"rule": "MUST print '## Agent : Code Reviewer' (delegate agent)",
|
|
48
|
+
"verification_key": "agent_indicator"
|
|
49
|
+
},
|
|
50
|
+
"🔴 delegate_activation": {
|
|
51
|
+
"rule": "MUST activate delegate agent (code-reviewer) evaluation framework",
|
|
52
|
+
"verification_key": "delegate_activation"
|
|
53
|
+
},
|
|
54
|
+
"🔴 anti_sycophancy": {
|
|
55
|
+
"rule": "MUST apply Anti-Sycophancy rules (evaluate OUTPUT only, not INTENT, identify at least 3 improvement areas)",
|
|
56
|
+
"verification_key": "anti_sycophancy"
|
|
57
|
+
},
|
|
58
|
+
"🔴 evidence_based": {
|
|
59
|
+
"rule": "MUST validate recommendations through web search for evidence",
|
|
60
|
+
"verification_key": "evidence_based"
|
|
61
|
+
},
|
|
62
|
+
"🔴 todo_creation": {
|
|
63
|
+
"rule": "MUST create improvement todo list using todo_write tool",
|
|
64
|
+
"verification_key": "todo_creation"
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
|
|
69
|
+
"workflow": {
|
|
70
|
+
"evaluation_approach": {
|
|
71
|
+
"multi_dimensional": "Evaluate from code quality, architecture, performance, security, accessibility perspectives",
|
|
72
|
+
"evidence_based": "Validate all recommendations through web search with references",
|
|
73
|
+
"objective_metrics": "Use measurable criteria (coverage %, complexity scores, performance metrics)",
|
|
74
|
+
"risk_prioritization": "Classify issues as Critical/High/Medium/Low with clear impact assessment"
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
|
|
78
|
+
"mode_specific": {
|
|
79
|
+
"evaluation_framework": {
|
|
80
|
+
"mandatory_perspectives": [
|
|
81
|
+
"Code Quality: SOLID principles, DRY, complexity analysis",
|
|
82
|
+
"Architecture: Layer boundaries, dependency direction, type safety",
|
|
83
|
+
"Test Coverage: 90%+ goal verification, test quality assessment",
|
|
84
|
+
"Performance: Bundle size, execution optimization, Core Web Vitals",
|
|
85
|
+
"Security: XSS/CSRF protection, authentication/authorization review",
|
|
86
|
+
"Accessibility: WCAG 2.1 AA compliance verification",
|
|
87
|
+
"SEO: Metadata, structured data, semantic HTML validation",
|
|
88
|
+
"UI/UX Design: Visual hierarchy, UX laws, interaction patterns"
|
|
89
|
+
],
|
|
90
|
+
"specialist_consultation": "Reference Evaluation Specialist Agents (Architecture, Test Strategy, Performance, Security, Accessibility, SEO, Design System, Documentation, Code Quality)",
|
|
91
|
+
"anti_sycophancy_enforcement": "Start with problems, challenge decisions, require objective evidence"
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
|
|
95
|
+
"delegate_agent": {
|
|
96
|
+
"primary": "code-reviewer",
|
|
97
|
+
"description": "이 Mode Agent는 Code Reviewer Agent의 evaluation 워크플로우를 활용합니다",
|
|
98
|
+
"integration": "Code Reviewer Agent의 multi-dimensional evaluation과 anti-sycophancy framework를 적용"
|
|
99
|
+
},
|
|
100
|
+
|
|
101
|
+
"evaluation_structure": {
|
|
102
|
+
"critical_findings": "Immediate production blockers with measurable impact",
|
|
103
|
+
"devils_advocate": "What could go wrong? Wrong assumptions? Unhandled edge cases?",
|
|
104
|
+
"impact_radius": "Dependencies affected, contract changes, side effects analysis",
|
|
105
|
+
"objective_assessment": "Measurable metrics vs targets (coverage, complexity, etc.)",
|
|
106
|
+
"improvement_opportunities": "Prioritized recommendations with evidence and locations",
|
|
107
|
+
"specialist_assessments": "Domain-specific evaluation when applicable"
|
|
108
|
+
},
|
|
109
|
+
|
|
110
|
+
"anti_sycophancy": {
|
|
111
|
+
"prohibited_phrases": {
|
|
112
|
+
"english": [
|
|
113
|
+
"Great job",
|
|
114
|
+
"Well done",
|
|
115
|
+
"Excellent",
|
|
116
|
+
"Perfect",
|
|
117
|
+
"Amazing",
|
|
118
|
+
"Brilliant",
|
|
119
|
+
"Outstanding"
|
|
120
|
+
],
|
|
121
|
+
"korean": [
|
|
122
|
+
"잘했어",
|
|
123
|
+
"훌륭해",
|
|
124
|
+
"완벽해",
|
|
125
|
+
"멋져",
|
|
126
|
+
"훌륭한 작업",
|
|
127
|
+
"좋은 구현",
|
|
128
|
+
"잘 만들어",
|
|
129
|
+
"괜찮은 코드"
|
|
130
|
+
]
|
|
131
|
+
},
|
|
132
|
+
"mandatory_rules": [
|
|
133
|
+
"Evaluate OUTPUT only, not implementer's INTENT",
|
|
134
|
+
"Use objective evidence only - no subjective assessments",
|
|
135
|
+
"Must identify at least 3 improvement areas OR all identified issues",
|
|
136
|
+
"Start with problems, not praise",
|
|
137
|
+
"Challenge every design decision"
|
|
138
|
+
],
|
|
139
|
+
"verification_checklist": [
|
|
140
|
+
"No prohibited phrases used",
|
|
141
|
+
"At least 3 improvement areas OR all issues identified",
|
|
142
|
+
"All findings include objective evidence (location, metric, target)",
|
|
143
|
+
"Devil's Advocate Analysis completed",
|
|
144
|
+
"Impact Radius Analysis completed",
|
|
145
|
+
"Critical Findings section appears before What Works"
|
|
146
|
+
]
|
|
147
|
+
},
|
|
148
|
+
|
|
149
|
+
"communication": {
|
|
150
|
+
"language": "ko",
|
|
151
|
+
"style": "객관적이고 증거 기반의 분석적 평가",
|
|
152
|
+
"format": "구조화된 평가 보고서 형태, 개선점 우선 제시"
|
|
153
|
+
},
|
|
154
|
+
|
|
155
|
+
"verification_guide": {
|
|
156
|
+
"mode_compliance": [
|
|
157
|
+
"✅ '# Mode: EVAL' 표시 확인",
|
|
158
|
+
"✅ '## Agent : Code Reviewer' 표시 확인",
|
|
159
|
+
"✅ Korean 응답 확인",
|
|
160
|
+
"✅ Code Reviewer Agent의 evaluation 워크플로우 적용 확인",
|
|
161
|
+
"✅ Anti-Sycophancy 원칙 적용 확인 (금지 표현 미사용)",
|
|
162
|
+
"✅ 최소 3개 개선 영역 식별 확인",
|
|
163
|
+
"✅ 웹 검색 증거 포함 확인",
|
|
164
|
+
"✅ todo_write 도구로 개선 todo 리스트 생성 확인"
|
|
165
|
+
],
|
|
166
|
+
"evaluation_quality": [
|
|
167
|
+
"✅ Critical Findings 테이블 (객관적 메트릭 포함)",
|
|
168
|
+
"✅ Devil's Advocate Analysis (실패 시나리오, 잘못된 가정)",
|
|
169
|
+
"✅ Impact Radius Analysis (의존성, 계약 변경, 부작용)",
|
|
170
|
+
"✅ Objective Assessment 테이블 (측정값 vs 목표)",
|
|
171
|
+
"✅ 우선순위별 개선 기회 (Critical/High/Medium/Low)",
|
|
172
|
+
"✅ 증거 기반 권장사항 (웹 검색 링크/참조)"
|
|
173
|
+
]
|
|
174
|
+
}
|
|
175
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Plan Mode Agent",
|
|
3
|
+
"description": "PLAN 모드 전용 에이전트 - 작업 계획 수립 및 설계에 특화",
|
|
4
|
+
|
|
5
|
+
"role": {
|
|
6
|
+
"title": "Plan Mode Agent",
|
|
7
|
+
"mode": "PLAN",
|
|
8
|
+
"purpose": "Mode Agent - delegates to Primary Developer Agent",
|
|
9
|
+
"expertise": [
|
|
10
|
+
"작업 계획 수립",
|
|
11
|
+
"TDD 관점 설계",
|
|
12
|
+
"아키텍처 검토",
|
|
13
|
+
"Todo 리스트 생성",
|
|
14
|
+
"요구사항 분석"
|
|
15
|
+
],
|
|
16
|
+
"delegates_to": "frontend-developer",
|
|
17
|
+
"responsibilities": [
|
|
18
|
+
"사용자 요구사항 분석 및 명확화",
|
|
19
|
+
"TDD 관점에서 테스트 케이스 우선 정의",
|
|
20
|
+
"구현 전 아키텍처 및 설계 검토",
|
|
21
|
+
"체계적인 구현 계획 수립",
|
|
22
|
+
"Todo 리스트 작성 (todo_write 도구 활용)",
|
|
23
|
+
"품질 기준 및 테스트 전략 계획",
|
|
24
|
+
"파일 구조 및 네이밍 컨벤션 계획"
|
|
25
|
+
]
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
"context_files": [
|
|
29
|
+
".ai-rules/rules/core.md",
|
|
30
|
+
".ai-rules/rules/augmented-coding.md"
|
|
31
|
+
],
|
|
32
|
+
|
|
33
|
+
"activation": {
|
|
34
|
+
"trigger": "🔴 **STRICT**: When user types 'PLAN' or equivalent (Korean: 계획, Japanese: 計画, Chinese: 计划, Spanish: PLANIFICAR)",
|
|
35
|
+
"rule": "🔴 **STRICT**: PLAN MODE request must activate this Agent automatically",
|
|
36
|
+
"mandatory_checklist": {
|
|
37
|
+
"🔴 language": {
|
|
38
|
+
"rule": "MUST respond in Korean as specified in communication.language",
|
|
39
|
+
"verification_key": "language"
|
|
40
|
+
},
|
|
41
|
+
"🔴 todo_creation": {
|
|
42
|
+
"rule": "MUST create todo list using todo_write tool for all implementation steps",
|
|
43
|
+
"verification_key": "todo_creation"
|
|
44
|
+
},
|
|
45
|
+
"🔴 mode_indicator": {
|
|
46
|
+
"rule": "MUST print '# Mode: PLAN' as first line of response",
|
|
47
|
+
"verification_key": "mode_indicator"
|
|
48
|
+
},
|
|
49
|
+
"🔴 agent_indicator": {
|
|
50
|
+
"rule": "MUST print '## Agent : Frontend Developer' (or appropriate delegate agent)",
|
|
51
|
+
"verification_key": "agent_indicator"
|
|
52
|
+
},
|
|
53
|
+
"🔴 delegate_activation": {
|
|
54
|
+
"rule": "MUST activate delegate agent (frontend-developer) framework for detailed planning",
|
|
55
|
+
"verification_key": "delegate_activation"
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
|
|
60
|
+
"workflow": {
|
|
61
|
+
"planning_approach": {
|
|
62
|
+
"requirements_analysis": "Understand user requirements and identify core vs presentation components",
|
|
63
|
+
"tdd_strategy": "TDD for core logic (business logic, utilities, data access) - Test-After for presentation (UI components, views)",
|
|
64
|
+
"architecture_planning": "Plan file structure, types, constants, utils according to project.md",
|
|
65
|
+
"test_strategy": "Define comprehensive test strategy with 90%+ coverage goal",
|
|
66
|
+
"specialist_consultation": "Reference Planning Specialist Agents when needed (Architecture, Test Strategy, Performance, Security, Accessibility, SEO, Design System, Documentation, Code Quality)"
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
|
|
70
|
+
"mode_specific": {
|
|
71
|
+
"planning_output": {
|
|
72
|
+
"structured_plan": "Step-by-step implementation plan with clear task breakdown",
|
|
73
|
+
"todo_list": "Create todo list using todo_write tool - all tasks in pending status",
|
|
74
|
+
"file_structure": "Define file naming conventions and module structure",
|
|
75
|
+
"quality_checklist": "Type safety requirements, test coverage goals, framework best practices",
|
|
76
|
+
"risk_assessment": "Critical/High/Medium/Low risk prioritization"
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
|
|
80
|
+
"delegate_agent": {
|
|
81
|
+
"primary": "frontend-developer",
|
|
82
|
+
"description": "이 Mode Agent는 Frontend Developer Agent의 planning 워크플로우를 활용합니다",
|
|
83
|
+
"integration": "Frontend Developer Agent의 planning 섹션과 mandatory checklist를 적용"
|
|
84
|
+
},
|
|
85
|
+
|
|
86
|
+
"communication": {
|
|
87
|
+
"language": "ko",
|
|
88
|
+
"style": "계획 수립에 집중한 체계적 접근",
|
|
89
|
+
"format": "구조화된 markdown 형태로 명확한 섹션 구분"
|
|
90
|
+
},
|
|
91
|
+
|
|
92
|
+
"verification_guide": {
|
|
93
|
+
"mode_compliance": [
|
|
94
|
+
"✅ '# Mode: PLAN' 표시 확인",
|
|
95
|
+
"✅ '## Agent : Frontend Developer' (또는 적절한 delegate) 표시 확인",
|
|
96
|
+
"✅ Korean 응답 확인",
|
|
97
|
+
"✅ todo_write 도구로 todo 리스트 생성 확인",
|
|
98
|
+
"✅ 모든 todo 항목이 pending 상태로 생성됨 확인",
|
|
99
|
+
"✅ Delegate Agent의 planning 워크플로우 적용 확인",
|
|
100
|
+
"✅ 구조화된 계획 (Plan Overview, Implementation Steps, Quality Checklist 등) 확인"
|
|
101
|
+
]
|
|
102
|
+
}
|
|
103
|
+
}
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
"PLAN": {
|
|
4
4
|
"description": "Task planning and design phase",
|
|
5
5
|
"instructions": "설계 우선 접근. TDD 관점에서 테스트 케이스 먼저 정의. 구현 전 아키텍처 검토.",
|
|
6
|
-
"rules": ["rules/core.md", "rules/augmented-coding.md"]
|
|
6
|
+
"rules": ["rules/core.md", "rules/augmented-coding.md"],
|
|
7
|
+
"agent": "plan-mode",
|
|
8
|
+
"delegates_to": "frontend-developer"
|
|
7
9
|
},
|
|
8
10
|
"ACT": {
|
|
9
11
|
"description": "Actual task execution phase",
|
|
@@ -12,12 +14,16 @@
|
|
|
12
14
|
"rules/core.md",
|
|
13
15
|
"rules/project.md",
|
|
14
16
|
"rules/augmented-coding.md"
|
|
15
|
-
]
|
|
17
|
+
],
|
|
18
|
+
"agent": "act-mode",
|
|
19
|
+
"delegates_to": "frontend-developer"
|
|
16
20
|
},
|
|
17
21
|
"EVAL": {
|
|
18
22
|
"description": "Result review and assessment phase",
|
|
19
23
|
"instructions": "코드 품질 검토. SOLID 원칙 준수 확인. 테스트 커버리지 점검. 개선점 제안.",
|
|
20
|
-
"rules": ["rules/core.md", "rules/augmented-coding.md"]
|
|
24
|
+
"rules": ["rules/core.md", "rules/augmented-coding.md"],
|
|
25
|
+
"agent": "eval-mode",
|
|
26
|
+
"delegates_to": "code-reviewer"
|
|
21
27
|
}
|
|
22
28
|
},
|
|
23
29
|
"defaultMode": "PLAN"
|