codingbuddy-rules 4.3.0 → 4.4.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.
@@ -4,7 +4,56 @@ This guide explains how to use the common AI rules (`.ai-rules/`) with GitHub Co
4
4
 
5
5
  ## Overview
6
6
 
7
- GitHub Copilot can use custom instructions from `.github/` or `.codex/` directory.
7
+ codingbuddy integrates with GitHub Copilot / Codex in two ways:
8
+
9
+ 1. **`.codex/rules/system-prompt.md`** - Codex system prompt (always-on instructions)
10
+ 2. **MCP Server** - codingbuddy MCP tools for workflow management
11
+
12
+ ## Two Usage Contexts
13
+
14
+ ### End Users (Your Project)
15
+
16
+ End users access rules **only through MCP tools**. No local rule files needed.
17
+
18
+ ```jsonc
19
+ // Codex MCP configuration
20
+ {
21
+ "mcpServers": {
22
+ "codingbuddy": {
23
+ "command": "npx",
24
+ "args": ["-y", "codingbuddy"],
25
+ "env": {
26
+ "CODINGBUDDY_PROJECT_ROOT": "/absolute/path/to/your/project"
27
+ }
28
+ }
29
+ }
30
+ }
31
+ ```
32
+
33
+ > **Important:** Codex(GitHub Copilot)의 `roots/list` MCP capability 지원 여부는 미확인입니다.
34
+ > `CODINGBUDDY_PROJECT_ROOT` 없이는 서버가 프로젝트의 `codingbuddy.config.json`을 찾지 못하여
35
+ > `language` 등 설정이 기본값으로 동작합니다. 항상 이 환경변수를 프로젝트의 절대 경로로 설정하세요.
36
+ > Codex가 `${workspaceFolder}` 변수 확장을 지원하는 경우, 절대 경로 대신 사용할 수 있습니다.
37
+
38
+ ### Monorepo Contributors
39
+
40
+ Contributors to the codingbuddy repository can use direct file references:
41
+
42
+ ```
43
+ Project Root/
44
+ ├── .codex/
45
+ │ └── rules/
46
+ │ └── system-prompt.md # References .ai-rules
47
+ └── packages/rules/.ai-rules/ # Single Source of Truth
48
+ ```
49
+
50
+ ## DRY Principle
51
+
52
+ **Single Source of Truth**: `packages/rules/.ai-rules/`
53
+
54
+ - All Agent definitions, rules, skills managed only in `.ai-rules/`
55
+ - `.codex/rules/system-prompt.md` acts as a **pointer only**
56
+ - No duplication, only references
8
57
 
9
58
  ## Integration Method
10
59
 
@@ -73,7 +122,30 @@ See [docs/codex-adapter-configuration.md](../../docs/codex-adapter-configuration
73
122
  └── codex.md # This guide
74
123
  ```
75
124
 
76
- ## Configuration Guide
125
+ ## Configuration Files
126
+
127
+ ### MCP Server Configuration
128
+
129
+ See the MCP configuration in the [End Users](#end-users-your-project) section above.
130
+
131
+ **Project root resolution priority** (in `mcp.service.ts`):
132
+ 1. `CODINGBUDDY_PROJECT_ROOT` environment variable (highest priority)
133
+ 2. `roots/list` MCP capability (support unconfirmed in Codex)
134
+ 3. `findProjectRoot()` automatic detection (fallback)
135
+
136
+ ### .codex/rules/system-prompt.md
137
+
138
+ System prompt providing context for Codex:
139
+
140
+ - Common AI rules reference from `.ai-rules/`
141
+ - PLAN/ACT/EVAL workflow modes
142
+ - Keyword Invocation support
143
+ - TDD and code quality guidelines
144
+ - Specialist agents reference
145
+
146
+ **File location**: `.codex/rules/system-prompt.md`
147
+
148
+ ### Detailed Guides
77
149
 
78
150
  For detailed setup instructions, see:
79
151
  - **Quick Start**: [docs/codex-adapter-configuration.md](../../docs/codex-adapter-configuration.md)
@@ -97,6 +169,187 @@ Copilot will use context from:
97
169
  - `.ai-rules/rules/augmented-coding.md` for code quality patterns
98
170
  - Existing codebase structure
99
171
 
172
+ ### Available MCP Tools
173
+
174
+ For the full list of available tools, see [docs/codex-adapter-configuration.md](../../docs/codex-adapter-configuration.md#available-mcp-tools).
175
+
176
+ Key tools:
177
+
178
+ | Tool | Description |
179
+ |------|-------------|
180
+ | `parse_mode` | **MANDATORY.** Parse PLAN/ACT/EVAL/AUTO keywords and return mode-specific rules, agent, and context |
181
+ | `search_rules` | Search for rules and guidelines |
182
+ | `get_project_config` | Get project configuration including tech stack, architecture, conventions, and language settings |
183
+ | `set_project_root` | ~~Set project root directory~~ **(deprecated — will be removed in v2.0.0)** — use `CODINGBUDDY_PROJECT_ROOT` env var or `--project-root` CLI flag instead |
184
+ | `recommend_skills` | Recommend skills based on user prompt with multi-language support |
185
+ | `get_skill` | Get skill content by name (returns full skill definition including instructions) |
186
+ | `list_skills` | List all available skills with optional filtering by priority |
187
+ | `get_agent_details` | Get detailed profile of a specific AI agent |
188
+ | `get_agent_system_prompt` | Get complete system prompt for a specialist agent |
189
+ | `prepare_parallel_agents` | Prepare multiple specialist agents with system prompts for execution (**recommended for Codex** — use for sequential specialist analysis) |
190
+ | `dispatch_agents` | Get Task-tool-ready dispatch parameters for agents (optimized for Claude Code Task tool; in Codex, prefer `prepare_parallel_agents`) |
191
+ | `generate_checklist` | Generate contextual checklists based on file patterns and domains (security, a11y, performance, testing, code-quality, SEO) |
192
+ | `analyze_task` | Analyze a task for risk assessment, relevant checklists, specialist recommendations, and workflow suggestions |
193
+ | `get_code_conventions` | Get project code conventions from config files (tsconfig, eslint, prettier) |
194
+ | `suggest_config_updates` | Analyze the project and suggest config updates based on detected changes (new frameworks, dependencies, patterns) |
195
+ | `read_context` | Read current context document (`docs/codingbuddy/context.md`) with verbosity control |
196
+ | `update_context` | **MANDATORY at mode end.** Update context document with decisions, notes, progress, findings |
197
+ | `cleanup_context` | Manually trigger context document cleanup (summarizes older sections to reduce size) |
198
+
199
+ ## Specialist Agents Execution
200
+
201
+ Codex does not have a `Task` tool for spawning background subagents. When `parse_mode` returns `parallelAgentsRecommendation`, execute specialists **sequentially**.
202
+
203
+ ### Auto-Detection
204
+
205
+ The MCP server automatically detects Codex as the client and returns a sequential execution hint in `parallelAgentsRecommendation.hint`. No manual configuration is needed.
206
+
207
+ ### Sequential Workflow
208
+
209
+ ```
210
+ parse_mode returns parallelAgentsRecommendation
211
+
212
+ Call prepare_parallel_agents with recommended specialists
213
+
214
+ For each specialist (sequentially):
215
+ - Announce: "🔍 Analyzing from [icon] [specialist-name] perspective..."
216
+ - Apply the specialist's system prompt as analysis context
217
+ - Analyze the target code/design from that specialist's viewpoint
218
+ - Record findings
219
+
220
+ Consolidate all specialist findings into unified summary
221
+ ```
222
+
223
+ ### Example (EVAL mode)
224
+
225
+ ```
226
+ parse_mode({ prompt: "EVAL review auth implementation" })
227
+ → parallelAgentsRecommendation:
228
+ specialists: ["security-specialist", "accessibility-specialist", "performance-specialist"]
229
+
230
+ prepare_parallel_agents({
231
+ mode: "EVAL",
232
+ specialists: ["security-specialist", "accessibility-specialist", "performance-specialist"]
233
+ })
234
+ → agents[]: each has systemPrompt
235
+
236
+ Sequential analysis:
237
+ 1. 🔒 Security: Apply security-specialist prompt, analyze, record findings
238
+ 2. ♿ Accessibility: Apply accessibility-specialist prompt, analyze, record findings
239
+ 3. ⚡ Performance: Apply performance-specialist prompt, analyze, record findings
240
+
241
+ Present: Consolidated findings from all 3 specialists
242
+ ```
243
+
244
+ ### Using dispatchReady (Auto-Dispatch)
245
+
246
+ When `parse_mode` returns a `dispatchReady` field, use it directly without calling `prepare_parallel_agents`:
247
+
248
+ ```
249
+ parse_mode returns dispatchReady
250
+
251
+ Use dispatchReady.primaryAgent.dispatchParams.prompt as primary analysis context
252
+
253
+ For each dispatchReady.parallelAgents[] (sequentially):
254
+ - Apply dispatchParams.prompt as specialist analysis context
255
+ - Analyze from that specialist's viewpoint
256
+ - Record findings
257
+
258
+ Consolidate all findings
259
+ ```
260
+
261
+ **Key fields:**
262
+ - `dispatchReady.primaryAgent.dispatchParams.prompt` — Primary agent system prompt. Use as the main analysis context.
263
+ - `dispatchReady.parallelAgents[].dispatchParams.prompt` — Each specialist's system prompt. Apply as analysis context for sequential execution.
264
+ - `subagent_type` — Claude Code Task tool parameter. **Ignore in Codex.**
265
+
266
+ > **Known limitation:** Codex cannot execute specialists in parallel. The `parallelAgents[]` array is consumed sequentially. True parallel execution requires Claude Code's Task tool.
267
+ >
268
+ > **Fallback:** If `dispatchReady` is not present in the `parse_mode` response, call `prepare_parallel_agents` MCP tool to retrieve specialist system prompts.
269
+
270
+ ### Visibility Pattern
271
+
272
+ **Start Message:**
273
+ ```
274
+ 🚀 Running N specialist analyses sequentially...
275
+ → [icon] [specialist-name]
276
+ → [icon] [specialist-name]
277
+ → [icon] [specialist-name]
278
+ ```
279
+
280
+ **Per-Specialist:**
281
+ ```
282
+ 🔍 Analyzing from [icon] [specialist-name] perspective...
283
+
284
+ [Analysis content]
285
+ ```
286
+
287
+ **Completion Message:**
288
+ ```
289
+ 📊 Specialist Analysis Complete:
290
+
291
+ [icon] [Specialist Name]:
292
+ [findings summary]
293
+
294
+ [icon] [Specialist Name]:
295
+ [findings summary]
296
+ ```
297
+
298
+ ### Handling Failures
299
+
300
+ When `prepare_parallel_agents` returns `failedAgents`:
301
+
302
+ ```
303
+ ⚠️ Some agents failed to load:
304
+ ✗ performance-specialist: Profile not found
305
+
306
+ Continuing with 3/4 agents...
307
+ ```
308
+
309
+ **Strategy:**
310
+ - Continue with successfully loaded agents
311
+ - Report failures clearly to user
312
+ - Document which agents couldn't be loaded in final report
313
+
314
+ ### Specialist Icons
315
+
316
+ | Icon | Specialist |
317
+ |------|------------|
318
+ | 🔒 | security-specialist |
319
+ | ♿ | accessibility-specialist |
320
+ | ⚡ | performance-specialist |
321
+ | 📏 | code-quality-specialist |
322
+ | 🧪 | test-strategy-specialist |
323
+ | 🏛️ | architecture-specialist |
324
+ | 📚 | documentation-specialist |
325
+ | 🔍 | seo-specialist |
326
+ | 🎨 | design-system-specialist |
327
+ | 📨 | event-architecture-specialist |
328
+ | 🔗 | integration-specialist |
329
+ | 📊 | observability-specialist |
330
+ | 🔄 | migration-specialist |
331
+ | 🌐 | i18n-specialist |
332
+
333
+ ### When to Use Specialist Execution
334
+
335
+ Specialist execution is recommended when `parse_mode` returns a `parallelAgentsRecommendation` field:
336
+
337
+ | Mode | Default Specialists | Use Case |
338
+ |------|---------------------|----------|
339
+ | **PLAN** | architecture-specialist, test-strategy-specialist | Validate architecture and test approach |
340
+ | **ACT** | code-quality-specialist, test-strategy-specialist | Verify implementation quality |
341
+ | **EVAL** | security-specialist, accessibility-specialist, performance-specialist, code-quality-specialist | Comprehensive multi-dimensional review |
342
+
343
+ ### Specialist Activation Scope
344
+
345
+ Each workflow mode activates different specialist agents:
346
+
347
+ - **PLAN mode**: Architecture and test strategy specialists validate design
348
+ - **ACT mode**: Code quality and test strategy specialists verify implementation
349
+ - **EVAL mode**: Security, accessibility, performance, and code quality specialists provide comprehensive review
350
+
351
+ **Important:** Specialists from one mode do NOT carry over to the next mode. Each mode has its own recommended specialist set.
352
+
100
353
  ## GitHub Copilot Workspace Integration
101
354
 
102
355
  When using Copilot Workspace:
@@ -123,22 +376,131 @@ When using Copilot Workspace:
123
376
  2. Keep `.github/copilot-instructions.md` concise (Copilot's context limit)
124
377
  3. Link to detailed rules in `.ai-rules/` rather than duplicating
125
378
 
379
+ ## AGENTS.md
380
+
381
+ Industry standard format compatible with all AI tools (Codex, Cursor, Claude Code, Kiro, etc.):
382
+
383
+ ```markdown
384
+ # AGENTS.md
385
+
386
+ This project uses codingbuddy MCP server to manage AI Agents.
387
+
388
+ ## Quick Start
389
+ ...
390
+ ```
391
+
392
+ See `AGENTS.md` in project root for details.
393
+
126
394
  ## Skills
127
395
 
396
+ Codex accesses codingbuddy skills through three patterns:
397
+
398
+ 1. **Auto-recommend** — AI calls `recommend_skills` based on intent detection
399
+ 2. **Browse and select** — User calls `list_skills` to discover, then `get_skill` to load
400
+ 3. **Slash-command** — User types `/<command>`, AI maps to `get_skill`
401
+
128
402
  ### Using Skills in Codex
129
403
 
130
- Skills are located in `.ai-rules/skills/`. To use a skill:
404
+ **Method 1: MCP Tool Chain (End Users Recommended)**
131
405
 
132
- 1. Read the skill file:
406
+ The AI should follow this chain when a skill might apply:
133
407
 
134
- ```bash
135
- cat .ai-rules/skills/<skill-name>/SKILL.md
136
- ```
408
+ 1. `recommend_skills({ prompt: "user's message" })` — Get skill recommendations
409
+ 2. `get_skill("skill-name")` — Load the recommended skill's full content
410
+ 3. Follow the skill instructions in the response
137
411
 
138
- 2. Follow the skill's checklist and process.
412
+ Example flow:
413
+ ```
414
+ User: "There is a bug in the authentication logic"
415
+ → AI calls recommend_skills({ prompt: "There is a bug in the authentication logic" })
416
+ → Response: { recommendations: [{ skillName: "systematic-debugging", ... }], nextAction: "Call get_skill..." }
417
+ → AI calls get_skill("systematic-debugging")
418
+ → AI follows the systematic-debugging skill instructions
419
+ ```
420
+
421
+ **Method 2: File Reference (Monorepo Contributors Only)**
422
+
423
+ ```bash
424
+ cat .ai-rules/skills/<skill-name>/SKILL.md
425
+ ```
426
+
427
+ > ⚠️ This method only works when `.ai-rules/` directory exists locally (monorepo development).
428
+ > It will fail silently when codingbuddy is installed via npm (`npx codingbuddy`).
429
+ >
430
+ > **Note:** `parse_mode` already embeds matched skill content in `included_skills` — no separate `get_skill` call needed when using mode keywords (PLAN/ACT/EVAL/AUTO).
431
+
432
+ ### Skill Discovery
433
+
434
+ Use `list_skills` to browse available skills before deciding which one to load:
435
+
436
+ ```
437
+ AI calls list_skills()
438
+ → Returns all skills with names, descriptions, and priority scores
439
+
440
+ # With filtering:
441
+ AI calls list_skills({ minPriority: 1, maxPriority: 3 })
442
+ → Returns only skills within priority range
443
+
444
+ → AI selects the most relevant skill
445
+ → AI calls get_skill("selected-skill-name")
446
+ ```
447
+
448
+ > **Tip:** Use `recommend_skills` when you want AI to automatically pick the best skill. Use `list_skills` when you want to manually browse and select.
449
+
450
+ ### Slash-Command Mapping
451
+
452
+ Codex has no native slash-command skill invocation. When a user types `/<command>`, the AI must call `get_skill` — this is Codex's equivalent of Claude Code's built-in Skill tool.
453
+
454
+ **Rule:** When user input matches `/<command>`, call `get_skill("<skill-name>")` and follow the returned instructions. This table is a curated subset — use `list_skills()` to discover all available skills.
455
+
456
+ | User Types | MCP Call |
457
+ |---|---|
458
+ | `/debug` or `/debugging` | `get_skill("systematic-debugging")` |
459
+ | `/tdd` | `get_skill("test-driven-development")` |
460
+ | `/brainstorm` | `get_skill("brainstorming")` |
461
+ | `/plan` or `/write-plan` | `get_skill("writing-plans")` |
462
+ | `/execute` or `/exec` | `get_skill("executing-plans")` |
463
+ | `/design` or `/frontend` | `get_skill("frontend-design")` |
464
+ | `/refactor` | `get_skill("refactoring")` |
465
+ | `/security` or `/audit` | `get_skill("security-audit")` |
466
+ | `/pr` | `get_skill("pr-all-in-one")` |
467
+ | `/review` or `/pr-review` | `get_skill("pr-review")` |
468
+ | `/parallel` or `/agents` | `get_skill("dispatching-parallel-agents")` |
469
+ | `/subagent` | `get_skill("subagent-driven-development")` |
470
+
471
+ For unrecognized slash commands, call `recommend_skills({ prompt: "<user's full message>" })` to find the closest match.
472
+
473
+ > **Disambiguation:** `/plan` (with slash prefix) triggers `get_skill("writing-plans")`. `PLAN` (without slash, at message start) triggers `parse_mode`. Similarly, `/execute` triggers `get_skill("executing-plans")` while `ACT` triggers `parse_mode`. The slash prefix is the distinguishing signal.
474
+
475
+ ### Proactive Skill Activation
476
+
477
+ Codex lacks session hooks that automatically enforce skill invocation (unlike Claude Code). The AI must detect intent patterns and call `recommend_skills` proactively — without waiting for the user to explicitly request a skill.
478
+
479
+ **Rule:** When the user's message suggests a skill would help, call `recommend_skills` at the start of the response — before any other action. The `recommend_skills` engine matches trigger patterns across multiple languages and is the authoritative source of truth.
480
+
481
+ Common trigger examples (not exhaustive):
482
+
483
+ | User Intent Signal | Likely Skill |
484
+ |---|---|
485
+ | Bug report, error, "not working", exception | `systematic-debugging` |
486
+ | "Brainstorm", "build", "create", "implement" | `brainstorming` |
487
+ | "Test first", TDD, write tests before code | `test-driven-development` |
488
+ | "Plan", "design", implementation approach | `writing-plans` |
489
+ | PR, commit, code review workflow | `pr-all-in-one` |
490
+
491
+ ```
492
+ User: "I need to plan the implementation for user authentication"
493
+ → AI calls recommend_skills({ prompt: "plan implementation for user authentication" })
494
+ → Loads writing-plans via get_skill
495
+ → Follows skill instructions to create structured plan
496
+ ```
497
+
498
+ > **Note:** When the user message starts with a mode keyword (`PLAN`, `ACT`, `EVAL`, `AUTO`), `parse_mode` already handles skill matching automatically via `included_skills` — no separate `recommend_skills` call is needed.
139
499
 
140
500
  ### Available Skills
141
501
 
502
+ Highlighted skills (use `list_skills()` for the complete list):
503
+
142
504
  - `brainstorming` - Explore requirements before implementation
143
505
  - `test-driven-development` - TDD workflow
144
506
  - `systematic-debugging` - Debug methodically
@@ -147,6 +509,7 @@ Skills are located in `.ai-rules/skills/`. To use a skill:
147
509
  - `subagent-driven-development` - In-session plan execution
148
510
  - `dispatching-parallel-agents` - Handle parallel tasks
149
511
  - `frontend-design` - Build production-grade UI
512
+ - `pr-all-in-one` - Unified commit and PR workflow
150
513
 
151
514
  ## PR All-in-One Skill
152
515
 
@@ -169,7 +532,7 @@ Unified commit and PR workflow that:
169
532
 
170
533
  ### Configuration
171
534
 
172
- Create `.claude/pr-config.json` in your project root. Required settings:
535
+ Create `.claude/pr-config.json` in your project root (this is the canonical path used by the pr-all-in-one skill across all AI tools). Required settings:
173
536
  - `defaultTargetBranch`: Target branch for PRs
174
537
  - `issueTracker`: `jira`, `github`, `linear`, `gitlab`, or `custom`
175
538
  - `issuePattern`: Regex pattern for issue ID extraction
@@ -194,7 +557,36 @@ If no config file exists, the skill guides you through interactive setup:
194
557
 
195
558
  ### Platform-Specific Note
196
559
 
197
- Use `cat .ai-rules/skills/pr-all-in-one/SKILL.md` to access skill documentation directly.
560
+ Use `get_skill('pr-all-in-one')` MCP tool to access the full skill documentation. This works in all environments (end users and monorepo contributors alike), unlike direct file access which only works when `.ai-rules/` exists locally.
561
+
562
+ ## Context Document Management
563
+
564
+ codingbuddy uses a fixed-path context document (`docs/codingbuddy/context.md`) to persist decisions across mode transitions.
565
+
566
+ ### How It Works
567
+
568
+ | Mode | Behavior |
569
+ |------|----------|
570
+ | PLAN / AUTO | Resets (clears) existing content and starts fresh |
571
+ | ACT / EVAL | Appends new section to existing content |
572
+
573
+ ### Required Workflow
574
+
575
+ 1. `parse_mode` automatically reads/creates the context document
576
+ 2. Review `contextDocument` in the response for previous decisions
577
+ 3. **Before completing each mode:** call `update_context` to persist current work
578
+
579
+ ### Available Tools
580
+
581
+ | Tool | Purpose |
582
+ |------|---------|
583
+ | `read_context` | Read current context document |
584
+ | `update_context` | Persist decisions, notes, progress, findings |
585
+ | `cleanup_context` | Summarize older sections to reduce document size |
586
+
587
+ ### Codex-Specific Note
588
+
589
+ Unlike Claude Code, Codex has no hooks or enforcement mechanisms to ensure `update_context` is called. The AI must **voluntarily remember** to call `update_context` before concluding each mode. Without this call, decisions and progress from the current mode will be lost across sessions or context compaction.
198
590
 
199
591
  ## AUTO Mode
200
592
 
@@ -252,3 +644,101 @@ module.exports = {
252
644
  - Complex refactoring with quality verification
253
645
  - Bug fixes needing comprehensive testing
254
646
  - Code quality improvements with measurable criteria
647
+
648
+ > **Codex limitation:** AUTO mode has no enforcement mechanism in Codex. See [Known Limitations](#known-limitations) for details.
649
+
650
+ ## Known Limitations
651
+
652
+ Codex environment does not support several features available in Claude Code:
653
+
654
+ | Feature | Status | Workaround |
655
+ |---------|--------|------------|
656
+ | **Task tool** (background subagents) | ❌ Not available | Use `prepare_parallel_agents` for sequential execution |
657
+ | **Native Skill tool** (`/skill-name`) | ❌ Not available | Use MCP tool chain: `recommend_skills` → `get_skill` |
658
+ | **Background subagent execution** | ❌ Not available | All specialist analyses run sequentially in the main thread |
659
+ | **Session hooks** (PreToolUse, etc.) | ❌ Not available | Rely on `.codex/rules/system-prompt.md` for always-on instructions |
660
+ | **Autonomous loop mechanism** | ❌ Not available | AUTO mode depends on Codex AI voluntarily looping |
661
+ | **Context compaction hooks** | ❌ Not available | Manually call `update_context` before ending each mode |
662
+ | **`dispatch_agents` full usage** | ⚠️ Partial | Returns Claude Code-specific `dispatchParams`; use `prepare_parallel_agents` instead |
663
+ | **`roots/list` MCP capability** | ⚠️ Unconfirmed | Set `CODINGBUDDY_PROJECT_ROOT` env var explicitly |
664
+ | **`restart_tui`** | ❌ Not applicable | Claude Code TUI-only tool; not functional in Codex |
665
+ | **Proactive skill detection** | ❌ No hooks | AI must call `recommend_skills` voluntarily based on intent |
666
+ | **Slash command native support** | ❌ Not available | Map `/<command>` to `get_skill` calls (see [Skills](#skills) section) |
667
+ | **`analyze_task` auto-invocation** | ❌ No hooks | AI must call at PLAN start voluntarily |
668
+
669
+ ### AUTO Mode Reliability
670
+
671
+ AUTO mode documents autonomous PLAN → ACT → EVAL cycling. In Codex, this depends entirely on the AI model voluntarily continuing the loop — there is no enforcement mechanism like Claude Code's hooks. Results may vary:
672
+
673
+ - The AI may stop after one iteration instead of looping
674
+ - Quality exit criteria (`Critical = 0 AND High = 0`) are advisory, not enforced
675
+ - For reliable multi-iteration workflows, prefer manual `PLAN` → `ACT` → `EVAL` cycling
676
+
677
+ ## Getting Started
678
+
679
+ 1. Ensure `.ai-rules/` directory exists with all common rules
680
+ 2. Configure MCP server with `CODINGBUDDY_PROJECT_ROOT`:
681
+ ```jsonc
682
+ // Codex MCP configuration
683
+ {
684
+ "mcpServers": {
685
+ "codingbuddy": {
686
+ "command": "npx",
687
+ "args": ["-y", "codingbuddy"],
688
+ "env": {
689
+ "CODINGBUDDY_PROJECT_ROOT": "/absolute/path/to/your/project"
690
+ }
691
+ }
692
+ }
693
+ }
694
+ ```
695
+ 3. Verify `.codex/rules/system-prompt.md` references `.ai-rules/` correctly
696
+ 4. Start a Codex session — MCP tools are now available
697
+ 5. Use PLAN/ACT/EVAL/AUTO workflow via `parse_mode` MCP tool
698
+
699
+ ## Verification Status
700
+
701
+ > Documentation based on MCP server source code analysis and Codex/GitHub Copilot public documentation. Runtime verification in a live Copilot + MCP environment has not yet been performed.
702
+
703
+ ### Verification Levels
704
+
705
+ | Level | Meaning |
706
+ |-------|---------|
707
+ | ✅ Code-verified | Server-side code confirms the feature exists and returns expected data |
708
+ | ✅ Documented | Workflow documented based on design; runtime behavior not yet tested |
709
+ | ⚠️ Unconfirmed | Depends on Codex/Copilot capabilities not documented in public docs |
710
+ | ❌ Not supported | Feature confirmed unavailable in Codex environment |
711
+
712
+ ### Feature Verification
713
+
714
+ | Pattern | Status | Notes |
715
+ |---------|--------|-------|
716
+ | MCP Tool Access | ✅ Code-verified | 19 tools registered in handlers; 18 applicable to Codex (`restart_tui` is Claude Code-only) |
717
+ | PLAN/ACT/EVAL Modes | ✅ Code-verified | `parse_mode` returns mode-specific rules, agent, context, and dispatchReady |
718
+ | Keyword Invocation | ⚠️ Unconfirmed | Depends on Copilot reliably calling `parse_mode` when mode keywords are detected |
719
+ | Skills (MCP Tools) | ✅ Code-verified | `recommend_skills` → `get_skill` tool chain returns correct data |
720
+ | Specialist Agents Execution | ✅ Documented | Sequential workflow with `prepare_parallel_agents`; not runtime-tested in Copilot |
721
+ | AUTO Mode | ⚠️ Unconfirmed | Depends on Copilot voluntarily continuing PLAN → ACT → EVAL loop |
722
+ | Context Document Management | ✅ Code-verified | `read_context`, `update_context`, `cleanup_context` tools exist and function |
723
+ | `roots/list` MCP Capability | ⚠️ Unconfirmed | Not confirmed in Codex/GitHub Copilot public documentation |
724
+ | Known Limitations | ✅ Documented | Task tool, hooks, AUTO mode, background subagent, dispatch_agents limitations |
725
+ | Task Tool / Background Subagent | ❌ Not supported | Sequential execution only; no parallel subagent spawning |
726
+
727
+ ### Runtime Verification Checklist
728
+
729
+ To fully verify these patterns, test in VS Code with GitHub Copilot + codingbuddy MCP:
730
+
731
+ - [ ] Type `PLAN design auth` → Copilot calls `parse_mode` (check MCP logs with `MCP_DEBUG=1`)
732
+ - [ ] Type `EVAL review code` → Copilot calls `parse_mode` with EVAL mode
733
+ - [ ] Type `/debug` → Copilot calls `get_skill("systematic-debugging")`
734
+ - [ ] Type `AUTO implement feature` → Copilot attempts PLAN→ACT→EVAL loop
735
+ - [ ] Verify `prepare_parallel_agents` returns specialist prompts correctly
736
+ - [ ] Verify `update_context` persists across mode transitions
737
+ - [ ] Test `CODINGBUDDY_PROJECT_ROOT` env var resolution
738
+
739
+ ## Reference
740
+
741
+ - [GitHub Copilot Documentation](https://docs.github.com/copilot)
742
+ - [codingbuddy Documentation](../../docs/)
743
+ - [Common AI Rules](../../packages/rules/.ai-rules/)
744
+ - [Agent Definitions](../../packages/rules/.ai-rules/agents/)