codingbuddy-rules 0.0.0-canary.20260106081656.f966936 → 0.0.0-canary.20260106121118.173ad8b

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.
@@ -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 6 AI tools
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
@@ -1,151 +1,173 @@
1
1
  # Cursor Integration Guide
2
2
 
3
- This guide explains how to use the common AI rules (`.ai-rules/`) in Cursor.
3
+ Guide for using codingbuddy with Cursor.
4
4
 
5
5
  ## Overview
6
6
 
7
- Cursor continues to use its native `.cursor/` directory structure while referencing the common rules from `.ai-rules/`.
7
+ codingbuddy integrates with Cursor in two ways:
8
8
 
9
- ## Integration Method
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
- ### 1. Reference Common Rules
12
+ ## Two Usage Contexts
12
13
 
13
- Create `.cursor/rules/imports.mdc` to reference common rules:
14
+ ### End Users (Your Project)
14
15
 
15
- ```markdown
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: Common AI Rules Import
34
+ description: codingbuddy integration
18
35
  globs:
19
36
  alwaysApply: true
20
37
  ---
21
38
 
22
- # Common Rules
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
- ### 2. Keep Cursor-Specific Features
42
+ ### Monorepo Contributors
55
43
 
56
- Maintain `.cursor/rules/cursor-specific.mdc` for Cursor-only features:
44
+ Contributors to the codingbuddy repository can use direct file references:
57
45
 
58
- ```markdown
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: Cursor-specific configurations
72
+ description: codingbuddy common rules
61
73
  globs:
62
74
  alwaysApply: true
63
75
  ---
64
76
 
65
- # Cursor-Specific Features
77
+ # Core principles only (details in .ai-rules/)
78
+ ```
66
79
 
67
- ## File Globbing
80
+ ### auto-agent.mdc (glob-based)
68
81
 
69
- [Add Cursor-specific glob patterns here]
82
+ Automatically provides appropriate Agent context based on file patterns:
70
83
 
71
- ## Agent Tool Integration
84
+ ```yaml
85
+ ---
86
+ description: Agent auto-activation
87
+ globs:
88
+ - "**/*.tsx"
89
+ - "**/*.ts"
90
+ - "**/*.go"
91
+ alwaysApply: false
92
+ ---
72
93
 
73
- [Add Cursor-specific todo_write tool usage]
94
+ # File pattern Agent mapping table
74
95
  ```
75
96
 
76
- ## Current Structure
97
+ ## Usage
98
+
99
+ ### Mode Keywords
77
100
 
78
101
  ```
79
- .cursor/
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
- ## Usage
105
+ `parse_mode` MCP tool is called, loading appropriate Agent and rules
101
106
 
102
- ### In Cursor Chat
107
+ ### Auto-Activation on File Edit
103
108
 
104
- Reference rules directly:
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
- Create a new feature following our common workflow
110
- ```
111
+ ### Specialist Usage
111
112
 
112
- ### In Cursor Composer
113
-
114
- The `.cursor/rules/imports.mdc` with `alwaysApply: true` will automatically apply common rules to all Composer sessions.
113
+ ```
114
+ EVAL Review from security perspective
115
+ ```
115
116
 
116
- ## Benefits
117
+ security-specialist activated
117
118
 
118
- - Seamless integration with existing Cursor setup
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
- ## Maintenance
121
+ Available codingbuddy MCP tools in Cursor:
124
122
 
125
- When updating rules:
126
- 1. Update `.ai-rules/rules/*.md` for changes affecting all AI tools
127
- 2. Update `.cursor/rules/*.mdc` only for Cursor-specific changes
128
- 3. Keep both in sync for best experience
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
- Reference skills in your prompts using file inclusion:
135
+ Load skills via file reference (monorepo only):
135
136
 
136
137
  ```
137
- @.ai-rules/skills/test-driven-development/SKILL.md
138
+ @packages/rules/.ai-rules/skills/test-driven-development/SKILL.md
138
139
  ```
139
140
 
140
- Or manually include skill content in `.cursorrules`.
141
+ For end users, use `recommend_skills` MCP tool instead.
141
142
 
142
143
  ### Available Skills
143
144
 
144
- - `.ai-rules/skills/brainstorming/SKILL.md`
145
- - `.ai-rules/skills/test-driven-development/SKILL.md`
146
- - `.ai-rules/skills/systematic-debugging/SKILL.md`
147
- - `.ai-rules/skills/writing-plans/SKILL.md`
148
- - `.ai-rules/skills/executing-plans/SKILL.md`
149
- - `.ai-rules/skills/subagent-driven-development/SKILL.md`
150
- - `.ai-rules/skills/dispatching-parallel-agents/SKILL.md`
151
- - `.ai-rules/skills/frontend-design/SKILL.md`
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)
@@ -24,6 +24,8 @@ AI Agent definitions for specialized development roles.
24
24
 
25
25
  | Task Type | Recommended Agent | File |
26
26
  |-----------|-------------------|------|
27
+ | **High-level Architecture Design** | Solution Architect | `solution-architect.json` |
28
+ | **Implementation Planning** | Technical Planner | `technical-planner.json` |
27
29
  | **React/Next.js Development** | Frontend Developer | `frontend-developer.json` |
28
30
  | **Backend API Development** | Backend Developer | `backend-developer.json` |
29
31
  | **Code Review (EVAL)** | Code Reviewer | `code-reviewer.json` |
@@ -43,6 +45,8 @@ AI Agent definitions for specialized development roles.
43
45
 
44
46
  | Agent | Description |
45
47
  |-------|-------------|
48
+ | Solution Architect | High-level system design and architecture planning |
49
+ | Technical Planner | Low-level implementation planning with TDD and bite-sized tasks |
46
50
  | Frontend Developer | TDD-based frontend development with React/Next.js |
47
51
  | Backend Developer | Multi-stack backend API development (Node, Python, Go, Java, Rust) |
48
52
  | Code Reviewer | Auto-activated in EVAL mode, multi-dimensional code quality assessment |
@@ -93,9 +97,18 @@ as agent-architect, design new agent
93
97
 
94
98
  ### Available Primary Agents
95
99
 
100
+ **PLAN Mode Primary Agents:**
101
+
102
+ | Agent | role.type | Activation Condition |
103
+ |-------|-----------|---------------------|
104
+ | Solution Architect | `primary` | Architecture design, system design, technology selection |
105
+ | Technical Planner | `primary` | Implementation planning, task breakdown, TDD planning |
106
+
107
+ **ACT Mode Primary Agents:**
108
+
96
109
  | Agent | role.type | Activation Condition |
97
110
  |-------|-----------|---------------------|
98
- | Frontend Developer | `primary` | Default for PLAN/ACT modes, React/Next.js projects |
111
+ | Frontend Developer | `primary` | Default for ACT mode, React/Next.js projects |
99
112
  | Backend Developer | `primary` | Backend file context (.go, .py, .java, .rs) |
100
113
  | Agent Architect | `primary` | Agent-related work requests |
101
114
  | DevOps Engineer | `primary` | Dockerfile, docker-compose context |
@@ -104,6 +117,15 @@ as agent-architect, design new agent
104
117
 
105
118
  EVAL mode always uses `code-reviewer` (regardless of Primary Agent settings).
106
119
 
120
+ ### Intent-Based Resolution (PLAN Mode)
121
+
122
+ PLAN mode uses intent-based resolution to automatically select between Solution Architect and Technical Planner:
123
+
124
+ | Intent Pattern | Selected Agent |
125
+ |----------------|----------------|
126
+ | Architecture, system design, technology selection | Solution Architect |
127
+ | Implementation plan, task breakdown, TDD | Technical Planner |
128
+
107
129
  ---
108
130
 
109
131
  ## Mode Agents
@@ -253,6 +275,89 @@ Unified specialist agents organized by domain:
253
275
 
254
276
  ## Agent Details
255
277
 
278
+ ### Solution Architect (`solution-architect.json`)
279
+
280
+ > **Note**: This is a **Primary Agent** for PLAN mode, specializing in high-level system design.
281
+
282
+ **Expertise:**
283
+
284
+ - System Architecture Design
285
+ - Technology Selection
286
+ - Integration Patterns
287
+ - Scalability Planning
288
+ - Trade-off Analysis
289
+
290
+ **Development Philosophy:**
291
+
292
+ - **Brainstorm-First**: Always start with `superpowers:brainstorming` skill
293
+ - **Multiple Options**: Present 2-3 design approaches with trade-offs
294
+ - **Incremental Validation**: Present design in sections (200-300 words) and validate with user
295
+ - **Document-Driven**: Save validated designs to `docs/plans/YYYY-MM-DD-<topic>-design.md`
296
+
297
+ **Responsibilities:**
298
+
299
+ - Analyze requirements and constraints
300
+ - Design high-level system architecture
301
+ - Evaluate technology options
302
+ - Define component boundaries
303
+ - Delegate to domain specialists (Frontend/Backend/DevOps)
304
+
305
+ **Workflow:**
306
+
307
+ 1. Invoke `superpowers:brainstorming` skill
308
+ 2. Understand project context (files, docs, commits)
309
+ 3. Ask clarifying questions one at a time
310
+ 4. Propose 2-3 approaches with trade-offs
311
+ 5. Present design in sections with user validation
312
+ 6. Document to `docs/plans/`
313
+ 7. Offer handoff to Technical Planner
314
+
315
+ ---
316
+
317
+ ### Technical Planner (`technical-planner.json`)
318
+
319
+ > **Note**: This is a **Primary Agent** for PLAN mode, specializing in detailed implementation planning.
320
+
321
+ **Expertise:**
322
+
323
+ - Implementation Planning
324
+ - TDD Strategy
325
+ - Task Decomposition
326
+ - Code Structure Design
327
+ - Test Design
328
+
329
+ **Development Philosophy:**
330
+
331
+ - **Bite-Sized Tasks**: Each task is 2-5 minutes of work
332
+ - **TDD-First**: Red-Green-Refactor-Commit structure per task
333
+ - **Complete Code**: Plans include full code, no placeholders
334
+ - **Exact Paths**: Specify exact file paths for all changes
335
+
336
+ **Responsibilities:**
337
+
338
+ - Break down designs into bite-sized tasks (2-5 minutes each)
339
+ - Define exact file paths and code changes
340
+ - Design test cases with TDD approach
341
+ - Create executable implementation plans
342
+ - Ensure plans are context-complete for engineers
343
+
344
+ **Workflow:**
345
+
346
+ 1. Invoke `superpowers:writing-plans` skill
347
+ 2. Read design document or requirements
348
+ 3. Identify all components and dependencies
349
+ 4. Break into bite-sized tasks (2-5 minutes each)
350
+ 5. For each task: exact files, complete code, test commands
351
+ 6. Save to `docs/plans/YYYY-MM-DD-<feature>.md`
352
+ 7. Offer execution choice (subagent vs parallel session)
353
+
354
+ **Execution Options:**
355
+
356
+ - **Subagent-Driven**: Execute in current session with `superpowers:subagent-driven-development`
357
+ - **Parallel Session**: Execute in separate session with `superpowers:executing-plans`
358
+
359
+ ---
360
+
256
361
  ### Primary Developer Agent Example: Frontend Developer (`frontend-developer.json`)
257
362
 
258
363
  > **Note**: This is an example Primary Developer Agent for React/Next.js projects. Create your own agent (e.g., `backend-developer.json`, `mobile-developer.json`) following this pattern for other tech stacks.
@@ -746,8 +851,10 @@ All agent files are located directly in `.ai-rules/agents/` directory without su
746
851
 
747
852
  ```
748
853
  .ai-rules/agents/
749
- ├── frontend-developer.json # Primary Agent (auto-activated, default)
750
- ├── backend-developer.json # Primary Agent for backend
854
+ ├── solution-architect.json # Primary Agent for PLAN mode (architecture)
855
+ ├── technical-planner.json # Primary Agent for PLAN mode (implementation)
856
+ ├── frontend-developer.json # Primary Agent for ACT mode (default)
857
+ ├── backend-developer.json # Primary Agent for ACT mode (backend)
751
858
  ├── agent-architect.json # Primary Agent for agent management
752
859
  ├── devops-engineer.json # Primary Agent for infrastructure
753
860
  ├── code-reviewer.json # Core agent (EVAL mode, fixed)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codingbuddy-rules",
3
- "version": "0.0.0-canary.20260106081656.f966936",
3
+ "version": "0.0.0-canary.20260106121118.173ad8b",
4
4
  "description": "AI coding rules for consistent practices across AI assistants",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",