Install a Codex-first autodev loop scaffold into a project. Use when Codex needs to turn a task list into a self-advancing dev-review loop driven by `plan.yaml`, `state.json`, `log.jsonl`, project-scoped custom agents, `AGENTS.md`, and a repo-local `Stop` hook continuation. Trigger when the user asks to "set up autodev loop", "bootstrap orchestrator workflow", "install plan-driven dev-review loop", "install dev and reviewer subagents", "initialize autodev memory", or explicitly invokes $dev-review-bootstrap.
Install a minimal project-local scaffold for an orchestrator-style autodev loop:
plan.yaml as the task source of truthstate.json as the machine-owned loop statelog.jsonl as append-only dev/review memory.codex/agents/autodev_dev.toml and .codex/agents/autodev_reviewer.toml as hard role separationORCHESTRATOR.md plus a managed AGENTS.md blockStop hook for automatic continuationThis skill is a bootstrapper. It installs the structure and wiring. It does not become the runtime orchestrator.
Treat the workflow as two layers:
Setup layer
Bootstrap only. Install files, ask the minimum questions, verify the scaffold, and hand off to the user.Runtime layer
A fresh main session becomes the orchestrator by reading the generated project files.Before writing files, ask only the minimum questions needed to make the scaffold usable. Prefer this order:
plan.yaml.Stop hook in .codex/hooks.json.done_when.Use defaults unless the user wants to customize them:
.codex/autodevplan.yaml, state.json, log.jsonlStopemptyIf the user has already supplied enough information in the request, do not ask again.
plan.yamlSupport exactly these plan seed modes:
empty
Create an empty task list and leave the loop idle.single-task
Create one initial task from the user's request.task-list
Create multiple tasks from a user-provided list.If the user says "set up the workflow first" without giving tasks, use empty.
Run:
python3 scripts/init_workflow.py \
--project-root <repo-root> \
--plan-mode <empty|single-task|task-list> \
[--task-title "..."] \
[--task-list-file <path>] \
[--test-command "..."] \
[--autodev-dir ".codex/autodev"] \
[--install-stop-hook]
Use scripts/init_workflow.py instead of hand-writing the scaffold. The script:
.codex/autodev/plan.yaml, state.json, log.jsonl, and ORCHESTRATOR.md.codex/agents/AGENTS.mdstop.py hook target.codex/hooks.json entry for automatic continuation in CodexIf files already exist, inspect them first. Do not overwrite non-empty workflow files unless the user explicitly asks.
After running the installer:
AGENTS.md block..codex/autodev/plan.yaml..codex/autodev/state.json..codex/autodev/ORCHESTRATOR.md..codex/agents/autodev_dev.toml and .codex/agents/autodev_reviewer.toml..codex/hooks.json points at .codex/autodev/hooks/stop.py.If the user asked for initial tasks, verify they landed in plan.yaml.
At the end of bootstrap, explicitly tell the user that setup is complete and that runtime should start in a fresh session.
Do not quietly assume the current bootstrap session should continue as the orchestrator unless the user explicitly asks for that.
Give the user a concrete next step. Use wording equivalent to:
Bootstrap is complete. Start a new Codex session at the repository root and send:
Read AGENTS.md and .codex/autodev/ORCHESTRATOR.md.
Act as the repository orchestrator.
Use the custom subagents autodev_dev and autodev_reviewer.
Continue the autodev loop until plan.yaml is done, paused, or blocked.
If the repo-local Stop hook was installed, mention that the new orchestrator session can auto-continue across turns.
Keep these boundaries explicit when explaining or adjusting the scaffold:
plan.yaml, state.json, and log.jsonlautodev_dev implements the current task and returns structured JSONautodev_reviewer stays read-only and returns accepted, changes_requested, or blockedThe setup layer should point the runtime layer at:
AGENTS.md.codex/autodev/ORCHESTRATOR.md.codex/autodev/plan.yaml.codex/autodev/state.json.codex/autodev/log.jsonlDo not silently install a user-level global hook. This skill should default to repo-local wiring.
assets/templates/ only when you need to inspect or patch the generated files.