herdr-orchestra 6.24.0 → 6.27.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 +32 -0
- package/README.md +1 -1
- package/VERSION +1 -1
- package/agents.default.toml +3 -0
- package/bin/__pycache__/orchcpython-314.pyc +0 -0
- package/bin/orch +264 -11
- package/extensions/orch-mode.ts +35 -0
- package/package.json +1 -1
- package/playbooks/plan.md +13 -4
- package/playbooks/run.md +3 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,38 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes. Versions follow [semantic versioning](https://semver.org).
|
|
4
4
|
|
|
5
|
+
## [6.27.0] - 2026-11-27
|
|
6
|
+
|
|
7
|
+
`/orch-board` in Pi: open the run board without leaving Pi.
|
|
8
|
+
|
|
9
|
+
Example: you lead a run from Pi, inside herdr. Type `/orch-board` and the board opens as a popup in the repo you are in, the same popup the board key (`prefix+a`) opens. Close it with `q`. In a plain terminal (no herdr), `/orch-board` starts `orch view` in the background and shows its address, `http://127.0.0.1:...`.
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
- **`/orch-board`** (Pi). Inside herdr it opens the board popup with `--cwd` set to your repo. If herdr refuses (for example the plugin is not linked) it says why, points to `orch view plugin link`, and opens the browser page instead. Without herdr, or without the `orch` command, it says what to do (`/orch-setup`).
|
|
13
|
+
- Subagent mode needed no change: `orch sub` already records each milestone's start and finish in `state.json`, so the board and `orch view` show them as in panes mode.
|
|
14
|
+
|
|
15
|
+
### Not yet tried
|
|
16
|
+
- With a real Pi window and real herdr: tested with a stand-in for Pi's API and a fake `herdr` command.
|
|
17
|
+
## [6.25.0] - 2026-11-27
|
|
18
|
+
|
|
19
|
+
You choose the model and thinking level of each milestone and of the reviewer, right after the plan. Before, a milestone only had a level (small, medium, high) and went to any coder of that level; to change a model you edited `Workers:` in plan.md by hand, and nothing stopped orch from moving the milestone to another model later.
|
|
20
|
+
|
|
21
|
+
Example: after `/orch-plan` shows the plan, the lead shows the team table (M1 codex-2 gpt-6.2-sol medium, M2 codex-1 gpt-6-luna high, Reviewer gpt-6.2-sol medium) and asks "Keep this team?". You pick "Change a step", then M2, gpt-6.2-sol, low. The lead runs `orch plan model M2 gpt-6.2-sol@low`: M2 is locked to Sol on low thinking, no coder ran that, so `codex-3 (codex: gpt-6.2-sol@low)` joins the team and `orch team up` opens its panel when you say go. Later, "M2 use luna high" in the lead's chat changes it again.
|
|
22
|
+
|
|
23
|
+
### Added
|
|
24
|
+
- `orch plan team`: one row per milestone and one for the reviewer, with its coder, model, thinking level and whether you chose it; then the models and thinking levels you can pick (your tool's own list, from `codex debug models` for Codex) and the ones never allowed.
|
|
25
|
+
- `orch plan model <Mn|reviewer> <model>@<thinking>` (also `M3 gpt-6.2-sol low`): writes `Model:` on the milestone, or the model on the `Reviewer:` line. A new coder joins `Workers` when none runs that model. `auto` takes a milestone's lock off. It refuses a model the policy blocks (Astra) and a thinking level the tool doesn't have, and says what to do when the milestone is already being built or has landed, or the reviewer's panel is open on the old model.
|
|
26
|
+
- The plan playbook: only after the plan is shown (full and quick runs), the lead shows the table and asks "Keep this team?" in its question picker, then one question at a time: which step, which model, which thinking. Without a picker the developer types `ok` or `M3 sol low`.
|
|
27
|
+
- Registry key `efforts`: the thinking levels a tool accepts (Codex: low, medium, high, xhigh, max).
|
|
28
|
+
|
|
29
|
+
### Changed
|
|
30
|
+
- A milestone with `Model:` is a lock: only coders on exactly that model take it. orch never moves it to another model by itself: `orch escalate` says NO_ESCALATION, and `orch dispatch --to` a coder on another model or `--tier` is refused. The run playbook has a hard rule for the lead: the developer's model choices stay until the developer changes them.
|
|
31
|
+
- `orch sync` stops when a `Model:` line names a model no coder in `Workers` runs (and names the command that adds one), or a blocked model.
|
|
32
|
+
- `orch plan show` says "locked by you to <model>" on a locked milestone's card.
|
|
33
|
+
|
|
34
|
+
### Not yet tried
|
|
35
|
+
- With a real lead's question picker and real Codex panels: tested with orch's simulated agents.
|
|
36
|
+
|
|
5
37
|
## [6.24.0] - 2026-11-27
|
|
6
38
|
|
|
7
39
|
Frontend and backend, in one repo or in two. Before, a run belonged to the one git repo you started it in: frontend and backend in separate repos could not be one run, two runs side by side both called their agents `codex-1`, and in a monorepo every milestone waited for the whole repo's tests.
|
package/README.md
CHANGED
|
@@ -282,7 +282,7 @@ pi install npm:herdr-orchestra
|
|
|
282
282
|
|
|
283
283
|
You can also install it straight from GitHub (same files, no npm needed): `pi install git:github.com/arunnarangali/herdr-orchestra` (add `@vX.Y.Z` to pin a release). Step-by-step setup: the [Pi page](https://herdr-orchestra.vercel.app/docs/pi/) of the docs.
|
|
284
284
|
|
|
285
|
-
Pi then has the `orch-plan`, `orch-run` and `orch-explain` skills and
|
|
285
|
+
Pi then has the `orch-plan`, `orch-run` and `orch-explain` skills and three commands (`/orch-setup`, `/orch-mode`, and `/orch-board`, which opens the run board). The first time, Pi says the `orch` command is missing (or older than the package): type `/orch-setup` once and it runs this package's installer. Pi may warn once that `orch-plan` / `orch-run` were found twice (the installer also puts them in `~/.agents/skills` for Codex, Amp and OpenCode); it keeps one copy and works.
|
|
286
286
|
|
|
287
287
|
Runs have two modes. Nothing changes for anyone who never picks the second one.
|
|
288
288
|
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
6.
|
|
1
|
+
6.27.0
|
package/agents.default.toml
CHANGED
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
# out when the tool has none or it is unverified, and choose the model inside the tool
|
|
11
11
|
# effort_flag the launch option that sets how hard the model thinks, with {effort} where the level goes. A model
|
|
12
12
|
# id written `<model>@<level>` (e.g. gpt-6.2-sol@low) starts on <model> with this option
|
|
13
|
+
# efforts the thinking levels the tool accepts, in order; `orch plan team` offers them and `orch plan model`
|
|
14
|
+
# refuses any other
|
|
13
15
|
# lead_flags optional: options added only to the LEAD's start command (`orch team <kind>`, `orch agents launch
|
|
14
16
|
# <kind> --role lead`), never to coders or the reviewer, whose panes run unattended
|
|
15
17
|
# launch_needs parts the launch command must keep for orch to work in that tool; `orch doctor` says when your
|
|
@@ -72,6 +74,7 @@ launch_needs = ["sandbox_workspace_write.network_access=true", "sandbox_workspac
|
|
|
72
74
|
lead_flags = "-c features.default_mode_request_user_input=true"
|
|
73
75
|
model_flag = "--model"
|
|
74
76
|
effort_flag = "-c model_reasoning_effort={effort}"
|
|
77
|
+
efforts = ["low", "medium", "high", "xhigh", "max"]
|
|
75
78
|
herdr_detect = true
|
|
76
79
|
interrupt_keys = ["esc"]
|
|
77
80
|
compact = "/compact"
|
|
Binary file
|
package/bin/orch
CHANGED
|
@@ -932,6 +932,8 @@ def eligible_workers(st, t):
|
|
|
932
932
|
team reaches the tier, the strongest workers the team has, so a run never waits for a model nobody started."""
|
|
933
933
|
if t.get("assign") in st["workers"] and not st["workers"][t["assign"]].get("off"):
|
|
934
934
|
return [t["assign"]]
|
|
935
|
+
if t.get("model"): # `Model:` in plan.md: the developer chose this model, orch never picks another
|
|
936
|
+
return [n for n, w in st["workers"].items() if not w.get("off") and (w.get("model") or "") == t["model"]]
|
|
935
937
|
need = need_rank(t)
|
|
936
938
|
ranks = {n: rank(w.get("tier")) for n, w in st["workers"].items() if not w.get("off")} # `orch bench <w> off`
|
|
937
939
|
if not ranks:
|
|
@@ -1547,6 +1549,20 @@ def cmd_sync(args):
|
|
|
1547
1549
|
and rank(tier_of(reviewer)) < rank(tv)):
|
|
1548
1550
|
warns.append(f"{tid} is {tv}-tier work reviewed by a {tier_of(reviewer)}-tier model ({models[reviewer]}) — "
|
|
1549
1551
|
f"a reviewer weaker than the coder misses design errors")
|
|
1552
|
+
# `Model: gpt-6.2-sol@low` on a milestone: the developer locked it to coders running exactly that model
|
|
1553
|
+
locks = {}
|
|
1554
|
+
for t in tasks:
|
|
1555
|
+
mv = (field(t, "model").split() or [""])[0].strip("`").lower()
|
|
1556
|
+
if not mv or mv in ("any", "auto", "none"):
|
|
1557
|
+
continue
|
|
1558
|
+
locks[t["id"]] = mv
|
|
1559
|
+
why = model_denied(cat, mv)
|
|
1560
|
+
if why:
|
|
1561
|
+
errors.append(f"{t['id']} has `Model: {mv}`, which the model policy does not allow (pattern {why!r}) — "
|
|
1562
|
+
f"pick another model (`orch plan team` lists them)")
|
|
1563
|
+
elif t["enabled"] and not any(models.get(n) == mv for n in workers):
|
|
1564
|
+
errors.append(f"{t['id']} has `Model: {mv}`, but no coder in Workers runs {mv} — "
|
|
1565
|
+
f"`orch plan model {t['id']} {mv}` adds one, or `orch plan model {t['id']} auto` unlocks it")
|
|
1550
1566
|
if lead and models.get(lead[0]) and rank(tier_of(lead[0])) not in (0, 3):
|
|
1551
1567
|
warns.append(f"the lead runs {models[lead[0]]!r} ({tier_of(lead[0])} tier) — planning and coordination are "
|
|
1552
1568
|
f"high-tier work")
|
|
@@ -1763,6 +1779,7 @@ def cmd_sync(args):
|
|
|
1763
1779
|
"files": sorted(files[tid]),
|
|
1764
1780
|
"parallel": field(t, "parallel", "").lower().startswith("allow"),
|
|
1765
1781
|
"tier": tiers[tid], "needs": needs[tid], "model_why": field(t, "model why"), "role": field(t, "role"),
|
|
1782
|
+
"model": locks.get(tid), # locked by the developer: only coders on this model take it
|
|
1766
1783
|
"estimate_s": estimates[tid],
|
|
1767
1784
|
# for the developer (`orch plan show`): the milestone in plain words, and the plan's own reasons
|
|
1768
1785
|
"plain": field(t, "plain"), "why_sep": field(t, "why separate"), "deps_text": field(t, "depends on"),
|
|
@@ -2784,14 +2801,8 @@ def cmd_pick(args):
|
|
|
2784
2801
|
need(args, 1, "pick <Mn>")
|
|
2785
2802
|
st = load()
|
|
2786
2803
|
t = task(st, args[0])
|
|
2787
|
-
pref = t["prefer"]
|
|
2788
|
-
names = eligible_workers(st, t)
|
|
2789
|
-
last = t.get("last_worker")
|
|
2790
|
-
nr = need_rank(t)
|
|
2791
2804
|
# the last coder first (its work is in its folder), then the tier asked for before a stronger (dearer) one
|
|
2792
|
-
|
|
2793
|
-
if nr else 0, 0 if pref in ("any", st["workers"][n]["kind"], n) else 1))
|
|
2794
|
-
for n in names:
|
|
2805
|
+
for n in pick_order(st, t):
|
|
2795
2806
|
if worker_free(st, n, st["workers"][n]):
|
|
2796
2807
|
print(n)
|
|
2797
2808
|
return
|
|
@@ -4393,7 +4404,7 @@ WORKER_RULES = """## Rules for you (the coder)
|
|
|
4393
4404
|
|
|
4394
4405
|
|
|
4395
4406
|
# plan.md lines that are for the lead and orch, not the coder: they stay in plan.md and task.json
|
|
4396
|
-
LEAD_ONLY_FIELDS = {"depends on", "why separate", "prefer", "tier", "needs", "model why", "estimate", "role", "door",
|
|
4407
|
+
LEAD_ONLY_FIELDS = {"depends on", "why separate", "prefer", "model", "tier", "needs", "model why", "estimate", "role", "door",
|
|
4397
4408
|
"review", "parallel", "plain", "side", "repo"}
|
|
4398
4409
|
|
|
4399
4410
|
|
|
@@ -4583,6 +4594,14 @@ def cmd_dispatch(args):
|
|
|
4583
4594
|
die("--tier must be small, medium or high")
|
|
4584
4595
|
for tid in args:
|
|
4585
4596
|
t = task(st, tid)
|
|
4597
|
+
lock = t.get("model")
|
|
4598
|
+
if lock and opts.get("--to") and (st["workers"][opts["--to"]].get("model") or "") != lock:
|
|
4599
|
+
die(f"{tid} is locked to {lock} by the developer, and {opts['--to']} runs "
|
|
4600
|
+
f"{st['workers'][opts['--to']].get('model') or 'another model'}. Only the developer changes the "
|
|
4601
|
+
f"lock: when they ask, `orch plan model {tid} <model>`")
|
|
4602
|
+
if lock and opts.get("--tier"):
|
|
4603
|
+
die(f"{tid} is locked to {lock} by the developer, so --tier does not apply. Only the developer "
|
|
4604
|
+
f"changes the lock: when they ask, `orch plan model {tid} <model>`")
|
|
4586
4605
|
if t["status"] not in ("pending", "paused", "failed"):
|
|
4587
4606
|
die(f"{tid} is {t['status']} — only pending, paused or failed milestones can be dispatched"
|
|
4588
4607
|
+ (" (answer its open questions in plan.md, then `orch sync`)" if t["status"] == "needs-answer" else ""))
|
|
@@ -4947,12 +4966,237 @@ def plan_steps(st, tids):
|
|
|
4947
4966
|
return [[t for t in tids if level[t] == n] for n in range(1, max(level.values(), default=0) + 1)]
|
|
4948
4967
|
|
|
4949
4968
|
|
|
4969
|
+
PLAN_USAGE = ("usage: orch plan show | orch plan team | orch plan model <Mn|reviewer> <model>[@<thinking>] "
|
|
4970
|
+
"(or `<model> <thinking>`; `auto` unlocks a milestone)")
|
|
4971
|
+
|
|
4972
|
+
|
|
4973
|
+
def pick_order(st, t):
|
|
4974
|
+
"""The coders that may take t, in the order `orch pick` tries them (free or not): its last coder, then the
|
|
4975
|
+
closest tier, then its Prefer."""
|
|
4976
|
+
pref, last, nr = t.get("prefer") or "any", t.get("last_worker"), need_rank(t)
|
|
4977
|
+
names = eligible_workers(st, t)
|
|
4978
|
+
names.sort(key=lambda n: (0 if n == last else 1, (rank(st["workers"][n].get("tier")) or nr) - nr
|
|
4979
|
+
if nr else 0, 0 if pref in ("any", st["workers"][n]["kind"], n) else 1))
|
|
4980
|
+
return names
|
|
4981
|
+
|
|
4982
|
+
|
|
4983
|
+
def model_choices(kind):
|
|
4984
|
+
"""(models, thinking levels) a developer can pick for an agent of `kind`: the models the tool itself lists
|
|
4985
|
+
(`codex debug models`) when orch asked it, else the catalog's. The policy's denied models never show."""
|
|
4986
|
+
cat = models_catalog() or {}
|
|
4987
|
+
reg = (registry(required=False) or {}).get(kind) or {}
|
|
4988
|
+
models = []
|
|
4989
|
+
cfg = (cat.get("discover") or {}).get(kind) or {}
|
|
4990
|
+
if (cat.get("found") or {}).get(kind) and cfg.get("cmd"):
|
|
4991
|
+
rows = _tool_models(kind, cfg["cmd"]) or []
|
|
4992
|
+
models = [m["slug"].lower() for m in rows if m.get("visibility") != "hide" and not m.get("upgrade")
|
|
4993
|
+
and not LEGACY_RE.search(m.get("description") or "")]
|
|
4994
|
+
if not models:
|
|
4995
|
+
models = [split_effort(mid)[0] for mid, m in (cat.get("models") or {}).items() if kind in (m.get("kinds") or [])]
|
|
4996
|
+
models = [m for m in dict.fromkeys(models) if not model_denied(cat, m)]
|
|
4997
|
+
efforts = [str(e).lower() for e in reg.get("efforts") or []] if reg.get("effort_flag") else []
|
|
4998
|
+
return models, efforts
|
|
4999
|
+
|
|
5000
|
+
|
|
5001
|
+
def _thinking(mid):
|
|
5002
|
+
base, eff = split_effort(mid or "")
|
|
5003
|
+
return (base or "?"), (eff or "default")
|
|
5004
|
+
|
|
5005
|
+
|
|
5006
|
+
def cmd_plan_team(st):
|
|
5007
|
+
"""orch plan team -> one row per milestone and one for the reviewer: which coder builds it, on which model and
|
|
5008
|
+
thinking level, and whether the developer locked it. Then what can be picked instead."""
|
|
5009
|
+
if run_mode(st) == "subagent":
|
|
5010
|
+
print("SUBAGENT MODE: the subagents run on the models in your orch config (`/orch-mode` in Pi sets them), "
|
|
5011
|
+
"not on a team of panels, so there is no team table to change here.")
|
|
5012
|
+
return
|
|
5013
|
+
tids = [t for t in st["order"] if st["tasks"][t]["status"] != "skipped"]
|
|
5014
|
+
rows = []
|
|
5015
|
+
for tid in tids:
|
|
5016
|
+
t = st["tasks"][tid]
|
|
5017
|
+
who = pick_order(st, t)
|
|
5018
|
+
mid = t.get("model") or (st["workers"][who[0]].get("model") if who else None)
|
|
5019
|
+
base, eff = _thinking(mid) if mid else ("?", "?")
|
|
5020
|
+
how = ("locked by you" if t.get("model") else
|
|
5021
|
+
f"by level ({t['tier']})" if t.get("tier") else "first free coder")
|
|
5022
|
+
rows.append((tid, t["title"], " or ".join(who) if who else "NOBODY", base, eff, how))
|
|
5023
|
+
if st.get("reviewer"):
|
|
5024
|
+
ri = st.get("reviewer_info") or {}
|
|
5025
|
+
base, eff = _thinking(ri.get("model")) if ri.get("model") else ("?", "?")
|
|
5026
|
+
rows.append(("Reviewer", "checks the reviewed steps", st["reviewer"], base, eff,
|
|
5027
|
+
"" if ri.get("model") else "model not written in the plan"))
|
|
5028
|
+
head = ("Step", "What", "Coder", "Model", "Thinking", "Chosen")
|
|
5029
|
+
cut = lambda x: x if len(x) <= 30 else x[:29] + "…"
|
|
5030
|
+
rows = [tuple(cut(str(c)) for c in r) for r in rows]
|
|
5031
|
+
wid = [max(len(r[i]) for r in rows + [head]) for i in range(len(head))]
|
|
5032
|
+
fmt = lambda r: " ".join(c.ljust(wid[i]) for i, c in enumerate(r)).rstrip()
|
|
5033
|
+
print(f"TEAM for {st.get('title') or st['branch']}: who builds each step, on which model and thinking level")
|
|
5034
|
+
print(fmt(head))
|
|
5035
|
+
for r in rows:
|
|
5036
|
+
print(fmt(r))
|
|
5037
|
+
if any(r[2] == "NOBODY" for r in rows):
|
|
5038
|
+
print("WARN a step has no coder on its model: `orch plan model <Mn> <model>` adds one")
|
|
5039
|
+
kinds = list(dict.fromkeys([w["kind"] for w in st["workers"].values()]
|
|
5040
|
+
+ [(st.get("reviewer_info") or {}).get("kind")]))
|
|
5041
|
+
for kind in [k for k in kinds if k]:
|
|
5042
|
+
models, efforts = model_choices(kind)
|
|
5043
|
+
if models:
|
|
5044
|
+
print(f"You can pick ({kind}): models {', '.join(models)}"
|
|
5045
|
+
+ (f" · thinking {', '.join(efforts)}" if efforts else " · no thinking setting"))
|
|
5046
|
+
deny = (models_catalog() or {}).get("policy", {}).get("deny") or []
|
|
5047
|
+
if deny:
|
|
5048
|
+
print(f"Never allowed: {', '.join(deny)}")
|
|
5049
|
+
print("Change one: orch plan model <Mn|reviewer> <model>@<thinking> (`auto` gives a step back to its level)")
|
|
5050
|
+
|
|
5051
|
+
|
|
5052
|
+
def _plan_section(lines, tid):
|
|
5053
|
+
i0 = next(i for i, ln in enumerate(lines) if (m := HEAD_RE.match(ln)) and m.group(2) == tid)
|
|
5054
|
+
i1 = next((i for i in range(i0 + 1, len(lines)) if lines[i].startswith("## ")), len(lines))
|
|
5055
|
+
return i0, i1
|
|
5056
|
+
|
|
5057
|
+
|
|
5058
|
+
def cmd_plan_model(args):
|
|
5059
|
+
"""orch plan model <Mn|reviewer> <model>[@<thinking>] -> the developer's choice, written into plan.md: `Model:`
|
|
5060
|
+
on the milestone (a lock: only coders on that model take it, orch never moves it to another model), or the
|
|
5061
|
+
model on the Reviewer line. When no coder runs that model, a new coder joins Workers; `orch team up` opens its
|
|
5062
|
+
panel. `auto` takes a milestone's lock off again. Then `orch sync`."""
|
|
5063
|
+
if len(args) == 3 and "@" not in args[1] and re.fullmatch(r"[A-Za-z]+", args[2]):
|
|
5064
|
+
args = [args[0], f"{args[1]}@{args[2]}"] # `M3 gpt-6.2-sol low` -> `M3 gpt-6.2-sol@low`
|
|
5065
|
+
if len(args) != 2:
|
|
5066
|
+
die(PLAN_USAGE)
|
|
5067
|
+
target, mid = args[0], args[1].strip("`").lower()
|
|
5068
|
+
is_rev = target.lower() == "reviewer"
|
|
5069
|
+
if not is_rev and not re.fullmatch(r"M\d+", target):
|
|
5070
|
+
die(PLAN_USAGE)
|
|
5071
|
+
plan = ORCH / "plan.md"
|
|
5072
|
+
if not plan.exists():
|
|
5073
|
+
die("missing .orchestrate/plan.md — write the plan first")
|
|
5074
|
+
text = plan.read_text()
|
|
5075
|
+
cfg, tasks = parse_plan(text)
|
|
5076
|
+
get = lambda k: " ".join(cfg.get(k, [])).strip()
|
|
5077
|
+
if get("repos"):
|
|
5078
|
+
die("this is a workspace of several repos: run `orch plan model` inside the repo the milestone belongs to")
|
|
5079
|
+
if not is_rev and target not in {t["id"] for t in tasks}:
|
|
5080
|
+
die(f"{target} is not in plan.md")
|
|
5081
|
+
workers_s, rev_s, lead_s = get("workers"), get("reviewer"), get("lead")
|
|
5082
|
+
workers, models = parse_agents(workers_s), parse_models(workers_s)
|
|
5083
|
+
rname = None
|
|
5084
|
+
if rev_s and not rev_s.lower().startswith("none"):
|
|
5085
|
+
rm = re.match(r"([\w.-]+)\s*\(", rev_s)
|
|
5086
|
+
rname = rm.group(1) if rm else None
|
|
5087
|
+
lines = text.split("\n")
|
|
5088
|
+
old_st = json.loads(STATE.read_text()) if STATE.exists() else {}
|
|
5089
|
+
cat = models_catalog()
|
|
5090
|
+
reg = registry(required=False) or {}
|
|
5091
|
+
notes = []
|
|
5092
|
+
if run_mode(old_st) == "subagent":
|
|
5093
|
+
die("this plan is in subagent mode: its subagents run on the models in your orch config, not on panels "
|
|
5094
|
+
"(`/orch-mode` in Pi sets them)")
|
|
5095
|
+
old_lock = None if is_rev else (field(next(t for t in tasks if t["id"] == target), "model").split() or [""])[0].lower()
|
|
5096
|
+
still = {(field(t, "model").split() or [""])[0].lower() for t in tasks if t["id"] != target}
|
|
5097
|
+
if old_lock and old_lock != mid and old_lock not in still:
|
|
5098
|
+
left = [n for n, m in models.items() if m == old_lock]
|
|
5099
|
+
if left:
|
|
5100
|
+
notes.append(f"NOTE {', '.join(left)} ({old_lock}) stays in the team and may take other steps of its "
|
|
5101
|
+
f"level; take it out of Workers in plan.md if you don't want its panel")
|
|
5102
|
+
if mid in ("auto", "any", "none"):
|
|
5103
|
+
if is_rev:
|
|
5104
|
+
die("the reviewer always runs a model: name one (`orch plan team` lists them)")
|
|
5105
|
+
i0, i1 = _plan_section(lines, target)
|
|
5106
|
+
lines = lines[:i0] + [ln for ln in lines[i0:i1] if not re.match(r"Model:\s", ln)] + lines[i1:]
|
|
5107
|
+
plan.write_text("\n".join(lines))
|
|
5108
|
+
print(f"UNLOCKED {target}: it goes to a coder of its level again")
|
|
5109
|
+
for n in notes:
|
|
5110
|
+
print(n)
|
|
5111
|
+
cmd_sync([])
|
|
5112
|
+
return
|
|
5113
|
+
why = model_denied(cat, mid)
|
|
5114
|
+
if why:
|
|
5115
|
+
die(f"{mid} is not allowed by the model policy (pattern {why!r}) — `orch plan team` lists what you can pick")
|
|
5116
|
+
base, eff = split_effort(mid)
|
|
5117
|
+
team_kinds = list(dict.fromkeys(k for k, _ in workers.values()))
|
|
5118
|
+
if is_rev:
|
|
5119
|
+
if not rname:
|
|
5120
|
+
die("the plan has no reviewer (`Reviewer: none`)")
|
|
5121
|
+
kind = parse_agents(rev_s)[rname][0]
|
|
5122
|
+
else:
|
|
5123
|
+
same = [workers[n][0] for n, m in models.items() if m and split_effort(m)[0] == base and n in workers]
|
|
5124
|
+
in_cat = [k for x, m in ((cat or {}).get("models") or {}).items() if split_effort(x)[0] == base
|
|
5125
|
+
for k in m.get("kinds") or []]
|
|
5126
|
+
lead_kind = next(iter(parse_agents(lead_s).values()), (None,))[0]
|
|
5127
|
+
kind = next((k for k in same + [k for k in in_cat if k in team_kinds] + [lead_kind] + team_kinds if k), None)
|
|
5128
|
+
if not kind:
|
|
5129
|
+
die("the plan has no Workers to add a coder to")
|
|
5130
|
+
v = reg.get(kind) or {}
|
|
5131
|
+
if eff and reg and not v.get("effort_flag"):
|
|
5132
|
+
die(f"{kind} has no thinking setting orch can start it with: name the model without @{eff}")
|
|
5133
|
+
efforts = [str(e).lower() for e in v.get("efforts") or []]
|
|
5134
|
+
if eff and efforts and eff not in efforts:
|
|
5135
|
+
die(f"{kind} has no thinking level {eff!r}: pick one of {', '.join(efforts)}")
|
|
5136
|
+
choices, _ = model_choices(kind)
|
|
5137
|
+
if choices and base not in choices:
|
|
5138
|
+
notes.append(f"NOTE {base} is not in the list {kind} gives ({', '.join(choices)}): check the name")
|
|
5139
|
+
if cat and model_tier(cat, mid) is None:
|
|
5140
|
+
notes.append(f"NOTE {mid} has no level (small / medium / high) in the catalog: fine for your choice, "
|
|
5141
|
+
f"orch only can't compare it with the others")
|
|
5142
|
+
hend = next((i for i, ln in enumerate(lines) if ln.startswith("## ")), len(lines))
|
|
5143
|
+
if is_rev:
|
|
5144
|
+
i = next(i for i in range(hend) if lines[i].startswith("Reviewer:"))
|
|
5145
|
+
pane = parse_agents(rev_s)[rname][1]
|
|
5146
|
+
lines[i] = f"Reviewer: {rname} ({kind}: {mid}" + (f" @pane:{pane}" if pane else "") + ")"
|
|
5147
|
+
plan.write_text("\n".join(lines))
|
|
5148
|
+
print(f"REVIEWER {rname} now runs {base} on {eff or 'its default'} thinking")
|
|
5149
|
+
oldm = parse_models(rev_s).get(rname)
|
|
5150
|
+
if oldm != mid and herdr_state(rname) is not None:
|
|
5151
|
+
notes.append(f"NOTE {rname}'s panel is open on {oldm or 'another model'}: quit the agent in that panel "
|
|
5152
|
+
f"(or close it), then `orch team up` opens it again on {mid}")
|
|
5153
|
+
else:
|
|
5154
|
+
who = [n for n, m in models.items() if m == mid and n in workers]
|
|
5155
|
+
if not who:
|
|
5156
|
+
same_kind = [n for n, (k, _) in workers.items() if k == kind]
|
|
5157
|
+
pm = re.match(r"(.*?)(\d+)$", same_kind[0]) if same_kind else None
|
|
5158
|
+
prefix = pm.group(1) if pm else f"{kind}-"
|
|
5159
|
+
taken = set(workers) | ({rname} if rname else set()) | set(parse_agents(lead_s))
|
|
5160
|
+
nums = [int(m.group(1)) for n in taken if (m := re.fullmatch(re.escape(prefix) + r"(\d+)", n))]
|
|
5161
|
+
new = f"{prefix}{max(nums, default=0) + 1}"
|
|
5162
|
+
i = next(i for i in range(hend) if lines[i].startswith("Workers:"))
|
|
5163
|
+
lines[i] = lines[i].rstrip().rstrip(",") + f", {new} ({kind}: {mid})"
|
|
5164
|
+
who = [new]
|
|
5165
|
+
started = any((w or {}).get("dir") for w in (old_st.get("workers") or {}).values())
|
|
5166
|
+
notes.append(f"NEW coder {new} ({kind}: {mid}) joins the team for {target}: "
|
|
5167
|
+
+ ("run `orch start` (it makes its folder), then `orch team up` opens its panel"
|
|
5168
|
+
if started else "`orch team up` opens its panel when the run starts (on go)"))
|
|
5169
|
+
i0, i1 = _plan_section(lines, target)
|
|
5170
|
+
sec = [ln for ln in lines[i0 + 1:i1] if not re.match(r"Model:\s", ln)]
|
|
5171
|
+
at = next((k + 1 for k, ln in enumerate(sec) if ln.startswith("Tier:")), 0)
|
|
5172
|
+
sec.insert(at, f"Model: {mid}")
|
|
5173
|
+
lines = lines[:i0 + 1] + sec + lines[i1:]
|
|
5174
|
+
plan.write_text("\n".join(lines))
|
|
5175
|
+
print(f"LOCKED {target} to {base} on {eff or 'its default'} thinking: only {' or '.join(who)} takes it, "
|
|
5176
|
+
f"and orch never moves it to another model (to change it: `orch plan model {target} <model>`)")
|
|
5177
|
+
ot = (old_st.get("tasks") or {}).get(target) or {}
|
|
5178
|
+
if ot.get("status") in ACTIVE:
|
|
5179
|
+
notes.append(f"NOTE {target} is being worked on by {ot.get('worker')} now: your choice counts from its "
|
|
5180
|
+
f"next start. To move it now: `orch set {target} paused`, then `orch dispatch {target}`")
|
|
5181
|
+
elif ot.get("status") == "merged":
|
|
5182
|
+
notes.append(f"NOTE {target} has already landed: for a change to it on this model, "
|
|
5183
|
+
f"`orch fix {target} \"<the change>\" --to {who[0]}`")
|
|
5184
|
+
for n in notes:
|
|
5185
|
+
print(n)
|
|
5186
|
+
cmd_sync([])
|
|
5187
|
+
|
|
5188
|
+
|
|
4950
5189
|
def cmd_plan(args):
|
|
4951
5190
|
"""orch plan show -> the plan for a person: one short card per milestone in plain words (from each milestone's
|
|
4952
5191
|
`Plain:` line), what it waits for and why, who builds it on which model, how long it should take, and which
|
|
4953
|
-
milestones run together. plan.md keeps every detail; this is the part a developer reads.
|
|
5192
|
+
milestones run together. plan.md keeps every detail; this is the part a developer reads.
|
|
5193
|
+
orch plan team -> the model table; orch plan model -> the developer's choice of model for a step or the reviewer."""
|
|
5194
|
+
if args[:1] == ["team"]:
|
|
5195
|
+
return cmd_plan_team(load())
|
|
5196
|
+
if args[:1] == ["model"]:
|
|
5197
|
+
return cmd_plan_model(args[1:])
|
|
4954
5198
|
if args[:1] != ["show"]:
|
|
4955
|
-
die(
|
|
5199
|
+
die(PLAN_USAGE)
|
|
4956
5200
|
st = load()
|
|
4957
5201
|
tids = [t for t in st["order"] if st["tasks"][t]["status"] != "skipped"]
|
|
4958
5202
|
print(f"PLAN in plain words: {st.get('title') or st['branch']} — {len(tids)} milestone(s) on {st['branch']}"
|
|
@@ -4979,7 +5223,9 @@ def cmd_plan(args):
|
|
|
4979
5223
|
w = st["workers"][n]
|
|
4980
5224
|
who.append(f"{n} ({w['model']})" if w.get("model") else n)
|
|
4981
5225
|
bits = [f"Built by: {' or '.join(who) if who else 'the next free coder'}"]
|
|
4982
|
-
if t.get("
|
|
5226
|
+
if t.get("model"):
|
|
5227
|
+
bits.append(f"locked by you to {t['model']}")
|
|
5228
|
+
elif t.get("tier"):
|
|
4983
5229
|
bits.append(f"{t['tier']} model")
|
|
4984
5230
|
if t.get("estimate_s"):
|
|
4985
5231
|
bits.append(f"about {_short_dur(t['estimate_s'])}")
|
|
@@ -5087,6 +5333,10 @@ def cmd_escalate(args):
|
|
|
5087
5333
|
tid, reason = args[0], " ".join(args[1:])
|
|
5088
5334
|
st = load()
|
|
5089
5335
|
t = task(st, tid)
|
|
5336
|
+
if t.get("model"):
|
|
5337
|
+
print(f"NO_ESCALATION {tid} (the developer locked it to {t['model']}: only they change that, "
|
|
5338
|
+
f"with `orch plan model {tid} <model>`)")
|
|
5339
|
+
sys.exit(3)
|
|
5090
5340
|
cur = rank(st["workers"].get(t.get("worker") or t.get("last_worker") or "", {}).get("tier"))
|
|
5091
5341
|
above = sorted({rank(w.get("tier")) for w in st["workers"].values()} - set(range(0, max(cur, need_rank(t)) + 1)))
|
|
5092
5342
|
if t.get("escalated") or not cur or not above:
|
|
@@ -8149,6 +8399,9 @@ USAGE = """usage: orch <command> [args]
|
|
|
8149
8399
|
manual the manual tests: what to try by hand, numbered, from the summary's Manual verification
|
|
8150
8400
|
checklist (`orch finish` prints them too, and the lead posts them in its chat)
|
|
8151
8401
|
plan show the plan for a person: each milestone in plain words, who builds it, how long, the order
|
|
8402
|
+
plan team who builds each milestone and reviews, on which model and thinking level, and what you can pick
|
|
8403
|
+
plan model <Mn|reviewer> <model>@<thinking> the developer's choice: locks a milestone to that model (a coder
|
|
8404
|
+
on it joins the team when none runs it) or sets the reviewer's; `auto` unlocks a milestone
|
|
8152
8405
|
events [--peek] (lead) what you were woken for; reading acknowledges it
|
|
8153
8406
|
dispatch <Mn>... [--to <worker>] [--tier <tier>] (lead) start or restart milestones; starts the event manager
|
|
8154
8407
|
check [Mn] run the plan's check command in the main folder: CHECK PASS, or CHECK FAIL (exit 1)
|
package/extensions/orch-mode.ts
CHANGED
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
//
|
|
16
16
|
// Commands: /orch-mode [panes|subagent] show or switch the mode; `subagent` also sets it up (below)
|
|
17
17
|
// /orch-setup [--mode panes|subagent] install the `orch` command from this package (needed once)
|
|
18
|
+
// /orch-board open the run board: a popup in herdr, else `orch view` in the browser
|
|
18
19
|
//
|
|
19
20
|
// Tool: orch_ask the lead's clickable questions before it writes the plan (/orch-plan
|
|
20
21
|
// step 2a): one picker per question, answers saved in
|
|
@@ -454,4 +455,38 @@ export default function orchMode(pi: ExtensionAPI) {
|
|
|
454
455
|
await setUp(ctx, want, true);
|
|
455
456
|
},
|
|
456
457
|
});
|
|
458
|
+
|
|
459
|
+
pi.registerCommand("orch-board", {
|
|
460
|
+
description: "Open the herdr-orchestra run board: a popup inside herdr, or `orch view` (the browser page) outside it",
|
|
461
|
+
handler: async (_args, ctx) => {
|
|
462
|
+
const insideHerdr = process.env.HERDR_ENV === "1" || !!process.env.HERDR_PANE_ID;
|
|
463
|
+
if (insideHerdr) {
|
|
464
|
+
// the same call the board key (prefix+a) makes; --cwd so the popup opens in this repo, not the plugin's folder
|
|
465
|
+
const herdr = process.env.HERDR_BIN_PATH || "herdr";
|
|
466
|
+
const r = await pi.exec(
|
|
467
|
+
herdr,
|
|
468
|
+
["plugin", "pane", "open", "--plugin", "herdr-orchestra.board", "--entrypoint", "board", "--placement", "popup", "--cwd", ctx.cwd],
|
|
469
|
+
{ cwd: ctx.cwd, timeout: 15000 },
|
|
470
|
+
);
|
|
471
|
+
if (r.code === 0) {
|
|
472
|
+
ctx.ui.notify("Board opened in a herdr popup. Close it with q.", "info");
|
|
473
|
+
return;
|
|
474
|
+
}
|
|
475
|
+
ctx.ui.notify(
|
|
476
|
+
"Herdr could not open the board popup" +
|
|
477
|
+
((r.stderr || r.stdout).trim() ? `: ${(r.stderr || r.stdout).trim().split("\n")[0]}` : "") +
|
|
478
|
+
". If the plugin is not linked, run `orch view plugin link`. Opening the browser page instead.",
|
|
479
|
+
"warning",
|
|
480
|
+
);
|
|
481
|
+
}
|
|
482
|
+
const o = await orchState(pi);
|
|
483
|
+
if (!o.path) {
|
|
484
|
+
ctx.ui.notify("The `orch` command is not installed yet. Type /orch-setup once, then /orch-board again.", "warning");
|
|
485
|
+
return;
|
|
486
|
+
}
|
|
487
|
+
const r = await pi.exec(o.path, ["view", "--bg"], { cwd: ctx.cwd, timeout: 20000 });
|
|
488
|
+
const out = (r.stdout + r.stderr).trim();
|
|
489
|
+
ctx.ui.notify(out || (r.code === 0 ? "orch view started." : "orch view failed."), r.code === 0 ? "info" : "error");
|
|
490
|
+
},
|
|
491
|
+
});
|
|
457
492
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "herdr-orchestra",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.27.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
|
@@ -72,7 +72,7 @@ If any is false, use the full process: run `orch lead plan full` and follow its
|
|
|
72
72
|
- **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").
|
|
73
73
|
- **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.
|
|
74
74
|
- **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").
|
|
75
|
-
- 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
|
|
75
|
+
- 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 and your `Quick because:`. Then let the developer choose the models (the block "Let the developer choose the models" below), and when they keep the team, say "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.
|
|
76
76
|
|
|
77
77
|
```
|
|
78
78
|
# Plan: <short title>
|
|
@@ -312,17 +312,26 @@ Rules for every milestone:
|
|
|
312
312
|
- **Tier, Needs, Model why**: from step 6, on every milestone. The model in `Workers:` is what the pane really runs, never a wish. `orch sync` refuses a denied model and warns when no coder reaches a milestone's tier or the reviewer is weaker than the work.
|
|
313
313
|
<!-- /quick -->
|
|
314
314
|
- **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.
|
|
315
|
+
- **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.
|
|
315
316
|
- **Review**: `yes` for UI, API contracts, auth, payments and schema; `no` for mechanical milestones.
|
|
316
317
|
- **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.
|
|
317
318
|
- **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.
|
|
318
|
-
- Each section must stand alone: autopilot hands it to the coder (without the lines only orch uses: `Depends on`, `Why separate`, `Prefer`, `Tier`, `Needs`, `Model why`, `Estimate`, `Review`, `Parallel`, `Door`, `Side`, `Repo`; `Role` goes at the top as the coder's role), together with the global instructions and the reports of merged dependencies.
|
|
319
|
+
- 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), together with the global instructions and the reports of merged dependencies.
|
|
319
320
|
|
|
320
321
|
## 10. Validate and show the plan
|
|
321
322
|
- Run `orch sync`. Fix every ERROR. Fix or consciously accept every WARN: a word the glossary says to avoid, a new word or decision record no milestone writes down, missing dependency reasons, hotspot files in parallel milestones, "how" in a milestone, overlap, a milestone without `Why separate` or `Estimate`, independent milestones in shared mode, coders left idle by a fully sequential plan, a tier no coder reaches, a model outside the catalog.
|
|
322
323
|
- Run `orch plan show` and give the developer its cards as they are: each milestone in plain words, what it waits for and why, who builds it on which model, how long, and the order. Fix every `WARN no Plain: line` first. Then add, in plain words too:
|
|
323
|
-
-
|
|
324
|
+
- the estimate for the whole feature, and for each milestone its tier and `Model why` (who builds it on which model comes next, in the team table);
|
|
324
325
|
- the research facts that shaped the plan, the answers from step 2a and where they went, and all open questions;
|
|
325
326
|
- which milestones are hard to undo and why (the cards say so), and the new glossary words.
|
|
326
327
|
Keep code words (file names, functions, endpoints) out of what you write here: they are in plan.md for whoever wants them.
|
|
327
|
-
|
|
328
|
+
<!-- quick: Let the developer choose the models (from step 10) -->
|
|
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
|
+
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 (step 2a): "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
|
+
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
|
+
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
|
+
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).
|
|
335
|
+
<!-- /quick -->
|
|
336
|
+
- Then say: "Plan written to .orchestrate/plan.md. Edit it if you like: untick `[x]` to skip a milestone, change `Tier` / `Depends on` / `Prefer`, tell me another model for a step or the reviewer (for example "M3 use luna high"), answer open questions under 'Notes from user' and set 'Open questions: - none'. Say **go** (or `/orch-run`, "use the orch-run skill", "Run `orch lead run` and follow it") and I will start the run: I dispatch the milestones, the event manager runs them, and I come back when one finishes, asks a question or needs a decision."
|
|
328
337
|
- STOP and wait for the developer. Do not dispatch before they say so.
|
package/playbooks/run.md
CHANGED
|
@@ -19,6 +19,7 @@ A run behaves like a call stack. You **dispatch** work and **pause**. The **even
|
|
|
19
19
|
6. After every step below that ends in **STOP**, stop. Do not sleep, loop or check back: you will be woken.
|
|
20
20
|
7. **Never end a wake-up silently.** Before you STOP, write in your chat one short line per event, in plain words: what happened (its `SAY:` line from `orch events`) and what you did about it. Example: `M1 (Model) is done and on the branch. M3 started by itself because it was waiting for M1. Nothing for me to do.` or `M4 is paused: the coder asks which currency to use. I'm asking you: INR only, or several?`. The developer reads your chat to follow the run; `orch story` keeps the same lines.
|
|
21
21
|
8. **Never push to main.** No agent of the run (you, the coders, the reviewer) ever pushes to main, master or the repo's default branch, or merges a PR (`gh pr merge`, a merge on GitHub, `git push origin HEAD:main`, a force push), in any situation, even when the developer tells you to. Refuse in one line and offer the safe way: "I can't push to main, even when asked: that's a hard rule of this setup. The work is on <branch>; `orch finish` pushes that branch and opens a PR, and you merge it yourself." `orch finish` only ever pushes the run's branch. The repo's pre-push guard (`orch guard`) refuses a push to main anyway: never get around it (`--no-verify`, editing or deleting `.git/hooks`, `git config core.hooksPath`).
|
|
22
|
+
9. **The developer's model choices stay.** A milestone with `Model:` in plan.md ("locked by you" in `orch plan team`) runs only on that model, and the reviewer keeps the model the developer gave it. Change one only when the developer asks: `orch plan model <Mn|reviewer> <model>@<thinking>`.
|
|
22
23
|
|
|
23
24
|
## Context budget (credits scale with how much you read and how many turns you take)
|
|
24
25
|
- Your memory is `orch events` + `orch status` + files on disk, not this conversation. Never re-read old reports, diffs, plans or this playbook "to refresh": `orch events` prints what each wake-up needs.
|
|
@@ -60,6 +61,8 @@ If you changed plan.md by hand, run `orch sync` (it works once the event manager
|
|
|
60
61
|
|
|
61
62
|
**Swap a coder** (for example, AGY instead of OpenCode): `orch stop` (the event manager finishes its current step and exits; nothing is lost), change `Workers:` in plan.md, `orch sync`, `orch team up`, check that `orch status` shows the new worker as `herdr=ok`, then `orch resume`. Never kill the event manager by hand.
|
|
62
63
|
|
|
64
|
+
**The developer picks another model** for a milestone or the reviewer (for example "M3 use luna high"): run `orch plan model M3 gpt-6-luna@high` (the model's full name from `orch plan team`; `orch plan model reviewer ...` for the reviewer; `auto` gives a milestone back to its level) and tell the developer in one line what it printed. Do exactly what its `NEW` and `NOTE` lines say (`orch start` then `orch team up` for a new coder; pause and dispatch again to move a milestone that is being built now). A milestone the developer locked to a model (`Model:` in plan.md, "locked by you" in `orch plan team`) only ever goes to a coder on that model: never move it to another model yourself, only when they ask.
|
|
65
|
+
|
|
63
66
|
**Move a milestone to another coder** (for example M7 from rs-agy-1 to rs-claude-1): `orch set M7 paused`, then `orch dispatch M7 --to rs-claude-1`. orch presses the old coder's interrupt key and tells it to stop. Tell the developer it has stopped only when `orch status` no longer shows it as `stopping M7`; until then it may still be editing files, and it gets no new work. A coder or the reviewer shown as `compacting` got `/compact` after its last milestone (orch does this by itself between milestones, never mid-work): it takes its next milestone in a minute, nothing to do.
|
|
64
67
|
|
|
65
68
|
**Before `orch dispatch --to <worker>`**, `orch status` must show that worker as `herdr=ok`. dispatch refuses a worker with no agent (`NO AGENT`, `SHELL ONLY`); do what it says (`orch team up`) and try again. If `orch team up` reports `QUIT <worker>`, the agent quit as soon as it started: show the developer the pane and the saved screen it names.
|