Repository navigation
chore: add Claude Code <-> Codex CLI agent-context parity - #278
Merged
Merged
Conversation
Port the agent-compatibility mechanism from open-garden-planner's PR #300, adapted to this repo's conventions: AGENTS.md kept byte-identical to CLAUDE.md, .codex/config.toml + .codex/agents/senior-reviewer.toml mirror the Claude agent, .agents/skills/ mirrors .claude/skills/, and a new bash gate (scripts/check-agent-context.sh, not Python, matching every other scripts/check-*.sh) enforces all three stay in sync via make/.husky/pre-push/repo-guards CI. CLAUDE.md is trimmed of duplicated incident narrative (relocated into chapter 11 and troubleshooting.md) to make room for the mirror. See ADR-033 for the full rationale and known tradeoffs. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Ports the agent-compatibility mechanism from
cofade/open-garden-planner's PR #300 into this repo, adapted to its own conventions rather than copied verbatim:AGENTS.md(repo root) — byte-identical mirror ofCLAUDE.md, so Codex CLI and Claude Code operate from the same rules..codex/config.toml— declaresproject_doc_max_bytes(no[mcp_servers.*]yet; no HiveHive equivalent of OGP's embedded MCP server exists)..codex/agents/senior-reviewer.toml— Codex-native TOML mirror of.claude/agents/senior-reviewer.md..agents/skills/{analyze-pr,esp32-onboarding}/— mirrors.claude/skills/.scripts/check-agent-context.sh— new bash policy gate (matching every otherscripts/check-*.sh, not Python like OGP's original, since this repo's Python floor is pinned to 3.10 for a documented historical reason) that keeps all of the above in sync. Wired intomake check-agent-context,.husky/pre-push, and therepo-guardsCI job.CLAUDE.mdtrimmed of several sections that duplicated incident narrative already living in the arc42 docs (or now newly landed there), replaced with short pointers — freed up room for the byte-identicalAGENTS.mdmirror.docs/09-architecture-decisions/adr-033-claude-codex-agent-context-parity.md— full rationale, including the known tradeoffs (byte budget above Codex's documented default,.md↔.tomlextraction fragility, Claude-specific phrasing still present in the shared file).Test plan
bash scripts/check-agent-context.shpasses; verified it actually catches drift by tampering withAGENTS.md, the.codex/agents/senior-reviewer.tomlinstructions, a malformed byte-budget value, a mid-line'''inside the TOML body, and empty agent directories — each reproduced and confirmed the gate correctly fails before restoring..gitignoreallow-list verified behaviorally (git add -A --dry-runtracks exactly the intended new files, nothing extra).scripts/check-*.shguards still pass unmodified.bash scripts/check-doc-citations.shpasses clean..codex/agents/senior-reviewer.tomlparses with Python'stomllib, and itsdeveloper_instructionsmatches.claude/agents/senior-reviewer.md's body byte-for-byte.senior-reviewergate, each finding real issues that were verified by direct reproduction (not taken on faith) and fixed — content that had been trimmed from CLAUDE.md without a real home elsewhere was landed properly in chapter 11 /troubleshooting.md; several script edge cases (fail-open on a malformed byte budget, a TOML-validity gap, silently passing with zero agent files) were fixed and each one reproduced before and after.project_doc_max_bytesin.codex/config.toml,.codex/agents/*.tomlwithname/description/developer_instructions) against real Codex CLI documentation (developers.openai.com) — confirmed accurate.🤖 Generated with Claude Code