docs(adr): retain the current layering engine (ADR 0032)

Merged
TH
2mo ago
+172-0

Summary

ADR 0032 records the workstream-2 spike of #3276: retain the current layering engine for R2, R4, R5, R6, R77, R78, R14 and R71. Graph-based checks share one normalized import model whose implementation remains replaceable.

The ADR has the edge-set diff, planted-violation parity (23 plants), runtime and lines-deletable tables for dependency-cruiser 18.5 and fallow 3.32. It separates semantic blockers from migration costs:

  • Blocking: dependency-cruiser. Its dedupe mislabels 46 pairs and hides an R77 lazy import.
  • Blocking: fallow. With no dynamic-import kind, it flags R5's lazy seams and misses R77 import(). Its rule packs skip orphan files.
  • Not blocking: TypeScript <7/swc, diagnostics, config comments, and a path check for the filesystem-placement rules R14/R71.

Both engines also find 9 TS import('x').T pairs that parseImports misses. The fix is tracked in #3293.

Every measurement is pinned to d9959f510 (production tree of 7dda0c2bf). The spike harness lives only there, retrieved with git show d9959f510:scripts/layering/boundary-engine-spike.ts.

2 files (ADR and index row). Closes #3278.

Validation

  • Tested commit: 081d869a2.
  • pnpm check:affected --run: passed (docs-only diff; no local checks selected). pnpm format:check passed.
  • The harness ran at d9959f510 on a clean tree and matches every ADR table; git diff 7dda0c2bf d9959f510 -- src packages is empty.
  • Docs only; no runtime behavior changes.

🤖 Generated with Claude Code