Skip to content

Commit 8d9e4e1

Browse files
Copilotlmajano
andcommitted
Make CLAUDE.md point to AGENTS.md via @AGENTS.md directive
Agent-Logs-Url: https://github.com/ColdBox/coldbox-cli/sessions/785ea4ed-69ec-4c40-9eb3-3ed6e0ae4012 Co-authored-by: lmajano <137111+lmajano@users.noreply.github.com>
1 parent f71d36d commit 8d9e4e1

4 files changed

Lines changed: 14 additions & 4 deletions

File tree

AI_INTEGRATION.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,10 +202,10 @@ graph LR
202202

203203
Additionally, agent configuration files are created for you (paths defined in `AgentRegistry.cfc`):
204204

205-
* `CLAUDE.md` - Claude Desktop/Code assistant
205+
* `CLAUDE.md` - Claude Desktop/Code assistant (points to `AGENTS.md` via `@AGENTS.md`)
206206
* `.github/copilot-instructions.md` - GitHub Copilot
207207
* `.cursorrules` - Cursor IDE
208-
* `AGENTS.md` - Codex & OpenCode (shared file)
208+
* `AGENTS.md` - Codex, OpenCode & Claude (shared file)
209209
* `GEMINI.md` - Gemini CLI
210210

211211
### Keeping Resources Updated
@@ -894,7 +894,7 @@ ColdBox AI Integration supports **6 major AI agents** with automatic configurati
894894
895895
| Agent | Config File | Description |
896896
| ------------------ | --------------------------------- | ------------------------------ |
897-
| **Claude** | `CLAUDE.md` | Claude Desktop and Claude Code |
897+
| **Claude** | `CLAUDE.md` `AGENTS.md` | Claude Desktop and Claude Code |
898898
| **GitHub Copilot** | `.github/copilot-instructions.md` | VS Code Copilot integration |
899899
| **Cursor** | `.cursorrules` | Cursor IDE rules |
900900
| **Codex** | `AGENTS.md` (shared) | Codex AI assistant |

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ coldbox ai agents remove cursor # Remove an agent
546546
coldbox ai agents refresh # Regenerate all configurations
547547
```
548548

549-
**Supported Agents**: Claude (CLAUDE.md), GitHub Copilot (.github/copilot-instructions.md), Cursor (.cursorrules), Codex (AGENTS.md), Gemini (GEMINI.md), OpenCode (AGENTS.md)
549+
**Supported Agents**: Claude (CLAUDE.md → AGENTS.md), GitHub Copilot (.github/copilot-instructions.md), Cursor (.cursorrules), Codex (AGENTS.md), Gemini (GEMINI.md), OpenCode (AGENTS.md)
550550

551551
#### Guidelines
552552

changelog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
## [Unreleased]
1111

12+
- `CLAUDE.md` now contains `@AGENTS.md` to point Claude to the shared `AGENTS.md` file, avoiding duplicate content
13+
1214
## [8.8.0] - 2026-03-12
1315

1416
- Fix invalid aliases

models/AgentRegistry.cfc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,14 @@ component singleton {
153153
directoryCreate( configDir )
154154
}
155155

156+
// For Claude, write the full content to AGENTS.md and make CLAUDE.md point to it
157+
if ( arguments.agent == "claude" ) {
158+
var agentsFilePath = getDirectoryFromPath( configPath ) & "AGENTS.md"
159+
fileWrite( agentsFilePath, content )
160+
fileWrite( configPath, "@AGENTS.md" )
161+
return
162+
}
163+
156164
// Write agent config file
157165
fileWrite( configPath, content )
158166
}

0 commit comments

Comments
 (0)