Skip to content

Commit 7b467f3

Browse files
authored
fix(create): remove CLAUDE.md from agent picker (#3055)
[Claude Code supports `AGENTS.md`](https://code.claude.com/docs/en/memory#agents-md), so it no longer needs a separate `CLAUDE.md` option. The shared prompt for `vp create` and `vp migrate` now lists Claude Code under `AGENTS.md` and removes the `CLAUDE.md` option. The agent picker in `vp create` now shows: ```text › Which coding agent instruction files should Vite+ create? › ◼ AGENTS.md (Claude Code, Codex, Amp, OpenCode, and similar agents) ◻ GEMINI.md ◻ .github/copilot-instructions.md ◻ .cursor/rules/viteplus.mdc ◻ .aiassistant/rules/viteplus.md ↑/↓ navigate · Space select · Enter confirm ``` Explicit `--agent claude` arguments and updates to existing `CLAUDE.md` files still work.
1 parent 48cc5e1 commit 7b467f3

2 files changed

Lines changed: 12 additions & 8 deletions

File tree

‎packages/cli/src/utils/__tests__/agent.spec.ts‎

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -344,14 +344,14 @@ describe('selectAgentTargets', () => {
344344

345345
describe('selectAgentTargetPaths', () => {
346346
it('prompts with file-based targets and agent hints', async () => {
347-
const multiselectSpy = vi.spyOn(prompts, 'multiselect').mockResolvedValue(['agents', 'claude']);
347+
const multiselectSpy = vi.spyOn(prompts, 'multiselect').mockResolvedValue(['agents', 'gemini']);
348348

349349
await expect(
350350
selectAgentTargetPaths({
351351
interactive: true,
352352
onCancel: vi.fn(),
353353
}),
354-
).resolves.toEqual(['AGENTS.md', 'CLAUDE.md']);
354+
).resolves.toEqual(['AGENTS.md', 'GEMINI.md']);
355355

356356
expect(multiselectSpy).toHaveBeenCalledWith(
357357
expect.objectContaining({
@@ -363,16 +363,19 @@ describe('selectAgentTargetPaths', () => {
363363
expect.objectContaining({
364364
label: 'AGENTS.md',
365365
value: 'agents',
366-
hint: expect.stringContaining('Codex'),
366+
hint: expect.stringContaining('Claude Code, Codex'),
367367
}),
368368
expect.objectContaining({
369-
label: 'CLAUDE.md',
370-
value: 'claude',
371-
hint: 'Claude Code',
369+
label: 'GEMINI.md',
370+
value: 'gemini',
371+
hint: 'Gemini CLI',
372372
}),
373373
]),
374374
}),
375375
);
376+
expect(multiselectSpy.mock.calls[0][0].options).not.toEqual(
377+
expect.arrayContaining([expect.objectContaining({ value: 'claude' })]),
378+
);
376379
});
377380
});
378381

‎packages/cli/src/utils/agent.ts‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export const AGENTS = [
1616
id: 'agents',
1717
label: 'AGENTS.md',
1818
targetPath: 'AGENTS.md',
19-
hint: 'Codex, Amp, OpenCode, and similar agents',
19+
hint: 'Claude Code, Codex, Amp, OpenCode, and similar agents',
2020
aliases: [
2121
'agents.md',
2222
'chatgpt',
@@ -132,7 +132,8 @@ export async function selectAgentTargets({
132132
if (interactive && !agent) {
133133
const selectedAgentIds = await prompts.multiselect({
134134
message: 'Which coding agent instruction files should Vite+ create?',
135-
options: AGENTS.map((option) => ({
135+
// Keep CLAUDE.md available for explicit --agent values and existing projects.
136+
options: AGENTS.filter((option) => option.id !== 'claude').map((option) => ({
136137
label: option.label,
137138
value: option.id,
138139
hint: option.hint,

0 commit comments

Comments
 (0)