OpenAI Codex

Codex reads AGENTS.md, an open standard context file supported by Codex, Cursor, Google Jules, Factory, Amp, and other agents that follow the agents.md spec. Set it up once and it works across all compatible tools.

Setup

Step 1: Copy AGENTS.md to your project root

Copy AGENTS.md from your export bundle to the root of your project:

bash
cp path/to/export/AGENTS.md AGENTS.md

Step 2: Commit to your repo

Commit the file. Codex reads it automatically on every task, with no further configuration required.

That's it. Codex will follow the design system rules in every UI component it generates. The same file is also read by Cursor, Google Jules, Factory, and Amp. One file covers all of them.

Advanced: subdirectory overrides

In a monorepo or multi-package project, you can add more specific rules closer to the code. Any AGENTS.override.md file takes precedence over AGENTS.md at the same directory level:

text
AGENTS.md                     # global project rules (design system)
packages/
  web/
    AGENTS.override.md        # web-specific rules (override the root)
  mobile/
    AGENTS.override.md        # mobile-specific rules

This lets you set global design system rules at the root while overriding specific behaviour for packages that have different conventions. For example, a mobile package using React Native styling instead of CSS custom properties.

Global instructions

To apply your design system across all Codex sessions regardless of which project you are working in, copy AGENTS.md to the global Codex config directory:

bash
mkdir -p ~/.codex
cp path/to/export/AGENTS.md ~/.codex/AGENTS.md
Global instructions in ~/.codex/AGENTS.md are merged with project-level AGENTS.md files. Project rules take precedence when there is a conflict.