Skip to content

Latest commit

 

History

History
378 lines (256 loc) · 46.8 KB

getting-started.md

File metadata and controls

378 lines (256 loc) · 46.8 KB

Getting Started

What you need

  • Node.js 22.12+
  • A git repository (recommended; staging and prod routines use it)
  • Cursor, Claude Code, or just a terminal

Install the kit

cd your-project
npx @dadado/agent-kit-cli@latest install

Use @latest so npx does not reuse a stale cached CLI after a new publish. Pin with npx @dadado/agent-kit-cli@x.y.z install for reproducible setups. In CI or scripts, use npx -y @dadado/agent-kit-cli@latest install --yes. If npx @dadado/agent-kit-cli --version is behind npm view @dadado/agent-kit-cli version, rerun with @latest or clear the npx cache (npm cache clean --force / delete the _npx cache).

No Node available? install.md documents a manual copy path for the base files without the CLI. Provisioning a fresh Ubuntu 24.04 server with no Node.js? Ubuntu 24.04 bare-metal install adds a Node bootstrap in front of this same command.

First session in Cursor

Open the Agent chat and type /start-project with your goal. The kit runs a broad intake, writes a plan with to-dos, and stops. You approve the plan, then approve the first unit. Goal text is not execute permission; the kit waits for both gates.

From there:

  • /continue-plan ships exactly one unit and stops.
  • /run-plan keeps going until the plan is done or blocked.
  • /git-staging lands the work on the staging branch through a PR.
  • /git-prod promotes staging to main, and only after an explicit Ask.

First session from the terminal

With cursor-agent or claude on PATH, start a kit command without opening chat:

npx @dadado/agent-kit-cli run backlog-add
npx @dadado/agent-kit-cli run continue-plan
npx @dadado/agent-kit-cli run-plan-all

--backend auto (the default) picks the first installed agent CLI. Cursor Ask questions stays Cursor-only; headless confirmations are a numbered list, answered from the terminal (or the live TUI) and relayed back into the same agent session — the run does not just print the gate and exit. agent-kit run git-prod is refused: /git-prod stays operator-gated and is never auto-promoted. agent-kit run run-plan wraps the existing one-tick loop. agent-kit run-plan-all (same as agent-kit run run-plan-all) dispatches .cursor/commands/run-plan-all.md, not that tick loop. Typing /run-plan-all in zsh is a filesystem path; use agent-kit run-plan-all. agent-kit run-plan --backend claude (or agent-kit run run-plan --backend claude) runs that tick loop on Claude Code headless (claude -p): same one-to-do tick contract, same LOOP_TICK_RESULT sentinel, never /git-prod. On a TTY the run renders as the Mission Control live view (progress bars, a scrolling status-line log, no raw stream JSON in the terminal); --plain forces plain status lines, and --no-hitl stops the run at the first gate instead of prompting (for CI). Flags, env and the full HITL relay contract are in the consumer configuration CLI table. To stop repeating --backend and --model, set them once under roles in .cursor/context/config.json or in Mission Control Config > Model roles (model roles).

Watch progress

Two views of the same state, both named Mission Control:

  • Terminal TUI: npx @dadado/agent-kit-cli mission-control. Live in a TTY (q or Ctrl-C quits); --once for a single frame. It reads the same data as the browser dashboard and does not start an HTTP server. On a color TTY, field labels use the muted visual-kit token and status values use the dashboard green / yellow / red / cyan tokens; NO_COLOR, CI, and non-TTY frames stay uncolored.
  • Browser: npx @dadado/agent-kit-cli dashboard (or /dashboard from chat). Binds to 127.0.0.1 by default. To share on your LAN, use dashboard-broadcast with its required token. In Cursor, /dashboard opens the panel once, as a tab in Cursor's own browser inside the editor area. Split that tab right to keep Mission Control beside your code; in the Agents Window it opens as a pane beside the chat.

The browser dashboard ships inside the CLI package since 4.8.2. The install does not copy a dashboard/ folder into your project; that is expected.

What the kit will not do

  • It will not push to production without your explicit confirmation.
  • It will not treat docs as proof. Code, tests, and shipped artifacts are the delivery truth.
  • It will not pretend VS Code or Windsurf are peer surfaces. They get partial generators; Cursor is the primary IDE.

Project root guard

install and update check that the target directory looks like a project root before writing anything. Three shapes are refused:

Refused shape Why
/ or your home directory Never a project root
Neither .git nor .cursor/agent-kit.json Nothing marks it as a project yet
Has .git and two or more immediate child directories that are themselves repositories Looks like a parent-of-repos folder, so L0 would land one level above the project you meant

In an interactive terminal a refusal becomes a warning plus a Proceed anyway? prompt that defaults to no. In non-interactive mode (--yes, CI=true, AGENT_KIT_YES=1, piped stdin) it is final: exit 1, nothing written.

--force-root is the explicit bypass:

npx @dadado/agent-kit-cli@latest install --force-root

It skips every root check, so confirm the absolute path yourself before using it. install, update, and init all take the same flag. A folder that already has .cursor/agent-kit.json is never flagged as a parent-of-repos - you confirmed that root on the first install.

Starting from an empty folder

A brand-new folder has no .git and no manifest, so the guard above stops there by design - L0 in the wrong directory is worse than a refusal. The CLI prints the three sanctioned ways forward; pick one:

Path Command When
Initialize Git first (recommended) git init then re-run the install You want readiness pillars and the /git-staging → /git-prod flow to work. Local-only Git is enough - no remote required
Install without Git npx @dadado/agent-kit-cli@latest install --force-root You are not ready to decide on Git yet
Say yes at the prompt Run the install in an interactive terminal and answer yes to Proceed anyway? Same as --force-root, just interactive. The prompt defaults to no

Either of the last two installs L0 into a folder with no Git. That is supported, not a broken state: /agent-kit-onboard owns the Git pillar and will offer Keep repository without Git / Initialize local Git when you run it. The CLI never runs git init for you.

--yes / CI / a piped stdin removes the interactive option, so automation needs git init or --force-root.

After install checklist (personal path)

Keep this path light. No extra runtime packages beyond the CLI (@clack/prompts, citty, kolorist only). TTY chrome (spinners, tips) is ANSI in the CLI package; do not add ora, figlet, chalk, or ink.

  1. Node.js 22.12+ - required for the CLI (engines in package manifests). npx @dadado/agent-kit-cli <subcommand> needs nothing else installed; npm i -g @dadado/agent-kit-cli is what puts a bare agent-kit on your PATH.
  2. Git - recommended so readiness pillars and /git-staging → /git-prod work; local-only Git is valid.
  3. Install - npx @dadado/agent-kit-cli@latest install (or Port B via install.md).
  4. Onboard - /agent-kit-onboard until every essential readiness check is ready (non-essentials may defer with a recovery action).
  5. Kit commands - e.g. /start-project in the consumer project.
  6. Mission Control (optional) - Browser panel: /dashboard, npm run dashboard, or npx @dadado/agent-kit-cli dashboard (bare agent-kit dashboard only after a global install). Browser-free TUI: npx @dadado/agent-kit-cli mission-control (live view on a TTY; q or Ctrl-C quits) or mission-control --once for a one-shot ASCII snapshot (Claude Code /agent-kit uses this path). The TUI is a third surface; it does not replace the web dashboard. Consumer L0 does not copy dashboard/ into the project. The dashboard subcommand resolves dashboard/start.mjs from the installed package (4.8.2 onward); on older pins use a kit checkout or env/sibling discovery. Loopback only (127.0.0.1) by default. Opt-in LAN: npx @dadado/agent-kit-cli dashboard-broadcast / npm run dashboard:broadcast (token-gated) binds the same per-workspace port allocation as /dashboard (3333-3588 unless PORT is set), so it starts beside an already-running Mission Control - this workspace's loopback panel, another workspace, or an unidentified listener is skipped and left running, never killed. It prints a Mission Kit Share URL (https://missionkit.io/mc/open.html#…, BYO HTTPS via MISSION_CONTROL_SHARE_BASE; set off for LAN-only). The Share URL embeds the live token (same secret handling); soft TTL is advisory (MISSION_CONTROL_SHARE_TTL_SEC, 0 = never). Still requires trusted-LAN reachability; not a WAN relay. The slash /dashboard-broadcast ships in the factory checkout and CLI docs only (not an L0 consumer artifact); consumers use the CLI/npm entrypoints above. CLI/OS opens use one preferred browser (missionControl.preferredBrowser, MISSION_CONTROL_PREFERRED_BROWSER, or --browser; platform-specific name, not a path) or the OS default; slash /dashboard opens via IDE browser MCP only (not multi-browser). Posture: Mission Control production-ship constraints.

The commands you get

How to invoke them

npx @dadado/agent-kit-cli install is ephemeral: npx downloads the package, runs it, and leaves nothing on your PATH. After it finishes, a bare agent-kit … is command not found unless you install the package globally. Two honest forms:

# Keep using npx (nothing installed globally). Pin so a cache cannot serve an old CLI.
npx -y @dadado/agent-kit-cli@latest status

# Or install the bin once, then call it bare (pin the version you just ran)
npm i -g @dadado/agent-kit-cli@latest
hash -r
agent-kit --version

npx and PATH are two different binaries. If npx -y @dadado/agent-kit-cli@latest --version is 5.8.0 but agent-kit prints 5.7.0, do not run agent-kit update or init: that PATH hit re-stamps 5.7.0. Keep the npx pin, or run npx -y @dadado/agent-kit-cli@latest setup-global. Install/update print this split and, on an interactive TTY with a writable npm prefix, try npm i -g at the running version. hash -r clears a zsh hashed path.

Blocked on the global install by a root-owned npm prefix (EACCES)? Run npx -y @dadado/agent-kit-cli@latest setup-global: it self-heals the prefix, fixes PATH, and reinstalls. install/init also print this automatically when a current agent-kit is not on PATH.

mise with node = "latest" (the Omarchy default, among others): every node patch is a new install directory, and npm i -g globals stay behind in the old one. After the next node upgrade agent-kit is gone or old, and nothing warns you. Declare the CLI as its own mise tool instead, in ~/.config/mise/config.toml:

[tools]
"npm:@dadado/agent-kit-cli" = { version = "latest", allow_low_downloads = true, minimum_release_age = "0s" }

Then mise install and agent-kit --version. Remove an older global first (npm rm -g @dadado/agent-kit-cli) so only one agent-kit is on PATH. Both options are needed: a bare mise use -g npm:@dadado/agent-kit-cli is refused by mise's low-download guard, and mise's default minimum release age resolves latest to an older release. This entry was checked with mise 2026.11.10 on Linux; older mise versions, macOS and Windows are untested, and an older mise that does not know allow_low_downloads or minimum_release_age may ignore them or reject the line.

The same trap exists with every per-version node manager. agent-kit doctor names yours in its install: section and prints the fix for it:

Node manager Why the CLI disappears Fix
mise (node = "latest") Each node patch is a new, empty install directory The [tools] entry above
nvm Globals live in ~/.nvm/versions/node/<ver> nvm install <new> --reinstall-packages-from=<old>, or install under a fixed prefix: npm i -g --prefix ~/.local @dadado/agent-kit-cli with ~/.local/bin on PATH
nvm-windows Globals live in %NVM_HOME%\<ver> nvm use <new> then npm i -g @dadado/agent-kit-cli
fnm Globals live in fnm/node-versions/<ver>/installation fnm use <new> then npm i -g @dadado/agent-kit-cli
Volta, Homebrew node, system node Not affected: globals survive a node upgrade Nothing to do

Only the mise line was run on a real machine (Linux). The nvm, nvm-windows and fnm fixes follow each manager's documented behavior and are untested on macOS and Windows.

The table below lists subcommands. Prefix each one with npx @dadado/agent-kit-cli (or with agent-kit after a global install). Most slash commands (/agent-kit-onboard, /start-project, …) are IDE chat commands and need neither. Typing /run-plan-all in zsh is a filesystem path; use agent-kit run-plan-all (or agent-kit run run-plan-all).

Subcommand What it does
install [profile] Install the base kit, run readiness, apply safe local fixes
init Compatibility entry that runs the same install and readiness workflow
doctor Print or repair repository readiness (--json, --fix-safe); --json includes an env pillar (bin-on-PATH, npm prefix writability, Node version, shell profile)
setup-global Self-heal a root-owned npm global prefix: relocate to ~/.npm-global, fix PATH, reinstall globally (--dry-run, --yes/-y)
add <id> Add one skill or pack later
status Show install state, readiness summary, and profile origin
update --check Notify-only version compare vs public tags (no L0 writes)
cursor-awareness --check Opt-in advisory: Cursor changelog vs native-audit inventory (no apply)
update Explicit apply: pull latest rules/commands; leaves your own files alone
update --all Operator-typed only: update every repo in the install index, one chore/kit-X.Y.Z branch and one PR/MR per repo, after one plan table and one confirm (--include-worktrees to include worktrees)
installs [list|scan|prune] The per-machine index of kit installs (~/.config/agent-kit/installs.json) that the update notice and update --all read
diff Show what changed between what you have and the latest
contribute Send an improvement you made locally back upstream
handoff Save your progress to .cursor/HANDOFF.md
run <slash> One headless session from an L0 slash file (numbered-list HITL; never git-prod)
run-plan Headless continuous plan runner (tick loop; never git-prod)
run-plan-all Headless /run-plan-all queue from the L0 file. per-plan-release ships inside that contract. agent-kit run git-prod stays refused
countdown One-shot launcher for a cron or systemd timer: one headless job with --no-hitl --land-on-gate, refused while a gate exit is pending (detail)
ground-control Morning triage of gate exits: status, accept <stamp> once the branch is merged, discard <stamp> (detail)
commands List the workspace's slash commands with their descriptions, whether they ship with the kit, are maintainer-only or were added by the project, and whether the kit can run them headless; --json prints the versioned catalog IDE hosts read (contract)
mission-control ASCII Mission Control (mission, flight log, checklist, crew monitor); live TTY quits with q or Ctrl-C; --once prints one frame
scan Just scan the project, don't install

Optional: add mission-kit-comms drafts recap/release/contributor copy. It does not post. Ask before any public network. Guide: comms.md.

A normal day

The idea is simple: work against a plan, save your place before a conversation gets too big, and (in manual mode) keep one phase per chat. Continuous and queue modes are opt-in denser paths under Less babysitting. Modes overview: plan-routine §5.

Manual playbook (default)

Operator sequence when you drive each unit (command SoT: .cursor/commands/continue-plan.md; Gate A/B SoT: .cursor/commands/start-project.md):

  1. /agent-kit-onboard (first time / incomplete readiness) - Repository preparation only: show detected facts, safe fixes, and one pending decision at a time via Ask questions. Completes when essential readiness checks pass (or allowed non-essential items are deferred with a recovery action). Skins and external review stay optional after essentials. Path after CLI install: open the folder in Cursor → /agent-kit-onboard → /start-project. Contract: repository-readiness-onboarding.md.
  2. /start-project - After the repository is prepared, Broad Intake Review (buckets listed in the command, including Unprocessed dogfood from dogfood/README.md or .cursor/dogfood/README.md under ## or ### Unprocessed Files) and two gates using Ask questions: (A) the agent proposes and writes a plan with checkable to-dos (no coding yet); (B) only after you confirm, it runs the first unit. Broad Intake's Memory bucket consults .cursor/memory/plan-monitor-*.md and theme-matched plan-review-* audits (duplicates / open residuals / outdated reviews) without changing Field Report detection. Unprocessed dogfood uses the same triage labels and never auto-analyzes (ADR 2026-08-11_dogfood-unprocessed-broad-intake-bucket.md). Uses clickable options with chat fallback when tool unavailable. Goal text in the same message is not execute permission. 1b. Backlog without activation - /backlog-add runs the same Broad Intake (including plan-monitor consult and Unprocessed dogfood), writes a plan, and appends it under HANDOFF Backlog plans (no Gate B, never parks or activates the new plan). Manage rows with /backlog-edit, /backlog-delete (move to .cursor/plans/archive/), and /backlog-cancel (soft-cancel open to-dos, keep the file). All mutates use Ask questions (chat numbered-list fallback). Distinct from /archive-plan (parked list only). Routine backlog CRUD does not create Field Report cards.
  3. Confirm the unit, then work one phase. On /continue-plan (and after Gate B on a new plan), the agent uses Ask questions before editing (Start [to-do-id] / Edit plan first / Switch to different plan / Stop here). Before that Ask, if Unprocessed dogfood is non-empty, it may Ask Analyze inbox now / Enqueue Fix now / Not now (never auto-analyze; never block solely for inbox). After you pick Start, it implements only that phase (or one heavy to-do), checks it off, updates .cursor/HANDOFF.md, and stops. Context Guardian plus native Cursor hooks (sessionStart / preCompact) enforce that boundary; multi-phase in one window needs /run-plan or /run-plan-all below. /run-plan and /run-plan-all apply the same inbox Ask on first tick / queue confirm (per-plan workers skip a second Ask).
  4. Suggest staging when there is a diff. After the unit, the agent should suggest /git-staging (you run it when ready). Do not expect automatic promote to production; /git-prod is always a separate HITL step.
  5. Handoff if the window fills. /handoff (or guardian auto-handoff when configured) writes where things stand before context is lost.
  6. New chat → paste /continue-plan. Open a fresh conversation for the next phase. The agent reads HANDOFF, confirms the next unit again, and continues without you re-explaining the project. Chat tone follows the Autopilot persona by default (see personas contract). Mission Control Checklist Actions can copy /continue-plan <plan>; Current mission shows operator-friendly Mode labels (auto mode / run all / human-in-the-loop; HANDOFF keeps raw Mode tokens) and offers copy-only /git-staging (and mode-aware /continue-plan when Mode is manual).

Which command next?

You want… Paste / run
Prepare the repo (first time or blocked essentials) /agent-kit-onboard
Create a plan; run the first unit only after confirm /start-project
Enqueue a plan without activating it /backlog-add
Resume the next phase yourself (default) New chat → /continue-plan
Run one plan to the end (auto staging per tick) /run-plan
Narrow urgent fix as a mini plan, then run ticks /hotfix
Run several plans as one ordered queue /run-plan-all
Test a release or bug against CHANGELOG claims /qa
Commit / MR to staging after a manual unit /git-staging
Promote staging → main /git-prod (explicit confirm only)

Factory landing wrap (not consumer L0): /kit-staging / /kit-prod when those files exist. Mission Control TUI stays a third-surface viewer (ADR 2026-08-27_cli-native-mission-control-tui-thin-deps-third-surface.md).

Do not re-author Gate A/B or continuous tick contracts here; link L0 commands when you need the full contract.

Coming from Spec Kit (SDD)

GitHub Spec Kit slash commands map onto existing Agent Kit surfaces. The kit does not install the Spec Kit CLI or a .specify/ tree. Durable ranks: ADR 2026-08-14_spec-kit-sdd-adapt-ignore.md.

Spec Kit Agent Kit
constitution .cursor/rules/, AGENTS.md
specify / plan / tasks .cursor/plans/ + frontmatter to-dos
clarify Ask questions HITL
analyze / converge audits + /plan-review-triage

Keep kit-native HITL, staging→prod, and post-ship audits. Do not import a second constitution file or auto-append residuals without triage.

File, run, audit, triage

Stay on the main commands. Specialist slashes remain the contracts and are invoked from those mains.

  1. File — /dogfood <topic> writes a private note. Filing is not ingest.
  2. Run — /continue-plan, /run-plan, /run-plan-all, or /backlog-add. When Unprocessed is non-empty, those commands may Ask Analyze inbox now / Enqueue Fix now / Not now. Analysis and memory WRITE start only after that HITL. Notes become plans or memory, never plan-monitor-*.md.
  3. Audit — when externalPlanReview.enabled is true, /run-plan and /run-plan-all arm, wait, and rearm leftover wait budget on exit 3. Use /plan-external-review only for paste or manual re-arm.
  4. Triage — after wait exit 0, the same run continues into /plan-review-triage (no silent-Ack). Prefer Ack / Fix nits when residuals are process-only.
  5. QA — /qa tests a release or bug against CHANGELOG claims, the install journey, and tests. It is not a plan audit (/plan-external-review) and not the dogfood inbox.

Details: external plan review. Routing ADR: 2026-08-14_main-command-dogfood-audit-routing.md. /qa contract: .cursor/commands/qa.md.

Keeping Mission Kit current (consumers)

  • Update notice (on by default, check-only): at most once a day the CLI asks npm for latest and compares it with the CLI, and compares every registered install with the CLI. When something is behind, sessionStart prints one line naming the command to run, and Mission Control Health shows one Updates card. It is silent when everything is current, off under CI, and off with updateCheck.enabled: false in .cursor/context/config.json or AGENT_KIT_NO_UPDATE_CHECK=1 (NO_UPDATE_NOTIFIER=1 works too). It never applies anything.
  • Manual check: npx @dadado/agent-kit-cli@latest update --check --json.
  • Apply: upgrade the CLI first if it is behind the target release (npm i -g @dadado/agent-kit-cli@<latest>) — agent-kit update stamps the manifest with the version of the CLI running it, so a stale binary re-applies the old version. Then run /update and confirm with Ask questions (or an explicit terminal agent-kit update). An apply whose registry is newer than the binary refuses with the pinned remedy. Never silent L0 overwrite; updateApply.auto defaults to false.
  • Every repo at once: agent-kit installs scan fills the install index; then, in your own terminal, agent-kit update --all. It refuses inside an agent session and without a TTY, stops when the CLI is not the npm latest, prints one plan table (current and target version, pre-prod branch and how far behind, dirty kit files, queue lease, skip reason), and asks once. Each repo then gets its pre-prod branch fast-forwarded, a fresh chore/kit-X.Y.Z branch with only the kit files committed, a push and one PR (gh) or MR (glab -R host/group/repo). A repo without a remote gets the branch and commit only. Worktrees, fixtures, the kit's own repo, the home install, a live writer, a diverged pre-prod branch, dirty kit files and a major jump (for example v5 to v6, which needs a single-repo update) are skipped with a reason. It never merges: the PRs/MRs are yours to review and merge, and a rerun skips the ones already open.
  • Not the same as public sync (factory publish) or remote-cache refresh on resolve.

Agent Personas

Personas change chat tone and CLI tick banners only. Defaults by mode: Autopilot for /continue-plan, Night Shift for /run-plan, Ghost Runner for agent-kit run-plan. They never alter commits, HANDOFF, memory, or product documentation. Configure them after readiness (personalization step, Mission Control Config under More, or edit agentPersona in .cursor/context/config.json). Contract and contribute path: personas-contract.md, creating-personas.md.

For the full list of consumer-configurable knobs (session config, dashboard skin, install-time choices, CLI flags) with copy-paste snippets for each, see consumer-configuration.md.

Less babysitting

  • /run-plan - the agent works through the plan to the end, checking off to-dos and pushing to staging when there's something to commit (Night Shift chat chrome by default). It picks the best execution strategy itself: worker delegation when your setup supports it (keeps the main chat from filling up), a same-chat loop otherwise. It never promotes to production on its own. The old /run-plan-loop and /run-plan-orchestrated still work as deprecated aliases.

  • /hotfix - for a narrow urgent change (icons, copy, one CSS token): confirm → write a mini plan → run the same /run-plan tick contract continuously. Prefer /start-project when scope is ambiguous or multi-domain. Full spec: .cursor/commands/hotfix.md.

    • Model / quota tip: prefer a named model (Claude Opus, Sonnet 4.6, Composer 2.5 Fast) over Auto for long continuous runs. Auto and named models may use separate quota buckets; Auto can fall back after a limit and lose Ask questions. If you stay on Auto, set interTickCooldownMs to 15000 in Mission Control Config or .cursor/context/config.json (default stays 0 so named-model runs are not slowed). After an API-limit hard stop, do not expect the next tick to auto-resume until you confirm recovery. Do not throttle Mission Control refresh to "save" Agent quota (dashboard is local-only). When authoring plans, split docs-only close-out to-dos from product read_scope ticks so more Auto ticks qualify for inline-first (plan-routine §6).

    Note for headless/scheduled execution: If running continuous plan loops or scheduled agents outside the IDE (e.g. via agent-kit run-plan --backend cursor-agent|claude or scripts/plan-loop.sh), use a separate git worktree or clone rather than sharing an interactive working tree. This prevents conflicts between automated commits and manual work.

  • /qa - test a release, reproduce a bug, or check that CHANGELOG feat/fix/chore claims work (install journey included). Reports pass/fail with evidence; does not silent-fix product bugs (residuals go through /backlog-add). No new L0 agent. Full spec: .cursor/commands/qa.md. Playbook: .cursor/skills/core/qa/SKILL.md.

  • /run-plan-all - run multiple plans as one ordered, deduplicated queue. Use it when Gate-A backlog plans have piled up, scopes overlap, or you want batch throughput instead of activating /run-plan plan by plan. Full command spec: .cursor/commands/run-plan-all.md. Operator detail below; modes overview also in plan-routine.md and the root README.

    1. PO synthesis - a read-only Task(explore) scans recent merges, commits, CHANGELOG, HANDOFF, and every eligible plan, then returns a proposed execution order with overlap and consolidation notes. The main window reviews that report only.

    2. Confirm queue - mandatory Ask questions gate. Run labels other than Run plans only set Ship auth per-plan-release (one release per completed plan). Run plans only does not promote.

      Option What it does
      Run as proposed Apply approved merges/drops, write queue to HANDOFF, start execution, ship one release per completed plan
      Run plans only Same execution, no promote
      Edit order Apply consolidations, then run your custom order, then ship per plan
      Apply merges & drops only Apply consolidations; keep heuristic order; ship per plan
      Keep all plans as-is No plan-file mutations; run the proposed order; ship per plan
      Include Gate-B plans Re-run synthesis with Gate-B-awaiting plans included (when any exist)
      Cancel Abort; HANDOFF unchanged
    3. Execute - after you confirm, the main window is a pure orchestrator: it dispatches one Task subagent per plan (each runs the /run-plan tick contract). It never implements to-dos in-window. Plans run sequentially, not in parallel. After each completed plan, when Ship auth is per-plan-release, it ships one release and waits until that release is Done before the next plan. Run plans only leaves promote for a later /git-prod. The queue is non-stop mid-run: no external-review Ask/paste between plans. Optional external review arms once at queue end; see external plan review.

    Resume mid-queue: if context fills up or you start a fresh chat, paste /run-plan-all again. The agent reads HANDOFF (Mode: run-plan-all, Run queue, Queue cursor, Queue outcomes) and dispatches the next plan as a Task without re-synthesizing. If a queued plan was deleted or materially changed outside the queue, run a new synthesis.

    Named model tip: for long queues, prefer a named model (Claude Opus, Sonnet 4.6, Composer 2.5 Fast) over Auto. Named models have separate quota buckets and keep Ask questions available for HITL.

    Mission Control shortcut: the Checklist Run all header button copies /run-plan-all into chat input (copy-only; it does not write HANDOFF or start the queue). While a queue is live, Checklist cards sort by role-priority (executing, then next up, then queued / completed), not by Run queue index. Plan card Actions also offer Run (manual) (/continue-plan) and Run (auto) (/run-plan) as copy-only pastes.

Unattended runs (Countdown and Ground Control)

To let a plan advance overnight, give a dedicated clone of the repository to agent-kit countdown and fire it from your own timer. Each fire runs one headless job (one /run-plan tick by default, or the review-only pass over unmerged branches with --job review) under --no-hitl --land-on-gate. The kit never answers a gate: when the run stops at one, or fails, the CLI pushes a note to a gate-exit/<stamp> branch with a PR/MR and leaves your working tree alone, and later fires refuse to start until you triage it.

0 3 * * * <agent-kit> countdown --cwd <repo> --backend claude >/dev/null 2>&1

<agent-kit> is the absolute path of the installed binary, <repo> the clone Countdown owns. The systemd timer and service pair, the caps (--window-min, --stall-min, --budget-remaining), the cost ledger, the exit codes and the flock -n wrapper for cron are in the countdown detail.

In the morning:

  1. agent-kit ground-control status lists each pending ticket: the note's headline, its Ask id and labels, the branch and its PR/MR. Mission Control shows the same tickets at the top of the Flight Log.
  2. Answer the gate the note names in a live session (/continue-plan or /run-plan). Those commands Ask about a pending ticket first (Read the ticket / Accept / Discard / Later).
  3. Merge the ticket's PR/MR if you want the note, then agent-kit ground-control accept <stamp>; or agent-kit ground-control discard <stamp> to close it and delete the branch. Neither verb merges or promotes anything.

Claude Code CLI (session kit-load)

Install writes a thin root CLAUDE.md and .claude/commands/agent-kit.md so Claude Code (including a session started in the Cursor terminal) can load Agent Kit context without rediscovering the repository. Cursor agents already get that context from sessionStart and always-apply rules.

  1. Start Claude Code in the project root.
  2. CLAUDE.md loads automatically. Mid-session refresh: type /agent-kit.
  3. /agent-kit prefers agent-kit mission-control --once (styled ASCII snapshot of Mission, Flight Log, Checklist, Crew Monitor) and falls back to reading .cursor/HANDOFF.md, .cursor/project-context.md, and .cursor/commands/ if the CLI is missing. Do not start a live TUI loop from that slash (Claude Code cannot sustain one across turns).

If you installed without --claude, Claude Code only knows /agent-kit: /run-plan, /handoff and the other kit commands are not recognized. agent-kit doctor and agent-kit install say so, and npx @dadado/agent-kit-cli@latest update --claude generates the .claude/commands/* adapters later (writes only those files plus the Claude settings; safe on a dirty tree; never reapplies L0). Without adapters you can still run any command headless: agent-kit run <command> or agent-kit run-plan --backend claude.

HITL in Claude Code is a numbered-list fallback (Cursor Ask questions is not available). Never /git-prod from kit-load.

Pack contract: claude-cli-kit-load.md. This is not audits, not the headless tick loop (agent-kit run-plan --backend claude, shipped 2026-09-06 — see the consumer-configuration.md CLI table), and not Action A7 (Windsurf / VS Code generators).

Opt-in: slash commands and auto-loaded session context (--claude)

The session kit-load above is always on. Two more Claude Code surfaces are opt-in (default install output is unchanged without the flag):

npx @dadado/agent-kit-cli@latest install --claude

This generates .claude/commands/<name>.md for every .cursor/commands/*.md you actually have installed (thin pointers, not copies — each one just tells Claude Code to read the matching .cursor/commands/ file), and merges a SessionStart hook into .claude/settings.json so the same session context Cursor gets from sessionStart loads automatically in Claude Code too. Re-running install --claude (fresh or with existing files) is idempotent: unedited generated files refresh, files you hand-edited are preserved, and the hook entry is never duplicated. If an existing .claude/settings.json cannot be parsed as JSON, install prints the hook entry for you to paste in by hand instead of guessing at the file.

Cloud agent sessions: commit identity

A cloud agent session (Claude Code on the web and similar hosted agents) runs in a container that ships its own global git identity, so every commit names the agent as author and committer (for Claude Code, Claude <noreply@anthropic.com>). A repository-level git config user.* lasts only until the container restarts. /git-staging and /git-prod stop on such commits (sh git-hooks/prepare-commit-msg --check-authors origin/staging). Set the identity once so it never comes up:

  1. In the cloud environment settings, set GIT_AUTHOR_NAME, GIT_AUTHOR_EMAIL, GIT_COMMITTER_NAME and GIT_COMMITTER_EMAIL to your own name and an address your GitHub account knows (for example your users.noreply.github.com address). Git reads these variables natively and they override the container's git config, across restarts.
  2. Check after the first commit: git log -1 --format='%an <%ae> | %cn <%ce>' shows your identity twice.
  3. Commits already made as the agent: on the working branch, git commit --amend --no-edit --reset-author (last commit) or git rebase --exec 'git commit --amend --no-edit --reset-author' origin/staging (every outgoing commit), then push again.
  4. Signing: the variables fix the identity, not the signature. GitHub shows the commits as Unverified unless they are signed with a key registered to your account; the container's own key is not. Sign with your own key in the session, or accept Unverified.
  5. PR bodies: the GitHub MCP server can append a footer to a PR body it creates (a Generated by Claude Code line plus a session link). The /git-staging PR-body scan stops on it. Remove it with the same tool that wrote the body (the GitHub MCP update call for that pull request), then re-run the scan.

The check only reads: it never sets an identity or rewrites history for you.

Optional external plan review

When /run-plan finishes all implementable to-dos, you can get a second-agent check of the shipped work. Default path when enabled: /run-plan / /run-plan-all arm, wait, and continue into /plan-review-triage. Artifacts ship with L0; the feature stays opt-in (enabled: false by default). Session kit-load (CLAUDE.md / /agent-kit) is a different surface; see Claude Code CLI (session kit-load).

  1. Enable it: set "externalPlanReview": { "enabled": true, "offerOnExhausted": true } in .cursor/context/config.json (see config.example.json), or accept the exhaustion Ask when a single /run-plan finishes (or once when a /run-plan-all queue exhausts)
  2. Chat path: when enabled (mode: autonomous), /run-plan / /run-plan-all arm --force --autonomous --wait-monitor (background/inspectable PTY). Paste (--paste-only) is the fallback when spawn is unavailable. Never a silent agent-shell claude -p.
  3. Headless / CI: agent-kit run-plan may arm the launcher with --force (claude -p) in the runner shell. This is the audits reviewer (externalPlanReview.backend), not the tick implementer (--backend): when ticks run with agent-kit run-plan --backend claude, a reviewer pinned to claude (or auto resolving to Claude) is the honest same-model skip and the Field Report stays owed; use backend: "auto" (cascades to Cursor Agent), "cursor", or "cloud", or name a different Claude model for the review in roles.reviewer.model (model roles)
  4. Exhaustion Ask: if not enabled and offerOnExhausted is not false, chat must Ask Run review now / Always enable automatic / Not now. Not now is per-session only (no persist)
  5. Manual: /plan-external-review anytime after a plan is done
  6. Triage: after Claude writes a monitor file, use /plan-review-triage with explicit path(s). Prefer Ack and stop or Fix nits only when residuals are nits/process-only or closeout depth is already capped; Write residuals plan runs Broad Intake (including Unprocessed dogfood) then backlog write-confirm and must not spawn unbounded close-* chains (ADR decisions/2026-08-11_plan-audit-residuals-termination.md). Unprocessed dogfood Broad Intake bucket membership is SoT in ADR decisions/2026-08-11_dogfood-unprocessed-broad-intake-bucket.md (not the termination policy). Mission Control Flight Log is Gaps + operator Warnings with palette-by-type notification chrome (natural Gaps voice; wipe Earlier on new flight; exact none for OK, not none.… as a yellow debit). When Gaps and Warnings are empty, it may show bounded untriaged review rows (per-row Copy triage / path); it does not host Review all / Resolve all. Chat /plan-review-triage remains HITL SoT
  7. /run-plan-all: mid-batch audits when enabled (findings-only mid-queue; no auto Write residuals); queue-end triage Ask with explicit paths prefers uniform Ack/Fix nits when depth-capped. Throughput knobs: external plan review

Claude Code on PATH is optional. If disabled or claude is missing, the kit continues with a tip and exit 0 (no CI failure). Details: external plan review.

Security considerations

Plan execution runs with sandbox disabled: The continuous plan execution (/run-plan) uses cursor-agent --sandbox disabled to access filesystem operations, git commands, and project tools. This is required for the agent to implement code changes and commit to staging. The claude backend (agent-kit run-plan --backend claude) has the same footprint: claude -p starts read-only, so the backend passes --dangerously-skip-permissions --permission-prompts none (bypass everything, deny anything that would still prompt) so the tick can edit files and run git / package-manager commands; a tick with no such mode would have every write denied. agent-kit run <slash> --backend claude spawns catalog slashes with the same flags. Requirements: claude >= 2.1.259 and the .claude/commands/run-plan.md adapter (agent-kit install --claude); both are checked before spawn. Optional caps: AGENT_KIT_CLAUDE_MAX_TURNS / AGENT_KIT_CLAUDE_MAX_BUDGET_USD (no default). Gateway routing uses ANTHROPIC_BASE_URL / ANTHROPIC_AUTH_TOKEN from the runner environment; both are redacted from tick logs, tips and errors, including the gateway host and encoded token forms (exact contract in the consumer configuration CLI table). Maintainers should review plan to-dos and registry skills before enabling continuous execution on either backend, as these function as direct agent instructions.

Mission Control production-ship constraints

Mission Control is a local, single-developer observability panel. Treat it as loopback-first, not a shared or internet-facing service.

Constraint Expectation
Bind Default host is 127.0.0.1 for /dashboard. Never silently bind 0.0.0.0 from that path. Opt-in LAN: /dashboard-broadcast (CLI counterpart) binds a non-loopback interface only with explicit intent and a required token gate.
Network surface HTTP static files under dashboard/, JSON snapshot (/dashboard-data.json / /api/data), SSE (/api/events), and loopback-only allowlisted PUT/PATCH /api/config. In broadcast mode, static/snapshot/SSE require the session token. No product WebSockets or inbound webhooks.
Mutations UI CTAs are copy-only (clipboard + paste destination). Config write is the only mutation API and stays loopback + allowlist (including when broadcast is active). No git stage, process kill, server restart, or /git-prod from the panel.
Remote / shared hosting Multi-user internet / WAN hosting remains rejected. Personal local-only (loopback-first) is the default. Opt-in personal LAN broadcast (/dashboard-broadcast + token) is supported for a single operator on a trusted LAN; printed Share URLs are cosmetic fragment masks (ADR below), not relays.
Resources Cold snapshot and periodic refresh use local CPU/IO (git, ps, filesystem). Do not throttle SSE/poll to "save" Cursor Agent quota; quota levers are named model + interTickCooldownMs (see tip under /run-plan above).

Copy-only actions: The panel copies text and names where to paste it: repository-relative paths go to the editor's file picker, slash commands go to the chat input, and past-chat references go to the past-chat picker. The panel cannot open a file or a chat, so no label claims that it can.

Source of truth: .cursor/memory/decisions/2026-07-27_mission-control-personal-local-only-posture.md (default product goal), .cursor/memory/decisions/2026-07-27_mission-control-opt-in-lan-broadcast.md (opt-in LAN path), .cursor/memory/decisions/2026-08-11_mission-control-broadcast-url-mask.md (cosmetic Share URL), plus .cursor/memory/decisions/2026-07-24_mission-control-local-only-security.md and .cursor/memory/decisions/2026-07-26_mission-control-config-write-allowlist.md (technical guards).

Where Mission Control runs: Consumer npx / install.md installs kit L0 (including the /dashboard command text) but does not copy dashboard/** into the app tree. Snapshot root is always the operator workspace. The browser UI host is either (1) a published @dadado/agent-kit-cli that ships dashboard/** (Path C, 4.8.2 onward), or (2) an agent-kit checkout (MISSION_CONTROL_KIT_ROOT / AGENT_KIT_HOME / sibling ../agent-kit / monorepo dashboard/). Start the browser panel with /dashboard, npm run dashboard, npx @dadado/agent-kit-cli dashboard, or node dashboard/start.mjs (see root README). The terminal surface is npx @dadado/agent-kit-cli mission-control (live TTY) or mission-control --once (one frame); it reuses dashboard-data.mjs and does not start the HTTP server. A browser is not required to read Mission, Flight Log, Checklist, or Crew Monitor. Several workspaces may run concurrent browser instances: each gets a stable listen port from its repo root (see printed URL / system.port); Mission Control never kills another workspace's listener.

First failure (no dashboard/start.mjs): the installed CLI is older than 4.8.2 (4.8.0 has no Path C assets; 4.8.1 was never published). Upgrade to 4.8.2+, or point env/sibling at a kit tree. Do not expect Port B alone to place the panel binary in the project.

The exact git steps behind staging and production live in autogit/gitupdate.md; plan modes in autogit/plan-routine.md. Both are installed with the kit. Native hooks are listed in layers-spec.md (L0).

Working on Agent Kit itself

Maintainer setup, local CLI workflows, factory self-consumer refreshes, and Mission Control from a kit tree are documented in DEVELOPMENT. This guide covers the consumer workflow after installation.

See the root README for the big picture and CONTRIBUTING for how changes flow.