Files
Trevin Chow 793c133418 fix(codex): guard flat-skill cleanup + derive cleanup agents root (#616)
Two findings from the Codex review bot's top-level comment:

- Flat Codex skill cleanup now gates on SKILL.md frontmatter-
  description ownership via a new classifyCodexLegacyFlatSkillOwnership
  helper in utils/legacy-cleanup.ts (pure fingerprint, matching the
  prompt classifier pattern). A user-authored ~/.codex/skills/ce-plan/
  sharing a legacy CE name is preserved; CE-emitted flat skills and
  genuinely-orphaned pre-manifest entries still get swept. Three-way
  verdict: ce-owned -> move, foreign -> skip, unknown -> fall through.
- cleanup --target codex now derives its default agentsHome from the
  resolved codexHome via path.dirname(codexHome)/.agents, mirroring
  install's derivation in cleanupLegacyAgentsSkillSymlinks. Symmetric
  between install and cleanup when --codex-home is set outside HOME.
  Explicit --agents-home still wins; default ~/.codex still resolves
  to ~/.agents.
2026-04-20 19:45:07 -07:00
..