@the-vibe-company/armada 0.2.4 → 0.2.6
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 +17 -7
- package/dist/armada.js +739 -175
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -50,14 +50,16 @@ armada init --program-root ABC-1 # one pull request that adds it all
|
|
|
50
50
|
`armada doctor` checks, in the repository you are in:
|
|
51
51
|
|
|
52
52
|
- `armada.toml` exists and is valid;
|
|
53
|
-
- the Armada skills (`armada-coordinator`, `armada-worker`, `armada-runtime-conductor`) 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;
|
|
53
|
+
- the Armada skills (`armada-coordinator`, `armada-worker`, `armada-runtime-conductor`, `armada-runtime-claude-code`) 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;
|
|
54
54
|
- `.conductor/settings.toml` has a `[scripts] setup` command;
|
|
55
55
|
- `.gitignore` ignores `plans/ship-pr-dev/`;
|
|
56
56
|
- 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;
|
|
57
|
+
- 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>`;
|
|
57
58
|
- no key is left in the credentials file that Armada now gives this terminal (`armada auth logout` removes them, the sign-in stays);
|
|
58
|
-
- the Linear label groups `Agent phase` and `Agent runtime` exist with every value (needs a Linear key, from Armada or `LINEAR_API_KEY`)
|
|
59
|
+
- the Linear label groups `Agent phase` and `Agent runtime` exist with every value (needs a Linear key, from Armada or `LINEAR_API_KEY`);
|
|
60
|
+
- 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.
|
|
59
61
|
|
|
60
|
-
Each problem is an error or a warning, with its fix. A missing skill 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.
|
|
62
|
+
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.
|
|
61
63
|
|
|
62
64
|
`armada init` fixes everything doctor reports in one go:
|
|
63
65
|
|
|
@@ -71,7 +73,7 @@ On a repository without `armada.toml`, pass `--program-root <ISSUE-ID>`; the nam
|
|
|
71
73
|
|
|
72
74
|
## Launch a worker (coordinators)
|
|
73
75
|
|
|
74
|
-
Armada prepares a launch; it never starts a runtime itself. The `armada-runtime-conductor` skill gives the exact Conductor Cloud commands. [`docs/runbook.md`](docs/runbook.md) says how to start a coordinator on a laptop or in Conductor Cloud, what the owner sets up once, and how one coordinator hands over to the next.
|
|
76
|
+
Armada prepares a launch; it never starts a runtime itself. The `armada-runtime-conductor` skill gives the exact Conductor Cloud commands; the `armada-runtime-claude-code` skill launches a worker as a background subagent of a coordinator running in Claude Code, in its own git worktree (it dies with the coordinator's session, so long runs go to Conductor). [`docs/runbook.md`](docs/runbook.md) says how to start a coordinator on a laptop or in Conductor Cloud, what the owner sets up once, and how one coordinator hands over to the next.
|
|
75
77
|
|
|
76
78
|
```sh
|
|
77
79
|
armada brief ABC-12 # launch settings, then the worker's prompt
|
|
@@ -82,8 +84,9 @@ armada brief ABC-12 --profile codex --reason "a back-end bug behind a web label"
|
|
|
82
84
|
- The prompt names the ticket and its Linear branch, starts by installing the coordinator's Armada version (`npm install -g`, with an `npm exec` fallback), signing in with `armada login --launch-token <token>` and running `armada claim` with the handle `$CONDUCTOR_WORKSPACE_ID/$CONDUCTOR_SESSION_ID`, and carries the blockers with their hand-back notes, the comments already on the ticket and the workers in flight.
|
|
83
85
|
- **Plan rule.** A "Plan" section says in one line whether the worker waits for approval: "post your plan with `armada report implementing --plan-file -` and go on" when plans are pre-approved, "post your plan with `armada report awaiting-approval --plan-file -` and wait for approval" otherwise. `[policy] plans` decides (`approve` by default, or `pre-approved`); a ticket labelled `plan-approved` (`policy.pre_approved_label`) is pre-approved, and one labelled `needs-plan-approval` (`policy.approval_label`) waits for approval, which wins when a ticket has both. The settings show the rule and where it comes from (`Plans:`), and `--json` carries it as `plans`.
|
|
84
86
|
- **Project conventions.** `[brief] extra = "<path>"` names a file of the repository (relative to `armada.toml`) that every prompt ends with, under "Project conventions": the checks to run, the generated files to refresh, how to bring main in. A missing file is a brief warning, and `armada doctor` checks it.
|
|
85
|
-
- **Workers need no key.** When the coordinator is signed in to an Armada that keeps the organization's keys, the brief asks it for a launch token: one ticket, used once, valid one hour. The worker exchanges it for a session limited to its ticket's `claim`, `report`, `ask` and `release`, and Armada gives each of those commands its keys. The `Launch:` line says whether the prompt carries one, and when there is none, why (not signed in, or an Armada without accounts or keys). Make the brief right before the launch; the token is the only secret a prompt ever holds, useless once used. Merging or releasing the ticket ends the worker's session, and Organization > Workers on the dashboard revokes one.
|
|
87
|
+
- **Workers need no key.** When the coordinator is signed in to an Armada that keeps the organization's keys, the brief asks it for a launch token: one ticket, used once, valid one hour. The worker exchanges it for a session limited to its ticket's `claim`, `report`, `ask` and `release`, and Armada gives each of those commands its keys. The `Launch:` line says whether the prompt carries one, and when there is none, why (not signed in, or an Armada without accounts or keys). Only `--prompt` prints the token; the full brief and `--json` show it as `armada_launch_••••`, so it stays out of the coordinator's transcript. Make the brief right before the launch; the token is the only secret a prompt ever holds, useless once used. Merging or releasing the ticket ends the worker's session, and Organization > Workers on the dashboard revokes one.
|
|
86
88
|
- The settings give the profile's agent, model and effort from `[conductor]` in `armada.toml`, and the environment variables: `ARMADA_TICKET=<ticket>`, and, only without a launch token, `LINEAR_API_KEY` (required). Each shows whether this shell has it. No value is ever printed.
|
|
89
|
+
- A profile with `runtime = "claude-code"` routes the launch to the `armada-runtime-claude-code` skill: the `Runtime:` line names the skill, the claim runs `--runtime claude-code` with the subagent's name as its handle (the ticket id in lowercase), and the prompt first makes the worker check it runs in its own worktree. The Agent tool applies no effort; the brief says so.
|
|
87
90
|
- The profile follows the ticket's Linear labels: the first `[[conductor.routing]]` rule with a label the ticket carries (case, spaces and punctuation ignored), else `conductor.default_profile`, else the only profile. The settings say which rule chose it.
|
|
88
91
|
- `--profile` overrides that choice. When `armada.toml` has routing rules and the profile differs from the routed one, `--reason` is required. The reason travels into the claim command, so the claim comment records the profile and why. An unknown profile exits 2.
|
|
89
92
|
|
|
@@ -121,7 +124,7 @@ armada watch # coordinator, in the background: returns when so
|
|
|
121
124
|
armada inbox --wait # returns when a new item arrives, or after --timeout (default 300 s)
|
|
122
125
|
armada answer 12 "SQLite, for the first slice." # after delivering it in the worker's session
|
|
123
126
|
armada answer 13 "approved" # a plan, after delivering approval
|
|
124
|
-
armada answer --note ABC-12 "main moved:
|
|
127
|
+
armada answer --note ABC-12 "main moved: bring it in before you ship" # an unsolicited message, same path
|
|
125
128
|
```
|
|
126
129
|
|
|
127
130
|
- `ask` reports the `blocked` phase with `Agent status: blocked — question: <first line>` (the rest and the numbered options below it) and adds a `question` item to the coordinator's inbox on Armada. The worker then stops and waits for the answer in its session, and reports the phase it resumes. It finds the ticket like `report`.
|
|
@@ -140,10 +143,16 @@ armada answer --note ABC-12 "main moved: rebase before you ship" # an unsolicit
|
|
|
140
143
|
```sh
|
|
141
144
|
armada merge 34 --dry-run # the checklist only
|
|
142
145
|
armada merge 34 # or the pull request URL; --ticket ABC-12 when the branch names no ticket
|
|
146
|
+
armada merge 34 --wait # main moved: update the branch on GitHub, wait for its checks, then merge
|
|
147
|
+
armada merge 35 --no-ticket # a pull request no ticket owns: armada init's, a release
|
|
143
148
|
```
|
|
144
149
|
|
|
145
150
|
- The checklist names every failure and exits 1: the ticket carries `ready-to-merge` and its newest `Agent status: ready-to-merge — PR #34, head <sha>` comment names this pull request with the full 40-character SHA of its current head; the pull request is open, not a draft, titled in Commitizen format and `CLEAN` for GitHub; every `[gates] required_checks` check is green on the head; no review thread is unresolved.
|
|
146
151
|
- A head that lacks commits of its base branch is refused, unless `[gates] local_commands` is set: then the head is merged into the base in a throwaway `git worktree`, the commands run there, and the worktree is removed.
|
|
152
|
+
- `--wait [--timeout <min>]` (30 minutes by default) keeps going until the pull request merges or a real refusal. A head behind its base that GitHub says merges cleanly is updated with GitHub's "update branch" (a merge commit, no force-push), and every required check is waited for on the new head; when the base does not require heads up to date and `[gates] local_commands` is set, it is test-merged instead. A red check, a conflict, any other refused rule, or GitHub refusing the update (a protected branch) or not applying it within 3 minutes stops it and says which. The merge lock is held only while merging, never while waiting; signed in with Armada down, it refuses before touching the branch.
|
|
153
|
+
- A head that is the handed-back SHA followed only by merge commits of the base still counts as the hand-back: each merge commit's first parent is the commit before it, its second parent is on the base branch, and its tree is the clean merge of the two (`git merge-tree`). The merged comment then names both heads (`head <new>, the handed-back <old> updated with main`).
|
|
154
|
+
- `--no-ticket` merges a pull request no ticket owns (`armada init` prints the command for its own): no hand-back, nothing written to Linear, every other check unchanged, pinned to the head it checked. It refuses a branch that names a ticket of the program. When none of the required checks ran on the head (a release pull request opened with the workflow's token), it passes with a note once the head is a minute old (never a head this run updated), `UNSTABLE` included when nothing failed.
|
|
155
|
+
- GitHub's `HAS_HOOKS` (mergeable, with pre-receive hooks) counts as `CLEAN`.
|
|
147
156
|
- Hints, never blocking: top-level functions, classes, types and constants the pull request removes or renames that the base branch still uses in files the pull request does not touch.
|
|
148
157
|
- One merge at a time per project: a `merge` lease taken through Armada (20 minutes, renewed before the merge, atomic on its database and timed by its clock) makes a second coordinator wait. When the terminal is signed in but Armada is unreachable the merge is refused; `--no-lock` forces it, with a warning and "merged without lock" in the ticket's merged comment. Not signed in at all (one coordinator) the merge runs unlocked with a warning.
|
|
149
158
|
- The merge is `gh pr merge <n> --squash --match-head-commit <sha>`, never `--delete-branch` (it removes local worktrees that have the branch checked out). A GitHub 5xx is retried with backoff, each time after checking that the pull request is still open at the same head. Success is reported only once GitHub shows the pull request as merged at that head.
|
|
@@ -361,7 +370,7 @@ repository = "acme/widgets" # owner/name (required)
|
|
|
361
370
|
|
|
362
371
|
[gates]
|
|
363
372
|
required_checks = ["test"] # CI checks that must be green before a hand-back or a merge (default: every check)
|
|
364
|
-
local_commands = ["npm ci", "npm test"] # run by `armada merge` on a test merge of a head behind its base (default: none
|
|
373
|
+
local_commands = ["npm ci", "npm test"] # run by `armada merge` on a test merge of a head behind its base (default: none: the worker brings the base branch in instead)
|
|
365
374
|
|
|
366
375
|
[policy]
|
|
367
376
|
silence_minutes = 15 # a worker with no report for longer is flagged silent (default 15)
|
|
@@ -381,6 +390,7 @@ agent = "claude"
|
|
|
381
390
|
model = "opus-5-5-1m"
|
|
382
391
|
effort = "high"
|
|
383
392
|
# fast_mode = true # optional, default false
|
|
393
|
+
# runtime = "conductor" # or "claude-code": a subagent of a Claude Code coordinator (agent = "claude", model = "opus")
|
|
384
394
|
|
|
385
395
|
[conductor.profiles.codex]
|
|
386
396
|
agent = "codex"
|