Codex Parity Repair
Use this workflow when skills/<name>/SKILL.md is canonically correct but
skills-codex/<name>/SKILL.md has drifted into bad Codex UX in the checked-in runtime artifact.
Principles
skills/<name>/SKILL.mdremains the canonical workflow contract.skills-codex/<name>/is the generated checked-in Codex runtime artifact; repair its owner and regenerate.- Durable Codex-only body edits that should survive broader refactors belong in
skills-codex-overrides/<name>/SKILL.md. - Codex operator-layer prompt edits belong in
skills-codex-overrides/<name>/prompt.md.
Audit First
Run:
bash scripts/audit-codex-parity.shOr target one skill:
bash scripts/audit-codex-parity.sh --skill swarmThe audit flags the failure classes that Codex maintenance keeps missing today:
- Claude-era task primitives
- Claude-only backend reference names and team terminology
- duplicated runtime phrases created by blind search/replace
Repair Loop
For each flagged skill:
- Read
skills/<name>/SKILL.mdto confirm whether the canonical contract is correct. - Read
skills-codex/<name>/SKILL.mdto see the broken checked-in Codex body. - Read
skills-codex-overrides/<name>/prompt.mdandskills-codex-overrides/catalog.json. - If the source contract is wrong, fix
skills/<name>/SKILL.mdfirst. - If the shipped Codex artifact is wrong, repair canonical source or the owning generator, then run
scripts/regen-all.sh. Do not hand-edit the projection. - If the source is correct but Codex needs a durable tailoring layer, create or update
skills-codex-overrides/<name>/SKILL.md. - Re-run validation:
bash scripts/audit-codex-parity.shbash scripts/validate-codex-generated-artifacts.sh --scope worktreebash scripts/validate-codex-override-coverage.sh
LLM Repair Guidance
When doing the actual rewrite, the LLM should:
- preserve the behavior contract from
skills/<name>/SKILL.md - remove Claude-only primitive/tool names from the Codex body
- replace mechanical rewrites with real Codex-native instructions
- keep durable Codex-only delta in
skills-codex-overrides/<name>/SKILL.mdwhen it should remain distinct from the checked-in artifact
If a skill keeps needing Codex-only body surgery, update
skills-codex-overrides/catalog.json so the treatment matches reality instead
of pretending the skill is still parity-only.