Skip to content

gut: sweep gutted stubs across agents, auto-reply, commands, cli (MBP audit) #2303

@alexey-pelykh

Description

@alexey-pelykh

Context

Dozens of gutted stub files survive across multiple directories — no-op functions, empty returns, 2-line stubs. They pollute the command namespace (--help shows dead commands), add compilation overhead, and obscure the real codebase. Found during MBP deep dive audit.

Scope

src/cli/ — 7 gutted command stubs + registrations (~400 lines):

  • Delete: models-cli.ts, skills-cli.ts, sandbox-cli.ts, secrets-cli.ts, clawbot-cli.ts, docs-cli.ts, exec-approvals-cli.ts
  • Remove corresponding entries from register.subclis.ts

src/commands/ — 19 gutted stubs (~140 lines):

  • Delete: auth-choice.ts, auth-choice-legacy.ts, auth-choice-options.ts, auth-choice-prompt.ts, auth-choice.apply.openai.ts, auth-choice.apply.byteplus.ts, auth-choice.apply.volcengine.ts + tests
  • Delete: doctor-gateway-auth-token.ts, doctor-sandbox.ts, doctor-memory-search.ts, doctor-bootstrap-size.ts, doctor-workspace.ts
  • Delete: model-default.ts, model-picker.ts, gateway-install-token.ts, openai-model-default.ts, google-gemini-model-default.ts

src/auto-reply/ — 19 gutted stubs (~133 lines):

  • Delete: commands-acp.ts, commands-bash.ts, commands-approve.ts, commands-compact.ts, commands-models.ts, model-selection.ts, session-reset-model.ts, agent-runner-memory.ts, memory-flush.ts, post-compaction-context.ts, stage-sandbox-media.ts, reply-inline-whitespace.ts, audio-tags.ts, dispatch-acp.ts, and gutted directive-handling.ts re-exports

src/agents/ — Pi-era dead directories (~1,000 lines):

  • Delete pi-embedded-helpers/ (4-line re-export, redirect 6 callers to agent-helpers)
  • Delete pi-embedded-runner/ (3 files, all return undefined/empty)
  • Delete pi-extensions/ (context pruner, zero imports in codebase)
  • Delete skills/ (refresh.ts with no-op functions)

Acceptance Criteria

  • All listed files deleted
  • No dead command entries in register.subclis.ts
  • No broken imports (callers of pi-embedded-helpers redirected to agent-helpers)
  • remoteclaw --help shows no ghost commands (models, skills, sandbox, secrets, clawbot, docs, approvals)
  • Build passes
  • Tests pass

Size

~1,673 lines removed across ~65 files.

Metadata

Metadata

Assignees

Labels

gutRemoving dead upstream subsystems

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions