Part of #74. Stack: 1. probe app → 2. hapi serve → 3. module boundaries → 4. pre-commit. Based on the 2/4 branch.
Summary
hapi.app : hapi.cli composition root
finance : fitness : maintenance : smart_home domains; each one's service.py is its only public module
platform shared, imports no domain
bots/ forbidden from importing hapi.* (ADR-0011)
There are six contracts: one layers, four protected (one per domain), and one forbidden. The domain packages are empty stubs, there only so the contracts have something to check. just lint now runs lint-imports.
Evidence
Before: nothing enforced module boundaries. After: each contract broken on purpose, then reverted:
Part of #74. Stack: 1. probe app → 2. `hapi serve` → **3. module boundaries** → 4. pre-commit. Based on the 2/4 branch.
## Summary
```text
hapi.app : hapi.cli composition root
finance : fitness : maintenance : smart_home domains; each one's service.py is its only public module
platform shared, imports no domain
bots/ forbidden from importing hapi.* (ADR-0011)
```
There are six contracts: one `layers`, four `protected` (one per domain), and one `forbidden`. The domain packages are empty stubs, there only so the contracts have something to check. `just lint` now runs `lint-imports`.
## Evidence
- **Before:** nothing enforced module boundaries.
**After:** each contract broken on purpose, then reverted:
```text
platform -> finance.service BROKEN (layers)
finance -> app BROKEN (layers)
fitness -> finance.models BROKEN (protected)
any hapi -> finance.models BROKEN (protected)
fitness -> finance.service kept
finance -> finance.models kept
bots -> hapi.* BROKEN (forbidden)
clean tree 6 kept, 0 broken
```
## Merge Danger
**Door:** two-way
**Blast Radius:** none
Adding a fifth domain means adding it to the layers contract and adding one more `protected` block. The config format can't loop over domains.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Domain packages (finance, fitness, maintenance, smart_home) and `bots/`,
with contracts: composition root above domains above platform; each
domain reachable from others only through its `service` module; `bots/`
forbidden from importing `hapi`. `just lint` runs import-linter.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Part of #74. Stack: 1. probe app → 2.
hapi serve→ 3. module boundaries → 4. pre-commit. Based on the 2/4 branch.Summary
There are six contracts: one
layers, fourprotected(one per domain), and oneforbidden. The domain packages are empty stubs, there only so the contracts have something to check.just lintnow runslint-imports.Evidence
After: each contract broken on purpose, then reverted:
Merge Danger
Door: two-way
Blast Radius: none
Adding a fifth domain means adding it to the layers contract and adding one more
protectedblock. The config format can't loop over domains.🤖 Generated with Claude Code
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.