Mechanical enforcement

message in flightviolation
TypesConfigRepoServiceRuntimeUIbackward dependencyediterror + remediationAgentStructural linter
  1. Architectural invariant: dependencies only point forward.
  2. An agent edit introduces a backward dependency.
  3. The linter error injects remediation into context.
  4. The agent self-corrects; the invariant holds at any throughput.
Notes & references

Use when

Agent throughput exceeds human review capacity.

Avoid

Prose-only rules, and errors that say what failed but not how to fix it.

# structural test, run as a hook and in CI
for edge in import_graph(domain):
    if layer(edge.dst) < layer(edge.src):
        fail(f"""{edge}: backward dependency.
        Fix: expose it through Providers,
        see ARCHITECTURE.md#layers""")