| name | sync-official-flutter-ai-rules |
| description | Synchronize official Flutter AI rules profiles and set the active profile used by this pack. |
Sync Official Flutter AI Rules
Use this workflow to keep repository guidance aligned with upstream Flutter AI rules.
Workflow
- Choose target profile:
10k: full guidance, best for larger context windows.
4k: balanced default profile.
1k: minimal profile for constrained contexts.
- Run:
../../scripts/sync_official_flutter_ai_rules.sh <10k|4k|1k>
- Verify synced outputs:
../../rules/official/flutter-ai-rules-10k.mdc
../../rules/official/flutter-ai-rules-4k.mdc
../../rules/official/flutter-ai-rules-1k.mdc
../../rules/flutter-official-ai-rules.mdc (active profile copy)
- Keep repository-specific policy in
../../rules/flutter-policy-priority.mdc.
- Review diffs and ensure no local manual edits were mixed into official synced files.
- Update changelog if behavior/guidance changed materially.
Guardrails
- Do not hand-edit generated files under
rules/official/.
- Keep active file
../../rules/flutter-official-ai-rules.mdc aligned with chosen profile.
- Do not enforce policy overlay by patching official content after sync.
- Use
../../rules/flutter-policy-priority.mdc for higher-priority policy and conflict resolution.
- Prefer
4k unless there is a clear reason to switch to 10k or 1k.
- Do not claim sync completed unless command output is available.
- In simulation/planning mode, status must be
PENDING and include not executed note.
Required output
- Selected profile and rationale.
- Files synced/updated.
- Diff summary for active rule + policy routing layer.
- Follow-up actions (if manual review is needed).
Official upstream sources
https://raw.githubusercontent.com/flutter/flutter/main/docs/rules/rules_10k.md
https://raw.githubusercontent.com/flutter/flutter/main/docs/rules/rules_4k.md
https://raw.githubusercontent.com/flutter/flutter/main/docs/rules/rules_1k.md