parity_only twins are GENERATED by codex-sync and verified by its byte-exact
drift gate; re-checking content rules on generated artifacts is the whack-a-mole.
lint-codex-native, runtime-sections, api-conformance, audit-parity, and
generated-artifacts now skip parity twins (treatment != bespoke) and check
hand-authored bespoke twins + the override layer only. A generated artifact is
verified by regenerate-and-diff, not by re-checking content rules.
Verified: bespoke Claude-isms still caught; parity twins with accurate cross-runtime
content (cass/cc-hooks) no longer trip the gates.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
age-yxl gated source references/** divergence but left SKILL.md-body divergence
ungated (the residual it filed). Same silent-staleness: a source SKILL.md body
edit with a stale twin is masked by a regen hash bump.
validate-codex-generated-artifacts.sh now requires a real non-marker twin
content change when a source SKILL.md *body* changed — scoped to the BODY on
purpose: frontmatter-only edits (hex-wiring fields the twin never carries:
consumes/produces/hexagonal_role/context_rel) need no twin change and stay green,
so legit hex-wiring pushes don't red main. Body-vs-frontmatter is detected by
comparing the frontmatter-stripped body across the scope's base ref
(head: HEAD~1..HEAD; worktree: HEAD..working; staged/upstream handled);
conservative — any ambiguity (new file, unresolved base) requires the twin.
TEST: 3 new cases — body divergence FAILs under both worktree and head scopes,
frontmatter-only change PASSes. Verified both FAIL tests fail against the
unfixed gate (guard the regression). Real-skill smoke: frontmatter-strip yields
the correct body on discovery/rpi/skill-builder.
Closes-scenario: age-j1g#skillmd-body-gate
Bounded-context: BC2-Skills
Evidence: tests/scripts/test-codex-generated-artifacts.sh
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
PROBE (evidence, not inspection): built the post-mortem divergent state in a
worktree — edited skills/discovery/references/dag.md, ran regen-codex-hashes
(twin left stale), committed, ran both gates. check-codex-parity-drift.sh and
validate-codex-generated-artifacts.sh BOTH passed (exit 0). The audit is a
Claude-ism scanner that never reads source; the structural source->codex check
was satisfied by the regen marker bump alone (a counterfactual source-only
commit with zero codex files DID fail, proving the mechanism). Verdict: the
gate does NOT catch content divergence.
FIX (routed to the gate, per the verdict): validate-codex-generated-artifacts.sh
now requires a REAL twin content change to mirror a source references/** edit —
the generated .agentops-generated.json / .agentops-manifest.json bookkeeping no
longer satisfies the mirror requirement. Scoped to references/** (mirrored
near-verbatim) to avoid false-positiving the legit frontmatter-only/hex-wiring
flow that has no twin equivalent.
TEST: two new cases in test-codex-generated-artifacts.sh — divergence (regen
hash bump only) FAILs, mirrored edit PASSes. Verified the divergence test FAILs
against the unfixed gate (guards the regression) and PASSes against the fix.
DOCS: skill-builder/SKILL.md, AGENTS-CODEX.md, CLAUDE.md registry section now
state that editing an EXISTING skill needs a manual twin mirror (regen refreshes
hashes, not prose) — prior docs only warned about NEW skills. Dogfooded: this
commit's skill-builder edit is mirrored into its codex twin.
Closes-scenario: age-yxl#probe-and-gate-fix
Bounded-context: BC2-Skills
Evidence: .agents/learnings/2026-06-16-codex-twin-content-not-auto-mirrored.md
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The sync script overwrites manual edits to skills-codex/. Since codex
skills are now manually maintained, this script is a footgun.
Changes:
- sync-codex-native-skills.sh: exits with error + deprecation message
- validate-codex-generated-artifacts.sh: removed parity drift enforcement
(lines 138-186 that required source+codex to change together)
- install-codex.sh: skip sync call (skills-codex/ pre-built in bundle)
- install-codex-native-skills.sh: skip sync by default
Audit for drift manually: bash scripts/audit-codex-parity.sh