herdr-orchestra 6.7.2 → 6.9.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 CHANGED
@@ -2,6 +2,36 @@
2
2
 
3
3
  All notable changes. Versions follow [semantic versioning](https://semver.org).
4
4
 
5
+ ## [6.9.0] - 2026-11-25
6
+
7
+ A new skill, `orch-explain`, makes any agent explain a concept, a code flow, a bug fix or an architecture change simply and visually.
8
+
9
+ Example: in Claude Code type `/orch-explain how does orch fix work`. The answer comes in four parts: 2–3 plain bullets with an everyday analogy, a small table of the parts involved, an ASCII flowchart under 65 characters wide (so it fits a narrow herdr pane), and a 3-row "why it matters" table, all using one example such as `Turn T1`.
10
+
11
+ ### Added
12
+ - **`orch-explain` skill** (`skills/orch-explain/SKILL.md`), installed next to `orch-plan` and `orch-run`: one copy per agent through `orch agents sync`, recorded for `--uninstall`, checked by `orch agents check`. OpenCode gets a `/orch-explain` command; Pi loads it from the package (`/skill:orch-explain`). Unlike the other two it is not a thin wrapper: the playbook is in the skill itself and it needs no run.
13
+ - An `orch-explain` copy in a folder orch no longer uses (such as OpenCode's old `command/`) is recognised as orch's own and removed, like old `orch-plan` / `orch-run` copies, so no agent lists it twice.
14
+
15
+ ## [6.8.0] - 2026-11-24
16
+
17
+ An all-Codex team (Codex as the lead, the coders and the reviewer) now runs without getting stuck and without an approval check on every orch command.
18
+
19
+ Example: before, a Codex lead typing `orch start` got "cannot create branch" (Codex's sandbox makes `.git` read-only), and `orch team up` or waking the lead failed (the sandbox blocks herdr's socket). Codex then asked its auto-review before running each one again. Now every Codex pane orch opens starts with two settings that open just those two things, so the commands work the first time.
20
+
21
+ ### Fixed
22
+ - **Codex panes can reach herdr and the repo's `.git`.** The Codex launch command is now `codex --approve-for-me -c sandbox_workspace_write.network_access=true -c 'sandbox_workspace_write.writable_roots=["<repo>/.git"]'`. The first setting lets herdr's socket through (it also allows the internet); the second lets git make branches, worktrees and commits. Checked with the real codex-cli 0.172 (`codex sandbox`): without them git and the socket are refused, with them both work. `orch team up`, the "start it yourself" hints after a restart and `orch agents launch codex` all use it; a launch command may say `{git_dir}` and orch fills in the repo's `.git` folder.
23
+ - **A blocked lead is told how to fix it.** `orch lead plan`, `orch lead run` and `orch lead check` warn when the pane they run in can't reach herdr (Codex's sandbox with the network off) or can't write `.git`, and print the Codex command to restart with.
24
+ - **The Codex models were out of date.** orch knew only `gpt-6-luna` and `gpt-6-sol`, which Codex now calls legacy, and had no high Codex model, so every Codex plan warned.
25
+
26
+ ### Added
27
+ - **Thinking levels in a model id.** `gpt-6.2-sol@low` means gpt-6.2-sol on low thinking (`-c model_reasoning_effort=low`). New registry key `effort_flag`. The Codex levels: small = `gpt-6-luna@high`, medium = `gpt-6.2-sol@low`, high = `gpt-6.2-sol@medium` (the lead and the reviewer). Astra stays blocked.
28
+ - **orch asks Codex for its models.** When `codex` is installed, `orch models` runs `codex debug models` (at most every 6 hours, cached; `ORCH_MODELS_TTL_S`, `ORCH_MODELS_DISCOVER=0` turns it off) and puts the newest Luna and Sol into the levels above, skipping models Codex hides or calls legacy. When Codex adds a new Sol, the next plan uses it without anyone editing a file. The family and thinking level of each tier are in `[discover.codex]` in `models.default.toml`, and your own `models.toml` can change them. If Codex can't be asked, the shipped entries are used.
29
+ - `orch team <kind>` prints the command to start your own lead pane on the strongest level.
30
+ - `orch doctor` says when your own launch command drops a part orch needs (new registry key `launch_needs`).
31
+
32
+ ### Not yet tried
33
+ - A full run with real Codex windows. The sandbox settings and model names were checked against the real Codex 0.172; the run itself was tested with simulated agents.
34
+
5
35
  ## [6.7.2] - 2026-11-23
6
36
 
7
37
  The website docs now have a Pi page: [Pi: setup and use](https://herdr-orchestra.vercel.app/docs/pi/). It walks through every step in order: install Pi, add the package (`pi install git:github.com/arunnarangali/herdr-orchestra`), type `/orch-setup` once, check with `orch version`, pick `panes` or `subagent` with `/orch-mode`, then `/skill:orch-plan <feature>` and say go. It also shows the config file for the subagents' models and `max_turns`, a table of the Pi commands, and what to do when something is off. No change to how orch works.
package/README.md CHANGED
@@ -59,8 +59,8 @@ It installs:
59
59
  | What | Where |
60
60
  |---|---|
61
61
  | `orch` CLI (scheduler + autopilot) | `~/.local/bin/orch` |
62
- | `orch-plan`, `orch-run` skills, one copy per agent (an agent never lists them twice) | `~/.agents/skills/` or the agent's own skills folder |
63
- | `/orch-plan`, `/orch-run` OpenCode commands | `~/.config/opencode/commands/` |
62
+ | `orch-plan`, `orch-run`, `orch-explain` skills, one copy per agent (an agent never lists them twice) | `~/.agents/skills/` or the agent's own skills folder |
63
+ | `/orch-plan`, `/orch-run`, `/orch-explain` OpenCode commands | `~/.config/opencode/commands/` |
64
64
 
65
65
  Updating replaces the skills, it never adds a second copy: the installer picks one folder per agent and removes orch's older copies from the rest (your own skills are left alone). `orch agents check` says `DUPLICATE` if an agent would still see a skill twice.
66
66
  | every installed version, side by side | `~/.local/share/herdr-orchestra/` |
@@ -71,7 +71,7 @@ Install once — you don't need to run the installer again when you add an agent
71
71
  orch agents sync
72
72
  ```
73
73
 
74
- It finds every installed agent (binary on `PATH`), copies the `orch-plan` / `orch-run` skills and slash commands into that agent's folders, and records them so `--uninstall` still removes exactly what was installed. `orch agents` prints a hint when a new agent is missing its skills.
74
+ It finds every installed agent (binary on `PATH`), copies the `orch-plan` / `orch-run` / `orch-explain` skills and slash commands into that agent's folders, and records them so `--uninstall` still removes exactly what was installed. `orch agents` prints a hint when a new agent is missing its skills.
75
75
 
76
76
  ## Updates
77
77
 
@@ -137,12 +137,14 @@ Version choice, first match wins: `--version` flag › `ORCH_VERSION` env › `.
137
137
  ```
138
138
  you (1 Codex pane) ──► $orch-plan add a login page
139
139
  lead: only me here → orch team codex
140
- Workers: codex-1 (codex: gpt-6-luna), codex-2 (codex: gpt-6-sol)
141
- Reviewer: reviewer (codex: gpt-6-sol)
140
+ Workers: codex-1 (codex: gpt-6-luna@high), codex-2 (codex: gpt-6.2-sol@medium)
141
+ Reviewer: reviewer (codex: gpt-6.2-sol@medium)
142
142
  you ──► go
143
143
  orch start → orch team up → 3 more Codex panes open → the run as usual
144
144
  ```
145
145
 
146
+ **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.
147
+
146
148
  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.
147
149
  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:
148
150
  - a milestone finishes → the event manager checks and merges it, then wakes the lead, which dispatches what that unlocked;
@@ -164,9 +166,9 @@ The lead does not pick a model by its name. It reads the catalog (`orch models`)
164
166
 
165
167
  | Tier | For | Examples from the default catalog |
166
168
  |---|---|---|
167
- | **small** | classification, renames, docs, config, mechanical edits | `haiku`, `gpt-6-luna`, `qwen3.6-35b-a3b` |
168
- | **medium** | normal implementation, tests, debugging inside one module | `sonnet`, `gpt-6-sol`, `qwen3.8-27b` |
169
- | **high** | the lead itself, contracts and architecture, cross-module refactors, auth / payments / schema, escalations | `opus`, `deepseek-v4-pro`, `glm-5.3` |
169
+ | **small** | classification, renames, docs, config, mechanical edits | `haiku`, `gpt-6-luna@high`, `qwen3.6-35b-a3b` |
170
+ | **medium** | normal implementation, tests, debugging inside one module | `sonnet`, `gpt-6.2-sol@low`, `qwen3.8-27b` |
171
+ | **high** | the lead itself, contracts and architecture, cross-module refactors, auth / payments / schema, escalations | `opus`, `gpt-6.2-sol@medium`, `deepseek-v4-pro`, `glm-5.3` |
170
172
 
171
173
  In the plan, each coder carries the model its pane runs, and each milestone says what it needs:
172
174
 
@@ -200,7 +202,17 @@ The agent whose pane you start the plan playbook in becomes the lead. orch names
200
202
  | Antigravity (`agy`) | "use the orch-plan skill: <feature>" |
201
203
  | **any agent** | "Run `orch lead plan` and follow it. Feature: <feature>" |
202
204
 
203
- The skills and slash commands are thin wrappers: the playbooks themselves live in `orch` (`orch lead plan`, `orch lead run`), so every agent follows the same, versioned instructions. They are printed in parts so the lead reads only what it needs: `orch lead plan` prints research and the quick-or-full decision, then `orch lead plan quick` (a quick run's rules) or `orch lead plan full` (steps 3 to 10); on a wake-up, `orch events` prints the rules and steps for those events, so the run playbook is read once.
205
+ ### Explain something simply
206
+ `orch-explain` makes any agent explain a concept, a code flow, a bug fix or an architecture change in plain words, in four parts: a short summary with an everyday analogy, a table of the parts involved, an ASCII flowchart under 65 characters wide (it fits a narrow pane), and a 3-row "why it matters" table, with one example used all the way through. It needs no run and no `orch` command.
207
+
208
+ | Agent | Ask it |
209
+ |---|---|
210
+ | Claude Code, OpenCode | `/orch-explain how does the event manager wake the lead` |
211
+ | Codex | `$orch-explain how does orch fix work` |
212
+ | Pi | `/skill:orch-explain <topic>` |
213
+ | any other | "use the orch-explain skill: <topic>" (or just "explain X simply") |
214
+
215
+ The orch-plan and orch-run skills and slash commands are thin wrappers: the playbooks themselves live in `orch` (`orch lead plan`, `orch lead run`), so every agent follows the same, versioned instructions. They are printed in parts so the lead reads only what it needs: `orch lead plan` prints research and the quick-or-full decision, then `orch lead plan quick` (a quick run's rules) or `orch lead plan full` (steps 3 to 10); on a wake-up, `orch events` prints the rules and steps for those events, so the run playbook is read once.
204
216
 
205
217
  ### Agent registry
206
218
  `orch agents` shows every known kind: installed or not, roles, whether herdr can watch it, and its launch command. Defaults ship in `agents.default.toml`; add or fix kinds in `~/.config/herdr-orchestra/agents.toml` (merged key by key):
@@ -257,7 +269,7 @@ pi install npm:herdr-orchestra
257
269
 
258
270
  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.
259
271
 
260
- Pi then has the `orch-plan` and `orch-run` skills and two commands. 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.
272
+ Pi then has the `orch-plan`, `orch-run` and `orch-explain` skills and two commands. 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.
261
273
 
262
274
  Runs have two modes. Nothing changes for anyone who never picks the second one.
263
275
 
package/VERSION CHANGED
@@ -1 +1 @@
1
- 6.7.2
1
+ 6.9.0
@@ -8,18 +8,22 @@
8
8
  # `orch agents launch <kind> --role reviewer` prints it. Left out: the reviewer starts like a coder
9
9
  # model_flag the launch option that picks the model (`orch agents launch <kind> --model <id>`); leave it
10
10
  # out when the tool has none or it is unverified, and choose the model inside the tool
11
+ # effort_flag the launch option that sets how hard the model thinks, with {effort} where the level goes. A model
12
+ # id written `<model>@<level>` (e.g. gpt-6.2-sol@low) starts on <model> with this option
13
+ # launch_needs parts the launch command must keep for orch to work in that tool; `orch doctor` says when your
14
+ # own launch drops one. In `launch`, {git_dir} is the repo's .git folder (filled in by orch)
11
15
  # herdr_detect herdr can tell idle / working / blocked for it (false: orch relies on the done file only)
12
16
  # interrupt_keys the keys that stop its current step, as `herdr agent send-keys` names them (default ["esc"]).
13
17
  # orch presses them when a milestone is paused or moved while the coder still works, before the
14
18
  # STOP note: a typed message is only read after the current step (agy queues it)
15
19
  # roles any of "lead", "coder", "reviewer"
16
- # skills_dirs global SKILL.md folders the installer may put the thin orch-plan / orch-run skills into
20
+ # skills_dirs global SKILL.md folders the installer may put the orch-plan / orch-run / orch-explain skills into
17
21
  # (first = preferred)
18
22
  # skills_reads every global skills folder the tool reads, its own and shared ones (e.g. ~/.agents/skills).
19
23
  # `orch agents sync` picks the fewest folders so each installed tool reads exactly ONE copy
20
24
  # of each skill (a skill in two folders it reads is listed twice), and removes orch's copies
21
25
  # from every other folder
22
- # commands_dirs slash-command folders the installer may put orch-plan.md / orch-run.md into
26
+ # commands_dirs slash-command folders the installer may put orch-plan.md / orch-run.md / orch-explain.md into
23
27
  # skills_one_wins true when the tool shows a skill once even if two folders it reads have it (its docs
24
28
  # say one copy wins); false or unset: it lists both, so orch keeps exactly one copy
25
29
  # commands_reads every slash-command folder the tool reads (same one-copy rule)
@@ -49,8 +53,14 @@ notes = "Claude Code 2.1: --permission-mode acceptEdits in --help; ~/.claude/ski
49
53
 
50
54
  [codex]
51
55
  binary = "codex"
52
- launch = "codex --approve-for-me"
56
+ # Codex runs every command in its sandbox, which blocks two things orch needs: talking to herdr (a local socket,
57
+ # blocked with the network) and writing the repo's .git (branches, worktrees, commits). These two settings open
58
+ # exactly that, so `orch start`, `orch team up` and every herdr call work the first time instead of each one
59
+ # waiting for an approval review.
60
+ launch = "codex --approve-for-me -c sandbox_workspace_write.network_access=true -c 'sandbox_workspace_write.writable_roots=[\"{git_dir}\"]'"
61
+ launch_needs = ["sandbox_workspace_write.network_access=true", "sandbox_workspace_write.writable_roots"]
53
62
  model_flag = "--model"
63
+ effort_flag = "-c model_reasoning_effort={effort}"
54
64
  herdr_detect = true
55
65
  interrupt_keys = ["esc"]
56
66
  roles = ["lead", "coder", "reviewer"]
@@ -58,7 +68,7 @@ skills_dirs = ["~/.agents/skills", "~/.codex/skills"]
58
68
  skills_reads = ["~/.agents/skills", "~/.codex/skills"]
59
69
  invoke = "$orch-plan <feature> (or: use the orch-plan skill: <feature>)"
60
70
  verified = true
61
- notes = "codex-cli 0.167: --full-auto is gone; --approve-for-me routes approvals to automatic review in the workspace-write sandbox. Reads ~/.codex/skills and ~/.agents/skills (its docs name ~/.agents/skills as the user folder, and say two skills with the same name both show up, so orch keeps one copy)."
71
+ notes = "codex-cli 0.167: --full-auto is gone; --approve-for-me routes approvals to automatic review in the workspace-write sandbox. Reads ~/.codex/skills and ~/.agents/skills (its docs name ~/.agents/skills as the user folder, and say two skills with the same name both show up, so orch keeps one copy). codex-cli 0.172 (checked with `codex sandbox`): in workspace-write, .git is read-only and connecting to a local socket is refused; sandbox_workspace_write.network_access=true lets the herdr socket through (it also allows the internet) and writable_roots with the repo's .git lets git work. Thinking level: -c model_reasoning_effort=low|medium|high|xhigh|max. `codex debug models` lists the models this Codex has (see [discover.codex] in models.default.toml)."
62
72
 
63
73
  [amp]
64
74
  binary = "amp"
Binary file
package/bin/orch CHANGED
@@ -756,31 +756,140 @@ def user_models_file():
756
756
  return Path(os.environ.get("ORCH_MODELS_FILE") or Path.home() / ".config/herdr-orchestra/models.toml")
757
757
 
758
758
 
759
+ _CATALOG = {}
760
+
761
+
759
762
  def models_catalog(required=False):
760
- """models.default.toml merged with the user's models.toml (key by key per model; policy and tiers per key).
761
- None when tomllib is missing and the catalog isn't required: plans then run without tiers, as before 4.7."""
763
+ """models.default.toml, then the models each installed tool reports itself ([discover.<kind>]), then the user's
764
+ models.toml, merged key by key per model (policy, tiers and discover per key). None when tomllib is missing and
765
+ the catalog isn't required: plans then run without tiers, as before 4.7."""
762
766
  try:
763
767
  import tomllib
764
768
  except ImportError:
765
769
  if required:
766
770
  die(f"the model catalog needs Python >= 3.11 (tomllib); this is Python {sys.version.split()[0]}")
767
771
  return None
768
- cat = {"policy": {}, "tiers": {}, "models": {}}
772
+ if "cat" in _CATALOG:
773
+ return _CATALOG["cat"]
774
+ cat = {"policy": {}, "tiers": {}, "models": {}, "discover": {}, "found": {}}
769
775
  try:
770
- for src in (asset("models.default.toml"), user_models_file()):
771
- if not src or not src.exists():
772
- continue
773
- data = tomllib.loads(src.read_text())
774
- for sec in ("policy", "tiers"):
775
- cat[sec].update(data.get(sec) or {})
776
- for mid, vals in (data.get("models") or {}).items():
777
- if isinstance(vals, dict):
778
- cat["models"].setdefault(mid.lower(), {}).update(vals)
776
+ datas = [(tomllib.loads(src.read_text()), user) for src, user in
777
+ ((asset("models.default.toml"), False), (user_models_file(), True)) if src and src.exists()]
779
778
  except tomllib.TOMLDecodeError as e:
780
779
  die(f"model catalog: {e}")
780
+ for data, _ in datas:
781
+ for sec in ("policy", "tiers"):
782
+ cat[sec].update(data.get(sec) or {})
783
+ for kind, d in (data.get("discover") or {}).items():
784
+ if isinstance(d, dict):
785
+ cat["discover"].setdefault(kind, {}).update(d)
786
+ for phase in (False, True): # the shipped models, then what the tools report, then the user's own
787
+ if phase:
788
+ discover_models(cat)
789
+ for data, user in datas:
790
+ if user == phase:
791
+ for mid, vals in (data.get("models") or {}).items():
792
+ if isinstance(vals, dict):
793
+ cat["models"].setdefault(mid.lower(), {}).update(vals)
794
+ _CATALOG["cat"] = cat
781
795
  return cat
782
796
 
783
797
 
798
+ # ---------------------------------------------------------------- model discovery: ask the tool for its models
799
+ DISCOVER_TTL_S = float(os.environ.get("ORCH_MODELS_TTL_S", str(6 * 3600)))
800
+ LEGACY_RE = re.compile(r"(?i)\blegacy\b|previous generation|deprecated")
801
+
802
+
803
+ def split_effort(mid):
804
+ """`gpt-6.2-sol@low` -> ("gpt-6.2-sol", "low"); an id without a thinking level -> (id, None)."""
805
+ if mid and "@" in mid:
806
+ base, eff = mid.rsplit("@", 1)
807
+ if base and re.fullmatch(r"[A-Za-z]+", eff):
808
+ return base, eff.lower()
809
+ return mid, None
810
+
811
+
812
+ def _tool_models(kind, cmd):
813
+ """The models `cmd` lists ([{slug, description, visibility, upgrade, priority}]), or None. The answer is kept
814
+ for DISCOVER_TTL_S in the share folder; an older answer is used when the command fails now."""
815
+ cache = share_dir() / f"models-{kind}.json"
816
+ try:
817
+ old = json.loads(cache.read_text())
818
+ except (OSError, ValueError):
819
+ old = None
820
+ if isinstance(old, dict) and old.get("cmd") == cmd and time.time() - old.get("ts", 0) < DISCOVER_TTL_S:
821
+ return old.get("models")
822
+ models = None
823
+ try:
824
+ r = subprocess.run(shlex.split(cmd), text=True, capture_output=True, timeout=20, stdin=subprocess.DEVNULL)
825
+ out = r.stdout
826
+ data = json.loads(out[out.index("{"):]) if r.returncode == 0 and "{" in out else None
827
+ rows = data.get("models") if isinstance(data, dict) else data
828
+ if isinstance(rows, list):
829
+ models = [{k: m.get(k) for k in ("slug", "description", "visibility", "upgrade", "priority")}
830
+ for m in rows if isinstance(m, dict) and isinstance(m.get("slug"), str)]
831
+ except (OSError, ValueError, subprocess.TimeoutExpired):
832
+ models = None
833
+ if not models:
834
+ return old.get("models") if isinstance(old, dict) and old.get("cmd") == cmd else None
835
+ with contextlib.suppress(OSError):
836
+ cache.parent.mkdir(parents=True, exist_ok=True)
837
+ cache.write_text(json.dumps({"ts": time.time(), "cmd": cmd, "models": models}))
838
+ return models
839
+
840
+
841
+ def newest_of(models, family):
842
+ """The tool's preferred current model of a family (a word in its id): not hidden, not legacy, lowest priority."""
843
+ cands = [m for m in models if family.lower() in re.split(r"[-_.@/]", m["slug"].lower())
844
+ and m.get("visibility") != "hide" and not m.get("upgrade")
845
+ and not LEGACY_RE.search(m.get("description") or "")]
846
+ prio = lambda m: m["priority"] if isinstance(m.get("priority"), (int, float)) else 1e9
847
+ return min(cands, key=lambda m: (prio(m), m["slug"]), default=None)
848
+
849
+
850
+ def discover_models(cat):
851
+ """For each [discover.<kind>] whose tool is installed: ask it for its models and put the newest model of each
852
+ family into the levels it names (small / medium / high, each a family and a thinking level). The shipped
853
+ entries of that kind are the fallback: they are replaced only when the tool answered."""
854
+ if os.environ.get("ORCH_MODELS_DISCOVER", "1").lower() in ("0", "off", "false", "no"):
855
+ return
856
+ for kind, cfg in cat["discover"].items():
857
+ cmd = cfg.get("cmd")
858
+ try:
859
+ exe = shlex.split(cmd)[0] if cmd else None
860
+ except ValueError:
861
+ exe = None
862
+ if not exe or not shutil.which(exe):
863
+ continue
864
+ models = _tool_models(kind, cmd)
865
+ if not models:
866
+ continue
867
+ shipped = {mid: m for mid, m in cat["models"].items() if m.get("kinds") == [kind]}
868
+ made, used = {}, set()
869
+ for level in TIERS:
870
+ want = cfg.get(level)
871
+ if not isinstance(want, dict) or not want.get("family"):
872
+ continue
873
+ m = newest_of(models, want["family"])
874
+ if not m:
875
+ continue
876
+ mid = m["slug"].lower() + (f"@{want['effort']}" if want.get("effort") else "")
877
+ like = next((x for x in shipped.values() if str(x.get("tier", "")).lower() == level), None) or {}
878
+ made[mid] = dict(like, kinds=[kind], tier=level, found=True, evidence=(
879
+ f"found by `{cmd}`: \"{(m.get('description') or '').strip()}\". {level} level = the newest "
880
+ f"{want['family']} model" + (f" on {want['effort']} thinking" if want.get("effort") else "")
881
+ + f" ([discover.{kind}]). Ratings copied from the shipped {level} entry; not benchmarked here."))
882
+ used.add(m["slug"])
883
+ if not made:
884
+ continue
885
+ for mid in shipped:
886
+ cat["models"].pop(mid, None)
887
+ cat["models"].update(made)
888
+ cat["found"][kind] = {"cmd": cmd, "used": sorted(used),
889
+ "skipped": sorted(x["slug"] for x in models if x["slug"] not in used
890
+ and (x.get("upgrade") or LEGACY_RE.search(x.get("description") or "")))}
891
+
892
+
784
893
  def model_denied(cat, mid):
785
894
  """The policy pattern that forbids this model, or None."""
786
895
  if not cat or not mid:
@@ -851,15 +960,19 @@ def cmd_models(args):
851
960
  return
852
961
  if sub:
853
962
  die("usage: orch models [check <id> | show <id>]")
854
- print(f"{'model':<18} {'tier':<7} {'kinds':<17} {'reas':>4} {'code':>4} {'arch':>4} {'inst':>4} {'tool':>4} "
963
+ print(f"{'model':<20} {'tier':<7} {'kinds':<17} {'reas':>4} {'code':>4} {'arch':>4} {'inst':>4} {'tool':>4} "
855
964
  f"{'plan':>4} {'speed':>5} {'ctx k':>6} open")
856
965
  for tier in reversed(TIERS):
857
966
  for mid, m in cat["models"].items():
858
967
  if model_tier(cat, mid) != tier or model_denied(cat, mid):
859
968
  continue
860
- print(f"{mid:<18} {tier:<7} {','.join(m.get('kinds', [])):<17} "
969
+ print(f"{mid:<20} {tier:<7} {','.join(m.get('kinds', [])):<17} "
861
970
  + " ".join(f"{m.get(k, '-'):>4}" for k in RATINGS[:-1])
862
971
  + f" {m.get('speed', '-'):>5} {m.get('context_k') or '-':>6} {'yes' if m.get('open_weights') else 'no'}")
972
+ for kind, f in cat.get("found", {}).items():
973
+ print(f"\n{kind} models found by `{f['cmd']}`: {', '.join(f['used'])}"
974
+ + (f" (not used, the tool calls them legacy: {', '.join(f['skipped'])})" if f["skipped"] else ""))
975
+ print(f" an id ending in @<level> (e.g. @low) is that model on that thinking level")
863
976
  print("\nTiers (a model needs this reasoning rating to serve the tier):")
864
977
  for tier in TIERS:
865
978
  tv = cat["tiers"].get(tier) or {}
@@ -951,7 +1064,8 @@ def has_open_questions(t):
951
1064
  return bool(vals) and vals != ["none"]
952
1065
 
953
1066
 
954
- AGENT_RE = re.compile(r"([\w.-]+)\s*\(\s*([\w.-]+)(?:\s*:\s*([^\s@)]+))?(?:\s+@pane:([^\s)]+))?\s*\)")
1067
+ # a model may carry a thinking level after @ (`codex: gpt-6.2-sol@low`); a pane id follows a space (` @pane:w1:p3`)
1068
+ AGENT_RE = re.compile(r"([\w.-]+)\s*\(\s*([\w.-]+)(?:\s*:\s*([^\s)]+?))?(?:\s+@pane:([^\s)]+))?\s*\)")
955
1069
 
956
1070
 
957
1071
  def parse_agents(s):
@@ -6134,11 +6248,42 @@ def cmd_report(args):
6134
6248
  print(f" rule broken {n}x: {r}")
6135
6249
 
6136
6250
 
6137
- def launch_cmd(kind, v, model=None, strict=True, role=None):
6251
+ def git_common_dir(cwd=None):
6252
+ """The absolute .git folder of the repo `cwd` is in (a worktree's main repo .git), or None outside a repo."""
6253
+ try:
6254
+ r = subprocess.run(["git", "rev-parse", "--path-format=absolute", "--git-common-dir"], text=True,
6255
+ capture_output=True, timeout=10, cwd=str(cwd or ROOT or Path.cwd()))
6256
+ except (OSError, subprocess.TimeoutExpired):
6257
+ return None
6258
+ return r.stdout.strip() if r.returncode == 0 and r.stdout.strip() else None
6259
+
6260
+
6261
+ def fill_launch(cmd, cwd=None):
6262
+ """Put the repo's .git folder where a launch command says {git_dir}. Outside a repo the option that needs it is
6263
+ left out (with the `-c` before it), so the command still starts."""
6264
+ if "{git_dir}" not in cmd:
6265
+ return cmd
6266
+ gd = git_common_dir(cwd)
6267
+ out = []
6268
+ for tok in shlex.split(cmd):
6269
+ if "{git_dir}" in tok:
6270
+ if gd:
6271
+ out.append(tok.replace("{git_dir}", gd))
6272
+ elif out and out[-1] in ("-c", "--config"):
6273
+ out.pop()
6274
+ continue
6275
+ out.append(tok)
6276
+ return shlex.join(out)
6277
+
6278
+
6279
+ def launch_cmd(kind, v, model=None, strict=True, role=None, cwd=None):
6138
6280
  """The shell command that starts agent `kind` in a pane, on `model` when given. With strict=False a kind
6139
6281
  without a model_flag starts on its default model instead of failing (the caller says so). role="reviewer"
6140
- uses the kind's `review_launch` when it has one: the same tool with its code-editing tools turned off."""
6141
- cmd = (v.get("review_launch") if role == "reviewer" else None) or v.get("launch") or v.get("binary", kind)
6282
+ uses the kind's `review_launch` when it has one: the same tool with its code-editing tools turned off.
6283
+ A model `<id>@<level>` on a kind with an `effort_flag` starts <id> with that thinking level. `cwd` is the
6284
+ folder the agent will run in ({git_dir} is filled in from it)."""
6285
+ cmd = fill_launch((v.get("review_launch") if role == "reviewer" else None) or v.get("launch")
6286
+ or v.get("binary", kind), cwd)
6142
6287
  if model:
6143
6288
  cat = models_catalog()
6144
6289
  why = model_denied(cat, model)
@@ -6152,7 +6297,10 @@ def launch_cmd(kind, v, model=None, strict=True, role=None):
6152
6297
  kinds = ((cat or {}).get("models", {}).get(model.lower()) or {}).get("kinds")
6153
6298
  if kinds and kind not in kinds:
6154
6299
  print(f"WARN: the catalog lists {model} for {', '.join(kinds)}, not {kind}", file=sys.stderr)
6155
- cmd += f" {v['model_flag']} {shlex.quote(model)}"
6300
+ base, effort = split_effort(model) if v.get("effort_flag") else (model, None)
6301
+ cmd += f" {v['model_flag']} {shlex.quote(base)}"
6302
+ if effort:
6303
+ cmd += " " + v["effort_flag"].replace("{effort}", shlex.quote(effort))
6156
6304
  return cmd
6157
6305
 
6158
6306
 
@@ -6238,6 +6386,9 @@ def cmd_team(args):
6238
6386
  if top and tier.get(top) != "high":
6239
6387
  print(f"\nNOTE: the strongest allowed {kind} model is {top} ({tier.get(top)} tier): high-tier milestones go to "
6240
6388
  f"it, and `orch sync` will say so")
6389
+ if top and v.get("model_flag") and "lead" in roles:
6390
+ print(f"\nYour own lead pane on the strongest level (start it like this, then write `Lead: lead ({kind}: {top})`):"
6391
+ f"\n {launch_cmd(kind, v, top, strict=False)}")
6241
6392
  print(f"\nCheck these are models your {kind} really reaches (`--models a,b` to choose others).")
6242
6393
  print("\nThese panes don't exist yet. After `orch sync` and `orch start`, `orch team up` opens each one in its "
6243
6394
  "own folder, on its model, and names it.")
@@ -6305,7 +6456,7 @@ def team_up(args):
6305
6456
  print(f"SKIP {name}: kind {kind!r} is not in the agent registry — start it yourself in {d}")
6306
6457
  failed += 1
6307
6458
  continue
6308
- cmd = launch_cmd(kind, v, model, strict=False, role="reviewer" if name == st.get("reviewer") else None)
6459
+ cmd = launch_cmd(kind, v, model, strict=False, role="reviewer" if name == st.get("reviewer") else None, cwd=d)
6309
6460
  split = [HERDR, "pane", "split"] + ([last] if last else []) + \
6310
6461
  ["--direction", "down" if last else "right", "--cwd", d, "--no-focus"]
6311
6462
  if dry:
@@ -6478,7 +6629,7 @@ def rename_lost(st, hints=True, keep_out=()):
6478
6629
  still[n] = pick if own else None
6479
6630
  v = reg.get(w.get("kind"))
6480
6631
  cmd = (launch_cmd(w.get("kind"), v, w.get("model"), strict=False,
6481
- role="reviewer" if n == st.get("reviewer") else None)
6632
+ role="reviewer" if n == st.get("reviewer") else None, cwd=d)
6482
6633
  if v else (w.get("kind") or "<its agent>"))
6483
6634
  say(f"LOST {n}: pane {pick} is in its folder ({short(d)}), but herdr sees no agent running in it. "
6484
6635
  + (f"`orch team up` starts it there; or start it yourself (`{cmd}`)" if own else
@@ -6638,7 +6789,7 @@ USAGE = """usage: orch <command> [args]
6638
6789
  rounds or escalation for them; the summary lists them as NOT done, with a follow-up
6639
6790
  fix <Mn> <text> [--to <worker>] a change to something Mn already landed: a small follow-up milestone, sent
6640
6791
  straight to the coder who built Mn (no new plan; check, review and summary still apply)
6641
- agents sync [kind...] install the orch-plan / orch-run skills so every installed agent sees each one exactly once,
6792
+ agents sync [kind...] install the orch-plan / orch-run / orch-explain skills so every installed agent sees each one exactly once,
6642
6793
  and remove old copies (run it after adding a new agent; the installer runs it)
6643
6794
  agents check check every installed agent sees each orch skill once (not missing, not twice)
6644
6795
  doctor [kind...] check installed agents against the real tool: version, launch flags, skills, herdr
@@ -6693,8 +6844,34 @@ While `orch autopilot` runs it holds the driver lease: other commands that chang
6693
6844
  HERDR_PANE_ENV = ("HERDR_ENV", "HERDR_PANE_ID", "HERDR_SOCKET_PATH", "HERDR_BIN_PATH")
6694
6845
 
6695
6846
 
6847
+ def sandbox_warnings():
6848
+ """Lines warning that this agent's own sandbox blocks what the lead needs: herdr's socket (Codex sets
6849
+ CODEX_SANDBOX_NETWORK_DISABLED=1 when its sandbox has no network) or writing the repo's .git. [] when fine."""
6850
+ out, codex = [], any(k.startswith("CODEX_") for k in os.environ)
6851
+ if os.environ.get("CODEX_SANDBOX_NETWORK_DISABLED") == "1":
6852
+ out.append("WARN this pane runs in Codex's sandbox with the network off, so orch's herdr calls from here "
6853
+ "(team up, sending work, waking you) are refused or wait for an approval each time.")
6854
+ gd = git_common_dir(Path.cwd())
6855
+ if gd:
6856
+ try:
6857
+ fd, probe = tempfile.mkstemp(dir=gd, prefix=".orch-probe-")
6858
+ os.close(fd)
6859
+ os.unlink(probe)
6860
+ except OSError:
6861
+ out.append(f"WARN the repo's .git folder ({short(gd)}) can't be written from this pane, so `orch start` "
6862
+ f"(the branch and the coders' folders) fails here.")
6863
+ if out and codex:
6864
+ v = (registry(required=False) or {}).get("codex") or {}
6865
+ out.append(" Fix: quit this Codex and start it again with orch's command (it opens just those two):\n "
6866
+ + launch_cmd("codex", v, None, strict=False, cwd=Path.cwd()) + "\n (`orch agents launch codex "
6867
+ "--role lead --model <id>` adds a model; `orch models` lists them)")
6868
+ return out
6869
+
6870
+
6696
6871
  def lead_check():
6697
6872
  """Preflight: is this agent driving Herdr? HERDR_ENV=1 is the fast path; otherwise ask the herdr server."""
6873
+ for line in sandbox_warnings():
6874
+ print(line)
6698
6875
  if os.environ.get("HERDR_ENV") == "1":
6699
6876
  print(f"OK inside a Herdr pane (HERDR_ENV=1, pane {os.environ.get('HERDR_PANE_ID') or '?'})")
6700
6877
  return
@@ -6912,6 +7089,9 @@ def cmd_lead(args):
6912
7089
  pb = asset("playbooks/subagent.md") or die("playbooks/subagent.md not found next to orch or in the install")
6913
7090
  label = "run (subagent mode)"
6914
7091
  print(f"herdr-orchestra {installed_version()} — lead playbook: {label}\n")
7092
+ if not subagent:
7093
+ for line in sandbox_warnings():
7094
+ print(line)
6915
7095
  if not part and not subagent:
6916
7096
  lead_self_name()
6917
7097
  if subagent and sub == "plan":
@@ -7070,8 +7250,9 @@ def _ours(p):
7070
7250
  text = f.read_text(errors="replace") if f.is_file() else ""
7071
7251
  except OSError:
7072
7252
  return False
7073
- # every version's skills and commands: thin wrappers say "orch lead", the first (4.0) skills "Orchestrator step"
7074
- return "orch lead" in text or "Orchestrator step" in text
7253
+ # every version's skills and commands: thin wrappers say "orch lead", the first (4.0) skills "Orchestrator step",
7254
+ # orch-explain (6.9) carries its playbook, whose heading is "Simple & Visual Explanation Playbook"
7255
+ return "orch lead" in text or "Orchestrator step" in text or "Simple & Visual Explanation Playbook" in text
7075
7256
 
7076
7257
 
7077
7258
  def _remove(p):
@@ -7267,7 +7448,7 @@ def cmd_agents(args):
7267
7448
  missing = [k for k, v in reg.items()
7268
7449
  if installed[k] and any(st != "ok" for _, st in agent_assets(v))]
7269
7450
  if missing:
7270
- print(f"\n{', '.join(missing)}: orch-plan/orch-run missing or listed twice — run: orch agents sync")
7451
+ print(f"\n{', '.join(missing)}: orch skills (orch-plan/orch-run/orch-explain) missing or listed twice — run: orch agents sync")
7271
7452
  print(f"\nOverride or add kinds in {user_agents_file()}")
7272
7453
 
7273
7454
 
@@ -7299,7 +7480,14 @@ def doctor_kind(kind, v, full=True):
7299
7480
  launch = shlex.split(v.get(key) or binary)
7300
7481
  except ValueError:
7301
7482
  launch = [binary]
7302
- flags += [f for f in (tok.split("=")[0] for tok in launch[1:] if tok.startswith("-")) if f not in flags]
7483
+ for f in (tok.split("=")[0] for tok in launch[1:] if tok.startswith("-")):
7484
+ if f not in flags: # one line per flag, even when a command repeats it (codex -c ... -c ...)
7485
+ flags.append(f)
7486
+ for key in ("launch", "review_launch"):
7487
+ for part in v.get("launch_needs") or [] if v.get(key) else []:
7488
+ if part not in v[key]:
7489
+ out.append((False, f"{key} has no `{part}`: without it orch's commands fail inside {kind} (its sandbox "
7490
+ f"blocks them) — keep it in your own launch in {short(user_agents_file())}"))
7303
7491
  for fl in flags:
7304
7492
  if code is None:
7305
7493
  out.append((False, f"launch flag {fl}: `{hcmd}` did not run ({help_.strip()[:80]})"))
@@ -0,0 +1,17 @@
1
+ ---
2
+ description: "Explain a concept, codebase flow, bug fix or architecture change simply: plain words, a parts table, an ASCII flow and why it matters"
3
+ ---
4
+ # Simple & Visual Explanation Playbook
5
+
6
+ Whenever explaining a concept, feature, bug fix, or system flow, use this 4-part structure:
7
+
8
+ 1. **Plain-English Summary:** 2–3 short bullets using a simple everyday analogy. No heavy jargon.
9
+ 2. **Key Parts Involved:** A small table of the components/steps, what each does, and a concrete example.
10
+ 3. **Visual Flow:** A compact ASCII flowchart (under 65 chars wide so it fits narrow terminal panes) showing the flow or "Before vs. Now".
11
+ 4. **Why It Matters:** A 3-row table summarizing the main takeaway, edge case, or benefit.
12
+
13
+ ## Rules
14
+ - Keep sentences short and scannable.
15
+ - Use one consistent example (like `User 1`, `Session S1`, `Turn T1`) across all 4 sections.
16
+
17
+ What to explain: $ARGUMENTS
package/install.sh CHANGED
@@ -102,8 +102,8 @@ case "$ACTION" in
102
102
  done < "$MANIFEST"
103
103
  fi
104
104
  rm -f "$BIN/orch"
105
- rm -rf "$SKILLS/orch-plan" "$SKILLS/orch-run" "$SHARE"
106
- for d in "${OC_CMDS[@]}"; do rm -f "$d/orch-plan.md" "$d/orch-run.md"; done
105
+ rm -rf "$SKILLS/orch-plan" "$SKILLS/orch-run" "$SKILLS/orch-explain" "$SHARE"
106
+ for d in "${OC_CMDS[@]}"; do rm -f "$d/orch-plan.md" "$d/orch-run.md" "$d/orch-explain.md"; done
107
107
  say "herdr-orchestra removed. (The herdr skill and your projects' .orchestrate/ folders were left alone.)"
108
108
  exit 0;;
109
109
  esac
@@ -175,7 +175,7 @@ touch "$MANIFEST"
175
175
  record() { grep -qxF "$1" "$MANIFEST" || echo "$1" >> "$MANIFEST"; }
176
176
  install_skills() { # install_skills <skills dir>
177
177
  local s
178
- for s in orch-plan orch-run; do
178
+ for s in orch-plan orch-run orch-explain; do
179
179
  rm -rf "${1:?}/$s"; mkdir -p "$1/$s"
180
180
  cp "$CUR/skills/$s/SKILL.md" "$1/$s/SKILL.md"; record "$1/$s"
181
181
  done
@@ -194,7 +194,7 @@ if ! "$CUR/bin/orch" agents sync; then
194
194
  warn "per-agent skills skipped (orch agents sync failed — Python >= 3.11 needed for the agent registry)"
195
195
  install_skills "$SKILLS" # ~/.agents/skills: Amp, OpenCode and Codex read it
196
196
  install_commands "${OC_CMDS[0]}" opencode-commands # one folder only: OpenCode reads both, two = listed twice
197
- rm -f "${OC_CMDS[1]}/orch-plan.md" "${OC_CMDS[1]}/orch-run.md"
197
+ rm -f "${OC_CMDS[1]}/orch-plan.md" "${OC_CMDS[1]}/orch-run.md" "${OC_CMDS[1]}/orch-explain.md"
198
198
  fi
199
199
 
200
200
  # clean up files from pre-repo kit versions
@@ -75,7 +75,11 @@ open_weights = false
75
75
  evidence = "Claude Code alias for the current Opus (code.claude.com/docs/en/model-config, 2026-11). Ratings: maintainer estimate; not benchmarked here."
76
76
 
77
77
  # ---------------------------------------------------------------- Codex CLI (`codex --model <id>`)
78
- [models.gpt-6-luna]
78
+ # A Codex id may end in @<thinking level>: `gpt-6.2-sol@low` starts gpt-6.2-sol with
79
+ # `-c model_reasoning_effort=low`. The same model thinking harder is another entry with its own tier.
80
+ # These three are the fallback: when the codex command is installed, orch asks it for its current models
81
+ # ([discover.codex] below) and puts the newest of each family in these levels instead.
82
+ [models."gpt-6-luna@high"]
79
83
  kinds = ["codex"]
80
84
  tier = "small"
81
85
  reasoning = 2
@@ -85,23 +89,46 @@ instructions = 4
85
89
  tools = 4
86
90
  planning = 2
87
91
  speed = 5
88
- context_k = 0
92
+ context_k = 272
89
93
  open_weights = false
90
- evidence = "Lowest-cost tier in the Codex model picker per a third-party guide (codex.danielvaughan.com, 2026-09-25). Id and ratings unverified here: check `codex` on your machine."
94
+ evidence = "`codex debug models` (codex-cli 0.172, 2026-11): \"Fast and affordable model for easier tasks\", thinking levels low..max. Small level chosen by the maintainer (2026-11-24): Luna on high thinking. Ratings: maintainer estimate; not benchmarked here."
91
95
 
92
- [models.gpt-6-sol]
96
+ [models."gpt-6.2-sol@low"]
93
97
  kinds = ["codex"]
94
98
  tier = "medium"
95
- reasoning = 4
99
+ reasoning = 3
96
100
  coding = 4
97
101
  architecture = 3
98
102
  instructions = 4
99
103
  tools = 4
104
+ planning = 3
105
+ speed = 4
106
+ context_k = 500
107
+ open_weights = false
108
+ evidence = "`codex debug models` (codex-cli 0.172, 2026-11): \"Fast, go-to model for coding and everyday work\" (Codex's first model). Medium level chosen by the maintainer (2026-11-24): Sol on low thinking. Ratings: maintainer estimate; not benchmarked here."
109
+
110
+ [models."gpt-6.2-sol@medium"]
111
+ kinds = ["codex"]
112
+ tier = "high"
113
+ reasoning = 4
114
+ coding = 4
115
+ architecture = 4
116
+ instructions = 4
117
+ tools = 4
100
118
  planning = 4
101
119
  speed = 3
102
- context_k = 0
120
+ context_k = 500
103
121
  open_weights = false
104
- evidence = "Baseline tier for standard agentic work per a third-party guide (codex.danielvaughan.com, 2026-09-25). Id and ratings unverified here: check `codex` on your machine."
122
+ evidence = "`codex debug models` (codex-cli 0.172, 2026-11): \"Fast, go-to model for coding and everyday work\". High level chosen by the maintainer (2026-11-24): Sol on medium thinking, so a Codex team has a high level without Astra. Ratings: maintainer estimate; not benchmarked here."
123
+
124
+ [discover.codex]
125
+ # How orch finds Codex's current models: it runs `cmd` (at most every few hours, the answer is cached), skips
126
+ # models Codex hides or calls legacy / previous generation, and takes the newest model of each family (a word in
127
+ # its id). Each level is that model on a thinking level. If the command fails, the entries above are used.
128
+ cmd = "codex debug models"
129
+ small = { family = "luna", effort = "high" }
130
+ medium = { family = "sol", effort = "low" }
131
+ high = { family = "sol", effort = "medium" }
105
132
 
106
133
  # ---------------------------------------------------------------- open-weight models (optional)
107
134
  # These need somewhere to run: a local server (Ollama, LM Studio, vLLM) or a hosted provider. The id is what
@@ -0,0 +1,17 @@
1
+ ---
2
+ description: "Explain a concept, codebase flow, bug fix or architecture change simply: plain words, a parts table, an ASCII flow and why it matters"
3
+ ---
4
+ # Simple & Visual Explanation Playbook
5
+
6
+ Whenever explaining a concept, feature, bug fix, or system flow, use this 4-part structure:
7
+
8
+ 1. **Plain-English Summary:** 2–3 short bullets using a simple everyday analogy. No heavy jargon.
9
+ 2. **Key Parts Involved:** A small table of the components/steps, what each does, and a concrete example.
10
+ 3. **Visual Flow:** A compact ASCII flowchart (under 65 chars wide so it fits narrow terminal panes) showing the flow or "Before vs. Now".
11
+ 4. **Why It Matters:** A 3-row table summarizing the main takeaway, edge case, or benefit.
12
+
13
+ ## Rules
14
+ - Keep sentences short and scannable.
15
+ - Use one consistent example (like `User 1`, `Session S1`, `Turn T1`) across all 4 sections.
16
+
17
+ What to explain: $ARGUMENTS
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "herdr-orchestra",
3
- "version": "6.7.2",
3
+ "version": "6.9.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": {
@@ -55,7 +55,8 @@
55
55
  "pi": {
56
56
  "skills": [
57
57
  "./pi/skills/orch-plan",
58
- "./skills/orch-run"
58
+ "./skills/orch-run",
59
+ "./skills/orch-explain"
59
60
  ],
60
61
  "extensions": [
61
62
  "./extensions/orch-mode.ts"
package/playbooks/plan.md CHANGED
@@ -113,7 +113,7 @@ Then the run is the same as any run (`orch lead run`): the coder builds it, the
113
113
  - You are never a coder or the reviewer in your own run. Another pane of the same kind as you is fine.
114
114
  - 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.
115
115
  - If it's unclear which pane should play which role, ask.
116
- - **Models.** Run `orch models`: the catalog of models with a tier (small / medium / high) and ratings for reasoning, coding, architecture, instruction following, tool use, planning, speed and context size, and the models policy keeps out of runs. Find out which model each pane runs (ask the developer if herdr or the pane doesn't show it) and write it in the plan as `name (kind: model)`. Use the models the installed agents already reach; nobody has to set up anything new. A pane on a model the policy denies cannot be used: ask the developer to restart it on another model (`orch agents launch <kind> --model <id>` prints the command). A model that is not in the catalog is allowed but has no tier; say so, and suggest adding it to `~/.config/herdr-orchestra/models.toml`.
116
+ - **Models.** Run `orch models`: the catalog of models with a tier (small / medium / high) and ratings for reasoning, coding, architecture, instruction following, tool use, planning, speed and context size, and the models policy keeps out of runs. Find out which model each pane runs (ask the developer if herdr or the pane doesn't show it) and write it in the plan as `name (kind: model)`. Write ids exactly as `orch models` lists them: a Codex id can end in a thinking level (`gpt-6.2-sol@low` is Sol on low thinking; Codex's high tier is `gpt-6.2-sol@medium`). Use the models the installed agents already reach; nobody has to set up anything new. A pane on a model the policy denies cannot be used: ask the developer to restart it on another model (`orch agents launch <kind> --model <id>` prints the command). A model that is not in the catalog is allowed but has no tier; say so, and suggest adding it to `~/.config/herdr-orchestra/models.toml`.
117
117
  - **The team should cover the work.** If the plan will have high-tier milestones and no coder runs a high-tier model, say so and propose the pane to start (kind, model, launch command). Don't ask for more panes than the milestones need. You, the lead, should run a high-tier model; the reviewer should be at least as strong as the work it reviews.
118
118
 
119
119
  ## 4. Milestones: as many as the feature needs, and no more
@@ -212,7 +212,7 @@ Scope: warn | strict
212
212
  Budget: <e.g. 3h — optional>
213
213
  Estimate: <how long the whole feature should take, e.g. 1h30m>
214
214
  Lead: lead (<your kind>: <your model>)
215
- Workers: claude-1 (claude: sonnet), claude-2 (claude: haiku), codex-1 (codex: gpt-6-sol)
215
+ Workers: claude-1 (claude: sonnet), claude-2 (claude: haiku), codex-1 (codex: gpt-6.2-sol@low)
216
216
  Reviewer: reviewer (claude: opus) | none
217
217
 
218
218
  ## Global instructions
@@ -0,0 +1,17 @@
1
+ ---
2
+ name: orch-explain
3
+ description: Explain any concept, codebase flow, bug fix, or architecture change in a simple, visual, and jargon-free way. Use when the user asks to explain something simply or asks "how does X work".
4
+ ---
5
+
6
+ # Simple & Visual Explanation Playbook
7
+
8
+ Whenever explaining a concept, feature, bug fix, or system flow, use this 4-part structure:
9
+
10
+ 1. **Plain-English Summary:** 2–3 short bullets using a simple everyday analogy. No heavy jargon.
11
+ 2. **Key Parts Involved:** A small table of the components/steps, what each does, and a concrete example.
12
+ 3. **Visual Flow:** A compact ASCII flowchart (under 65 chars wide so it fits narrow terminal panes) showing the flow or "Before vs. Now".
13
+ 4. **Why It Matters:** A 3-row table summarizing the main takeaway, edge case, or benefit.
14
+
15
+ ## Rules
16
+ - Keep sentences short and scannable.
17
+ - Use one consistent example (like `User 1`, `Session S1`, `Turn T1`) across all 4 sections.