herdr-orchestra 5.5.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,20 @@
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
+
5
19
  ## [5.5.0] - 2026-11-14
6
20
 
7
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.
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
 
package/VERSION CHANGED
@@ -1 +1 @@
1
- 5.5.0
1
+ 5.6.0
Binary file
package/bin/orch CHANGED
@@ -13,7 +13,7 @@ Task status flow (every change goes through move(), which checks TRANSITIONS)
13
13
  side states: needs-answer, paused, failed, conflict, needs-fix, held (waiting for `orch approve`), skipped
14
14
  Also: .orchestrate/events.jsonl (one line per transition), driver.lock (held by autopilot while it drives).
15
15
  """
16
- import contextlib, fcntl, fnmatch, hashlib, json, os, re, shlex, shutil, signal, socket, subprocess, sys, time
16
+ import contextlib, fcntl, fnmatch, hashlib, json, os, re, shlex, shutil, signal, socket, subprocess, sys, tempfile, time
17
17
  from pathlib import Path
18
18
 
19
19
  HERDR = os.environ.get("HERDR", "herdr")
@@ -59,6 +59,12 @@ RISK_RULES = [
59
59
  (re.compile(r"(^|/)\.env(\.(?!example$|sample$|template$)[^/]+)?$|(^|/)[^/]*\.(pem|key|p12)$", re.I),
60
60
  "secrets or environment file"),
61
61
  ]
62
+ # quick runs (`Mode: quick`): small, clear changes only. Files that always need the full process...
63
+ QUICK_NEVER = RISK_RULES + [(LOCKFILE_RE, "dependency file")]
64
+ # ...and names that usually mean auth or payment code: the lead should be sure before calling it quick
65
+ QUICK_CAREFUL_RE = re.compile(r"auth|login|logout|password|session|token|oauth|permission|rbac|acl|payment|billing|"
66
+ r"invoice|checkout|stripe|paypal|razorpay|subscription|schema\.(prisma|sql|rb)|models?\.py$",
67
+ re.I)
62
68
  RISK_MAX_LINES = int(os.environ.get("ORCH_RISK_MAX_LINES", "1500"))
63
69
  CHECK_TIMEOUT_S = int(os.environ.get("ORCH_CHECK_TIMEOUT_MIN", "30")) * 60
64
70
  ACTIVE = {"coding", "verifying", "awaiting-review", "reviewing", "reviewed", "committed", "conflict", "needs-fix",
@@ -709,7 +715,12 @@ def cmd_sync(args):
709
715
  if commits not in ("per-milestone", "single"):
710
716
  errors.append(f"Commits must be per-milestone or single, got {commits!r}")
711
717
  title_m = re.search(r"(?m)^# Plan:\s*(.+?)\s*$", plan_text)
712
- isolation = get("isolation", "worktree").split()[0].lower()
718
+ mode = (get("mode", "full").split() or ["full"])[0].lower()
719
+ if mode not in ("quick", "full"):
720
+ errors.append(f"Mode must be quick or full, got {mode!r}")
721
+ quick = mode == "quick"
722
+ quick_because = get("quick because")
723
+ isolation = get("isolation", "shared" if quick else "worktree").split()[0].lower()
713
724
  if isolation not in ("worktree", "shared"):
714
725
  errors.append(f"Isolation must be worktree or shared, got {isolation!r}")
715
726
  try:
@@ -930,6 +941,28 @@ def cmd_sync(args):
930
941
  if not field(by_id[tid], "why separate"):
931
942
  warns.append(f"{tid} has no `Why separate:` — say why it is its own milestone (parallel work, a "
932
943
  f"foundation others build on, too big for one sitting), or merge it into another")
944
+ # a quick run: one small, clear milestone, the lead says why it is small, and nothing that needs the full process
945
+ if quick:
946
+ if not quick_because:
947
+ errors.append("`Mode: quick` needs `Quick because: <what you found in the code that makes this small>` "
948
+ "— e.g. `Quick because: the column already exists, only the response changes`")
949
+ if len(enabled) > 1:
950
+ errors.append(f"`Mode: quick` is one milestone, and this plan has {len(enabled)} — put the small changes "
951
+ f"in one milestone (one acceptance criterion each), or use `Mode: full`")
952
+ if isolation == "worktree":
953
+ warns.append("`Mode: quick` with `Isolation: worktree`: one milestone needs no separate folder — "
954
+ "`Isolation: shared` skips the worktree and its setup")
955
+ for tid in enabled:
956
+ never = sorted({f"{what}: {f}" for f in files[tid] for rx, what in QUICK_NEVER if rx.search(f)})
957
+ if never:
958
+ errors.append(f"{tid} lists {', '.join(never)} — a quick run never touches these; use `Mode: full`")
959
+ careful = sorted(f for f in files[tid] if QUICK_CAREFUL_RE.search(f))
960
+ if careful:
961
+ warns.append(f"{tid} lists {', '.join(careful)}, which looks like auth, payment or schema code — "
962
+ f"those take the full process; keep `Mode: quick` only if the change does not touch them")
963
+ if has_open_questions(by_id[tid]):
964
+ errors.append(f"{tid} has open questions — a quick run needs a clear change; answer them or use "
965
+ f"`Mode: full`")
933
966
  max_tasks = int(os.environ.get("ORCH_MAX_TASKS", "0") or 0) # no limit unless you set one
934
967
  if max_tasks and len(enabled) > max_tasks:
935
968
  warns.append(f"{len(enabled)} enabled milestones (> ORCH_MAX_TASKS={max_tasks}). Merge coupled milestones "
@@ -956,6 +989,9 @@ def cmd_sync(args):
956
989
  "base": base.split()[0] if base else None,
957
990
  "title": title_m.group(1) if title_m else branch,
958
991
  "commits": commits,
992
+ "mode": mode,
993
+ "quick_because": quick_because if quick else None,
994
+ "green_tree": old.get("green_tree"),
959
995
  "integration_broken": old.get("integration_broken"),
960
996
  "schema": STATE_SCHEMA,
961
997
  "notified": old.get("notified", []),
@@ -1050,7 +1086,7 @@ def cmd_sync(args):
1050
1086
  save(st)
1051
1087
  for w in warns:
1052
1088
  print("WARN:", w)
1053
- print(f"OK: {len(tasks)} tasks, isolation={isolation}, max_parallel={max_par}, "
1089
+ print(f"OK: {len(tasks)} tasks, " + ("mode=quick, " if quick else "") + f"isolation={isolation}, max_parallel={max_par}, "
1054
1090
  f"workers={list(workers)}, reviewer={reviewer}" + (f", lead={lead[0]}" if lead else ""))
1055
1091
 
1056
1092
 
@@ -1329,6 +1365,35 @@ def run_check(st, cwd):
1329
1365
  return ok, tail, round(time.time() - t0, 1)
1330
1366
 
1331
1367
 
1368
+ def tree_of(d):
1369
+ """Hash of the files git sees in d (tracked and untracked, not ignored), without touching the real index.
1370
+ Two checks of the same tree give the same answer, so a green check on it can be reused."""
1371
+ try:
1372
+ real = Path(git("rev-parse", "--path-format=absolute", "--git-path", "index", cwd=d).stdout.strip())
1373
+ with tempfile.TemporaryDirectory() as td:
1374
+ tmp = Path(td) / "index"
1375
+ if real.exists():
1376
+ shutil.copyfile(real, tmp)
1377
+ env = {**os.environ, "GIT_INDEX_FILE": str(tmp)}
1378
+ subprocess.run(["git", "add", "-A"], cwd=d, env=env, capture_output=True, timeout=120)
1379
+ r = subprocess.run(["git", "write-tree"], cwd=d, env=env, capture_output=True, text=True, timeout=60)
1380
+ return r.stdout.strip() if r.returncode == 0 and r.stdout.strip() else None
1381
+ except (OSError, subprocess.SubprocessError, SystemExit):
1382
+ return None
1383
+
1384
+
1385
+ def note_green(st, d, ok):
1386
+ """Remember the tree a passing check ran on in the main folder (a failing one forgets it)."""
1387
+ if Path(d).resolve() != ROOT.resolve():
1388
+ return
1389
+ st["green_tree"] = tree_of(d) if ok else None
1390
+
1391
+
1392
+ def green_still(st, d):
1393
+ """True when the main folder holds exactly the tree the last passing check ran on: no need to run it again."""
1394
+ return bool(st.get("check") and st.get("green_tree")) and tree_of(d) == st["green_tree"]
1395
+
1396
+
1332
1397
  def path_allowed(path, patterns):
1333
1398
  return any(path == p or fnmatch.fnmatch(path, p) or path.startswith(p.rstrip("/") + "/") for p in patterns)
1334
1399
 
@@ -2291,6 +2356,7 @@ def cmd_merge(args):
2291
2356
  st["merging"] = None
2292
2357
  _integration_failed(st, tid, tail)
2293
2358
  git("commit", "-q", "-m", commit_message(st, tid), cwd=ROOT)
2359
+ note_green(st, ROOT, True)
2294
2360
  fault("after-merge-commit")
2295
2361
  git("update-ref", "-d", task_ref(st, tid), cwd=ROOT, check=False)
2296
2362
  _finish(st, tid)
@@ -2486,6 +2552,8 @@ def cmd_status(args):
2486
2552
  + (f" since {_clock(beat)} ({_dur(now() - beat)} ago)" if beat else "")
2487
2553
  + " — nothing is watching this run, so it will not move.\n"
2488
2554
  "!! Run `orch resume` (after a restart it also finds the agents again and re-sends their tasks).")
2555
+ if st.get("mode") == "quick":
2556
+ print(f"QUICK RUN because: {st.get('quick_because') or '-'}")
2489
2557
  print(f"branch={st['branch']} base={st.get('base')} isolation={st['isolation']} "
2490
2558
  f"max_parallel={st['max_parallel']} reviewer={st['reviewer']} (busy: {st.get('reviewer_busy')})")
2491
2559
  if st.get("integration_broken"):
@@ -2547,7 +2615,8 @@ def github_compare_url(remote, base, branch):
2547
2615
 
2548
2616
 
2549
2617
  def cmd_finish(args):
2550
- """orch finish [--no-push] -> final check, drop hidden refs and worktrees, push the feature branch, open a PR."""
2618
+ """orch finish [--no-push] [--recheck] -> final check (reused when it already passed on exactly these files;
2619
+ --recheck runs it anyway), drop hidden refs and worktrees, push the feature branch, open a PR."""
2551
2620
  st = load()
2552
2621
  left = [f"{k} ({v['status']})" for k, v in st["tasks"].items() if v["status"] not in ("merged", "skipped")]
2553
2622
  if left:
@@ -2555,7 +2624,9 @@ def cmd_finish(args):
2555
2624
  if git("rev-parse", "--abbrev-ref", "HEAD", cwd=ROOT).stdout.strip() != st["branch"] or is_dirty(ROOT):
2556
2625
  die(f"main tree must be clean and on {st['branch']}")
2557
2626
  base = st.get("base") or default_base(st)
2558
- if st.get("check"):
2627
+ if "--recheck" not in args and green_still(st, ROOT):
2628
+ print(f"CHECK reused: it already passed on exactly these files ({st['green_tree'][:10]}), not run again")
2629
+ elif st.get("check"):
2559
2630
  r = subprocess.run(st["check"], shell=True, cwd=ROOT, text=True, capture_output=True)
2560
2631
  if r.returncode != 0:
2561
2632
  die(f"the check fails on {st['branch']} — fix it before finishing:\n"
@@ -3083,6 +3154,7 @@ def cmd_autopilot(args):
3083
3154
 
3084
3155
  def check(cwd, tid=None, where="worktree"):
3085
3156
  ok, tail, secs = run_check(st, cwd)
3157
+ patch_state(lambda s_: note_green(s_, cwd, ok))
3086
3158
  if tid:
3087
3159
  patch_state(lambda s_: s_["tasks"][tid].setdefault("checks", []).append(
3088
3160
  {"where": where, "ok": ok, "secs": secs, "ts": now()}))
@@ -3553,7 +3625,11 @@ def cmd_autopilot(args):
3553
3625
  st = load()
3554
3626
  tasks = st["tasks"]
3555
3627
  if all(t["status"] in ("merged", "skipped") for t in tasks.values()):
3556
- ok, tail = check(ROOT)
3628
+ if green_still(st, ROOT): # the last passing check ran on exactly these files
3629
+ ok, tail = True, ""
3630
+ say("final check: the check already passed on exactly these files, not run again")
3631
+ else:
3632
+ ok, tail = check(ROOT)
3557
3633
  if not ok:
3558
3634
  patch_state(lambda s_: s_.update(integration_broken="the final check"))
3559
3635
  patch_state(lambda s_: s_["run"].update(ended=now()))
@@ -3576,12 +3652,14 @@ def cmd_autopilot(args):
3576
3652
  models.append(f"| {k} | {v.get('tier') or 'any'} | {ran} | "
3577
3653
  f"{'yes' if v.get('escalated') else 'no'} | {v.get('model_why') or '-'} |")
3578
3654
  lead_ = lead_on(st)
3655
+ quick_run = st.get("mode") == "quick"
3579
3656
  prev = ORCH / "summary.md"
3580
3657
  if prev.exists(): # a fix after ALL_DONE writes the summary again: keep the lead's notes
3581
3658
  shutil.copyfile(prev, ORCH / "summary.prev.md")
3582
3659
  (ORCH / "summary.md").write_text(
3583
3660
  f"# Summary: {st.get('title') or st['branch']}\n\nBranch `{st['branch']}` into `{base}`. "
3584
3661
  f"Final check on the branch: {'PASS' if ok else 'FAIL'}\n\n"
3662
+ + (f"Quick run because: {st.get('quick_because') or '-'}\n\n" if quick_run else "") +
3585
3663
  "## Tasks\n" + "\n".join(f"- {k}: {v['title']} ({v['status']}, last coder {v.get('worker') or v.get('last_worker') or '-'})"
3586
3664
  for k, v in tasks.items()) +
3587
3665
  f"\n\n## Commits\n```\n{log_}```\n\n## Files changed\n```\n{stat}```\n\n"
@@ -3594,10 +3672,12 @@ def cmd_autopilot(args):
3594
3672
  f"{auto_checked(st, ok)}\n\n"
3595
3673
  f"## Run report\n```\n{report}\n```\n\n"
3596
3674
  + ("## Still to write (the lead was woken to write these)\n" if lead_ else
3597
- "## Still to write (ask the lead: 'use the orch-run skill' to finish the summary)\n") +
3598
- "- Design decisions & study notes\n"
3599
- "- Checked by the lead: what you verified yourself by running a command or reading the code, with the "
3600
- "evidence\n"
3675
+ "## Still to write (ask the lead: 'use the orch-run skill' to finish the summary)\n")
3676
+ + ("" if quick_run else "- Design decisions & study notes\n")
3677
+ + ("- What changed: one line per change, in the developer's words, and how it was checked\n"
3678
+ if quick_run else
3679
+ "- Checked by the lead: what you verified yourself by running a command or reading the code, with "
3680
+ "the evidence\n") +
3601
3681
  "- Manual verification checklist: only what a person must see or do (how the UI looks and behaves, a "
3602
3682
  "real device, an outside account). Nothing a command or a look at the code can settle.\n"
3603
3683
  + ("\nThe summary before this one is in `.orchestrate/summary.prev.md`: carry its notes and checklist "
@@ -4480,7 +4560,7 @@ USAGE = """usage: orch <command> [args]
4480
4560
  set <Mn> <status> [reason] [--force] manual override: pending/paused/failed/skipped (others need --force)
4481
4561
  approve <Mn> let a milestone held for risky changes land (works while autopilot runs)
4482
4562
  cleanup remove clean worker worktrees
4483
- finish [--no-push] final check, drop hidden refs + worktrees, push the feature branch, open a PR into base
4563
+ finish [--no-push] [--recheck] final check (reused if it passed on these exact files), push, open a PR
4484
4564
  write-task <Mn> generate TASKDIR/task.md from plan.md (+ reports of merged dependencies)
4485
4565
  nudge <Mn> re-send the current prompt once to an agent that stopped early
4486
4566
  autopilot the event manager: watches agents, checks, merges, wakes the lead; exits 0 ALL_DONE, 3 when it needs you
@@ -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.6.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
@@ -54,11 +54,11 @@ If you changed plan.md by hand, run `orch sync` (it works once the event manager
54
54
 
55
55
  ## 3. ALL_DONE
56
56
  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:
57
+ 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
58
  - **"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
59
  - **"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
60
  - **"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.**
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 (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
62
  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
63
 
64
64
  ## 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.