- Node.js 20+
- Git
- rsync (for bootstrap.sh)
git clone https://github.com/mumit-khan/codex-dev-team.git
cd codex-dev-team
npm installnpm test # all unit tests (gate-validator, budget, visualize, etc.)All tests use Node's built-in node:test runner — no external test framework needed.
npm run lint # syntax checks on all .codex/ rule and schema filesThe lint step validates YAML/JSON syntax in rule files and checks that all gate schema files are valid JSON. It does not enforce style — keep your changes consistent with the surrounding code.
npm run parity:check # deep parity checks (125+ tests)The parity check compares codex-dev-team structural coverage against the
claude-dev-team reference. It exercises gate schema contracts, stage
ordering, track contracts, role presence, and adapter coverage.
Run this after any change to stage ordering, gate schemas, role definitions,
or track contracts. The check does not require claude-dev-team to be
checked out — all reference data is baked into scripts/parity-check.js.
This is a framework/template, not an application. There is no src/
directory in the repo itself — src/ is created by bootstrap.sh when
installing into a target project.
| Path | Purpose |
|---|---|
.codex/adapters/ |
Deployment adapter instructions |
.codex/prompts/roles/ |
Role prompts (PM, Principal, 3 devs, QA, Security, Reviewer) |
.codex/rules/ |
Pipeline rules, gate schema, escalation, orchestrator |
.codex/skills/ |
Shared skill definitions |
pipeline/ |
Runtime pipeline state (gates, context, artifacts) |
schemas/ |
JSON Schema files for gate contracts |
scripts/ |
CLI scripts (codex-team.js, gate-validator.js, budget.js, etc.) |
templates/ |
Artifact templates for each stage |
tests/ |
Unit tests |
bootstrap.sh |
Installs the framework into an existing project |
See AGENTS.md for the full role and command reference.
- Make your changes on a feature branch.
- Run
npm testto verify existing tests pass. - Run
npm run lintto verify syntax. - Run
npm run parity:checkif you changed stages, gates, roles, or tracks. - Add tests for new functionality in
tests/. - Open a PR against
main.
- Tests live in
tests/with the naming pattern*.test.js. - Use
node:test(describe,it,beforeEach,afterEach) andnode:assert/strict. - No external test dependencies.
- For scripts, spawn them as child processes and assert on exit codes and stdout.
- Create a temp directory in
beforeEachand remove it inafterEach— never write test artifacts into the repo root.
Example pattern:
const { describe, it, beforeEach, afterEach } = require("node:test");
const assert = require("node:assert/strict");
const fs = require("node:fs");
const os = require("node:os");
const path = require("node:path");
const { spawnSync } = require("node:child_process");
const ROOT = path.resolve(__dirname, "..");
describe("my script", () => {
let tmp;
beforeEach(() => {
tmp = fs.mkdtempSync(path.join(os.tmpdir(), "codex-mytest-"));
});
afterEach(() => {
fs.rmSync(tmp, { recursive: true, force: true });
});
it("does the thing", () => {
const result = spawnSync(process.execPath, [
path.join(ROOT, "scripts", "my-script.js"),
], { cwd: tmp, encoding: "utf8" });
assert.equal(result.status, 0);
assert.match(result.stdout, /expected output/);
});
});bootstrap.sh copies the framework into an existing project. If you modify it:
- Verify it is idempotent — running twice should not break anything.
.codex/is overwritten on every run (framework-owned).AGENTS.mdis created only if missing (project-owned).*.local.*files andsettings.local.jsonare always preserved.
- Create
scripts/<name>.js. - Add a
npm run <name>entry inpackage.json. - Wire the command into
scripts/codex-team.jsmain dispatch. - Update the
doctor()check array incodex-team.jsif the script must be present in every installed project. - Add tests in
tests/<name>.test.js.
- Add the schema to
schemas/stage-NN.schema.json. - Add the stage-specific fields to
.codex/rules/gates.md. - Add the stage config to the
STAGESobject inscripts/codex-team.js. - Update
orderedStageNames()andorderedStageNamesForTrack()if the stage is added to a track. - Run
npm run parity:check— if it fails, updatescripts/parity-check.jsto reflect the new expected state.
Codex Dev Team uses collapsed stage numbering that differs from
claude-dev-team:
| claude-dev-team | codex-dev-team | Name |
|---|---|---|
| Stage 4.5a | Stage 5a | Pre-review (lint/SCA) |
| Stage 4.5b | Stage 5b | Security review (conditional) |
| Stage 5 | Stage 6 | Peer code review |
| Stage 6 | Stage 7 | QA / tests |
| Stage 7 | Stage 8 | Sign-off and deploy |
| Stage 8 | — | (merged into Stage 8) |
| Stage 9 | Stage 9 | Retrospective |
The intent is that codex stages run 1–9 without decimal suffixes. Do not
change this numbering — it is intentionally collapsed. See
docs/parity/claude-dev-team-parity.md
for the Stage Numbering Divergence section and full parity rationale.
When porting content from claude-dev-team, translate stage numbers according
to the table above.
- Keep PRs focused: one feature or fix per PR.
- Title format:
type: short description(e.g.feat: add budget tracking,fix: gate round-counter reset after reviewer change). - Reference the parity check output in the PR description if you changed stage contracts.
- All 125+ parity-check tests must pass before merge.
- Do not bump
VERSIONorframework.versioninpackage.json/.codex/config.ymlin feature PRs — version bumps happen in a dedicated release PR.