This skill should be used when architecting, reviewing, or optimizing Flutter HMI applications for resource-constrained embedded devices. It covers finite state machine (FSM) design with deterministic state naming and resource allocation, design patterns (Command, Observer, Object Pool), MQTT integration with exponential backoff and offline queuing, memory management via DisposableManager, long-running task orchestration, performance benchmarking (60 FPS / <100ms), structured logging, and anti-pattern prevention for production-ready embedded HMI.
| File | Purpose | Load When |
|---|---|---|
references/fsm-patterns.md | FSM state naming, resource allocation, transition patterns | Designing or reviewing state machines |
references/mqtt-diagnostics-guide.md | MQTT connection management, message queuing, logging, performance benchmarks | Implementing MQTT or diagnostics |
templates/architecture-validation-report.md | Architecture validation checklist and quality report template | Validating or auditing an HMI architecture |
1. Gather hardware specs → CPU/RAM constraints, communication requirements
2. Load fsm-patterns.md → design state machine with naming convention
3. Load mqtt-diagnostics-guide.md → implement MQTT + logging strategy
4. Apply design patterns → Command / Observer / Object Pool
5. Verify memory management → DisposableManager for all resources
6. Load architecture-validation-report.md → run quality checklist
7. Deliver: architecture doc + code templates + benchmark thresholds
State naming: {Domain}_{Scope}_{Action}_{Status} — e.g., AUTH_LOGIN_VALIDATING
Resource priority order: critical → high → normal → low (allocate); reverse (release)
MQTT reconnection: base=1s, max=60s, factor=2^attempts, jitter=±25%, max=10 attempts
Performance targets: state transition <10ms, UI interaction <100ms, MQTT handling <50ms, screen navigation <300ms
Anti-patterns: synchronous blocking on main thread, uncleaned timers/streams, hardcoded state names, mixed business/UI logic, unbounded memory allocations