@@ -123,125 +123,50 @@ Even if plan separates TDD into individual steps (e.g., Step 1: Write test, Step
123123
124124<CODINGBUDDY_CRITICAL_RULE>
125125
126- ** When user message starts with PLAN, ACT, EVAL, or AUTO keyword (or localized: Korean 계획/실행/평가/자동, Japanese 計画/実行/評価/自動, Chinese 计划/执行/评估/自动, Spanish PLANIFICAR/ACTUAR/EVALUAR/AUTOMÁTICO ):**
126+ ** When user message starts with PLAN, ACT, EVAL, or AUTO keyword (or localized equivalents ):**
127127
128- 1 . ** IMMEDIATELY** call ` parse_mode ` MCP tool with the user's prompt
129- 2 . Follow the returned ` instructions ` ** EXACTLY**
130- 3 . Apply the returned ` rules ` as context
131- 4 . If ` warnings ` are present, inform the user
132-
133- ** This is MANDATORY, not optional.**
134-
135- Failure to call ` parse_mode ` when these keywords are present will result in:
136- - Missed critical checklists (Devil's Advocate Analysis, Impact Radius Analysis)
137- - Incomplete evaluations
138- - Quality issues not caught before deployment
139-
140- ** Red Flags** (STOP if you think these):
141- | Thought | Reality |
142- | ---------| ---------|
143- | "I can handle EVAL myself" | NO. Call parse_mode FIRST. |
144- | "The rules are similar anyway" | NO. Each mode has specific checklists. |
145- | "I'll save a tool call" | NO. parse_mode MUST be called FIRST. |
146- | "I already know what to do" | NO. Rules may have been updated. |
128+ 1 . Call ` activate ` MCP tool with the user's prompt (preferred in Claude Code)
129+ 2 . ** Fallback** : Call ` parse_mode ` if ` activate ` is unavailable
130+ 3 . Follow the returned ` rules ` as context
131+ 4 . Use returned ` specialists ` to run a council via Claude native Teams
147132
148133</CODINGBUDDY_CRITICAL_RULE>
149134
150- Examples:
151- - ` PLAN design auth feature ` → ** immediately** call parse_mode → work in PLAN mode
152- - ` AUTO implement user dashboard ` → ** immediately** call parse_mode → autonomous PLAN→ACT→EVAL cycle
153-
154- ## 🔴 MANDATORY: Parallel Specialist Agent Execution
155-
156- <PARALLEL_EXECUTION_MANDATORY_RULE>
157-
158- ** When ` parse_mode ` returns ` dispatchReady ` , use it directly with the Task tool — no extra calls needed.**
159-
160- ** Outer Transport Selection (before dispatch):**
161- - [ ] Check ` availableStrategies ` in ` parse_mode ` response (outer transport options)
162- - [ ] If ` ["subagent", "taskmaestro"] ` → AskUserQuestion to choose outer strategy
163- - [ ] If ` taskmaestroInstallHint ` present and user wants taskmaestro → guide installation
164- - [ ] Pass chosen strategy to ` dispatch_agents(executionStrategy: ...) `
165- - [ ] Teams (inner coordination, experimental) may be used within a session if APIs are available
166-
167- ** Quick Checklist (Auto-Dispatch - Preferred):**
168- - [ ] Check ` dispatchReady ` in ` parse_mode ` response
169- - [ ] Use ` dispatchReady.primaryAgent.dispatchParams ` with Task tool
170- - [ ] Use ` dispatchReady.parallelAgents[].dispatchParams ` with Task tool (` run_in_background: true ` )
171- - [ ] Collect results with ` TaskOutput `
172- - [ ] Summarize all findings
173-
174- ** Fallback (if ` dispatchReady ` is not present):**
175- - [ ] Call ` dispatch_agents ` or ` prepare_parallel_agents ` with recommended specialists
176- - [ ] Execute each agent via Task tool (` subagent_type: "general-purpose" ` , ` run_in_background: true ` )
177- - [ ] Display activation status
178- - [ ] Collect results with ` TaskOutput `
179- - [ ] Summarize all findings
180-
181- ** Mode-specific Specialists:**
182-
183- | Mode | Specialists |
184- | ------| -------------|
185- | ** PLAN** | 🏛️ architecture, 🧪 test-strategy, 📨 event-architecture, 🔗 integration, 📊 observability, 🔄 migration |
186- | ** ACT** | 📏 code-quality, 🧪 test-strategy, 📨 event-architecture, 🔗 integration |
187- | ** EVAL** | 🔒 security, ♿ accessibility, ⚡ performance, 📏 code-quality, 📨 event-architecture, 🔗 integration, 📊 observability, 🔄 migration |
188- | ** AUTO** | 🏛️ architecture, 🧪 test-strategy, 🔒 security, 📏 code-quality, 📨 event-architecture, 🔗 integration, 📊 observability, 🔄 migration |
189-
190- > ** Note:** SubAgent and TaskMaestro are ** outer transport** strategies (one per invocation, user choice).
191- > Teams is an ** inner coordination** layer (experimental) that can optionally run within either outer strategy.
192- > See the [ Execution Model] ( ../../packages/rules/.ai-rules/adapters/claude-code.md#execution-model-outer-transport-vs-inner-coordination ) for details.
193-
194- ** 📖 Full Guide:** [ Parallel Specialist Agents Execution] ( ../../packages/rules/.ai-rules/adapters/claude-code.md#parallel-specialist-agents-execution )
195-
196- </PARALLEL_EXECUTION_MANDATORY_RULE>
197-
198- ## 🔴 MANDATORY: Auto-Dispatch Enforcement
199-
200- <AUTO_DISPATCH_ENFORCEMENT_RULE>
201-
202- ** When ` parse_mode ` returns ` dispatch="auto" ` , you MUST dispatch all recommended specialists. No exceptions.**
203-
204- ### Core Rule
205-
206- If the ` parse_mode ` response contains ` dispatch="auto" ` or ` dispatchReady ` with specialist agents:
207- 1 . ** MUST** dispatch every listed specialist — skipping any is a protocol violation
208- 2 . Use the selected ** outer transport** (SubAgent or TaskMaestro) to dispatch specialists
209- 3 . ** Optionally** use Teams as inner coordination within a session (experimental, requires runtime API availability)
210- 4 . ** Report results** via the dispatch mechanism (TaskOutput for SubAgent, SendMessage for Teams)
211-
212- ### Red Flags (STOP if you think these)
213-
214- | Thought | Reality |
215- | ---------| ---------|
216- | "I can handle this analysis myself" | NO. Specialists have domain expertise you lack. Dispatch them. |
217- | "It's just a small change, no need for specialists" | NO. dispatch="auto" means the system determined specialists are needed. |
218- | "I'll save time by skipping dispatch" | NO. Skipping specialists causes missed issues that cost more time later. |
219- | "The specialists will just repeat what I already know" | NO. Specialists catch domain-specific issues you would miss. |
220- | "I'll dispatch them later after I look at the code" | NO. Dispatch IMMEDIATELY when dispatch="auto" is returned. |
135+ ## 🔴 MANDATORY: Specialist Council Execution
221136
222- </AUTO_DISPATCH_ENFORCEMENT_RULE >
137+ <SPECIALIST_COUNCIL_RULE >
223138
224- ## 🔴 MANDATORY: Context Document Management
139+ ** When ` activate ` returns specialists, run them as a council via Claude native Teams. **
225140
226- <CONTEXT_DOCUMENT_RULE>
141+ ### Workflow
227142
228- ** Fixed file ` docs/codingbuddy/context.md ` persists PLAN → ACT → EVAL context across context compaction.**
143+ 1 . Call ` activate({ prompt }) ` → get rules, primaryAgent, specialists
144+ 2 . Create a Claude native Team with the returned specialists as teammates
145+ 3 . Each specialist independently analyzes the task
146+ 4 . Specialists cross-review each other's findings
147+ 5 . Collect consensus: approve | concern | reject
148+ 6 . Summarize all findings to user
229149
230- ### How It Works
150+ ### Fallback (non-Teams environments)
231151
232- ` parse_mode ` ** automatically** manages the context document:
152+ If Teams is not available, dispatch specialists as parallel subagents:
153+ - Use ` Agent ` tool with ` run_in_background: true ` for each specialist
154+ - Collect results and synthesize
233155
234- - ** PLAN/AUTO mode** : Resets (deletes and recreates) the context document
235- - ** ACT/EVAL mode** : Appends a new section to the existing document
156+ </SPECIALIST_COUNCIL_RULE>
236157
237- ### Required Workflow
158+ ## Claude Code Native Feature Mapping
238159
239- ** In ALL modes:**
240- 1 . ` parse_mode ` automatically reads/creates context
241- 2 . Review ` contextDocument ` for previous decisions and notes
242- 3 . Before completing: ` update_context ` to persist current work
160+ Use Claude Code native features instead of codingbuddy equivalents:
243161
244- </CONTEXT_DOCUMENT_RULE>
162+ | Need | Native Feature | Instead of |
163+ | ------| ----------------| ------------|
164+ | Cross-session context | ** Claude Code Memory** | ` update_context ` / ` create_briefing ` / ` resume_session ` |
165+ | Specialist debate | ** Claude native Teams** | ` dispatch_agents ` subagent strategy |
166+ | Task exploration | ** /dream** | ` analyze_task ` |
167+ | Planning with approval | ** EnterPlanMode** | ` parse_mode ` planning stage |
168+ | Repeated execution | ** /loop** | AUTO mode repetition |
169+ | Clarification | ** AskUserQuestion** | clarification gate |
245170
246171## Claude Code Specific
247172
@@ -250,7 +175,6 @@ If the `parse_mode` response contains `dispatch="auto"` or `dispatchReady` with
250175- Provide clear, actionable feedback
251176- Reference project context from ` packages/rules/.ai-rules/rules/project.md `
252177- Follow PLAN → ACT → EVAL workflow when appropriate
253- - Use AUTO mode for autonomous quality-driven development cycles
254178
255179## Full Documentation
256180
0 commit comments