Skip to content

feat: research director — periodic strategic redirection (opt-in)#26

Merged
aktasbatuhan merged 1 commit into
mainfrom
feat/research-director
Jun 8, 2026
Merged

feat: research director — periodic strategic redirection (opt-in)#26
aktasbatuhan merged 1 commit into
mainfrom
feat/research-director

Conversation

@aktasbatuhan

Copy link
Copy Markdown
Member

An optional meta-agent that periodically reads the evolving population and writes one strategic directive into the steering channel for the next interval — aimed at breaking the local plateaus the population loop gets stuck in (autocorrelation parked at ~C 1.52 across every roster/prompt/config; that's a strategy bottleneck, not a tunable knob).

Design

Grounded in how the autoresearch loop it's modeled on actually works — a single agent in a keep/discard loop whose quality comes from a good instruction skill + a structured memory log, not multi-turn deliberation:

  • kaievolve/research_director.pyResearchDirector: gathers the experiment log (current best, trajectory, top programs + the HMRD notes their authors left), sees its own previous directive and whether best-so-far improved (keep vs pivot), makes one LLM call, writes research_directive.md, and keeps memory across fires in research_log.md. Fully fail-safe — any error is swallowed so it can never break the evolution loop.
  • skills/research-director/SKILL.md — the director's instructions, including the full KaiEvolve mechanism (island MAP-Elites, LLM-mutated programs, frozen evaluator) and how its directive reaches the agents (folded into the steering brief that rides atop every generation prompt).
  • Wiring — fires on its own cadence (research_director_interval, decoupled from migration so it gets enough shots), and the directive is folded into the existing steering channel in _create_database_snapshot, so it reuses plumbing that already reaches every worker.
  • Opt-in: prompt.research_director_enabled (default off) + research_director_interval.

Verification

  • test_research_director.py (5): directive written + rendered into the steering block, skill+task+experiment-log present in the prompt, keep/pivot state advances across fires, and the fail-safe (a throwing DB yields None, not a crash).
  • Full suite green (347 tests).

Single call per fire to start (faithful to the source's per-decision simplicity); multi-turn / web-search grounding / per-island targeting are natural follow-ups if the A/B shows uplift.

🤖 Generated with Claude Code

A meta-agent that periodically reads the population and writes ONE strategic
directive into the steering channel for the next interval, to break the local
plateaus the population-level loop gets stuck in (e.g. autocorrelation ~C 1.52
across every roster/prompt/config we tried — a strategy bottleneck, not a knob).

Design (grounded in how Karpathy's autoresearch actually works: a single agent
in a keep/discard loop, quality from a good skill + a structured memory log, not
multi-turn deliberation):
- kaievolve/research_director.py — ResearchDirector: gathers the experiment log
  (best, trajectory, top programs + their HMRD notes), sees its own last
  directive and whether best improved (keep vs pivot), makes ONE LLM call, writes
  research_directive.md, and keeps memory in research_log.md. Fully fail-safe.
- skills/research-director/SKILL.md — the director's instructions, including the
  full KaiEvolve mechanism + how steering propagates its directive to agents.
- Wired into the controller on its OWN cadence (research_director_interval,
  decoupled from migration so it fires often enough to matter); the directive is
  folded into the existing steering channel that already reaches every agent.
- Gated by prompt.research_director_enabled (default off). Tests in
  test_research_director.py (5). Full suite green (347).

Single-call per fire to start (faithful to autoresearch's per-decision
simplicity); multi-turn / web-search / per-island targeting are follow-ups.
@aktasbatuhan aktasbatuhan merged commit c9609ae into main Jun 8, 2026
1 check passed
@aktasbatuhan aktasbatuhan deleted the feat/research-director branch June 8, 2026 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant