mirror of
https://github.com/EveryInc/compound-engineering-plugin.git
synced 2026-06-19 15:41:46 +02:00
51ecd9b98f
In cleanupLegacyAgentSkillDirs, re-add the branch that extracts the
final segment after `-ce-` from a compound agent name and seeds
`ce-<final-segment>` as a legacy-cleanup candidate. The branch was
removed in 25f1c8b9 as dead code for compound-engineering itself, but
it's load-bearing for nested-layout third-party plugins passed through
the CLI: their agent names keep the `<category>-ce-<name>` shape, and
without the split a stale `~/.codex/skills/<plugin>/ce-<name>/`
directory from a prior flat-alias install is never swept. For
compound-engineering the branch remains inert (names don't contain
embedded `-ce-`), so this is purely additive coverage for other shapes.
Guard the split on `agent.name.includes("-ce-")` so no-op candidates
are not seeded for flat-only layouts. Add a comment naming the
cross-layout-migration intent so the branch isn't flagged as dead code
again. Regression test in tests/codex-writer.test.ts pins the behavior
against a nested-layout bundle.
Addresses PR #621 review feedback.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>