.omo/evidence/20260615-codex-legacy-agent-purge/notepad.md
programming: required for TypeScript installer/test changes.remove-ai-slops: requested discipline; use as bounded post-change slop/self-review on changed files.git-master: required for status/diff-first workflow and atomic commit.CODEX_HOME/agents, so the change touches permissions/destructive behavior and user explicitly requires strict verification.<WORKTREE>git status --short empty).fix/lazycodex-final-gate-followup, upstream origin/dev.codex-ultrawork-reviewer.toml during Codex install.[agents.codex-ultrawork-reviewer] config and deletes only the known managed legacy agent file when its contents prove it is managed.CODEX_HOME/agents remain untouched, including a custom codex-ultrawork-reviewer.toml content variant.CODEX_HOME="$(mktemp -d)/codex" node packages/omo-codex/scripts/install-local.mjs install, then inspect $CODEX_HOME/config.toml and $CODEX_HOME/agents.[agents.codex-ultrawork-reviewer] when it points at ./agents/codex-ultrawork-reviewer.toml.CODEX_HOME/agents/codex-ultrawork-reviewer.toml remained after install.name, strict reviewer description, and developer instructions opener) before deleting the filename.packages/omo-codex/src/install/link-cached-plugin-agents.ts is 262 pure LOC after the narrow edit. A proper split would be agent-preservation.ts for reasoning/service-tier capture and retired-agent-purge.ts for cleanup, but I did not broaden this deletion fix into a refactor.bun test packages/omo-codex/src/install/install-codex.test.ts --test-name-pattern 'retired managed reviewer' captured in red-focused-install-test.txt; failed because the legacy TOML still existed.bun test packages/omo-codex/src/install/install-codex-legacy-agent-purge.test.ts captured in green-focused-install-test.txt; 2 pass.bun run build:codex-install captured in build-codex-install.txt; pass.CODEX_HOME install through node packages/omo-codex/scripts/install-local.mjs install --repo-root="$PWD" captured in real-surface-install-local.txt; PASS, real ~/.codex/config.toml hash unchanged.bun test packages/omo-codex/src/install/install-codex-legacy-agent-purge.test.ts packages/omo-codex/src/install/link-cached-plugin-agents.test.ts captured in focused-install-and-agent-tests.txt; 15 pass.bun run test:codex captured in test-codex.txt; pass.bun run packages/shared-skills/skills/programming/scripts/typescript/check-no-excuse-rules.ts packages/omo-codex/src/install/link-cached-plugin-agents.ts packages/omo-codex/src/install/install-codex-legacy-agent-purge.test.ts captured in no-excuse-check.txt; no violations.link-cached-plugin-agents.ts or install-codex-legacy-agent-purge.test.ts.cleanup-receipt.txt.as any, @ts-ignore, @ts-expect-error, non-null assertion, or empty catch introduced.CODEX_HOME/agents.bun run test:codex.link-cached-plugin-agents.ts, keep behavior unchanged, remove trailing whitespace, and commit atomically.red-anti-slop-split-check.txt shows link-cached-plugin-agents.ts at 262 pure LOC with purge constants/function still inline.green-anti-slop-split-check.txt shows link-cached-plugin-agents.ts at 240 pure LOC and retired-managed-agent-purge.ts at 49 pure LOC.baseline-focused-install-tests-before-split.txt passed 20 install/link/surface tests.focused-install-tests-commit-candidate.txt passed 20 tests / 151 assertions.test-codex-after-split.txt passed bun run test:codex.real-surface-install-local-after-split.txt installed into isolated CODEX_HOME, removed the managed retired reviewer TOML, preserved user-custom.toml, enabled omo@sisyphuslabs, left real ~/.codex/config.toml hash unchanged, and cleaned the temp root.diff-check-commit-candidate.txt, loc-check-commit-candidate.txt, and no-excuse-check-commit-candidate.txt passed.