Skip to content

[P] Investigate Codex review-environment capabilities (centralized vs per-repo config) #294

@cbeaulieu-gt

Description

@cbeaulieu-gt

Parent epic: #273 · Spec gap discovered after #278 merge.

Context

Spec PR #278 (merged) names AGENTS.md as the mechanism by which the Codex GitHub App receives domain-specific review guidance. Open question raised post-merge: AGENTS.md is per-repo, but the Claude model (pr-review/action.yml's 696-line inline prompt) was effectively centralized — every consumer that added uses: glitchwerks/github-actions/.github/workflows/claude-pr-review.yml@v2 got that prompt's behavior applied to their PRs for free.

If the Codex pivot lands with only a github-actions-local AGENTS.md, consumer repos get whatever Codex defaults to — losing the shared review brain.

Investigation goals

  1. Codex environments — the user observed Codex has a notion of cloud "environments" where commands can be run during review (per https://chatgpt.com/codex/cloud/settings/environments, seen during PR docs: codex-pivot spec rev 2 — dual-surface (App + Action), shadow-mode phase #278 review attempt). Investigate:
    • What an environment is, exactly
    • Whether environments are per-repo, per-org, or per-user
    • What commands/scripts run inside (setup, pre-review, etc.)
    • Whether an environment can pull files from a remote source (e.g., curl https://raw.githubusercontent.com/glitchwerks/github-actions/main/AGENTS.md) before review fires
    • Whether environment commands have access to the PR diff / repo context the review will use
  2. AGENTS.md resolution order — does Codex look beyond the repo root? E.g., .codex/AGENTS.md, ~/AGENTS.md, env-var-pointed paths, App-config-pointed paths
  3. App-level configuration — does the Codex App expose org-wide or App-install-wide configuration that applies a baseline prompt to all reviewed repos?
  4. @codex review extra-instructions surface — can a comment-posting workflow inject canonical guidance per-PR (e.g., @codex review using the rules in <fenced block>)? Latency cost of this path?

Deliverable

Structured options report listing every plausible Codex-side mechanism for shared/preloaded review config, with:

  • Mechanism name
  • Per-repo / per-org / per-App scope
  • Authoritative source URL (Codex docs, OpenAI blog, GitHub App marketplace listing) + fetched date
  • Whether the option recovers the "central prompt" property of the Claude model
  • Effort cost on github-actions side
  • Effort cost on consumer side

Why this gates #A

If Codex environments (or any other mechanism) provide a way to preload shared config, #A's scope changes: AGENTS.md authoring becomes one input among several rather than the sole answer. The right approach may be a combination — local AGENTS.md plus an environment-side prep script that fetches additional rules.

Gating

Hard gate on #A (#279). Do not start AGENTS.md authoring until this issue lands with a recommendation.

🤖 Generated by Claude Code on behalf of @cbeaulieu-gt

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions