You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Convert greybeard to a leaf director; only Skywalker may spawn (#958)
* Convert greybeard to a leaf director; only Skywalker may spawn
CL-7670 converts the limited spawn CL-7662 kept with a recorded reason
into a leaf: greybeard loses the fleet verbs and the nested-orchestrator
tier, keeping its checklists, self-read, and provenance exactly as-is.
The registry test now pins Skywalker as the only closed director with
spawn permission, and stale nested-orchestrator references follow suit.
* Fix greybeard leaf wording coherence
Copy file name to clipboardExpand all lines: docs/ARCHITECTURE.md
+10-11Lines changed: 10 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -230,11 +230,11 @@ Built-in directors with `spawn.maySpawn` may themselves call `spawn_agent` (one
230
230
231
231
Every director package carries a required `tier: SubagentTier` field (`src/agent/directors/types.ts`) — data on the package, never a prompt instruction:
| 1 — `orchestrator`| skywalker (primary) | Full fleet control over the whole tree. |
236
-
| 2 — `nested-orchestrator`|greybeard, or any package with `spawn.maySpawn`| Same fleet surface, scoped to its own subtree: may manage only its own descendants, never a sibling or ancestor. |
237
-
| 3 — worker | every other director (`tier: "leaf"` on the package) | No fleet verbs. Mounts `ask_director` and `submit_result`. |
| 1 — `orchestrator`| skywalker (primary) | Full fleet control over the whole tree. |
236
+
| 2 — `nested-orchestrator`| any package with `spawn.maySpawn`(no closed director uses this tier today)| Same fleet surface, scoped to its own subtree: may manage only its own descendants, never a sibling or ancestor. |
237
+
| 3 — worker | every other director (`tier: "leaf"` on the package) | No fleet verbs. Mounts `ask_director` and `submit_result`. |
238
238
239
239
Enforcement is runtime code at the existing tool-mount point, not prompt wording — this is the fix for four prior mechanisms (`writePaths`, `report.requiredSections`, a `--config` comment, the thrash matcher) that were documented-as-enforced while enforcing nothing:
240
240
@@ -262,7 +262,7 @@ Every shipped specialist is a **director package** — a prompt-first `DirectorP
262
262
| counsel | Eng change plan (steps, paths, tests, risks) | Arch gate, product discovery, code |
263
263
| intern | Mechanical commands only | Ambiguous or product-design work |
| skywalker (primary session) | Full closed fleet |
305
+
| All other directors | no fleet delegation tools |
307
306
308
307
**Tool envelopes** prefer small `tools.allow` mounts over deny-everything. Shipped docs/design directors (shakespeare, rand, bruckheimer) mount write tools with no path-level lock. Lane routing is spawn policy (shakespeare = P/A/I docs, rand = DESIGN.md, bruckheimer = product discovery), not a file lock. There is no static per-package write-path declaration (CL-6952 removed it — no shipped director ever set one); instead spawn_agent records, without blocking, when two concurrently running dispatches land on the same cwd (see `intervention-log.ts`'s `conflict` class).
Copy file name to clipboardExpand all lines: docs/IMPLEMENTATION.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -170,7 +170,7 @@ Sixteen packages under `src/agent/directors/<id>/` register in `DIRECTOR_REGISTR
170
170
6. There is no static write-path declaration on packages or profiles (CL-6952 removed it — no shipped director ever set one). Instead, `agent-fleet.ts` tracks each running dispatch by cwd; a new mutating dispatch that lands on the same cwd as a live mutating peer (`pending_init`/`running`, and not a declared read-only `modelRole` of `explore`/`plan`/`review`/`test`) records at most one `concurrent-lane-overlap` entry per cwd wave in `intervention-log.ts` (class `conflict`). The wave flag clears when no live mutating writer remains for that cwd. Terminal-but-unsettled lanes (for example cancelled with `finishedAt` set while the run promise has not reached `finally`) are pruned from the map and do not warn. This is advisory only — it never blocks the spawn, since cwd overlap does not prove the two lanes touch the same files.
171
171
7. Spawn effort: pin > package `modelRole` default (`defaultEffortForDirector`; intern=low; plan/review/orchestrator=high; implement/explore/docs/test=medium) > orchestrator/worker binary > parent inheritance. Optional skills are listed in the identity header for awareness; workers do not mount `use_skill` (guidance is baked into package system prompts). Primary mounts `use_skill` for its own skill list.
172
172
173
-
Intent defaults: `intent=implement` → director `builder`; `explore` → `explorer`; `plan` → `counsel`; `review` → `critic`; general → error. Spawn: skywalker full fleet; greybeard intern/explorer/critic only; all other directors mount no fleet tools. Live `<env>` injects cwd, platform, arch, runtime, date, and git status on every chat and worker prompt.
173
+
Intent defaults: `intent=implement` → director `builder`; `explore` → `explorer`; `plan` → `counsel`; `review` → `critic`; general → error. Spawn: skywalker full fleet; all other directors, including greybeard, mount no fleet tools. Live `<env>` injects cwd, platform, arch, runtime, date, and git status on every chat and worker prompt.
There is **no catch-all worker**. `spawn_agent` requires `agent=…` or a non-general `intent` (implement/explore/plan/review→critic); bare dispatch and `intent=general` are refused. Named `spawn_agent(agent=…)` selects a director package without requiring a plugin profile, except `skywalker` which is the primary session identity and is refused as a spawned worker. Nested spawn is runtime-enforced: only skywalker (full fleet allowlist) and greybeard (intern/explorer/critic) may spawn; other workers have no fleet tools. Primary omits an allowlist so plugin profiles remain reachable from the main session.
167
+
There is **no catch-all worker**. `spawn_agent` requires `agent=…` or a non-general `intent` (implement/explore/plan/review→critic); bare dispatch and `intent=general` are refused. Named `spawn_agent(agent=…)` selects a director package without requiring a plugin profile, except `skywalker` which is the primary session identity and is refused as a spawned worker. Nested spawn is runtime-enforced: only skywalker (full fleet allowlist) may spawn; all other workers, including greybeard, have no fleet tools. Primary omits an allowlist so plugin profiles remain reachable from the main session.
168
168
169
169
Corbits Code fans work out to short-lived **fleet agents** — workers with their own loop, tools, and checklist — while the primary session stays focused.
systemPrompt: `You are GreybeardDirector (Greybeard), a specialist in Corbits Code.
26
23
27
24
PRIMARY INTENT: architecture judgment. Judge approach soundness, constraint ownership, and backward-compatibility implications. Teach what holds and what does not. Do not fix or ship product code.
@@ -32,7 +29,7 @@ Follow style and philosophy conventions (baked into this prompt) when reviewing
32
29
33
30
Your value is analysis, not delegation: reach the judgment yourself with
34
31
targeted reads (read_file, grep) and pointed questions (ask_director)
35
-
before considering a spawn.
32
+
before concluding.
36
33
37
34
Review checklist — work the list in order:
38
35
1. Name the architectural claim under review (boundary, ownership, invariant, or BC surface).
@@ -41,9 +38,9 @@ Review checklist — work the list in order:
41
38
4. Rank risks for long-term maintainability and backward compatibility.
42
39
5. Report a clear verdict: hold / revise / block — with the why, not checklist theater.
43
40
44
-
Spawn only when a concrete unknown blocks that judgment. Package spawn rules allow intern (mechanical shell), explorer (map/read), and critic (code evidence). When spawning critic, pass non-empty success_criteria (runtime fail-closes without it). intern and explorer remain optional. Prefer doing the review yourself with mounted read/search tools. Do not invent numeric spawn caps or act as a scheduler — width follows the unknown, not a soft ladder. Spawn then idle; reports arrive as mailbox mail — do not poll.
41
+
Reach the judgment yourself and report it — you cannot spawn. Prefer doing the review yourself with mounted read/search tools. You are a leaf worker: no fleet verbs are mounted, so there is no delegation path. When a concrete unknown blocks the judgment, name it under Blockers (or ask the parent with ask_director) instead of delegating. Do not invent numeric spawn caps or act as a scheduler.
45
42
46
-
Blinders: do not call search_agents to discover the fleet (even when nested). You already know the limited spawn set; stay inside it. Do not spawn builder, counsel, skywalker, or other directors outside the allowlist.
43
+
Blinders: do not call search_agents to discover the fleet. Do not spawn builder, counsel, skywalker, or any other director. You are a leaf worker, not an orchestrator — delegation is the primary's job.
47
44
48
45
Guide quality — advise what good architecture looks like for this change. Do not assert enforcement theater (fake caps, pretend runtime gates, or "must spawn N" rules the harness does not enforce).
0 commit comments