References below to creating nested AGENTS.md path-rule targets describe the
original plan, not the shipped runtime. The implemented architecture uses root
AGENTS.md as the canonical router to .codex/instructions/path-rules/*.md.
This is advisory partial parity because Codex chooses nested instructions from
the session root-to-CWD chain rather than from each file being edited.
Last updated: 2026-07-02 Asia/Shanghai
Review the GLM-5.2 plan in PLAN.md, correct it, and produce an executable Codex-native implementation plan for porting Donchitos/Claude-Code-Game-Studios while preserving behavioral parity and allowing Claude Code and Codex versions to coexist in one game project.
The user explicitly said not to implement the port yet.
The bounded phase plan is saved at:
docs/codex-conversion/phase-plan.md
Phases:
- Upstream inventory.
- GLM plan review and Codex mechanism verification.
- Corrected architecture and full mapping matrix.
- Validation suite and risk register.
- Final executable implementation plan.
Phase 1 is complete.
Saved Phase 1 artifacts:
docs/codex-conversion/phase-plan.mddocs/codex-conversion/upstream-inventory.mddocs/codex-conversion/session-summary.md
Upstream evidence:
- Repository:
https://github.com/Donchitos/Claude-Code-Game-Studios - Branch:
main - Commit:
984023ddac0d5e27624f2baacde6105e45de375f - Local evidence clone:
/private/tmp/ccgs-upstream-phase1
Important Phase 1 verified counts:
- 49 upstream agents in
.claude/agents/*.md - 73 upstream skills in
.claude/skills/<name>/SKILL.md - 12 hook scripts in
.claude/hooks/ - 11 rules in
.claude/rules/*.md - 5
CLAUDE.mdfiles - 40 files under
.claude/docs/templates/ - 49 framework agent specs and 72 framework skill specs under
CCGS Skill Testing Framework/
Phase 2 is complete.
Saved Phase 2 artifacts:
docs/codex-conversion/glm-plan-review.md- initial
docs/codex-conversion/codex-mapping-matrix.md docs/codex-conversion/session-summary.md
Phase 2 verdict:
- The GLM plan is usable with corrections.
- It is unsafe to implement as-is because it has incorrect upstream counts, non-executable Codex config details, and overstated parity claims.
Major Phase 2 corrections:
- Agent model distribution is 44
sonnet, 3opus, 2haiku;prototyperhasmodel: sonnetplusisolation: worktree. - Skill model distribution is 63
sonnet, 3opus, 7haiku; Opus skills arearchitecture-review,gate-check, andreview-all-gdds. - Upstream has 5
CLAUDE.mdfiles, not 6. - Upstream has 40 files under
.claude/docs/templates/, not36 + 3. - The testing framework has 72 skill specs for 73 upstream skills;
vertical-sliceis missing from the framework specs. skill-testalready exists upstream. Withstudio-statusandstudio-next, Codex skill count is 73 ported + 2 new = 75 core skills.- Codex command approval rules belong in
.codex/rules/*.rules, notprefix_rulesin.codex/config.toml. - Codex permission profiles should not be mixed with legacy
sandbox_modein the same active distributable config. - Upstream
.claude/rules/*.mdare path-scoped instructions and should map to nestedAGENTS.md, not Codex command.rules. - Codex
Notificationis not a lifecycle hook event.notify.shmust not be installed as a project hook, but native notification behavior should be documented through user-levelnotifyand[tui]notification settings. - The local cached
codex-game-studiosplugin must not be used as authoritative source;codex plugin listcurrently fails because this workspace lacks a supported marketplace manifest.
Verified Codex mechanisms:
- Codex CLI:
/opt/homebrew/bin/codex - Version:
codex-cli 0.142.5 - Current local model slugs extracted from
codex debug models:gpt-5.5,gpt-5.4,gpt-5.4-mini,gpt-5.3-codex-spark,codex-auto-review - Official docs checked:
AGENTS.md, skills, subagents, hooks, permissions, rules, plugins/build, CLI slash commands, config reference.
Phase 3 is complete.
Saved Phase 3 artifacts:
docs/codex-conversion/corrected-architecture.md- completed
docs/codex-conversion/codex-mapping-matrix.md - completed
docs/codex-conversion/risk-register.md - updated
docs/codex-conversion/session-summary.md
Major Phase 3 decisions:
- Base distribution is repo-local loose files, not plugin-first packaging.
- Claude-owned paths remain untouched:
.claude/**,CLAUDE.md, Claude hooks/settings. - Shared neutral game state remains shared:
production/**,design/**,docs/architecture/**,docs/engine-reference/**,src/**,tests/**,prototypes/**. - Codex-owned runtime files are marker-managed or manifest-owned under
AGENTS.md, nestedAGENTS.md,.agents/skills,.codex/**,.codex/docs/**,.codex/agent-memory/**, and direct upstream-faithful support paths where applicable. Upstream root/shareddocs/**remains a shared neutral project path. - Repo-local skills must be direct folders under
.agents/skills, so the corrected target is.agents/skills/<skill>/SKILL.md. - Project custom agents must be direct TOML files under
.codex/agents, so the corrected target is.codex/agents/<upstream-agent>.toml. - Use upstream names unchanged for skills and custom agents to preserve CCGS behavioral parity and invocation/delegation ergonomics.
- Do not assume project skills suppress same-name user/system/plugin skills. Add a collision audit and require disable-by-path or explicit acceptance if active same-name skills are found.
- Hook scripts use direct upstream filenames under
.codex/hooks/*.shbecause hooks are referenced explicitly from.codex/hooks.json. notify.shis intentionally not installed as a Codex hook because no matchingNotificationevent exists; behavior is replaced by native Codex notification setup docs.- Statusline behavior uses Codex
[tui].status_linefor built-in model/context footer items, plusSessionStartstatus context andstudio-statusfor the game-stage/review/session breadcrumb that Claude rendered with a shell command. - The full matrix categorizes all 417 verified upstream files and gives disposition/parity coverage for agents, skills, hooks, rules, templates, docs, testing framework, config, lifecycle state, and installer behavior.
- Risk register now includes R31 for nested skill/agent discovery failure.
Post-Phase naming correction:
- The earlier skill-prefix decision was revised after checking current Codex docs and local state.
- Official docs show repo skills as direct
.agents/skills/<skill>/SKILL.mdfolders and say same-name skills are not merged, so the plan now uses unprefixed upstream skill names plus collision validation. - The failed cached
codex-game-studiosplugin and stalegen-asset,handoff,resume-from-handoff, andstudio-rolesskills were removed before this correction. The current active Codex skill context has no active defaultprototypeskill, and current user/project custom-agent scans found no.codex/agents/*.tomlcollisions. - Follow-up correction: the earlier custom-agent prefix decision was also revised. Current Codex docs list only
default,worker, andexploreras built-in agents, and local user/project/plugin custom-agent scans found noproducer,writer,game-designer, or similar CCGS role collisions. Custom agents now preserve upstream names:.codex/agents/producer.tomlwithname = "producer",.codex/agents/writer.tomlwithname = "writer", and so on. - The invented acronym-prefixed command-rule filename was also revised to
.codex/rules/settings.rules, mapping from upstream.claude/settings.jsoncommand policy without adding a CCGS runtime prefix. - Follow-up namespace correction: the hook/support/doc/testing-framework targets were also revised to remove artificial runtime namespace directories. Hook scripts now map to
.codex/hooks/<upstream-hook>.sh, support tooling to.codex/audit.sh,.codex/install.sh,.codex/lib/**, and.codex/manifest/**, migrated.claude/docsassets/templates to.codex/docs/**, the testing framework to directCCGS Skill Testing Framework/**, and logs to upstream-faithfulproduction/session-logs/**. - Follow-up docs/memory correction: upstream
.claude/docs/**maps to.codex/docs/**, including all 40 templates under.codex/docs/templates/**; upstream root/shareddocs/**remains directdocs/**. Upstream memory handling now maps all 17memory:agents to.codex/agent-memory/<agent>/MEMORY.md, withlead-programmerported from the explicit upstream memory file and the other 16 as generated memory contracts bound from the corresponding.codex/agents/<agent>.toml.
Important Phase 3 counts:
- 417 upstream files categorized in the matrix coverage ledger.
- 49 custom agent TOML targets.
- 17 repo-local agent-memory targets.
- 73 ported skill targets plus 2 new Codex-native support skills:
studio-statusandstudio-next. - 11 ported hooks, with
notify.shreplaced by native notification setup documentation rather than installed as a project hook. - 11 nested rule-to-
AGENTS.mdtargets. - 40 template targets.
- 127 testing-framework assets, with exactly one known upstream gap: missing
vertical-sliceskill spec.
Phase 4 is complete.
Saved Phase 4 artifacts:
docs/codex-conversion/validation-suite.md- updated
docs/codex-conversion/risk-register.md - updated
docs/codex-conversion/session-summary.md
Major Phase 4 decisions:
- Default validation must be static/headless and must not require an LLM call.
- Interactive Codex smoke is optional/manual because it can depend on project trust, auth, approvals, user config, and model access.
- Validators must not depend on PyYAML or undeclared packages. Use Python 3.11+ standard library (
json,hashlib,tomllib) and a small frontmatter parser. - The implementation must commit
.codex/manifest/upstream-assets.jsonfor all 417 upstream files andexpected-targets.jsonfor generated Codex targets. audit allis the default final acceptance command.codex --strict-config -C "$fixture" debug prompt-input "noop"is useful as optional verification, not the only source of config truth.
Phase 4 validation commands designed:
./.codex/audit.sh all --root "$PWD"./.codex/audit.sh manifest --root "$PWD"./.codex/audit.sh runtime --root "$PWD"./.codex/audit.sh skills --root "$PWD"./.codex/audit.sh agents --root "$PWD"./.codex/audit.sh config --root "$PWD"./.codex/audit.sh hooks --root "$PWD"./.codex/audit.sh coexistence --fixture .codex/tests/fixtures/coexistence./.codex/audit.sh smoke-headless --root "$PWD"- optional
./.codex/audit.sh smoke-interactive --root "$PWD"
Phase 4 risk additions:
- R32: validator dependency on undeclared Python packages.
- R33: Codex CLI smoke dependence on trust/auth/user config/model access.
- R34:
.rulessyntax drift without an official standalone parser. - R35: manifest count checks can pass while rewrites remain incomplete.
- R36: hook fixture inputs may not cover every real Codex payload shape.
Phase 5 is complete.
Saved Phase 5 artifacts:
docs/codex-conversion/implementation-plan.md- updated
docs/codex-conversion/session-summary.md
Phase 5 result:
- The final implementation plan is suitable to hand to Codex GPT-5.5 for implementation.
- It includes non-negotiable constraints, exact target file sets for 49 agents, 75 core skills, hooks, nested instructions, and phased implementation tasks.
- Each implementation phase includes goal, files to create/modify, exact tasks, verification commands, acceptance criteria, and rollback/coexistence concerns.
- The final numbered task list ends with
audit allandsmoke-headlessas required acceptance gates.
Phase 1 and Phase 2 commands are documented in earlier artifact history and in glm-plan-review.md.
Additional Phase 3 commands:
sed -n '1,240p' docs/codex-conversion/session-summary.mdsed -n '1,260p' docs/codex-conversion/glm-plan-review.mdsed -n '1,260p' docs/codex-conversion/codex-mapping-matrix.mdsed -n '1,260p' docs/codex-conversion/upstream-inventory.mdsed -n '1,260p' docs/codex-conversion/corrected-architecture.mdsed -n '1,260p' docs/codex-conversion/risk-register.mdfind /private/tmp/ccgs-upstream-phase1/.claude/hooks -maxdepth 1 -type f -print | sortfind /private/tmp/ccgs-upstream-phase1/.claude/rules -maxdepth 1 -type f -name '*.md' -print | sortfind /private/tmp/ccgs-upstream-phase1/.claude/docs/templates -type f -print | sortfind '/private/tmp/ccgs-upstream-phase1/CCGS Skill Testing Framework' -maxdepth 3 -type f -print | sort- Agent and skill frontmatter loops extracting
name|model find /private/tmp/ccgs-upstream-phase1/.claude/docs -type f -not -path '/private/tmp/ccgs-upstream-phase1/.claude/docs/templates/*' -print | sortfind /private/tmp/ccgs-upstream-phase1/docs -type f -print | sortfind /private/tmp/ccgs-upstream-phase1/.github -type f -print | sortfind /private/tmp/ccgs-upstream-phase1/production -type f -print | sortfind /private/tmp/ccgs-upstream-phase1/design -type f -print | sortfind /private/tmp/ccgs-upstream-phase1/src -type f -print | sort- Category count commands using
find ... | wc -l rgchecks for stale nested skill/agent paths and Phase 3 coverage terms- Official docs rechecked for direct repo skill and custom agent discovery paths:
https://developers.openai.com/codex/skills,https://developers.openai.com/codex/subagents
Additional Phase 4 commands:
codex --helpcodex features listcodex doctor --helpcodex exec --helpcodex debug --helpcodex debug prompt-input --helprg 'strict|config|rules|hooks|permissions' docs/codex-conversion/glm-plan-review.md docs/codex-conversion/corrected-architecture.md docs/codex-conversion/codex-mapping-matrix.md docs/codex-conversion/risk-register.md
Additional Phase 5 commands:
sed -n '1,260p' docs/codex-conversion/validation-suite.mdsed -n '1,220p' docs/codex-conversion/session-summary.mdsed -n '1,220p' docs/codex-conversion/corrected-architecture.mdsed -n '1,120p' docs/codex-conversion/risk-register.mdwc -l docs/codex-conversion/implementation-plan.md- stale-prefix guard over
docs/codex-conversion/implementation-plan.md - stale-path guard over
docs/codex-conversion/implementation-plan.md
Additional post-Phase naming-correction commands:
- Official docs check for direct skill and subagent discovery paths.
node /Users/yongatron/.codex/skills/.system/openai-docs/scripts/fetch-codex-manual.mjs --cache-dir /private/tmp/openai-docs-cache; first sandbox run failed DNS, escalated rerun succeeded and wrote/private/tmp/openai-docs-cache/codex-manual.md.codex debug prompt-input "skill collision check"to inspect active skill context after removing the failed cached plugin.find /Users/yongatron/.codex/plugins/cache -path '*/prototype/SKILL.md' -print 2>/dev/null; found one inactive cached product-designprototypeskill file, but it is not present in active prompt input.find /Users/yongatron/.codex/agents .codex/agents -maxdepth 1 -type f -name '*.toml' -print 2>/dev/nullfind /Users/yongatron/.codex/plugins/cache -path '*/agents/*.toml' -print 2>/dev/nullrg -n "producer|writer|game_designer|game-designer|security_engineer|security-engineer" /Users/yongatron/.codex/agents .codex/agents /Users/yongatron/.codex/plugins/cache -g '*.toml' -g '*.md' 2>/dev/nullrgscans overdocs/codex-conversion/*.mdfor stale artificial skill or agent prefixes and for accidentally unprefixed/reprefixedprototyper.tomlandux-designer.tomlregressions.
Additional post-namespace-correction commands:
find /private/tmp/ccgs-upstream-phase1/.claude/hooks -maxdepth 1 -type f -print- General
rgguard for stale artificial runtime namespaces and prefixes acrossdocs/codex-conversion. - Targeted
rgguard for stale hook, support-tooling, docs, template, testing-framework, and production-log namespace paths. - Positive
rgguard for direct target paths such as.codex/hooks/*.sh,.agents/skills/<skill>/SKILL.md,.codex/agents/<agent>.toml,.codex/agent-memory/<agent>/MEMORY.md,.codex/rules/settings.rules,production/session-logs/**,.codex/docs/templates/**, andCCGS Skill Testing Framework/**.
Additional post-docs-and-memory-correction commands:
find /private/tmp/ccgs-upstream-phase1/.claude/docs/templates -type f | sed 's#^/private/tmp/ccgs-upstream-phase1/.claude/docs/templates/##' | sortfind /private/tmp/ccgs-upstream-phase1/.claude/docs -maxdepth 2 -type f | sed 's#^/private/tmp/ccgs-upstream-phase1/.claude/docs/##' | sortfind /private/tmp/ccgs-upstream-phase1/.claude/agent-memory -maxdepth 4 -type f -print | sortrg -n "^memory:" /private/tmp/ccgs-upstream-phase1/.claude/agents -g '*.md'- Official Codex manual sections checked for Memories and custom-agent schema; Codex has global/thread Memories under
~/.codex/memories, but no documented direct per-agent repo memory binding. - Official Codex manual sections checked for statusline and notifications; Codex supports
[tui].status_linebuilt-in footer item configuration and/statusline, plus native notifications/user-levelnotify, but project config cannot setnotifyand no custom project script footer item was verified.
Final plan-update verification:
rg -n "docs/templates" docs/codex-conversion/...now only shows upstream source paths,.codex/docs/templates/**targets, and the explicit negative rule not to mix migrated.claude/docsassets into rootdocs/templates/**.- Stale memory omission phrases such as
do not install memory,Role instruction notes only, andfold agent-memoryhave no matches. - Positive memory scans show
.codex/agent-memory/<agent>/MEMORY.md,Ported Claude memory scope, and 17-agent validation requirements in the architecture, mapping matrix, validation suite, risk register, implementation plan, and session summary. rg -n "codex-game-studios|ccgs-|ccgs_" docs/codex-conversion/...only hits source/provenance notes such as the failed cached plugin and/private/tmp/ccgs-upstream-phase1; no stale artificial target prefixes remain.
Implementation is in progress on branch ccgs-port-codex.
Implementation Phase 1 is complete.
Created Phase 1 runtime/manifest files:
.codex/manifest/upstream-assets.json.codex/manifest/expected-targets.json.codex/models.toml.codex/README.md.codex/lib/validate_manifest.py.codex/audit.shwith the initialmanifestdispatcher
Phase 1 verification:
python3 .codex/lib/validate_manifest.py --root "$PWD"passed../.codex/audit.sh manifest --root "$PWD"passed.codex debug models > /tmp/game-studios-models.jsoncompleted; it emitted a sandbox PATH-alias warning but wrote the model catalog.git diff -- .claude CLAUDE.mdproduced no output.
Phase 1 notes:
- The implementation plan lists
validate_manifest.pyunder Phase 2 but also requires it for Phase 1 verification, so a minimal standard-library manifest validator was added in Phase 1 and will be expanded in Phase 2. - The generated upstream manifest has exactly 417 rows from pinned upstream commit
984023ddac0d5e27624f2baacde6105e45de375f. - The generated expected-targets manifest has 334 rows after removing a duplicate
CCGS Skill Testing Framework/AGENTS.mdtarget; that target is owned by the testing-framework category, leaving the nestedAGENTS.mdtarget count at 15. .claude/hooks/notify.shis marked as replaced by native Codex notification documentation.- The missing
vertical-sliceframework spec remains recorded as a known upstream gap.
Implementation Phase 2 is complete.
Created Phase 2 validation files:
.codex/lib/validate_runtime.py.codex/lib/validate_hooks.py.codex/lib/validate_rules.py.codex/lib/validate_install.py.codex/lib/validate_smoke.py- Expanded
.codex/audit.shdispatcher forall,manifest,runtime,skills,agents,config,hooks,coexistence,smoke-headless,smoke-interactive, anddocs. - Added fixture trees under
.codex/tests/fixtures/forempty-game,claude-existing,codex-collisions,shared-state-dirty,hook-payloads,invalid-skill,invalid-agent, andstale-claude-reference.
Phase 2 verification:
- Initial
./.codex/audit.sh runtime --root "$PWD"and./.codex/audit.sh all --root "$PWD"failed as expected before dispatcher expansion. - After implementation,
./.codex/audit.sh manifest --root "$PWD"passed. ./.codex/audit.sh runtime --root "$PWD"passed../.codex/audit.sh all --root "$PWD"passed../.codex/audit.sh hooks --root "$PWD"passed with warnings that hooks are not installed yet../.codex/audit.sh config --root "$PWD"passed with warnings that config/rules are not installed yet../.codex/audit.sh smoke-headless --root "$PWD"passed and confirmed seeded negative fixtures fail under the appropriate validators../.codex/audit.sh coexistence --fixture .codex/tests/fixtures/claude-existingpassed../.codex/audit.sh coexistence --fixture .codex/tests/fixtures/codex-collisionspassed.rg -n "import yaml|from yaml" .codex/lib .codex/audit.shreturned no matches.git diff -- .claude CLAUDE.mdproduced no output.
Phase 2 notes:
- Validators currently allow future-phase assets to be absent but validate them when present. Later phases should tighten counts after generating the relevant assets.
- Runtime scans intentionally exclude validator implementation files, manifests, and test fixtures;
smoke-headlesschecks negative fixtures explicitly.
Implementation Phase 3 is complete.
Created Phase 3 files and assets:
- Marker-managed root
AGENTS.md. - Marker-managed nested instruction files for root scope,
src/,design/,docs/, framework scope, and all 11 rule targets. .codex/docs/**copied/reworked from upstream.claude/docs/**..codex/docs/templates/**with 40 upstream template files under the Codex-owned docs path.- Shared upstream
docs/**files copied into directdocs/**paths while preservingdocs/codex-conversion/**. CCGS Skill Testing Framework/**with 127 files, mapping the framework instruction file toCCGS Skill Testing Framework/AGENTS.md.- Shared neutral placeholders/state seeds for
design/registry/entities.yaml,src/.gitkeep, andproduction/session-state/.gitkeep. ATTRIBUTION.md.
Phase 3 verification:
./.codex/audit.sh manifest --root "$PWD"passed../.codex/audit.sh runtime --root "$PWD"passed../.codex/audit.sh docs --root "$PWD"passed.- Count check showed
.codex/docs/templates: 40/40. - Count check showed
CCGS Skill Testing Framework: 127/127. - Nested rule target check showed
11/11. - Direct forbidden-reference scan only found allowed coexistence/provenance mentions in
.codex/README.mdandATTRIBUTION.md. git diff -- .claude CLAUDE.mdproduced no output.
Phase 3 notes:
- Generated docs and instructions were mechanically rewritten from Claude runtime paths and slash commands to Codex-owned paths and
$skillreferences. - Existing planning docs under
docs/codex-conversion/**were preserved and not treated as runtime docs.
Implementation Phase 4 is complete.
Created Phase 4 files:
- 49 direct custom-agent TOML files under
.codex/agents/<agent>.toml. - 17 repo-local memory contract files under
.codex/agent-memory/<agent>/MEMORY.md. .codex/agent-memory/lead-programmer/MEMORY.mdwas ported from the explicit upstream memory file; the other 16 memory files are generated Codex memory contracts.
Phase 4 verification:
python3 .codex/lib/validate_runtime.py --kind agents --require-present --root "$PWD"failed before generation as expected../.codex/audit.sh agents --root "$PWD"passed after generation and validator tightening../.codex/audit.sh runtime --root "$PWD"passed.- Count check showed
agents 49andmemory 17. - Scan for unsupported top-level agent fields (
tools,disallowedTools,maxTurns,memory,skills,isolation) returned no matches. - Scan for
~/.codex/memoriesunder generated agents/memory returned no matches. - Scan for literal forbidden runtime path references under generated agents/memory returned no matches after replacing coexistence-warning literals with descriptive wording.
codex debug models > /tmp/game-studios-models.jsoncompleted with the sandbox PATH-alias warning.git diff -- .claude CLAUDE.mdproduced no output.
Phase 4 notes:
- Agent TOML includes
name,description,model,reasoning_effort, anddeveloper_instructions. - Model distribution validates as 3 high (
gpt-5.5), 44 medium (gpt-5.4), and 2 low (gpt-5.4-mini). - Memory-scoped agents include the required
Ported Claude memory scope:phrase and reference their own repo-local.codex/agent-memory/<agent>/MEMORY.mdfile.
Implementation Phase 5 is complete.
Created Phase 5 files:
- 73 ported upstream skill files under
.agents/skills/<skill>/SKILL.md. - New Codex-native
.agents/skills/studio-status/SKILL.md. - New Codex-native
.agents/skills/studio-next/SKILL.mdfor post-task continuity routing. This is not an upstream skill; it reads shared state and recommends the single best next action after discrete work.
Phase 5 verification:
python3 .codex/lib/validate_runtime.py --kind skills --require-present --root "$PWD"failed before generation as expected../.codex/audit.sh skills --root "$PWD"passed../.codex/audit.sh smoke-headless --root "$PWD"passed../.codex/audit.sh runtime --root "$PWD"passed.- Skill count check showed 74 generated
SKILL.mdfiles. - PCRE2 guard for
AskUserQuestion, runtime Claude paths, rawTask, and bare generated skill slash-command examples returned no matches after rewriting inherited descriptions. git diff -- .claude CLAUDE.mdproduced no output.
Phase 5 notes:
- Skill frontmatter keeps only
nameanddescription; upstream-only metadata is preserved inPorted metadatabody sections. prototypeandvertical-sliceinclude explicit Codex worktree guidance.architecture-review,gate-check, andreview-all-gddsinclude high-reasoning guidance.skill-testpoints toCCGS Skill Testing Framework/**and records the missing upstreamvertical-slicespec as a known gap.
Implementation Phase 6 is complete.
Created Phase 6 files:
.codex/hooks.json- 12 hook scripts under
.codex/hooks/*.sh .codex/lib/hooks.sh.codex/lib/state.sh.codex/rules/settings.rules.codex/config.toml
Phase 6 verification:
- Strict Phase 6 presence check failed before generation as expected.
./.codex/audit.sh config --root "$PWD"passed../.codex/audit.sh hooks --root "$PWD"passed../.codex/audit.sh runtime --root "$PWD"passed.- Hook executable check showed
12/12. - Representative hook fixture runs passed:
.codex/hooks/session-start.sh < .codex/tests/fixtures/hook-payloads/session-start.json.codex/hooks/validate-push.sh < .codex/tests/fixtures/hook-payloads/pre-tool-use-bash.json.codex/hooks/validate-assets.sh < .codex/tests/fixtures/hook-payloads/post-tool-use-apply-patch.json.codex/hooks/studio-status-on-start.sh < .codex/tests/fixtures/hook-payloads/session-start.json
git diff -- .claude CLAUDE.mdproduced no output.
Phase 6 notes:
Notificationis not present in.codex/hooks.json.- Hook logs are written under
production/session-logs/**; representative hook verification created log files there. .codex/config.tomluses permission profiles and does not setsandbox_mode,prefix_rules, provider/auth, secrets, or project-localnotify.
Implementation Phase 7 is complete.
Created Phase 7 files:
.codex/install.sh.codex/uninstall.sh.codex/lib/install.sh.codex/lib/agents.sh.codex/lib/validate.sh.codex/manifest/installed-files.json.codex/backups/.gitkeep
Phase 7 verification:
- Strict Phase 7 presence check failed before generation as expected.
./.codex/audit.sh coexistence --fixture .codex/tests/fixtures/claude-existingpassed../.codex/audit.sh coexistence --fixture .codex/tests/fixtures/codex-collisionspassed../.codex/audit.sh all --root "$PWD"passed../.codex/install.sh "$PWD"passed as an idempotent manifest-presence check../.codex/uninstall.sh "$PWD"passed as a dry-run uninstall check.git diff -- .claude CLAUDE.mdproduced no output.
Phase 7 notes:
- The first installer dry run found that
installed-files.jsonincorrectly owned intentional.claudefixture files under.codex/tests/**. The manifest was regenerated to exclude validation fixtures, andvalidate_install.pynow rejects nested Claude-owned paths as well as root.claude/**andCLAUDE.md. installed-files.jsoncurrently contains 384 owned entries and excludes.codex/tests/**.
Implementation Phase 8 is complete.
Created/updated Phase 8 files:
.codex/docs/README.md.codex/docs/MIGRATION.md.codex/docs/COEXISTENCE.md.codex/docs/VALIDATION.mddocs/WORKFLOW-GUIDE.md- Regenerated
.codex/manifest/installed-files.jsonwith 388 entries after adding final docs.
Phase 8 verification:
- Missing-doc check failed before adding
.codex/docs/VALIDATION.mdas expected. - First final
./.codex/audit.sh all --root "$PWD"run failed on one literal structured-choice tool name in.codex/docs/VALIDATION.md; the wording was corrected. - Final
./.codex/audit.sh all --root "$PWD"passed. - Final
./.codex/audit.sh smoke-headless --root "$PWD"passed. ./.codex/audit.sh smoke-interactive --root "$PWD"passed with an intentional warning that interactive smoke is skipped by default because it requires trust/auth/model access../.codex/audit.sh docs --root "$PWD"passed.git diff -- .claude CLAUDE.mdproduced no output.git status --shortshows the generated Codex port files plus pre-existing untracked.DS_Store,.gitignore, andPLAN.md.
Phase 8 notes:
- Final docs document install, uninstall, trust/validation, coexistence, skill collision policy, notification parity, statusline parity, and optional plugin packaging as future work.
- Explicit Claude-style task-delegation wording was cleaned in generated
.codex/docs/**and.codex/agents/**; generic template placeholders such as “Task 1” remain as ordinary planning text where applicable.
Current planning artifacts are under:
docs/codex-conversion/
Known unrelated or pre-existing workspace files should remain out of scope:
.DS_Store.gitignore- app launcher bundles, if present
The planning review is complete.
Final artifacts:
docs/codex-conversion/glm-plan-review.mddocs/codex-conversion/upstream-inventory.mddocs/codex-conversion/codex-mapping-matrix.mddocs/codex-conversion/corrected-architecture.mddocs/codex-conversion/validation-suite.mddocs/codex-conversion/risk-register.mddocs/codex-conversion/implementation-plan.mddocs/codex-conversion/session-summary.md
Port implementation is complete through Phase 8.
Post-implementation cleanup:
- Deleted obsolete root
PLAN.md. - Added root
README.mdsummarizing current implementation status, validation commands, coexistence rules, and the distinction between$smoke-checkand the audit harness commandssmoke-headless/smoke-interactive.
The user raised a practical Codex GPT-5.5 context-window issue: the effective
usable window is closer to ~280k tokens than the advertised 1M, so a fresh
session can already be deep after running $resume-from-handoff.
Proposed, not yet approved for implementation:
- Save a potential optimization plan at
docs/codex-conversion/context-optimization-plan.md. - Optimize Stillcurrent first, not the reusable source port first.
- Add a tracked
production/resume-index.mdmaintained by$handoff. - Make
$resume-from-handoffand$studio-nextread the compact index by default and reserve fullsrc/README.mdhistory reads for explicit deep mode or stale-index recovery.
Checkpoint intent:
- Preserve the current Codex port implementation and planning artifacts on
branch
ccgs-port-codex. - Keep local
.DS_Storeand launcher bundles out of the commit.
Checkpoint verification observed this session:
./.codex/audit.sh all --root "$PWD"passed../.codex/audit.sh smoke-headless --root "$PWD"passed.- Broad Claude-reference scan returned expected provenance, validator, manifest, and fixture mentions; runtime audit remained clean.