herdr-orchestra 5.4.0 → 5.6.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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,36 @@
2
2
 
3
3
  All notable changes. Versions follow [semantic versioning](https://semver.org).
4
4
 
5
+ ## [5.6.0] - 2026-11-15
6
+
7
+ A small change (a few UI tweaks, a new field in an API response, a validation rule) went through the same process as a big feature: full research, a plan with a breakdown, roles and model reasons, worktrees and setup, a reviewer for every UI change, a long summary, and the check command run four or five times. For a 10-minute change most of the time went on the process around it.
8
+
9
+ ### Added
10
+ - **Quick runs for small changes, UI or backend.** After reading the code, the lead makes a change a quick run when all four hold: one coder can do it in one go, nothing about it is unclear, it stays out of risky areas (schema or migrations, auth, payments, new packages, CI, secrets), and it follows a pattern the code already has. No rule about file or line counts: "add `createdAt` to GET /orders" is quick when the column exists, "add `discount`" is not when it needs a migration. The plan is short: `Mode: quick`, `Quick because: <what the lead found>`, one milestone with one acceptance criterion per change, one coder, `Reviewer: none`, `Isolation: shared`, no setup. You still see the plan and say go. The summary is what changed plus your checklist. Start the request with `quick:`, `quick review:` (keep a reviewer) or `full:` to choose yourself.
11
+ - **`orch sync` checks a quick plan**: it needs `Quick because:`, has one milestone and no open questions, and may not list migrations, CI, secrets or dependency files (use `Mode: full`). A file that looks like auth, payment or schema code gets a warning. `orch status` starts with `QUICK RUN because: …`.
12
+
13
+ ### Changed
14
+ - **A green check is not run again on the same files.** orch remembers the exact files (a git tree hash) the last passing check ran on in your folder. The final check at ALL_DONE and `orch finish` reuse that result when nothing changed since, and run the check when anything did. `orch finish --recheck` runs it anyway. In a quick run the check now runs twice (before work and after the coder) instead of four times; a full run saves one or two runs too.
15
+ - Website: a quick-run section on the home page and a new docs page, plus home page tiles for things that were only in the docs: risky changes held for `orch approve`, `orch resume` after a restart, estimate vs actual time, and a `Role` for every milestone.
16
+
17
+ Tested with simulated agents only (fake herdr and coders), not in a real run.
18
+
19
+ ## [5.5.0] - 2026-11-14
20
+
21
+ Found in a real run: the developer closed herdr and switched the computer off in the middle of a run, and came back 2 hours later. The panes were back, but the agents had no names and no conversations. The event manager was started again and paused the milestone at once as "over its time budget (121 min)". Dispatching it again failed with "has uncommitted changes — park or clean that worker first", and the work had to be saved with git by hand.
22
+
23
+ ### Added
24
+ - **`orch resume`: one command after a restart.** Run it once after a reboot or after closing herdr. It says how long orch was down, gives the agents' panes their names back, saves unsaved work, sends each task that was in progress to its agent again, and starts the event manager. You no longer resume each conversation and type "continue" in each pane: the task and the code are in files, so a fresh conversation carries on from them. Panes are found by folder: a coder's worktree is its own folder, so the pane in it is its pane (`NAMED opencode-1: pane w1:p3`). The reviewer and the lead sit in the main folder next to your own panes, so there a pane is renamed only when herdr shows the right agent kind; otherwise the exact command is printed (`herdr agent rename <pane> reviewer`). It is safe to run more than once, and it stops with exit 3 when an agent with work in progress is still missing. `orch autopilot` and the lead's `orch dispatch` do the same steps by themselves when the event manager starts after a gap.
25
+ - **`orch status` says loudly when nothing is watching the run.** When work is in progress and the event manager is not running, the first lines are `!! EVENT MANAGER NOT RUNNING since 11:42 (1h49m ago)` and `!! Run orch resume`. It used to be a few words at the end of the lead line. `orch start` points at `orch resume` when herdr can't find an agent.
26
+ - **A paused coder is told to stop.** When a milestone is paused or failed while its coder is still working, the coder gets one line: stop, don't change more files, your work is saved.
27
+
28
+ ### Fixed
29
+ - **Time orch was down no longer counts as working time.** The time budget was measured from the moment the prompt was sent, so 2 hours with the computer off were 2 hours of "work". The event manager now writes a heartbeat every loop. When it starts and the last heartbeat is older than `ORCH_DOWN_MIN_S` (120 seconds), the gap is taken out of every open task. Example: M4 was sent at 11:30, the computer went off at 11:42 and came back at 13:31. M4 counts 12 minutes, not 2 hours. The time report leaves that time out too and says so: `Not counted: 1h49m while orch was not running`. Real working time still counts as before. The same holds for a laptop that sleeps while the event manager stays up: the sleep is noticed (the wall clock moved on, the process did not run) and taken out, and the log says `the computer was asleep for 2h00m: that time is not counted against any task`. It is not charged to the run's `Budget:` either.
30
+ - **Unsaved work never blocks a task.** `orch prepare` refused a coder's folder that had uncommitted files, and a second `orch park` on an already parked milestone printed PARKED and saved nothing. So a paused coder that kept writing left the milestone stuck. Now `orch park`, `orch dispatch` and `orch prepare` always save what is in the folder first, into the milestone's saved work, and go on. Files orch can't give to a milestone (and files written after a milestone went to review, so nothing slips in behind the reviewer) are kept in a rescue ref whose name is printed, such as `refs/orch/feature-x/rescue-opencode-1-20261114-133100`. `orch finish` keeps rescue refs and lists them. Shared mode does the same for files written in the main folder after a pause; your own uncommitted files there are still left alone.
31
+ - **`orch team up` after a restart does not open a second pane next to the old one.** A pane that only lost its name gets it back, and a coder's pane that came back as a plain shell gets its agent started again in that pane.
32
+
33
+ Tested with simulated agents and a simulated herdr only. herdr's docs say `pane list` gives each pane's `cwd`, but not the exact JSON, so orch reads it loosely and falls back to printing the rename commands.
34
+
5
35
  ## [5.4.0] - 2026-11-14
6
36
 
7
37
  ### Fixed
package/README.md CHANGED
@@ -15,7 +15,7 @@ npx herdr-orchestra@latest
15
15
  Run a small team of AI coding agents inside [Herdr](https://herdr.dev). An AI **lead** writes the **orchestration plan**, picks the level of model each step needs, hands out the work and then pauses. A **pool of coders** builds it, in parallel git worktrees when tasks are independent, each on a model that fits its task: a small fast one for simple work, a stronger one where reasoning is the hard part. An optional **reviewer** checks every diff. A plain script, the **event manager** (`orch autopilot`), runs the **orchestration run**: it watches the agents, runs checks, merges, and wakes the lead only when something needs a decision. **Any installed agent can play any role**: Claude Code, Codex, Amp, OpenCode, Hermes, Antigravity (`agy`), or anything else that can run shell commands.
16
16
 
17
17
  ```
18
- you ──► lead: ORCHESTRATION PLAN (1–4 milestones, dependencies, a model tier for each, and why)
18
+ you ──► lead: ORCHESTRATION PLAN (as many milestones as needed, dependencies, a model tier for each, and why)
19
19
  │ you read it, edit it, say go
20
20
  ▼
21
21
  lead: orch dispatch M1 M2 ──► lead pauses (no AI running, nothing to pay for)
@@ -37,7 +37,7 @@ Run a small team of AI coding agents inside [Herdr](https://herdr.dev). An AI **
37
37
 
38
38
  | Agent | Does | Never does |
39
39
  |---|---|---|
40
- | **Lead** (any agent; you pick it by starting the playbook in its pane) | Researches the codebase; writes 1–4 milestones as issues (goal, why, acceptance criteria, constraints, interfaces, context facts, dependencies with reasons); gives each a model tier with the reason and a time estimate; dispatches the work, pauses, and is woken to decide: what to start next, a coder's question (asking you when only you can answer), a failed or held milestone, the final summary | Writes code, tells coders how to implement or fix, prompts or polls agents |
40
+ | **Lead** (any agent; you pick it by starting the playbook in its pane) | Researches the codebase; writes as many milestones as the feature needs as issues (or a short quick-run plan for a small change) (goal, why, acceptance criteria, constraints, interfaces, context facts, dependencies with reasons); gives each a model tier with the reason and a time estimate; dispatches the work, pauses, and is woken to decide: what to start next, a coder's question (asking you when only you can answer), a failed or held milestone, the final summary | Writes code, tells coders how to implement or fix, prompts or polls agents |
41
41
  | **Coders** (any agents: Claude, Codex, Amp, OpenCode, Hermes, AGY…) | Own the how: design, code, tests, fixing failed checks, fixing review findings, resolving conflicts | Change scope or skip acceptance criteria |
42
42
  | **Reviewer** (any spare agent, or another pane of the same tool) | Reports problems: `BLOCKER: file:line — what — why` | Edits code or prescribes fixes |
43
43
  | **Event manager** (`orch autopilot`, a script) | Sends work to coders of the right tier, watches every agent, runs checks, sends fixes and reviews, merges; queues every event and wakes the lead when it is idle | Thinks, or decides anything the lead or you should |
@@ -128,7 +128,7 @@ Version choice, first match wins: `--version` flag › `ORCH_VERSION` env › `.
128
128
 
129
129
  You can also start the event manager yourself: `orch autopilot` in a spare terminal. It is the only driver of a run: while it runs, other `orch` commands that would change the run are refused (`orch status`, `orch report`, `orch approve` and the lead's `orch events` / `orch dispatch` / `orch answer` still work).
130
130
  4. **If the lead is away** (its pane is closed, or it never reads its events): nothing is lost, the events wait in the queue. Ready work starts by itself after 15 minutes, you get a desktop notification, and `orch events --peek` shows what is open. With `Lead mode: off` in the plan header there is no lead in the run at all: `orch autopilot` dispatches by itself and stops (exit 3) when it needs you.
131
- 5. **When it's done:** read `.orchestrate/summary.md` and do its manual checklist. It holds only what needs your eyes or hands (how the UI looks and behaves, a real device); whatever a command or a look at the code can settle, the run and the lead have already checked and listed with the evidence. Want a change? Tell the lead (for example "the login button should be blue"). It runs `orch fix M1 "the login button should be blue"`: one small follow-up job goes straight to the coder who built M1, with the check and review as before, and no new plan. You can run `orch fix` yourself too. When you are happy, run `orch finish`. It re-runs the check, removes the worktrees, pushes `feature/<name>` and opens a PR into `main` (with `gh`, or prints the compare link).
131
+ 5. **When it's done:** read `.orchestrate/summary.md` and do its manual checklist. It holds only what needs your eyes or hands (how the UI looks and behaves, a real device); whatever a command or a look at the code can settle, the run and the lead have already checked and listed with the evidence. Want a change? Tell the lead (for example "the login button should be blue"). It runs `orch fix M1 "the login button should be blue"`: one small follow-up job goes straight to the coder who built M1, with the check and review as before, and no new plan. You can run `orch fix` yourself too. When you are happy, run `orch finish`. It re-runs the check (or reuses it when it already passed on exactly these files; `--recheck` runs it anyway), removes the worktrees, pushes `feature/<name>` and opens a PR into `main` (with `gh`, or prints the compare link).
132
132
 
133
133
  ### Git: one branch per run, real commits, one PR
134
134
  Planning touches no git at all. `orch start` creates the plan's `Branch:` (`feature/<slug>`) and that is the only branch a run makes: coders work on detached worktrees, and a milestone's work in progress (under review, parked, waiting for a fix) lives in hidden refs under `refs/orch/`, which `git branch` doesn't list and `git push` doesn't send. Each milestone lands as **one commit whose message says what changed** (the coder's `COMMIT:` line, e.g. `feat(api): add categories endpoint`, with a `Milestone: M2` trailer). `Commits: single` in the plan header squashes the run into one commit at finish.
@@ -199,6 +199,11 @@ skills_dirs = ["~/.myagent/skills"]
199
199
  ### Agents herdr can't watch
200
200
  For a kind with `herdr_detect = false` (or one missing from the registry, which `orch sync` warns about), `orch` relies only on the **done file and the time budget**: it never reports GONE, BLOCKED or IDLE for it, treats it as free whenever it has no task, and `orch status` marks it `detect:off`. If herdr doesn't recognise the pane as an agent at all, address it by pane id: `Workers: hermes-1 (hermes @pane:w1:p3)`. `orch` then types prompts into that pane, and `orch start` reports a `STALE pane` when the id has changed (`herdr pane list` shows the current ids).
201
201
 
202
+ ### Small changes: quick runs
203
+ A button colour, a new field in an API response, a validation rule or a one-function bug fix doesn't need a feature breakdown, roles, worktrees and a reviewer. After reading the code, the lead makes it a **quick run** when all four hold: one coder can do it in one go, nothing about it is unclear, it stays out of risky areas (database schema or migrations, auth, payments, new packages, CI, secrets), and it follows a pattern the code already has. There is no rule about file counts: "add `createdAt` to GET /orders" is quick when the column exists, and "add `discount`" is not when it needs a migration. The plan header says `Mode: quick` and `Quick because: <what the lead found>`, and you still say go.
204
+
205
+ A quick run is one milestone (one acceptance criterion per change), one coder, no reviewer, your folder as it is (`Isolation: shared`, no setup). The check runs before work and after the coder; the final check and `orch finish` reuse that result when the files are exactly the same. The summary is what changed plus your checklist. Choose yourself with `/orch-plan quick: …`, `/orch-plan quick review: …` (keep a reviewer) or `/orch-plan full: …`. `orch sync` refuses a quick plan that lists migrations, CI, secrets or dependency files, and the risk hold still stops a change that turns out bigger. Details: [Quick runs](https://herdr-orchestra.vercel.app/docs/quick-runs/).
206
+
202
207
  ### Milestones fit the feature
203
208
  There is no target number. The lead first writes a `## Feature breakdown` (the real pieces of work and how they connect), starts from **one** milestone, and splits a piece off only when that buys something: another coder can build it in parallel, other work has to build on it first, or the whole is too big for one sitting. More coders never means more milestones: a one-field change that touches API and UI is one milestone, even with five coders. In a plan with two or more milestones, each one carries `Why separate: <reason>`, and `orch sync` warns when it is missing. A feature made of several loosely connected parts is better as separate runs. Set `ORCH_MAX_TASKS` if you want a hard warning above a number of your own.
204
209
 
@@ -235,6 +240,8 @@ When a milestone passes its checks it's saved to its hidden ref and the coder is
235
240
  | A prompt can't be delivered | the task goes back in the queue (its job kept) and that agent is retried after 2 min; 3 in a row bench it for 30 min |
236
241
  | Attempts keep getting lost (unreachable, gone, rate-limited) | after 4 (`ORCH_MAX_LOST`) the task fails with the history instead of looping |
237
242
  | Autopilot is killed mid-step | the next run confirms or re-sends an unconfirmed prompt to the same agent, and finishes or undoes a half-done merge |
243
+ | The computer was off, herdr was closed, or the event manager died | `orch status` says so in its first lines. `orch resume` carries on: the time orch was down is not counted against any task, the agents' panes get their names back, unsaved work is saved and the tasks in progress are sent again (see [After a restart](#after-a-restart)) |
244
+ | A paused coder keeps writing files | it is told to stop; whatever it writes anyway is saved into the milestone the next time the milestone or that folder is used. orch never refuses a task because a folder has unsaved files |
238
245
  | Lockfiles changed since a folder was set up | the setup command runs again there (and in your main folder before the merge check) |
239
246
  | Risky change (deleted file, migration, CI config, secrets file, unlisted dependency change, very large diff) | the milestone is **held** until you run `orch approve Mn`; the rest keeps going |
240
247
  | The wake-up prompt never became a turn for the lead (it sat in the input box, or you were typing there) | sent again after 30s, then 1 min; after 3 tries you get a notification. The event manager does not leave at ALL_DONE before the lead has read the last events |
@@ -245,6 +252,25 @@ When a milestone passes its checks it's saved to its hidden ref and the coder is
245
252
  | Agent stops early | nudged once, then parked |
246
253
  | Worker writes `QUESTION:` | that task and its dependents wait, the lead is woken to answer or ask you; everything else continues |
247
254
 
255
+ ### After a restart
256
+ Nothing on a switched-off computer can restart itself, so after a reboot (or after closing herdr) one command is needed. Open herdr, then run in the repo:
257
+
258
+ ```bash
259
+ orch resume
260
+ ```
261
+
262
+ It does five things, and says what it did:
263
+
264
+ 1. **The time orch was down is not counted.** Example: M4 was sent at 11:30, the computer went off at 11:42 and came back at 13:31. M4 counts 12 minutes of work, not 2 hours, so it is not paused as "over its time budget", and the time report says `Not counted: 1h49m while orch was not running`. A laptop that only slept, with the event manager still up, is handled without any command: the sleep is taken out the same way.
265
+ 2. **Agents get their names back.** herdr brings the panes back, but not the agents' names, and orch reaches agents by name. `orch resume` finds each coder's pane by its folder and names it again (`NAMED opencode-1: pane w1:p3`). Where it can't decide (the reviewer and the lead sit in the main folder, next to your own panes), it prints the exact command: `herdr agent rename w1:p5 reviewer`. A pane that came back as a plain shell needs its agent started: `orch team up` does that in the same pane.
266
+ 3. **Unsaved work is saved** into the milestone it belongs to.
267
+ 4. **Each task that was in progress is sent to its agent again.** The agent's old conversation is not needed: the task and the code are in files, so a fresh conversation carries on from them. You don't have to type "continue" in each pane.
268
+ 5. **The event manager is started**, and it wakes the lead if events wait for it.
269
+
270
+ It is safe to run more than once. If an agent with work in progress is still missing, it stops and says what to do. `orch autopilot` and the lead's `orch dispatch` do steps 1 to 4 by themselves when they start the event manager after a gap.
271
+
272
+ orch can't bring an agent's old conversation back, and it can't start itself when the computer starts.
273
+
248
274
  ### Contracts and reports
249
275
  `plan.md` stays the file you edit. From it `orch` generates a `task.json` for each milestone (numbered acceptance criteria `AC1…`, allowed files, interfaces, the commits of its dependencies). Coders answer with a `result-N.json` (status, commit message, files changed, the check they ran, each criterion met or not), and the reviewer with a `review-N.json` (a verdict per criterion plus findings). The old line formats (`COMMIT:`, `QUESTION:`, `BLOCKER:`) still work as a fallback. The shapes are in [docs/contracts.md](docs/contracts.md).
250
276
 
@@ -253,9 +279,9 @@ Every status change is written to `.orchestrate/events.jsonl`, and `orch report
253
279
  Optional plan header lines: `Lead mode: events | off` (default `events` when the plan has a `Lead:` line) · `Scope: warn | strict` · `Risk hold: on | off` · `Budget: 3h` (autopilot stops when its running time is used up) · `Estimate: 1h30m` (the lead's estimate for the feature) · `Setup inputs: <globs>` (which files mean "run setup again"; default: lockfiles and manifests). Per milestone: `Why separate` (why it is its own milestone; needed when the plan has more than one) · `Tier`, `Needs`, `Model why` (see [Models and tiers](#models-and-tiers)) · `Estimate: 40m` (dispatch to landed if nothing goes wrong) · `Parallel: allow` lets it run next to a milestone that shares its `Likely files`.
254
280
 
255
281
  ### Commands
256
- `orch status` · `orch report` · `orch approve Mn` · `orch models [show|check <id>]` · `orch events [--peek]` · `orch dispatch Mn... [--to <worker>] [--tier <tier>]` · `orch answer Mn "<answer>"` · `orch fix Mn "<change>" [--to <worker>]` · `orch doctor [kind]` · `orch ready` · `orch autopilot` · `orch lead plan|run|check|whoami` · `orch agents [launch <kind> [--model <id>]|sync|check]` · `orch handoff Mn` · `orch needs-fix Mn` · `orch set M3 pending` · `orch park M2 paused "why"` · `orch cooldown claude-1 60` · `orch cleanup` · `orch finish [--no-push]` · `orch version` · `orch` (full help)
282
+ `orch status` · `orch resume` · `orch report` · `orch approve Mn` · `orch models [show|check <id>]` · `orch events [--peek]` · `orch dispatch Mn... [--to <worker>] [--tier <tier>]` · `orch answer Mn "<answer>"` · `orch fix Mn "<change>" [--to <worker>]` · `orch doctor [kind]` · `orch ready` · `orch autopilot` · `orch lead plan|run|check|whoami` · `orch agents [launch <kind> [--model <id>]|sync|check]` · `orch handoff Mn` · `orch needs-fix Mn` · `orch set M3 pending` · `orch park M2 paused "why"` · `orch cooldown claude-1 60` · `orch cleanup` · `orch finish [--no-push]` · `orch version` · `orch` (full help)
257
283
 
258
- Tunables: `ORCH_CODER_BUDGET_MIN` (45) · `ORCH_REVIEW_BUDGET_MIN` (15) · `ORCH_CHECK_TIMEOUT_MIN` (30) · `ORCH_COOLDOWN_MIN` (60) · `ORCH_MAX_TASKS` (unset: no limit) · `ORCH_GONE_COOLDOWN_MIN` (10) · `ORCH_SEND_RETRY_S` (120) · `ORCH_HERDR_TIMEOUT_S` (30) · `ORCH_MAX_LOST` (4) · `ORCH_UNREACHABLE_MIN` (30) · `ORCH_CONFIRM_S` (30) · `ORCH_RISK_MAX_LINES` (1500) · `ORCH_LEAD_WAIT_MIN` (15: ready work the lead hasn't dispatched starts by itself) · `ORCH_LEAD_CONFIRM_S` (30: a wake-up the lead did not pick up is sent again, doubling) · `ORCH_LEAD_REWAKE_S` (300) · `ORCH_LEAD_MAX_WAKES` (3) · `ORCH_LEAD_IDLE_MAX_MIN` (720: how long the event manager waits for an answer) · `ORCH_NO_AUTOSTART=1` (the lead's commands never start the event manager)
284
+ Tunables: `ORCH_CODER_BUDGET_MIN` (45) · `ORCH_REVIEW_BUDGET_MIN` (15) · `ORCH_CHECK_TIMEOUT_MIN` (30) · `ORCH_COOLDOWN_MIN` (60) · `ORCH_MAX_TASKS` (unset: no limit) · `ORCH_GONE_COOLDOWN_MIN` (10) · `ORCH_SEND_RETRY_S` (120) · `ORCH_HERDR_TIMEOUT_S` (30) · `ORCH_MAX_LOST` (4) · `ORCH_UNREACHABLE_MIN` (30) · `ORCH_CONFIRM_S` (30) · `ORCH_DOWN_MIN_S` (120: an event manager silent for longer was down, and that time is not counted) · `ORCH_RISK_MAX_LINES` (1500) · `ORCH_LEAD_WAIT_MIN` (15: ready work the lead hasn't dispatched starts by itself) · `ORCH_LEAD_CONFIRM_S` (30: a wake-up the lead did not pick up is sent again, doubling) · `ORCH_LEAD_REWAKE_S` (300) · `ORCH_LEAD_MAX_WAKES` (3) · `ORCH_LEAD_IDLE_MAX_MIN` (720: how long the event manager waits for an answer) · `ORCH_NO_AUTOSTART=1` (the lead's commands never start the event manager)
259
285
 
260
286
  ## Develop and release
261
287
 
package/VERSION CHANGED
@@ -1 +1 @@
1
- 5.4.0
1
+ 5.6.0
Binary file