dart-mobile-game-studio / rules
Cursor rule1 starsChanged 5 months agoMITView on GitHub
Testing & build rules for Dart/Flutter games — unit-test the pure model with dart test, widget/golden/Patrol tests, honest analyze/build reporting.
Where files are headingNew Cursor rule files have more rules about planning and tracking tasks, and fewer about code style.
Of the Cursor rule files we read, the 1,533 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository21 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/agents/art-director.mdcCursor rule
- .cursor/rules/agents/balance-economist.mdcCursor rule
- .cursor/rules/agents/code-auditor.mdcCursor rule
- .cursor/rules/agents/code-reviewer.mdcCursor rule
- .cursor/rules/agents/engine-architect.mdcCursor rule
- .cursor/rules/agents/game-coordinator.mdcCursor rule
- .cursor/rules/agents/game-designer.mdcCursor rule
- .cursor/rules/agents/gameplay-programmer.mdcCursor rule
- .cursor/rules/agents/legal-compliance.mdcCursor rule
- .cursor/rules/agents/narrative-writer.mdcCursor rule
- .cursor/rules/agents/performance-auditor.mdcCursor rule
- .cursor/rules/agents/qa-tester.mdcCursor rule
- .cursor/rules/agents/release-engineer.mdcCursor rule
- .cursor/rules/agents/security-auditor.mdcCursor rule
- .cursor/rules/dart-flutter-architecture.mdcCursor rule
- .cursor/rules/dart-mobile-game-studio.mdcCursor rule
- dart-mobile-game-studioSkill
- dart-mobile-game-studioSkill
- dart-mobile-game-studioSkill
The file
We split this dart-flutter-testing.mdc into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 36
Only report analyze/build/tests as passing if you ran them and saw the output.
≈ “Common” is an estimate: at least 1 in 5 of the 3,030 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
--- description: Testing & build rules for Dart/Flutter games — unit-test the pure model with dart test, widget/golden/Patrol tests, honest analyze/build reporting. globs: **/*_test.dart, **/test/**/*.dart, **/integration_test/**/*.dart alwaysApply: false --- # Dart/Flutter game testing & build rules Applies to test files and any build/test work. ## What to test (priority order) 1. **Pure model rules** with `dart test` on the VM (fast, no device): legal/illegal moves, scoring, win/lose, level load + validation, every state transition, deterministic (seeded) shuffles/spawns. 2. **Widgets** with `flutter_test`: `testWidgets`, `WidgetTester`, `pump`/`pumpAndSettle`, `find`/`expect`. **Golden** tests for stable visuals (avoid text in goldens). 3. **Flame** components (when worth it) with `flame_test` (`testWithGame`, `await game.ready()`, `game.update(dt)`). 4. **E2E** with **Patrol** (`leancodepl/patrol`): onboarding, purchase/ads flow, game start, level completion, pause/resume, settings, permissions, native dialogs, app lifecycle. ## Determinism & seams - Inject a seeded `Random` (`assets/seeded_random.dart`) so randomized outcomes are reproducible. - Inject the clock/persistence as seams so tests use fakes; keep the model `package:flutter`-free. ## Commands ```bash dart format --output=none --set-exit-if-changed . dart analyze # or: flutter analyze dart test # pure core (VM) flutter test # widgets + goldens patrol test # E2E (device/emulator) ``` Discover via `scripts/verify-flutter-project.sh`. ## Honesty rule Only report analyze/build/tests as passing if you ran them and saw the output. If there's no toolchain here, say so and provide the exact commands — never assert green. ## Before "done" - New model rule / state transition has a `dart test`; non-trivial widget has a `flutter_test`; critical flow has a Patrol E2E. No debug `print`, placeholder, or TODO in the shipped path. Reference: `references/testing-and-release.md`, `references/quality-policy.md`.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

