Skip to content

Commit 45f7ed4

Browse files
committed
Merge branch 'development'
2 parents edecef5 + 73a9906 commit 45f7ed4

10 files changed

Lines changed: 205 additions & 104 deletions

File tree

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464
box task run taskfile=build/Build target=run :version=${{ env.VERSION }} :projectName=${{ env.MODULE_ID }} :buildID=${{ github.run_number }} :branch=${{ env.BRANCH }}
6565
6666
- name: Commit Changelog To Master
67-
uses: EndBug/add-and-commit@v9.1.4
67+
uses: EndBug/add-and-commit@v10.0.0
6868
if: env.SNAPSHOT == 'false'
6969
with:
7070
author_name: Github Actions
@@ -118,7 +118,7 @@ jobs:
118118
box forgebox publish --force
119119
120120
- name: Create Github Release
121-
uses: taiki-e/create-gh-release-action@v1.9.2
121+
uses: taiki-e/create-gh-release-action@v1.9.3
122122
continue-on-error: true
123123
if: env.SNAPSHOT == 'false'
124124
with:
@@ -165,7 +165,7 @@ jobs:
165165
166166
# Commit it back to development
167167
- name: Commit Version Bump
168-
uses: EndBug/add-and-commit@v9.1.4
168+
uses: EndBug/add-and-commit@v10.0.0
169169
with:
170170
author_name: Github Actions
171171
author_email: info@ortussolutions.com

AI_INTEGRATION.md

Lines changed: 12 additions & 20 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
@@ -545,7 +545,7 @@ Override core or module guidelines to customize them for your needs:
545545

546546
```bash
547547
# Override a core guideline
548-
coldbox ai guidelines install coldbox --override
548+
coldbox ai guidelines override coldbox
549549

550550
# Edit the override
551551
edit .ai/guidelines/overrides/coldbox.md
@@ -801,7 +801,7 @@ Override built-in skills to adapt them to your conventions:
801801

802802
```bash
803803
# Override a core skill
804-
coldbox ai skills install creating-handlers --override
804+
coldbox ai skills override creating-handlers
805805

806806
# Edit the override
807807
edit .ai/skills/overrides/creating-handlers/SKILL.md
@@ -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 |
@@ -916,7 +916,7 @@ coldbox ai agents add claude copilot cursor
916916
coldbox ai agents remove cursor
917917

918918
# Regenerate all configurations
919-
coldbox ai agents refresh
919+
coldbox ai refresh
920920
```
921921

922922
Each agent configuration includes:
@@ -1082,15 +1082,7 @@ Custom server configuration in `.ai/manifest.json`:
10821082

10831083
### MCP Configuration
10841084

1085-
Generate agent-specific MCP configurations:
1086-
1087-
```bash
1088-
# Generate .mcp.json for all agents
1089-
coldbox ai mcp config
1090-
1091-
# Agent-specific configuration
1092-
coldbox ai mcp config --agent=claude
1093-
```
1085+
MCP server configurations are generated automatically as part of `coldbox ai install` and `coldbox ai refresh`.
10941086

10951087
Example generated `.mcp.json`:
10961088

@@ -1123,7 +1115,7 @@ ColdBox AI Integration provides comprehensive CLI commands for managing your AI
11231115
```bash
11241116
# Initial setup
11251117
coldbox ai install # Interactive installation wizard
1126-
coldbox ai install --agents=claude # Install for specific agent
1118+
coldbox ai install agent claude # Install for specific agent
11271119

11281120
# View configuration
11291121
coldbox ai info # Show current configuration
@@ -1141,8 +1133,8 @@ coldbox ai refresh # Sync with installed modules
11411133
```bash
11421134
coldbox ai guidelines list # List installed
11431135
coldbox ai guidelines list --verbose # With descriptions
1144-
coldbox ai guidelines install coldbox qb # Install specific
1145-
coldbox ai guidelines uninstall qb # Remove guideline
1136+
coldbox ai guidelines add coldbox qb # Install specific
1137+
coldbox ai guidelines remove qb # Remove guideline
11461138
coldbox ai guidelines refresh # Update from modules
11471139
```
11481140

@@ -1151,8 +1143,8 @@ coldbox ai guidelines refresh # Update from modules
11511143
```bash
11521144
coldbox ai skills list # List installed
11531145
coldbox ai skills list --verbose # With descriptions
1154-
coldbox ai skills install creating-handlers # Install specific
1155-
coldbox ai skills uninstall creating-handlers # Remove skill
1146+
coldbox ai skills add creating-handlers # Install specific
1147+
coldbox ai skills remove creating-handlers # Remove skill
11561148
coldbox ai skills refresh # Update from modules
11571149
```
11581150

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ The ColdBox CLI provides a comprehensive AI integration system that enhances you
519519
```bash
520520
# Install AI integration
521521
coldbox ai install # Interactive setup
522-
coldbox ai install --agents=claude # Setup with specific agent
522+
coldbox ai install agent=claude # Setup with specific agent
523523

524524
# View current configuration
525525
coldbox ai info # Show configuration summary
@@ -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

@@ -558,9 +558,9 @@ coldbox ai guidelines list # List all installed guidelines
558558
coldbox ai guidelines list --verbose # Show details and descriptions
559559

560560
# Manage guidelines
561-
coldbox ai guidelines install coldbox testbox # Install by name
562-
coldbox ai guidelines install https://example.com/ # Install from URL
563-
coldbox ai guidelines uninstall testbox # Remove guideline
561+
coldbox ai guidelines add coldbox testbox # Install by name
562+
coldbox ai guidelines add https://example.com/ # Install from URL
563+
coldbox ai guidelines remove testbox # Remove guideline
564564
coldbox ai guidelines refresh # Update from modules
565565
```
566566

@@ -576,8 +576,8 @@ coldbox ai skills list # List all installed skills
576576
coldbox ai skills list --verbose # Show details
577577

578578
# Manage skills
579-
coldbox ai skills install creating-handlers async-programming
580-
coldbox ai skills uninstall async-programming
579+
coldbox ai skills add creating-handlers async-programming
580+
coldbox ai skills remove async-programming
581581
coldbox ai skills refresh # Update from modules
582582
```
583583

box.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name":"ColdBox CLI",
3-
"version":"8.8.0",
3+
"version":"8.9.0",
44
"location":"https://downloads.ortussolutions.com/ortussolutions/commandbox-modules/coldbox-cli/@build.version@/coldbox-cli-@build.version@.zip",
55
"slug":"coldbox-cli",
66
"author":"Ortus Solutions, Corp",

changelog.md

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

1010
## [Unreleased]
1111

12+
### Updates
13+
14+
- `CLAUDE.md` now contains `@AGENTS.md` to point Claude to the shared `AGENTS.md` file, avoiding duplicate content
15+
16+
### Fixed
17+
18+
- Fix fwreinit not recognizing webroot setting in server.json
19+
- Fixes for invalid commands in readmes and ai guideline.
20+
- Updated html helper guideline to reflect the new helper syntax and added more examples.
21+
1222
## [8.8.0] - 2026-03-12
1323

1424
- Fix invalid aliases

commands/coldbox/reinit.cfc

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,19 @@ component aliases="fwreinit" {
1818

1919
/**
2020
* @password The FWReinit password
21-
* @name Name of the CommandBox server to reinit
21+
* @name Name of the CommandBox server to reinit, will default to the name listed in server.json file
2222
* @showUrl Show the Url to reinit
2323
**/
2424
function run(
2525
password = "1",
26-
name = "",
26+
name = getDefaultServerName(),
2727
showUrl = true
2828
){
29-
var serverInfo = serverService.getServerInfoByDiscovery( getCWD(), arguments.name );
29+
var serverInfo = serverService.getServerInfoByDiscovery( name = arguments.name );
3030

3131
if ( !structCount( serverInfo ) ) {
3232
print.boldRedLine(
33-
"No server configurations found for '#getCWD()#', so have no clue what to reinit buddy!"
33+
"No server configurations found for '#getCWD()#' and '#arguments.name#', so have no clue what to reinit buddy!"
3434
);
3535
} else {
3636
var thisURL = "#serverInfo.host#:#serverInfo.port#/?fwreinit=#arguments.password#";
@@ -50,4 +50,9 @@ component aliases="fwreinit" {
5050
}
5151
}
5252

53+
private function getDefaultServerName(){
54+
var serverInfo = serverService.getServerInfoByDiscovery( serverConfigFile = "server.json" );
55+
return serverInfo.keyExists( "name" ) ? serverInfo.name : "";
56+
}
57+
5358
}

models/AgentRegistry.cfc

Lines changed: 80 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ component singleton {
2828
"gemini" : "GEMINI.md",
2929
"opencode" : "AGENTS.md"
3030
}
31-
AGENT_OPTIONS = [
31+
// Demarcation markers that wrap the ColdBox CLI-managed section
32+
MANAGED_SECTION_START = "<!-- COLDBOX-CLI:START -->"
33+
MANAGED_SECTION_END = "<!-- COLDBOX-CLI:END -->"
34+
AGENT_OPTIONS = [
3235
{
3336
display : "Claude (Anthropic) - Recommended for general development",
3437
value : "claude"
@@ -126,6 +129,68 @@ component singleton {
126129
// Private Helpers
127130
// ========================================
128131

132+
/**
133+
* Merges newly generated managed content with any user-authored content from an existing file.
134+
*
135+
* The managed section is delimited by COLDBOX-CLI:START and COLDBOX-CLI:END HTML comment
136+
* markers. On refresh, only the content between those markers is replaced; everything after
137+
* the end marker (i.e. the user's custom documentation) is preserved unchanged.
138+
*
139+
* Behavior:
140+
* - File does not exist → return newContent as-is (first-time write).
141+
* - File exists but has no end marker → return newContent as-is (old format, no user section to preserve).
142+
* - File exists with end marker → replace managed section, keep user section intact.
143+
*
144+
* @filePath Absolute path to the existing agent config file (may not exist yet).
145+
* @newContent Freshly generated content that includes both START and END markers.
146+
*
147+
* @return Combined content with updated managed section and preserved user section.
148+
*/
149+
private string function mergeUserContent(
150+
required string filePath,
151+
required string newContent
152+
){
153+
var endMarker = static.MANAGED_SECTION_END
154+
155+
// Nothing to preserve — first-time write
156+
if ( !fileExists( filePath ) ) {
157+
return newContent
158+
}
159+
160+
var existingContent = fileRead( filePath )
161+
162+
// Find the end marker in the existing file
163+
var endPos = findNoCase( endMarker, existingContent )
164+
165+
// Old-format file (no markers) — write fresh content, no user section to preserve
166+
if ( !endPos ) {
167+
return newContent
168+
}
169+
170+
// Extract user content: everything that comes after the end marker
171+
var userStartPos = endPos + len( endMarker )
172+
var userContent = mid(
173+
existingContent,
174+
userStartPos,
175+
len( existingContent ) - userStartPos + 1
176+
)
177+
178+
// Find the end marker position in the newly generated content
179+
var newEndPos = findNoCase( endMarker, newContent )
180+
if ( !newEndPos ) {
181+
// New template has no end marker — return new content plus preserved user section
182+
return newContent & userContent
183+
}
184+
185+
// Slice off the managed portion of the new content (up to and including the end marker)
186+
var managedContent = left(
187+
newContent,
188+
newEndPos + len( endMarker ) - 1
189+
)
190+
191+
return managedContent & userContent
192+
}
193+
129194
/**
130195
* Configure a single agent
131196
*
@@ -153,8 +218,20 @@ component singleton {
153218
directoryCreate( configDir )
154219
}
155220

156-
// Write agent config file
157-
fileWrite( configPath, content )
221+
// For Claude, write the full content to AGENTS.md and make CLAUDE.md point to it
222+
if ( arguments.agent == "claude" ) {
223+
var agentsFilePath = getDirectoryFromPath( configPath ) & "AGENTS.md"
224+
var mergedContent = mergeUserContent( agentsFilePath, content )
225+
fileWrite( agentsFilePath, mergedContent )
226+
fileWrite( configPath, "@AGENTS.md" )
227+
return
228+
}
229+
230+
// Write agent config file, preserving any user-authored content outside the managed section
231+
fileWrite(
232+
configPath,
233+
mergeUserContent( configPath, content )
234+
)
158235
}
159236

160237
/**

0 commit comments

Comments
 (0)