AgentKit
ReferenceCLI commands
BetaYou are reading docs for the beta channel (2.4.1-beta.1) — updated automatically on every beta release.Switch to stable →

CLI commands

ak plan add-phase

Append a new phase-NN-<slug>.md to an existing plan

Append a new phase-NN-<slug>.md to an existing plan

Create the next sequential phase-NN-<slug>.md file in the given plan directory, pre-populated with a template header and empty todo checkboxes.

Who it's for: Both: incremental planning and scripted plan construction.

When to use it: (unspecified)

What changes on disk: Creates phase-NN-<slug>.md in the plan directory.

Usage

ak plan add-phase <plan-dir> <name> [flags]

Examples

ak plan add-phase ./plans/my-plan "Deploy"
ak plan add-phase ./plans/my-plan "Integration Tests" --json

Flags

FlagDescription
-h, --helphelp for add-phase
--jsonEmit machine-readable JSON (implies --no-interactive)
--no-interactiveDisable interactive prompts (CI-safe)
-q, --quietSuppress non-error output on stderr
-V, --verboseExtra diagnostic output on stderr (loses to --quiet)
-y, --yesAssume yes for all prompts

Output modes

ModeBehavior
prettydefault on TTY (colors, ASCII markers)
plainauto when stdout piped or --no-interactive
json--json (single-object envelope, NDJSON-safe)

Exit codes

CodeMeaning
0success
1runtime error
2invalid flags
3user-cancel (SIGINT, prompt-cancel)
1plan directory not found or I/O error
2invalid arguments
  • ak plan — Manage AgentKit plan directories

On this page