Adoption and Audit
Use this when the project already has deply.yaml, CI wiring, documentation, or Deply suppressions.
Existing Config Audit
Check:
- Config uses public
deply:root or parser-compatible top-level shape. - No unsupported keys such as
allow_layer_dependencies, severities, wildcards, or custom rule names. pathsexist and do not point at generated or dependency directories.exclude_filesexcludes tests, migrations, generated files, build output, virtualenvs, caches, and vendored code without hiding real source layers.- Every layer has at least one specific collector.
directorycollectors point at real package/module boundaries.- Regex collectors use single-quoted YAML strings when they contain backslashes.
- Rule layer names match declared layer names.
disallow_external_importsprotects domain/application layers from framework, persistence, HTTP, queue, cloud, SDK, and exchange/client packages where appropriate.- Makefile/CI runs both
deply validateanddeply analyze. - Docs describe actual configured layers and commands.
Weak Config Signals
Prefer fixing these before adding more rules:
- One layer catches most files.
- Collectors match tests or migrations by accident.
- Rules only document architecture but cannot fail in CI.
exclude_fileshides source directories to make analysis pass.- Strict rules are configured but CI uses a high permanent
--max-violations. - Suppressions exist without a reviewed architectural reason.
Suppression Policy
Scan before changing config:
rg -n "deply:ignore|deply:ignore-file" .
Rules:
- Count existing suppressions and report them.
- Do not add suppressions to make a new config pass.
- Prefer collector fixes, excludes for non-source files, or a temporary ratchet.
- Add a suppression only when the user accepts a specific exception that cannot be modeled cleanly in
deply.yaml. - Document why new suppressions are acceptable in the final response or project docs.
Debt Adoption
Use this flow for legacy projects:
- Generate the target config.
- Run
deply validate --config=deply.yaml. - Run
deply analyze --parallel --config=deply.yaml. - If violations are real and accepted temporarily, rerun with exact current count:
deply analyze --parallel --config=deply.yaml --max-violations=12
- Put the same exact count in CI.
- Document that the number must only decrease.
Do not choose the ratchet count by guessing. Use the actual current violation count from Deply output.