feat: sync official Flutter AI rules profiles#10
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 957bf8b208
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| echo "<!--" | ||
| echo "Synced from official Flutter AI rules." | ||
| echo "Source: ${source_url}" | ||
| echo "Profile: ${profile_name}" | ||
| echo "Do not edit manually; run scripts/sync_official_flutter_ai_rules.sh." | ||
| echo "-->" |
There was a problem hiding this comment.
Emit Cursor rule front matter for synced profile
The sync script writes the generated .mdc files with only an HTML comment header, but unlike the existing rules/*.mdc files it does not add YAML metadata (description / alwaysApply / globs), so the advertised active profile file is not auto-attached to Flutter/Dart files and profile switching has no practical effect in normal coding flows. Please prepend valid rule front matter when writing these files so rules/flutter-official-ai-rules.mdc is actually applied.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Summary
- Updated the sync script to prepend valid Cursor rule front matter (
description,alwaysApply,globs) before the synced Markdown content for every generated profile, so profile switching produces auto-attachable rule files. scripts/sync_official_flutter_ai_rules.shL33-L48 - Added the same front matter to all checked-in synced official profile artifacts (
10k,4k,1k) to keep repository state aligned with script output. rules/official/flutter-ai-rules-10k.mdcL1-L5 rules/official/flutter-ai-rules-4k.mdcL1-L5 rules/official/flutter-ai-rules-1k.mdcL1-L5 - Added front matter to the active profile file
rules/flutter-official-ai-rules.mdc, so it can be auto-applied in normal Dart/Flutter flows. rules/flutter-official-ai-rules.mdcL1-L5 - Committed changes on the current branch (
0dc4df2) and created a follow-up PR via themake_prtool.
Testing
- ✅
bash -n scripts/sync_official_flutter_ai_rules.sh ⚠️ scripts/sync_official_flutter_ai_rules.sh 4k(failed due upstreamraw.githubusercontent.comreturning HTTP 403 in this environment)⚠️ curl -I -s https://docs.cursor.com/context/rules | head(web lookup attempted per instruction; endpoint returned HTTP 403 from this environment)
Summary
sync-official-flutter-ai-rulescommand and dedicated skillscripts/sync_official_flutter_ai_rules.shwith profile selection (10k/4k/1k)docs/flutter-ai-rules-sync.mdrules/official/rules/flutter-official-ai-rules.mdc(currently4k)1.9.0Upstream Sources
Validation
.cursor-plugin/plugin.json