Refactoring Plan
April 25, 2026 ยท View on GitHub
Audit source: 3331324cb14d2b80dd8dfb424619870a88476706 | Generated: 2026-04-25T12:45:33+08:00 | Scope: refactoring plan
Refactoring Plan
The old RC-1 and RC-2 recommendations are complete:
- RC-1: tool handlers are extracted to
lib/tools/codex-*.ts. - RC-2: storage is split behind the
lib/storage.tsfacade. - RC-7: account manager is a slim orchestrator over
lib/accounts/*.
Current incremental plan:
- Keep request-pipeline changes focused; do not split
fetch-helpers.tsorrequest-transformer.tswithout behavior-driven tests. - Add package-smoke automation for
npm packin a later PR. - Raise branch coverage floors only after focused tests cover the remaining request, UI, and legacy
index.tsbranches. - Keep current-structure parity tests updated whenever tool count or registry shape changes.