Skip to content

refactor!: delete unreachable destinations and the docs that described a dead system - #621

Merged
0x-copilot-dev merged 3 commits into
devfrom
docs/prune-and-rewrite
Aug 11, 2026
Merged

0x-copilot-dev merged 3 commits into
devfrom
docs/prune-and-rewrite

Conversation

@0x-copilot-dev

Copy link
Copy Markdown
Owner

Removes 113,296 lines across two independent classes of dead weight, each verified against the code rather than against what a doc claimed.

Dead UI (−51,942)

Nine chat-surface destinations — memory, agents, home, inbox, library, routines, team, todos, tools — plus their barrel blocks, and 7 web feature dirs. None is reachable in either host: memory is in neither SOLO_ORDER nor TEAM_ORDER and its web URL redirects to Settings → Privacy; the rest fall through DestinationOutlet's default: to a placeholder.

The apparent host references were comment text, not imports — AgentsRoute.tsx:20 only mentions <AgentsDestination> in a header comment. That single fact is what made an earlier grep-based pass wrong in both directions.

useStepMachine moved to connectors/webhooks/, its one remaining consumer, rather than to a shared layer. Deleting tools/ without that move would have dangled two deep imports that bypass both barrels — reddening the required host-typecheck check and breaking the desktop esbuild resolve (esbuild fails at resolve, before tree-shaking).

Dead docs (−61,354)

Six trees whose founding premises are gone:

  • docs/roadmap specced ~30 PRs into a docs/specs/ tree that never existed in git history, and was founded on a DEV_AUTH_BYPASS that now survives only as a guard rejecting it.
  • docs/new-design was built on switching the brand accent to Atlas orange #d97757 — a hex that is now only Anthropic's provider-mark colour.
  • RUN-RESULTS.md described a 53-journey layout that e8622a1d replaced; its durable traps already live in the harness README.

Rewrites

  • JOURNEYS.md maps G0 → AS-1 and G3–G10 → IP-2…IP-9 instead of linking 9 deleted scripts.
  • github-actions-strategy.md no longer lists deploy.yml / release-images.yml under "Workflows (implemented)" — neither exists.
  • The ai-backend system map gains the 8 undocumented packages (surfaces_v2 at 35 files, effects, artifacts, harness_quality, control_plane, release, presentation, hyperparameters) and drops the Postgres adapter removed in e03840ed.

Verification

Check Result
tsc × chat-surface, frontend, desktop exit 0, zero output
chat-surface vitest 3,832 passed / 1 failed
Desktop esbuild bundle exit 0, all 4 bundles
Web vite build exit 0
Built bundle in a browser all 25 JS chunks 200, sign-in screen renders

Orphan-destination guard passes; waivers drop 13 → 5 because the waived code is gone.

The 1 failing test is pre-existing on dev: canvasLifecycle.test.ts shells into a Python runner importing agent_runtime.presentation.lifecycle, a module present on neither dev nor this branch — only its runner survives.

Not run: the Playwright harnesses (tools/desktop-journeys, tools/cli-testing). They need a staged runtime and node_modules the worktree lacks.

🤖 Generated with Claude Code

…d a dead system

Removes 113k lines across two independent classes of dead weight, each
verified against the code rather than against what a doc claimed.

Dead UI (-51,942):
9 chat-surface destinations (memory, agents, home, inbox, library,
routines, team, todos, tools) plus their barrel blocks, and 7 web feature
dirs. None is reachable in either host: `memory` is absent from both
SOLO_ORDER and TEAM_ORDER and its web URL redirects to Settings, and the
rest fall through DestinationOutlet's `default:` to a placeholder. The
apparent host references were comment text, not imports -- AgentsRoute.tsx
only mentions `<AgentsDestination>` in a header comment.

`useStepMachine` moves to connectors/webhooks, its one remaining consumer,
rather than to a shared layer: deleting tools/ without that move would
have dangled two deep imports that bypass both barrels, reddening the
required `host-typecheck` check and breaking the desktop esbuild resolve.

Dead docs (-61,354):
Six trees whose premises are gone -- docs/roadmap specced ~30 PRs into a
`docs/specs/` tree that never existed in git history and was founded on a
DEV_AUTH_BYPASS that now only survives as a guard *rejecting* it;
docs/new-design built on an Atlas-orange brand decision whose hex is now
only Anthropic's provider-mark colour. Also RUN-RESULTS.md, which
described a 53-journey layout that commit e8622a1 replaced, and whose
durable traps already live in the harness README.

Rewrites: JOURNEYS.md now maps G0->AS-1 and G3-G10->IP-2..IP-9 instead of
linking 9 deleted scripts; github-actions-strategy.md no longer lists
deploy.yml and release-images.yml as "implemented" (neither exists); the
ai-backend system map gains the 8 undocumented packages (surfaces_v2,
effects, artifacts, harness_quality, control_plane, release, presentation,
hyperparameters) and drops the Postgres adapter removed in e03840e.

Verified: tsc clean on chat-surface + frontend + desktop; 3,832 vitest
passing; desktop esbuild and vite build both exit 0; the built web bundle
boots in a browser with all 25 chunks 200 and renders the sign-in screen.
The one failing test (canvasLifecycle.test.ts) is pre-existing on dev --
it imports agent_runtime.presentation.lifecycle, a module that exists on
neither dev nor here.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
0x-copilot-dev and others added 2 commits August 11, 2026 21:53
…estination

`features/home/HomeRoute.tsx` imported `HomeDestination` and `HomePanel`
from the barrel, so removing the dead `home` destination broke three CI
jobs (host-typecheck, build-and-audit, packed CLI payload).

The binder is dead by the same evidence as the destination it bound: no
`home` slug exists in `routes.ts` or `App.tsx`, and its only importer is
`api/homeApi.ts`, itself unreachable.

Why local typecheck missed it: this worktree has no `node_modules`, so
`tsc` resolved `@0x-copilot/chat-surface` by walking up to the MAIN
checkout's workspace symlink — which still contains `HomeDestination`.
The package's own typecheck was honest; every cross-package check was
resolving the other tree. Symlinking the workspace packages into the
worktree reproduces CI exactly.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
`test_waiver_count_does_not_grow` pins the orphan-destination waiver count
to an integer literal so a PR that adds a waiver has to justify the bump.
This PR moves it the other way: the eight waivers that disappeared were
not re-classified, the code they waived is deleted.

Re-pinning at 5 keeps the ratchet tight. Leaving it at 13 would silently
re-open room for eight new orphans.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@0x-copilot-dev
0x-copilot-dev merged commit f670f96 into dev Aug 11, 2026
14 checks passed
@parthpahwa1
parthpahwa1 deleted the docs/prune-and-rewrite branch August 11, 2026 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant