flutter-architecture-decisions
Skill30 starsChanged 4 days agoApache-2.0View on GitHub
Use when choosing state management for a Flutter app (Riverpod vs Bloc vs signals vs setState), drawing package/module boundaries, deciding what belongs in the UI/logic/data layers, or recording a concise MADR Flutter ADR (<= 55 lines). Complements the official flutter-apply-architecture-best-practices skill.
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are 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.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 18
Routine feature or single-widget work: When changes fit established repository architecture, skip creating redundant ADRs or …
- Very specific: line 19
Backend / non-Dart services: Use senior-architect-engineering or design-spec-expert.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill 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
Flutter Architecture Decisions
Overview
Flutter Architecture Decisions provides a pragmatic framework for selecting one primary state management solution (Riverpod, Bloc/Cubit, Signals, or setState), drawing high-bar package boundaries, and recording concise MADR records (docs/<feature-name>/adr-NNN-*.md <= 55 lines) and conditional blueprints (docs/<feature-name>/architecture.md <= 70 lines) across Claude Code and Google Antigravity.
When to Use
Trigger Scenarios
- Scaffolding a Flutter app, choosing/migrating state management, or introducing
GoRouter/FFI/platform-channel topology shifts. - Evaluating whether a domain boundary warrants a standalone Dart package vs. folder namespace.
- Resolving PR disputes on dependency direction across UI, Domain, and Data layers.
When NOT to Use
- Routine feature or single-widget work: When changes fit established repository architecture, skip creating redundant ADRs or
architecture.md. - Backend / non-Dart services: Use
senior-architect-engineeringordesign-spec-expert.
Process
flowchart LR
A["Inspect AGENTS.md & DESIGN.md"] --> B["State Matrix & Package Gate"]
B --> C["Draft Concise MADR (<=55 lines)"]
C --> D{"Multi-Layer / Package?"}
D -->|"Yes"| E["Author architecture.md (<=70 lines)"]
D -->|"No"| F["Skip Redundant Blueprint"]1. Align Layered Split & Root Contracts
Inspect root AGENTS.md (<= 90 lines wired to context/memory/MEMORY.md) and official Google root DESIGN.md (<= 110 lines 2-layer YAML + 8 sections) + optional docs/<feature-name>/design.md (<= 35 lines screen delta). Enforce clean UI (widgets/themes) -> Domain (use cases/entities) -> Data (repositories/DTOs/clients) separation.
2. State Management & High-Bar Package Gate
Evaluate state complexity via references/state-management-decision-matrix.md: pick one primary solution per app (setState for local ephemeral state). Extract a separate package only if >= 2 hold: reused across apps, decoupled release cadence, 1-sentence public API, and standalone test suite.
3. Author Concise MADR & Conditional Blueprint
- Concise MADR (
docs/<feature-name>/adr-NNN-*.md <= 55 lines): Follow references/adr-template.md—Status & Date,## 1. Context(<= 5 lines),## 2. Options Considered(2–3 concrete options),## 3. Decision & Justification, and## 4. Trade-offs & Reviewer Compliance(+Pros /-Cons + 1-line lint/PR rule forflutter-reviewer). Syncdoc/adr/if used by the repo. - Blueprint (
docs/<feature-name>/architecture.md <= 70 lines): Author ONLY when multiple layers or packages interact; skip when a single ADR suffices.
Usage
Example Prompts & Host Execution
"Compare Riverpod vs Bloc for our offline-first cart flow and write a <=55-line MADR ADR."- Claude Code / Google Antigravity: Invoke
flutter-architecture-decisionsor rundart analyze lib/to inspect boundary imports before drafting.
Red Flags
- Mixing 3+ state libraries or picking heavy enterprise Bloc for simple leaf screens.
- Creating
shared/corepackages without a 1-sentence API or standalone tests. - Writing verbose ADRs (
> 55 lines), bloatedarchitecture.md(> 70 lines), or redundant docs when changes already follow established architecture. - Allowing UI widgets to import
dio, SQLite, or platform channels directly.
Verification
- One primary state solution selected against references/state-management-decision-matrix.md and package gate checked.
docs/<feature-name>/adr-NNN-*.md(<= 55 lines) matches references/adr-template.md including the 1-lineflutter-reviewerrule.docs/<feature-name>/architecture.md(<= 70 lines) created only for multi-layer/package interactions; zero cyclic dependencies.
References
- State Management Decision Matrix
- Concise MADR Template (Flutter)
In this repository40 other files it gives its agents.
- AGENTS.mdAGENTS.md
- adversarial-challengerSkill
- agent-metricsSkill
- bigquery-query-optimizationSkill
- blackbox-testerSkill
- build-and-ci-gatesSkill
- cdc-scd-patternsSkill
- code-criticSkill
- code-implementerSkill
- code-smells-expertSkill
- commit-expertSkill
- compliance-verifierSkill
- context-captureSkill
- context-restoreSkill
- database-migration-expertSkill
- design-spec-expertSkill
- documentation-expertSkill
- flutter-performance-profilingSkill
- flutter-release-engineeringSkill
- flutter-review-checklistSkill
- flutter-senior-orchestrationSkill
- flutter-test-strategySkill
- flutter-upgrade-migrationSkill
- gcp-data-engineeringSkill
- guidelines-karpathySkill
- loop-engineeringSkill
- performance-scalabilitySkill
- product-analystSkill
- pull-request-expertSkill
- python-expertSkill
- qa-testerSkill
- refactoring-code-expertSkill
- repo-researchSkill
- security-auditSkill
- senior-architect-engineeringSkill
- senior-dev-orchestratorSkill
- sql-query-optimizationSkill
- test-driven-developmentSkill
- testing-expertSkill
- ui-ux-designerSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
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.

