Skip to content

Commit c5f4f8e

Browse files
author
Marvin Zhang
committed
refactor(init): streamline AI tool selection and update user prompts in AGENTS.md and README.md
1 parent 24d397b commit c5f4f8e

File tree

5 files changed

+33
-56
lines changed

5 files changed

+33
-56
lines changed

packages/cli/src/commands/init.ts

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -308,16 +308,31 @@ export async function initProject(skipPrompts = false, templateOption?: string,
308308
console.log('');
309309
}
310310

311-
const toolChoices = Object.entries(AI_TOOL_CONFIGS).map(([key, config]) => ({
312-
name: config.description,
313-
value: key as AIToolKey,
314-
checked: detectedDefaults.includes(key as AIToolKey),
315-
}));
316-
317-
selectedAgentTools = await checkbox({
318-
message: 'Which AI tools do you use? (creates symlinks for tool-specific instruction files)',
319-
choices: toolChoices,
320-
});
311+
// Only show tools that require symlinks (Claude, Gemini)
312+
// Filter to only show tools that require symlinks
313+
const symlinkTools = Object.entries(AI_TOOL_CONFIGS)
314+
.filter(([, config]) => config.usesSymlink)
315+
.map(([key, config]) => ({
316+
name: config.description,
317+
value: key as AIToolKey,
318+
checked: detectedDefaults.includes(key as AIToolKey),
319+
}));
320+
321+
// Ask about symlinks only if there are tools that need them
322+
if (symlinkTools.length > 0) {
323+
console.log('');
324+
console.log(chalk.gray('AGENTS.md will be created as the primary instruction file.'));
325+
console.log(chalk.gray('Some AI tools (Claude Code, Gemini CLI) use their own filenames.'));
326+
console.log('');
327+
328+
const symlinkSelection = await checkbox({
329+
message: 'Create symlinks for additional AI tools?',
330+
choices: symlinkTools,
331+
});
332+
selectedAgentTools = symlinkSelection;
333+
} else {
334+
selectedAgentTools = [];
335+
}
321336
}
322337

323338
// Create .lean-spec/templates/ directory
@@ -497,9 +512,10 @@ export async function initProject(skipPrompts = false, templateOption?: string,
497512
console.log('');
498513
console.log(chalk.green('✓ LeanSpec initialized!'));
499514
console.log('');
500-
console.log('Next steps:');
501-
console.log(chalk.cyan(' 1. Edit AGENTS.md') + chalk.gray(' → Fill in the "📋 Project Context" section'));
502-
console.log(chalk.cyan(' 2. Create your first spec:') + chalk.gray(' lean-spec create my-feature'));
515+
console.log(chalk.cyan('You\'re ready to go!') + chalk.gray(' Ask your AI to create a spec for your next feature.'));
516+
console.log('');
517+
console.log(chalk.gray('Example: "Create a spec for user authentication"'));
518+
console.log(chalk.gray('Learn more: https://lean-spec.dev/docs/guide/getting-started'));
503519
console.log('');
504520
}
505521

packages/cli/templates/detailed/AGENTS.md

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,6 @@
22

33
## Project: {project_name}
44

5-
<!-- ═══════════════════════════════════════════════════════════════════════════
6-
👇 TODO: Fill in your project context below (then delete these comments)
7-
═══════════════════════════════════════════════════════════════════════════ -->
8-
9-
### 📋 Project Context
10-
11-
**What this project does:**
12-
_TODO: Describe your project in 1-2 sentences_
13-
14-
**Tech stack:**
15-
_TODO: List main technologies (e.g., Node.js, React, PostgreSQL)_
16-
17-
**Key objectives:**
18-
_TODO: What are you building toward? (e.g., Launch MVP by Q1)_
19-
20-
<!-- ═══════════════════════════════════════════════════════════════════════════
21-
👆 End of TODO section - Delete these comment markers when done
22-
═══════════════════════════════════════════════════════════════════════════ -->
23-
245
## 🚨 CRITICAL: Before ANY Task
256

267
**STOP and check these first:**

packages/cli/templates/detailed/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Keep it lean, but organized. Use sub-specs to manage complexity without overwhel
2222

2323
## Next Steps
2424

25-
1. Customize AGENTS.md for your project
26-
2. Create your first spec: `lean-spec create my-feature`
27-
3. When a spec grows large, split sections into sub-spec files
25+
You're ready to go! Ask your AI to create a spec for your next feature.
26+
27+
When a spec grows large, consider splitting sections into sub-spec files.
2828

packages/cli/templates/standard/AGENTS.md

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,6 @@
22

33
## Project: {project_name}
44

5-
<!-- ═══════════════════════════════════════════════════════════════════════════
6-
👇 TODO: Fill in your project context below (then delete these comments)
7-
═══════════════════════════════════════════════════════════════════════════ -->
8-
9-
### 📋 Project Context
10-
11-
**What this project does:**
12-
_TODO: Describe your project in 1-2 sentences_
13-
14-
**Tech stack:**
15-
_TODO: List main technologies (e.g., Node.js, React, PostgreSQL)_
16-
17-
**Key objectives:**
18-
_TODO: What are you building toward? (e.g., Launch MVP by Q1)_
19-
20-
<!-- ═══════════════════════════════════════════════════════════════════════════
21-
👆 End of TODO section - Delete these comment markers when done
22-
═══════════════════════════════════════════════════════════════════════════ -->
23-
245
## 🚨 CRITICAL: Before ANY Task
256

267
**STOP and check these first:**

packages/cli/templates/standard/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,5 @@ Keep it lean. Write specs for features that need clarity. Skip them for obvious
2121

2222
## Next Steps
2323

24-
1. Customize AGENTS.md for your project
25-
2. Create your first spec: `lean-spec create my-feature`
24+
You're ready to go! Ask your AI to create a spec for your next feature.
2625

0 commit comments

Comments
 (0)