Skip to content

Commit dfde9c2

Browse files
committed
more updates
1 parent 5def6dc commit dfde9c2

File tree

5 files changed

+180
-17
lines changed

5 files changed

+180
-17
lines changed

AIPlan.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,15 @@
6464

6565
---
6666

67-
### Phase 3: Application Integration
67+
### Phase 3: Application Integration (100% Complete)
6868

6969
**Integration Points:**
70-
- Add to `coldbox create app` wizard
71-
- Add to `coldbox create app-wizard` flow
72-
- Add `--ai` flag support
73-
- Detect existing app structure, this comes from the skeleton chosen during app creation, and auto-configure AI integration
74-
- Generate project-specific context
75-
- Add AI support to `coldbox create module`
70+
- Add to `coldbox create app` wizard - Added `--ai` and `--aiAgent` parameters
71+
- Add to `coldbox create app-wizard` flow - Added interactive AI setup with agent selection
72+
- Add `--ai` flag support - Implemented on both app and module creation
73+
- Detect existing app structure, this comes from the skeleton chosen during app creation, and auto-configure AI integration - Language auto-detected from skeleton/boxlang flag
74+
- Generate project-specific context - Calls `coldbox ai install` with detected language
75+
- Add AI support to `coldbox create module` - Creates module-specific AI guideline structure in `resources/coldbox-cli/ai/`
7676

7777
---
7878

@@ -338,7 +338,7 @@
338338
**Phase Status:**
339339
- ✅ Phase 1: Foundation - **100% Complete**
340340
- ✅ Phase 2: CLI Commands - **100% Complete** (MCP deferred)
341-
- Phase 3: Application Integration - **0% Complete**
341+
- Phase 3: Application Integration - **100% Complete**
342342
- ✅ Phase 4: Guidelines Content - **100% Complete** (40/40 guidelines)
343343
- ⬜ Phase 5: Skills Content - **0% Complete** (41 skills)
344344
- ⬜ Phase 6: MCP Integration - **0% Complete** (25 servers)
@@ -347,7 +347,7 @@
347347
- ⬜ Phase 9: Module Support - **0% Complete**
348348
- ⬜ Phase 10: Documentation - **0% Complete**
349349

350-
**Overall Progress:** 30% (3/10 phases complete)
350+
**Overall Progress:** 40% (4/10 phases complete)
351351

352352
---
353353

commands/coldbox/create/app-wizard.cfc

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,39 @@ component extends="app" aliases="" {
5656
arguments.migrations = false;
5757
}
5858

59+
// AI Integration
60+
print.line()
61+
print.cyanLine( "🤖 AI Integration" )
62+
print.line()
63+
64+
if ( confirm( "Enable AI assistance for this project? [y/n]" ) ) {
65+
arguments.ai = true;
66+
67+
var agentChoices = [
68+
"1. Claude (Anthropic) - Best for code generation",
69+
"2. GitHub Copilot - Integrated with GitHub",
70+
"3. Cursor - Modern AI-first IDE",
71+
"4. Multiple - Install for whole team"
72+
]
73+
74+
print.line()
75+
agentChoices.each( ( choice ) => print.line( choice ) )
76+
print.line()
77+
78+
var agentChoice = ask( "Select AI agent [1-4]: " )
79+
80+
var agentMap = {
81+
"1": "claude",
82+
"2": "copilot",
83+
"3": "cursor",
84+
"4": "claude,copilot,cursor"
85+
}
86+
87+
arguments.aiAgent = agentMap[ agentChoice ] ?: "claude"
88+
} else {
89+
arguments.ai = false;
90+
}
91+
5992
variables.print
6093
.boldGreenLine( "🍳 Creating your site..." )
6194
.line()

commands/coldbox/create/app.cfc

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ component extends="coldbox-cli.models.BaseCommand" {
7676
* @vite Setup Vite for frontend asset building (For BoxLang or Modern apps only)
7777
* @rest Is this a REST API project? (For BoxLang apps only)
7878
* @cfml Set the language to CFML explicitly (overrides boxlang)
79+
* @ai Enable AI integration for the application
80+
* @aiAgent The AI agent to configure (claude, copilot, cursor, etc.)
7981
**/
8082
function run(
8183
name = defaultAppName,
@@ -90,7 +92,9 @@ component extends="coldbox-cli.models.BaseCommand" {
9092
boolean docker = false,
9193
boolean vite = false,
9294
boolean rest = false,
93-
boolean cfml = false
95+
boolean cfml = false,
96+
boolean ai = false,
97+
string aiAgent = "claude"
9498
){
9599
// Check for wizard argument
96100
if ( arguments.wizard ) {
@@ -422,10 +426,28 @@ component extends="coldbox-cli.models.BaseCommand" {
422426
)
423427
}
424428

425-
printSuccess( "🥊 Your ColdBox BoxLang application is ready to roll!" )
426-
printHelp( "👉 Run 'server start' to launch the development server." )
427-
printHelp( "👉 Run 'coldbox help' to see a list of available commands from the ColdBox CLI" )
428-
printHelp( "🗳️ Happy coding!" )
429+
// AI Integration Setup
430+
if ( arguments.ai ) {
431+
printInfo( "🤖 Setting up AI integration..." )
432+
variables.print.line().toConsole()
433+
434+
// Determine language from skeleton and flags
435+
var language = arguments.boxlang ? "boxlang" : "cfml"
436+
437+
command( "coldbox ai install" )
438+
.params(
439+
directory = arguments.directory,
440+
agents = arguments.aiAgent,
441+
language = language
442+
)
443+
.run()
444+
445+
printSuccess( "✅ AI integration complete!" )
446+
printHelp( "👉 Run 'coldbox ai info' to see your AI configuration" )
447+
printHelp( "👉 Run 'coldbox ai help' to see available AI commands" )
448+
variables.print.line().toConsole()
449+
}
450+
429451
}
430452

431453
/**

commands/coldbox/create/module.cfc

Lines changed: 69 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ component extends="coldbox-cli.models.BaseCommand" {
2121
* @directory The base directory to create your model in and creates the directory if it does not exist.
2222
* @views Create the views folder on creatin or remove it. Defaults to true
2323
* @boxlang If this is a boxlang project, defaults to true
24+
* @ai Enable AI integration for the module (creates AI guideline structure)
2425
**/
2526
function run(
2627
required name,
@@ -33,7 +34,8 @@ component extends="coldbox-cli.models.BaseCommand" {
3334
dependencies = "",
3435
directory = "modules_app",
3536
boolean views = true,
36-
boolean boxlang = isBoxLangProject( getCWD() )
37+
boolean boxlang = isBoxLangProject( getCWD() ),
38+
boolean ai = false
3739
){
3840
// This will make each directory canonical and absolute
3941
arguments.directory = resolvePath( arguments.directory );
@@ -135,6 +137,70 @@ component extends="coldbox-cli.models.BaseCommand" {
135137
"path",
136138
( path ) => !reFindNoCase( "\.DS_Store", arguments.path )
137139
).each( ( item ) => print.greenLine( " => " & item.replace( directory, "" ) ) );
138-
}
139140

140-
}
141+
// AI Integration Setup
142+
if ( arguments.ai ) {
143+
var modulePath = arguments.directory & "/#arguments.name#"
144+
145+
printInfo( "🤖 Setting up AI integration for module..." )
146+
147+
// Create AI structure
148+
directoryCreate( "#modulePath#/resources/coldbox-cli/ai/guidelines", true )
149+
directoryCreate( "#modulePath#/resources/coldbox-cli/ai/skills", true )
150+
151+
// Create module guideline template
152+
var guidelineTemplate = [
153+
"# #arguments.name# Module",
154+
"",
155+
"> **Module**: #arguments.name#",
156+
"> **Category**: modules",
157+
"> **Purpose**: [Describe what this module does]",
158+
"",
159+
"## Overview",
160+
"",
161+
"[Provide an overview of the module's functionality]",
162+
"",
163+
"## Installation",
164+
"",
165+
"```bash",
166+
"box install #arguments.name#",
167+
"```",
168+
"",
169+
"## Configuration",
170+
"",
171+
"Configure in `config/ColdBox.cfc`:",
172+
"",
173+
"```boxlang",
174+
"moduleSettings = {",
175+
" #arguments.name# = {",
176+
" // Configuration options",
177+
" }",
178+
"}",
179+
"```",
180+
"",
181+
"## Usage Patterns",
182+
"",
183+
"### Basic Usage",
184+
"",
185+
"[Provide code examples]",
186+
"",
187+
"## Best Practices",
188+
"",
189+
"- [List best practices]",
190+
"",
191+
"## Additional Resources",
192+
"",
193+
"- Documentation: [Add link]",
194+
"- Repository: [Add link]"
195+
]
196+
197+
fileWrite(
198+
"#modulePath#/resources/coldbox-cli/ai/guidelines/core.md",
199+
guidelineTemplate.toList( chr(10) )
200+
)
201+
202+
printSuccess( "✅ AI support added to module!" )
203+
printHelp( "👉 Edit: #modulePath#/resources/coldbox-cli/ai/guidelines/core.md" )
204+
printHelp( "👉 When users install this module, AI guidelines will be auto-discovered" )
205+
}
206+
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# |moduleName| Module
2+
3+
> **Module**: |moduleName|
4+
> **Category**: modules
5+
> **Purpose**: [Describe what this module does]
6+
7+
## Overview
8+
9+
[Provide an overview of the module's functionality]
10+
11+
## Installation
12+
13+
```bash
14+
box install |moduleName|
15+
```
16+
17+
## Configuration
18+
19+
Configure in `config/ColdBox.cfc`:
20+
21+
```boxlang
22+
moduleSettings = {
23+
|moduleName| = {
24+
// Configuration options
25+
}
26+
}
27+
```
28+
29+
## Usage Patterns
30+
31+
### Basic Usage
32+
33+
[Provide code examples]
34+
35+
## Best Practices
36+
37+
- [List best practices]
38+
39+
## Additional Resources
40+
41+
- Documentation: [Add link]
42+
- Repository: [Add link]

0 commit comments

Comments
 (0)