Setup — Codex Machinae
Seeds the per-repo configuration the playbook's skill depends on. Run once
per repository, and again whenever the posture changes. The sibling
codex-machinae skill consumes what this writes; without it, tracker-bound
work (decision maps, tracking issues) has nowhere to publish and
profile-aware checklists cannot be graded.
What it seeds
| Key |
Consumed by |
| Project-size profile (Solo / Small / Large) |
Every checklist obligation (§2.5, Appendix A) |
| Issue-tracker binding |
Decision maps (§1.9), tracking epics and deprecation watches (§10), retrofit audit issues (§11.6) |
| Autonomy posture (L0/L1 enablement) |
The remediation ladder (§10.1) and its preconditions |
| Never-auto-merge additions |
Classification guardrails (§9.3) |
| Active domains and modules |
Which reference files sessions load (§2.2, §11.6.4) |
Steps
Locate the agent-configuration file (§2.4): CLAUDE.md,
AGENTS.md, AI-AGENTS.md, or the harness's equivalent, at the repo
root. If none exists, creating one is part of this setup. If a
## Codex Machinae configuration block already exists, switch to
update mode: show the current values and change only what the human
asks changed.
Gather the facts yourself — never ask the human for anything the
environment can answer. Read: git remotes (GitHub? GitLab? none?),
whether code and history already exist (greenfield vs retrofit),
CI configuration, package manifests that imply publishing, source-tree
hints of domains (mobile project files, firmware toolchains, ML
pipelines) and modules (auth code, payment SDKs, release tooling).
Put the decisions to the human, one question per round, each with a
recommended answer grounded in the facts from step 2:
- Profile — Solo, Small, or Large (§2.5). Recommend from team size
and repo history.
- Tracker —
github | gitlab | local (markdown fallback:
decision maps at docs/decisions/MAP.md, tickets as sibling files).
Recommend the forge the remote already points at.
- Autonomy posture — default is everything L2; enable L1 only when
CI, the correctness gate, and regression tests exist (§10.1); enable
L0 only on top of L1 for
safe-classified changes. Recommend the
highest level the repo's machinery actually supports, not more.
- Never-auto-merge additions — paths or patterns beyond the §9.3
defaults (deploy config, migrations, secrets-adjacent files).
Retrofit only (the repo has pre-existing code): walk the trigger
lists of D1–D7 and M1–M4 against the codebase (§11.6.4) and propose each
activation in the §2.2 form — "I suggest activating <D/M> because
<trigger evidence>. Cost of omission: <what goes unwatched>" — one
proposal per round, accepted, rejected, or deferred.
Write the block, with approval. The agent-configuration file is
human-only (§12.7.4): compose the full block (template below), show
it, and write it only after the human explicitly approves. Never
overwrite unrelated content in the file.
Verify and report. Re-read the file, confirm the block parses,
then report: what is configured, which lifecycle entry point applies
(Phase 0 for greenfield, Phase R for retrofit — the main skill takes it
from here), and whether the codex-machinae skill itself is installed
(if not, say where to copy it from).
Config block template
## Codex Machinae configuration
<!-- Seeded by setup-codex-machinae on YYYY-MM-DD. Human-only file (§12.7.4). -->
- **Profile:** Solo | Small | Large (§2.5)
- **Tracker:** github | gitlab | local — decision maps (§1.9) and tracking
issues (§10) publish here
- **Autonomy:** L0: off | on (classes: …) · L1: off | on · everything else L2 (§10.1)
- **Never-auto-merge additions:** <paths/patterns, or "none"> (§9.3)
- **Active domains:** <D1…D7, or "none yet">
- **Active modules:** <M1…M4, or "none yet">
- **Playbook source:** skill | playbook/ directory | codex-machinae.md monolith
Done when
Every key in the block holds a value the human chose (none defaulted
silently), the block is written into the agent-configuration file with the
human's approval, and the closing report names the lifecycle entry point.
The one legitimate partial outcome: the human defers a decision — record
the key as deferred: <reason> rather than inventing a value.
Part of Codex Machinae,
CC BY 4.0.
1---2name: setup-codex-machinae3description: Configure a repository for the Codex Machinae playbook — project-size profile, issue tracker, autonomy posture, module activation.4---56# Setup — Codex Machinae78Seeds the per-repo configuration the playbook's skill depends on. Run once9per repository, and again whenever the posture changes. The sibling10`codex-machinae` skill consumes what this writes; without it, tracker-bound11work (decision maps, tracking issues) has nowhere to publish and12profile-aware checklists cannot be graded.1314## What it seeds1516| Key | Consumed by |17|---|---|18| Project-size profile (Solo / Small / Large) | Every checklist obligation (§2.5, Appendix A) |19| Issue-tracker binding | Decision maps (§1.9), tracking epics and deprecation watches (§10), retrofit audit issues (§11.6) |20| Autonomy posture (L0/L1 enablement) | The remediation ladder (§10.1) and its preconditions |21| Never-auto-merge additions | Classification guardrails (§9.3) |22| Active domains and modules | Which reference files sessions load (§2.2, §11.6.4) |2324## Steps25261. **Locate the agent-configuration file** (§2.4): `CLAUDE.md`,27 `AGENTS.md`, `AI-AGENTS.md`, or the harness's equivalent, at the repo28 root. If none exists, creating one is part of this setup. If a29 `## Codex Machinae configuration` block already exists, switch to30 **update mode**: show the current values and change only what the human31 asks changed.32332. **Gather the facts yourself** — never ask the human for anything the34 environment can answer. Read: git remotes (GitHub? GitLab? none?),35 whether code and history already exist (greenfield vs retrofit),36 CI configuration, package manifests that imply publishing, source-tree37 hints of domains (mobile project files, firmware toolchains, ML38 pipelines) and modules (auth code, payment SDKs, release tooling).39403. **Put the decisions to the human, one question per round, each with a41 recommended answer** grounded in the facts from step 2:42 - **Profile** — Solo, Small, or Large (§2.5). Recommend from team size43 and repo history.44 - **Tracker** — `github` | `gitlab` | `local` (markdown fallback:45 decision maps at `docs/decisions/MAP.md`, tickets as sibling files).46 Recommend the forge the remote already points at.47 - **Autonomy posture** — default is everything L2; enable L1 only when48 CI, the correctness gate, and regression tests exist (§10.1); enable49 L0 only on top of L1 for `safe`-classified changes. Recommend the50 highest level the repo's machinery actually supports, not more.51 - **Never-auto-merge additions** — paths or patterns beyond the §9.352 defaults (deploy config, migrations, secrets-adjacent files).53544. **Retrofit only** (the repo has pre-existing code): walk the trigger55 lists of D1–D7 and M1–M4 against the codebase (§11.6.4) and propose each56 activation in the §2.2 form — *"I suggest activating `<D/M>` because57 `<trigger evidence>`. Cost of omission: `<what goes unwatched>`"* — one58 proposal per round, accepted, rejected, or deferred.59605. **Write the block, with approval.** The agent-configuration file is61 **human-only** (§12.7.4): compose the full block (template below), show62 it, and write it **only after the human explicitly approves**. Never63 overwrite unrelated content in the file.64656. **Verify and report.** Re-read the file, confirm the block parses,66 then report: what is configured, which lifecycle entry point applies67 (Phase 0 for greenfield, Phase R for retrofit — the main skill takes it68 from here), and whether the `codex-machinae` skill itself is installed69 (if not, say where to copy it from).7071## Config block template7273```markdown74## Codex Machinae configuration7576<!-- Seeded by setup-codex-machinae on YYYY-MM-DD. Human-only file (§12.7.4). -->7778- **Profile:** Solo | Small | Large (§2.5)79- **Tracker:** github | gitlab | local — decision maps (§1.9) and tracking80 issues (§10) publish here81- **Autonomy:** L0: off | on (classes: …) · L1: off | on · everything else L2 (§10.1)82- **Never-auto-merge additions:** <paths/patterns, or "none"> (§9.3)83- **Active domains:** <D1…D7, or "none yet">84- **Active modules:** <M1…M4, or "none yet">85- **Playbook source:** skill | playbook/ directory | codex-machinae.md monolith86```8788## Done when8990Every key in the block holds a value the human chose (none defaulted91silently), the block is written into the agent-configuration file with the92human's approval, and the closing report names the lifecycle entry point.93The one legitimate partial outcome: the human defers a decision — record94the key as `deferred: <reason>` rather than inventing a value.9596---9798*Part of [Codex Machinae](https://github.com/SOsintOps/codex-machinae),99CC BY 4.0.*