Back to .md Directory

.codex

Defines 9 coding rules and a git workflow for an AI code assistant (Codex) in a Rust monorepo.

May 2, 2026
0 downloads
1 views
agent prompt workflow
View source

What this file does

Defines 9 coding rules and a git workflow for an AI code assistant (Codex) in a Rust monorepo.

When to use it

  • You use an AI code assistant that can stage new files
  • You want to enforce no global state and no filesystem access in core crates
  • You need a lightweight contract for AI to avoid feature creep
  • You want to prevent AI from committing or rewriting git history

Assumes this stack

Rust

Rules for this repository:

  1. Never add new crates without being asked.
  2. Never bypass existing module boundaries.
  3. Prefer small, testable functions.
  4. All parsing code must have tests.
  5. No filesystem access in stbl_core.
  6. No global state.
  7. No "TODO" placeholders.
  8. No feature creep beyond the prompt.
  9. Always tests run and make sure that the tests pass.

Git workflow (important)

  • Codex MAY run git add for new files it creates.
  • Codex MUST NOT run git add on modified existing files.
  • Codex MUST NOT create commits (git commit).
  • Codex MUST NOT rewrite history.
  • All commits are done manually after review.

Rationale:

  • New files are easy to miss; adding them helps review.
  • Modified files must always be reviewed before staging.

Specifications FYI

AGENTS.md ARCHITECTURE.md specs/*

What's inside

9 rules, 4 git workflow directives, 1 rationale paragraph, 3 specification file references

Change this for your project

  • Replace stbl_core with your own core crate name
  • Replace jgaa/stbl repository references with your own repo URL
  • Replace AGENTS.md, ARCHITECTURE.md, specs/* with your own spec file paths

Where it goes

Keep in docs/ or alongside the feature. Agents read it to implement against a defined contract.

Related Documents