herdr-orchestra 6.28.0 → 6.29.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 +18 -0
- package/VERSION +1 -1
- package/bin/__pycache__/orchcpython-314.pyc +0 -0
- package/bin/orch +116 -0
- package/package.json +1 -1
- package/playbooks/plan.md +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes. Versions follow [semantic versioning](https://semver.org).
|
|
4
4
|
|
|
5
|
+
## [6.29.0] - 2026-11-27
|
|
6
|
+
|
|
7
|
+
The lead now knows its own question picker by name, so /orch-plan's questions open as a click list in every agent that has one. Before, the playbook only said "Antigravity's own picker" and showed a plain-text example, so an Antigravity lead asked its questions (and "Keep this team?") as numbered text you had to answer by typing.
|
|
8
|
+
|
|
9
|
+
Example: you start `/orch-plan` in Antigravity. `orch lead plan` now begins with `QUESTION PICKER you are Antigravity: ask ... with your built-in ask_question tool`, and the questions (where Goals live, storage, team) open as a numbered list you pick with the arrow keys, its suggestion first, with "Write-in..." for your own answer. The same goes for "Keep this team?", "Which step?" and "Which model?" after the plan.
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
- **`orch lead plan` names the lead's picker.** It finds which agent leads (its shell marks, or the kind herdr reports for the pane, which is how it finds Antigravity) and prints one `QUESTION PICKER` line: `AskUserQuestion` (Claude Code), `ask_question` (Antigravity), `request_user_input` (Codex), `orch_ask` (Pi), `question` (OpenCode), with each tool's limits. An agent with no known picker is told to ask in chat. When orch can't tell the agent, the line lists every name.
|
|
13
|
+
- **Codex: orch checks whether the picker is on.** Codex refuses `request_user_input` outside Plan mode ("request_user_input is unavailable in Default mode") unless `default_mode_request_user_input` is on. orch already turns it on for a lead it opens. Now `orch lead plan` reads `~/.codex/config.toml` and, where Codex's sandbox shows it, the command that started this Codex. On: use the picker. Off (a Codex you opened yourself): ask in chat, and tell you how to get the picker (`orch team codex`, or `default_mode_request_user_input = true` under `[features]` in `~/.codex/config.toml`). Can't tell (Codex's Linux sandbox hides its own process): try the tool once, and fall back to chat if it is refused.
|
|
14
|
+
- **Pi without orch's package** is told to ask in chat and to suggest `pi install npm:herdr-orchestra`.
|
|
15
|
+
- The plan playbook points to the `QUESTION PICKER` line, names `ask_question` for Antigravity, says never to write the choices as plain text when a picker exists, and counts Codex's "unavailable in Default mode" as "no picker". "Keep this team?" uses the same picker.
|
|
16
|
+
|
|
17
|
+
### Checked
|
|
18
|
+
- Claude Code 2.1.332, Codex 0.172.0 and Pi 1.7.0 were started for real, with a fake model that calls each picker tool. Claude Code (in the lead's `acceptEdits` mode): the picker opened and the answer came back. Codex with orch's lead flag: the picker opened and the answer came back. Codex opened without it: the tool is listed but answers "unavailable in Default mode". Pi with orch's extension: `orch_ask` opened and saved `.orchestrate/questions.md`.
|
|
19
|
+
|
|
20
|
+
### Not yet tried
|
|
21
|
+
- **Antigravity was not run** (its download is blocked where this was built). The tool name `ask_question` comes from Antigravity's `/grill-me` docs and from other projects that show its questions (agy 1.5.x). Please try one `/orch-plan` with a question in Antigravity.
|
|
22
|
+
|
|
5
23
|
## [6.28.0] - 2026-11-27
|
|
6
24
|
|
|
7
25
|
### Changed
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
6.
|
|
1
|
+
6.29.0
|
|
Binary file
|
package/bin/orch
CHANGED
|
@@ -8731,6 +8731,8 @@ def cmd_lead(args):
|
|
|
8731
8731
|
if not part and not subagent:
|
|
8732
8732
|
lead_self_name()
|
|
8733
8733
|
guard_ensure(say_changes=False) # no agent pushes to main: the repo refuses it from the start
|
|
8734
|
+
if sub == "plan" and not part:
|
|
8735
|
+
print(picker_note(lead_kind()), end="")
|
|
8734
8736
|
if subagent and sub == "plan":
|
|
8735
8737
|
print(SUBAGENT_PLAN_NOTE, end="")
|
|
8736
8738
|
print(plan_playbook_part(pb.read_text(), part) if sub == "plan" else pb.read_text(), end="")
|
|
@@ -9717,6 +9719,120 @@ def asked_before_plan():
|
|
|
9717
9719
|
return False
|
|
9718
9720
|
|
|
9719
9721
|
|
|
9722
|
+
CODEX_PICKER_FEATURE = "default_mode_request_user_input"
|
|
9723
|
+
|
|
9724
|
+
|
|
9725
|
+
def lead_kind():
|
|
9726
|
+
"""The lead's agent kind for `orch lead plan`: `--agent` / ORCH_AGENT / the agent's own shell marks first
|
|
9727
|
+
(calling_agent), else the kind herdr reports for this pane (Antigravity leaves no mark orch knows in its shell,
|
|
9728
|
+
but herdr detects it). None when neither can tell."""
|
|
9729
|
+
kind = calling_agent()
|
|
9730
|
+
if not kind and os.environ.get("HERDR_PANE_ID"):
|
|
9731
|
+
with contextlib.suppress(Exception):
|
|
9732
|
+
kind = ((herdr_panes() or {}).get(os.environ["HERDR_PANE_ID"]) or {}).get("kind")
|
|
9733
|
+
names = {"antigravity": "agy", "gemini": "agy", "claude-code": "claude", "claude_code": "claude"}
|
|
9734
|
+
return names.get(kind, kind) if kind else None
|
|
9735
|
+
|
|
9736
|
+
|
|
9737
|
+
def _ancestor_args():
|
|
9738
|
+
"""The command lines of the processes above this one (parent first, at most 12), from `ps` (Linux and macOS).
|
|
9739
|
+
[] when ps is missing or fails."""
|
|
9740
|
+
out, pid = [], os.getppid()
|
|
9741
|
+
for _ in range(12):
|
|
9742
|
+
if pid <= 1:
|
|
9743
|
+
break
|
|
9744
|
+
try:
|
|
9745
|
+
r = subprocess.run(["ps", "-o", "ppid=,command=", "-p", str(pid)], text=True, capture_output=True,
|
|
9746
|
+
timeout=5)
|
|
9747
|
+
except (OSError, subprocess.TimeoutExpired):
|
|
9748
|
+
break
|
|
9749
|
+
line = r.stdout.strip()
|
|
9750
|
+
if r.returncode != 0 or not line:
|
|
9751
|
+
break
|
|
9752
|
+
ppid, _, cmd = line.partition(" ")
|
|
9753
|
+
out.append(cmd.strip())
|
|
9754
|
+
try:
|
|
9755
|
+
pid = int(ppid)
|
|
9756
|
+
except ValueError:
|
|
9757
|
+
break
|
|
9758
|
+
return out
|
|
9759
|
+
|
|
9760
|
+
|
|
9761
|
+
def codex_picker_state():
|
|
9762
|
+
"""(state, where) for Codex's question picker (request_user_input): state is "on", "off" or "unknown". Codex
|
|
9763
|
+
refuses the tool outside Plan mode ("request_user_input is unavailable in Default mode", checked with codex-cli
|
|
9764
|
+
0.172) unless the feature default_mode_request_user_input is on: in ~/.codex/config.toml ([features] <f> = true)
|
|
9765
|
+
or in the command that started this Codex (`-c features.<f>=true` or `--enable <f>`, which orch adds to a lead
|
|
9766
|
+
it opens). That command is only visible when Codex's sandbox shows its own process (macOS, or no sandbox); in
|
|
9767
|
+
the Linux sandbox it is hidden, so the answer is "unknown" and the lead tries the tool once."""
|
|
9768
|
+
feat = re.escape(CODEX_PICKER_FEATURE)
|
|
9769
|
+
cfg = Path(os.environ.get("CODEX_HOME") or Path.home() / ".codex") / "config.toml"
|
|
9770
|
+
with contextlib.suppress(Exception):
|
|
9771
|
+
import tomllib
|
|
9772
|
+
if (tomllib.loads(cfg.read_text()).get("features") or {}).get(CODEX_PICKER_FEATURE) is True:
|
|
9773
|
+
return "on", f"turned on in {str(cfg).replace(str(Path.home()), '~', 1)}"
|
|
9774
|
+
for cmd in _ancestor_args():
|
|
9775
|
+
try:
|
|
9776
|
+
toks = shlex.split(cmd)
|
|
9777
|
+
except ValueError:
|
|
9778
|
+
toks = cmd.split()
|
|
9779
|
+
if not any(os.path.basename(t) in ("codex", "codex.js") for t in toks[:3]):
|
|
9780
|
+
continue
|
|
9781
|
+
if re.search(rf"--enable[= ]{feat}\b|features\.{feat}\s*=\s*true", cmd) \
|
|
9782
|
+
and not re.search(rf"--disable[= ]{feat}\b|features\.{feat}\s*=\s*false", cmd):
|
|
9783
|
+
return "on", "turned on in the command that started this Codex"
|
|
9784
|
+
return "off", "this Codex was started without it, and ~/.codex/config.toml does not turn it on"
|
|
9785
|
+
return "unknown", "orch can't see how this Codex was started"
|
|
9786
|
+
|
|
9787
|
+
|
|
9788
|
+
def picker_note(kind):
|
|
9789
|
+
"""The first lines of `orch lead plan`: this lead's own question picker by its exact tool name (step 2a), or
|
|
9790
|
+
that it has none and asks in chat. Each name and limit was checked against the tool itself (see CHANGELOG
|
|
9791
|
+
6.29.0); a lead orch can't identify gets the list of all of them."""
|
|
9792
|
+
head = "QUESTION PICKER "
|
|
9793
|
+
tail = ("Use it for every question while you plan: step 2a, `grill:`, and \"Keep this team?\" / \"Which step?\" "
|
|
9794
|
+
"/ \"Which model?\" after the plan. If the tool is missing or refuses (an error such as \"unavailable\", \"not found\" or \"no_ui\"), ask "
|
|
9795
|
+
"in chat instead (step 2a, point 3) and say why in one line.\n\n")
|
|
9796
|
+
if kind == "claude":
|
|
9797
|
+
return (f"{head}you are Claude Code: ask step 2a's questions with your `AskUserQuestion` tool (1 to 4 "
|
|
9798
|
+
f"questions per call, 2 to 4 choices each, your suggestion first with \"(Recommended)\" in its "
|
|
9799
|
+
f"label; Claude Code adds the typed answer itself). " + tail)
|
|
9800
|
+
if kind == "codex":
|
|
9801
|
+
state, where = codex_picker_state()
|
|
9802
|
+
how = (f"\"For a click picker next time, let orch open the lead (`orch team codex`), or put "
|
|
9803
|
+
f"`{CODEX_PICKER_FEATURE} = true` under `[features]` in ~/.codex/config.toml and restart Codex.\"")
|
|
9804
|
+
use = (f"`request_user_input` tool (1 to 3 questions per call, 2 or 3 choices each, your suggestion first "
|
|
9805
|
+
f"with \"(Recommended)\" in its label, no \"Other\" choice: Codex adds one)")
|
|
9806
|
+
if state == "on":
|
|
9807
|
+
return f"{head}you are Codex and its picker is on ({where}): ask with your {use}. " + tail
|
|
9808
|
+
if state == "off":
|
|
9809
|
+
return (f"{head}OFF: you are Codex and its picker is off ({where}), so `request_user_input` would only "
|
|
9810
|
+
f"answer \"unavailable in Default mode\". Ask your planning questions in chat (step 2a, point 3), "
|
|
9811
|
+
f"and add one line for the developer: {how}\n\n")
|
|
9812
|
+
return (f"{head}you are Codex ({where}): try your {use} once. If it answers \"unavailable in Default "
|
|
9813
|
+
f"mode\", the picker is off: ask in chat (step 2a, point 3), don't try it again this plan, and add one "
|
|
9814
|
+
f"line for the developer: {how} " + tail)
|
|
9815
|
+
if kind == "agy":
|
|
9816
|
+
return (f"{head}you are Antigravity: ask step 2a's questions with your built-in `ask_question` tool (the one "
|
|
9817
|
+
f"/grill-me uses: a numbered list of choices in the terminal, your suggestion first, plus "
|
|
9818
|
+
f"\"Write-in...\" for a typed answer). Do not write the choices as plain text when you have this "
|
|
9819
|
+
f"tool. " + tail)
|
|
9820
|
+
if kind == "pi":
|
|
9821
|
+
return (f"{head}you are Pi: ask step 2a's questions with the `orch_ask` tool (from orch's Pi package; it "
|
|
9822
|
+
f"saves .orchestrate/questions.md itself). No `orch_ask` tool: the package is missing, so ask in "
|
|
9823
|
+
f"chat and add one line for the developer: \"For a click picker, run `pi install "
|
|
9824
|
+
f"npm:herdr-orchestra` and restart Pi.\" " + tail)
|
|
9825
|
+
if kind == "opencode":
|
|
9826
|
+
return f"{head}you are OpenCode: ask step 2a's questions with your `question` tool. " + tail
|
|
9827
|
+
if kind:
|
|
9828
|
+
return (f"{head}you are {kind}, and orch knows no question picker for it: ask your planning questions in "
|
|
9829
|
+
f"chat (step 2a, point 3). If you do have a tool that shows the developer clickable choices, use it "
|
|
9830
|
+
f"instead.\n\n")
|
|
9831
|
+
return (f"{head}orch can't tell which agent you are. Use your own picker "
|
|
9832
|
+
f"tool if you have one: `AskUserQuestion` (Claude Code), `request_user_input` (Codex), `ask_question` "
|
|
9833
|
+
f"(Antigravity), `orch_ask` (Pi), `question` (OpenCode). " + tail)
|
|
9834
|
+
|
|
9835
|
+
|
|
9720
9836
|
def _repo_state_path():
|
|
9721
9837
|
""".orchestrate/state.json of the repo this shell is in, or None (outside a repo, or no run yet)."""
|
|
9722
9838
|
r = git("rev-parse", "--path-format=absolute", "--git-common-dir", check=False)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "herdr-orchestra",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.29.0",
|
|
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
|
@@ -39,9 +39,9 @@ A wrong guess in the plan is the most expensive mistake in a run: every coder bu
|
|
|
39
39
|
- From your research, list what the code, the docs and the request do NOT settle: business rules ("can a discount bring the total to zero?"), data shapes nobody has defined, auth or security trade-offs, which of two existing patterns to follow, a change to a decision record. Not questions the code answers: look those up yourself.
|
|
40
40
|
- **Nothing to ask?** Go straight on to step 2b. Don't invent questions.
|
|
41
41
|
- **Something to ask?** Use the **native question rule**: put all the questions in front of the developer at once, each with 2 or 3 concrete choices and your own suggestion and why (from what you found).
|
|
42
|
-
1. **You have a question picker: use it.**
|
|
42
|
+
1. **You have a question picker: use it.** The `QUESTION PICKER` line at the top of this playbook names yours: `AskUserQuestion` in Claude Code, `request_user_input` in Codex (only when its picker is turned on; orch turns it on for a Codex lead it opens), `ask_question` in Antigravity (the tool `/grill-me` uses), `orch_ask` in Pi (from orch's Pi package), `question` in OpenCode. Never write the choices as plain text when you have a picker: the developer then has to type `1 a, 2 b` instead of clicking. Choices `(a)`, `(b)`, `(c)`, your suggestion marked recommended (or labelled `(recommended)`), a custom answer allowed. A picker that takes fewer questions than you have (Claude Code takes 4 at a time): ask in two rounds. When the answers come back, write the questions with their choices and the answers under `## Answers` in `.orchestrate/questions.md` (`orch_ask` saves the file itself), then go straight on: no extra message, no waiting.
|
|
43
43
|
2. **The developer closed the picker without answering** (Escape, `cancelled`): don't guess and don't plan. Say "Planning is paused until you answer these. Say when you are ready, or answer in chat." and **STOP**.
|
|
44
|
-
3. **No picker, or it can't show here** (headless, `no_ui`, the tool is refused): write the questions to `.orchestrate/questions.md` and show the developer the same text, **all in one message**: one line each, numbered. End with: "Answer by number (for example `1 a, 2 both, 3 no`). I write the plan after your answers; nothing runs until you say go." Then **STOP** and wait.
|
|
44
|
+
3. **No picker, or it can't show here** (the `QUESTION PICKER` line says OFF, headless, `no_ui`, the tool is missing or refused, e.g. Codex's "unavailable in Default mode"): write the questions to `.orchestrate/questions.md` and show the developer the same text, **all in one message**: one line each, numbered. End with: "Answer by number (for example `1 a, 2 both, 3 no`). I write the plan after your answers; nothing runs until you say go." Then **STOP** and wait.
|
|
45
45
|
Example (the chat form; a picker shows the same question and choices, one at a time):
|
|
46
46
|
```
|
|
47
47
|
Before I plan, 3 questions:
|
|
@@ -328,7 +328,7 @@ Rules for every milestone:
|
|
|
328
328
|
<!-- quick: Let the developer choose the models (from step 10) -->
|
|
329
329
|
**Let the developer choose the models.** Only now, after the developer has seen the whole plan in your chat; never while you are still researching or planning.
|
|
330
330
|
1. Run `orch plan team` and show its table as it is: each milestone and the reviewer, its coder, model and thinking level, and whether the developer chose it. When it prints `SUBAGENT MODE`, skip this block.
|
|
331
|
-
2. Ask one question, in your question picker when you have one (
|
|
331
|
+
2. Ask one question, in your question picker when you have one (the tool the `QUESTION PICKER` line at the top of `orch lead plan` named, e.g. `ask_question` in Antigravity): "Keep this team?" with (a) Keep it (recommended), (b) Change a step, (c) Change the reviewer. No picker, or it can't show here: after the table write "Type **ok** to keep it, or what to change, for example `M3 sol low` or `reviewer luna high`." and **STOP** until they answer.
|
|
332
332
|
3. Change a step: ask one question at a time, each in the picker: "Which step?" (the milestones), then "Which model?" (the models on the table's `You can pick` line), then "Which thinking?" (its thinking levels). Change the reviewer: the same, without "Which step?". Never offer a model the `Never allowed` line names. Then run `orch plan model <Mn> <model>@<thinking>` (or `orch plan model reviewer <model>@<thinking>`). A typed answer means the same: in `M3 sol low`, `sol` is the model on the `You can pick` line whose name has that word (`gpt-6.2-sol`), so run `orch plan model M3 gpt-6.2-sol@low`. When a word fits two models or none, ask which one.
|
|
333
333
|
4. Tell the developer in one line what the command said (the step is locked to that model; a new coder joins when no coder ran it, and `orch team up` opens its panel when the run starts), then run `orch plan team` again, show the table and ask "Keep this team?" again, until they keep it.
|
|
334
334
|
The developer's choice is a lock: orch gives that step only to a coder on that model, and you never change it yourself (no `--to` a coder on another model, no `--tier`, no `orch escalate` for it: orch refuses them). Only the developer changes it, now or later in the run (`orch lead run` says how).
|