Back to .md Directory

AI_CODEX.md

Defines a restricted role for OpenAI Codex limited to code completion and snippet generation within project constraints.

May 2, 2026
0 downloads
1 views
ai openai
View source

What this file does

Defines a restricted role for OpenAI Codex limited to code completion and snippet generation within project constraints.

When to use it

  • You want to limit Codex to boilerplate and inline completions only
  • You need a companion file that references a broader AI_GUIDE.md
  • You want to explicitly forbid Codex from making architectural decisions
  • You need to list dangerous operations Codex must never perform

Assumes this stack

OpenAI Codex

AI_CODEX.md

Operating instructions for OpenAI Codex in this repository.

⚠️ Read AI_GUIDE.md first. This file does not duplicate its content.


0. Overview

Codex's role in this project is limited to code completion and snippet generation, within the constraints defined in AI_GUIDE.md.


1. Intended Use Cases

  • Inline code completion for existing patterns
  • Generating boilerplate that follows established conventions
  • Translating pseudo-code or comments into concrete implementations

2. Constraints

  • Observe all forbidden directories in AI_GUIDE.md §3.1
  • Observe all dangerous operations in AI_GUIDE.md §3.2
  • Do not add type definitions based on guesswork — follow AI_GUIDE.md §4
  • Do not rewrite existing code for "improvement" without explicit instruction
  • Do not include or suggest hardcoded secrets, tokens, or credentials

3. Out of Scope

The following are outside Codex's role in this project:

  • Architectural decisions or design proposals
  • Determining test strategy
  • Executing or modifying deployment / infrastructure configuration
  • Database migration authoring
  • Security auditing

End of AI_CODEX.md

What's inside

3 sections: Intended Use Cases, Constraints, Out of Scope. 6 bullet points total.

Change this for your project

  • Replace AI_GUIDE.md references with your own guide file name
  • Replace AI_GUIDE.md §3.1 and AI_GUIDE.md §3.2 with your own forbidden directories and dangerous operations sections
  • Replace AI_GUIDE.md §4 with your own type definition policy section

Where it goes

Keep it in your repository where the agent or team that needs it will read it.

Related Documents