ADR-0005: A native config format that is a strict superset, and dependency-cruiser's format accepted as is
- Status: Accepted
- Date: 2026-09-20
- Derives from: design.md § Configuration, § The native format, § The rule language, § Where it would be ignored
- Constrains: architecture.md § Configuration and the rule language
- Implemented by: Wave 1 plan, Wave 2 plan
Context
Every one of the 112 .dependency-cruiser.* files found on GitHub must run on day one, and models trained on dependency-cruiser and ArchUnitNET will write those dialects from memory. A renamed key is an adoption tax paid on every repository and every agent turn.
Decision
- Both formats load into one internal model. A file named
.dependency-cruiser.{json,yaml,yml,cjs,js,mjs}, or passed with--config-format dependency-cruiser, is read with dependency-cruiser's semantics and needs no conversion. - The native format (
rulebearing.yaml, also.json,.jsonc,.toml) is a strict superset. Every dependency-cruiser key is legal at the same place with the same meaning. The native format addslanguages,defines,rules.dependencies/elements/slices/diagrams/ratchets, thelayersandindependenceshorthands, and the rule metadatafix,examples,owner,expires. It renames nothing. - Element-rule keys are ArchUnitNET's method names in camelCase, one key per predicate or condition, with
all,any,notas the combinators. config convertis lossless from dependency-cruiser to native and lossy the other way, and says exactly what it dropped.config lintandconfig expandexist so nothing is hidden.- The native schema is published with descriptions at the
$schemaURL.
Consequences
rb-configcarries two front-ends and one model, and the conformance suite runs the dependency-cruiser front-end against the original specs (ADR-0009).- A predicate a language cannot answer is a validation error, never a silent false (ADR-0014 states the companion rule for edges).
Alternatives considered
- A new, cleaner rule language. Rejected: the design's adoption analysis shows a new dialect is the first place agents go wrong.
- dependency-cruiser's format only. Rejected: it has no place for element, slice, diagram or ratchet rules, nor for
fixandexamples.