Deferred from #891 / PR #893 (Phase 2 scaffolding).
Problem
Every v1 package exposes an arch:check nx target running
safer-architecture-lsp check .. The six v2 packages expose only build and
lint, because scripts/gen-architecture-configs.mjs writes
safer-architecture.config.json only for packages/*, and
package.json → arch:config:check diffs only packages/*.
Consequence: the deep-module rules in docs/architecture/components.md
("Deep-module design rules" — public interfaces expose capabilities not
mechanisms, one canonical owner per cross-package flow, no pass-through
accessors) have zero mechanical enforcement on v2. Those are precisely the
constraints safer-architecture-lsp checks (maxPublicExports, facadeFiles,
folder child counts, layers).
This was correct to skip while the packages are empty skeletons — an empty
package passes trivially and the config would encode nothing. It stops being
correct the moment real code lands.
Fix recipe
- Extend
scripts/gen-architecture-configs.mjs to emit
v2/*/safer-architecture.config.json.
- Widen
arch:config:check to diff v2/* as well as packages/*.
- Add the
arch:check nx target to each v2 package.json, matching the v1
shape.
Timing
Blocking before Phase 3 lands ported simulator code. Cheapest to do while the
packages are still empty.
Deferred from #891 / PR #893 (Phase 2 scaffolding).
Problem
Every v1 package exposes an
arch:checknx target runningsafer-architecture-lsp check .. The six v2 packages expose onlybuildandlint, becausescripts/gen-architecture-configs.mjswritessafer-architecture.config.jsononly forpackages/*, andpackage.json → arch:config:checkdiffs onlypackages/*.Consequence: the deep-module rules in
docs/architecture/components.md("Deep-module design rules" — public interfaces expose capabilities not
mechanisms, one canonical owner per cross-package flow, no pass-through
accessors) have zero mechanical enforcement on v2. Those are precisely the
constraints
safer-architecture-lspchecks (maxPublicExports, facadeFiles,folder child counts, layers).
This was correct to skip while the packages are empty skeletons — an empty
package passes trivially and the config would encode nothing. It stops being
correct the moment real code lands.
Fix recipe
scripts/gen-architecture-configs.mjsto emitv2/*/safer-architecture.config.json.arch:config:checkto diffv2/*as well aspackages/*.arch:checknx target to each v2package.json, matching the v1shape.
Timing
Blocking before Phase 3 lands ported simulator code. Cheapest to do while the
packages are still empty.