Guide 03 · Harnesses

One set of rules for four agent tools

One working agreement that Claude Code, OMP, Codex and Antigravity all load, kept in a single source file.

Related:
Harnesses wing
Checked against the source:
Nov 4, 2026
Tools:
OMP 18.14.1 · Claude Code · Codex · Antigravity

What it is for

Each agent tool reads a different file. When the same rules live in four places, they drift apart, and one tool ends up with an old copy or none. Here the agreement has one source. OMP and Claude Code import it with one line; Codex and Antigravity get a copy. Keep it short: it is loaded into every session.

What you need

Steps

  1. Write the source file

    Start it with a comment that says who imports it, where it is copied and the command that copies it. The next person who edits it then knows the copies exist.

    illustrative
    <!-- Source of the global agent rules.
    ~/.omp/agent/AGENTS.md and ~/.claude/CLAUDE.md import it with one line.
    ~/.codex/AGENTS.md and ~/.gemini/GEMINI.md are copies. After a change:
    cp /path/to/agent-rules/AGENTS.md ~/.codex/AGENTS.md
    cp /path/to/agent-rules/AGENTS.md ~/.gemini/GEMINI.md
    Keep it short: it loads into every session. -->
    
    # Agent rules
    
    - Reply in the user's language.
    - Verify facts against the current source before changing code.
  2. Import it in OMP and Claude Code

    Each tool's user file holds one line that points to the source. In our setup, OMP expanded the import (checked Oct 8, 2026), and so did Claude Code (Oct 8 and Oct 15, 2026).

    real excerpt · path replaced
    # ~/.omp/agent/AGENTS.md and ~/.claude/CLAUDE.md, one line each:
    @/path/to/agent-rules/AGENTS.md
  3. Copy it for Codex and Antigravity

    Antigravity (agy) reads ~/.gemini/GEMINI.md but did not expand an @ import: the agent saw the line with the path as plain text (Oct 8, 2026). For Codex we copy it too; we have not tested imports in Codex. The cost is a manual copy into two files after every change.

    adapted from · harness/global/AGENTS.md (header comment)
    cp /path/to/agent-rules/AGENTS.md ~/.codex/AGENTS.md
    cp /path/to/agent-rules/AGENTS.md ~/.gemini/GEMINI.md
  4. Use the same pattern in each repo

    OMP reads AGENTS.md, and when CLAUDE.md sits next to it at the same level, one hides the other and AGENTS.md wins (OMP, Oct 8, 2026). Claude Code reads only CLAUDE.md. So AGENTS.md holds the repo's rules and CLAUDE.md only imports it.

    adapted from · K-B setup
    # In the repo root:
    AGENTS.md    the repo's rules (canonical)
    CLAUDE.md    one line: @AGENTS.md
  5. Put role instructions in the role's file

    In OMP, one user context file applies to every model: ~/.omp/agent/AGENTS.md hides ~/.gemini/GEMINI.md (Oct 8, 2026). Instructions for one role belong in that role's file in .omp/agents/. The commit reviewer from guide 01 is such a role, and it does not get the agreement at all: its settings overlay turns off the user context file.

How to check it works

Compare the copies with the source, then ask the agent what it has loaded.

adapted from · K-B sprint notes
md5sum /path/to/agent-rules/AGENTS.md ~/.codex/AGENTS.md ~/.gemini/GEMINI.md
omp -p "Which context files and instructions do you have loaded? List them with their first heading."

The three checksums match. The answer lists the global agreement and the repo's AGENTS.md, each with its first heading. Ask the same question with claude -p and agy -p.

What to watch out for

Sources

← All guides