herdr-orchestra 6.7.0 → 6.7.1

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,14 @@
2
2
 
3
3
  All notable changes. Versions follow [semantic versioning](https://semver.org).
4
4
 
5
+ ## [6.7.1] - 2026-11-23
6
+
7
+ Pi now gets everything from 6.6.0 without a manual step. Pi's `/orch-plan` already ran the same `orch lead plan`, so the lead there asks first, writes `Door:` lines and new glossary words like everywhere else; its task files already had the project rules and the proof request; and a hard-to-undo milestone was already held. What was missing: the reviewer and coder subagent files written by an older orch kept their old text until you re-ran `orch setup --mode subagent`. This also brings in the 6.7.0 agent text (descriptions that say "only for orch runs", the reviewer's `disallowed_tools`) with no step from you.
8
+
9
+ ### Fixed
10
+ - **Pi subagents refresh themselves.** In subagent mode, `orch lead run` and `orch sub next` rewrite `~/.pi/agent/agents/reviewer.md` and `coder.md` when orch wrote them and their text is from an older orch, so the reviewer asks the two questions (`[spec]` and `[rules: …]`) and the coder writes its `PROOF:` line. They print `UPDATED <file>` when they do. A file you edited yourself (the orch line removed) is never touched. Restart Pi if a subagent it already started should use the new text.
11
+ - Tests check that Pi's `orch-plan` skill stays the same as the main one, and run the 6.6.0 features in subagent mode.
12
+
5
13
  ## [6.7.0] - 2026-11-22
6
14
 
7
15
  The coder and reviewer agents now follow Claude Code's subagent guide (code.claude.com/docs/en/sub-agents): each agent does one job, has only the tools that job needs, and has a description that names exactly when to use it.
@@ -23,7 +31,7 @@ Example: you ask for "add discounts to orders". The lead reads the code and your
23
31
 
24
32
  ### Added
25
33
  - **House rules.** Optional files in your repo: `docs/glossary.md` (your words, and words to avoid: `- **Discount**: money off an order total. Avoid: coupon, promo`), `docs/adr/*.md` (decisions already made) and `docs/coding-standards.md`. Each coder's task file gets a short "Project rules" block: only the glossary words its milestone uses (orch matches the words, so a long glossary costs nothing extra), one line per decision, and where the coding rules are. task.json lists them under `project_rules`. The plan header `Docs: <folder>` names another folder.
26
- - **Two-question review.** The reviewer answers separately: `spec` (did it build what was asked, no more and no less? orch tells it which files changed outside Likely files) and `rules` (does it follow the repo's written rules? it names the rule). It is told not to report what the check command already catches. `review-N.json` findings get `axis` and `rule` (both optional: older reviews read as before). Blocker and suggestion lines carry `[spec]` or `[rules: <rule>]`. The summary has "Review findings: spec and rules" with the rules broken most often, and `orch report` (and `--json`) counts them. Pi subagent mode's reviewer gets the same two questions (run `orch setup --mode subagent` to refresh its agent file).
34
+ - **Two-question review.** The reviewer answers separately: `spec` (did it build what was asked, no more and no less? orch tells it which files changed outside Likely files) and `rules` (does it follow the repo's written rules? it names the rule). It is told not to report what the check command already catches. `review-N.json` findings get `axis` and `rule` (both optional: older reviews read as before). Blocker and suggestion lines carry `[spec]` or `[rules: <rule>]`. The summary has "Review findings: spec and rules" with the rules broken most often, and `orch report` (and `--json`) counts them. Pi subagent mode's reviewer gets the same two questions.
27
35
  - **Lead asks first.** Plan playbook step 2a: after research and before any plan, the lead asks what only you can decide, all in one message, each question with 2 or 3 choices and its own suggestion, then waits. No questions when the code settles everything. Start a request with `grill:` for one question at a time. Your answers go into the plan where they apply. The questions are kept in `.orchestrate/questions.md`, and `orch lead run` refuses to start a run from an older plan while they are unanswered (your answer is planning, not "go").
28
36
  - **New words and decisions get written down.** A plan can list `## Glossary additions`; the milestone that brings the word (or a hard-to-change decision, as `docs/adr/NNNN-*.md`) writes it, through an acceptance criterion. `orch sync` warns when the plan uses a word the glossary says to avoid, when a new word has no milestone with `docs/glossary.md` in its Likely files, and when an acceptance criterion names a glossary or decision file that is not in the milestone's Likely files. `orch plan show` lists the new words.
29
37
  - **Risky-change label.** `Door: one-way (why)` on a milestone that is hard to undo once it runs (a migration on real data, a public API others call, deleting data, sending emails). It always waits for your `orch approve`, even when no file looks risky, and its coder is asked for proof (`proof` in the result file, or a `PROOF:` report line). `Risk hold: off` still turns every hold off (`orch sync` warns). A quick run is never one-way (`orch sync` refuses it).
package/VERSION CHANGED
@@ -1 +1 @@
1
- 6.7.0
1
+ 6.7.1
Binary file
package/bin/orch CHANGED
@@ -6908,6 +6908,7 @@ def cmd_lead(args):
6908
6908
  label = f"{sub} ({part})" if part else sub
6909
6909
  subagent = current_mode()[0] == "subagent"
6910
6910
  if subagent and sub == "run":
6911
+ pi_agents_refresh()
6911
6912
  pb = asset("playbooks/subagent.md") or die("playbooks/subagent.md not found next to orch or in the install")
6912
6913
  label = "run (subagent mode)"
6913
6914
  print(f"herdr-orchestra {installed_version()} — lead playbook: {label}\n")
@@ -7821,6 +7822,30 @@ def pi_agent_text(role, conf):
7821
7822
  return "---\n" + "\n".join(fm) + "\n---\n\n" + PI_AGENT_MARK + "\n\n" + body
7822
7823
 
7823
7824
 
7825
+ def pi_agents_refresh():
7826
+ """Subagent mode: rewrite the coder.md / reviewer.md that orch wrote (they carry PI_AGENT_MARK) when this orch
7827
+ would write them differently, e.g. after an update changed the instructions. A file you edited is left alone,
7828
+ a missing one is left for `orch setup --mode subagent`, and a model the policy denies is never written."""
7829
+ conf = config_load().get("subagent") or {}
7830
+ conf = conf if isinstance(conf, dict) else {}
7831
+ cat = models_catalog()
7832
+ for role in ("coder", "reviewer"):
7833
+ rc = conf.get(role) if isinstance(conf.get(role), dict) else {}
7834
+ p = pi_agents_dir() / f"{role}.md"
7835
+ try:
7836
+ old = p.read_text() if p.exists() else None
7837
+ except OSError:
7838
+ continue
7839
+ if old is None or PI_AGENT_MARK not in old or model_denied(cat, str(rc.get("model") or "").lower() or None):
7840
+ continue
7841
+ text = pi_agent_text(role, rc)
7842
+ if old != text:
7843
+ with contextlib.suppress(OSError):
7844
+ p.write_text(text)
7845
+ print(f"UPDATED {short(p)}: the {role} subagent now has this orch's instructions "
7846
+ f"({installed_version()}); restart Pi if a subagent it already started should use them")
7847
+
7848
+
7824
7849
  def pi_setup():
7825
7850
  """Subagent mode: write ~/.pi/agent/agents/coder.md and reviewer.md from the config, and install pi-subagents.
7826
7851
  Returns the number of problems (0 = ready)."""
@@ -7995,6 +8020,7 @@ def cmd_sub(args):
7995
8020
  subagent_ready_or_die(st)
7996
8021
  coder = next(iter(st["workers"]), None) or die("the plan has no Workers line")
7997
8022
  if sub == "next":
8023
+ pi_agents_refresh() # an update may have changed what the coder and reviewer are told
7998
8024
  cur = [k for k in st["order"] if st["tasks"][k]["status"] in ("coding", "verifying")]
7999
8025
  if cur:
8000
8026
  tid = cur[0]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "herdr-orchestra",
3
- "version": "6.7.0",
3
+ "version": "6.7.1",
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": {