Context. Recon (#543 §8) found there is no ArchUnit / Konsist / dependency-analysis plugin in the repo — nothing fails the build on an architectural-boundary violation. Today the firewall is only emergent (module-graph compile errors + commonMain + PR review). Locked decision #6 ("build FAILS if MuJoCo leaks into ampere-core/Phosphor") therefore isn't literally enforced. This ticket makes it a rule.
Objective. Add a lightweight, blocking boundary guard (prefer Konsist, KMP-friendly; ArchUnit is JVM-only and acceptable if scoped to JVM check tasks) wired into CI.
Rules to assert (fail the build on violation)
- No module except
:sim-mujoco references com.neuronrobotics.mujoco / mujoco-java (especially ampere-core and Phosphor).
ampere-core commonMain imports no platform/UI/framework packages (no Android, no Compose, no Ktor-client engines, etc.).
- AMPERE source never imports Socket UI/domain packages (the dependency-inversion boundary).
- (stretch) every
Event subtype appears in EventRegistry.allEventTypes — turns the manual recon-§8 DoD item into a check.
Validation
A deliberately-planted MuJoCo import in ampere-core (and a planted Socket import) makes ./gradlew check fail; removing them makes it pass. Rule (4), if implemented, fails when a new Event type is omitted from the registry.
Notes
Land before AMPERE 0.8.0 so the published contract ships with the firewall enforced. This is the one place a new build-tooling dependency is justified; keep it to the check classpath. DoD: a concept cell documenting the guard + ktlintFormat.
Scope ~3 pts · Model: Sonnet, medium thinking.
Context. Recon (#543 §8) found there is no ArchUnit / Konsist / dependency-analysis plugin in the repo — nothing fails the build on an architectural-boundary violation. Today the firewall is only emergent (module-graph compile errors + commonMain + PR review). Locked decision #6 ("build FAILS if MuJoCo leaks into
ampere-core/Phosphor") therefore isn't literally enforced. This ticket makes it a rule.Objective. Add a lightweight, blocking boundary guard (prefer Konsist, KMP-friendly; ArchUnit is JVM-only and acceptable if scoped to JVM check tasks) wired into CI.
Rules to assert (fail the build on violation)
:sim-mujocoreferencescom.neuronrobotics.mujoco/mujoco-java(especiallyampere-coreand Phosphor).ampere-corecommonMainimports no platform/UI/framework packages (no Android, no Compose, no Ktor-client engines, etc.).Eventsubtype appears inEventRegistry.allEventTypes— turns the manual recon-§8 DoD item into a check.Validation
A deliberately-planted MuJoCo import in
ampere-core(and a planted Socket import) makes./gradlew checkfail; removing them makes it pass. Rule (4), if implemented, fails when a newEventtype is omitted from the registry.Notes
Land before AMPERE 0.8.0 so the published contract ships with the firewall enforced. This is the one place a new build-tooling dependency is justified; keep it to the check classpath. DoD: a concept cell documenting the guard +
ktlintFormat.Scope ~3 pts · Model: Sonnet, medium thinking.