fix(setup): add alwaysApply frontmatter to Cursor rules template#3193
Open
sjsyrek wants to merge 1 commit intogastownhall:mainfrom
Open
fix(setup): add alwaysApply frontmatter to Cursor rules template#3193sjsyrek wants to merge 1 commit intogastownhall:mainfrom
sjsyrek wants to merge 1 commit intogastownhall:mainfrom
Conversation
…3191) Without YAML frontmatter, Cursor defaults .mdc files to Manual mode, requiring users to @-reference the rule explicitly. Add alwaysApply: true so beads context loads automatically every session, consistent with the Claude and Gemini integrations. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #3191.
bd setup cursorwrites.cursor/rules/beads.mdcwithout YAML frontmatter, which Cursor interprets as Manual mode — rules only load when the user explicitly@beadsin chat. This addsalwaysApply: truefrontmatter so beads context loads automatically every session, consistent with how the Claude and Gemini integrations auto-fire on session start.Changes Made
alwaysApply: truefrontmatter tocursorRulesTemplateincmd/bd/setup/cursor.go— prepends standard YAML frontmatter block before the existing template contentTestCursorRulesTemplate_AlwaysApplyFrontmatterincmd/bd/setup/cursor_test.go— asserts the template starts with the required frontmatterBackward Compatibility
✅ Existing installs: Users who have already run
bd setup cursorcan re-run it to get the updated template (InstallCursor overwrites the file)✅ No behavioral change for other recipes: Only the Cursor template is modified; windsurf/cody/kilocode recipes are unaffected
✅ User-added frontmatter preserved on remove:
bd setup cursor --removedeletes the entire file, which is the existing behaviorTechnical Details
Per Cursor's rules documentation,
.mdcfiles are categorized by frontmatter:alwaysApply: trueglobs: "..."description: "..."@beadsSize: Small ✓
Two-file change: 4-line template addition + 9-line test.
🤖 Generated with Claude Code