HD-2 archive & removal proposals — Boss surface consolidation

Status: PROPOSED — owner decision required (HD-2, register OPEN in FRONTEND_MIGRATION_LEDGER.md). Nothing in Sections 2–3 is executed. This is the traffic-evidence-attached proposal register that ONE_BOSS_CONSOLIDATION §4 step 10 routes to the owner: "removal decisions go to the owner as HD-2 items with traffic evidence attached; nothing is deleted in 2D itself."

First recorded: 2026-08-06 (session 7, 2D step 10 archival slice).

Governing constraints: - Charter / CONSTITUTION: no route or file deletion without migration evidence + owner approval (ledger HD register, HD-2 = OPEN). - 2D operating rule (ONE_BOSS_CONSOLIDATION §4): redirect/archive only, and only after 0-importer measurement; permanent removals are HD-2 owner decisions with traffic evidence. - Reversibility: everything in Section 1 is a git mv into the build-excluded archive-ui/ tree — fully recoverable from history; no bytes destroyed, no config changed.


1. Archived this slice (DONE — reversible, non-breaking)

Moved into archive-ui/ (paths mirrored) on 2026-08-06 after a 0-importer re-measure of the ACTIVE tree (app/ components/ hooks/ lib/ store/); history preserved as git R-renames; npx tsc --noEmit clean (0 errors) afterward. Full 0-importer evidence table: FRONTEND_MIGRATION_LEDGER.md → Phase 2D step 10.

Module (was) Prior role archive-ui destination
components/PersistentBossChat.tsx orphaned chat component (§1.1.3) archive-ui/components/PersistentBossChat.tsx
components/EnhancedBossChat.tsx orphaned chat component (§1.1.3) archive-ui/components/EnhancedBossChat.tsx
components/EnhancedBossChatCompact.tsx orphaned chat component (§1.1.3) archive-ui/components/EnhancedBossChatCompact.tsx
components/boss-system-components/BOSSChatAdvanced.tsx orphaned chat component (§1.1.3) archive-ui/components/boss-system-components/BOSSChatAdvanced.tsx
components/BossAgent.tsx orphaned chat component (§1.1.3); distinct from the live agents/orchestration/BossAgent.ts archive-ui/components/BossAgent.tsx
lib/api/boss-api.ts orphaned duplicate HTTP client (§1.2 C2) archive-ui/lib/api/boss-api.ts
lib/production-a2a-client.ts orphaned socket.io transport (§1.5 T3) archive-ui/lib/production-a2a-client.ts
lib/websocket.ts orphaned socket.io transport (§1.5 T6, MizOkiWebSocket) archive-ui/lib/websocket.ts

These remain in-repo and git-recoverable under archive-ui/. No owner action is required to keep them archived — this is the established non-breaking pattern and needs no HD-2 sign-off. The HD-2 items are Sections 2 and 3.

1b. Follow-up archival slice (2026-08-06) — the two deferred items, now cleared

Re-measured and archived after the deferral notes below (§4) were resolved:

Module (was) Why it was deferred Resolution
components/agent-ux/AgentVoiceBridge.tsx (+ its barrel re-export) live via the components/agent-ux/index.ts barrel Re-measured: the barrel re-export had zero consumers across the active tree (no import of AgentVoiceBridge/VoiceMode/VoiceRecognitionResult/AgentVoiceBridgeProps). Pruned the dead barrel block and git mvd the file to archive-ui/components/agent-ux/.
packages/@miz-oki/boss-agent/ (§1.2 C5) workspace-package resolution safety Re-measured: not a workspace member (neither root package.json — services/*, src/cells/*, sdk/*, apps/* — nor the UI package.json covers packages/), and referenced nowhere. git mvd whole to archive-ui/packages/@miz-oki/boss-agent/.

Also in this follow-up (NOT an archival — a truth-discipline correction): hooks/useBossAgent.ts was a mock feeding the live /creative-studio surface (§1.2), fabricating a status:'connected' and a fake { id, status:'initiated' } workflow. Rewritten as an honest stub: idle status, initiateWorkflow → null, requestSuggestions → empty. The Dashboard already tolerates a null workflow and runs the real generation via useClaudeGemini, so the live flow is preserved with the fabrication removed. Wiring these Boss-workflow methods to a governed BFF path remains a follow-up. tsc 0 / build 0 after all three moves; a hooks/useBossAgent.test.ts locks the honest contract.


2. PROPOSED permanent removals (HD-2 — owner approval required)

P1 — permanently delete the eight archived modules above (git rm from archive-ui/)


3. PROPOSED route redirects (HD-2 — TRAFFIC EVIDENCE REQUIRED; NOT measured in this slice)

The §4 step-10 charter asks for redirect proposals "for surfaces that traffic data shows unused." This slice did not and cannot measure production traffic (no analytics access from a source checkout). The candidates below are carried forward from the §1 measured route inventory as owner-decision items. Each MUST have traffic evidence attached before any redirect ships, AND each presupposes the shared-<BossChat> migration (ONE_BOSS_CONSOLIDATION §4 steps 5/8) has landed so the redirect target actually exists.

Candidate route Consolidation target Precondition / caveat Evidence still needed
/chat (app/chat/page.tsx) global BossAgentFooter + /boss NOT in the nav SSOT (config/navigation.ts has no /chat); reachable only by URL or BossNavigation (§4 map row 2). It is the only surface with persisted chat (boss-chat:* localStorage, store S1) → a redirect must first preserve/port that history production traffic to /chat vs the footer
/boss-srpvdal chat pane (app/boss-srpvdal/page.tsx) shared <BossChat> mount inside the SRPVDAL viz the pane becomes a thin mount (§6.2 line 226); the page itself likely stays for the D3 visualization — redirect the chat leg only, not the route traffic to the embedded chat pane
test pages (/test-orchestration, /test-moa-integration, …) remove from prod routing / gate behind a non-prod build /test-* are URL-only, absent from nav (§4 map). /test-orchestration fronts an in-process TS "Boss brain" (§1.3.4) confirmation operators do not use them in prod

Framing: these are PROPOSALS. No redirect, next.config rewrite, nav-SSOT change, or route deletion is made in this slice. The owner decides per HD-2 with traffic evidence.


4. Explicitly NOT proposed (guardrails)

Addendum 2026-08-07 — newly-measured 0-importer modules (session-8 3H sweep)

Measured live importers across app/ components/ hooks/ lib/ store/ + middleware (static imports, barrel re-exports, dynamic import(); archive-ui and tests excluded). All verdicts evidence-recorded in the 3H final report (VERIFICATION §27).

EXECUTED 2026-08-07 (session 9): all seven re-measured at 0 importers (alias @/lib/… AND relative-specifier sweeps, both empty) and git mvd into archive-ui/ mirrored paths — the established non-breaking pattern; npx tsc --noEmit clean after the moves. Section-1 rule applies: no HD-2 sign-off needed to KEEP them archived; permanent git rm remains Proposal P1 (owner-gated, retention window):

Module Verdict Note
lib/api/change-detection.ts 0 importers dashboard fetches its URLs inline, never imports the module
lib/api/media-autopilot.ts 0 importers same inline-fetch pattern
lib/api/production-client.ts 0 importers all "production-client" hits are the DIFFERENT live lib/a2a-production-client.ts
lib/api/coding-moa.ts 0 importers only string ids/URLs elsewhere; the sole codingMoaApi mention is a comment naming a nonexistent barrel
lib/api/rewoo.ts 0 importers only string enum/case mentions
lib/api/supabase-client.ts 0 importers distinct from live lib/supabase/client.ts
lib/time.ts 0 importers exports humanTime/downloadCSV, unused outside the file

Also re-confirmed already archived with clean barrels (no action): packages/@miz-oki/boss-agent/ (no workspaces field, no tsconfig path, zero references) and components/agent-ux/AgentVoiceBridge.tsx (barrel re-export replaced by the archival comment).

1c. Session-9 archival slice (2026-08-07) — addendum executed + events family

All seven addendum modules above were git mv'd into archive-ui/ after a same-day fresh 0-importer re-measure (every verdict re-confirmed). Four more modules measured dead this session went with them:

Module (was) 0-importer evidence archive-ui destination
components/ActivityFeed.tsx zero import sites (earlier "importer" hits were string matches on other components' names) archive-ui/components/ActivityFeed.tsx
lib/useSSE.ts zero importers (live hooks/useSSE is a different module) archive-ui/lib/useSSE.ts
hooks/api/useEvents.ts barrel-only re-export; zero callers of all 12 exported names; barrel block pruned with archival comment archive-ui/hooks/api/useEvents.ts
lib/api/events.ts its 3 importers are the three rows above; upstream measured absent — boss serves no /api/v1/events/* (grep of boss_agent_core.py), so the REST surface was dead-404 archive-ui/lib/api/events.ts

Receipt: commit 8bc630c (all R-renames); tsc --noEmit 0 and 532/532 tests after the moves. Section 1 semantics apply: keeping them archived needs no owner action; Proposal P1 (permanent git rm) remains the HD-2 owner decision and now covers these eleven additional modules.

Addendum 2026-08-07 (session 10) — six more 0-importer modules (step-7 tail sweep)

Re-measured live importers (all import styles, barrels, dynamic imports; archive-ui/tests excluded). Evidence in VERIFICATION §30.2. PROPOSED for archive slices; nothing moved:

Module Note
hooks/useCreativeSuite.ts sole importer CreativeDashboard itself 0-importer; env base set nowhere → localhost — never worked deployed
hooks/useEDSM.ts barrel + edsm/ family 0 external importers; also step-8 class (EventSource) even if revived
components/agent-control/AgentControlPanel.tsx whole agent-control/ component family 0 importers; do NOT confuse with the DISTINCT AgentControlPanel inside agent-ux/AgentControlObservability.tsx
components/boss-agent-components/EventTimeline.tsx 0 references; also step-8 class (EventSource)
components/change-detection/ChangeDetectionDashboard.tsx 0 importers — same class as its already-archived lib/api twin
components/media-autopilot/MediaAutopilotDashboard.tsx 0 importers — same class as its already-archived lib/api twin

1d. Checkpoint archival slice (2026-08-08) — the six session-10 addendum families

Owner checkpoint approval 2026-08-08 ("all approved for next checkpoint"). Each verdict re-measured same-day at family level before moving (external importers of every member, barrels, and @/hooks re-export consumers — all zero; CreativeDashboard, useCreativeSuite's sole importer, is itself 0-importer and moved with it):

Module family (was) archive-ui destination
hooks/useCreativeSuite.ts + components/CreativeDashboard.tsx archive-ui/hooks/, archive-ui/components/
hooks/useEDSM.ts + components/edsm/ (ConnectionIndicator, barrel); hooks/index.ts EDSM block pruned with archival comment archive-ui/hooks/, archive-ui/components/edsm/
components/agent-control/ (6 files) archive-ui/components/agent-control/
components/change-detection/ archive-ui/components/change-detection/
components/media-autopilot/ archive-ui/components/media-autopilot/
components/boss-agent-components/EventTimeline.tsx (only this member; BossNavigation & the strategy components stay live) archive-ui/components/boss-agent-components/

Ledger shrinks in the same commit (each test's own shrink rule): WS/SSE freeze exits for EventTimeline.tsx and useEDSM.ts; the ratchet's useCreativeSuite step-7 evidence block now reads the archive-ui mirror. Gates after: tsc 0 · 726/726 unit · lint 0 errors · Playwright 30/30, zero flakes.

P1 status update (2026-08-12) — EXECUTED

P1 is closed. The 20 enumerated modules and archive-ui/packages/@miz-oki/boss-agent were deleted on 2026-08-12 with the command sequence below. The 2026-08-08 permission block no longer applied.

Two things were re-measured before deleting, rather than trusted:

  1. Nothing in the active tree references them. archive-ui/ is excluded by tsconfig.json and vitest.config.ts, and the only active-tree hits for the string archive-ui are prose comments recording the moves.
  2. The "shrink the ratchet in the same commit" instruction below is STALE. It was written when ratchet entries could resolve through an archive-ui mirror. Measured 2026-08-12 by moving the ENTIRE archive-ui/ tree aside and running both guards: no-public-backend-url.ratchet.test.ts and ws-transport.freeze.test.ts pass 39/39 with it absent. Zero entries depended on a mirror, so no guard was shrunk — which is the desired outcome, since shrinking an append-only ratchet removes protection.

The §1d six families are NOT part of P1 and were deliberately left in place; their retention window runs from 2026-08-08.

The executed sequence, from miz-oki-command-center-ui/:

git rm archive-ui/components/PersistentBossChat.tsx \
  archive-ui/components/EnhancedBossChat.tsx \
  archive-ui/components/EnhancedBossChatCompact.tsx \
  archive-ui/components/boss-system-components/BOSSChatAdvanced.tsx \
  archive-ui/components/BossAgent.tsx \
  archive-ui/lib/api/boss-api.ts \
  archive-ui/lib/production-a2a-client.ts \
  archive-ui/lib/websocket.ts \
  archive-ui/components/agent-ux/AgentVoiceBridge.tsx \
  archive-ui/lib/api/change-detection.ts \
  archive-ui/lib/api/media-autopilot.ts \
  archive-ui/lib/api/production-client.ts \
  archive-ui/lib/api/coding-moa.ts \
  archive-ui/lib/api/rewoo.ts \
  archive-ui/lib/api/supabase-client.ts \
  archive-ui/lib/time.ts \
  archive-ui/components/ActivityFeed.tsx \
  archive-ui/lib/useSSE.ts \
  archive-ui/hooks/api/useEvents.ts \
  archive-ui/lib/api/events.ts
git rm -r archive-ui/packages/@miz-oki/boss-agent

~~After deletion, drop the ratchet's useCreativeSuite-class evidence blocks whose archive-ui mirrors disappear (shrink in the same commit).~~ Superseded 2026-08-12 — measured false. No ratchet entry resolved through an archive-ui mirror, so nothing needed shrinking; both guards pass 39/39 with the whole tree absent. Do not shrink a ratchet on the strength of this line alone — re-measure first, because shrinking removes protection.

The 2026-08-08 checkpoint's six §1d families are NOT in P1 — they enter the same retention window from 2026-08-08.

← All docsView source on GitHub →