herdr-orchestra 6.47.0 → 6.47.2

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,16 @@
2
2
 
3
3
  All notable changes. Versions follow [semantic versioning](https://semver.org).
4
4
 
5
+ ## [6.47.2] - 2026-12-02
6
+
7
+ The reviewer is no longer optional in a full run, and it checks security every time. Before, a milestone was reviewed only when the plan said `Review: yes` (the default was no), a full plan could say `Reviewer: none`, and the review prompt mentioned "security" as one word in a list. Example: a milestone that adds `GET /orders/:id` with no check that the order belongs to the logged-in user could land after a green check, unreviewed, when the lead had marked it `Review: no`.
8
+
9
+ ### Changed
10
+ - **Every milestone of a full run is reviewed.** A milestone is reviewed whenever the plan has a reviewer, whatever its `Review:` line says; `Review: no` in a full run gets a warning from `orch sync` naming the milestone. Quick runs are unchanged: no reviewer, unless the developer starts with `quick review:` (then `Review: yes`).
11
+ - **A full plan must name a reviewer.** `orch sync` refuses a bare `Reviewer: none` in a full plan and says how to add one (`orch team <kind>` picks one). Only when the developer asked for no review may the plan say `Reviewer: none (developer: <their reason>)`.
12
+ - **The reviewer checks three security points on every milestone**, and each problem is a blocker: secrets (no API key, token, password or private key in code, config, tests, fixtures or logs), authorization (every new or changed endpoint, action or query checks that the caller may do it: logged in, the right role, only their own data) and input validation (input from users, requests, files or other services is checked before it reaches a database query, a shell command, a file path, HTML or a redirect). Both the pane reviewer's task file and the Pi reviewer subagent have them.
13
+ - The plan playbook, README and docs (planning, plan file, workflow, reviews) say the same.
14
+
5
15
  ## [6.47.0] - 2026-11-30
6
16
 
7
17
  The lead reads far less. Most of the playbook text a lead read was text it did not need at that moment: on "go" it got the whole run playbook (22,774 characters), including the event table and the summary steps that `orch events` prints again exactly when they are needed, and it got all of it again on every message the developer sent during a run. Every wake-up repeated the full hard rules. "M1 landed" woke the lead just to write one line. And the whole planning (the plan playbook, every file read while researching) stayed in the lead's chat for the rest of the run, sent again on every call.
package/README.md CHANGED
@@ -148,7 +148,7 @@ Version choice, first match wins: `--version` flag › `ORCH_VERSION` env › `.
148
148
 
149
149
  **An all-Codex team.** Codex runs every command in its sandbox, which blocks two things orch needs: talking to herdr, and writing the repo's `.git` (branches, worktrees). So orch starts every Codex pane with two settings that open just those (`-c sandbox_workspace_write.network_access=true`, which also allows the internet, and the repo's `.git` as a writable folder). Start your own Codex lead the same way: `orch agents launch codex --role lead --model gpt-6.2-sol@medium` prints the command; `orch lead plan` warns when the pane you run it in is still blocked. A Codex model id can end in a thinking level: `gpt-6.2-sol@low` is Sol on low thinking. The Codex levels are small = `gpt-6-luna@high`, medium = `gpt-6.2-sol@low`, high = `gpt-6.2-sol@medium` (Astra stays blocked), and `orch models` asks Codex itself (`codex debug models`) for its current models, so a newer Sol or Luna is used without anyone editing a file.
150
150
 
151
- 2. **Orchestration plan:** start the plan playbook in the lead's pane (see [Choose your lead](#choose-your-lead)). The lead researches, writes `.orchestrate/plan.md` and shows you the milestones, which coder and model each one goes to, and why. Edit the plan if you like: dependencies, tier, review yes/no, your answers to open questions.
151
+ 2. **Orchestration plan:** start the plan playbook in the lead's pane (see [Choose your lead](#choose-your-lead)). The lead researches, writes `.orchestrate/plan.md` and shows you the milestones, which coder and model each one goes to, and why. Edit the plan if you like: dependencies, tier, your answers to open questions. A full run always has a reviewer and reviews every milestone; besides the spec and your written rules, the reviewer checks secrets, authorization and input validation on each one.
152
152
  3. **Orchestration run:** tell the lead **go** (`/orch-run`). It dispatches the milestones (`orch dispatch M1 M2`), which starts the event manager, and pauses. From here the run looks after itself:
153
153
  - a milestone finishes → the event manager checks and merges it, then wakes the lead, which dispatches what that unlocked;
154
154
  - a coder asks a question → the lead is woken; if the plan or the code already answers it, it answers, otherwise it asks you in its pane. `orch answer M2 "<your answer>"` writes the answer into the plan and the **same coder** carries on with its work; if a criterion can't be met (say an outside API is missing) and you agree to ship the rest, the lead runs `orch answer M2 --defer AC2 "<your words>"`: no fix rounds or stronger-model retries for AC2, and the summary lists it as **not done**, with a follow-up;
package/VERSION CHANGED
@@ -1 +1 @@
1
- 6.47.0
1
+ 6.47.2
Binary file
package/bin/orch CHANGED
@@ -1488,7 +1488,7 @@ def cmd_sync(args):
1488
1488
  errors.append(f"lead {lead[0]!r} is also the Reviewer — the lead never reviews in its own run")
1489
1489
  reg = registry(required=False)
1490
1490
  cat = models_catalog()
1491
- models = {**parse_models(get("workers")), **parse_models(rev), **parse_models(get("lead"))}
1491
+ models = {**parse_models(get("workers")), **(parse_models(rev) if reviewer else {}), **parse_models(get("lead"))}
1492
1492
  unrated = set()
1493
1493
  for name, mid in models.items():
1494
1494
  why = model_denied(cat, mid)
@@ -1735,6 +1735,16 @@ def cmd_sync(args):
1735
1735
  if has_open_questions(by_id[tid]):
1736
1736
  errors.append(f"{tid} has open questions — a quick run needs a clear change; answer them or use "
1737
1737
  f"`Mode: full`")
1738
+ # full runs always have a reviewer: only the developer can drop it, and the plan says why
1739
+ if not quick and reviewer is None and not re.match(r"none\s*\(\s*developer\b[^)]*\w[^)]*\)", rev.strip(), re.I):
1740
+ errors.append("a full run always has a reviewer — add one (`Reviewer: reviewer (<kind>: <model>)`, "
1741
+ "`orch team <kind>` picks one), or, only when the developer asked for no review, write "
1742
+ "`Reviewer: none (developer: <why>)`")
1743
+ if not quick and reviewer is not None:
1744
+ skipped = [tid for tid in enabled if field(by_id[tid], "review", "").lower().startswith("n")]
1745
+ if skipped:
1746
+ warns.append(f"{', '.join(skipped)} say `Review: no` — a full run reviews every milestone, so they are "
1747
+ f"reviewed anyway (only a quick run can skip the review)")
1738
1748
  # hard to undo (`Door: one-way (why)`): always waits for the developer's `orch approve` before it lands
1739
1749
  doors = {}
1740
1750
  for tid in ids:
@@ -1905,7 +1915,8 @@ def cmd_sync(args):
1905
1915
  **o, # keep runtime fields (last_report, review_ok, conflicts, ...)
1906
1916
  "title": t["title"], "deps": deps[tid],
1907
1917
  "prefer": field(t, "prefer", "any").split()[0].lower() if field(t, "prefer", "any") else "any",
1908
- "review": field(t, "review", "no").lower().startswith("y") and reviewer is not None,
1918
+ # full runs: every milestone is reviewed; quick runs only with `Review: yes` (`quick review:`)
1919
+ "review": reviewer is not None and (not quick or field(t, "review", "no").lower().startswith("y")),
1909
1920
  "status": o.get("status", "pending"), "reason": o.get("reason", ""),
1910
1921
  "worker": o.get("worker"), "dir": o.get("dir"), "attempt": o.get("attempt", 0),
1911
1922
  "fix": o.get("fix", 0), "review_round": o.get("review_round", 0),
@@ -3870,7 +3881,15 @@ def cmd_review(args):
3870
3881
  "Answer two questions, separately, and give every finding the `axis` of the one it answers:\n"
3871
3882
  "1. `spec`: did it build what the task asks, no more and no less? Every acceptance criterion met, nothing "
3872
3883
  "missing, no behaviour the task did not ask for. Correctness, API/contract consistency, UI/UX, security, "
3873
- "edge cases and missing tests belong here."
3884
+ "edge cases and missing tests belong here.\n"
3885
+ " Security, check all three every time, each problem is a `blocker`:\n"
3886
+ " - secrets: no API key, token, password or private key in code, config, tests, fixtures or logs (it "
3887
+ "belongs in an environment variable or the secret store the project already uses);\n"
3888
+ " - authorization: every new or changed endpoint, action or query checks that the caller may do it "
3889
+ "(logged in, the right role, only their own data), not just that the request is well formed;\n"
3890
+ " - input validation: input from users, requests, files or other services is checked before it reaches a "
3891
+ "database query, a shell command, a file path, HTML or a redirect (injection, path traversal, XSS).\n"
3892
+ " When one does not apply (e.g. no new endpoint), there is nothing to report for it."
3874
3893
  + (f" orch saw changes outside the milestone's Likely files: {', '.join(scope)}. Say whether each one was "
3875
3894
  "needed." if scope else "") + "\n"
3876
3895
  "2. `rules`: does it follow the project's own written rules: "
@@ -12653,6 +12672,12 @@ and the code around it.
12653
12672
  Answer two questions, separately:
12654
12673
  - `spec`: did it build what the task asks, no more and no less? Every acceptance criterion, correctness, security,
12655
12674
  edge cases, missing tests.
12675
+ - Security, check all three every time; each problem is a BLOCKER:
12676
+ - secrets: no API key, token, password or private key in code, config, tests, fixtures or logs;
12677
+ - authorization: every new or changed endpoint, action or query checks that the caller may do it (logged in, the
12678
+ right role, only their own data);
12679
+ - input validation: input from users, requests, files or other services is checked before it reaches a database
12680
+ query, a shell command, a file path, HTML or a redirect (injection, path traversal, XSS).
12656
12681
  - `rules`: does it follow the project's written rules: the task file's "Project rules" (coding rules file, decisions,
12657
12682
  words), or AGENTS.md / CLAUDE.md? Only written rules count; name the rule it breaks.
12658
12683
  Don't report what the check command (lint, types, tests) already catches.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "herdr-orchestra",
3
- "version": "6.47.0",
3
+ "version": "6.47.2",
4
4
  "description": "Orchestrate AI coding agents (Claude Code, Codex, OpenCode, Amp, Pi) as one team: a lead plans, coders build, a reviewer checks, you get one PR. Runs in Herdr panes, or in one Pi window with subagents.",
5
5
  "license": "MIT",
6
6
  "bin": {
package/playbooks/plan.md CHANGED
@@ -117,7 +117,7 @@ Then the run is the same as any run (`orch lead run`): the coder builds it, the
117
117
  - Your pane is named `lead` for you: `orch lead plan` did it (look for `NAMED` or `LEAD` at the top of its output). If it printed a rename command instead, run `orch lead whoami`, which shows YOUR pane, and run the rename command it prints. Never prompt your own pane.
118
118
  - Run `herdr agent list` and `orch agents` (which kinds exist here, their roles, and whether herdr can watch them).
119
119
  - **Coders** = the other agent panes the user wants coding (any kind with the `coder` role: claude, codex, amp, opencode, hermes, agy…). Name them `<kind>-1`, `<kind>-2`… with `herdr agent rename`, and always target them by name.
120
- - **Reviewer** = one spare agent the user picks (any kind, including another pane of your own tool), named `reviewer`. If there is none, use `Reviewer: none`.
120
+ - **Reviewer** = one spare agent the user picks (any kind, including another pane of your own tool), named `reviewer`. A full run always has one: if no spare pane is open, `orch team <your kind>` adds a reviewer pane. Only when the developer says they want no review, write `Reviewer: none (developer: <their reason>)`; a bare `Reviewer: none` is refused by `orch sync` (only a quick run may have no reviewer).
121
121
  - **Only you are open?** When `herdr agent list` shows no agent pane besides yours, build the team from your own tool: run `orch team <your kind>` (e.g. `orch team codex`). It picks coders and a reviewer of that tool on the models the catalog allows for it, spread over its tiers, and prints the `Workers:` and `Reviewer:` lines: put them in the plan. Their panes don't exist yet; `orch team up` opens them, each in its own folder and on its model, when the developer says go. Tell the developer in one line, e.g. "Only one agent window is open, so the team is 2 more Codex coders and a Codex reviewer; orch opens their windows when you say go." Use `--coders 1` when the feature is one milestone, `--models a,b` for the models the developer's tool really reaches, or another installed tool if the developer asks (`orch team claude`). Never open more panes than the plan needs.
122
122
  - You are never a coder or the reviewer in your own run. Another pane of the same kind as you is fine.
123
123
  - A pane herdr doesn't recognise as an agent (it isn't in `herdr agent list`) can still work: write it as `name (kind @pane:<pane id>)` in `Workers:`. `orch` then types prompts into that pane and relies only on its done file.
@@ -222,7 +222,7 @@ Budget: <e.g. 3h — optional>
222
222
  Estimate: <how long the whole feature should take, e.g. 1h30m>
223
223
  Lead: lead (<your kind>: <your model>)
224
224
  Workers: claude-1 (claude: sonnet), claude-2 (claude: haiku), codex-1 (codex: gpt-6.2-sol@low)
225
- Reviewer: reviewer (claude: opus) | none
225
+ Reviewer: reviewer (claude: opus) | none (developer: <why>)
226
226
 
227
227
  ## Global instructions
228
228
  <constraints for every milestone, e.g. the developer's "Must not" rules — or "none">
@@ -319,7 +319,7 @@ Rules for every milestone:
319
319
  - **Skills**: the project's skills that fit this milestone (`Skills: frontend-developer, test-driven-development`), by the names `orch onboard skills` prints. orch lists them in the coder's task file with what each is for. Leave the line out when none fits. Never a skill that runs the work itself (its own worktree, merging, helper agents): orch tells coders not to use those in a run, and `orch sync` warns.
320
320
  - **Prefer**: a worker kind or name from `Workers:` when a tool (not a model) suits the work better, otherwise `any`. A preference, not a lock; the tier comes first.
321
321
  - **Model**: never write it yourself. `orch plan model` writes `Model: <model>@<thinking>` when the developer picks a model for a milestone (step 10); it is a lock.
322
- - **Review**: `yes` for UI, API contracts, auth, payments and schema; `no` for mechanical milestones.
322
+ - **Review**: a full run reviews every milestone, whatever this line says (`Review: no` only gets a warning); write `yes`. Only a quick run uses `Review: no`. The reviewer always checks three security points (secrets in code or logs, authorization on every new or changed endpoint or action, validation of input before it reaches a query, shell, path, HTML or redirect); name the risky spots in `Context` so it knows where to look.
323
323
  - **Door**: most changes are easy to undo: if they are wrong, a revert fixes it and nobody is hurt. Write `Door: one-way (why)` only on a milestone that git can't take back once it runs: a migration that changes real data, a public API or event other apps or teams depend on, deleting data, sending emails or messages, charging money, publishing a package. Example: `Door: one-way (adds a column to orders, 2M rows in production)`. Such a milestone always waits for the developer's `orch approve` before it lands, even when no file looks risky, and its coder is asked for proof that it is safe (a dry run on a copy, a rollback test). Never mark everything one-way: the label tells the developer where to look hardest. orch measures how much each milestone could break by itself (risky files, how many milestones build on it, its size); you don't write that.
324
324
  - **ZERO GUESSWORK**: missing business rules, undefined data shapes, and auth or security trade-offs go under **Open questions** with 2–3 concrete options. `orch sync` marks such milestones `needs-answer`, and their dependents wait.
325
325
  - Each section must stand alone: autopilot hands it to the coder (without the lines only orch uses: `Depends on`, `Why separate`, `Prefer`, `Model`, `Tier`, `Needs`, `Model why`, `Estimate`, `Review`, `Parallel`, `Door`, `Side`, `Repo`; `Role` goes at the top as the coder's role, `Skills` in its own block with what each skill is for), together with the global instructions and the reports of merged dependencies.