A lightweight source template for adding a Codex app workflow to a repository.
Most Codex-enabled repositories need the same small set of workflow primitives:
- a durable repository contract in
AGENTS.md - a few high-value skills for planning, implementation, and change checking
- an optional place for repo-owned defaults or verification hints when a repository truly needs them
- explicit human review and merge responsibility
This template packages those pieces without adding a repo-local protocol or command-state machine.
-
Clone this repository and run
npm install. -
Run
npm testto confirm the template source repository is healthy. -
Bootstrap a target repository:
bash install.sh --repo /path/to/repo --template existing --source . -
Open the target repository in Codex app and read
AGENTS.md. -
Stay in the current thread by default.
-
For non-trivial work, use
plannerto clarify the intent first and then write the implementation plan. -
Implement with
implementer, then usechange-checkbefore commit or manual merge.
AGENTS.md
.agents/skills/codex-template/
docs/
template/
test/
tools/
install.sh
AGENTS.mdcarries the stable repo-level rules Codex should always know..agents/skills/codex-template/holds opt-in workflows for the few tasks that benefit from reusable guidance.template/contains the files that get installed into target repositories..codex/config.tomlstays available in the source repository, and target repositories can add it later if they need repo-owned defaults or verification hints.
existing: add Codex workflow files to an existing repository without replacing its READMEblank: initialize an empty repository with template defaults
- Start in the current thread.
- Open a new thread only when work can be reviewed independently.
- Add a worktree only when branch or filesystem isolation will reduce merge risk.
- Keep merge manual on purpose.
npm testruns the contract tests for this template repository.- Target repositories should let
change-checkinspect the repo, the diff, and nearby tests before choosing verification. - Optional hooks in
.codex/config.tomlcan speed up verification, but they are not the only source of truth. - Human review and merge remain explicit.
- Ask Codex to inspect the repo and clarify the task.
- Use
plannerif the task is ambiguous or spans multiple subsystems. Let it lock the intent before it writes the plan. - Make the smallest useful implementation with
implementer. - Use
change-checkto decide whether tests should be added or expanded, run the best-fit verification, and summarize the evidence. - Use the suggested commit message or adjust it, then let a human decide whether to commit or merge.
docs/codex-quickstart.md: quickstart guidance copied into target repositoriestemplate/: installed repository-level files such asAGENTS.mdand the bootstrap READMEtools/template-init.mjs: installer entrypoint used byinstall.sh