@the-vibe-company/armada 0.1.1 → 0.1.3

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 +49 -5
  2. package/dist/armada.js +2071 -246
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -4,7 +4,7 @@ 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 claim`, `armada report` and `armada release` work; the other commands are being built.
7
+ **Status:** early. `armada status`, `armada auth`, `armada doctor`, `armada init`, `armada claim`, `armada report` and `armada release` work; the other commands are being built.
8
8
 
9
9
  ## Install
10
10
 
@@ -32,6 +32,33 @@ armada status # or: armada status --json
32
32
 
33
33
  GitHub is read with `GITHUB_TOKEN`, `GH_TOKEN` or the GitHub CLI login (`gh auth token`). Without any of them the tickets are still shown.
34
34
 
35
+ ## Set up a repository
36
+
37
+ ```sh
38
+ armada doctor # what this repository lacks, with the fix for each
39
+ armada init --program-root ABC-1 # one pull request that adds it all
40
+ ```
41
+
42
+ `armada doctor` checks, in the repository you are in:
43
+
44
+ - `armada.toml` exists and is valid;
45
+ - 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;
46
+ - `.conductor/settings.toml` has a `[scripts] setup` command;
47
+ - `.gitignore` ignores `plans/ship-pr-dev/`;
48
+ - the Linear label groups `Agent phase` and `Agent runtime` exist with every value (needs `LINEAR_API_KEY`).
49
+
50
+ 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, or a missing ignore line, is a warning. Doctor exits 1 when there is an error. `--json` prints the same report as JSON.
51
+
52
+ `armada init` fixes everything doctor reports in one go:
53
+
54
+ 1. It creates the missing Linear labels (a missing group goes in the team of the program root).
55
+ 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.
56
+ 3. It registers the project (slug, name, repository, program root) in the Turso database, so `armada status --all` and the dashboard list it.
57
+
58
+ On a repository without `armada.toml`, pass `--program-root <ISSUE-ID>`; the name comes from the GitHub repository unless you pass `--name`, and the slug from the name unless you pass `--slug`. An existing `armada.toml` is never replaced. `init` needs `git`, the GitHub CLI logged in (`gh auth login`), `LINEAR_API_KEY` and `ARMADA_TURSO_URL`; on a terminal it asks for missing keys first.
59
+
60
+ `armada status --all` prints the status of every registered project, each read with the `armada.toml` on its repository's default branch. A project that cannot be read shows its error without hiding the others.
61
+
35
62
  ## Work on a ticket (workers)
36
63
 
37
64
  A worker writes to the tracker only through three commands. They set the labels and write the comments in the protocol format, and record each event in Turso.
@@ -53,6 +80,21 @@ armada release --reason "wrong ticket"
53
80
  - `report` and `release` find the ticket from `--ticket`, then `ARMADA_TICKET`, then the current git branch (`feature/abc-12-…`).
54
81
  - Turso is optional. When it is not configured or not reachable, the commands still write Linear and print a warning.
55
82
 
83
+ ## Merge a finished pull request (coordinator)
84
+
85
+ ```sh
86
+ armada merge 34 --dry-run # the checklist only
87
+ armada merge 34 # or the pull request URL; --ticket ABC-12 when the branch names no ticket
88
+ ```
89
+
90
+ - 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.
91
+ - 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.
92
+ - 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.
93
+ - One merge at a time per project: a `merge` lease in Turso (20 minutes, renewed before the merge) makes a second coordinator wait. When Turso is configured but unreachable the merge is refused; `--no-lock` forces it, with a warning and "merged without lock" in the ticket's merged comment. Without Turso configured at all (one coordinator) the merge runs unlocked with a warning.
94
+ - 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.
95
+ - Then the ticket moves to Done with its agent labels removed, the pull request is linked, `Agent status: merged — …` is posted, the Turso hand-back is resolved and the runtime handle released. The output lists the workers in flight to tell and the worker session to archive with its runtime guide.
96
+ - It runs `gh` and `git` in the repository checkout and needs `LINEAR_API_KEY` and a GitHub token.
97
+
56
98
  ## Keys
57
99
 
58
100
  Armada needs a few keys. Set them up once per machine with `armada auth login`, or pass them as environment variables, which always win over the stored ones (the way to go in CI and cloud sandboxes).
@@ -60,8 +102,8 @@ Armada needs a few keys. Set them up once per machine with `armada auth login`,
60
102
  | Variable | What | Needed by |
61
103
  | --- | --- | --- |
62
104
  | `LINEAR_API_KEY` | Linear personal API key (Linear > Settings > Security & access > Personal API keys) | `armada status` |
63
- | `ARMADA_TURSO_URL` | Turso database URL, `libsql://...` (`file:/path/armada.db` for a local database) | live activity: events, runtime handles, inbox (optional) |
64
- | `ARMADA_TURSO_TOKEN` | Turso database token | live activity (optional) |
105
+ | `ARMADA_TURSO_URL` | Turso database URL, `libsql://...` (`file:/path/armada.db` for a local database) | `armada init` and `armada status --all` (project registry); live activity: events, runtime handles, inbox (optional) |
106
+ | `ARMADA_TURSO_TOKEN` | Turso database token | the same (optional for a `file:` database) |
65
107
  | `GITHUB_TOKEN` or `GH_TOKEN` | GitHub token; otherwise `gh auth token` is used | pull requests and CI |
66
108
 
67
109
  - `armada auth login` asks only for the keys that are missing, with hidden input for tokens, and stores them in `~/.config/armada/credentials` (or `$XDG_CONFIG_HOME/armada/credentials`), mode 0600 in a 0700 directory. Without a terminal it asks nothing and lists the variables to set instead.
@@ -99,12 +141,14 @@ ready_label = "ready-for-agent" # marks a ticket an agent may take (default)
99
141
  [tracker.labels]
100
142
  phase_group = "Agent phase" # single-select label group for the agent phase (default)
101
143
  runtime_group = "Agent runtime" # single-select label group for the agent runtime (default)
144
+ runtimes = ["Claude Code", "Codex", "Conductor"] # values of the runtime group (default)
102
145
 
103
146
  [github]
104
147
  repository = "acme/widgets" # owner/name (required)
105
148
 
106
149
  [gates]
107
- required_checks = ["test"] # CI checks that must be green before a hand-back (default: every check)
150
+ required_checks = ["test"] # CI checks that must be green before a hand-back or a merge (default: every check)
151
+ local_commands = ["npm ci", "npm test"] # run by `armada merge` on a test merge of a head behind its base (default: none, rebase instead)
108
152
 
109
153
  [policy]
110
154
  silence_minutes = 15 # a worker with no report for longer is flagged silent (default 15)
@@ -129,7 +173,7 @@ See [AGENTS.md](https://github.com/The-Vibe-Company/armada/blob/main/AGENTS.md)
129
173
  ## What it is made of
130
174
 
131
175
  - **`armada` CLI** (TypeScript). The coordinator and the workers call it to claim tickets, report progress, ask and answer questions, launch workers and merge.
132
- - **Skills** vendored into the managed repository: the coordinator and worker protocols, planning and shipping skills.
176
+ - **Skills** vendored into the managed repository by `armada init`: the coordinator loop, the worker protocol and one runtime guide per runtime. They live in [`skills/`](skills).
133
177
  - **Linear** holds the plan: specs, tickets, dependencies and agent phases.
134
178
  - **Turso** (libSQL) holds live telemetry: events, heartbeats, pending questions and locks. Losing it loses live detail, never progress.
135
179
  - **Conductor Cloud** runs the workers in the first version. Other runtimes come later without changing the worker contract.