Skip to content
Projects
Playbook and templates

Codex Execution Playbook

A decision framework and prompt-template kit for running coding tasks with OpenAI Codex: the CLI, the IDE extension, the desktop app and cloud tasks. Unofficial; not affiliated with OpenAI.

Status
Released as v1.0.1, a maintenance release of v1.0.0, which remains published. A generalized rewrite of a private execution framework. Reasoned starting points, not benchmarks; the examples are illustrative and were not run; Codex commands and flags were spot-checked against one CLI version; the checker's static rules catch the weakenings they were written for, not every unsafe prompt; the skill is checked for format, and its output has not been evaluated.
Authorship
"Drafted with AI assistance," in the repository's own words.
Stack
Markdown · Python 3.10+ (build and check scripts) · Codex skill format
Demonstrates
Decision guides with stated defaults · Sandbox and approval settings treated as enforcement, not permission · Copy-ready templates and worked examples · A consistency checker with regression fixtures · Reproducible release assets
Verified
32 unit, packaging and regression tests pass, the repository's consistency checks pass on 39 Markdown files, and the published v1.0.1 assets match their checksums and a rebuild from the tagged commit. Observed at commit 6b9401b847ac606337693d08d7204352e3846aec.
Commands run
python3 -m unittest discover -s tests
python3 scripts/check.py
python3 scripts/build.py --check
python3 scripts/build.py --package
Repository
github.com/Donovanfitch-dev/codex-execution-playbook
Release
Release v1.0.1 (single-file edition, skill and checksums)

Engineering problem

Every Codex run involves eight decisions (model, reasoning effort, speed, environment, sandbox and approvals, topology, strategy and packaging) and four boundaries (scope, authority, proof and exit). Most problems with agent-written changes trace back to one of them having been left implicit.

Representative solution

The playbook gives each decision and boundary a default, a reason to move off the default, and a place on a one-screen run card that travels with the prompt. It ships as modular chapters, nine templates, seven worked examples on fictional repositories, a Codex skill that drafts a run card and prompt without starting the task, an AGENTS.md snippet for standing rules, and a single-file edition generated from the chapters.

Two ideas run through it: a model's capability is not the session's authority, and the sandbox and approval policy enforce part of that authority but never replace writing it down. It separates a plain non-interactive codex exec run, where an action that needs approval fails, from one that sends approval requests to automatic review, and it treats automatic review as a reviewer of single actions, not as the task owner.

It is unofficial, and not affiliated with, endorsed by, or certified by OpenAI. Its recommendations are the author's, and it was drafted with AI assistance. Like its companion, the Claude Execution Playbook, it is not a clean-room build: it is a generalized rewrite of the portable ideas in a private execution framework, and it carries none of that framework's private names, systems, thresholds or data. Each playbook stands on its own.

Version 1.0.1 is a maintenance release. The checker now also checks the generated single-file edition, the skill's templates and the built release assets themselves, ties its one reviewed exception to one sentence and one rule, and catches more rewordings and run-card drift. The single-file edition carries its attribution and license URL. No template field, tier or piece of guidance changes meaning.

Architecture

The modular documents are the only source. A build script generates the single-file edition and the skill's reference files, fails in check mode when a generated file is stale, and packages release assets from the committed tree. A separate checker enforces the repository's consistency rules and treats every fenced block as a prompt. Versioned model names and prices live in one file with a verification date and a link to the OpenAI page each fact came from, and a check fails if they appear anywhere else.

  • Sources

    The only hand-edited documents

    Framework

    • chapters 00 to 08
    • quick reference
    • model-data.md

    Kit

    • templates
    • worked examples
    • skill/execution-brief
  • Generated

    Built from the sources; a stale file fails the build check

    • single-file edition
    • skill reference files
    • release assets and SHA256SUMS.txt
  • Tooling

    • scripts/build.py
    • scripts/check.py
    • unit and regression tests
    • CI workflow
The source documents, what is generated from them, and the tooling that keeps the two in step.

Core components

  • Chapters 00 to 08.Overview with eight common tasks, model selection (model, reasoning effort, Max and Ultra, speed), topology, strategy and packaging, prompt construction and AGENTS.md, authority and safety, workspace isolation and sessions, verification, fallback and escalation, completion and release.
  • docs/model-data.md.A dated snapshot of models, effort levels, speed and Codex settings, including how codex exec handles approvals, with a source link per fact. Treated as a snapshot to re-check, not a fact to depend on.
  • templates/ and examples/.Nine copy-ready templates, including an execution prompt with a fixed authority statement and a gated-change template; seven worked examples, from a routine task to independent verification and a session continued from a handoff note.
  • skill/execution-brief.A Codex skill that drafts the run card and prompt. It drafts only; it does not start the task or change the session's settings.
  • scripts/build.py and scripts/check.py.Generation, staleness checks and release packaging with a recorded source commit; and the consistency rules, including freshness, with regression fixtures that pin what they must catch and accept.

Engineering decisions

  • Model and effort chosen on purpose.The model-selection guide starts from the Everyday tier and the effort level the client selects, recorded explicitly, and says what justifies moving off each.
  • Enforcement is not permission.The sandbox and approval policy enforce part of the authority. The prompt still states all of it: scope, ownership, what needs asking first, and each release step.
  • Keep going, inside the brief.A run works through ordinary obstacles and leaves deliberate blockers alone, including an automatic-review denial. Persistence applies only to the work the brief authorizes.
  • Handoffs written down.Resuming a chat is for the next step of the same work item. At a natural boundary, such as planning to implementation or a full context, the work moves to a fresh chat through a handoff note that stands on its own, instead of relying on conversation history.
  • Volatile facts in one file.Model names, reasoning levels and product settings change often, so chapters and templates use tier names and only the model-data file carries versions, enforced by a check.
  • Drafting, not acting.The skill produces a brief for a person to review. It has no authority to start work.

Tradeoffs

  • Reasoned starting points, not measured ones.The suggested models, effort levels and settings are drawn from the vendor's guidance and the playbook's method. Nothing was benchmarked, and none of it is validated on any workload.
  • Checks of wording and structure.The checker catches the weakenings it was written for and close variants. It cannot read meaning, so a determined rewording can pass it, and the repository says so.
  • Codex specifics age.Commands, flags and settings are cited to the vendor documentation as of the verification date, and were spot-checked against one CLI version.

Verified functionality

Checked on every push by the repository's CI, and re-run for this page:

  • Internal links and heading anchors resolve
  • Every template has a copy block; every example is complete and each prompt in it follows a template it names
  • Every fenced block except mermaid diagrams is checked as a prompt: authority blocks are complete and keep their fixed sentences, and the Git and release line is a closed field that matches the example's run card
  • Prohibited actions appear in prompts only in restricted form, and the prose never permits them
  • No credential formats, plain or base64-encoded, and no private paths, in any text file
  • Versioned model names and prices appear only in the model-data file and the examples
  • The generated files match their sources and keep every prompt and safety clause; release assets build from the committed tree, and CI checks the built assets the same way
  • Regression fixtures: 43 deliberate weakenings that must be detected and 9 legitimate changes that must pass, and a release build whose packaging drops a safety clause

Demonstration

Like its companion, the playbook is documentation, so its demonstration is its own verification: the consistency checker that runs in its CI, and a rebuild of the release that is compared byte for byte with what was published.

The checker is run with --today set to the observation date, because its freshness rule depends on the date: it warns once the model data is more than 90 days older than that.

Consistency checks

Command: $ python3 scripts/check.py --today 2026-12-01

all checks passed (39 Markdown files)
Exit code 0. Recorded output, unedited.Links and anchors, template copy blocks, complete examples, every fenced block except diagrams checked as a prompt, credential and private-path screening, model names and prices confined to the model-data file, generated files in step with their sources, and the model data's verification date.

Rebuilding v1.0.1 and checking it against the published checksums

Command: $ python3 scripts/build.py --package > /dev/null && cd dist/release && curl -sSL https://github.com/Donovanfitch-dev/codex-execution-playbook/releases/download/v1.0.1/SHA256SUMS.txt | shasum -a 256 -c -

codex-execution-playbook-v1.0.1.md: OK
codex-execution-playbook-v1.0.1.zip: OK
codex-execution-playbook-skill-v1.0.1.zip: OK
Exit code 0. Recorded output, unedited.Every file rebuilt from the tagged commit matches the SHA256SUMS.txt attached to the published release.

Reproduce it

git clone https://github.com/Donovanfitch-dev/codex-execution-playbook.git && cd codex-execution-playbook
git checkout v1.0.1
python3 scripts/check.py
python3 scripts/build.py --package

Failure modes and limitations

  • No benchmarks.The suggested settings are reasoned starting points.
  • Illustrative examples.The example repositories are fictional, so their prompts have not been run against real code.
  • Static checks, not semantic safety.Passing the checker means the templates and examples keep their structure and fixed sentences. It does not prove that a prompt is safe.
  • Skill checked for format only.Its files follow the documented skill layout; the briefs it drafts have not been evaluated.
  • One CLI version.Flags and approval behaviour were checked against the documentation and spot-checked against one Codex CLI version; they were not exercised in live runs.
  • External links and model data are checked by hand.They are verified at release time, not on every push.

Testing and validation

On 2026-12-01, against commit 6b9401b, which the v1.0.1 tag points to: 32 tests passed (unit, packaging and the regression fixtures), the consistency checker passed on 39 Markdown files, and the build's stale-file check exited cleanly. The three published release assets matched SHA256SUMS.txt, and rebuilding them from the tagged commit produced byte-identical files. The repository's GitHub Actions workflow, which also runs Markdown lint, verifies the checksums and checks the built assets, concluded success on the same commit.


Source and documentation