Skip to content

Commit 83dc264

Browse files
authored
feat: rules routing over official sync + flutter env setup skill (#21)
* feat: route official flutter rules via priority policy and add env setup skill * chore: simplify command prompts by removing repeated guardrails * chore: bump plugin version to 1.10.5 for api surface changes
1 parent da9097e commit 83dc264

29 files changed

Lines changed: 131 additions & 66 deletions

.cursor-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "flutter-cursor-plugin",
33
"displayName": "Flutter Cursor Plugin",
4-
"version": "1.10.4",
4+
"version": "1.10.5",
55
"description": "Open-source Cursor plugin for end-to-end Flutter development and testing with Dart MCP, Figma MCP, practical architecture patterns, and reliable test workflows.",
66
"author": {
77
"name": "Aleksandr Lozhkovoi",

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@
2222
- `.github/workflows/semantic-quality.yml`
2323
- `docs/semantic-quality-gates.md`
2424
- Updated scaffold architecture guidance to prefer existing project state-management convention before selecting a pattern.
25+
- Reworked official Flutter AI rules integration to use policy routing instead of post-sync text patching:
26+
- added high-priority policy layer `rules/flutter-plugin-policy-priority.mdc`
27+
- kept synced upstream profiles as base source of truth
28+
- Added deterministic environment setup workflow:
29+
- command: `commands/setup-flutter-environment.md`
30+
- skill: `skills/setup-flutter-environment/SKILL.md`
31+
- Simplified command prompts by removing repeated guardrails boilerplate from canonical command files.
2532

2633
## 1.10.0
2734

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ Reference project layout:
9797
- `update-flutter-dependencies`
9898
- `prepare-mobile-release`
9999
- `setup-mobile-github-pipeline`
100+
- `setup-flutter-environment`
100101
- `integrate-firebase`
101102
- `security-review`
102103
- `sync-official-flutter-ai-rules`
@@ -107,6 +108,7 @@ Reference project layout:
107108
- `rules/flutter-development-best-practices.mdc`
108109
- `rules/dart-effective-dart.mdc`
109110
- `rules/flutter-test-best-practices.mdc`
111+
- `rules/flutter-plugin-policy-priority.mdc`
110112
- **Skills**
111113
- `skills/build-flutter-features/`
112114
- `skills/scaffold-flutter-architecture/`
@@ -119,6 +121,7 @@ Reference project layout:
119121
- `skills/update-flutter-dependencies/`
120122
- `skills/security-audit/`
121123
- `skills/sync-official-flutter-ai-rules/`
124+
- `skills/setup-flutter-environment/`
122125

123126
## MCP integrations
124127

@@ -127,6 +130,7 @@ Reference project layout:
127130
- **Effective Dart**: align implementation with the official guidance at https://dart.dev/effective-dart.
128131
- **Claude `/security-review` parity**: security workflow mirrors `anthropics/claude-code-security-review` patterns (diff-aware + false-positive filtering).
129132
- **Official Flutter AI rules sync**: use `sync-official-flutter-ai-rules` to refresh upstream Flutter rules profiles.
133+
- **Rule priority routing**: `rules/flutter-plugin-policy-priority.mdc` is the high-priority policy layer over synced official rules.
130134

131135
## Official documentation
132136

@@ -185,6 +189,8 @@ Reference project layout:
185189
- `docs/release-automation.md`
186190
14. For command namespacing/aliases (`flutter:*`), see:
187191
- `docs/command-namespacing.md`
192+
15. For deterministic local setup and SDK/MCP readiness, use:
193+
- `setup-flutter-environment`
188194

189195
Note: every code review flow includes mandatory security checks (OWASP MASVS-oriented).
190196

@@ -200,3 +206,4 @@ Note: every code review flow includes mandatory security checks (OWASP MASVS-ori
200206
8. GitHub Actions mobile CI pipeline setup for APK/AAB build automation.
201207
9. Security audit and secrets scanner workflow via `/security-review`.
202208
10. Safe Flutter/Dart dependency upgrades with deterministic validation and rollback.
209+
11. Deterministic environment bootstrapping for Flutter SDK, MCP, and baseline checks.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
name: flutter:setup-flutter-environment
3+
description: Alias for `setup-flutter-environment`. Prepare and verify Flutter development environment (SDK, doctor, MCP, and baseline repo checks).
4+
---
5+
6+
Namespaced alias for `setup-flutter-environment`.
7+
8+
1. Run the canonical command with the same intent.
9+
2. Follow `./setup-flutter-environment.md`.
10+
3. Keep output and checks identical to the canonical command.

commands/generate-flutter-tests.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,3 @@ Generate tests for the target feature or class.
1010
3. Keep tests behavior-driven and deterministic.
1111
4. Prefer focused tests for changed code paths.
1212

13-
Preconditions and guardrails:
14-
- Enforce `../docs/prompt-execution-guardrails.md` before execution.
15-
- Validate outcomes using `../docs/validation-matrix.md`.

commands/implement-figma-screen.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,3 @@ Implement a Flutter UI from Figma source.
1313
6. Add widget tests for critical interactions and visible states.
1414
7. If no Figma URL/node is provided, stop and request it before implementation.
1515

16-
Preconditions and guardrails:
17-
- Enforce `../docs/prompt-execution-guardrails.md` before execution.
18-
- Validate outcomes using `../docs/validation-matrix.md`.

commands/implement-flutter-feature.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,3 @@ Implement or refactor a Flutter feature.
1212
5. Keep dependencies injected and testable.
1313
6. Add/update tests for modified behavior.
1414

15-
Preconditions and guardrails:
16-
- Enforce `../docs/prompt-execution-guardrails.md` before execution.
17-
- Validate outcomes using `../docs/validation-matrix.md`.

commands/integrate-firebase.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,3 @@ Integrate Firebase into the target Flutter app.
1111
4. Complete `../docs/firebase-integration-checklist.md`.
1212
5. Verify Android and iOS initialization in release-capable configuration.
1313

14-
Preconditions and guardrails:
15-
- Enforce `../docs/prompt-execution-guardrails.md` before execution.
16-
- Validate outcomes using `../docs/validation-matrix.md`.

commands/migrate-flutter-code.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,3 @@ Run a migration/refactor task.
1111
4. Use Dart MCP diagnostics to validate each step.
1212
5. Add or update tests for behavioral changes.
1313

14-
Preconditions and guardrails:
15-
- Enforce `../docs/prompt-execution-guardrails.md` before execution.
16-
- Validate outcomes using `../docs/validation-matrix.md`.

commands/prepare-mobile-release.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,3 @@ Prepare app for store publication.
1111
4. Produce iOS release artifact (`.ipa`/archive) and validate signing/versioning.
1212
5. Confirm store metadata/compliance inputs are complete before submission.
1313

14-
Preconditions and guardrails:
15-
- Enforce `../docs/prompt-execution-guardrails.md` before execution.
16-
- Validate outcomes using `../docs/validation-matrix.md`.

0 commit comments

Comments
 (0)