Context
RemoteClaw is middleware that delegates LLM execution to CLI agents (Claude Code, Gemini, Codex, OpenCode). The pre-fork embedded execution path was gutted during early milestones. Scattered test files and documentation pages still reference obsolete LLM-level concepts (provider selection, model catalogs, thinking-level config, mocks of the removed embedded runner).
Problem
Orphan tests
runEmbeddedPiAgent is the primary function of the gutted embedded execution engine. Verification:
# Production imports of the function:
rg "import.*runEmbeddedPiAgent|from.*pi-embedded" src/ --type ts | grep -v "\.test\." | grep -v "\.cases\."
# No hits. Zero production imports.
# Tests that mock or reference it:
rg "runEmbeddedPiAgent" src/ --type ts
Known files to audit:
src/commands/agent.test.ts — thinking merge tests (expectDefaultThinkLevel, "prefers per-model thinking over global thinkingDefault", "defaults thinking to adaptive for Anthropic Claude 4.6 models"). Orphan. (May be removed in a concurrent thinking-gut PR — coordinate.)
src/auto-reply/reply.block-streaming.test.ts — entire file may be orphan (runs against runEmbeddedPiAgent mock). Audit and confirm.
src/auto-reply/reply/agent-runner.runreplyagent.e2e.test.ts — mixed: contains both real agent-runner exercises AND runEmbeddedPiAgentMock assertions. Orphan sections only; keep the live parts.
src/auto-reply/reply.triggers.trigger-handling.filters-usage-summary-current-model-provider.cases.ts — contains expect(runEmbeddedPiAgentMock).not.toHaveBeenCalled() tautologies. Delete tautological assertions, keep whatever real coverage exists.
Onboarding and help-text
The onboarding flow and help pages must not prompt the user for LLM provider selection, model choice, or LLM API keys — those are CLI-agent concerns. The user only configures: channel tokens (Telegram, Slack, WhatsApp, etc.), CLI auth env vars (provider-level env vars consumed by the CLI subprocess), and workspace/session paths.
Scope to audit:
docs/ directory
README.md at repo root
src/**/* help strings, onboarding prompts, wizard flows, CLI --help output
- Translations (if any): search for the same concepts in
docs/**/*-fr.md, -de.md, etc.
Grep patterns (case-insensitive):
rg -i "provider.*select|model.*picker|api.?key.*(anthropic|openai|google)" docs/ src/
rg -i "choose.*(provider|model)" docs/ src/
rg -i "thinking.?level|thinking.?default" docs/ src/
Tasks
Phase 1: Audit + clean tests
Phase 2: Audit onboarding + docs
Phase 3: Verification
Acceptance Criteria
rg "runEmbeddedPiAgent" src/ returns zero hits, or hits only in a single intentional stub-detection file with clear commentary
- Grep of
docs/ and onboarding sources for obsolete LLM concepts returns no OBSOLETE or STALE matches (LEGITIMATE channel/auth matches are fine)
tsc --noEmit clean
- Test suite passes with a smaller test count (orphans removed) and no new skipped tests
Context
RemoteClaw is middleware that delegates LLM execution to CLI agents (Claude Code, Gemini, Codex, OpenCode). The pre-fork embedded execution path was gutted during early milestones. Scattered test files and documentation pages still reference obsolete LLM-level concepts (provider selection, model catalogs, thinking-level config, mocks of the removed embedded runner).
Problem
Orphan tests
runEmbeddedPiAgentis the primary function of the gutted embedded execution engine. Verification:Known files to audit:
src/commands/agent.test.ts— thinking merge tests (expectDefaultThinkLevel, "prefers per-model thinking over global thinkingDefault", "defaults thinking to adaptive for Anthropic Claude 4.6 models"). Orphan. (May be removed in a concurrent thinking-gut PR — coordinate.)src/auto-reply/reply.block-streaming.test.ts— entire file may be orphan (runs againstrunEmbeddedPiAgentmock). Audit and confirm.src/auto-reply/reply/agent-runner.runreplyagent.e2e.test.ts— mixed: contains both real agent-runner exercises ANDrunEmbeddedPiAgentMockassertions. Orphan sections only; keep the live parts.src/auto-reply/reply.triggers.trigger-handling.filters-usage-summary-current-model-provider.cases.ts— containsexpect(runEmbeddedPiAgentMock).not.toHaveBeenCalled()tautologies. Delete tautological assertions, keep whatever real coverage exists.Onboarding and help-text
The onboarding flow and help pages must not prompt the user for LLM provider selection, model choice, or LLM API keys — those are CLI-agent concerns. The user only configures: channel tokens (Telegram, Slack, WhatsApp, etc.), CLI auth env vars (provider-level env vars consumed by the CLI subprocess), and workspace/session paths.
Scope to audit:
docs/directoryREADME.mdat repo rootsrc/**/*help strings, onboarding prompts, wizard flows, CLI--helpoutputdocs/**/*-fr.md,-de.md, etc.Grep patterns (case-insensitive):
Tasks
Phase 1: Audit + clean tests
runEmbeddedPiAgentmock or similar gutted paths)agent-runner.runreplyagent.e2e.test.ts), extract the live parts and delete therunEmbeddedPiAgent-mock sectionsexpect(runEmbeddedPiAgentMock).not.toHaveBeenCalled()is vacuously true since the function is imported nowhere)rg "runEmbeddedPiAgent" src/ --type tsreturns zero hits (or only intentional stub-detection references)Phase 2: Audit onboarding + docs
docs/andsrc/for each pattern in the "Grep patterns" section abovePhase 3: Verification
Acceptance Criteria
rg "runEmbeddedPiAgent" src/returns zero hits, or hits only in a single intentional stub-detection file with clear commentarydocs/and onboarding sources for obsolete LLM concepts returns no OBSOLETE or STALE matches (LEGITIMATE channel/auth matches are fine)tsc --noEmitclean