@the-vibe-company/armada 0.2.55 → 0.2.57

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.
Files changed (3) hide show
  1. package/README.md +158 -10
  2. package/dist/armada.js +20766 -10073
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -4,7 +4,16 @@ Armada runs a fleet of coding agents on one project and keeps every piece of wor
4
4
 
5
5
  It imposes one method: grill the decisions, write a spec, cut it into tickets, let one worker agent ship each ticket as a green pull request, and let a coordinator agent merge. The tracker is the source of truth for progress; Armada adds live telemetry, contention rules and a fleet dashboard on top.
6
6
 
7
- **Status:** early. `armada status`, `armada auth`, `armada doctor`, `armada init`, `armada brief`, `armada launch`, `armada claim`, `armada report`, `armada release`, `armada ask`, `armada inbox`, `armada answer`, `armada merge`, `armada validate`, `armada ask-owner` and `armada done` work; the other commands are being built.
7
+ **Status:** early; the CLI and dashboard run the full ticket-to-pull-request workflow.
8
+
9
+ ## What Armada does for you
10
+
11
+ - Launch one worker per ready ticket, preserve its session and progress, and let named coordinators resume the fleet.
12
+ - Route questions and owner approvals to the dashboard; send owner alerts and scheduled digests through a configured chat webhook.
13
+ - Keep merges under shared holds and a durable queue, notify affected workers, and require live acceptance checks when configured.
14
+ - Explain CI failures, rerun declared flakes once, check deployments and smoke tests after merges, and track long jobs on your runner.
15
+
16
+ `armada doctor` points out optional configuration. Enable what your project needs in `armada.toml` and Organization > Notifications; the [runbook](docs/runbook.md) covers each feature.
8
17
 
9
18
  ## Install
10
19
 
@@ -23,6 +32,7 @@ npm install -g @the-vibe-company/armada # then: armada status
23
32
  2. **Enter the keys** once, on Organization > Keys: the Linear API key. It stays sealed in Armada: no laptop or runtime needs it, and no machine needs a database key either, since the CLI reaches the fleet's live data through Armada ([Keys](#keys)).
24
33
  3. **Sign in from the terminal**: `armada login`, then approve the code in the browser. A headless coordinator sets `ARMADA_API_KEY` to an organization API key instead ([Sign in from a terminal](#sign-in-from-a-terminal)).
25
34
  4. **Set up the repository**: `armada doctor` lists what it lacks, `armada init --program-root ABC-1` opens one pull request that adds it all ([Set up a repository](#set-up-a-repository)); merge it.
35
+ 5. **Choose optional features.** Use the commented template and doctor’s `info` lines to configure deployment targets/smoke checks, known flakes, acceptance checks, jobs and owner approval rules. Enable owner alerts/digests on Organization > Notifications, then select each coordinator’s name with `armada coordinator use <name>`. Launch cloud workers with `armada launch ABC-12 --runtime conductor`. For an existing checkout, follow [Upgrade an existing project](docs/runbook.md#upgrade-an-existing-project).
26
36
 
27
37
  ```sh
28
38
  armada login
@@ -46,23 +56,31 @@ GitHub is read with `GITHUB_TOKEN`, `GH_TOKEN` or the GitHub CLI login (`gh auth
46
56
  ```sh
47
57
  armada doctor # what this repository lacks, with the fix for each
48
58
  armada init --program-root ABC-1 # one pull request that adds it all
49
- armada skills update # update bundled skills locally on your current branch
59
+ armada skill armada-worker # read instructions from the installed CLI
60
+ armada skill armada-coordinator MERGE.md # read a linked file
61
+ armada skills update # update pointers and vendored skills on your branch
50
62
  ```
51
63
 
52
64
  `armada doctor` checks, in the repository you are in:
53
65
 
54
66
  - `armada.toml` exists and is valid;
55
- - the Armada skills (`armada-coordinator`, `armada-worker`, `armada-runtime-conductor`, `armada-runtime-claude-code`, `armada-runtime-herdr`, `ship-pr-dev`, `review-code-dev`, `capture-learning-tools`) are in `.agents/skills`, linked from `.claude/skills`, recorded in `skills-lock.json` (the [`npx skills`](https://github.com/vercel-labs/skills) format), and match this version of Armada;
67
+ - the five `armada-*` skills are discovery pointers in `.agents/skills`, linked from `.claude/skills`; their descriptions trigger Claude Code and Codex to run `armada skill <name> [<file>]` and follow the installed CLI version. `skills-lock.json` records their pointer hashes with `sourceType: "armada-cli"` and a tagged GitHub source link. The scripted `ship-pr-dev`, `review-code-dev` and `capture-learning-tools` packages stay fully vendored and checked by their folder hashes;
56
68
  - `.conductor/settings.toml` has a `[scripts] setup` command;
57
69
  - `.gitignore` ignores `plans/ship-pr-dev/`;
58
70
  - this terminal is signed in to Armada, and to which organization: without a sign-in, `armada brief` gives workers no launch token, so each would need the keys in its environment;
59
71
  - this CLI is as recent as that Armada expects (signed in only): every answer of the Armada API names the oldest CLI that reads it right and the latest one, and a CLI older than the oldest prints one line on any command, `Armada <version> is older than this server expects: npm install -g @the-vibe-company/armada@<latest>`;
60
72
  - no key is left in the credentials file that Armada now gives this terminal (`armada auth logout` removes them, the sign-in stays);
73
+ - commit signing: known password-manager signers and GUI pinentry warn when signing may wait for a person. `armada doctor --deep` explicitly tests a signed throwaway commit object with a 10-second limit and moves no refs; the default check never signs. GitHub-required signatures are an error when signing is disabled locally or `[git] sign = "off"`;
61
74
  - the Linear label groups `Agent phase` and `Agent runtime` exist with every value (needs a Linear key, from Armada or `LINEAR_API_KEY`);
62
75
  - with Conductor profiles in `armada.toml`, the `conductor` command is found: on PATH, or inside the macOS app at `/Applications/Conductor.app/Contents/Resources/bin/conductor`, with the fix that puts it on PATH.
63
76
 
64
77
  Each problem is an error or a warning, with its fix. A missing skill, or a CLI older than Armada expects, is an error: workers cannot run without it. A skill that differs from this Armada version, a missing ignore line, a missing sign-in or a leftover key is a warning. Doctor exits 1 when there is an error. `--json` prints the same report as JSON.
65
78
 
79
+ 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.
80
+
81
+ 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. Only a required server minimum or changed installed setup produces a `version` item and stops either watch mode. 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.
82
+
83
+
66
84
  The shipping skills include every helper, reference, eval, companion manifest and license.
67
85
  `armada doctor` also checks Python 3.9+, Git 2.41+ and the checksum-pinned OCR 1.12.1
68
86
  cache without downloading or executing OCR. Its first bootstrap requires GitHub
@@ -74,11 +92,13 @@ vendored `review-code-dev` setup notes for supported platforms and exact fixes.
74
92
  `armada init` fixes the repository setup in one go:
75
93
 
76
94
  1. It creates the missing Linear labels (a missing group goes in the team of the program root).
77
- 2. It builds the missing or outdated files on a fresh checkout of the default branch, commits them on the branch `armada/init-<version>` and opens a pull request with `gh`. Your own checkout is not touched. Running it again rebuilds that branch and updates the same pull request. When the default branch already has everything, no pull request is opened.
95
+ 2. It builds the missing or outdated files on a fresh checkout of the default branch, commits them on the stable branch `armada/setup` and opens a pull request with `gh`. Your own checkout is not touched. Running it again, including with a newer CLI version, rebuilds that branch and updates the same open pull request. The first run replaces legacy `armada/init-*` pull requests, closing each with a link to the replacement. When the default branch already has everything, no pull request is opened.
78
96
  3. It registers the project (slug, name, repository, program root) on Armada, for the organization the terminal is signed in to, so `armada status --all` and the dashboard list it. A slug another organization already holds is refused.
79
97
 
98
+ `armada init --merge` waits for the same checks as `armada merge <n> --no-ticket --wait` and merges the setup pull request itself. It refuses changes outside `.agents/skills/**`, `.claude/skills/**`, `skills-lock.json`, `.conductor/settings.toml`, `.claude/settings.json` and `.gitignore`; `armada.toml` is allowed only when the default branch has none.
99
+
80
100
  To update the bundled skills on an existing ticket branch, run `armada skills update`.
81
- It uses init's vendoring rules for skills, links, `skills-lock.json` and the shipping
101
+ It uses init's pointer and vendoring rules for skills, links, `skills-lock.json` and the shipping
82
102
  artifact ignore, in the current checkout. It requires Git, but no sign-in, Linear
83
103
  key or network. Review and commit its changes yourself; it does not open a setup PR
84
104
  or edit `armada.toml`, Conductor scripts or Claude hooks. It replaces locally edited
@@ -112,6 +132,23 @@ armada launch revoke ABC-12 # cancel the newest pending launch throug
112
132
  - Label rules win: the first `[[conductor.routing]]` rule with a label the ticket carries (case, spaces and punctuation ignored) selects its profile. Otherwise, profiles with `when = "front end: dashboard pages, components, styles, design, UI copy"` or `when = "back end: CLI, core rules, API, database, migrations, tests, docs"` ask the coordinator to choose. `armada brief ABC-12` prints **Choose a profile**, the ticket's title and In short, and every profile's rule; it creates no launch token or watch entry. `--json` returns the choice information; `--prompt` refuses until a profile is chosen. Read the ticket and parent spec, choose the rule covering most files/work (explain mixed work), then run `armada brief ABC-12 --profile codex --reason "mostly CLI and core rules" --prompt`. Armada does not call a model to classify tickets. Projects without `when` keep their old `conductor.default_profile` or only-profile fallback.
113
133
  - `--profile` also overrides a label route. `--reason` is required for semantic choices and, when routing rules exist, overrides of the routed profile. Keep both flags on subsequent `--prompt` calls. The generated claim command carries the reason; the claim comment, `armada status` and dashboard agent Profile row show it. An unknown profile exits 2. The dashboard's ready-to-launch row shows a label-routed profile or "chosen by the coordinator"; Launch still sends an inbox request, not a runtime call.
114
134
 
135
+ ## Tracker conventions
136
+
137
+ Run `armada lint --ready` before launching workers. It checks tickets on the frontier carrying the project's ready label and all open specs under the program root. `armada lint ABC-12 ABC-13` checks named tickets in the program; combining names with `--ready` checks their union. Each finding gives the problem and its fix; `--json` returns the same diagnostics.
138
+
139
+ Tickets and specs should have an `## In short` section with **What changes**, **Why**, **Done when** and **Depends on** parts (a standalone heading or label, or followed by a colon or period). Titles describe an outcome in plain words, at most 60 characters: keep backticks, paths, file extensions, camelCase, snake_case and function parentheses in the technical detail. Spec titles accept both `Spec N — Name` and `Spec N/M — Name`; the length limit counts only the name. There is no starting-verb check, since it would misfire across languages.
140
+
141
+ Without a lint table, these defaults produce warnings and exit 0. Add the table to enforce errors (exit 1), overriding only the rules your project needs:
142
+
143
+ ```toml
144
+ [tracker.lint]
145
+ in_short = "## In short"
146
+ in_short_parts = ["What changes", "Why", "Done when", "Depends on"]
147
+ title_max = 60
148
+ ```
149
+
150
+ `armada brief` reports the same findings as warnings above its prompt and still produces it. With `--prompt`, warnings go to stderr before the prompt on stdout. Description reads for lint are batched in one flat Linear query per page; dashboards and polls never run them. A failed or incomplete read exits nonzero rather than claiming tickets passed.
151
+
115
152
  ## Run workers on your own machine
116
153
 
117
154
  Workers do not have to run in Conductor Cloud. With [herdr](https://herdr.dev) 0.9.1 or newer, the coordinator runs each worker on this machine, in its own git worktree and terminal, and the worker keeps going when the coordinator disconnects (the machine must stay awake). Four harnesses are supported: `claude`, `codex`, `opencode`, and `deepseek`, which runs a persistent OpenCode session with the DeepSeek model you configure. Add a local profile to the project's `armada.toml`:
@@ -130,6 +167,8 @@ Label routing follows the same rules as the Conductor profiles (`[[herdr.routing
130
167
  armada launch ABC-12 --runtime herdr --profile backend --reason "back end work"
131
168
  ```
132
169
 
170
+ `[git] sign = "inherit"` (the default) keeps signing configuration in new Herdr worktrees. Use `sign = "off"` only when branch rules allow unsigned commits: launch enables `extensions.worktreeConfig` and writes `commit.gpgsign = false` in the new worktree only. Repositories with common `core.worktree`, `core.bare = true` or `core.sparseCheckout = true` need those settings migrated to per-worktree config first; launch reports the fix instead of changing their meaning. If an included config still enables signing after the worktree override, launch stops before starting the worker and names the fix. Conductor Cloud workspaces keep their environment’s own signing configuration.
171
+
133
172
  `armada doctor` checks what the local profiles need: herdr (0.9.1 or newer), each harness CLI, the Claude and Codex sign-ins, and every OpenCode or DeepSeek profile's exact model against `opencode models`. On a terminal it offers the official installs and a numbered model pick, each only with your consent; `--json` and CI only print the fixes. Armada never runs a sign-in and never handles a provider key. The runbook's [Launch a persistent local worker](docs/runbook.md#launch-a-persistent-local-worker) has the rest: routing and model choice, messaging the worker, and safe archival with `armada stop`.
134
173
 
135
174
  ## Work on a ticket (workers)
@@ -240,6 +279,16 @@ armada merge 35 --no-ticket # a pull request no ticket owns: armada init's, a re
240
279
  - When that database is unreachable, a banner says so and the view falls back to the last readings the server holds, refreshed from Linear and GitHub.
241
280
  - The interface is in English or French (`ARMADA_DASHBOARD_LANGUAGE`, or the EN/FR switch).
242
281
 
282
+ **Owner notifications.** With accounts and `ARMADA_SECRETS_KEY`, an owner or admin opens Organization > Notifications, saves a public HTTPS webhook and clicks **Send a test**. V1 has one channel per organization, optionally filtered to a project. Slack format posts `{"text":"…"}` to Slack-compatible receivers (including Discord's `/slack` URL); JSON posts `{schema:1,kind:"alert",organization,items:[{key,kind,project,ticket,title,url}],text}` and signs the exact body with `x-armada-signature: sha256=<HMAC-SHA256>`. For JSON, enter a signing secret of at least 16 characters that your receiver also knows. The address and signing secret are sealed in the vault, write-only and never released to terminals. Only titles and links are sent.
283
+
284
+ Alerts use the same owner items as browser notifications: work or merges to validate, escalated questions, and stopped coordinators with items waiting. Ticks run after fleet traffic and dashboard polls, throttled to once per minute per project, and read stored snapshots only. The outbox deduplicates across instances and claims retries too; a failed item gets at most five attempts. Ten consecutive failures pause the channel, as do HTTP 404/410 immediately; saving resumes it. Quiet-hour arrivals are retained for the next summary rather than posted as delayed alerts.
285
+
286
+ Digests default to 09:00, 13:00 and 18:00 on weekdays in the channel’s IANA time zone. Edit times/days or leave times empty to disable them; **Skip quiet digests** suppresses empty summaries. Each channel gets one durable local slot, even with several coordinators or app instances. A slot more than 30 minutes late is skipped and mentioned in the next digest. Digests cover merges with titles, blocked/silent durations, owner decisions with links and running phases. Remaining time is qualified as “usually”, from phase medians with at least three merged samples. Available main health and long-job data add sections; absent data adds none.
287
+
288
+ `armada digest` prints the current project since the previous digest (channel creation for the first, or four hours without a channel). `--since 4h` or an ISO timestamp overrides the window; `--lang en|fr` overrides `[tracker] language`; `--json` includes structured data; `--send` posts through the server-side channel without exposing its address. Worker sessions cannot read or send digests. Printed and sent summaries share their builder and renderer. Quiet periods send one line by default.
289
+
290
+ **Optional scheduler, off by default.** `GET /api/cron/owner` requires `Authorization: Bearer <CRON_SECRET>`. Production ships with no enabled `crons` entry. Without a scheduler, a coordinator that stops with no worker in flight is noticed on the next fleet call or dashboard poll. To enable Vercel Cron deliberately, set `CRON_SECRET` in the deployment and add `"crons": [{"path":"/api/cron/owner","schedule":"*/15 * * * *"}]` to `packages/dashboard/vercel.json`, then redeploy. Every 15 minutes requires a paid plan; the free plan allows a daily schedule such as `"0 9 * * *"`. The endpoint never refreshes Linear or GitHub and does nothing under the shared-password gate.
291
+
243
292
  Try it locally with synthetic data and no key:
244
293
 
245
294
  ```sh
@@ -382,7 +431,7 @@ armada logout # revokes this terminal's session and removes it from the machi
382
431
 
383
432
  - A coordinator without a browser (a cloud workspace, CI) uses an organization API key instead: an owner creates it on the Organization page (it is shown once), and the coordinator sets `ARMADA_API_KEY`, or stores it with `armada login --api-key` (hidden prompt, or standard input: `printf %s "$KEY" | armada login --api-key`; never on the command line). `ARMADA_API_KEY` in the environment wins over what `armada login` stored. Revoking the key signs the coordinator out.
384
433
  - The session token or key is kept in the credentials file below (mode 0600) and never printed; `armada auth status` says how the terminal is signed in, without it. A session lasts 30 days and is renewed while in use.
385
- - A worker signs in with the launch token of its launch message, as its first command: `armada login --launch-token <token>` (plus `--api-url <url>` for a self-hosted Armada, which the brief adds). The worker session it gets is kept per ticket in the credentials file and signs in that ticket's `claim`, `report`, `ask` and `release` only; each of them asks Armada for its keys, and stops with Armada's reason once the session is revoked (Organization > Workers) or ended (`armada release`, or the coordinator's `armada merge`). It lasts while the worker keeps reporting, up to three days idle.
434
+ - A worker signs in with the launch token of its launch message, as its first authenticated command: `armada login --launch-token <token>` (plus `--api-url <url>` for a self-hosted Armada, which the brief adds). The worker session it gets is kept per ticket in the credentials file and signs in that ticket's `claim`, `report`, `ask` and `release` only; each of them asks Armada for its keys, and stops with Armada's reason once the session is revoked (Organization > Workers) or ended (`armada release`, or the coordinator's `armada merge`). It lasts while the worker keeps reporting, up to three days idle.
386
435
  - Commands that need a sign-in say so and name `armada login` as the next step; so does an expired session or a revoked key.
387
436
  - The CLI talks to `https://armada.thevibecompany.co`. A self-hosted Armada is named by `ARMADA_API_URL`, or `[api] url` in `config.toml` (https; plain http only for `localhost`). A stored sign-in is sent only to the Armada that issued it: pointing the CLI at another one asks for `armada login` there.
388
437
  - Until an Armada has accounts (it runs on the shared dashboard password), it refuses terminal sign-ins and says so; the keys below keep working as they do today.
@@ -423,9 +472,11 @@ What a project's workers need to build and test (an LLM provider key, a test dat
423
472
  - The coordinator sets them, signed in as an owner or admin (or with an organization API key whose creator still is one): `armada secrets set <NAME>` for the current project, `--org` for every project of the organization. The value is read from a hidden prompt, from standard input (`--value-stdin`), or from a variable of the coordinator's environment (`--from-env <VAR>`), so an agent can move a key without reading it. Never from the command line. `armada secrets unset <NAME> [--org]` removes one. Owners and admins can also do both on the Keys page.
424
473
  - `armada secrets` lists the names, where each is set (project or organization), who set it and when. Never a value.
425
474
  - A worker fetches them through Armada, with its worker session, for its own project only (another project's is refused, and the refusal is in the audit list), in this order:
426
- - `armada run [--only A,B] -- <command>` runs the command with them in its environment: tests, builds, dev servers. Armada's value wins over a variable of the same name (stderr names it). Nothing is written to disk or printed; the exit code is the command's.
475
+ - `armada run [--only A,B] [--redact] -- <command>` runs the command with them in its environment: tests, builds, dev servers. Armada's value wins over a variable of the same name (stderr names it). Nothing is written to disk; the exit code is the command's. Non-interactive stdout and stderr are masked, including values split across output chunks. When stdout is a TTY, output inherits the terminal and **is not masked**; Armada warns once. `--redact` forces masked pipes for an interactive command.
427
476
  - `armada secrets export --file <path> [--only A,B]` writes a dotenv file with mode 0600, for a tool that reads one (`.env.local`). It refuses a path git tracks or does not ignore.
428
477
  - `armada secrets get <NAME>` prints one value, for a person, with a warning on stderr that it is now visible. An agent never runs it: its command output is its transcript.
478
+ - Exact project secret values and the terminal's resolved credentials are replaced with `«secret OPENAI_API_KEY»` (using their name); well-known key formats and PEM private keys become `«redacted»`. Values **shorter than 8 characters are not masked**, to avoid false matches. A masking warning names only the secret or the key-pattern match. This is a safety net: never echo secrets, paste them into messages, or assume transformed/encoded values will be caught.
479
+ - Reports, plans, questions, validations, answers, attachment captions and their Linear comments are masked before sending. The server also masks stored free text against the project's secrets, protecting older clients. If the CLI cannot read project secrets, it warns and continues with resolved credentials and patterns so Linear reporting still works; arbitrary project values then lack exact masking. A server with stored secrets it cannot decrypt refuses the text write.
429
480
  - Every fetch is one release in the audit list, naming the project and the secrets. Nothing is cached: an unset secret is no longer handed out, and a changed one takes effect on the next command.
430
481
  - `[secrets] names` in `armada.toml` lists what the project expects; `armada doctor` names those Armada does not keep for it.
431
482
 
@@ -514,7 +565,13 @@ profile = "debug"
514
565
 
515
566
  A missing or invalid key stops the command with a message naming it, for example `missing required key "tracker.program_root"`. This repository's own configuration is in [`armada.toml`](https://github.com/The-Vibe-Company/armada/blob/main/armada.toml).
516
567
 
517
- The program follows one convention: specs are direct children of the root titled `Spec N/M — Name`, tickets are their sub-issues, and dependencies are Linear blocked-by relations. Agents declare their phase with a label from the phase group (`planning`, `awaiting-approval`, `implementing`, `shipping`, `blocked`, `ready-to-merge`) and start every comment with `Agent status: <phase> — <summary>`.
568
+ The program follows one convention: specs are direct children of the root titled `Spec N — Name` or `Spec N/M — Name`, tickets are their sub-issues, and dependencies are Linear blocked-by relations. Both title forms are always read, including in mixed programs. Agents declare their phase with a label from the phase group (`planning`, `awaiting-approval`, `implementing`, `shipping`, `blocked`, `ready-to-merge`) and start every comment with `Agent status: <phase> — <summary>`.
569
+
570
+ The coordinator creates a spec with `armada spec add "Search images"`. It appends after the largest spec number, uses the program root as parent, includes the **In short** template and prints the new issue's URL. The default `[tracker] spec_titles = "N"` keeps existing titles unchanged when appending. New project configurations write that setting; configurations without it also default to `"N"`.
571
+
572
+ To insert in the middle, run `armada spec add "Search images" --at 5`: it displays the suffix renames and creates nothing. Repeat with `--apply` to rename 5→6 and so on, then create the new Spec 5. `armada spec renumber` previews a repair of gaps and duplicates in ordinal order (creation time, then issue identifier break ties); `--apply` applies it and normalizes all titles to the configured style.
573
+
574
+ **Projects whose own rules require N/M:** set `[tracker] spec_titles = "N/M"` before using these commands. Adding then updates every total, and requires `--apply` even when appending. In default N mode, inserting preserves any legacy denominators rather than bumping them; `renumber --apply` removes them. Writes run one at a time and stop on the first failure, listing the unconfirmed renames and creation. Inspect Linear before retrying, since a timed-out write may have arrived; `renumber` can preview a repair. Worker sessions cannot run `armada spec`.
518
575
 
519
576
  ## Develop
520
577
 
@@ -529,7 +586,7 @@ bun run verify # lint, typecheck, tests
529
586
 
530
587
  When changing a package under `skills/`, run `bun run skills:bundle` to regenerate
531
588
  the text payload included in the published Node bundle, then `bun run armada skills
532
- update` to refresh this repository's vendored copies. The bundle test compares all
589
+ update` to refresh this repository's pointers and vendored packages. The bundle test compares all
533
590
  source skill files byte for byte, including nested helpers and license notices.
534
591
 
535
592
  See [AGENTS.md](https://github.com/The-Vibe-Company/armada/blob/main/AGENTS.md) for the layout and the rules.
@@ -537,7 +594,7 @@ See [AGENTS.md](https://github.com/The-Vibe-Company/armada/blob/main/AGENTS.md)
537
594
  ## What it is made of
538
595
 
539
596
  - **`armada` CLI** (TypeScript). The coordinator and the workers call it to claim tickets, report progress, ask and answer questions, launch workers and merge.
540
- - **Skills** vendored into the managed repository by `armada init`: the coordinator loop, the worker protocol, one runtime guide per runtime, and the shipping/review/learning workflow. They live in [`skills/`](skills).
597
+ - **Skills** delivered by `armada init`: pointers to the CLI's coordinator, worker and runtime instructions, plus vendored shipping/review/learning packages. Their complete sources live in [`skills/`](skills).
541
598
  - **Linear** holds the plan: specs, tickets, dependencies and agent phases.
542
599
  - **The app's database** (Postgres, e.g. Neon) holds the accounts, the organizations' sealed keys and the fleet's live data: events, heartbeats, pending questions and locks. The CLI reaches it only through the Armada API, with its sign-in. Losing it loses live detail, never progress.
543
600
  - **Conductor Cloud** runs the workers in the first version. Other runtimes come later without changing the worker contract.
@@ -556,3 +613,94 @@ MIT. The bundled Alibaba review workflow retains Apache-2.0; each shipping skill
556
613
  includes its license and attribution notices.
557
614
 
558
615
  Persistent local workers: `armada status`, `inbox` and `watch` publish herdr state for the dashboard. `armada stop <ticket>` archives only a clean worktree whose commits are on its verified remote upstream, retaining its branch. See [`armada-runtime-herdr`](skills/armada-runtime-herdr/SKILL.md) for all four runtime operations.
616
+
617
+ ### Pause and resume merges
618
+
619
+ A coordinator can pause a project's merges with a reason. The pause is stored in Armada, shared with every coordinator, and stays until explicitly cleared. Status, watch and the inbox show it.
620
+
621
+ ```sh
622
+ armada hold add "api deploy is broken"
623
+ armada hold # list the open holds
624
+ armada merge 42 --through-hold "repairs the broken deploy"
625
+ # Verify recovery, then resume:
626
+ armada hold clear 4 --reason "deploy smoke checks pass"
627
+ ```
628
+
629
+ Normal merges refuse with each hold's reason and id. `--through-hold` lets a fix pass every open hold and records the reason with every hold id on the merged ticket; it leaves the pauses open. Clear every open hold to resume normal merges. The server also refuses a merge lease to an older CLI that does not read holds, preserving the shared pause across coordinator versions. Holds never expire, and repeated clears report who cleared the hold and when. `--wait` stops when it sees a hold. `--no-lock` skips both the merge lease and checking holds, and prints that warning.
630
+
631
+ Workers can reserve a shared number, name or exclusive resource for their ticket through Armada:
632
+
633
+ ```sh
634
+ armada reserve db-migration --next --floor 22 # prints the next number, e.g. 23
635
+ armada reserve fixture --value sample --note "integration fixture"
636
+ armada reserve release # exclusively holds this key
637
+ armada reserve --list
638
+ armada unreserve fixture
639
+ ```
640
+
641
+ The ticket defaults to `ARMADA_TICKET`, the current branch, or the one stored worker session; `--ticket <id>` overrides it. A release or `unreserve` frees a value. A merge ends the reservation and keeps its value used permanently. Number allocation starts above the highest held or merged number and `--floor` (the last number already used in the repository). Released values can be explicitly reserved again; `--next` reuses them when they are above the remaining highest number. Allocation is atomic even when workers ask together.
642
+
643
+ Declare keys in `armada.toml` to include them and their current holders in each launch brief:
644
+
645
+ ```toml
646
+ [[reservations]]
647
+ key = "db-migration"
648
+ what = "the next DB_MIGRATIONS version"
649
+ numbered = true
650
+ ```
651
+
652
+ Declarations are optional documentation; undeclared keys can also be reserved. Reservations require Armada: if it is unavailable, ask the coordinator before choosing a value. After a lost response, check `armada reserve --list` before retrying, since the reservation may already have succeeded.
653
+
654
+ ### Live acceptance before hand-back
655
+
656
+ Declare real build or preview checks in `armada.toml`. Each worker brief lists the
657
+ commands and limits; `armada report ready-to-merge` requires a Linear pass on the
658
+ exact PR head for every applicable check.
659
+
660
+ ```toml
661
+ [[acceptance]]
662
+ name = "production build"
663
+ command = "docker build -f deploy/Dockerfile ."
664
+ paths = ["deploy/**", "Dockerfile", "package.json"]
665
+ timeout_minutes = 20
666
+ max_runs = 3
667
+ ```
668
+
669
+ Omit `paths` to check every PR. Patterns support `*`, `**` and `?`; paths match
670
+ GitHub's changed files. An incomplete file reading or a rename whose original
671
+ path is unavailable applies every rule. The
672
+ default timeout is 15 minutes (maximum 120) and the default cap is three runs per
673
+ check and ticket. For commands needing project secrets, use `armada run -- …`.
674
+
675
+ Bring main in, commit and push, then run `armada acceptance run` in the clean
676
+ checkout (`--name "production build"` selects one check; `--ticket <id>` selects
677
+ the ticket). HEAD must equal the linked PR head. Fix every error before handing
678
+ back. Failed, timed-out and interrupted attempts count; a changed head needs a
679
+ new pass. At the cap, ask the coordinator, who can grant more with
680
+ `armada acceptance allow <ticket> --runs 2 --reason "<why>"`. Results and run
681
+ counts live in Linear. A local per-ticket lock prevents overlapping runs on the
682
+ worker's machine, even across checkouts. Diagnostics are masked with released
683
+ project secret values; if those values cannot be read, failure output is withheld.
684
+ Live fleet reports remain optional when Armada is
685
+ down. The merge checklist shows the evidence without adding a merge refusal,
686
+ so bringing main in with `merge --wait` preserves the worker's proven hand-back.
687
+
688
+ ### Check deploys after each merge
689
+
690
+ Declare optional `[[deploy.target]]` entries in `armada.toml`:
691
+
692
+ ```toml
693
+ [[deploy.target]]
694
+ name = "api"
695
+ branch = "main" # omit for the merged PR's base branch
696
+ # Exactly one source of the live commit:
697
+ github_environment = "production"
698
+ # live_sha_command = "curl -fsS https://example.test/version"
699
+ smoke = "curl -fsS https://example.test/health" # optional
700
+ timeout_minutes = 20 # 1–120
701
+ pause_on_failure = true
702
+ ```
703
+
704
+ `armada merge` starts a background deploy watcher and prints `Watching the deploy of <sha> to <target>`. Deployment failures, smoke failures and timeouts create one inbox item and a shared deploy hold for that target. A later healthy deploy clears the failures it covers. Use `--through-hold "<why>"` to merge the repair. `pause_on_failure = false` keeps the inbox warning without pausing merges.
705
+
706
+ `armada deploy status` shows each target's latest state and any open deploy hold; `armada status` includes deploy states. Commands run at the repository root with `ARMADA_DEPLOY_SHA` and `ARMADA_DEPLOY_TARGET`, bounded to one minute and the deploy deadline. Declare `armada run -- <command>` when a command needs project secrets. Watchers share smoke results for the same live SHA. If background startup fails, the merge prints a command to run in a persistent terminal. See the [deployment runbook](docs/runbook.md#check-deployments-after-merges) for recovery and logs.