Skip to content

Codex install should inject graph instructions into AGENTS.md #500

@qwertyerge

Description

@qwertyerge

Summary

code-review-graph install --platform codex configures the Codex MCP server and native Codex hooks, but it does not inject the graph-first instructions into AGENTS.md.

That leaves Codex with the tool available, but without a stable repository instruction that tells the agent when to prefer the graph before file search/read operations.

Reproduction

Run this in a clean git repository with an isolated Codex home:

tmpdir=$(mktemp -d)
repo="$tmpdir/repo"
home="$tmpdir/home"
mkdir -p "$repo" "$home/.codex"
git -C "$repo" init -q
HOME="$home" code-review-graph install --platform codex --repo "$repo" --yes
find "$repo" -maxdepth 2 -type f | sort

Observed repository files:

.gitignore

AGENTS.md is not created.

Expected behavior

A Codex-targeted install should inject the code-review-graph instruction block into AGENTS.md, similar to the default install / --platform all path.

Codex uses AGENTS.md as the project-level instruction file, so this is the place that tells the agent when to call the graph tools.

Actual behavior

--platform codex only writes:

  • ~/.codex/config.toml
  • ~/.codex/hooks.json
  • <repo>/.git/hooks/pre-commit
  • <repo>/.gitignore

Why this matters

MCP registration makes the tools available, and hooks keep the graph fresh, but neither tells the Codex agent when to use the graph. Without AGENTS.md, a Codex agent can still default to grep/read exploration even though the graph is installed.

Suggested fix

Include codex in the AGENTS.md platform owner list so install --platform codex injects the same graph-first instructions used by the default install path.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions