codingbuddy-rules 1.3.1 → 2.1.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/CHANGELOG.md +50 -11
- package/.ai-rules/adapters/claude-code.md +285 -0
- package/.ai-rules/adapters/cursor.md +120 -98
- package/.ai-rules/adapters/opencode.md +35 -2
- package/.ai-rules/agents/README.md +299 -48
- package/.ai-rules/agents/accessibility-specialist.json +4 -0
- package/.ai-rules/agents/act-mode.json +5 -0
- package/.ai-rules/agents/agent-architect.json +205 -0
- package/.ai-rules/agents/architecture-specialist.json +4 -0
- package/.ai-rules/agents/backend-developer.json +6 -0
- package/.ai-rules/agents/code-quality-specialist.json +4 -0
- package/.ai-rules/agents/code-reviewer.json +5 -0
- package/.ai-rules/agents/data-engineer.json +376 -0
- package/.ai-rules/agents/devops-engineer.json +5 -0
- package/.ai-rules/agents/documentation-specialist.json +4 -0
- package/.ai-rules/agents/eval-mode.json +5 -0
- package/.ai-rules/agents/frontend-developer.json +6 -0
- package/.ai-rules/agents/i18n-specialist.json +393 -0
- package/.ai-rules/agents/mobile-developer.json +355 -0
- package/.ai-rules/agents/performance-specialist.json +4 -0
- package/.ai-rules/agents/plan-mode.json +5 -0
- package/.ai-rules/agents/security-specialist.json +4 -0
- package/.ai-rules/agents/seo-specialist.json +4 -0
- package/.ai-rules/agents/solution-architect.json +181 -0
- package/.ai-rules/agents/technical-planner.json +217 -0
- package/.ai-rules/agents/test-strategy-specialist.json +4 -0
- package/.ai-rules/agents/tooling-engineer.json +202 -0
- package/.ai-rules/agents/ui-ux-designer.json +4 -0
- package/.ai-rules/checklists/accessibility.json +132 -0
- package/.ai-rules/checklists/code-quality.json +97 -0
- package/.ai-rules/checklists/index.json +47 -0
- package/.ai-rules/checklists/performance.json +97 -0
- package/.ai-rules/checklists/security.json +119 -0
- package/.ai-rules/checklists/seo.json +97 -0
- package/.ai-rules/checklists/testing.json +97 -0
- package/.ai-rules/keyword-modes.json +17 -3
- package/.ai-rules/skills/api-design/SKILL.md +459 -0
- package/package.json +1 -1
package/.ai-rules/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,55 @@ All notable changes to the Multi-AI Coding Assistant Common Rules System will be
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [2.0.0] - 2026-01-06
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- **PLAN Mode Primary Agents** with intent-based resolution
|
|
13
|
+
- `solution-architect.json`: High-level system design and architecture planning
|
|
14
|
+
- `technical-planner.json`: Low-level implementation planning with TDD and bite-sized tasks
|
|
15
|
+
- Intent-based automatic selection between architects based on prompt analysis
|
|
16
|
+
- Support for Korean and English intent patterns
|
|
17
|
+
|
|
18
|
+
- **AI Model Selection and Resolution**
|
|
19
|
+
- CLI init prompt for model selection (Sonnet/Opus/Haiku)
|
|
20
|
+
- `ai.defaultModel` configuration field in `codingbuddy.config.js`
|
|
21
|
+
- Agent-level model preferences with priority resolution (agent > mode > system)
|
|
22
|
+
- `resolvedModel` field in MCP tool responses
|
|
23
|
+
|
|
24
|
+
- **Parallel Agent Execution Support**
|
|
25
|
+
- `get_agent_system_prompt` MCP tool for generating subagent prompts
|
|
26
|
+
- `prepare_parallel_agents` MCP tool for batch agent preparation
|
|
27
|
+
- `parallelAgentsRecommendation` in `parse_mode` response
|
|
28
|
+
- Default specialist lists per mode (PLAN/ACT/EVAL)
|
|
29
|
+
|
|
30
|
+
- **Dynamic Language Configuration**
|
|
31
|
+
- `LanguageService` supporting 10 languages (ko, en, ja, zh, es, de, fr, pt, ru, hi)
|
|
32
|
+
- `languageInstruction` field in `parse_mode` response
|
|
33
|
+
- Automatic language detection from project config
|
|
34
|
+
|
|
35
|
+
- **Agent Activation Transparency**
|
|
36
|
+
- `ActivationMessageBuilder` for clear agent activation reporting
|
|
37
|
+
- `activation_message` field showing active agents with tiers
|
|
38
|
+
|
|
39
|
+
### Changed
|
|
40
|
+
|
|
41
|
+
- **Primary Agent Resolution**
|
|
42
|
+
- Extended `PrimaryAgentSource` type to include `intent`
|
|
43
|
+
- Priority order: explicit > config > intent > context > default
|
|
44
|
+
- Centralized Primary Agent constants with `_LIST` variants
|
|
45
|
+
|
|
46
|
+
- **Token Usage Optimization**
|
|
47
|
+
- Mode-based `core.md` filtering to reduce token consumption
|
|
48
|
+
- Shared `ResponseUtils` for consolidated response generation
|
|
49
|
+
|
|
50
|
+
### Fixed
|
|
51
|
+
|
|
52
|
+
- Canary deployment timestamp mismatch bug
|
|
53
|
+
- Type assertions replaced with proper typing in keyword service
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
8
57
|
## [1.0.0] - 2025-11-20
|
|
9
58
|
|
|
10
59
|
### Added
|
|
@@ -48,18 +97,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
48
97
|
|
|
49
98
|
## [Unreleased]
|
|
50
99
|
|
|
51
|
-
### Added
|
|
52
|
-
- **Clarification Phase** for PLAN mode (`rules/clarification-guide.md`)
|
|
53
|
-
- Optional phase triggered when AI detects ambiguous requirements
|
|
54
|
-
- Sequential Q&A with progress indicator (Question N/M format)
|
|
55
|
-
- Multiple-choice questions preferred for easy response
|
|
56
|
-
- Ambiguity assessment checklist (6 categories, triggers on 2+ unclear)
|
|
57
|
-
- Question count guidelines (2-7 questions based on complexity)
|
|
58
|
-
- Korean/English output format support
|
|
59
|
-
- Updated `rules/core.md` with Clarification Phase section
|
|
60
|
-
|
|
61
100
|
### Planned
|
|
62
|
-
- Real-world usage testing across all
|
|
101
|
+
- Real-world usage testing across all 7 AI tools (including OpenCode)
|
|
63
102
|
- Performance metrics collection
|
|
64
103
|
- User feedback integration
|
|
65
104
|
- Advanced examples and use cases
|
|
@@ -165,3 +165,288 @@ recommend_skills({ prompt: "Build a dashboard component" })
|
|
|
165
165
|
**Supported Languages:** English, Korean, Japanese, Chinese, Spanish
|
|
166
166
|
|
|
167
167
|
The tool returns skill recommendations with confidence levels (high/medium) and matched patterns for transparency.
|
|
168
|
+
|
|
169
|
+
## Agent Hierarchy
|
|
170
|
+
|
|
171
|
+
CodingBuddy uses a layered agent hierarchy for different types of tasks:
|
|
172
|
+
|
|
173
|
+
### Tier 1: Primary Agents (Mode-specific)
|
|
174
|
+
|
|
175
|
+
| Mode | Agents | Description |
|
|
176
|
+
|------|--------|-------------|
|
|
177
|
+
| **PLAN** | solution-architect, technical-planner | Design and planning tasks |
|
|
178
|
+
| **ACT** | tooling-engineer, frontend-developer, backend-developer, devops-engineer, agent-architect | Implementation tasks |
|
|
179
|
+
| **EVAL** | code-reviewer | Code review and evaluation |
|
|
180
|
+
|
|
181
|
+
> **Note**: `tooling-engineer` has highest priority for config/build tool tasks (tsconfig, eslint, vite.config, package.json, etc.)
|
|
182
|
+
|
|
183
|
+
### Tier 2: Specialist Agents
|
|
184
|
+
|
|
185
|
+
Specialist agents can be invoked by any Primary Agent as needed:
|
|
186
|
+
|
|
187
|
+
- security-specialist
|
|
188
|
+
- accessibility-specialist
|
|
189
|
+
- performance-specialist
|
|
190
|
+
- test-strategy-specialist
|
|
191
|
+
- documentation-specialist
|
|
192
|
+
- architecture-specialist
|
|
193
|
+
- code-quality-specialist
|
|
194
|
+
- seo-specialist
|
|
195
|
+
- design-system-specialist
|
|
196
|
+
|
|
197
|
+
### Agent Resolution
|
|
198
|
+
|
|
199
|
+
1. **PLAN mode**: Always uses `solution-architect` or `technical-planner` based on prompt analysis
|
|
200
|
+
2. **ACT mode**: Resolution priority:
|
|
201
|
+
1. Explicit agent request in prompt (e.g., "backend-developer로 작업해")
|
|
202
|
+
2. `recommended_agent` parameter (from PLAN mode recommendation)
|
|
203
|
+
3. Tooling pattern matching (config files, build tools → `tooling-engineer`)
|
|
204
|
+
4. Project configuration (`primaryAgent` setting)
|
|
205
|
+
5. Context inference (file extension/path)
|
|
206
|
+
6. Default: `frontend-developer`
|
|
207
|
+
3. **EVAL mode**: Always uses `code-reviewer`
|
|
208
|
+
|
|
209
|
+
### Using recommended_agent Parameter
|
|
210
|
+
|
|
211
|
+
When transitioning from PLAN to ACT mode, pass the recommended agent:
|
|
212
|
+
|
|
213
|
+
```typescript
|
|
214
|
+
// After PLAN mode returns recommended_act_agent
|
|
215
|
+
const planResult = await parse_mode({ prompt: "PLAN design auth API" });
|
|
216
|
+
// planResult.recommended_act_agent = { agentName: "backend-developer", ... }
|
|
217
|
+
|
|
218
|
+
// Pass to ACT mode for context preservation
|
|
219
|
+
const actResult = await parse_mode({
|
|
220
|
+
prompt: "ACT implement the API",
|
|
221
|
+
recommended_agent: planResult.recommended_act_agent.agentName
|
|
222
|
+
});
|
|
223
|
+
// actResult.delegates_to = "backend-developer" (uses the recommendation)
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
This enables seamless agent context passing across PLAN → ACT workflow transitions.
|
|
227
|
+
|
|
228
|
+
## Activation Messages
|
|
229
|
+
|
|
230
|
+
When agents or skills are activated, CodingBuddy displays activation messages for transparency:
|
|
231
|
+
|
|
232
|
+
### Output Format
|
|
233
|
+
|
|
234
|
+
```
|
|
235
|
+
🤖 solution-architect [Primary Agent]
|
|
236
|
+
👤 security-specialist [Specialist] (by solution-architect)
|
|
237
|
+
⚡ brainstorming [Specialist] (by technical-planner)
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
### Icons
|
|
241
|
+
|
|
242
|
+
| Icon | Meaning |
|
|
243
|
+
|------|---------|
|
|
244
|
+
| 🤖 | Primary Agent |
|
|
245
|
+
| 👤 | Specialist Agent |
|
|
246
|
+
| ⚡ | Skill |
|
|
247
|
+
|
|
248
|
+
### ParseMode Response Fields
|
|
249
|
+
|
|
250
|
+
The `parse_mode` MCP tool returns these agent-related fields:
|
|
251
|
+
|
|
252
|
+
```json
|
|
253
|
+
{
|
|
254
|
+
"mode": "PLAN",
|
|
255
|
+
"delegates_to": "solution-architect",
|
|
256
|
+
"primary_agent_source": "intent",
|
|
257
|
+
"activation_message": {
|
|
258
|
+
"formatted": "🤖 solution-architect [Primary Agent]",
|
|
259
|
+
"activations": [
|
|
260
|
+
{
|
|
261
|
+
"type": "agent",
|
|
262
|
+
"name": "solution-architect",
|
|
263
|
+
"tier": "primary",
|
|
264
|
+
"timestamp": "2024-01-06T12:00:00Z"
|
|
265
|
+
}
|
|
266
|
+
]
|
|
267
|
+
},
|
|
268
|
+
"recommended_act_agent": {
|
|
269
|
+
"agentName": "backend-developer",
|
|
270
|
+
"reason": "API implementation task detected",
|
|
271
|
+
"confidence": 0.9
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
### Displaying Activation Messages
|
|
277
|
+
|
|
278
|
+
AI assistants should display the `activation_message.formatted` field at the start of their response:
|
|
279
|
+
|
|
280
|
+
```
|
|
281
|
+
🤖 solution-architect [Primary Agent]
|
|
282
|
+
|
|
283
|
+
# Mode: PLAN
|
|
284
|
+
|
|
285
|
+
...
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
## Parallel Specialist Agents Execution
|
|
289
|
+
|
|
290
|
+
CodingBuddy supports parallel execution of multiple specialist agents for comprehensive analysis.
|
|
291
|
+
|
|
292
|
+
### When to Use Parallel Execution
|
|
293
|
+
|
|
294
|
+
Parallel execution is recommended when `parse_mode` returns a `parallelAgentsRecommendation` field:
|
|
295
|
+
|
|
296
|
+
| Mode | Default Specialists | Use Case |
|
|
297
|
+
|------|---------------------|----------|
|
|
298
|
+
| **PLAN** | architecture-specialist, test-strategy-specialist | Validate architecture and test approach |
|
|
299
|
+
| **ACT** | code-quality-specialist, test-strategy-specialist | Verify implementation quality |
|
|
300
|
+
| **EVAL** | security-specialist, accessibility-specialist, performance-specialist, code-quality-specialist | Comprehensive multi-dimensional review |
|
|
301
|
+
|
|
302
|
+
### parallelAgentsRecommendation Response Field
|
|
303
|
+
|
|
304
|
+
The `parse_mode` MCP tool returns this field to recommend parallel specialist execution:
|
|
305
|
+
|
|
306
|
+
```json
|
|
307
|
+
{
|
|
308
|
+
"mode": "EVAL",
|
|
309
|
+
"parallelAgentsRecommendation": {
|
|
310
|
+
"specialists": [
|
|
311
|
+
"security-specialist",
|
|
312
|
+
"accessibility-specialist",
|
|
313
|
+
"performance-specialist",
|
|
314
|
+
"code-quality-specialist"
|
|
315
|
+
],
|
|
316
|
+
"hint": "Use Task tool with subagent_type=\"general-purpose\" and run_in_background=true for each specialist. Call prepare_parallel_agents MCP tool to get ready-to-use prompts."
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
### Parallel Execution Workflow
|
|
322
|
+
|
|
323
|
+
```
|
|
324
|
+
parse_mode 호출
|
|
325
|
+
↓
|
|
326
|
+
parallelAgentsRecommendation 확인
|
|
327
|
+
↓ (있으면)
|
|
328
|
+
사용자에게 시작 메시지 표시
|
|
329
|
+
↓
|
|
330
|
+
prepare_parallel_agents MCP 호출
|
|
331
|
+
↓
|
|
332
|
+
반환된 각 agent.taskPrompt를 Task tool로 병렬 호출:
|
|
333
|
+
- subagent_type: "general-purpose"
|
|
334
|
+
- run_in_background: true
|
|
335
|
+
- prompt: agent.taskPrompt
|
|
336
|
+
↓
|
|
337
|
+
TaskOutput으로 결과 수집
|
|
338
|
+
↓
|
|
339
|
+
사용자에게 결과 종합하여 표시
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
### Code Example
|
|
343
|
+
|
|
344
|
+
```typescript
|
|
345
|
+
// Step 1: Parse mode returns parallelAgentsRecommendation
|
|
346
|
+
const parseModeResult = await parse_mode({ prompt: "EVAL review auth implementation" });
|
|
347
|
+
|
|
348
|
+
if (parseModeResult.parallelAgentsRecommendation) {
|
|
349
|
+
// Step 2: Display start message to user
|
|
350
|
+
console.log("🚀 Dispatching 4 specialist agents in parallel...");
|
|
351
|
+
console.log(" → 🔒 security-specialist");
|
|
352
|
+
console.log(" → ♿ accessibility-specialist");
|
|
353
|
+
console.log(" → ⚡ performance-specialist");
|
|
354
|
+
console.log(" → 📏 code-quality-specialist");
|
|
355
|
+
|
|
356
|
+
// Step 3: Prepare parallel agents
|
|
357
|
+
const preparedAgents = await prepare_parallel_agents({
|
|
358
|
+
mode: "EVAL",
|
|
359
|
+
specialists: parseModeResult.parallelAgentsRecommendation.specialists,
|
|
360
|
+
sharedContext: "Review authentication implementation",
|
|
361
|
+
targetFiles: ["src/auth/login.tsx"]
|
|
362
|
+
});
|
|
363
|
+
|
|
364
|
+
// Step 4: Execute in parallel using Task tool
|
|
365
|
+
const agentTasks = preparedAgents.agents.map(agent =>
|
|
366
|
+
Task({
|
|
367
|
+
subagent_type: "general-purpose",
|
|
368
|
+
prompt: agent.taskPrompt,
|
|
369
|
+
description: agent.description,
|
|
370
|
+
run_in_background: true,
|
|
371
|
+
model: "haiku" // Use haiku for efficiency
|
|
372
|
+
})
|
|
373
|
+
);
|
|
374
|
+
|
|
375
|
+
// Step 5: Collect results
|
|
376
|
+
const results = await Promise.all(agentTasks.map(task => TaskOutput(task.id)));
|
|
377
|
+
|
|
378
|
+
// Step 6: Display summary
|
|
379
|
+
console.log("📊 Specialist Analysis Complete:");
|
|
380
|
+
results.forEach(result => console.log(result.summary));
|
|
381
|
+
}
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
### Visibility Pattern
|
|
385
|
+
|
|
386
|
+
When executing parallel specialists, display clear status messages:
|
|
387
|
+
|
|
388
|
+
**Start Message:**
|
|
389
|
+
```
|
|
390
|
+
🚀 Dispatching N specialist agents in parallel...
|
|
391
|
+
→ 🔒 security-specialist
|
|
392
|
+
→ ♿ accessibility-specialist
|
|
393
|
+
→ ⚡ performance-specialist
|
|
394
|
+
→ 📏 code-quality-specialist
|
|
395
|
+
```
|
|
396
|
+
|
|
397
|
+
**Completion Message:**
|
|
398
|
+
```
|
|
399
|
+
📊 Specialist Analysis Complete:
|
|
400
|
+
|
|
401
|
+
🔒 Security Specialist:
|
|
402
|
+
[findings summary]
|
|
403
|
+
|
|
404
|
+
♿ Accessibility Specialist:
|
|
405
|
+
[findings summary]
|
|
406
|
+
|
|
407
|
+
⚡ Performance Specialist:
|
|
408
|
+
[findings summary]
|
|
409
|
+
|
|
410
|
+
📏 Code Quality Specialist:
|
|
411
|
+
[findings summary]
|
|
412
|
+
```
|
|
413
|
+
|
|
414
|
+
### Specialist Icons
|
|
415
|
+
|
|
416
|
+
| Icon | Specialist |
|
|
417
|
+
|------|------------|
|
|
418
|
+
| 🔒 | security-specialist |
|
|
419
|
+
| ♿ | accessibility-specialist |
|
|
420
|
+
| ⚡ | performance-specialist |
|
|
421
|
+
| 📏 | code-quality-specialist |
|
|
422
|
+
| 🧪 | test-strategy-specialist |
|
|
423
|
+
| 🏛️ | architecture-specialist |
|
|
424
|
+
| 📚 | documentation-specialist |
|
|
425
|
+
| 🔍 | seo-specialist |
|
|
426
|
+
| 🎨 | design-system-specialist |
|
|
427
|
+
|
|
428
|
+
### Handling Failures
|
|
429
|
+
|
|
430
|
+
When `prepare_parallel_agents` returns `failedAgents`:
|
|
431
|
+
|
|
432
|
+
```
|
|
433
|
+
⚠️ Some agents failed to load:
|
|
434
|
+
✗ performance-specialist: Profile not found
|
|
435
|
+
|
|
436
|
+
Continuing with 3/4 agents...
|
|
437
|
+
```
|
|
438
|
+
|
|
439
|
+
**Strategy:**
|
|
440
|
+
- Continue with successfully loaded agents
|
|
441
|
+
- Report failures clearly to user
|
|
442
|
+
- Document which agents couldn't be loaded in final report
|
|
443
|
+
|
|
444
|
+
### Specialist Activation Scope
|
|
445
|
+
|
|
446
|
+
Each workflow mode activates different specialist agents:
|
|
447
|
+
|
|
448
|
+
- **PLAN mode**: Architecture and test strategy specialists validate design
|
|
449
|
+
- **ACT mode**: Code quality and test strategy specialists verify implementation
|
|
450
|
+
- **EVAL mode**: Security, accessibility, performance, and code quality specialists provide comprehensive review
|
|
451
|
+
|
|
452
|
+
**Important:** Specialists from one mode do NOT carry over to the next mode. Each mode has its own recommended specialist set.
|
|
@@ -1,151 +1,173 @@
|
|
|
1
1
|
# Cursor Integration Guide
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Guide for using codingbuddy with Cursor.
|
|
4
4
|
|
|
5
5
|
## Overview
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
codingbuddy integrates with Cursor in two ways:
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
1. **AGENTS.md** - Industry standard format compatible with all AI tools
|
|
10
|
+
2. **.cursor/rules/*.mdc** - Cursor-specific optimization (glob-based auto-activation)
|
|
10
11
|
|
|
11
|
-
|
|
12
|
+
## Two Usage Contexts
|
|
12
13
|
|
|
13
|
-
|
|
14
|
+
### End Users (Your Project)
|
|
14
15
|
|
|
15
|
-
|
|
16
|
+
End users access rules **only through MCP tools**. No local rule files needed.
|
|
17
|
+
|
|
18
|
+
```json
|
|
19
|
+
// .cursor/mcp.json
|
|
20
|
+
{
|
|
21
|
+
"mcpServers": {
|
|
22
|
+
"codingbuddy": {
|
|
23
|
+
"command": "npx",
|
|
24
|
+
"args": ["-y", "codingbuddy"]
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Optional: Create `.cursor/rules/codingbuddy.mdc` for basic integration:
|
|
31
|
+
|
|
32
|
+
```yaml
|
|
16
33
|
---
|
|
17
|
-
description:
|
|
34
|
+
description: codingbuddy integration
|
|
18
35
|
globs:
|
|
19
36
|
alwaysApply: true
|
|
20
37
|
---
|
|
21
38
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
This project uses shared rules from `.ai-rules/` directory for all AI assistants.
|
|
25
|
-
|
|
26
|
-
## 📚 Core Rules
|
|
27
|
-
See [../../.ai-rules/rules/core.md](../../.ai-rules/rules/core.md) for:
|
|
28
|
-
- PLAN/ACT/EVAL workflow modes
|
|
29
|
-
- Agent activation rules
|
|
30
|
-
- Communication guidelines
|
|
31
|
-
|
|
32
|
-
## 🏗️ Project Setup
|
|
33
|
-
See [../../.ai-rules/rules/project.md](../../.ai-rules/rules/project.md) for:
|
|
34
|
-
- Tech stack and dependencies
|
|
35
|
-
- Project structure and architecture
|
|
36
|
-
- Development rules and conventions
|
|
37
|
-
- Domain knowledge and business context
|
|
38
|
-
|
|
39
|
-
## 🎯 Augmented Coding Principles
|
|
40
|
-
See [../../.ai-rules/rules/augmented-coding.md](../../.ai-rules/rules/augmented-coding.md) for:
|
|
41
|
-
- TDD cycle (Red → Green → Refactor)
|
|
42
|
-
- Code quality standards (SOLID, DRY)
|
|
43
|
-
- Testing best practices
|
|
44
|
-
- Commit discipline
|
|
45
|
-
|
|
46
|
-
## 🤖 Specialist Agents
|
|
47
|
-
See [../../.ai-rules/agents/README.md](../../.ai-rules/agents/README.md) for available specialist agents:
|
|
48
|
-
- Frontend Developer, Code Reviewer
|
|
49
|
-
- Architecture, Test Strategy, Performance, Security
|
|
50
|
-
- Accessibility, SEO, Design System, Documentation
|
|
51
|
-
- Code Quality, DevOps Engineer
|
|
39
|
+
When PLAN, ACT, EVAL keywords detected → call `parse_mode` MCP tool
|
|
52
40
|
```
|
|
53
41
|
|
|
54
|
-
###
|
|
42
|
+
### Monorepo Contributors
|
|
55
43
|
|
|
56
|
-
|
|
44
|
+
Contributors to the codingbuddy repository can use direct file references:
|
|
57
45
|
|
|
58
|
-
```
|
|
46
|
+
```
|
|
47
|
+
Project Root/
|
|
48
|
+
├── AGENTS.md # Cross-platform entry point
|
|
49
|
+
├── .cursor/rules/
|
|
50
|
+
│ ├── imports.mdc # Common rules (alwaysApply: true)
|
|
51
|
+
│ ├── auto-agent.mdc # File pattern-based Agent auto-activation
|
|
52
|
+
│ └── custom.mdc # Personal settings (Git ignored)
|
|
53
|
+
└── packages/rules/.ai-rules/ # Single Source of Truth
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## DRY Principle
|
|
57
|
+
|
|
58
|
+
**Single Source of Truth**: `packages/rules/.ai-rules/`
|
|
59
|
+
|
|
60
|
+
- All Agent definitions, rules, skills managed only in `.ai-rules/`
|
|
61
|
+
- AGENTS.md and .mdc files act as **pointers only**
|
|
62
|
+
- No duplication, only references
|
|
63
|
+
|
|
64
|
+
## Configuration Files
|
|
65
|
+
|
|
66
|
+
### imports.mdc (alwaysApply)
|
|
67
|
+
|
|
68
|
+
Core rules automatically applied to all conversations:
|
|
69
|
+
|
|
70
|
+
```yaml
|
|
59
71
|
---
|
|
60
|
-
description:
|
|
72
|
+
description: codingbuddy common rules
|
|
61
73
|
globs:
|
|
62
74
|
alwaysApply: true
|
|
63
75
|
---
|
|
64
76
|
|
|
65
|
-
#
|
|
77
|
+
# Core principles only (details in .ai-rules/)
|
|
78
|
+
```
|
|
66
79
|
|
|
67
|
-
|
|
80
|
+
### auto-agent.mdc (glob-based)
|
|
68
81
|
|
|
69
|
-
|
|
82
|
+
Automatically provides appropriate Agent context based on file patterns:
|
|
70
83
|
|
|
71
|
-
|
|
84
|
+
```yaml
|
|
85
|
+
---
|
|
86
|
+
description: Agent auto-activation
|
|
87
|
+
globs:
|
|
88
|
+
- "**/*.tsx"
|
|
89
|
+
- "**/*.ts"
|
|
90
|
+
- "**/*.go"
|
|
91
|
+
alwaysApply: false
|
|
92
|
+
---
|
|
72
93
|
|
|
73
|
-
|
|
94
|
+
# File pattern → Agent mapping table
|
|
74
95
|
```
|
|
75
96
|
|
|
76
|
-
##
|
|
97
|
+
## Usage
|
|
98
|
+
|
|
99
|
+
### Mode Keywords
|
|
77
100
|
|
|
78
101
|
```
|
|
79
|
-
|
|
80
|
-
├── agents/ # Keep for Cursor compatibility
|
|
81
|
-
├── rules/
|
|
82
|
-
│ ├── core.mdc # Keep existing (can add reference to .ai-rules)
|
|
83
|
-
│ ├── project.mdc # Keep existing (can add reference to .ai-rules)
|
|
84
|
-
│ ├── augmented-coding.mdc # Keep existing
|
|
85
|
-
│ ├── imports.mdc # NEW: References to .ai-rules
|
|
86
|
-
│ └── cursor-specific.mdc # NEW: Cursor-only features
|
|
87
|
-
└── config.json # Cursor configuration
|
|
88
|
-
|
|
89
|
-
.ai-rules/ # Common rules for all AI tools
|
|
90
|
-
├── rules/
|
|
91
|
-
│ ├── core.md
|
|
92
|
-
│ ├── project.md
|
|
93
|
-
│ └── augmented-coding.md
|
|
94
|
-
├── agents/
|
|
95
|
-
│ └── *.json
|
|
96
|
-
└── adapters/
|
|
97
|
-
└── cursor.md (this file)
|
|
102
|
+
PLAN Design user authentication feature
|
|
98
103
|
```
|
|
99
104
|
|
|
100
|
-
|
|
105
|
+
→ `parse_mode` MCP tool is called, loading appropriate Agent and rules
|
|
101
106
|
|
|
102
|
-
###
|
|
107
|
+
### Auto-Activation on File Edit
|
|
103
108
|
|
|
104
|
-
|
|
105
|
-
```
|
|
106
|
-
@.ai-rules/rules/core.md
|
|
107
|
-
@.ai-rules/agents/frontend-developer.json
|
|
109
|
+
Open `.tsx` file → `auto-agent.mdc` auto-applies → frontend-developer Agent recommended
|
|
108
110
|
|
|
109
|
-
|
|
110
|
-
```
|
|
111
|
+
### Specialist Usage
|
|
111
112
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
113
|
+
```
|
|
114
|
+
EVAL Review from security perspective
|
|
115
|
+
```
|
|
115
116
|
|
|
116
|
-
|
|
117
|
+
→ security-specialist activated
|
|
117
118
|
|
|
118
|
-
|
|
119
|
-
- ✅ Access to common rules shared across all AI tools
|
|
120
|
-
- ✅ Cursor-specific features (globs, alwaysApply) still work
|
|
121
|
-
- ✅ Easy to update: change `.ai-rules/` once, all tools benefit
|
|
119
|
+
## MCP Tools
|
|
122
120
|
|
|
123
|
-
|
|
121
|
+
Available codingbuddy MCP tools in Cursor:
|
|
124
122
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
123
|
+
| Tool | Purpose |
|
|
124
|
+
|------|---------|
|
|
125
|
+
| `parse_mode` | Parse mode keywords + load Agent/rules |
|
|
126
|
+
| `get_agent_details` | Get specific Agent details |
|
|
127
|
+
| `get_project_config` | Get project configuration |
|
|
128
|
+
| `recommend_skills` | Recommend skills based on prompt |
|
|
129
|
+
| `prepare_parallel_agents` | Prepare parallel Agent execution |
|
|
129
130
|
|
|
130
131
|
## Skills
|
|
131
132
|
|
|
132
133
|
### Using Skills in Cursor
|
|
133
134
|
|
|
134
|
-
|
|
135
|
+
Load skills via file reference (monorepo only):
|
|
135
136
|
|
|
136
137
|
```
|
|
137
|
-
|
|
138
|
+
@packages/rules/.ai-rules/skills/test-driven-development/SKILL.md
|
|
138
139
|
```
|
|
139
140
|
|
|
140
|
-
|
|
141
|
+
For end users, use `recommend_skills` MCP tool instead.
|
|
141
142
|
|
|
142
143
|
### Available Skills
|
|
143
144
|
|
|
144
|
-
-
|
|
145
|
-
-
|
|
146
|
-
-
|
|
147
|
-
-
|
|
148
|
-
-
|
|
149
|
-
-
|
|
150
|
-
-
|
|
151
|
-
-
|
|
145
|
+
- `brainstorming/SKILL.md` - Idea → Design
|
|
146
|
+
- `test-driven-development/SKILL.md` - TDD workflow
|
|
147
|
+
- `systematic-debugging/SKILL.md` - Systematic debugging
|
|
148
|
+
- `writing-plans/SKILL.md` - Implementation plan writing
|
|
149
|
+
- `executing-plans/SKILL.md` - Plan execution
|
|
150
|
+
- `subagent-driven-development/SKILL.md` - Subagent development
|
|
151
|
+
- `dispatching-parallel-agents/SKILL.md` - Parallel Agent dispatch
|
|
152
|
+
- `frontend-design/SKILL.md` - Frontend design
|
|
153
|
+
|
|
154
|
+
## AGENTS.md
|
|
155
|
+
|
|
156
|
+
Industry standard format compatible with all AI tools (Cursor, Claude Code, Codex, etc.):
|
|
157
|
+
|
|
158
|
+
```markdown
|
|
159
|
+
# AGENTS.md
|
|
160
|
+
|
|
161
|
+
This project uses codingbuddy MCP server to manage AI Agents.
|
|
162
|
+
|
|
163
|
+
## Quick Start
|
|
164
|
+
...
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
See `AGENTS.md` in project root for details.
|
|
168
|
+
|
|
169
|
+
## Reference
|
|
170
|
+
|
|
171
|
+
- [AGENTS.md Official Spec](https://agents.md)
|
|
172
|
+
- [Cursor Rules Documentation](https://cursor.com/docs/context/rules)
|
|
173
|
+
- [codingbuddy MCP API](../../docs/api.md)
|
|
@@ -182,11 +182,40 @@ Once connected, you can use:
|
|
|
182
182
|
- `search_rules`: Query AI rules and guidelines
|
|
183
183
|
- `get_agent_details`: Get specialist agent information
|
|
184
184
|
- `recommend_skills`: Get skill recommendations based on prompt
|
|
185
|
-
- `parse_mode`: Parse PLAN/ACT/EVAL workflow mode (
|
|
185
|
+
- `parse_mode`: Parse PLAN/ACT/EVAL workflow mode (includes dynamic language instructions)
|
|
186
|
+
|
|
187
|
+
#### Dynamic Language Configuration
|
|
188
|
+
|
|
189
|
+
OpenCode agents get language instructions dynamically from the MCP server:
|
|
190
|
+
|
|
191
|
+
1. **Set language in codingbuddy.config.js:**
|
|
192
|
+
```javascript
|
|
193
|
+
module.exports = {
|
|
194
|
+
language: 'ko', // or 'en', 'ja', 'zh', 'es', etc.
|
|
195
|
+
// ... other config
|
|
196
|
+
};
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
2. **Call parse_mode to get dynamic language instruction:**
|
|
200
|
+
```bash
|
|
201
|
+
# AI should call parse_mode when user starts with PLAN/ACT/EVAL
|
|
202
|
+
# Returns languageInstruction field automatically
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
3. **Remove hardcoded language from agent prompts:**
|
|
206
|
+
```json
|
|
207
|
+
{
|
|
208
|
+
"agent": {
|
|
209
|
+
"plan-mode": {
|
|
210
|
+
"prompt": "{file:...plan-mode.json}\n\n[OpenCode Override]\nMode: PLAN only. Use languageInstruction from parse_mode response.",
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
```
|
|
186
215
|
|
|
187
216
|
#### Enhanced parse_mode Response
|
|
188
217
|
|
|
189
|
-
The `parse_mode` tool now returns additional Mode Agent information:
|
|
218
|
+
The `parse_mode` tool now returns additional Mode Agent information and dynamic language instructions:
|
|
190
219
|
|
|
191
220
|
```json
|
|
192
221
|
{
|
|
@@ -194,6 +223,8 @@ The `parse_mode` tool now returns additional Mode Agent information:
|
|
|
194
223
|
"originalPrompt": "새로운 사용자 등록 기능을 만들어줘",
|
|
195
224
|
"instructions": "설계 우선 접근. TDD 관점에서...",
|
|
196
225
|
"rules": [...],
|
|
226
|
+
"language": "ko",
|
|
227
|
+
"languageInstruction": "Always respond in Korean (한국어).",
|
|
197
228
|
"agent": "plan-mode",
|
|
198
229
|
"delegates_to": "frontend-developer",
|
|
199
230
|
"delegate_agent_info": {
|
|
@@ -205,6 +236,8 @@ The `parse_mode` tool now returns additional Mode Agent information:
|
|
|
205
236
|
```
|
|
206
237
|
|
|
207
238
|
**New Fields:**
|
|
239
|
+
- `language`: Language code from codingbuddy.config.js
|
|
240
|
+
- `languageInstruction`: Formatted instruction text for AI assistants (🆕)
|
|
208
241
|
- `agent`: Mode Agent name (plan-mode, act-mode, eval-mode)
|
|
209
242
|
- `delegates_to`: Which specialist agent the Mode Agent delegates to
|
|
210
243
|
- `delegate_agent_info`: Detailed information about the delegate agent (optional)
|