Skip to content

fix(agents): drop Aider from the instruction-file registry; fix AGENTS.md guide - #745

Merged
rsnodgrass merged 1 commit into
mainfrom
ryan/pr-738-review-vs-main
Jul 31, 2026
Merged

fix(agents): drop Aider from the instruction-file registry; fix AGENTS.md guide#745
rsnodgrass merged 1 commit into
mainfrom
ryan/pr-738-review-vs-main

Conversation

@rsnodgrass

@rsnodgrass rsnodgrass commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Summary

Two documentation-vs-code contradictions found while reviewing #738 against origin/main. Both are cases where ox said one thing and did another, and neither would ever surface as a crash — only as an AI coworker that silently never got primed.

1. Aider was registered against a file it does not read

cmd/ox/instruction_files.go listed Aider with ProjectFiles: []string{"AGENTS.md"}. Aider loads only what .aider.conf.yml's read: directive names — CONVENTIONS.md by default. Meanwhile README.md and docs/guides/agent-compatibility.md both advertised CONVENTIONS.md, so the registry and the docs disagreed about Aider's own instruction file.

  • The entry was fully inert. AGENTS.md is already claimed by Codex, OpenCode, Amp, and Goose with DetectFn: nil, and DetectedInstructionFiles dedupes by resolved path — so Aider's entry never produced a target, for any file, in any repo. It was documentation-as-code, and the documentation was wrong.
  • Aider is not unprimed. ox-adapter-aider owns CONVENTIONS.md end to end — install, check, uninstall, diagnose — under its own ox:prime:aider:start / :end marker pair. That path works today and is what the docs describe.
flowchart LR
    INIT["ox init"] --> REG["InstructionFileRegistry"]
    REG --> AMD["AGENTS.md<br/>ox:prime markers"]
    AMD -.->|"deduped away, and Aider never reads it"| DEAD["no effect"]
    ADAPT["ox adapter install aider"] --> CONV["CONVENTIONS.md<br/>ox:prime:aider block"]
    CONV --> LOADS["Aider loads it via<br/>the .aider.conf.yml read directive"]
Loading

Removed the entry rather than repointing it at CONVENTIONS.md. Repointing would stack a second, differently-marked copy of the same prime instruction on top of the adapter's block — precisely what the neighbouring Goose spec's comment rejects for .goosehints. With DetectFn: nil it would also inject into any repo that happens to have a CONVENTIONS.md, Aider or not. An inline comment now sits where the entry was so it does not get re-added.

No doc changes needed — README.md and the compatibility guide already said CONVENTIONS.md.

2. The AGENTS.md guide contradicted itself in one sentence

cmd/ox/guides/agents-md.md named GEMINI.md as Gemini CLI's instruction file and then, in the same sentence, listed Gemini CLI among the tools that read AGENTS.md. instruction_files.go registers Gemini against GEMINI.md only. Replaced the trailing item with "the OpenAI Agents SDK", which is what the text said before it drifted.

Context: PR #738

This branch came out of reviewing #738 against the latest main. That PR turned out to be entirely superseded by #739 and #740 — three of its files were already byte-identical to main, and merging it would have regressed main (Goose demoted from a shipped adapter back to marker-only, sageox/agentx downgraded v0.1.13 to v0.1.12, and "AI coworker" rewritten to "agent" against the terminology rule). #738 is now closed with a comment mapping each piece to where it landed. The one line worth keeping from it is the agents-md.md fix above.

Tracked as ox-fbrm (closed). Still open from the same audit and not in this PR: ox-h064 (adapter compliance suite has no TestXxx entry point) and ox-osm5 (gemini/pi/aider ship an unregistered rules.go).

Test Plan

  • TestInstructionFileRegistry_AiderIsAdapterOwned — new. Asserts no registry spec claims aider and no spec lists CONVENTIONS.md. Written against the general class, not the one instance: a spec that names an instruction file its agent does not load, or that the agent's own adapter already owns.
  • Verified red-first. Reverted instruction_files.go to HEAD, ran the new test alone, watched it fail on Should not be: "aider", then restored the fix and watched it pass. A test that is green both ways guards nothing.
  • make lint — 0 issues.
  • go test ./cmd/ox/... — pass (117s), including the pre-existing TestDetectedInstructionFiles_* and TestRemoveInstructionFileMarkers_* suites that exercise the registry end to end. Two stale comments in those tests that named Aider as an AGENTS.md sharer now name Goose.
  • Embedded-guide rendergo build ./cmd/ox && ox guide agents-md emits the corrected sentence, confirming the go:embed copy picked it up.

No behavior change to verify manually: the removed registry entry was already unreachable via dedup, so ox init writes exactly the same files before and after.


Checklist (expand if needed)
  • Tests added or N/A documented — TestInstructionFileRegistry_AiderIsAdapterOwned, verified red without the fix
  • CHANGELOG entry added (if user-facing) — N/A: no user-visible behavior change; the removed entry was inert
  • Breaking change documented — N/A: none
  • Ran /security-review on the diff, or N/A documented — N/A: docs + a registry-literal deletion + a test. Touches none of internal/auth/, internal/mcp/, internal/session/raw_writer.go, cmd/ox/prepush_scan.go, internal/upgrade/, or go.sum

Co-Authored-By: SageOx
Co-authored-by: SageOx ox@sageox.ai

Summary by CodeRabbit

  • Documentation

    • Updated the AGENTS.md guidance to reference the OpenAI Agents SDK instead of Gemini CLI.
    • Updated agent-related examples and descriptions to reference Goose where applicable.
  • Bug Fixes

    • Improved instruction-file handling so Aider’s CONVENTIONS.md configuration is recognized through its adapter without being incorrectly treated as a shared instruction file.

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The change removes Aider from the local instruction-file registry, documents adapter-managed CONVENTIONS.md handling, updates related test comments, adds registry integrity coverage, and replaces Gemini CLI with the OpenAI Agents SDK in AGENTS.md documentation.

Changes

Agent instruction ownership

Layer / File(s) Summary
Update agent instruction ownership
cmd/ox/instruction_files.go, cmd/ox/instruction_files_test.go, cmd/ox/guides/agents-md.md
The registry no longer lists Aider or CONVENTIONS.md. Tests verify this ownership and update shared AGENTS.md references from Aider to Goose. The guide lists the OpenAI Agents SDK instead of Gemini CLI.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • sageox/ox#738: Updates agent instruction-file ownership and registry behavior.
  • sageox/ox#739: Updates agent documentation and instruction-file registry entries.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes both primary changes: removing Aider from the instruction-file registry and correcting the AGENTS.md guide.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ryan/pr-738-review-vs-main

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@cmd/ox/guides/agents-md.md`:
- Line 9: Update the sentence in the guide to use “AI coworkers” instead of “AI
coding agents,” while preserving “OpenAI Agents SDK” unchanged as a product
name.
- Line 9: Update the documentation paragraph describing AGENTS.md consumers to
remove the claim that the OpenAI Agents SDK automatically reads repository-root
AGENTS.md files, or qualify it to state that the SDK receives caller-supplied
instructions through Agent.instructions. Do not imply SageOx or the SDK performs
automatic discovery.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 1f14e51a-a8d0-44f3-9353-63e5c243baf4

📥 Commits

Reviewing files that changed from the base of the PR and between 0b59c09 and 15bea25.

📒 Files selected for processing (3)
  • cmd/ox/guides/agents-md.md
  • cmd/ox/instruction_files.go
  • cmd/ox/instruction_files_test.go

# AGENTS.md and CLAUDE.md

AI coding agents read instruction files at session start to learn project conventions. Different tools historically named these files differently — `CLAUDE.md` (Claude Code), `.cursorrules` (Cursor), `.windsurfrules` (Windsurf), `GEMINI.md` (Gemini CLI), `CONVENTIONS.md` (Aider). The cross-tool convention has converged on **AGENTS.md at the repo root**, which Codex, OpenCode, Amp, Pi, Goose, and Gemini CLI all read.
AI coding agents read instruction files at session start to learn project conventions. Different tools historically named these files differently — `CLAUDE.md` (Claude Code), `.cursorrules` (Cursor), `.windsurfrules` (Windsurf), `GEMINI.md` (Gemini CLI), `CONVENTIONS.md` (Aider). The cross-tool convention has converged on **AGENTS.md at the repo root**, which Codex, OpenCode, Amp, Pi, Goose, and the OpenAI Agents SDK all read.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Use the canonical term in this guide.

This sentence uses AI coding agents. The repository guideline requires AI coworker instead of agent in *.md files. Replace it with AI coworkers. Keep OpenAI Agents SDK unchanged because it is a product name.

As per coding guidelines: use canonical user-facing terminology, including AI coworker instead of agent, in *.go, *.md, and *.mdx files.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@cmd/ox/guides/agents-md.md` at line 9, Update the sentence in the guide to
use “AI coworkers” instead of “AI coding agents,” while preserving “OpenAI
Agents SDK” unchanged as a product name.

Source: Coding guidelines


🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -eu
printf '%s\n' '--- guide ---'
sed -n '1,40p' cmd/ox/guides/agents-md.md
printf '%s\n' '--- repository references to OpenAI Agents SDK and AGENTS.md ---'
rg -n -i --glob '!vendor/**' --glob '!node_modules/**' \
  'OpenAI Agents SDK|openai[-_ ]agents|AGENTS\.md|Agent\.instructions|instructions' .
printf '%s\n' '--- candidate wrapper files ---'
git ls-files | rg -i '(^|/)(agent|agents|openai|codex|instructions|context|guide|readme|docs)'

Repository: sageox/ox

Length of output: 50368


🌐 Web query:

OpenAI Agents SDK Python repository AGENTS.md automatic discovery Agent.instructions documentation

💡 Result:

In the OpenAI Agents SDK for Python, the AGENTS.md file and Agent.instructions property serve distinct purposes within the framework's architecture [1][2]. AGENTS.md The AGENTS.md file is a repository-level documentation file found in the root of the OpenAI Agents SDK Python repository [1][3]. Its purpose is to help contributors understand the project's structure, development workflows, and conventions [1][2]. It contains guidance on repository maintenance, testing commands, output paths, and workspace rules, rather than acting as a configuration file for agent behavior [1][2]. Agent.instructions The Agent.instructions property is a core attribute used when defining an Agent [4][5]. It acts as the "system prompt" for the Large Language Model (LLM) backing the agent, describing its role, behavioral constraints, and task-specific logic [4][6]. Key details regarding Agent.instructions: - It is technically optional in the SDK, as an Agent can be instantiated without it (defaulting to None), though it is strongly recommended to provide instructions to ensure predictable behavior [7]. - It can be provided as a static string or, in some contexts, as a function that dynamically generates instructions based on the run context [6]. Automatic Discovery There is no native feature in the core OpenAI Agents SDK labeled "automatic discovery" for Agent.instructions [4][5]. However, "automatic discovery" is a pattern used in associated ecosystem packages, such as those for Model Context Protocol (MCP) integration [8][9]. In those specific implementations, the SDK can automatically discover configuration files (e.g., mcp_agent.config.yaml) to load server definitions, allowing the agent to aggregate tools without manual registration [8][9]. This is distinct from the core agent definition logic [4][8].

Citations:


🏁 Script executed:

#!/bin/bash
set -eu
printf '%s\n' '--- guide ---'
sed -n '1,40p' cmd/ox/guides/agents-md.md
printf '%s\n' '--- repository references ---'
rg -n -i --glob '!vendor/**' --glob '!node_modules/**' \
  'OpenAI Agents SDK|openai[-_ ]agents|AGENTS\.md|Agent\.instructions|instructions' .
printf '%s\n' '--- candidate files ---'
git ls-files | rg -i '(^|/)(agent|agents|openai|codex|instructions|context|guide|readme|docs)'

Repository: sageox/ox

Length of output: 50368


Qualify the OpenAI Agents SDK claim. The SDK accepts caller-supplied instructions through Agent.instructions; it does not document automatic discovery of a repository-root AGENTS.md. SageOx has no wrapper that provides this discovery. Remove or qualify the SDK claim.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@cmd/ox/guides/agents-md.md` at line 9, Update the documentation paragraph
describing AGENTS.md consumers to remove the claim that the OpenAI Agents SDK
automatically reads repository-root AGENTS.md files, or qualify it to state that
the SDK receives caller-supplied instructions through Agent.instructions. Do not
imply SageOx or the SDK performs automatic discovery.

@rsnodgrass
rsnodgrass marked this pull request as ready for review July 31, 2026 06:13
@rsnodgrass
rsnodgrass merged commit dd7ea49 into main Jul 31, 2026
12 checks passed
@rsnodgrass
rsnodgrass deleted the ryan/pr-738-review-vs-main branch July 31, 2026 06:13
@greptile-apps

greptile-apps Bot commented Jul 31, 2026

Copy link
Copy Markdown

Greptile Summary

This change removes Aider’s incorrect AGENTS.md registration, leaves its adapter-owned CONVENTIONS.md workflow separate, and updates the AGENTS.md compatibility guidance.

The built CLI was checked before and after the change. The updated agents-md guide renders the OpenAI Agents SDK compatibility text, while focused registry tests confirm that Aider is absent from the shared registry, CONVENTIONS.md is not double-owned, and shared AGENTS.md discovery and deduplication remain intact. No defects were found.

Confidence Score: 5/5

T-Rex T-Rex Logs

What T-Rex did

  • Built and executed the parent and changed CLI revisions, then ran the focused registry tests.
  • Validated that the parent guide rendered the historical Gemini CLI copy and the PR build rendered 'OpenAI Agents SDK all read.', with all focused registry tests passing and the validation script exiting 0.

View all artifacts

T-Rex Ran code and verified through T-Rex

Reviews (1): Last reviewed commit: "fix(agents): drop Aider from the instruc..." | Re-trigger Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant