Turns the prior roadmap sketch into ordered, gated work packages (enforcement gates, FP/DDD consistency, CIBG fidelity, Storybook curriculum, a11y) from the 2026-07-02 showcase-hardening audit.
3.3 KiB
3.3 KiB
WP-04 — Boundaries II: ui ↛ infrastructure + showcase sanction
Status: todo Phase: 0 — enforcement & gates
Why
The documented rule ui → application → domain (CLAUDE.md §1) is not lint-enforced, and
three components inject infrastructure adapters directly. This is the biggest refactor of
Phase 0 — a pure move of wiring, no behavior change.
Read first
CLAUDE.md§1,docs/ARCHITECTURE.mdeslint.config.mjssrc/app/registratie/ui/registratie-wizard/registratie-wizard.component.ts(lines ~18-19:BrpAdapter/parseBrpAddress,DuoAdapter/parseDuoLookup)src/app/herregistratie/ui/intake-wizard/intake-wizard.component.ts(~line 28:IntakePolicyAdapter)src/app/registratie/application/big-profile.store.ts(the facade pattern to copy)src/app/showcase/ui/concepts.page.ts
Decisions (pre-made, don't relitigate)
- Showcase is sanctioned, not fixed:
showcase/is a teaching page whose point is showing multiple contexts side by side. Add an explicit eslint override allowing@registratie/*/@herregistratie/*fromsrc/app/showcase/**, with a message comment — same precedent as the existingdebug-stateexemption. Document in ARCHITECTURE.md: "showcase may read every context; nothing imports showcase." - Move wiring only — do not redesign adapter signatures. Existing machine specs are the safety net.
Files
eslint.config.mjs— forbid**/ui/**and**/layout/**→**/infrastructure/**; add the showcase sanctionsrc/app/registratie/ui/registratie-wizard/registratie-wizard.component.ts— BRP/DUO lookups move behind a registratieapplication/facade (command or store methods)src/app/herregistratie/ui/intake-wizard/intake-wizard.component.ts— policy resource moves behind newsrc/app/herregistratie/application/(folder doesn't exist yet)docs/ARCHITECTURE.md— fix "three contexts, four layers" → six contexts (shared, auth, registratie, herregistratie, brief, showcase), five layers (+ contracts); add the showcase sanctionCLAUDE.md§1 — addbriefto the context list; note the showcase sanction
Steps
- Create the application-layer facades (pattern:
big-profile.store.ts/submit-*.tscommands); components inject those instead of adapters. - Add the eslint restriction; add the showcase override with rationale message.
- Fix any further hits lint finds (
letter-composer's infra import is handled in WP-03; if it slipped, fix here). - Update both docs' context/layer inventory.
Acceptance criteria
- Rule active; lint green; no disables beyond the documented showcase + debug-state exemptions.
- No
**/ui/**file imports from**/infrastructure/**. - Both wizards behave unchanged (specs pass; manual smoke).
- CLAUDE.md and ARCHITECTURE.md list 6 contexts / 5 layers.
Verification
GREEN + npm run test-storybook:ci. Manual smoke: npm start → run the registratie
wizard (BRP prefill + DUO lookup steps) and the intake wizard end-to-end.
Out of scope
Redesigning the adapters or resource loading; parse boundaries (WP-05).
Risks
Resource wiring moving layers can subtly change injection timing — keep facades
providedIn: 'root' like existing stores and hand the resource through unchanged.