fix(init): respect --minimal flag for agent rule files#26051
Conversation
WalkthroughThe init command now skips creating agent (cursor) rule files when Changes
Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Disabled knowledge base sources:
📥 CommitsReviewing files that changed from the base of the PR and between 390237adff273aaced225073106dfe9a08f980d6 and 85f4fd6. 📒 Files selected for processing (2)
🧰 Additional context used📓 Path-based instructions (5)**/*.zig📄 CodeRabbit inference engine (CLAUDE.md)
Files:
src/**/*.zig📄 CodeRabbit inference engine (src/CLAUDE.md)
Files:
**/*.test.ts?(x)📄 CodeRabbit inference engine (CLAUDE.md)
Files:
test/**/*.test.ts?(x)📄 CodeRabbit inference engine (CLAUDE.md)
Files:
test/**/*.test.{ts,js,jsx,tsx,mjs,cjs}📄 CodeRabbit inference engine (test/CLAUDE.md)
Files:
🧠 Learnings (14)📚 Learning: 2026-01-05T16:32:07.551ZApplied to files:
📚 Learning: 2025-11-24T18:36:59.706ZApplied to files:
📚 Learning: 2026-01-05T23:04:01.518ZApplied to files:
📚 Learning: 2026-01-05T23:04:01.518ZApplied to files:
📚 Learning: 2025-10-19T02:44:46.354ZApplied to files:
📚 Learning: 2025-12-16T00:21:32.179ZApplied to files:
📚 Learning: 2025-12-16T00:21:32.179ZApplied to files:
📚 Learning: 2025-11-14T16:07:01.064ZApplied to files:
📚 Learning: 2025-10-26T01:32:04.844ZApplied to files:
📚 Learning: 2025-12-16T00:21:32.179ZApplied to files:
📚 Learning: 2025-12-16T00:21:32.179ZApplied to files:
📚 Learning: 2026-01-05T23:04:01.518ZApplied to files:
📚 Learning: 2025-11-06T00:58:23.965ZApplied to files:
📚 Learning: 2026-01-05T23:04:01.518ZApplied to files:
🧬 Code graph analysis (1)test/cli/init/init.test.ts (1)
🔇 Additional comments (2)
Comment |
`bun init --minimal` was incorrectly creating Cursor rules files (.cursor/rules/) and CLAUDE.md even though the --minimal flag should only create package.json and tsconfig.json. The issue was that `Template.createAgentRule()` was called unconditionally for blank and typescript_library templates, without checking the `minimal` flag. Other file creations (like .gitignore and README.md) correctly respected the minimal flag via the `steps` struct. Fixes #26050 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
390237a to
85f4fd6
Compare
|
Updated 4:32 PM PT - Jan 13th, 2026
❌ Your commit
🧪 To try this PR locally: bunx bun-pr 26051That installs a local version of the PR into your bun-26051 --bun |
Summary
bun init --minimalcreating Cursor rules files and CLAUDE.md when it shouldn't--minimalonly creates package.json and tsconfig.jsonTest plan
USE_SYSTEM_BUN=1 bun test test/cli/init/init.test.ts -t "bun init --minimal"bun bd test test/cli/init/init.test.ts -t "bun init --minimal"bun bd test test/cli/init/init.test.tsFixes #26050
🤖 Generated with Claude Code