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.
@@ -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.4.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
@@ -45,6 +45,7 @@ Run `orch events`. It lists the new events, the ones still open, the milestones
45
45
  | `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
46
  | `ESCALATED Mn`, `AUTO-DISPATCHED Mn` | Information. Mention an escalation in the final summary. |
47
47
  | `STOPPED` / the event manager is not running | Read the last lines of `.orchestrate/autopilot.log` and tell the developer why (a red baseline, the run's budget, the branch failing its check). Your next `orch dispatch` or `orch answer` starts it again; so does `orch autopilot` in a terminal. |
48
+ | `orch status` starts with `!! EVENT MANAGER NOT RUNNING`, or the developer says the computer or herdr was restarted | Run `orch resume` once and read what it prints. It leaves the time orch was down out of every time budget, gives the agents' panes their names back, saves unsaved work, sends the tasks in progress to their agents again and starts the event manager. For each `LOST` line, give the developer the exact command it prints (`herdr agent rename <pane> <name>`, or `orch team up` for a pane with no agent in it), then run `orch resume` again. Never fix this with git by hand, and never prompt a coder yourself. |
48
49
  | `ALL_DONE` | Section 3. |
49
50
 
50
51
  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).
@@ -53,11 +54,11 @@ If you changed plan.md by hand, run `orch sync` (it works once the event manager
53
54
 
54
55
  ## 3. ALL_DONE
55
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).
56
- 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:
57
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).
58
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>"`.
59
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.
60
- 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.**
61
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.
62
63
 
63
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.