Repair architecture rules after a layer rename
“Names no declared layer” means a rule refers to a name missing from the layer declarations.
Update references to the renamed layer#
When renaming a layer, update its declaration and each reference under layer, may_depend_on and must_not_depend_on. A directory name can stay the same as the logical layer name changes.
version: 2
architecture:
layers:
- name: core
paths: ["src/domain/**"]
- name: storage
paths: ["src/storage/**"]
rules:
- id: core-independent
layer: core
must_not_depend_on: [storage]
severity: error
Here the layer was renamed from domain to core, while its files still live under src/domain/. Check for references to the old name before validating the complete draft.