Skip to content

Delete dead code survivors from pre-rebrand audit #186

@alexey-pelykh

Description

@alexey-pelykh

Context

RemoteClaw is a fork of OpenClaw that replaced OpenClaw's embedded AI execution engine
with a CLI subprocess model (ChannelBridge → AgentRuntime). During the code gutting
milestones, most dead subsystems were removed. However, a systematic audit of the fork
codebase found 27 dead files with zero production callers that were missed by prior
cleanup work. These files are inert but create confusion during the upcoming rebrand
milestone — files that should be deleted would get unnecessarily rebranded instead.

Files to Delete

.pi/ directory (5 files — pi-agent internal prompts)

OpenClaw's "pi-agent" was the embedded AI engine. These are its internal prompt files.
RemoteClaw uses external CLI agents instead — these prompts are never loaded.

  • .pi/git/.gitignore
  • .pi/prompts/cl.md
  • .pi/prompts/is.md
  • .pi/prompts/landpr.md
  • .pi/prompts/reviewpr.md

Delete the entire .pi/ directory.

packages/clawdbot/ directory (3 files — legacy npm forwarding shim)

Legacy npm package that forwarded imports to the main package. The clawdbot package
name is an OpenClaw artifact with no RemoteClaw equivalent.

  • packages/clawdbot/package.json
  • packages/clawdbot/index.js
  • packages/clawdbot/scripts/postinstall.js

Delete the entire packages/clawdbot/ directory.

packages/moltbot/ directory (3 files — legacy npm forwarding shim)

Same as clawdbot — another legacy npm package name.

  • packages/moltbot/package.json
  • packages/moltbot/index.js
  • packages/moltbot/scripts/postinstall.js

Delete the entire packages/moltbot/ directory.

pnpm-workspace.yaml update

After deleting both packages/ directories, update pnpm-workspace.yaml to remove
the packages/* entry (or remove the file if packages/* is the only entry and no
future packages are planned).

CHANGELOG.md (1 file — OpenClaw changelog)

The current CHANGELOG.md documents OpenClaw releases, not RemoteClaw. Replace with
a fresh RemoteClaw changelog. Include a note at the bottom:
"Forked from OpenClaw."

scripts/sync-plugin-versions.ts (1 file — dead plugin version sync)

Synced versions across plugin packages. The plugin system has been simplified and this
script has zero callers (not referenced in package.json scripts or any build tooling).

src/agents/pi-auth-json.ts + src/agents/pi-auth-json.test.ts (2 files)

Pi-embedded auth artifact generator. Only called by its own test file — no production
callers.

src/agents/pi-settings.ts + src/agents/pi-settings.test.ts (2 files)

Pi-embedded settings configuration. Only called by its own test file — no production
callers.

src/agents/shell-utils.ts + src/agents/shell-utils.test.ts (2 files)

Bash-tools helper utilities. Only called by its own test file — the bash-tools subsystem
was gutted in a prior PR, leaving this helper orphaned.

src/cli/clawbot-cli.ts (1 file — legacy CLI alias)

Legacy clawbot CLI entry point alias. Zero callers — the CLI is now remoteclaw.

src/cli/docs-cli.ts (1 file — dead docs search CLI)

CLI subcommand that searched docs.openclaw.ai. Zero callers after the OpenClaw docs
integration was gutted.

src/commands/onboard-hooks.ts + src/commands/onboard-hooks.test.ts (2 files)

LLM hook onboarding wizard. Only called by its own test file — LLM hooks were gutted
in a prior PR (hooks that intercepted in-process LLM calls are incompatible with the
CLI subprocess model).

src/providers/github-copilot-models.ts + src/providers/github-copilot-models.test.ts (2 files)

GitHub Copilot model catalog. Zero production callers — the provider registration
mechanism (registerProvider) is dead in the CLI subprocess model. These were scoped
for a prior cleanup issue (#116) but survived its closure.

src/providers/github-copilot-token.ts + src/providers/github-copilot-token.test.ts (2 files)

GitHub Copilot token management. Zero production callers — same rationale as above.
Also survived closure of #116.

Tasks

  • Delete .pi/ directory (5 files)
  • Delete packages/clawdbot/ directory (3 files)
  • Delete packages/moltbot/ directory (3 files)
  • Update pnpm-workspace.yaml to remove packages/* entry
  • Replace CHANGELOG.md with fresh RemoteClaw changelog
  • Delete scripts/sync-plugin-versions.ts
  • Delete src/agents/pi-auth-json.ts + test
  • Delete src/agents/pi-settings.ts + test
  • Delete src/agents/shell-utils.ts + test
  • Delete src/cli/clawbot-cli.ts
  • Delete src/cli/docs-cli.ts
  • Delete src/commands/onboard-hooks.ts + test
  • Delete src/providers/github-copilot-models.ts + test
  • Delete src/providers/github-copilot-token.ts + test
  • Remove imports of deleted files from surviving code (barrel re-exports, test helpers)
  • Verify pnpm build passes
  • Verify pnpm test passes

Acceptance Criteria

  • All 27 dead files listed above are deleted
  • pnpm-workspace.yaml no longer references packages/*
  • CHANGELOG.md is a fresh RemoteClaw changelog (not OpenClaw history)
  • No dangling imports referencing deleted files remain in the codebase
  • pnpm build passes
  • pnpm test passes

Notes

  • All files were verified to have zero production callers via grep against the full
    codebase. Files with "test-only callers" means the only import is from their own
    co-located test file — deleting both simultaneously is safe.
  • The 4 github-copilot-* files were originally scoped for Dead code: src/process/supervisor/ and src/providers/ cleanup #116 but survived that
    issue's closure. They are included here to ensure they don't slip through again.
  • This is cleanup work — all files are inert dead code. The primary motivation is
    preventing unnecessary rebrand effort on files that should not exist.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions