App development
All Flutter commands run from theapp/ directory.
Testing tiers
Canthus uses layered tests so mana math, persistence, and UI flows stay aligned with docs without running everything on a device.| Tier | Location | Runner | What it validates |
|---|---|---|---|
| Engine | app/test/domain/mana/ | flutter test test/domain/mana/ | Mana formulas and surfacing rules vs docs via ManaFixtureBuilder |
| Pipeline flows | app/test/flows/pipeline/ | flutter test test/flows/pipeline/ | Real in-memory Drift + live mana pipeline; doc-oracle scenarios (check-in inflation, completion, severe surfacing, watch stability) |
| UI flows | app/test/ui/flows/ | flutter test test/ui/flows/ | Full AppShell with real DB and mana pipeline; daily-loop UX (surfacing, check-in, completion, FAB, orchard, temporal copy) |
| Widget (mocked) | app/test/ui/ | flutter test test/ui/ | Screen/widget behavior with overridden providers |
| Integration smoke | app/integration_test/ | flutter test integration_test/ -d <device> | Thin device/emulator smoke on real bindings; 1–2 mana assertions on check-in and completion |
app/test/support/ (DriftScenarioSeeder, SyntheticAppHarness, ScenarioCatalog, mana_flow_assertions.dart). Integration tests import the same seeder via integration_test/support/fixtures.dart.
Fast CI subset
CI runs analyze, architecture checks, and both flow tiers:Integration tests locally
Requires a booted simulator or device:pumpAndSettle() in flow tests that mount the live mana stream provider.
Docs site preview
Documentation lives indocs/ and uses Mintlify.
Evidence registry
User-facing claims must cite code and docs inevidence/registry/. Flow tests that lock behavior to docs can be cited as additional code refs (see evidence/registry/mana.yaml).
Validate before opening a PR:
Related docs
- Execution flows — live mana recompute and persistence paths
- Example scenarios — doc personas used by
ScenarioCatalog - Evidence registry — claim citation workflow