herdr-orchestra 5.5.0 → 5.7.0

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.
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: "Orchestrator step 1 — plan a feature for the Herdr agent team, with a model tier per milestone (you are the lead)"
2
+ description: "Orchestrator step 1 — plan a feature or a small change for the Herdr agent team (start with quick: or full: to choose), with a model tier per milestone (you are the lead)"
3
3
  ---
4
4
  Run `orch lead plan` (or `~/.local/bin/orch lead plan` if `orch` is not on PATH) and follow its output exactly. You are the lead.
5
5
  Feature request: $ARGUMENTS
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: "Orchestrator step 1 — plan a feature for the Herdr agent team, with a model tier per milestone (you are the lead)"
2
+ description: "Orchestrator step 1 — plan a feature or a small change for the Herdr agent team (start with quick: or full: to choose), with a model tier per milestone (you are the lead)"
3
3
  ---
4
4
  Run `orch lead plan` (or `~/.local/bin/orch lead plan` if `orch` is not on PATH) and follow its output exactly. You are the lead.
5
5
  Feature request: $ARGUMENTS
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "herdr-orchestra",
3
- "version": "5.5.0",
3
+ "version": "5.7.0",
4
4
  "description": "Orchestrate AI coding agents (Claude Code, Codex, OpenCode, Amp) as one team in Herdr: a lead plans, coders build in parallel, a reviewer checks, you get one PR.",
5
5
  "license": "MIT",
6
6
  "bin": {
package/playbooks/plan.md CHANGED
@@ -14,6 +14,8 @@ Load the `herdr` skill for exact CLI syntax if you have it (otherwise `herdr --s
14
14
 
15
15
  Feature request = the user's message that asked you to run this playbook.
16
16
 
17
+ **Small change? There is a quick path.** After research (step 2) you decide whether this is a **quick run** (step 2b) or the full process. A quick run is for any small, clear change: a UI tweak, a new field in an API response, a validation rule, a bug fix in one function, a config or docs change, or several of these together. It skips the parts of planning and running that only big features need. The developer can decide for you by starting the request with `quick:` (quick run), `quick review:` (quick run that keeps a reviewer) or `full:` (the full process).
18
+
17
19
  ## 1. Preflight (stop and report if any check fails)
18
20
  - `orch lead check` prints `OK`. If it fails, show the user its message (it says how to fix it), then stop. Do not test `$HERDR_ENV` yourself: some agents (Hermes) run their shell tool outside the pane's environment, so it can be empty inside a real Herdr pane.
19
21
  - Inside a git repo, and `git status --porcelain` is empty. If not, ask the user to commit or stash first.
@@ -27,6 +29,60 @@ Feature request = the user's message that asked you to run this playbook.
27
29
  - Use web docs only for facts the repo can't answer (a library's API, a protocol).
28
30
  - Keep notes short: you'll put the relevant facts into each milestone's **Context**. List anything you could not determine as an open question; never assume.
29
31
 
32
+ ## 2b. Quick or full: decide from what you found, not from how the request sounds
33
+ A request that sounds small can be big ("add `discount` to the orders API" when there is no discount column yet), and one that sounds big can be small. Decide from your research. It is a **quick run** only when all four are true:
34
+ 1. **One coder can do it in one go.** Nothing in it earns its own milestone (step 4b): no parallel part, no foundation, not too big for one sitting.
35
+ 2. **It is clear.** You have no open questions for the developer about what they want.
36
+ 3. **It stays out of risky areas:** no database schema or migration, no auth, login, permissions or sessions, no payments or billing, no new or upgraded packages, no CI, no secrets or `.env` files.
37
+ 4. **It follows what is already there.** It copies a pattern the code already has, and it does not change how two parts talk to each other (an API shape another app or team depends on, shared types).
38
+
39
+ If any is false, use the full process (steps 3 to 10). There is no rule about how many files or lines; it is your judgement, and you write it down: `Quick because: <what you found in the code that makes it small>`, e.g. `Quick because: orders.created_at already exists and the serializer lists fields; only the GET /orders response changes, no schema, auth or payment code`.
40
+
41
+ - The developer wrote `quick:` but one of the four is false: say which one and why in one line, and plan it in full unless they insist. Never take a risky change (point 3) as quick: `orch sync` refuses those files in a quick plan anyway.
42
+ - The developer wrote `full:`: plan in full, even for a small change.
43
+
44
+ **A quick run, step by step** (in place of steps 3 to 10):
45
+ - **Team: one coder, no reviewer.** Run `orch lead whoami` and name yourself `lead`. Pick ONE coder pane whose model fits the tier (a free pane of any kind; if only you are open, `orch team <your kind> --coders 1 --no-reviewer`). `Reviewer: none`, unless the developer wrote `quick review:`: then one reviewer pane and `Review: yes`. Why no reviewer: a quick change is small and stays out of risky areas, the check command (lint, types, tests) still has to pass before it lands, and the developer looks at UI changes in the browser anyway; the reviewer is often the slowest step of a small run.
46
+ - **One milestone** that holds every change in the request, with **one acceptance criterion per change**, so the coder and the summary go through them one by one.
47
+ - **Fields:** only `Tier`, `Estimate`, `Likely files`, `Goal`, `Acceptance criteria` and the `Context` facts the coder needs to find their way. Leave out `Feature breakdown`, `Why separate`, `Needs`, `Model why`, `Role`, `Interfaces` (none) and `Prefer` unless one really helps. A backend change gets an acceptance criterion a test can prove (e.g. "GET /orders returns `createdAt` as ISO 8601; a test covers it").
48
+ - **Header:** `Mode: quick`, your `Quick because:` line, `Isolation: shared`, `Setup command: none` (shared mode uses your folder as it is), the `Check command`, `Estimate` = the milestone's.
49
+ - **Don't run the check yourself.** The event manager runs it before any work starts and tells you if it is already red (then handle it as in `orch lead run`, "Red baseline").
50
+ - Write the plan (format below), run `orch sync` and fix every ERROR, then show the developer five lines at most: the changes (one per line), the coder and model, the estimate, your `Quick because:`, and "Say **go**, or **full** if you want the normal process." **STOP** and wait for go, as in a full plan: the developer sees the short plan before anything changes.
51
+
52
+ ```
53
+ # Plan: <short title>
54
+ Mode: quick
55
+ Quick because: <what you found in the code that makes this small>
56
+ Branch: feature/<slug> | fix/<slug>
57
+ Check command: <command>
58
+ Setup command: none
59
+ Isolation: shared
60
+ Estimate: 20m
61
+ Lead: lead (<your kind>: <your model>)
62
+ Workers: claude-1 (claude: sonnet)
63
+ Reviewer: none
64
+
65
+ ## Global instructions
66
+ none
67
+
68
+ ## [x] M1: <short title>
69
+ Depends on: none
70
+ Tier: small | medium | high
71
+ Estimate: 20m
72
+ Review: no
73
+ Likely files: src/a.ts, src/b.ts
74
+ Goal: <the changes, in one or two sentences>
75
+ Acceptance criteria:
76
+ - <change 1, observable>
77
+ - <change 2, observable>
78
+ Context:
79
+ - <where things live>
80
+ Open questions:
81
+ - none
82
+ ```
83
+
84
+ Then the run is the same as any run (`orch lead run`): the coder builds it, the check runs, and it lands on the branch; when the check already passed on exactly the files on the branch, the final check and `orch finish` reuse that result instead of running it again. The summary is short (step 3 of `orch lead run`). The risk hold still applies: if the coder's change turns out to touch a migration, CI, secrets, a package or many lines, it waits for the developer's `orch approve`. After it lands, more small changes go straight to the same coder with `orch fix M1 "<change>"`.
85
+
30
86
  ## 3. Discover the team
31
87
  - Run `orch lead whoami`. It shows YOUR pane. Name yourself `lead` with the rename command it prints, and never prompt your own pane.
32
88
  - Run `herdr agent list` and `orch agents` (which kinds exist here, their roles, and whether herdr can watch them).
@@ -112,7 +168,7 @@ Write the role from what you learned in research (the design system the app uses
112
168
  ## 8. Check and setup commands; baseline
113
169
  - **Check command**: one command for lint + typecheck + unit tests, taken from the repo's scripts (package.json, Makefile, pubspec.yaml, Cargo.toml, pyproject.toml…). No dev servers, no fixed ports.
114
170
  - **Setup command**: what a fresh worktree needs, or `none`.
115
- - Run the check yourself. It must pass before any work: autopilot checks it at the start (and records `.orchestrate/baseline.txt` itself), and runs it on every merge before committing. If it already fails, list what fails and propose to the developer a narrower check command that passes today and still covers the feature. Never plan on "no new failures" being judged by eye.
171
+ - Run the check yourself (in a quick run, skip this: the event manager's baseline does it). It must pass before any work: autopilot checks it at the start (and records `.orchestrate/baseline.txt` itself), and runs it on every merge before committing. If it already fails, list what fails and propose to the developer a narrower check command that passes today and still covers the feature. Never plan on "no new failures" being judged by eye.
116
172
 
117
173
  ## 9. Write `.orchestrate/plan.md` in EXACTLY this format (`orch sync` parses it)
118
174
 
package/playbooks/run.md CHANGED
@@ -41,6 +41,8 @@ Run `orch events`. It lists the new events, the ones still open, the milestones
41
41
  | `PAUSED Mn`: agent stopped twice / over its time budget / blocked / orch error | Look at what the agent shows (`herdr agent read <agent> --source recent-unwrapped --lines 60`) or the error in the log, and tell the developer. Don't work around it by hand. When it is sorted out: `orch dispatch Mn`. |
42
42
  | `FAILED Mn`: checks / review / criteria still failing | It already had its rounds, and a round on a stronger model if the team has one. Read the last report and the last check output or review file. Explain in two lines what keeps failing. If a fact or constraint was missing from the milestone, add it to the plan (never a how-to) and `orch dispatch Mn`; add `--tier high` when the work turned out harder than its tier. If you can't tell what is missing, ask the developer. |
43
43
  | `FAILED Mn`: lost N attempts | The agents kept being unreachable, gone or rate-limited. Tell the developer which agents to restart or wait for; then `orch dispatch Mn`. |
44
+ | `WORKER-LOST Mn` | A coder vanished while it worked (pane closed, the agent quit and left a shell, herdr restarted). **Not routine:** tell the developer at once, with the exact fix in the event text (`orch resume`, or `orch team up`). The milestone waits for the next free coder with its work so far; nothing else to do. |
45
+ | `HERDR-RESTART` | Most agents vanished at once. Tell the developer to run `orch resume`, then `orch team up` for any agent it reports `LOST`. |
44
46
  | `HELD Mn` | Risky changes (deleted files, migrations, CI config, secrets files, unlisted dependency changes, a very large diff) wait for the developer. Show the reasons from `orch status`, and tell the developer to look and run `orch approve Mn` (or `orch set Mn paused`). |
45
47
  | `NEEDS-ANSWER Mn` | Open questions in the plan: ask the developer, write the answers under "Notes from user", set "Open questions:" to `- none`, `orch sync`, then `orch dispatch Mn`. |
46
48
  | `ESCALATED Mn`, `AUTO-DISPATCHED Mn` | Information. Mention an escalation in the final summary. |
@@ -50,15 +52,23 @@ Run `orch events`. It lists the new events, the ones still open, the milestones
50
52
 
51
53
  If you changed plan.md by hand, run `orch sync` (it works once the event manager is idle; `orch answer` and `orch dispatch` work at any time).
52
54
 
55
+ **The developer says "stop sending work to <coder>"** (for example, no Claude today): run `orch bench <worker> off "<their reason>"`. It holds until `orch bench <worker> on`, across restarts, `orch sync` and `orch resume`; a usage-limit bench does not. Tell the developer what it still holds (`orch status`). Never try to keep a coder out by remembering it yourself.
56
+
57
+ **Swap a coder** (for example, AGY instead of OpenCode): `orch stop` (the event manager finishes its current step and exits; nothing is lost), change `Workers:` in plan.md, `orch sync`, `orch team up`, check that `orch status` shows the new worker as `herdr=ok`, then `orch resume`. Never kill the event manager by hand.
58
+
59
+ **Before `orch dispatch --to <worker>`**, `orch status` must show that worker as `herdr=ok`. dispatch refuses a worker with no agent (`NO AGENT`, `SHELL ONLY`); do what it says (`orch team up`) and try again. If `orch team up` reports `QUIT <worker>`, the agent quit as soon as it started: show the developer the pane and the saved screen it names.
60
+
61
+ **Why did the event manager stop?** `orch doctor --crash` prints the last `STOPPED` / `CRASHED` / `LOST` notes (with the reason found in the computer's own log) and the saved agent screens. Give the developer that reason in one line.
62
+
53
63
  **Red baseline.** The event manager needs the check command to pass before any work. If it says the baseline fails: run the check yourself (`<check cmd> 2>&1 | tail -40`), tell the developer exactly what fails, and propose a narrower `Check command` that passes today and still covers the feature. Write it into the plan header only when the developer agrees, then `orch sync` and dispatch again. Never judge "no new failures" by eye.
54
64
 
55
65
  ## 3. ALL_DONE
56
66
  1. The event manager already wrote `.orchestrate/summary.md`: tasks, commits, files changed, files changed outside each milestone's Likely files, reviewer suggestions not applied, **the model table (planned tier, the model that really did the work, escalations)**, **"Checked automatically"** (the check command on the finished branch, each review, and every acceptance criterion with the coder's and the reviewer's evidence) and the run report (time, rounds, first-pass rate, wasted work, how each model did; `orch report` prints it again).
57
- 2. You add three sections, in this order:
67
+ 2. **Quick run** (`orch status` starts with `QUICK RUN`): add only two sections, and keep them short. **"What changed"**: one line per acceptance criterion, in the developer's words, with how it was checked (the test or command, or `file:line`); you may run the check command, single tests and read-only commands for this. **"Manual verification checklist"**: as below, only for what a person must see (a UI change in the browser); for a backend-only change write `Nothing to check by hand: <why>`. Then go to step 3. **Full run:** you add three sections, in this order:
58
68
  - **"Design decisions & study notes"** for the developer (include any milestone that needed a stronger model than planned, and what that says about the plan).
59
69
  - **"Checked by the lead"**. Go through every acceptance criterion and every behaviour the feature promised. Whatever can be settled by running a command or by reading the code, YOU settle now, and write one line each with the evidence: the command and its result, or `file:line`. This covers: a criterion "Checked automatically" marks `no evidence recorded` or `NOT met`, "the comment / doc / config says X", "the endpoint returns 400 for Y" (run its test, or read the test that covers it), "the migration adds column Z", "no leftover TODO or debug output". You may run the check command, single tests and read-only commands (`grep`, `git log`, `git diff --stat`), and open the few files you need; you still never edit application code. If a check of yours fails, it is a defect, not a checklist item: tell the developer and offer `orch fix Mn "<what is wrong>"`.
60
70
  - **"Manual verification checklist"**: ONLY what a person must see or do, because no command and no reading of code can settle it. That is: how the UI looks (layout, spacing, colours, dark mode, a small screen), how it behaves in a real browser or on a real device (click-through flows, focus, animation, how fast it feels), and anything that needs an outside account or hardware (a real email arriving, a payment in the provider's test mode, a push notification, a printer). Write each item so the developer can do it without reading code: `- [ ] <where to go and what to do> → <what they should see>`. Test for every item: "could I, or a test, have checked this?" If yes, it does not belong here: check it and move it to "Checked by the lead". Never write "review the code", "read the comments", "confirm the tests pass" or "check the function handles X" as a manual item. If nothing needs a person (a pure backend, CLI or docs change), write `Nothing to check by hand: <one line why>` instead of inventing items.
61
- 3. Tell the developer: "All tasks landed on <branch>. Review .orchestrate/summary.md. I checked <n> things myself; <m> need your eyes (the manual checklist), or: nothing needs checking by hand. Then run `orch finish`: it re-runs the check, removes the worktrees and hidden refs, pushes <branch> and opens a PR into <base> (`orch finish --no-push` to only clean up)." Run `orch finish` yourself only when the developer says so: it pushes. **STOP.**
71
+ 3. Tell the developer: "All tasks landed on <branch>. Review .orchestrate/summary.md. I checked <n> things myself; <m> need your eyes (the manual checklist), or: nothing needs checking by hand. Then run `orch finish`: it re-runs the check (or reuses it when it already passed on exactly these files), removes the worktrees and hidden refs, pushes <branch> and opens a PR into <base> (`orch finish --no-push` to only clean up)." Run `orch finish` yourself only when the developer says so: it pushes. **STOP.**
62
72
  4. **The developer asks for a change after the summary** (for example "the login button should be blue"). Do not plan again. Find the milestone that built that part (the summary's Tasks list and Likely files tell you), then run `orch fix Mn "<the change, in the developer's words>"`. It adds one small follow-up milestone to `plan.md`, sends it straight to the coder who built Mn, and starts the event manager; the check and the review (when Mn had one) still run. Name another coder only when the developer asks: `--to <worker>`. Then **STOP**: you are woken with ALL_DONE again, and the new summary keeps the old one in `.orchestrate/summary.prev.md`, so carry your notes and checklist over and add what changed. Never type into a coder's pane yourself.
63
73
 
64
74
  ## Runs without a lead (`Lead mode: off`)
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: orch-plan
3
- description: Orchestrator step 1 for a Herdr multi-agent team (any agent can lead; Claude, Codex, Amp, OpenCode, Hermes or Antigravity coders; optional reviewer). Use when the user asks to plan or orchestrate a feature, or says "orch-plan". Research the codebase, then write a dependency-aware plan of 1–4 milestones written as issues (what and why, never how), each with the model tier it needs (small, medium, high) and why. Does NOT execute until the developer says go.
3
+ description: Orchestrator step 1 for a Herdr multi-agent team (any agent can lead; Claude, Codex, Amp, OpenCode, Hermes or Antigravity coders; optional reviewer). Use when the user asks to plan or orchestrate a feature, or says "orch-plan". Research the codebase, then write a dependency-aware plan with as many milestones as the feature needs, written as issues (what and why, never how), each with the model tier it needs (small, medium, high) and why. A small, clear change (UI or backend) gets a short quick-run plan instead: one milestone, one coder, no reviewer; start the request with quick: or full: to choose. Does NOT execute until the developer says go.
4
4
  ---
5
5
 
6
6
  Run `orch lead plan` (or `~/.local/bin/orch lead plan` if `orch` is not on PATH) and follow its output exactly. You are the lead. The user's message is the feature request.