AgentKit
DocsKitsCLI ReferenceDesktop App
BetaYou are reading docs for the beta channel (2.13.0-beta.20). Features may change before the next stable release.Switch to stable →

ak plan

ak plan show

Show a plan from files first, best-effort-overlay index-owned fields, understand id forms and pointer resolution, and safely handle the current-plan pointer.

Use ak plan show to render one plan with its phases and full Markdown bodies from files, best-effort-overlaying index-owned fields from the local plan store.

Usage

ak plan show [id]

The command accepts at most one plan folder basename (for example, 260722-1200-my-plan) or the indexed <slug>/<timestamp> form, and has no command-specific flags.

Choose the plan

With an explicit ID, the command reads that plan's folder directly, then best-effort-overlays index fields. The ID may be either the plan folder basename (260722-1200-my-plan) or the indexed <slug>/<timestamp> form.

With no ID, the command resolves the current-plan pointer set by ak plan create or ak plan use. The pointer lives under .git and is readable even under a sandboxed $HOME. If the pointer is absent, invalid, or does not map to an existing plan, context resolution is used — the same issue/branch/worktree/project match ak plan resolve computes. Closed or archived plans can still be shown by explicit ID or a valid pointer; the context fallback considers active plans only.

Freshness, fallback, and privacy

The command reads plan.md and every phase file directly from the plan folder. It then best-effort-overlays index-owned fields — state, issue_number, linked_pr, current_phase, and per-phase rev, notes, evidence, acceptance, comment_id — from the local plan store when it opens. If the store cannot be opened (unwritable, corrupt, or schema newer than this CLI), the overlay is skipped and stderr carries a warning; the raw plan and phase bodies still render.

For a linked plan, show compares file modification times and refreshes the index from changed files before overlay. A failed refresh becomes a stderr warning and rendering proceeds with the unchanged index snapshot.

The raw bodies are read through a path-containment guard; unreadable body content is omitted.

Human and JSON output include raw plan and phase bodies without redaction. They can contain private notes, links, or evidence. Do not send the output to shared logs unless the plan content is safe to disclose.

The command is read-only on repository files, but freshness can update the local index and opening the store can create or migrate it. No network, auth, prompt, preview, force, snapshot, or rollback is involved. No-ID resolution runs local Git probes.

Output

JSON success uses kind=plan.show:

data.plan: plan summary
data.plan_body: raw plan.md text or an empty string
data.phases[]: plan_id, n, title, status, rev, body,
  notes, evidence, acceptance, comment_id

notes, evidence, acceptance, and comment_id come from the store overlay. When the overlay is skipped (store missing, corrupt, or schema newer than this CLI), those per-phase fields are absent. Human and plain modes print the plan header, body, and each phase body to stdout.

Exit behavior

ExitMeaningSafe next step
0The selected plan was rendered, possibly with a freshness/fallback warning.Review stderr and the returned bodies.
1The ID was missing, no context matched, or store/filesystem access failed.Pass an exact ID, run ak plan use, or repair/reindex the store.
2Too many arguments or invalid flags were supplied.Correct the invocation.