Ship Codex skills through the scaffold lifecycle#1197
Conversation
Architect Integration Review — REQUEST CHANGESHigh-risk review performed against upstream Verified
Required changes
After these are pushed, please rerun the parity/lifecycle tests plus the CLI integration suite and notify me for focused re-review. Do not merge; the Architect integration review |
Architect review correctionWithdraw required-change item 2 from my prior review. Do not modify any Only the CI-active fresh-init coverage and current scope wording items remain active. Architect integration review correction |
Architect focused re-review — one wording fix remainsVerified commit
One small correction remains in both the review artifact and synced PR body. The new sentence is ungrammatical:
Use, for example:
Please commit that review-only fix and re-sync the PR body. Do not touch Architect focused integration re-review |
Architect focused re-review — APPROVEVerified commit
No integration blockers remain. GitHub checks were retriggered by the prose-only commit and are currently running; they must remain green. The human-only Architect integration review |
|
PR is ready for review @waleedkadous @amrmelsayed |
PIR Review: Ship Codex Skills Through the Scaffold Lifecycle
Fixes #1196
Summary
Codev now ships a Codex-native skill tree alongside its Claude skill tree and
materializes both during init, adopt, and update. Existing skill directories
remain user-owned, while recursive parity tests prevent the two provider trees
from silently drifting.
Files Changed
GitHub's canonical PR scope includes the large root
.codex/skills/**additionfrom the contributor commit that preceded PIR initialization; it is part of
the upstream PR because that commit is not on
cluesmith/codev:main..codex/skills/**(+6,558 / -0) — self-hosted Codex mirror.codev-skeleton/.codex/skills/**(+611 / -0) — seven shipped Codex skills..claude/skills/codev/SKILL.mdandcodev-skeleton/.claude/skills/codev/SKILL.md(+4 / -4) — lifecycle andpreservation documentation mirrored into the new Codex trees above.
packages/codev/src/lib/scaffold.ts(+35 / -28) — provider-qualified skillcopy results and per-skill preservation.
packages/codev/src/commands/{init,adopt,update}.ts(+17 / -19) — install,backfill, and report both provider paths.
packages/codev/src/__tests__/{skill-parity,scaffold,init,adopt,update}.test.ts(+178 / -20) — fresh install, preservation, backfill, structured output, and
recursive parity coverage.
AGENTS.mdandCLAUDE.md(+8 / -2) — self-hosted directory map.codev/plans/1196-ship-codex-skills-in-the-skele.md,codev/state/pir-1196_thread.md, and porch state — protocol artifacts.codev/resources/arch.mdandcodev/resources/lessons-learned.md— currentmaterialization architecture and durable parity/preservation guidance.
codev/reviews/1196-ship-codex-skills-in-the-skele.md(+109 / -0) — thisretrospective and PR body.
Per dev-gate feedback,
codev-skeleton/templates/AGENTS.mdandcodev-skeleton/templates/CLAUDE.mdare unchanged from upstream.Commits
25e1a000add.codex/skills/6bb0f58a[PIR Ship Codex skills in the skeleton and scaffold lifecycle #1196] Plan draft743a30e3[PIR Ship Codex skills in the skeleton and scaffold lifecycle #1196] Scaffold Codex skills across lifecyclee854fcf2[PIR Ship Codex skills in the skeleton and scaffold lifecycle #1196] Guard provider skill parity and preservation007d7f46[PIR Ship Codex skills in the skeleton and scaffold lifecycle #1196] Record implementation verificatione2e18dfb[PIR Ship Codex skills in the skeleton and scaffold lifecycle #1196] Keep skeleton instruction templates unchangedPorch-generated phase and gate commits are also retained in branch history.
Test Results
assertions for matching packaged Claude and Codex skills
preserve customized Codex bytes while restoring a missing Codex skill
The full suite was run with isolated
HOMEandTMPDIRbecause the host'sglobal Codex configuration and
/tmp/.gitotherwise alter unrelated harnessand workspace-root tests.
Architecture Updates
Updated the COLD
codev/resources/arch.mdInstallation Architecture section.It now records that provider-native skills are the deliberate exception to
runtime-only framework resolution, describes independent per-provider
materialization/preservation, and names the recursive parity guard. No HOT
change was needed because the existing hot facts already establish the
runtime-resolution and dual-tree rules.
Lessons Learned Updates
Added a COLD documentation lesson to
codev/resources/lessons-learned.md: when provider discovery requires physicalduplicates, compare inventories, paths, and bytes in CI through one explicit
exception allowlist, and preserve customizations at the complete-skill
directory boundary for each provider independently. This is useful reference
guidance but does not displace a HOT lesson.
Things to Look At During PR Review
copySkills()now returns provider-qualified relative paths. Verify init,adopt, and update all consume those paths consistently.
governance files from framework files that continue to resolve at runtime.
skipExistingprotects the complete skill directory independently in eachprovider tree; it intentionally does not merge individual files.
PROVIDER_SPECIFIC_SKILL_EXCEPTIONSstarts empty and exempts a completetop-level skill only when a future provider-specific implementation is
reviewed.
Parity is enforced between providers within each context, not between the
self-hosted and shipped inventories.
baseline already contained contributor commit
25e1a000; GitHub's actualupstream PR scope includes that root Codex mirror.
How to Test Locally
pir-1196→ ReviewDiff.
pnpm --filter @cluesmith/codev-types build && pnpm --filter @cluesmith/codev-core build && pnpm --filter @cluesmith/codev-artifact-canvas build && pnpm --filter @cluesmith/codev buildpnpm --filter @cluesmith/codev exec vitest run src/__tests__/skill-parity.test.ts src/__tests__/scaffold.test.ts src/__tests__/adopt.test.ts src/__tests__/update.test.tspnpm --filter @cluesmith/codev test:e2e:cli.codex/skills/arch-init/SKILL.mdin a temporary adopted project, remove adifferent Codex skill, run the built
codev update --agent, and confirm thecustomized bytes remain while the missing skill is restored and reported in
newFiles.Fixes #1196