Declare a one-way dependency between layers
Describe a boundary where storage may use domain types while domain code must stay independent of storage.
Identify the importing layer#
Name the importing layer in layer and the prohibited destination in must_not_depend_on. The direction matters.
version: 2
architecture:
layers:
- name: domain
paths: ["src/domain/**"]
- name: storage
paths: ["src/storage/**"]
rules:
- id: domain-independent
layer: domain
must_not_depend_on: [storage]
severity: error
This declaration leaves the reverse direction unrestricted. Verify the rule under Settings → Config file → Architecture. Proofline validates the declaration; reviews do not yet check these imports.