Skip to content

Commit 0d913ec

Browse files
Merge pull request #2243 from jimthompson5802/issue-2235-preserve-user-selected-llm
feat(cli): remove default LLM for copilot AI Assistant
2 parents 893dfe8 + 4210654 commit 0d913ec

5 files changed

Lines changed: 18 additions & 7 deletions

File tree

calm-ai/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ Configuration files in `ai-assistants/` define how to integrate CALM prompts wit
127127
"topLevelPromptFileName": "CALM.agent.md",
128128
"skillPrefix": "`",
129129
"skillSuffix": "`",
130-
"frontmatter": "---\ndescription: An AI Assistant for FINOS CALM development.\ntools: ['codebase', 'editFiles', 'fetch', 'runInTerminal']\nmodel: Claude Sonnet 4.5\n---",
130+
"frontmatter": "---\ndescription: An AI Assistant for FINOS CALM development.\ntools: ['codebase', 'editFiles', 'fetch', 'runInTerminal']\n---",
131131
"skillPrompts": [
132132
"calm-prompts/architecture-creation.md",
133133
"calm-prompts/calm-cli-instructions.md",
@@ -149,7 +149,7 @@ Configuration files in `ai-assistants/` define how to integrate CALM prompts wit
149149

150150
**GitHub Copilot specifics:**
151151
- Uses backticks (`` ` ``) to reference skill files
152-
- Frontmatter specifies Claude Sonnet 4.5 model and available tools
152+
- Frontmatter specifies available tools
153153
- Prompts placed in `.github/agents/` directory
154154
- Skill prompts referenced as `` `calm-prompts/architecture-creation.md` ``
155155

calm-ai/ai-assistants/copilot.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"topLevelPromptFileName": "CALM.agent.md",
55
"skillPrefix": "`",
66
"skillSuffix": "`",
7-
"frontmatter": "---\ndescription: An AI Assistant for FINOS CALM development.\ntools: ['codebase', 'editFiles', 'fetch', 'runInTerminal']\nmodel: Claude Sonnet 4.5\n---",
7+
"frontmatter": "---\ndescription: An AI Assistant for FINOS CALM development.\ntools: ['codebase', 'editFiles', 'fetch', 'runInTerminal']\n---",
88
"skillPrompts": [
99
"calm-prompts/architecture-creation.md",
1010
"calm-prompts/calm-cli-instructions.md",

cli/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ This isn't a full break, but it implies that you've forgotten to fill out a deta
241241
242242
## CALM init-ai
243243
244-
The `init-ai` command sets up AI-powered development assistance for CALM architecture modeling by configuring a specialized VSCode agent with comprehensive tool prompts. At present two AI Assistant providers are supported: Github Copilot and AWS Kiro.
244+
The `init-ai` command sets up AI-powered development assistance for CALM architecture modeling by configuring a specialized VSCode agent with comprehensive tool prompts. At present three AI Assistant providers are supported: Github Copilot, Claude Code, and AWS Kiro.
245245
246246
```shell
247247
calm init-ai --help
@@ -250,7 +250,7 @@ Usage: calm init-ai [options]
250250
Augment a git repository with AI assistance for CALM
251251
252252
Options:
253-
-p, --provider <provider> AI provider to initialize (choices: "copilot", "kiro")
253+
-p, --provider <provider> AI provider to initialize (choices: "copilot", "kiro", "claude")
254254
-d, --directory <path> Target directory (defaults to current directory) (default: ".")
255255
-v, --verbose Enable verbose logging. (default: false)
256256
-h, --help display help for command

cli/src/cli.e2e.spec.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,21 +104,25 @@ describe('CLI Integration Tests', () => {
104104
await run(calm(), ['init-ai', '-p', provider, '--directory', testDir]);
105105

106106
// Define expected paths based on provider
107-
const expectedPaths: Record<string, { topLevelDir: string; mainPromptFile: string; skillPromptsDir: string }> = {
107+
const expectedPaths: Record<string, { topLevelDir: string; mainPromptFile: string; skillPromptsDir: string; frontmatterContains: string[]; frontmatterNotContains?: string[] }> = {
108108
copilot: {
109109
topLevelDir: '.github/agents',
110110
mainPromptFile: '.github/agents/CALM.agent.md',
111111
skillPromptsDir: '.github/agents/calm-prompts',
112+
frontmatterContains: ['description:', 'tools:'],
113+
frontmatterNotContains: ['model:'],
112114
},
113115
kiro: {
114116
topLevelDir: '.kiro',
115117
mainPromptFile: '.kiro/steering/CALM.chatmode.md',
116118
skillPromptsDir: '.kiro/calm-prompts',
119+
frontmatterContains: ['inclusion: manual'],
117120
},
118121
claude: {
119122
topLevelDir: '.claude/skills/calm',
120123
mainPromptFile: '.claude/skills/calm/SKILL.md',
121124
skillPromptsDir: '.claude/skills/calm/calm-prompts',
125+
frontmatterContains: ['name: calm', 'description:', 'user-invocable: true'],
122126
},
123127
};
124128

@@ -134,6 +138,13 @@ describe('CLI Integration Tests', () => {
134138
expect(mainPromptContent).toContain('FINOS CALM');
135139
expect(mainPromptContent).toContain('Common Architecture Language Model');
136140

141+
// Verify frontmatter content
142+
const frontmatterMatch = mainPromptContent.match(/^---\n([\s\S]*?)\n---/);
143+
expect(frontmatterMatch).not.toBeNull();
144+
const frontmatter = frontmatterMatch![1];
145+
paths.frontmatterContains.forEach((key) => expect(frontmatter).toContain(key));
146+
paths.frontmatterNotContains?.forEach((key) => expect(frontmatter).not.toContain(key));
147+
137148
// Verify calm-prompts directory exists
138149
const skillPromptsPath = path.join(testDir, paths.skillPromptsDir);
139150
expect(fs.existsSync(skillPromptsPath)).toBe(true);

docs/docs/working-with-calm/calm-ai-tools.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ Usage: calm init-ai [options]
7272
Augment a git repository with AI assistance for CALM
7373

7474
Options:
75-
-p, --provider <provider> AI provider to initialize (choices: "copilot", "kiro")
75+
-p, --provider <provider> AI provider to initialize (choices: "copilot", "kiro", "claude")
7676
-d, --directory <path> Target directory (defaults to current directory) (default: ".")
7777
-v, --verbose Enable verbose logging. (default: false)
7878
-h, --help display help for command

0 commit comments

Comments
 (0)