Skip to content

fix: restrict Cursor globs to active Flutter AI rules profile#12

Merged
Wreos merged 2 commits intomainfrom
codex/github-mention-fix-emit-cursor-front-matter-for-synced-flu
Feb 21, 2026
Merged

fix: restrict Cursor globs to active Flutter AI rules profile#12
Wreos merged 2 commits intomainfrom
codex/github-mention-fix-emit-cursor-front-matter-for-synced-flu

Conversation

@Wreos
Copy link
Owner

@Wreos Wreos commented Feb 21, 2026

Motivation

  • The previous change added globs front matter to every synced profile, which caused all generated rules/official/*.mdc files to auto-attach to Dart files and could lead to multiple profiles applying simultaneously instead of honoring the single active profile contract.
  • The repository’s documented contract requires only rules/flutter-official-ai-rules.mdc to be the auto-attached active profile, so globs must be restricted to that file.

Description

  • Removed emission of the globs YAML line from download_rule() in scripts/sync_official_flutter_ai_rules.sh so files written to rules/official/ only contain neutral metadata (description, alwaysApply).
  • Replaced the direct cp used to populate the active profile with an awk transform that inserts the globs front matter only into rules/flutter-official-ai-rules.mdc when selecting the active profile.
  • Updated checked-in synced artifacts under rules/official/ (flutter-ai-rules-10k.mdc, flutter-ai-rules-4k.mdc, flutter-ai-rules-1k.mdc) to remove the globs front matter so only the active profile auto-attaches.

Testing

  • Ran bash -n scripts/sync_official_flutter_ai_rules.sh for a syntax check, which succeeded.
  • Verified front matter via automated inspection commands (sed/awk/for f ... sed -n) and confirmed rules/official/*.mdc no longer include globs while rules/flutter-official-ai-rules.mdc contains the expected globs entry.
  • Ran an awk cleanup to remove any pre-existing globs lines from rules/official/* which executed successfully in this environment.
  • Attempting to exercise live upstream fetches failed in this environment due to remote HTTP 403 responses, so end-to-end network download could not be validated here.

Codex Task

@Wreos Wreos merged commit 193ff3a into main Feb 21, 2026
3 checks passed
@Wreos Wreos deleted the codex/github-mention-fix-emit-cursor-front-matter-for-synced-flu branch February 21, 2026 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant