fix(supervise): real default supervisor prompt (was empty) — the topology-tournament gap#399
Merged
Merged
Conversation
… empty) The supervisor brain defaulted to an EMPTY systemPrompt, so a supervise()/delegate() call with no authored prompt gave the LLM brain the coordination verbs but NO policy for when to use them — it over-spawned (15 workers for a 2-module task, 66x a single agent's tokens) or stalled (0 work). Add defaultSupervisorPrompt encoding the discipline the topology tournament showed wins: do small work yourself, delegate sparingly (conserved budget), give each worker a bounded brief, manage the context lifecycle, settle only on real delivery. A profile still overrides it; an explicit '' is preserved (?? fires on undefined only). Gates green, 50 supervise tests pass.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The gap the topology tournament found: smart-supervise / delegate-to-supervisor (the real
supervise()/delegate()LLM-brain front door) scored 0/80 (flaky) and, when they ran, over-spawned 15 workers for a 2-module task at 66x a single agent's tokens — while every lower-level composition (Scope, combinators) hit 80/80 cheaply.Root cause:
supervisor-agent.tsdefaulted the brain's systemPrompt to''. The brain had the coordination verbs but no policy — so it flailed. The supervisor's competence IS its prompt (AgentProfile law); the default was a competence vacuum.Fix (no bloat — a default prompt, not a flag):
defaultSupervisorPromptencodes the discipline the tournament showed wins (worker-heavy): do small work yourself, delegate sparingly against the conserved budget, give each worker a bounded brief, manage the context lifecycle, settle on real delivery. Profile still overrides; explicit '' preserved.Gates green; 50 supervise tests pass. Empirical confirmation pending: re-run the tournament's smart-supervise arm with this default to confirm it spawns sensibly + scores better — that's the next verification, not yet claimed.