architecture-boundaries-lens

Structural lens that verifies dependencies point inward, Domain and Application layers contain no mocks, and the Domain layer respects Object Calisthenics.

Role in the adversarial panel

This lens belongs to software-engineer-reviewer. It is activated on every DELIVER cycle — it is one of the 4 CORE lenses. It receives production code only; it does not see tests, the engineer’s journal, or the checklist.

graph LR
  SER[software-engineer-reviewer] -->|dispatches| ABL[architecture-boundaries-lens]
  ABL -->|JSON verdict| SER

What the lens checks

Verdict and thresholds

Condition Verdict Severity
A.Fake<IDomainType>() or Mock<IDomainType>() in a unit test fail blocker
Domain using → Application, Infrastructure, or API fail blocker
Application using → Infrastructure or API fail blocker
Object Calisthenics violation in Domain fail medium
No violation detected pass

A single blocker defect is sufficient to reject the cycle.

Invariants

« A good architecture allows the system to be easily understood. » — Martin, R. C., Clean Architecture, 2017.

Sources

See also