What is DESIGN.md for Codex?
DESIGN.md is a visual instruction file for Codex. It defines color roles, spacing, typography, component variants, and anti-patterns that Codex should follow when implementing UI features autonomously — without requiring mid-task clarification from the user.
How does DESIGN.md pair with AGENTS.md for Codex?
AGENTS.md covers engineering rules — commands, architecture, and code behavior. DESIGN.md covers visual rules — appearance and product taste. Reference both at the start of each UI task: "Read AGENTS.md for engineering rules and DESIGN.md for visual rules before implementing."
What should a Codex-ready DESIGN.md include?
Color roles with semantic meaning, exact spacing values, component variants with when-to-use rules, page-level layout patterns, and an explicit anti-pattern list. Anti-patterns are especially important for autonomous agents like Codex, which cannot ask "is a gradient okay here?" before adding one — the file must answer those questions proactively.
How do I review Codex UI output using DESIGN.md?
Treat DESIGN.md as a review checklist. After Codex generates UI, check each rule against the output: does card padding match? Are anti-patterns absent? Is the typography hierarchy correct? This structured review takes minutes instead of open-ended visual evaluation, and feedback to Codex is precise and repeatable.