Cadence

A stack-agnostic, self-improving AI development framework as a Claude Code plugin.

View the Project on GitHub nik190799/cadence

Recipe — Dart / Flutter

A starter cadence.yaml for a Flutter app (also works for pure Dart).

commands:
  format: ["dart format --set-exit-if-changed --output none lib/ test/"]
  lint:   ["flutter analyze --no-fatal-infos"]
  test:   ["flutter test"]

boundaries:
  - where: "lib/features/**"
    forbidden:
      - "lib/data/sources/**"
      - "lib/data/repositories/**"
    reason: "Features must read via narrow providers in lib/app/providers.dart"

  - where: "lib/data/sources/**"
    forbidden:
      - "lib/features/**"
      - "lib/app/**"
    reason: "Data sources are leaf-level"

  - where: "lib/app/**"
    forbidden:
      - "lib/features/**"
    reason: "app/ may not import features/ (cycle avoidance per ADR-0007)"

  - where: "**/*"
    forbidden:
      - "lib/data/models/**"
    reason: "Models live in lib/domain/models/ per ADR-0002"

Notes

Suggested first ADRs

These were the actual ADRs that emerged from the Flutter sandbox:

  1. Mutation pattern — optimistic-then-write vs write-then-reread
  2. Model locationlib/domain/models/ is canonical
  3. Error surfaceAsyncError for whole-screen, state-field for per-action, map for per-row
  4. Narrow function-typed providers — testability pattern
  5. UI async invocation — wrap fire-and-forget in unawaited()
  6. Test coverage requirements — happy + edge + sequence + error + write log
  7. Cross-feature shared state — lives in lib/app/state/, not in feature folders