init subcommand creates the .agent/tasks/<TASK_ID>/ directory, writes all required artifact files from templates, installs Codex and Claude subagent files, and inserts or updates managed workflow blocks in AGENTS.md and the repo’s Claude guide file.
Usage
Flags
Task identifier. Allowed characters: letters, numbers, dot, underscore, and hyphen. Path separators and
.. are rejected. Example: feature-auth-hardening.Optional path to a task description file. The file’s content is read and used to seed
spec.md as the initial task statement.Optional inline task text to seed
spec.md. Use this instead of --task-file when you want to supply the task statement directly on the command line.Optional working directory inside the repo. Defaults to the current directory. The script walks up from this path to discover the git repository root.
Which guide files to create or update. Accepted values:
auto, agents, claude, both, none.auto: Preserves existing guide files and ensures the product-native guide exists when its agent set is being installed. Creates both guides when neither exists.agents: Write or updateAGENTS.mdonly.claude: Write or update the Claude guide (CLAUDE.mdor.claude/CLAUDE.md) only.both: Write or update both guide files unconditionally.none: Skip all guide file updates.
Which project-scoped subagent sets to install or refresh. Accepted values:
both, codex, claude, none.both: Install subagent files into both.codex/agents/and.claude/agents/.codex: Install into.codex/agents/only.claude: Install into.claude/agents/only.none: Skip subagent installation.
Overwrite existing task artifact templates. Without this flag, existing files are left untouched. Guide files are always upserted regardless of
--force.What init creates
Task artifact directory
Creates
.agent/tasks/<TASK_ID>/ and writes all required files from templates:evidence.json and verdict.json are created with valid placeholder content so validate can run immediately. raw/screenshot-1.png is created as a minimal placeholder PNG.Guide file updates
Inserts or refreshes managed workflow blocks in (controlled by
--guides):AGENTS.mdCLAUDE.mdor.claude/CLAUDE.md
CLAUDE.md and .claude/CLAUDE.md exist, the repo-root CLAUDE.md is updated and .claude/CLAUDE.md is left untouched.In Claude Code, if
init created or refreshed .claude/agents/ during a running session, start a new Claude Code session before expecting those agents to appear. Use /agents to inspect available agents.JSON output
init prints a JSON object to stdout:
guide_file_actions values are "created", "appended", or "updated" depending on whether the guide file was new, had no managed block yet, or already contained a managed block that was replaced.
Files already present and not overwritten are omitted from created_or_overwritten_task_files.