|
| 1 | +# Upstream Parity Audit - 2026-07-07 |
| 2 | + |
| 3 | +## Scope |
| 4 | + |
| 5 | +Audit target: the live `/Users/yongatron/Development/Codex-Game-Studios` |
| 6 | +workspace on `main`, including uncommitted local edits. |
| 7 | + |
| 8 | +Baseline upstream: `upstream/main` at |
| 9 | +`984023ddac0d5e27624f2baacde6105e45de375f`, extracted to: |
| 10 | + |
| 11 | +`/private/tmp/ccgs-parity-audit-20260707/upstream-984023d.5UnXhO` |
| 12 | + |
| 13 | +Current committed base: `cd39a3fb8484afdb9bb592f36106c8d326d10d13`. |
| 14 | + |
| 15 | +Dirty overlay included in this audit: |
| 16 | + |
| 17 | +- `.agents/skills/skill-test/SKILL.md` |
| 18 | +- `.codex/docs/coordination-rules.md` |
| 19 | +- `.codex/docs/director-gates.md` |
| 20 | +- `.codex/lib/validate_runtime.py` |
| 21 | +- `AGENTS.md` |
| 22 | +- `CCGS Skill Testing Framework/skills/authoring/design-system.md` |
| 23 | +- `CHANGELOG.md` |
| 24 | +- `production/test-evidence/latest.md` |
| 25 | + |
| 26 | +Non-goals for this pass: |
| 27 | + |
| 28 | +- No runtime/source fixes. |
| 29 | +- No metadata/version bump. |
| 30 | +- No install/deploy/release work. |
| 31 | +- No commit or push. |
| 32 | + |
| 33 | +## Summary Verdict |
| 34 | + |
| 35 | +The Codex tree is broadly mapped and validates cleanly against the manifest and |
| 36 | +runtime checks. The role-agent delegation-consent edits in the live dirty |
| 37 | +overlay are consistent with the current Codex contract: skill invocation |
| 38 | +authorizes declared role-agent spawns after review-mode filtering, while file |
| 39 | +writes, commits, pushes, design decisions, game-feel, and balance decisions |
| 40 | +still require the normal approvals. |
| 41 | + |
| 42 | +The highest-risk parity gap is not missing files. It is a workflow-boundary |
| 43 | +regression: automatic read-only phases can be turned into user-selected "Next |
| 44 | +action" prompts by the newer global closeout contract. Upstream and current |
| 45 | +`design-system` both say self-checks, registry candidate scans, readbacks, and |
| 46 | +status reads run automatically. They ask only before mutating registry/index |
| 47 | +files. If the UI screenshots showed the agent asking the user to approve |
| 48 | +"Self-Check" or "registry scan" as a next action, that is Codex closeout |
| 49 | +friction, not upstream behavior. |
| 50 | + |
| 51 | +## Comparison Matrix |
| 52 | + |
| 53 | +| Surface | Upstream baseline | Current Codex target | Classification | Notes | |
| 54 | +| --- | ---: | ---: | --- | --- | |
| 55 | +| Role agents | 49 `.claude/agents/*.md` | 49 `.codex/agents/*.toml` | expected Codex adaptation | Exact hyphenated role names preserved. | |
| 56 | +| Agent memory | 1 explicit upstream memory plus 16 memory metadata declarations | 17 `.codex/agent-memory/*/MEMORY.md` | intentional Codex extension | Repo-local memory contracts avoid writing global Codex memory. | |
| 57 | +| Skills | 73 upstream skills | 73 ported skills plus 4 Codex-only support skills | expected adaptation + extension | New skills: `studio-status`, `studio-next`, `handoff`, `resume-from-handoff`. | |
| 58 | +| Hooks | 12 upstream hooks | 11 ported hooks plus `studio-status-on-start.sh` | expected adaptation | `notify.sh` is not installed because Codex has no project `Notification` event. | |
| 59 | +| Path rules | 11 upstream `.claude/rules/*.md` plus nested `CLAUDE.md` guidance | 15 `.codex/instructions/path-rules/*.md` plus `settings.rules` | expected adaptation | Path authoring rules are separated from command approval rules. | |
| 60 | +| Docs/templates | 23 upstream non-template `.claude/docs`, 40 templates, shared root docs | `.codex/docs/**`, `.codex/docs/templates/**`, shared docs | expected adaptation | Runtime docs validate; shared provenance docs retain intentional Claude references. | |
| 61 | +| Testing framework | 49 agent specs, 72 skill specs, 2 templates | 49 agent specs, 73 skill specs, 2 templates | intentional Codex extension | Current adds one skill spec beyond upstream and updates design-system gate expectations. | |
| 62 | +| Continuity | Upstream Claude session files and statusline behavior | `active.md`, `$handoff`, `$resume-from-handoff`, `$studio-status`, status-line fallback | intentional Codex extension | Useful, but closeout routing needs sharper phase-boundary rules. | |
| 63 | +| Install/release | Upstream package history | `.codex/install.sh`, `.codex/uninstall.sh`, `.codex/release.sh`, manifests | intentional Codex extension | Release flow is explicitly maintainer-run with namespaced tags. | |
| 64 | +| Public docs | Shared upstream docs | Shared docs plus Codex docs | mostly expected, one stale term | `docs/COLLABORATIVE-DESIGN-PRINCIPLE.md` still says "Task subagent" once. | |
| 65 | + |
| 66 | +Manifest counts observed: |
| 67 | + |
| 68 | +- `upstream-assets.json`: 417 entries. |
| 69 | +- `expected-targets.json`: 412 entries. |
| 70 | +- Missing expected target files: 0. |
| 71 | +- Upstream mappings without one physical path: 2 status/config mappings that |
| 72 | + intentionally split across `.codex/config.toml`, `.codex/rules/settings.rules`, |
| 73 | + and `$studio-status`. |
| 74 | + |
| 75 | +## Findings |
| 76 | + |
| 77 | +### P1 - Automatic Read-Only Phases Can Be Misrouted As User-Approved Next Actions |
| 78 | + |
| 79 | +Classification: suspect behavior regression. |
| 80 | + |
| 81 | +Upstream evidence: |
| 82 | + |
| 83 | +- Upstream `design-system` Phase 5a says to read back the complete GDD and verify |
| 84 | + required sections, formulas, edge cases, dependencies, and acceptance criteria |
| 85 | + automatically. |
| 86 | +- Upstream Phase 5b says to scan the completed GDD for registry candidates, grep |
| 87 | + the registry for existing candidates, and present a summary before asking for a |
| 88 | + registry write. |
| 89 | +- The upstream permission prompt appears at: |
| 90 | + `Ask: "May I update design/registry/entities.yaml..."`. |
| 91 | + |
| 92 | +Current Codex evidence: |
| 93 | + |
| 94 | +- Current `design-system` preserves the same automatic self-check at |
| 95 | + `.agents/skills/design-system/SKILL.md:680`. |
| 96 | +- Current registry candidate discovery and grep are still automatic at |
| 97 | + `.agents/skills/design-system/SKILL.md:706-728`. |
| 98 | +- Current permission remains correctly placed at |
| 99 | + `.agents/skills/design-system/SKILL.md:730-731`. |
| 100 | +- The global closeout contract requires every discrete work-unit final response |
| 101 | + to end with a numbered next action at `AGENTS.md:34-40` and again in the |
| 102 | + continuity epilogue at `AGENTS.md:237-243`. |
| 103 | +- `design-system` itself now contains a local contradiction: Phase 5f says a |
| 104 | + single clear lane can be stated directly without an unnecessary prompt |
| 105 | + (`.agents/skills/design-system/SKILL.md:791-794`), but its Closeout Contract |
| 106 | + says every final response must use the numeric `Next action:` prompt even for |
| 107 | + one valid lane (`.agents/skills/design-system/SKILL.md:890-905`). |
| 108 | + |
| 109 | +Interpretation: |
| 110 | + |
| 111 | +The screenshot behavior where an agent asks the user to choose a read-only |
| 112 | +"Self-Check" or registry-candidate scan is not faithful to upstream. Read-only |
| 113 | +continuation phases inside an invoked workflow should run. Permission is needed |
| 114 | +when the workflow reaches a mutation: registry write, systems-index write, |
| 115 | +review-log append, durable artifact edit, commit, push, or branch operation. |
| 116 | + |
| 117 | +Remediation target: |
| 118 | + |
| 119 | +- Add an explicit "phase continuation vs work-unit closeout" rule to `AGENTS.md` |
| 120 | + and `.codex/docs/session-continuity.md`. |
| 121 | +- In skills, say that automatic read-only phases are not valid final |
| 122 | + `Next action` options while the invoked workflow is still in progress. |
| 123 | +- Add a validation fixture that rejects closeout menus offering internal |
| 124 | + read-only phases such as `Self-Check`, registry scan, candidate discovery, |
| 125 | + readback, or context gathering as user-approved next actions. |
| 126 | + |
| 127 | +### P1 - Design-Review Post-Revision Flow Is Upstream-Faithful, But Vulnerable To Generic Closeout Injection |
| 128 | + |
| 129 | +Classification: suspect behavior regression in orchestration, not in the direct |
| 130 | +`design-review` port. |
| 131 | + |
| 132 | +Upstream evidence: |
| 133 | + |
| 134 | +- Upstream `design-review` uses a post-revision closing widget after blockers are |
| 135 | + resolved, with options to re-review in a new session, accept revisions and mark |
| 136 | + approved, move to the next system, or stop. |
| 137 | +- Upstream then asks separately for tracking mutations: systems-index update and |
| 138 | + review-log append. |
| 139 | +- The final widget is shown only after those tracking widgets are answered. |
| 140 | + |
| 141 | +Current Codex evidence: |
| 142 | + |
| 143 | +- Current `design-review` preserves that structure with Codex wording: |
| 144 | + `.agents/skills/design-review/SKILL.md:185-264`. |
| 145 | +- The post-revision widget is at |
| 146 | + `.agents/skills/design-review/SKILL.md:202-212`. |
| 147 | +- Systems-index and review-log permission prompts are at |
| 148 | + `.agents/skills/design-review/SKILL.md:226-232`. |
| 149 | +- Final project-state read and dynamic next options are at |
| 150 | + `.agents/skills/design-review/SKILL.md:246-264`. |
| 151 | +- No `Self-Check` text exists in current `design-review`. |
| 152 | + |
| 153 | +Interpretation: |
| 154 | + |
| 155 | +If a self-check lane appears after a design-review revision, it is not coming |
| 156 | +from upstream `design-review` or the direct Codex port. The likely sources are |
| 157 | +generic closeout routing, stale `production/session-state/active.md` worklist |
| 158 | +content, or an agent applying another skill's validation phase after the |
| 159 | +design-review widget. The fix should not remove the post-revision widget; it |
| 160 | +should keep it authoritative until the review-log/systems-index prompts are |
| 161 | +complete. |
| 162 | + |
| 163 | +Remediation target: |
| 164 | + |
| 165 | +- Mark `design-review` Phase 5 widgets as workflow-owned until tracking prompts |
| 166 | + finish. |
| 167 | +- Ensure `Session Worklist` recommendations contain follow-on lanes or owed |
| 168 | + verification, not internal phases from the current skill. |
| 169 | +- Add a targeted skill-test fixture for post-revision review closeout. |
| 170 | + |
| 171 | +### P2 - Runtime Validators Prove Static Conversion, Not The Read/Write Boundary |
| 172 | + |
| 173 | +Classification: testing gap. |
| 174 | + |
| 175 | +Current evidence: |
| 176 | + |
| 177 | +- `python3 .codex/lib/validate_manifest.py`: pass. |
| 178 | +- `python3 .codex/lib/validate_runtime.py --kind docs`: pass. |
| 179 | +- `python3 .codex/lib/validate_runtime.py --kind skills`: pass. |
| 180 | +- `./.codex/audit.sh all`: pass. |
| 181 | +- `validate_runtime.py` rejects raw `.claude/`, `CLAUDE.md`, |
| 182 | + `AskUserQuestion`, raw `Task`, and duplicate delegation-consent fallback |
| 183 | + patterns. |
| 184 | + |
| 185 | +Interpretation: |
| 186 | + |
| 187 | +The validation suite correctly catches many static porting errors, but it does |
| 188 | +not yet model the behavioral contract that read-only phases run automatically |
| 189 | +while mutating phases ask. That is why the screenshot friction can exist while |
| 190 | +the audit suite stays green. |
| 191 | + |
| 192 | +Remediation target: |
| 193 | + |
| 194 | +- Extend `$skill-test` and `validate_runtime.py` with behavioral assertions for |
| 195 | + read-only phase continuity. |
| 196 | +- Add focused fixtures for `design-system` Phase 5 and `design-review` Phase 5. |
| 197 | + |
| 198 | +### P2 - Design-Review Does Not Inline The Codex Path-Rule Reminder Before Its Mutations |
| 199 | + |
| 200 | +Classification: missing/stale Codex adaptation. |
| 201 | + |
| 202 | +Current evidence: |
| 203 | + |
| 204 | +- `AGENTS.md` requires reading path rules before creating or editing matching |
| 205 | + paths. |
| 206 | +- `design-review` may mutate `design/gdd/systems-index.md` and |
| 207 | + `design/gdd/reviews/[doc-name]-review-log.md`. |
| 208 | +- Unlike `design-system`, `design-review` does not start with a reminder to read |
| 209 | + `.codex/instructions/path-rules/design-directory.md` and |
| 210 | + `.codex/instructions/path-rules/design-docs.md`. |
| 211 | + |
| 212 | +Interpretation: |
| 213 | + |
| 214 | +This is partly covered by root instructions, but high-traffic mutation skills |
| 215 | +should make their path-rule dependency explicit. It is not an upstream behavior |
| 216 | +gap because upstream had no Codex path-rule surface. |
| 217 | + |
| 218 | +Remediation target: |
| 219 | + |
| 220 | +- Add a short preamble to `design-review` before Phase 1 or before Phase 5 |
| 221 | + mutations instructing agents to read the relevant design path rules before |
| 222 | + writes. |
| 223 | +- Consider adding the same validator check for every skill that writes into |
| 224 | + a path-scoped directory. |
| 225 | + |
| 226 | +### P3 - Design-Review Retains An Inherited Option-Name Mismatch |
| 227 | + |
| 228 | +Classification: inherited upstream behavior. |
| 229 | + |
| 230 | +Evidence: |
| 231 | + |
| 232 | +- Current `design-review` parses `--depth [full|lean|solo]` at |
| 233 | + `.agents/skills/design-review/SKILL.md:8-14`. |
| 234 | +- The full-review notice still says "Use `--review lean`" at |
| 235 | + `.agents/skills/design-review/SKILL.md:205`. |
| 236 | +- Upstream has the same mismatch: it parses `--depth` but says |
| 237 | + `/design-review ... --review lean`. |
| 238 | + |
| 239 | +Interpretation: |
| 240 | + |
| 241 | +This is not a Codex regression, but it can confuse users because `--review` |
| 242 | +means global director-gate review mode in other skills, while `design-review` |
| 243 | +uses `--depth` for its own analysis mode. |
| 244 | + |
| 245 | +Remediation target: |
| 246 | + |
| 247 | +- Change the notice to `--depth lean`. |
| 248 | +- Add a testing-framework assertion that `design-review` user-facing examples |
| 249 | + use `--depth`, not `--review`. |
| 250 | + |
| 251 | +### P3 - One Shared Public Doc Still Uses Claude-Era Delegation Vocabulary |
| 252 | + |
| 253 | +Classification: stale port wording. |
| 254 | + |
| 255 | +Evidence: |
| 256 | + |
| 257 | +- `docs/COLLABORATIVE-DESIGN-PRINCIPLE.md:379` says "Task subagent". |
| 258 | +- The same doc otherwise uses Codex-neutral `numbered choice prompt` wording. |
| 259 | + |
| 260 | +Interpretation: |
| 261 | + |
| 262 | +This is low risk because runtime skills and validators reject raw `Task` in the |
| 263 | +active skill set. It is still worth cleaning because `AGENTS.md` points to this |
| 264 | +doc as the full collaboration protocol. |
| 265 | + |
| 266 | +Remediation target: |
| 267 | + |
| 268 | +- Replace "Task subagent" with "Codex subagent delegation" or "subagent". |
| 269 | + |
| 270 | +## Confirmed Expected Adaptations |
| 271 | + |
| 272 | +- Claude `Task` delegation is normalized to Codex subagent delegation by exact |
| 273 | + hyphenated role name. |
| 274 | +- Claude `AskUserQuestion` is normalized to numbered prompts or short-token |
| 275 | + fallback choices. |
| 276 | +- `.claude` runtime paths are not runtime dependencies for Codex files. |
| 277 | +- `notify.sh` is intentionally not wired because Codex lacks a project |
| 278 | + `Notification` lifecycle hook. |
| 279 | +- The active dirty overlay correctly removes duplicate role-agent spawn-consent |
| 280 | + fallbacks and adds validation coverage for reintroductions. |
| 281 | +- Handoff/resume exceptions are Codex-specific and intentionally authorize only |
| 282 | + their declared continuity file writes and, for `$handoff`, the standard |
| 283 | + handoff commit/push workflow. |
| 284 | +- Release/install tooling is Codex-only extension work. It is outside upstream |
| 285 | + parity and should remain maintainer-explicit. |
| 286 | + |
| 287 | +## Screenshot Behaviors |
| 288 | + |
| 289 | +1. "Run Self-Check" offered as a user-selected next action: |
| 290 | + - Verdict: suspect Codex closeout regression. |
| 291 | + - Correct behavior: run the self-check automatically inside `design-system` |
| 292 | + Phase 5a, then proceed to the next workflow phase. |
| 293 | + - Do not ask until the workflow reaches a mutation or a genuine stop/next |
| 294 | + skill choice. |
| 295 | + |
| 296 | +2. "Scan/update registry candidates" offered before candidate discovery: |
| 297 | + - Verdict: suspect Codex closeout regression if the prompt is for scanning; |
| 298 | + correct if the prompt is for writing. |
| 299 | + - Correct behavior: scan and summarize candidates automatically; ask |
| 300 | + "May I update `design/registry/entities.yaml`..." only after the summary. |
| 301 | + |
| 302 | +## Priority Fix Queue |
| 303 | + |
| 304 | +1. Fix closeout semantics: |
| 305 | + - Clarify that final `Next action` prompts apply at true pause/closeout |
| 306 | + boundaries, not before automatic read-only continuation phases in the |
| 307 | + active workflow. |
| 308 | + - Target files: `AGENTS.md`, `.codex/docs/session-continuity.md`, and |
| 309 | + high-traffic skill closeout sections. |
| 310 | + |
| 311 | +2. Add behavioral closeout tests: |
| 312 | + - Target `design-system` Phase 5 self-check/registry scan and `design-review` |
| 313 | + Phase 5 post-revision tracking prompts. |
| 314 | + - Target files: `.agents/skills/skill-test/SKILL.md`, |
| 315 | + `.codex/lib/validate_runtime.py`, and relevant framework specs. |
| 316 | + |
| 317 | +3. Make `design-review` path-rule handling explicit: |
| 318 | + - Add design path-rule reads before Phase 5 writes. |
| 319 | + |
| 320 | +4. Clean inherited/stale wording: |
| 321 | + - `design-review`: `--review lean` -> `--depth lean`. |
| 322 | + - `docs/COLLABORATIVE-DESIGN-PRINCIPLE.md`: `Task subagent` -> Codex subagent |
| 323 | + wording. |
| 324 | + |
| 325 | +## Verification |
| 326 | + |
| 327 | +Pre-report validation: |
| 328 | + |
| 329 | +```text |
| 330 | +python3 .codex/lib/validate_manifest.py |
| 331 | +status: pass |
| 332 | +
|
| 333 | +python3 .codex/lib/validate_runtime.py --kind docs |
| 334 | +status: pass |
| 335 | +
|
| 336 | +python3 .codex/lib/validate_runtime.py --kind skills |
| 337 | +status: pass |
| 338 | +
|
| 339 | +./.codex/audit.sh all |
| 340 | +manifest: pass |
| 341 | +runtime: pass |
| 342 | +hooks: pass |
| 343 | +config: pass |
| 344 | +coexistence: pass |
| 345 | +smoke-headless: pass |
| 346 | +``` |
| 347 | + |
| 348 | +Post-report validation: |
| 349 | + |
| 350 | +```text |
| 351 | +python3 .codex/lib/validate_manifest.py |
| 352 | +status: pass |
| 353 | +
|
| 354 | +python3 .codex/lib/validate_runtime.py --kind docs |
| 355 | +status: pass |
| 356 | +
|
| 357 | +python3 .codex/lib/validate_runtime.py --kind skills |
| 358 | +status: pass |
| 359 | +
|
| 360 | +./.codex/audit.sh all |
| 361 | +manifest: pass |
| 362 | +runtime: pass |
| 363 | +hooks: pass |
| 364 | +config: pass |
| 365 | +coexistence: pass |
| 366 | +smoke-headless: pass |
| 367 | +``` |
| 368 | + |
| 369 | +## Scratch Evidence |
| 370 | + |
| 371 | +Scratch directory: |
| 372 | + |
| 373 | +`/private/tmp/ccgs-parity-audit-20260707/` |
| 374 | + |
| 375 | +Key evidence artifacts: |
| 376 | + |
| 377 | +- `upstream-984023d.5UnXhO/`: extracted upstream tree. |
| 378 | +- `evidence-summary.md`: compact command/evidence summary for this audit. |
0 commit comments