FYI tech-debt audit done; the ADR action item #8 satisfied
Why
The customer-row workbench ADR (delivery/adrs/ADR-0001-customer-centric-delivery-workbench.md, originally filed as coordination/adrs/the ADR and relocated 2026-05-16 since the decision is domain-internal) names a separate tech-debt audit as action item #8 — the menu collapse should not silently absorb stale code in the demoted-route trees. This memo files the audit results so the action item has a referenceable source. The cleanup pass that follows from the findings has already landed.
What was found
The sweep covered every app/**/page.tsx, every directory under modules/, the primitives file app/_components/workbench-ui.tsx (770 lines pre-audit), and lib/. Findings were narrower than expected: the codebase is leaner than the menu sprawl suggests, and most of what looks like dead code is load-bearing cross-domain contract surface that just does not surface in the UI tree.
Truly dead, pruned
Three exports in app/_components/workbench-ui.tsx had zero importers anywhere outside the file and were not used internally:
ActionChip— near-duplicate ofStatusChip, differing only in font size.ActionButton— form-action mutation primitive built in advance of an unstarted operator-mutation flow.formatDate— date-only formatter shadowed byformatDateTimeandformatRelative, which are used.
Removed in this pass. File is down to 692 lines.
modules/integrations/ had zero callers anywhere in the repo (verified by grepping for both the file path and the names of its exports assertAuthorizedSyncRequest, SyncAuthError, SyncRequestAuthDiagnostics). The module was an Airtable sync auth helper for a surface that was either never built or has been replaced. The bash sandbox lacks delete permissions on the mounted repo, so the module is neutralized in place: index.ts reduced to export {}; with a comment naming the cleanup pass, and the test file reduced to a describe.skip block. The directory can be deleted from the operator's shell with rm -rf modules/integrations/ at convenience.
tsc --noEmit passes clean after the pruning (delivery_typecheck exit 0).
Subagent false positives, retained
Initial sweep flagged several candidates that verification rescued:
modules/lesson-holdandapp/api/v1/delivery/v1/lesson-holds/*— referenced from coordination contracts (contracts/credit-reservation-lock/README.mdand three sub-specs atcontracts/credit-reservation-lock/). Load-bearing cross-domain API surface; absence of UI callers is by design.modules/dispatcher-inbox— consumed byapp/api/dispatcher/inbox/route.ts, the webhook receiver. Load-bearing.modules/lessonsroute handlers (app/api/lessons/{cancel,complete,debit,no-show,process-outcome}) — cross-domain consumers (Revenue's debit, Coaching's process-outcome).PageShell,PageBody,SectionTitleinworkbench-ui.tsx— used internally byOperatorShell. Externally onlyPageShellis imported (byapp/page.tsx), which will go away under the ADR action item #4, but the export stays because the internal usage holds.
Conditionally dead, awaiting the ADR implementation
These die when the rebuild lands, not earlier:
app/page.tsxroot launcher and its locals (loadHealth,DeliveryHealth,HealthMetric,ArrowIcon) — collapse with the ADR action item #4.app/workbench/page.tsxQUICK_LINKSconstant and its grid render — collapse with action item #3.app/_components/workbench-ui.tsxexportsPageShell,PageBody,SectionTitlemay loseexportand become file-local onceapp/page.tsxis replaced.
Refactor opportunity, not debt
Each demoted route page (/lessons, /locks, /attendance) carries parallel grouping and card-mapping logic. The new modules/customer-workbench/ (per the ADR action item #1) will need similar shapes; an opportunistic consolidation into modules/operator/ helpers is reasonable when the new module lands. Not a blocker for the rebuild.
Bottom line for the rebuild
The audit removed roughly 80 lines of UI primitive code and one dead module. The big visible-clutter payoff is the menu collapse in the ADR's rebuild — the audit's deletions alone would not have moved the operator's experience. The rebuild does. Action item #8 of the ADR is satisfied by this memo.
References
delivery/adrs/ADR-0001-customer-centric-delivery-workbench.md— the rebuild this audit precedes; action item #8 names this memo. (Originally filed ascoordination/adrs/ADR-0017and relocated 2026-05-16; the coordination path now carries a superseded stub.)delivery/adrs/README.md— the convention that puts domain-internal ADRs in the Delivery repo.- Workbench Pattern Standard §10 (
coordination/standards/engineering/workbench-pattern.md) — the verification discipline this audit's typecheck pass satisfies. - Module Layout Standard (
coordination/standards/engineering/module-layout.md) — the layout the neutralizedmodules/integrations/will conform to if a real surface ever lands there.