@the-vibe-company/armada 0.2.64 → 0.2.65

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -80,7 +80,7 @@ Each problem is an error or a warning, with its fix. A missing skill, or a CLI o
80
80
 
81
81
  After the one-time pointer conversion, instruction-only Armada releases need no setup PR or project CI run. Doctor and status compare pointers, so only a discovery description change (or a missing or edited pointer) needs a setup update. The source link keeps its recorded tag until the pointer changes. Workers install the brief's pinned version before reading their skill; if `armada skill` is missing, install that version first. The command works offline, without sign-in or a checkout.
82
82
 
83
- New releases leave the coordinator's watch running. `armada status` and `armada inbox` announce them at most once per 24 hours per machine, across release versions; the dashboard's coordinator card shows update availability. Setup behind gets a separate daily notice in status, inbox and plain watch's final output: run `armada upgrade`, then merge the setup pull request it opens. Only a CLI below the server minimum produces a `version` item and stops either watch mode. Plain watch lists other coordinators' items with their owner, but wakes only for new own and unowned items, even with `--all`. Reading inbox preserves the watch's shown history; a narrower `--mine` read cannot prune a broader `--all` read. Run `armada upgrade`: it waits up to five checks over about two minutes for npm to serve the exact target, installs it, verifies `armada --version`, then uses the installed doctor to check setup. It runs `armada init --merge` only for outdated setup, through the normal setup-only merge checks. Upgrade requires the selected checkout's `armada.toml` at its Git root. Workers keep their brief's pinned version.
83
+ New releases leave the coordinator's watch running. `armada status` and `armada inbox` announce them at most once per 24 hours per machine, across release versions; the dashboard's coordinator card shows update availability. Setup behind gets a separate daily notice in status, inbox and plain watch's final output; `armada upgrade` refreshes it through the normal setup merge checks. Only a CLI below the server minimum produces a `version` item and stops either watch mode. Plain watch lists other coordinators' items with their owner, but wakes only for new own and unowned items, even with `--all`. Reading inbox preserves the watch's shown history; a narrower `--mine` read cannot prune a broader `--all` read. Run `armada upgrade`: it waits up to five checks over about two minutes for npm to serve the exact target, installs it, verifies `armada --version`, then uses the installed doctor to check setup. It runs `armada init --merge` for any setup gap the upgraded doctor marks as repairable by init (including missing hooks), through the normal setup-only merge checks. Upgrade requires the selected checkout's `armada.toml` at its Git root. If signing may wait for a person, upgrade prints a one-line fix before init; it never disables signing automatically. Init merges setup on the default branch: update this checkout from it and run `armada doctor`. Workers keep their brief's pinned version.
84
84
 
85
85
 
86
86
  The shipping skills include every helper, reference, eval, companion manifest and license.
package/dist/armada.js CHANGED
@@ -13982,7 +13982,7 @@ var skills_generated_default = [
13982
13982
  },
13983
13983
  {
13984
13984
  path: "REFERENCE.md",
13985
- content: "# Coordinator reference\n\nDetail the loop in [SKILL.md](SKILL.md) points to. Read the section you need.\n\n## Coordinator guardrails\n\n- Never block the session with a foreground command for more than a minute. Run `armada merge <pr> --wait` in the background, or queue with `armada merge --when-green <pr...>` and run `armada merge --drain` in the background. Keep `armada watch` in the background while these run. A declared long job uses `armada job start <name> --ticket <id>` on its runner.\n- Write no ticket code yourself. A fix of any size needs a ticket and a worker: cut a ticket and launch a worker. Changes to `armada.toml` that Armada asks for also go through a worker pull request merged with `armada merge`.\n- Run Armada commands bare. Never pipe them into `grep`, `tail` or `head`, redirect them to `/dev/null`, wrap `2>&1 | …`, or append `|| true`: their last lines say whether it worked and what to do next. A wrapper once hid a failed urgent launch for 2 hours 35 minutes.\n- Merge through `armada merge`. When it cannot run, follow [By hand](MERGE.md#by-hand), then `armada merge --finish <n>` and the deploy check for every declared target.\n- When the owner asks where things stand, run `armada digest` and paste its text.\n\n## Named coordinators\n\nA project can share its work between coordinators, each with a name: `ARMADA_COORDINATOR=<name>` in the environment wins, then `armada coordinator use <name>` for this checkout, else `default`.\n\n- Every launch records the coordinator that made it, and the worker inherits that owner from its launch token; a worker cannot choose it.\n- `armada status --mine`, `armada inbox --mine` and a named coordinator's `armada watch` show its own workers and unowned items. `armada inbox --all` and `armada watch --all` show the whole fleet (`armada status --all` lists every registered project instead); `default` sees the whole fleet unless it passes `--mine`. Status always keeps the whole frontier and marks another coordinator's pending launch `launching by <name>`.\n- Inbox entries name their owner or say `unowned`. Ownership follows the open worker session, then the newest pending launch, then the item. Unowned alarms reach everyone until someone takes them.\n- `armada coordinator list` shows each name, its sessions and its tickets. `armada coordinator take ABC-12 --from <name>` moves a ticket's worker (or pending launch) to you atomically; the worker keeps its phase.\n- `armada status` names another coordinator's stranded tickets after twice `[policy] silence_minutes` without activity and prints the exact `armada coordinator take … --from <name>` command; take them when resuming that role's work.\n- Each name has its own watch lock on a machine: `armada watch --stop` stops yours, `armada watch --stop --name <name>` another's.\n- Your own coordination ticket is not a worker: the watch leaves out the claim whose handle is yours (`ARMADA_COORDINATOR_HANDLE`, else Conductor's workspace and session).\n\n## The Claude Code stop hook\n\nThe hook matches the `session_id` of a coordinator that ran `inbox`, `watch`, `brief`, `launch` or `merge`, across working folders. Unknown sessions fall back to the checkout where the coordinator last watched. A session coordinating several projects is held if any of them needs a watch; the reason names each project and checkout. Worker sessions (`ARMADA_TICKET`) never register or get held. A resumed session with a new id registers on its next coordinator command.\n\nThe watch's start and end, the last lines of coordinator commands, and `armada doctor` show `Stop hook on for this session (last ran HH:MM)`, `Stop hook installed in <file>; it confirms at your next turn end`, or `Stop hook NOT on: <why> — <fix>`. Installation alone is not proof that Claude loaded it: the next Stop records a local receipt. All hook reads are local and failures let the turn end.\n\nAt Stop, the hook also reads up to 1 MiB of new transcript lines for this coordinator session. A completed foreground Bash command over 60 seconds, raw `gh pr merge`, wrapped Armada output, or `git commit`/`gh pr create` produces one reminder per rule per session, with a safe program/subcommand summary (arguments omitted) and the replacement to run. Quoted examples, comments and heredoc data are ignored. A multi-project session reads its transcript once and uses the current checkout’s deploy config; outside known checkouts, each known target command names its config explicitly. The reminder joins the watch reason in one blocked Stop; later turns do not repeat that rule, even after compaction. A reentrant Stop skips habit reminders and keeps the watch guard. Workers, subagents and unknown sessions in other checkouts are excluded; `ARMADA_STOP_HOOK=off` disables these reminders too.\n\nArmada detects the command in user settings (`~/.claude/settings.json`) and the coordinator checkout's `.claude/settings.json` or `.claude/settings.local.json`. If the session starts elsewhere, add a command hook for Stop in user settings: `armada hook stop 2>/dev/null || true`. `armada init --merge` changes repository settings only. `ARMADA_STOP_HOOK=off` opts out; the banner says so.\n\n## The SessionStart brief\n\n`armada init` and `--merge` install both Stop and SessionStart in repository settings, once; one question accepts both, and `--no-stop-hook` skips both. `armada doctor` warns when SessionStart is missing. SessionStart matches `compact|resume` only; fresh startup still follows [Start](#start).\n\nAfter compact or resume, `armada hook session-start` inserts plain text into Claude's context: `Armada: you coordinate <project> as <name> from <checkout>`, tickets with phases and ages, PRs and holds, up to 20 actionable inbox lines, and the watch and Stop-hook banners. The block is at most 60 lines. Run every Armada command from the named checkout; read `armada status --mine` and `armada inbox --mine` before acting. Its final line tells you to start `armada watch` with Bash `run_in_background` when none runs. The hook never starts a watch itself. A live read records presence and only the inbox keys actually shown; omitted items can still wake the watch.\n\nLive reads share a 15-second deadline and are aborted on expiry. If unavailable or refused, the brief uses the last local tickets, read time and open jobs, and names the status/inbox recovery commands. All hook errors allow the session to start. Workers (`ARMADA_TICKET`) get nothing.\n\nResolution uses the Stop hook's registry first, then the coordinator checkout for unknown ids. A resumed session with a new id outside that checkout gets nothing. To deliver hooks for sessions starting elsewhere, install both commands at user level in `~/.claude/settings.json`: Stop runs `armada hook stop 2>/dev/null || true` (timeout 10); SessionStart runs `armada hook session-start 2>/dev/null || true` with matcher `compact|resume` (timeout 30). Init only changes repository settings.\n\n## The watch\n\nPlain `armada watch` waits until a new own or unowned item you have not been shown needs you (a question, plan, request, hand-back, merge hold, deploy failure, job notice, silent, stopped or unstarted worker), prints it and exits. Items owned by another named coordinator stay in the listing, marked `owner: <name>`, but do not wake you, even with `--all`. Reading `armada inbox` preserves shown history; `--mine` cannot prune keys from a broader `--all` read. It exits with `nothing to watch` when nothing in its scope is in flight or open. Armada being down does not end it. A timeout prints the resume command and re-arm line on stdout; start it again when it ends without news. `--for <minutes>` bounds it cleanly.\n\nStarting another plain watch is safe: it waits locally for the verified holder, then prints the holder's stdout/stderr and exit code here. A JSON waiter behind a plain holder wraps the result and captured streams in JSON; stop results stay JSON too. The private result file keeps the most recent 100 generations so a fast later holder does not erase the awaited receipt. If the holder dies without a result, a waiter takes over. `armada watch --stop` ends the holder and its waiters. A follow holder remains a stream: another watch only says it is following. Keep the watch in your harness's tracked background command; never put `&` inside a foreground command or hide its output.\n\nUnder Claude Code (`CLAUDECODE` set), either watch defaults to 100 minutes, leaving margin before the two-hour background limit. It prints the bound at start and in its final output. If a dead watch left an identity-bearing lock without a completion result and its observed lifetime was between five minutes and the current bound, Armada remembers that shorter limit and ends the next watch after 90% of it (rounded down, minimum five minutes). New locks keep a wall-clock watch start alongside the OS process identity; older timestamp identities can also teach a limit, while legacy PID-only locks cannot. `--for <minutes>` overrides the automatic bound.\n\n`armada watch --follow` prints one line per item and keeps running:\n\n- `--for <minutes>` ends it with `resume: armada watch --follow …`; the Claude Code automatic bound applies unless you set it.\n- A restart resumes this machine's stored cursor for your coordinator name. `--since <cursor>` resumes elsewhere and shows every open item once, marked `open`.\n- `--tickets ABC-1,ABC-2` and `--kinds question,hand-back` filter lines. `--kinds claim,report,release,merge,handover` (or `all`) adds informational events; `handover` is a report entering ready-to-merge. `--json` prints NDJSON with a cursor on every line.\n- A printed line counts as seen, even if your harness never read it: use follow only where every line reaches you. Harnesses that wake only when a command ends keep plain watch.\n\nBoth modes share one lock per project and name on a machine. `armada inbox --wait [--timeout <seconds>]` (300 by default) is the fallback for a runtime that cannot run a background command.\n\nPlain watch also reminds about open questions, plans, unqueued hand-backs, owner requests and decisions, runtime approval prompts, queue refusals, and unstarted or stopped workers. `[policy] coordinator_minutes` sets the first interval (10 by default); subsequent intervals double. Reminders are anchored to the first show: at 10, 30 and 70 minutes by default, even if you list the inbox between them. The output marks `! still waiting since HH:MM UTC`. `coordinator_minutes = 0` disables reminders. Other coordinators' items and queued hand-backs never remind. Losing the machine watch state restarts the clock at the next listing; follow mode retains its once-per-key stream.\n\n`armada ack <#id or key> --reason \"<why>\"` records a deliberate skip of a notice, with its reason on the ticket. It hides that entry until its key changes. A higher silence level or another merged blocker is a new key. The command refuses questions, plans, hand-backs, owner requests, approval prompts and holds, and names the action that resolves them. A ticketless notice stays recorded in Armada only; if its Linear comment fails, post the printed text yourself. Deploy the API and its migration before the new CLI.\n\nEligible notices are `queue-refused`, `deploy`, `job`, `unblocked`, `silent`, `quiet`, `stopped`, `not-started`, `job-silent` and `queue-stalled`. Derived entries print `key <entry key>` on their head line. The ticket note preserves the worker's phase. Comment creation is attempted once; never retry it blindly after a failure.\n\n## Kept deliveries\n\nAn unconfirmed Conductor answer, note or merge notice stays in Armada. The command exits 1 without posting an answer on Linear or closing its question. Keep `armada watch` running: plain and follow modes retry at most three due deliveries per poll, with the same message id and stored masked text. The delays are 1, 2, 5, 10 and 20 minutes, with six tries including the first send. Rerunning the same answer command reuses that delivery; edited text creates another, and confirming it retires the older pending answer for that item.\n\nBefore each send Armada checks the worker generation and ownership. Merge notices also skip sessions that handed back. A changed or released worker, a permanent refusal or six unconfirmed tries produces one `delivery-failed` inbox item naming the ticket and the first line of the message. Inspect the session, decide the next step, then `armada answer <failure item> \"<why>\"` records your reason without sending it. A later successful answer for the ticket also resolves its failure item. Never send a kept message by hand too.\n\nConfirmed delivery is terminal before Linear and inbox recording. A recording warning asks you to inspect the ticket; Armada never sends that confirmed message again. Pending deliveries appear in status and inbox and keep the stop hook listening. Without a watch they wait. Herdr and Claude Code have no keyed delivery and stay on their runtime guide's inspect-first path. Deploy the pending-delivery API and migration before this CLI.\n\n## Worker caps\n\n`[policy] max_workers` caps project-wide worker sessions, including open claims waiting for merge and unclaimed launches. A full fleet refuses a new launch: use `armada launch <ticket> --when-unblocked` to wait for a slot, or `armada launch <ticket> --over-cap \"<why>\"` for a recorded bypass. Never use relaunch to bypass the cap; it replaces an existing worker. Urgent tickets pass automatically with a recorded reason. Status and re-arm lines show running workers separately from launches waiting for a slot. Without this setting, launches are uncapped; lowering it stops no worker.\n\n## Silence and liveness\n\n- **Silent**: no heartbeat, report or answer for `[policy] silence_minutes` (15 by default). A worker's first allowance adds `launch_grace_minutes` (defaults to `silence_minutes`). Shipping at stage `ci` gets `ci_wait_minutes` (45 by default). Waiting phases (`awaiting-approval`, `blocked`, `awaiting-validation`) are never silent while unanswered.\n- **Conductor sessions are observed**: a session Armada sees working is only called silent past twice the allowance, and the alert says it is still working. A session idle in a working phase for five minutes without a report or answer is `stopped`: nothing will wake it.\n- A silence wakes the watch at its allowance, then at twice, four times and each doubling after.\n- **Quiet**: a live worker without a report for `quiet_minutes` (45 by default) is a note for you only.\n- **Launch failed or uncertain**: `launch-failed` and `launch-uncertain` are recorded immediately for an attempted runtime launch, including deferred launches during merge/drain. The watch wakes on them. Read the reason and run the item’s `Next:` command. Failed launches and recovered but unconfirmed launches exit 1; preflight refusals still exit 2. An uncertain launch retains its token: inspect the worker before retrying creation. The `Launched` line and dry-run plan include the ticket title; JSON includes `title`. Repeated failures rewrite the same open item. It closes on the next claim, a successful launch binding, `armada launch revoke <ticket>`, or `armada answer <id> \"<why>\"`. Recording on Armada is best-effort; a recording warning never turns failure into success.\n- **Not started**: no claim `not_started_minutes` (10 by default) after the launch. An unused token that expired produces one notice, then clears. An open `launch-failed` or `launch-uncertain` item suppresses this notice for its ticket.\n- Claims end by themselves when their ticket is Done or Canceled, their hand-back merged, their session was revoked or their workspace archived.\n\n## Upgrades\n\n`armada status` and `armada inbox` mention a new Armada release at most once a day; ordinary releases leave the watch running. Only a CLI below the server minimum stops either watch mode with a `version` item, worded `Armada <x> required (you run <y>)`. Setup behind gets a separate daily notice in status, inbox and plain watch's final output: “This project's Armada setup is behind <version>: `armada upgrade`, then merge the setup pull request it opens.” Setup drift leaves the watch running. Run `armada upgrade`: it waits for npm, installs the release, checks `armada --version`, and runs `armada init --merge` only when the project's setup is outdated. Workers in flight keep the version their brief pinned.\n\n## Specs\n\nSpecs are direct children of the program root, titled `Spec N — Name` (`Spec N/M — Name` is read too).\n\n- `armada spec add \"<name>\"` appends one with the **In short** template in the root's Linear project and the team's first backlog state (first to-do state if there is no backlog); it prints the project (or `no project`), state and URL. With neither state available, it keeps Linear's default. Earlier titles are untouched. Creation is never retried automatically: check Linear before running the command again after a failure.\n- `armada spec add \"<name>\" --at 5` previews the renames a middle insertion needs; repeat with `--apply` to write them.\n- `armada spec renumber` previews a repair of gaps, duplicates and stale totals; `--apply` writes it.\n- `[tracker] spec_titles = \"N/M\"` keeps totals in every title; appending then needs `--apply` too.\n- Writes are sequential and stop at the first failure, listing what was not confirmed: inspect Linear before retrying.\n\nCheck the printed project and state after creation. Fill in the **In short** template before cutting the spec's tickets, then run `armada lint <ticket>` on each one.\n\nWhen `armada merge` closes a spec's last open ticket, it closes the spec with a summary, unless the team's own parent auto-close does it.\n\n## Secrets\n\nThe secrets workers need (an LLM key, a test database URL) are kept per project in Armada, and workers use them through `armada run -- <command>`.\n\n- `armada secrets` lists the names, never a value. `armada doctor` names those `[secrets] names` expects and Armada lacks.\n- An owner or admin sets one with `armada secrets set <NAME>` (hidden prompt), `--value-stdin`, or `--from-env <VAR>`, which moves a variable without anyone reading it; `--org` sets it for every project. `armada secrets unset <NAME>` removes it.\n- Anyone else asks with `armada secrets request <NAME> --ticket <id> --reason \"<why>\"`: the owner gets a link and types the value into the vault. Repeated requests reuse one link.\n- Never put a value on a command line, in a brief, in notes or in chat. A value pasted anywhere must be rotated.\n\n## Long jobs\n\nLong runs (an evaluation, a backfill, a load test) run on the project's own runner, declared in `[jobs.<name>]` with its start, status and stop commands. Never run them in a session.\n\n- `armada job start <name> --ticket <id>` dispatches one and stores its runner reference; `armada job status` asks the runner, `armada job list` reads stored progress.\n- `armada job stop <id>` stops one on purpose; nothing is stopped automatically, even when its ticket is Done.\n- A runner can push progress with `armada job beat <id> --progress \"40/120\"`, signed in with an organization API key.\n- A running job with progress unchanged past `[jobs.<name>] stall_minutes` (60 by default) shows `stalled` and a `job-stalled` inbox alert. Check it with `armada job status <id>`; use `armada job stop <id>` only when you intend to stop it. Fraction progress (`n/m`) ignores ETA/clock changes; movement clears the alert and a later stall wakes the watch again. Silent jobs take precedence, and jobs without progress are never stalled. This only covers runs tracked through `armada job`; the alert never stops the job.\n- A job without news past its silence limit is a `job-silent` entry; a finished job leaves one `job` notice. Check it, or deliberately leave the notice alone with `armada ack <#id or key> --reason \"<why>\"`.\n- `armada job recover <id> --ref <reference>` attaches a runner reference that a lost answer did not record.\n\n## Shared resources\n\nMigration numbers, ports and other shared names are reserved per ticket through Armada: `armada reserve <key> --next --floor <n>` for numbers, `--value <name>` for names. `armada reserve --list` shows the holders. A release frees a ticket's reservations; a merge keeps them used for good. Declare well-known keys in `[[reservations]]` so briefs list them.\n\n## The owner's channel\n\nOrganization > Notifications (owner or admin) connects one chat webhook. Owner validations, escalated questions and a stopped coordinator with items waiting reach it by themselves, outside quiet hours. Each named coordinator is checked separately, including owner requests and project-wide operational items. A coordinator that keeps running commands also triggers one alert per unanswered plan, question, hand-back, decision or owner request after 3 × `[policy] coordinator_minutes` (30 minutes by default); queued or paused merges are excluded. Finished specs send their Linear link once after the next reading. A merge pause still open after five minutes sends its reason and project link; clearing a recorded pause sends “merges resume”. Short pauses and pre-channel history stay quiet. These milestones are channel-only, follow the alerts toggle, and are retained during quiet hours for the next summary. Act on the inbox rather than relying on command activity to keep these alerts quiet. GitHub and Linear webhook refreshes check alerts even with no live worker or viewer. Digests go out at the times set there; `armada digest --send` posts one now, and `armada digest --lang en|fr` overrides `[tracker] language` for the printed text.\n\n## Waiting launches\n\n`armada launch <ticket> --when-unblocked [--profile <name>] [--runtime conductor|herdr] [--notes <file|->]` remembers a launch until its Linear blockers close or a worker slot frees. `--after <blocker>` asserts an existing Linear relation. Without `--profile`, routing uses the ticket's labels when it starts; an explicit profile stays pinned, with its reason. Runtime and notes text survive until launch; explicit options when firing override the stored values.\n\nRequests expire after seven days. The inbox shows one expiry notice with the renew/decline commands. Repeat `armada launch <ticket> --when-unblocked` to renew the same request for seven more days and reset its attempt budget; omitted options preserve its pin and context. Decline with `armada answer <id> \"<why>\"`. Completed or cancelled tickets close their request automatically. A launched worker waiting to claim is shown quietly in status.\n\nThe running watch starts eligible requests itself, oldest first, at most one per poll, when any blocker closes or a worker slot frees. Successful starts stay quiet in plain watch and appear in status and the next re-arm line; follow prints a `launched` line, respecting `--tickets` and `--kinds` (use `--kinds launched` for starts alone). Merge/drain still fire the tickets that their merge unblocked. Only this coordinator's requests fire, with no cap bypass. Herdr starts on the watch's machine; automatic launches never prompt to install tools.\n\nFire-time admission checks cancellation, expiry and ownership; launch rechecks the request after preflight and fresh Linear readiness, including the ready label. Known failures, including missing runtime tools, arrive as one rewritten `launch-failed` inbox item. Keep/re-arm watch to retry after five minutes, then fifteen minutes, at most three attempts total. The third failure says `gave up after 3 failed launches`; renew or decline deliberately. An uncertain creation keeps its pending launch even after token expiry: inspect and revoke it before another automatic creation. Guided Claude Code profiles stay manual inbox work with `armada brief ... --prompt` for the Agent tool. `coordinator take` transfers the waiting request too. Missing readings or unavailable admission/attempt metadata prevent automatic firing: deploy the dashboard before the CLI.\n\n## Start\n\nAfter Claude compact/resume, follow the Armada brief; see [REFERENCE.md](REFERENCE.md#the-sessionstart-brief).\n\n1. **Sign in.** `armada whoami` says whether this terminal is signed in and to which organization. If not: a person runs `armada login` and approves the code in the browser; a headless coordinator (a cloud workspace, CI) sets `ARMADA_API_KEY` to an organization API key an owner created, or runs `armada login --api-key`. Signed in, Armada gives each command the organization's keys and puts a one-time launch token in every brief, so no worker needs a key. Keys set in the environment still win. `armada doctor` checks the repository and the sign-in together.\n2. **Take your name.** One project can have several coordinators, each with a name. Set `ARMADA_COORDINATOR=<name>` (a cloud workspace) or run `armada coordinator use <name>` (this checkout); without either the name is `default`. A named coordinator sees its own workers and unowned items; `default` sees the whole fleet. `armada coordinator list` shows the names, their sessions and tickets. Status names work stranded under a silent role with the `armada coordinator take … --from <name>` command; use it when you resume that work. See REFERENCE.md before sharing a project.\n3. **Find your coordination ticket**, if the owner gave you one. Read its comments, newest first. A last comment `Agent status: released — <text>` is a hand-over: `<text>` is the state the previous coordinator left. Claim the ticket with your own handle, never the previous one: `armada claim <ticket> --runtime <your runtime> --handle <your handle> --branch <default branch>` (in Conductor, `--runtime conductor --handle \"$CONDUCTOR_WORKSPACE_ID/$CONDUCTOR_SESSION_ID\"`; elsewhere set `ARMADA_COORDINATOR_HANDLE` to the handle you claimed with). Report on it as a worker would, `armada report implementing --ticket <ticket> --message \"<what you found and do next>\"`, and hand over with `armada release --ticket <ticket> --reason \"<state so far and what remains>\"` when you stop before the run ends. Write that reason for a reader with none of your context.\n4. **Run from anywhere.** Commands find the project from the checkout. From another folder, pass `--project <slug>` (this machine's last watched checkout) or set `ARMADA_CONFIG=/path/to/armada.toml`; `--config <path>` wins over both.\n\n## Launch details\n\n6. **Launch** Conductor and herdr workers with one command:\n\n```sh\narmada launch ABC-12 --runtime conductor --profile backend --pre-approve --reason \"CLI and core only; a small follow-up\" --notes notes.md\n```\n\nOne `--reason` explains both the profile choice and the pre-approval. `--runtime conductor|herdr` may be left out when the profile settles it. `--notes <file|->` adds what only you know (the boundary with a parallel worker, a decision not yet on the ticket), up to 16 KB; notes never approve a plan. `--dry-run` checks everything and creates nothing. The command refuses a ticket already launched or claimed, mints the token, starts the worker and prints its handle and link, never the token. For failed or uncertain launches, follow REFERENCE.md. Put worker conventions in `[brief] extra`. For a Claude Code profile, run `armada brief <ticket> --prompt` with the same flags and launch through the Agent tool as its runtime guide says.\n\n## Stop a superseded worker on a Done ticket\n\nWhen another change covered a worker's ticket and it is already Done, run `armada stop ABC-12 --superseded \"<why>\"`. It posts the reason on Linear, releases the exact claim, ends only worker sessions launched by its claim time and archives that runtime workspace. Done stays Done; no workflow-state workaround is needed. A replacement claim refuses cleanup, and herdr still requires a clean, fully pushed worktree. If archival fails after release, retry the same command. `--superseded` requires Done; unfinished tickets use ordinary release and stop. Alternatively, `armada release --ticket ABC-12 --reason \"<why>\"` preserves Done, followed by `armada stop ABC-12` for archival.\n"
13985
+ content: "# Coordinator reference\n\nDetail the loop in [SKILL.md](SKILL.md) points to. Read the section you need.\n\n## Coordinator guardrails\n\n- Never block the session with a foreground command for more than a minute. Run `armada merge <pr> --wait` in the background, or queue with `armada merge --when-green <pr...>` and run `armada merge --drain` in the background. Keep `armada watch` in the background while these run. A declared long job uses `armada job start <name> --ticket <id>` on its runner.\n- Write no ticket code yourself. A fix of any size needs a ticket and a worker: cut a ticket and launch a worker. Changes to `armada.toml` that Armada asks for also go through a worker pull request merged with `armada merge`.\n- Run Armada commands bare. Never pipe them into `grep`, `tail` or `head`, redirect them to `/dev/null`, wrap `2>&1 | …`, or append `|| true`: their last lines say whether it worked and what to do next. A wrapper once hid a failed urgent launch for 2 hours 35 minutes.\n- Merge through `armada merge`. When it cannot run, follow [By hand](MERGE.md#by-hand), then `armada merge --finish <n>` and the deploy check for every declared target.\n- When the owner asks where things stand, run `armada digest` and paste its text.\n\n## Named coordinators\n\nA project can share its work between coordinators, each with a name: `ARMADA_COORDINATOR=<name>` in the environment wins, then `armada coordinator use <name>` for this checkout, else `default`.\n\n- Every launch records the coordinator that made it, and the worker inherits that owner from its launch token; a worker cannot choose it.\n- `armada status --mine`, `armada inbox --mine` and a named coordinator's `armada watch` show its own workers and unowned items. `armada inbox --all` and `armada watch --all` show the whole fleet (`armada status --all` lists every registered project instead); `default` sees the whole fleet unless it passes `--mine`. Status always keeps the whole frontier and marks another coordinator's pending launch `launching by <name>`.\n- Inbox entries name their owner or say `unowned`. Ownership follows the open worker session, then the newest pending launch, then the item. Unowned alarms reach everyone until someone takes them.\n- `armada coordinator list` shows each name, its sessions and its tickets. `armada coordinator take ABC-12 --from <name>` moves a ticket's worker (or pending launch) to you atomically; the worker keeps its phase.\n- `armada status` names another coordinator's stranded tickets after twice `[policy] silence_minutes` without activity and prints the exact `armada coordinator take … --from <name>` command; take them when resuming that role's work.\n- Each name has its own watch lock on a machine: `armada watch --stop` stops yours, `armada watch --stop --name <name>` another's.\n- Your own coordination ticket is not a worker: the watch leaves out the claim whose handle is yours (`ARMADA_COORDINATOR_HANDLE`, else Conductor's workspace and session).\n\n## The Claude Code stop hook\n\nThe hook matches the `session_id` of a coordinator that ran `inbox`, `watch`, `brief`, `launch` or `merge`, across working folders. Unknown sessions fall back to the checkout where the coordinator last watched. A session coordinating several projects is held if any of them needs a watch; the reason names each project and checkout. Worker sessions (`ARMADA_TICKET`) never register or get held. A resumed session with a new id registers on its next coordinator command.\n\nThe watch's start and end, the last lines of coordinator commands, and `armada doctor` show `Stop hook on for this session (last ran HH:MM)`, `Stop hook installed in <file>; it confirms at your next turn end`, or `Stop hook NOT on: <why> — <fix>`. Installation alone is not proof that Claude loaded it: the next Stop records a local receipt. All hook reads are local and failures let the turn end.\n\nAt Stop, the hook also reads up to 1 MiB of new transcript lines for this coordinator session. A completed foreground Bash command over 60 seconds, raw `gh pr merge`, wrapped Armada output, or `git commit`/`gh pr create` produces one reminder per rule per session, with a safe program/subcommand summary (arguments omitted) and the replacement to run. Quoted examples, comments and heredoc data are ignored. A multi-project session reads its transcript once and uses the current checkout’s deploy config; outside known checkouts, each known target command names its config explicitly. The reminder joins the watch reason in one blocked Stop; later turns do not repeat that rule, even after compaction. A reentrant Stop skips habit reminders and keeps the watch guard. Workers, subagents and unknown sessions in other checkouts are excluded; `ARMADA_STOP_HOOK=off` disables these reminders too.\n\nArmada detects the command in user settings (`~/.claude/settings.json`) and the coordinator checkout's `.claude/settings.json` or `.claude/settings.local.json`. If the session starts elsewhere, add a command hook for Stop in user settings: `armada hook stop 2>/dev/null || true`. `armada init --merge` changes repository settings only. `ARMADA_STOP_HOOK=off` opts out; the banner says so.\n\n## The SessionStart brief\n\n`armada init` and `--merge` install both Stop and SessionStart in repository settings, once; one question accepts both, and `--no-stop-hook` skips both. `armada doctor` warns when SessionStart is missing. SessionStart matches `compact|resume` only; fresh startup still follows [Start](#start).\n\nAfter compact or resume, `armada hook session-start` inserts plain text into Claude's context: `Armada: you coordinate <project> as <name> from <checkout>`, tickets with phases and ages, PRs and holds, up to 20 actionable inbox lines, and the watch and Stop-hook banners. The block is at most 60 lines. Run every Armada command from the named checkout; read `armada status --mine` and `armada inbox --mine` before acting. Its final line tells you to start `armada watch` with Bash `run_in_background` when none runs. The hook never starts a watch itself. A live read records presence and only the inbox keys actually shown; omitted items can still wake the watch.\n\nLive reads share a 15-second deadline and are aborted on expiry. If unavailable or refused, the brief uses the last local tickets, read time and open jobs, and names the status/inbox recovery commands. All hook errors allow the session to start. Workers (`ARMADA_TICKET`) get nothing.\n\nResolution uses the Stop hook's registry first, then the coordinator checkout for unknown ids. A resumed session with a new id outside that checkout gets nothing. To deliver hooks for sessions starting elsewhere, install both commands at user level in `~/.claude/settings.json`: Stop runs `armada hook stop 2>/dev/null || true` (timeout 10); SessionStart runs `armada hook session-start 2>/dev/null || true` with matcher `compact|resume` (timeout 30). Init only changes repository settings.\n\n## The watch\n\nPlain `armada watch` waits until a new own or unowned item you have not been shown needs you (a question, plan, request, hand-back, merge hold, deploy failure, job notice, silent, stopped or unstarted worker), prints it and exits. Items owned by another named coordinator stay in the listing, marked `owner: <name>`, but do not wake you, even with `--all`. Reading `armada inbox` preserves shown history; `--mine` cannot prune keys from a broader `--all` read. It exits with `nothing to watch` when nothing in its scope is in flight or open. Armada being down does not end it. A timeout prints the resume command and re-arm line on stdout; start it again when it ends without news. `--for <minutes>` bounds it cleanly.\n\nStarting another plain watch is safe: it waits locally for the verified holder, then prints the holder's stdout/stderr and exit code here. A JSON waiter behind a plain holder wraps the result and captured streams in JSON; stop results stay JSON too. The private result file keeps the most recent 100 generations so a fast later holder does not erase the awaited receipt. If the holder dies without a result, a waiter takes over. `armada watch --stop` ends the holder and its waiters. A follow holder remains a stream: another watch only says it is following. Keep the watch in your harness's tracked background command; never put `&` inside a foreground command or hide its output.\n\nUnder Claude Code (`CLAUDECODE` set), either watch defaults to 100 minutes, leaving margin before the two-hour background limit. It prints the bound at start and in its final output. If a dead watch left an identity-bearing lock without a completion result and its observed lifetime was between five minutes and the current bound, Armada remembers that shorter limit and ends the next watch after 90% of it (rounded down, minimum five minutes). New locks keep a wall-clock watch start alongside the OS process identity; older timestamp identities can also teach a limit, while legacy PID-only locks cannot. `--for <minutes>` overrides the automatic bound.\n\n`armada watch --follow` prints one line per item and keeps running:\n\n- `--for <minutes>` ends it with `resume: armada watch --follow …`; the Claude Code automatic bound applies unless you set it.\n- A restart resumes this machine's stored cursor for your coordinator name. `--since <cursor>` resumes elsewhere and shows every open item once, marked `open`.\n- `--tickets ABC-1,ABC-2` and `--kinds question,hand-back` filter lines. `--kinds claim,report,release,merge,handover` (or `all`) adds informational events; `handover` is a report entering ready-to-merge. `--json` prints NDJSON with a cursor on every line.\n- A printed line counts as seen, even if your harness never read it: use follow only where every line reaches you. Harnesses that wake only when a command ends keep plain watch.\n\nBoth modes share one lock per project and name on a machine. `armada inbox --wait [--timeout <seconds>]` (300 by default) is the fallback for a runtime that cannot run a background command.\n\nPlain watch also reminds about open questions, plans, unqueued hand-backs, owner requests and decisions, runtime approval prompts, queue refusals, and unstarted or stopped workers. `[policy] coordinator_minutes` sets the first interval (10 by default); subsequent intervals double. Reminders are anchored to the first show: at 10, 30 and 70 minutes by default, even if you list the inbox between them. The output marks `! still waiting since HH:MM UTC`. `coordinator_minutes = 0` disables reminders. Other coordinators' items and queued hand-backs never remind. Losing the machine watch state restarts the clock at the next listing; follow mode retains its once-per-key stream.\n\n`armada ack <#id or key> --reason \"<why>\"` records a deliberate skip of a notice, with its reason on the ticket. It hides that entry until its key changes. A higher silence level or another merged blocker is a new key. The command refuses questions, plans, hand-backs, owner requests, approval prompts and holds, and names the action that resolves them. A ticketless notice stays recorded in Armada only; if its Linear comment fails, post the printed text yourself. Deploy the API and its migration before the new CLI.\n\nEligible notices are `queue-refused`, `deploy`, `job`, `unblocked`, `silent`, `quiet`, `stopped`, `not-started`, `job-silent` and `queue-stalled`. Derived entries print `key <entry key>` on their head line. The ticket note preserves the worker's phase. Comment creation is attempted once; never retry it blindly after a failure.\n\n## Kept deliveries\n\nAn unconfirmed Conductor answer, note or merge notice stays in Armada. The command exits 1 without posting an answer on Linear or closing its question. Keep `armada watch` running: plain and follow modes retry at most three due deliveries per poll, with the same message id and stored masked text. The delays are 1, 2, 5, 10 and 20 minutes, with six tries including the first send. Rerunning the same answer command reuses that delivery; edited text creates another, and confirming it retires the older pending answer for that item.\n\nBefore each send Armada checks the worker generation and ownership. Merge notices also skip sessions that handed back. A changed or released worker, a permanent refusal or six unconfirmed tries produces one `delivery-failed` inbox item naming the ticket and the first line of the message. Inspect the session, decide the next step, then `armada answer <failure item> \"<why>\"` records your reason without sending it. A later successful answer for the ticket also resolves its failure item. Never send a kept message by hand too.\n\nConfirmed delivery is terminal before Linear and inbox recording. A recording warning asks you to inspect the ticket; Armada never sends that confirmed message again. Pending deliveries appear in status and inbox and keep the stop hook listening. Without a watch they wait. Herdr and Claude Code have no keyed delivery and stay on their runtime guide's inspect-first path. Deploy the pending-delivery API and migration before this CLI.\n\n## Worker caps\n\n`[policy] max_workers` caps project-wide worker sessions, including open claims waiting for merge and unclaimed launches. A full fleet refuses a new launch: use `armada launch <ticket> --when-unblocked` to wait for a slot, or `armada launch <ticket> --over-cap \"<why>\"` for a recorded bypass. Never use relaunch to bypass the cap; it replaces an existing worker. Urgent tickets pass automatically with a recorded reason. Status and re-arm lines show running workers separately from launches waiting for a slot. Without this setting, launches are uncapped; lowering it stops no worker.\n\n## Silence and liveness\n\n- **Silent**: no heartbeat, report or answer for `[policy] silence_minutes` (15 by default). A worker's first allowance adds `launch_grace_minutes` (defaults to `silence_minutes`). Shipping at stage `ci` gets `ci_wait_minutes` (45 by default). Waiting phases (`awaiting-approval`, `blocked`, `awaiting-validation`) are never silent while unanswered.\n- **Conductor sessions are observed**: a session Armada sees working is only called silent past twice the allowance, and the alert says it is still working. A session idle in a working phase for five minutes without a report or answer is `stopped`: nothing will wake it.\n- A silence wakes the watch at its allowance, then at twice, four times and each doubling after.\n- **Quiet**: a live worker without a report for `quiet_minutes` (45 by default) is a note for you only.\n- **Launch failed or uncertain**: `launch-failed` and `launch-uncertain` are recorded immediately for an attempted runtime launch, including deferred launches during merge/drain. The watch wakes on them. Read the reason and run the item’s `Next:` command. Failed launches and recovered but unconfirmed launches exit 1; preflight refusals still exit 2. An uncertain launch retains its token: inspect the worker before retrying creation. The `Launched` line and dry-run plan include the ticket title; JSON includes `title`. Repeated failures rewrite the same open item. It closes on the next claim, a successful launch binding, `armada launch revoke <ticket>`, or `armada answer <id> \"<why>\"`. Recording on Armada is best-effort; a recording warning never turns failure into success.\n- **Not started**: no claim `not_started_minutes` (10 by default) after the launch. An unused token that expired produces one notice, then clears. An open `launch-failed` or `launch-uncertain` item suppresses this notice for its ticket.\n- Claims end by themselves when their ticket is Done or Canceled, their hand-back merged, their session was revoked or their workspace archived.\n\n## Upgrades\n\n`armada status` and `armada inbox` mention a new Armada release at most once a day; ordinary releases leave the watch running. Only a CLI below the server minimum stops either watch mode with a `version` item, worded `Armada <x> required (you run <y>)`. Setup behind gets a separate daily notice in status, inbox and plain watch's final output; `armada upgrade` refreshes it through the normal setup merge checks. Setup drift leaves the watch running. Run `armada upgrade`: it waits for npm, installs the release, checks `armada --version`, and runs `armada init --merge` when the upgraded doctor finds a setup gap init can repair, including a missing hook. If signing may wait for a person, upgrade prints a one-line fix before init; it never disables signing automatically. Update this checkout from the default branch after the setup merge and run `armada doctor`. Workers in flight keep the version their brief pinned.\n\n## Specs\n\nSpecs are direct children of the program root, titled `Spec N — Name` (`Spec N/M — Name` is read too).\n\n- `armada spec add \"<name>\"` appends one with the **In short** template in the root's Linear project and the team's first backlog state (first to-do state if there is no backlog); it prints the project (or `no project`), state and URL. With neither state available, it keeps Linear's default. Earlier titles are untouched. Creation is never retried automatically: check Linear before running the command again after a failure.\n- `armada spec add \"<name>\" --at 5` previews the renames a middle insertion needs; repeat with `--apply` to write them.\n- `armada spec renumber` previews a repair of gaps, duplicates and stale totals; `--apply` writes it.\n- `[tracker] spec_titles = \"N/M\"` keeps totals in every title; appending then needs `--apply` too.\n- Writes are sequential and stop at the first failure, listing what was not confirmed: inspect Linear before retrying.\n\nCheck the printed project and state after creation. Fill in the **In short** template before cutting the spec's tickets, then run `armada lint <ticket>` on each one.\n\nWhen `armada merge` closes a spec's last open ticket, it closes the spec with a summary, unless the team's own parent auto-close does it.\n\n## Secrets\n\nThe secrets workers need (an LLM key, a test database URL) are kept per project in Armada, and workers use them through `armada run -- <command>`.\n\n- `armada secrets` lists the names, never a value. `armada doctor` names those `[secrets] names` expects and Armada lacks.\n- An owner or admin sets one with `armada secrets set <NAME>` (hidden prompt), `--value-stdin`, or `--from-env <VAR>`, which moves a variable without anyone reading it; `--org` sets it for every project. `armada secrets unset <NAME>` removes it.\n- Anyone else asks with `armada secrets request <NAME> --ticket <id> --reason \"<why>\"`: the owner gets a link and types the value into the vault. Repeated requests reuse one link.\n- Never put a value on a command line, in a brief, in notes or in chat. A value pasted anywhere must be rotated.\n\n## Long jobs\n\nLong runs (an evaluation, a backfill, a load test) run on the project's own runner, declared in `[jobs.<name>]` with its start, status and stop commands. Never run them in a session.\n\n- `armada job start <name> --ticket <id>` dispatches one and stores its runner reference; `armada job status` asks the runner, `armada job list` reads stored progress.\n- `armada job stop <id>` stops one on purpose; nothing is stopped automatically, even when its ticket is Done.\n- A runner can push progress with `armada job beat <id> --progress \"40/120\"`, signed in with an organization API key.\n- A running job with progress unchanged past `[jobs.<name>] stall_minutes` (60 by default) shows `stalled` and a `job-stalled` inbox alert. Check it with `armada job status <id>`; use `armada job stop <id>` only when you intend to stop it. Fraction progress (`n/m`) ignores ETA/clock changes; movement clears the alert and a later stall wakes the watch again. Silent jobs take precedence, and jobs without progress are never stalled. This only covers runs tracked through `armada job`; the alert never stops the job.\n- A job without news past its silence limit is a `job-silent` entry; a finished job leaves one `job` notice. Check it, or deliberately leave the notice alone with `armada ack <#id or key> --reason \"<why>\"`.\n- `armada job recover <id> --ref <reference>` attaches a runner reference that a lost answer did not record.\n\n## Shared resources\n\nMigration numbers, ports and other shared names are reserved per ticket through Armada: `armada reserve <key> --next --floor <n>` for numbers, `--value <name>` for names. `armada reserve --list` shows the holders. A release frees a ticket's reservations; a merge keeps them used for good. Declare well-known keys in `[[reservations]]` so briefs list them.\n\n## The owner's channel\n\nOrganization > Notifications (owner or admin) connects one chat webhook. Owner validations, escalated questions and a stopped coordinator with items waiting reach it by themselves, outside quiet hours. Each named coordinator is checked separately, including owner requests and project-wide operational items. A coordinator that keeps running commands also triggers one alert per unanswered plan, question, hand-back, decision or owner request after 3 × `[policy] coordinator_minutes` (30 minutes by default); queued or paused merges are excluded. Finished specs send their Linear link once after the next reading. A merge pause still open after five minutes sends its reason and project link; clearing a recorded pause sends “merges resume”. Short pauses and pre-channel history stay quiet. These milestones are channel-only, follow the alerts toggle, and are retained during quiet hours for the next summary. Act on the inbox rather than relying on command activity to keep these alerts quiet. GitHub and Linear webhook refreshes check alerts even with no live worker or viewer. Digests go out at the times set there; `armada digest --send` posts one now, and `armada digest --lang en|fr` overrides `[tracker] language` for the printed text.\n\n## Waiting launches\n\n`armada launch <ticket> --when-unblocked [--profile <name>] [--runtime conductor|herdr] [--notes <file|->]` remembers a launch until its Linear blockers close or a worker slot frees. `--after <blocker>` asserts an existing Linear relation. Without `--profile`, routing uses the ticket's labels when it starts; an explicit profile stays pinned, with its reason. Runtime and notes text survive until launch; explicit options when firing override the stored values.\n\nRequests expire after seven days. The inbox shows one expiry notice with the renew/decline commands. Repeat `armada launch <ticket> --when-unblocked` to renew the same request for seven more days and reset its attempt budget; omitted options preserve its pin and context. Decline with `armada answer <id> \"<why>\"`. Completed or cancelled tickets close their request automatically. A launched worker waiting to claim is shown quietly in status.\n\nThe running watch starts eligible requests itself, oldest first, at most one per poll, when any blocker closes or a worker slot frees. Successful starts stay quiet in plain watch and appear in status and the next re-arm line; follow prints a `launched` line, respecting `--tickets` and `--kinds` (use `--kinds launched` for starts alone). Merge/drain still fire the tickets that their merge unblocked. Only this coordinator's requests fire, with no cap bypass. Herdr starts on the watch's machine; automatic launches never prompt to install tools.\n\nFire-time admission checks cancellation, expiry and ownership; launch rechecks the request after preflight and fresh Linear readiness, including the ready label. Known failures, including missing runtime tools, arrive as one rewritten `launch-failed` inbox item. Keep/re-arm watch to retry after five minutes, then fifteen minutes, at most three attempts total. The third failure says `gave up after 3 failed launches`; renew or decline deliberately. An uncertain creation keeps its pending launch even after token expiry: inspect and revoke it before another automatic creation. Guided Claude Code profiles stay manual inbox work with `armada brief ... --prompt` for the Agent tool. `coordinator take` transfers the waiting request too. Missing readings or unavailable admission/attempt metadata prevent automatic firing: deploy the dashboard before the CLI.\n\n## Start\n\nAfter Claude compact/resume, follow the Armada brief; see [REFERENCE.md](REFERENCE.md#the-sessionstart-brief).\n\n1. **Sign in.** `armada whoami` says whether this terminal is signed in and to which organization. If not: a person runs `armada login` and approves the code in the browser; a headless coordinator (a cloud workspace, CI) sets `ARMADA_API_KEY` to an organization API key an owner created, or runs `armada login --api-key`. Signed in, Armada gives each command the organization's keys and puts a one-time launch token in every brief, so no worker needs a key. Keys set in the environment still win. `armada doctor` checks the repository and the sign-in together.\n2. **Take your name.** One project can have several coordinators, each with a name. Set `ARMADA_COORDINATOR=<name>` (a cloud workspace) or run `armada coordinator use <name>` (this checkout); without either the name is `default`. A named coordinator sees its own workers and unowned items; `default` sees the whole fleet. `armada coordinator list` shows the names, their sessions and tickets. Status names work stranded under a silent role with the `armada coordinator take … --from <name>` command; use it when you resume that work. See REFERENCE.md before sharing a project.\n3. **Find your coordination ticket**, if the owner gave you one. Read its comments, newest first. A last comment `Agent status: released — <text>` is a hand-over: `<text>` is the state the previous coordinator left. Claim the ticket with your own handle, never the previous one: `armada claim <ticket> --runtime <your runtime> --handle <your handle> --branch <default branch>` (in Conductor, `--runtime conductor --handle \"$CONDUCTOR_WORKSPACE_ID/$CONDUCTOR_SESSION_ID\"`; elsewhere set `ARMADA_COORDINATOR_HANDLE` to the handle you claimed with). Report on it as a worker would, `armada report implementing --ticket <ticket> --message \"<what you found and do next>\"`, and hand over with `armada release --ticket <ticket> --reason \"<state so far and what remains>\"` when you stop before the run ends. Write that reason for a reader with none of your context.\n4. **Run from anywhere.** Commands find the project from the checkout. From another folder, pass `--project <slug>` (this machine's last watched checkout) or set `ARMADA_CONFIG=/path/to/armada.toml`; `--config <path>` wins over both.\n\n## Launch details\n\n6. **Launch** Conductor and herdr workers with one command:\n\n```sh\narmada launch ABC-12 --runtime conductor --profile backend --pre-approve --reason \"CLI and core only; a small follow-up\" --notes notes.md\n```\n\nOne `--reason` explains both the profile choice and the pre-approval. `--runtime conductor|herdr` may be left out when the profile settles it. `--notes <file|->` adds what only you know (the boundary with a parallel worker, a decision not yet on the ticket), up to 16 KB; notes never approve a plan. `--dry-run` checks everything and creates nothing. The command refuses a ticket already launched or claimed, mints the token, starts the worker and prints its handle and link, never the token. For failed or uncertain launches, follow REFERENCE.md. Put worker conventions in `[brief] extra`. For a Claude Code profile, run `armada brief <ticket> --prompt` with the same flags and launch through the Agent tool as its runtime guide says.\n\n## Stop a superseded worker on a Done ticket\n\nWhen another change covered a worker's ticket and it is already Done, run `armada stop ABC-12 --superseded \"<why>\"`. It posts the reason on Linear, releases the exact claim, ends only worker sessions launched by its claim time and archives that runtime workspace. Done stays Done; no workflow-state workaround is needed. A replacement claim refuses cleanup, and herdr still requires a clean, fully pushed worktree. If archival fails after release, retry the same command. `--superseded` requires Done; unfinished tickets use ordinary release and stop. Alternatively, `armada release --ticket ABC-12 --reason \"<why>\"` preserves Done, followed by `armada stop ABC-12` for archival.\n"
13986
13986
  },
13987
13987
  {
13988
13988
  path: "SKILL.md",
@@ -17406,6 +17406,14 @@ var bad = (id, level, message, fix) => ({
17406
17406
  message,
17407
17407
  fix
17408
17408
  });
17409
+ var manualGap = (id, level, message, fix) => ({
17410
+ ...bad(id, level, message, fix),
17411
+ repair: "manual"
17412
+ });
17413
+ var initGap = (id, level, message, fix) => ({
17414
+ ...bad(id, level, message, fix),
17415
+ repair: "init"
17416
+ });
17409
17417
  function optionalFeatures(config) {
17410
17418
  const checks = [];
17411
17419
  const info = (id, message) => checks.push({ id: `optional:${id}`, level: "info", message, fix: null });
@@ -17550,18 +17558,18 @@ async function checkRepository(view, armadaVersion, stopHookInstalledIn, session
17550
17558
  const checks = [];
17551
17559
  const configText = await view.readFile(CONFIG_FILE);
17552
17560
  if (configText === null)
17553
- checks.push(bad("config", "error", `${CONFIG_FILE} is missing`, "run `armada init --program-root <ISSUE-ID>` to open a pull request that adds it"));
17561
+ checks.push(initGap("config", "error", `${CONFIG_FILE} is missing`, "run `armada init --program-root <ISSUE-ID>` to open a pull request that adds it"));
17554
17562
  else
17555
17563
  try {
17556
17564
  const config = parseConfig(configText, CONFIG_FILE);
17557
17565
  checks.push(ok("config", `${CONFIG_FILE} is valid (project ${config.project.slug})`));
17558
17566
  const extra = config.brief.extra;
17559
17567
  if (extra)
17560
- checks.push(await view.readFile(extra) === null ? bad("brief-extra", "warning", `[brief] extra names ${extra}, which is missing: briefs go out without the project conventions`, `add ${extra}, or fix the path in ${CONFIG_FILE}`) : ok("brief-extra", `${extra} goes into every brief as the project conventions`));
17568
+ checks.push(await view.readFile(extra) === null ? manualGap("brief-extra", "warning", `[brief] extra names ${extra}, which is missing: briefs go out without the project conventions`, `add ${extra}, or fix the path in ${CONFIG_FILE}`) : ok("brief-extra", `${extra} goes into every brief as the project conventions`));
17561
17569
  } catch (err) {
17562
17570
  if (!(err instanceof ConfigError))
17563
17571
  throw err;
17564
- checks.push(bad("config", "error", err.message, `fix the keys listed above in ${CONFIG_FILE}`));
17572
+ checks.push(manualGap("config", "error", err.message, `fix the keys listed above in ${CONFIG_FILE}`));
17565
17573
  }
17566
17574
  let lock = null;
17567
17575
  let lockError = null;
@@ -17573,7 +17581,7 @@ async function checkRepository(view, armadaVersion, stopHookInstalledIn, session
17573
17581
  lockError = err.message;
17574
17582
  }
17575
17583
  if (lockError)
17576
- checks.push(bad("skills-lock", "error", lockError, `repair or delete ${SKILLS_LOCK_FILE}`));
17584
+ checks.push(manualGap("skills-lock", "error", lockError, `repair or delete ${SKILLS_LOCK_FILE}`));
17577
17585
  const wholeDir = await linksWholeDir(view);
17578
17586
  const differing = [];
17579
17587
  let present = 0;
@@ -17581,13 +17589,13 @@ async function checkRepository(view, armadaVersion, stopHookInstalledIn, session
17581
17589
  const installed = await installedHash(view, skill.name);
17582
17590
  const id = `skill:${skill.name}`;
17583
17591
  if (installed === null) {
17584
- checks.push(bad(id, "error", `skill ${skill.name} is missing from ${AGENTS_SKILLS_DIR}`, "run `armada init`"));
17592
+ checks.push(initGap(id, "error", `skill ${skill.name} is missing from ${AGENTS_SKILLS_DIR}`, "run `armada init`"));
17585
17593
  continue;
17586
17594
  }
17587
17595
  present++;
17588
17596
  if (installed !== deliveredHash(skill, skillRef(lock?.skills[skill.name]))) {
17589
17597
  differing.push(skill.name);
17590
- checks.push(bad(id, "warning", `skill ${skill.name} differs from the version in Armada ${armadaVersion}`, "run `armada init` to open a pull request that updates it"));
17598
+ checks.push(initGap(id, "warning", `skill ${skill.name} differs from the version in Armada ${armadaVersion}`, "run `armada init` to open a pull request that updates it"));
17591
17599
  } else
17592
17600
  checks.push(ok(id, `skill ${skill.name} is up to date`));
17593
17601
  const target = await view.readLink(linkPath(skill.name));
@@ -17597,39 +17605,44 @@ async function checkRepository(view, armadaVersion, stopHookInstalledIn, session
17597
17605
  else if (target === skillLinkTarget(skill.name))
17598
17606
  checks.push(ok(linkId, `${linkPath(skill.name)} links to ${skillDir(skill.name)}`));
17599
17607
  else
17600
- checks.push(bad(linkId, "error", target === null ? `${linkPath(skill.name)} is not a link to ${skillDir(skill.name)}, so Claude Code does not see the skill` : `${linkPath(skill.name)} links to ${target} instead of ${skillLinkTarget(skill.name)}`, "run `armada init`"));
17608
+ checks.push(initGap(linkId, "error", target === null ? `${linkPath(skill.name)} is not a link to ${skillDir(skill.name)}, so Claude Code does not see the skill` : `${linkPath(skill.name)} links to ${target} instead of ${skillLinkTarget(skill.name)}`, "run `armada init`"));
17601
17609
  if (lockError)
17602
17610
  continue;
17603
17611
  const entry = lock?.skills[skill.name];
17604
17612
  const lockId = `skill-lock:${skill.name}`;
17605
17613
  if (!entry)
17606
- checks.push(bad(lockId, "error", `${SKILLS_LOCK_FILE} does not record ${skill.name}`, "run `armada init`"));
17614
+ checks.push(initGap(lockId, "error", `${SKILLS_LOCK_FILE} does not record ${skill.name}`, "run `armada init`"));
17607
17615
  else if (entry.sourceType !== (skill.delivery === "pointer" ? "armada-cli" : "github"))
17608
- checks.push(bad(lockId, "warning", `${SKILLS_LOCK_FILE} records the wrong delivery for ${skill.name}`, "run `armada init`"));
17616
+ checks.push(initGap(lockId, "warning", `${SKILLS_LOCK_FILE} records the wrong delivery for ${skill.name}`, "run `armada init`"));
17609
17617
  else if (installed !== null && entry.computedHash !== installed)
17610
- checks.push(bad(lockId, "warning", `${SKILLS_LOCK_FILE} records a different content for ${skill.name} than ${skillDir(skill.name)}`, "run `armada init`"));
17618
+ checks.push(initGap(lockId, "warning", `${SKILLS_LOCK_FILE} records a different content for ${skill.name} than ${skillDir(skill.name)}`, "run `armada init`"));
17611
17619
  else
17612
17620
  checks.push(ok(lockId, `${SKILLS_LOCK_FILE} records ${skill.name}`));
17613
17621
  }
17614
17622
  const behind = behindOf(lock, differing);
17615
17623
  if (behind)
17616
- checks.push(bad("skills-version", "warning", skillsBehindMessage(behind, armadaVersion), skillsBehindFix(behind, armadaVersion)));
17624
+ checks.push((ahead(behind, armadaVersion) ? manualGap : initGap)("skills-version", "warning", skillsBehindMessage(behind, armadaVersion), skillsBehindFix(behind, armadaVersion)));
17617
17625
  else if (present)
17618
17626
  checks.push(ok("skills-version", `this project's Armada skills match Armada ${armadaVersion}'s`));
17619
17627
  const settings = await view.readFile(CONDUCTOR_SETTINGS);
17620
17628
  if (settings === null)
17621
- checks.push(bad("conductor", "error", `${CONDUCTOR_SETTINGS} is missing`, "run `armada init` to add it with a setup script"));
17629
+ checks.push(initGap("conductor", "error", `${CONDUCTOR_SETTINGS} is missing`, "run `armada init` to add it with a setup script"));
17622
17630
  else
17623
17631
  try {
17624
- checks.push(conductorSetup(settings) ? ok("conductor", `${CONDUCTOR_SETTINGS} has a setup script`) : bad("conductor", "error", `${CONDUCTOR_SETTINGS} has no [scripts] setup`, "run `armada init`, or add a setup command under [scripts]"));
17632
+ if (conductorSetup(settings))
17633
+ checks.push(ok("conductor", `${CONDUCTOR_SETTINGS} has a setup script`));
17634
+ else {
17635
+ withSetup(settings, await guessSetupCommand(view));
17636
+ checks.push(initGap("conductor", "error", `${CONDUCTOR_SETTINGS} has no [scripts] setup`, "run `armada init`, or add a setup command under [scripts]"));
17637
+ }
17625
17638
  } catch (err) {
17626
17639
  if (!(err instanceof SetupError))
17627
17640
  throw err;
17628
- checks.push(bad("conductor", "error", err.message, `fix ${CONDUCTOR_SETTINGS}`));
17641
+ checks.push(manualGap("conductor", "error", err.message, `fix ${CONDUCTOR_SETTINGS}`));
17629
17642
  }
17630
17643
  checks.push(await stopHookCheck(view, stopHookInstalledIn));
17631
17644
  checks.push(await sessionStartHookCheck(view, sessionStartHookInstalledIn));
17632
- checks.push(ignoresShipArtifacts(await view.readFile(GITIGNORE)) ? ok("gitignore", `${GITIGNORE} ignores ${SHIP_ARTIFACTS}`) : bad("gitignore", "warning", `${GITIGNORE} does not ignore ${SHIP_ARTIFACTS}, so the ship-pr-dev skill refuses to start`, "run `armada init`"));
17645
+ checks.push(ignoresShipArtifacts(await view.readFile(GITIGNORE)) ? ok("gitignore", `${GITIGNORE} ignores ${SHIP_ARTIFACTS}`) : initGap("gitignore", "warning", `${GITIGNORE} does not ignore ${SHIP_ARTIFACTS}, so the ship-pr-dev skill refuses to start`, "run `armada init`"));
17633
17646
  return checks;
17634
17647
  }
17635
17648
  var isObject = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
@@ -17725,11 +17738,13 @@ async function sessionStartHookCheck(view, installedIn) {
17725
17738
  if (installedIn)
17726
17739
  return ok(id, `${installedIn} has Armada’s session-start hook: briefs coordinators after compact or resume`);
17727
17740
  try {
17728
- return hasSessionStartHook(claudeSettings(await view.readFile(CLAUDE_SETTINGS))) ? ok(id, `${CLAUDE_SETTINGS} has Armada's session-start hook: briefs coordinators after compact or resume`) : bad(id, "warning", `${CLAUDE_SETTINGS} has no Armada session-start hook, so compact or resume can lose the coordinator's watch context`, "run `armada init` and accept the hooks (this repository’s settings only, never your user settings)");
17741
+ const text = await view.readFile(CLAUDE_SETTINGS);
17742
+ withArmadaHooks(text);
17743
+ return hasSessionStartHook(claudeSettings(text)) ? ok(id, `${CLAUDE_SETTINGS} has Armada's session-start hook: briefs coordinators after compact or resume`) : initGap(id, "warning", `${CLAUDE_SETTINGS} has no Armada session-start hook, so compact or resume can lose the coordinator's watch context`, "run `armada init` and accept the hooks (this repository’s settings only, never your user settings)");
17729
17744
  } catch (err) {
17730
17745
  if (!(err instanceof SetupError))
17731
17746
  throw err;
17732
- return bad(id, "warning", `Claude Code session-start hook not checked: ${err.message}`, `fix ${CLAUDE_SETTINGS}`);
17747
+ return manualGap(id, "warning", `Claude Code session-start hook not checked: ${err.message}`, `fix ${CLAUDE_SETTINGS}`);
17733
17748
  }
17734
17749
  }
17735
17750
  async function stopHookCheck(view, installedIn) {
@@ -17738,13 +17753,15 @@ async function stopHookCheck(view, installedIn) {
17738
17753
  return ok(id, `${installedIn} has Armada's stop hook (ARMADA_STOP_HOOK=off turns it off)`);
17739
17754
  let settings;
17740
17755
  try {
17741
- settings = claudeSettings(await view.readFile(CLAUDE_SETTINGS));
17756
+ const text = await view.readFile(CLAUDE_SETTINGS);
17757
+ withArmadaHooks(text);
17758
+ settings = claudeSettings(text);
17742
17759
  } catch (err) {
17743
17760
  if (!(err instanceof SetupError))
17744
17761
  throw err;
17745
- return bad(id, "warning", `Claude Code stop hook not checked: ${err.message}`, `fix ${CLAUDE_SETTINGS}`);
17762
+ return manualGap(id, "warning", `Claude Code stop hook not checked: ${err.message}`, `fix ${CLAUDE_SETTINGS}`);
17746
17763
  }
17747
- return hasStopHook(settings) ? ok(id, `${CLAUDE_SETTINGS} has Armada's stop hook: a Claude Code coordinator cannot end its turn while workers are in flight and no armada watch runs (ARMADA_STOP_HOOK=off turns it off)`) : bad(id, "warning", `${CLAUDE_SETTINGS} has no Armada stop hook, so a Claude Code coordinator can stop watching its fleet without noticing`, "run `armada init` and accept the stop hook (this repository's settings only, never your user settings)");
17764
+ return hasStopHook(settings) ? ok(id, `${CLAUDE_SETTINGS} has Armada's stop hook: a Claude Code coordinator cannot end its turn while workers are in flight and no armada watch runs (ARMADA_STOP_HOOK=off turns it off)`) : initGap(id, "warning", `${CLAUDE_SETTINGS} has no Armada stop hook, so a Claude Code coordinator can stop watching its fleet without noticing`, "run `armada init` and accept the stop hook (this repository's settings only, never your user settings)");
17748
17765
  }
17749
17766
  async function guessSetupCommand(view) {
17750
17767
  const has = async (p) => await view.readFile(p) !== null;
@@ -18419,7 +18436,7 @@ ${attachments.join(`
18419
18436
  };
18420
18437
  }
18421
18438
  // package.json
18422
- var version = "0.2.64";
18439
+ var version = "0.2.65";
18423
18440
 
18424
18441
  // src/io.ts
18425
18442
  class UsageError extends Error {
@@ -29633,7 +29650,6 @@ ${created.url}
29633
29650
  // src/upgrade.ts
29634
29651
  var ATTEMPTS = 5;
29635
29652
  var WAIT_MS = 30000;
29636
- var SETUP_CHECK = /^(skill:|skill-link:|skill-lock:|skills-version$|skills-lock$|conductor$|stop-hook$|gitignore$)/;
29637
29653
  async function targetVersion(io) {
29638
29654
  const fetch2 = io.fetch ?? globalThis.fetch;
29639
29655
  const server = heard(io).server;
@@ -29694,18 +29710,29 @@ async function upgrade(io, running, root) {
29694
29710
  } catch {}
29695
29711
  if (doctor.timedOut || doctor.code !== 0 && doctor.code !== 1 || report?.schemaVersion !== 1 || report.armadaVersion !== target || report.root !== root || !Array.isArray(report.checks) || !report.checks.length || report.checks.some((check) => !check || typeof check.id !== "string" || !["ok", "info", "warning", "error"].includes(check.level)))
29696
29712
  throw new CommandError("the upgraded doctor could not check setup; run armada doctor before refreshing it");
29697
- const setupBehind = report.checks.some((check) => SETUP_CHECK.test(check.id) && check.level !== "ok");
29713
+ const manualGaps = report.checks.some((check) => check.repair === "manual" && ["warning", "error"].includes(check.level));
29714
+ const setupBehind = report.checks.some((check) => check.repair === "init" && ["warning", "error"].includes(check.level));
29698
29715
  if (report.checks.some((check) => check.id === "skills-version" && check.level !== "ok" && check.fix?.includes("update the CLI")))
29699
29716
  throw new CommandError(`this project's skills require a CLI newer than Armada ${target}; retry after npm serves it`);
29700
29717
  if (setupBehind) {
29701
- io.stdout(`Armada ${target} verified; refreshing outdated setup with armada init --merge.
29718
+ io.stdout(`Armada ${target} verified; repairing setup gaps with armada init --merge.
29719
+ `);
29720
+ if (manualGaps)
29721
+ io.stderr(`armada: doctor also found setup gaps needing manual repair; run armada doctor for the fixes.
29722
+ `);
29723
+ const signing = report.checks.find((check) => check.id === "git-signing" && check.level === "warning");
29724
+ if (signing)
29725
+ io.stderr(`armada: setup commit signing: ${signing.message.replace(/\s+/g, " ")}; fix: ${signing.fix?.replace(/\s+/g, " ") ?? "run armada doctor"}; if branch rules allow unsigned commits, retry with GIT_CONFIG_COUNT=1 GIT_CONFIG_KEY_0=commit.gpgsign GIT_CONFIG_VALUE_0=false armada init --merge.
29702
29726
  `);
29703
29727
  const init = await exec("armada", ["init", "--merge"], { cwd: root, timeoutMs: 20 * 60000 });
29704
29728
  if (init.code !== 0 || init.timedOut)
29705
29729
  throw new CommandError(`Armada ${target} is installed, but setup refresh did not finish; run armada init --merge to resume`);
29706
- io.stdout(`Armada ${target} installed; setup refresh completed.
29730
+ io.stdout(`Armada ${target} installed; setup refresh completed on the default branch; update this checkout from it and run armada doctor.
29707
29731
  `);
29708
- } else
29732
+ } else if (manualGaps)
29733
+ io.stdout(`Armada ${target} installed; setup needs manual repair; run armada doctor for the fixes.
29734
+ `);
29735
+ else
29709
29736
  io.stdout(`Armada ${target} installed; setup is up to date.
29710
29737
  `);
29711
29738
  return 0;
@@ -29933,9 +29960,9 @@ var COMMAND_HELP = {
29933
29960
  `,
29934
29961
  upgrade: ` upgrade Install the newest Armada npm serves, verify armada --version,
29935
29962
  then check setup with the upgraded doctor. Waits up to five publication
29936
- checks over about two minutes. Runs armada init --merge only for
29937
- outdated setup. Requires armada.toml at the selected Git root;
29938
- workers keep their launch's pinned version
29963
+ checks over about two minutes. Runs armada init --merge for
29964
+ setup gaps the upgraded doctor marks as repairable by init.
29965
+ Requires armada.toml at the selected Git root; workers keep their launch's pinned version
29939
29966
  `,
29940
29967
  init: ` init [--program-root <ISSUE-ID>] [--name <name>] [--slug <slug>] [--no-stop-hook] [--merge]
29941
29968
  Open one pull request that installs or updates it all, create the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@the-vibe-company/armada",
3
- "version": "0.2.64",
3
+ "version": "0.2.65",
4
4
  "type": "module",
5
5
  "description": "Run a fleet of coding agents on one project: the armada command line.",
6
6
  "license": "MIT",