Skip to content

Rules

A finding fails cargo build, as the app’s build script runs sofie check.

  • A module uses another module only through its contract crate; tiers depend downward (Experience, Core, Platform) and nothing depends on the app.
  • A Platform module never listens to events of modules above it; events are declared in contracts.
  • Only queries are routed under get; SQL is written only in queries; no two endpoints share a path in an area.
  • Code asks for Clock instead of reading the system time, and reads the environment only through its module’s config.
  • Requests leave the app only through gateways and contracts.
  • Every field constraint and enum of an aggregate has a CHECK or unique index in a migration.
  • Screens bind only what their loader provides; flags are named <module>.<flag> and declared by their module with the day they were added.
  • No dead code or unused dependency (unless dead-code-allow.toml gives a reason); an app setting structure-ceilings = true also keeps comments within 2.86% of code lines and no type a god type.
  • Generated files are current: run sofie gen.

Generated from sofie at 4aa7c05.