Skip to content

LeapFlow 0.2.0 — Teacher/Student World-Model Self-Evolution - #46

Merged
wangxingjun778 merged 6 commits into
mainfrom
feat/leapspace
Sep 15, 2026
Merged

wangxingjun778 merged 6 commits into
mainfrom
feat/leapspace

Conversation

@wangxingjun778

Copy link
Copy Markdown
Member

A two-agent architecture: the world model (cold path) reviews each session and distils what it learned into the student's next-turn context. It never acts — it changes what the agent knows. Self-evolution (writing new capabilities) is a separate, off-by-default switch.

Feature

  • World-model teacher grades every session and returns four-value adaptation verdicts — absorb / rebind / acquire / escalate — each carrying knowledge for the acting agent.
  • C1 — distilled knowledge: the teacher writes environment facts the student reads as context, enabling zero-code adaptation; entries retire by supersession, TTL, and explicit retract.
  • C2 — rebind preference: the teacher's recommended provider becomes a resolver selection preference, never a gate (an inadmissible candidate still loses to declarations).
  • C3 — gated acquisition: an acquire verdict becomes a queued plugin proposal, behind the new switch; queued still passes generation, validation, approval, sandbox, and trust.
  • evolution.enabled switch (default off) in its own Self-Evolution config category, announced at startup in both states.
  • Degradation feedback loop: plugin health becomes capability-scoped evidence; the teacher sees prior verdicts and available alternatives; recovery retires stale knowledge.

Fix

  • Lifecycle governor, durable trust ledger, and proposal sink were never wired in production (read via getattr against unassigned attributes) — Progressive Trust and acquisition were inert; now wired, with a startup audit to prevent regressions.
  • Single risk-clamp point for model-authored proposals, preserving the original requested_max_risk_level for audit.
  • rebind guard no longer rejects a provider the teacher was itself shown; retry-owned failure classes are filtered from the teacher; failure_class persisted.

Refactor

  • Removed the unused Thompson/UCB1/Bucketed selection policies and their state store (measured: consulted zero times, one candidate per capability) — kept the SelectionPolicy seam and GreedyPolicy.
  • intents are derived from acquire verdicts (single source of truth); one shared capability-name rule; one switch admits world-model evidence (was two knobs).

Enhance

  • Environment fingerprint on degradation facts, so one upstream change reads as a single root cause rather than N.
  • Inert-wiring audit tool (tools/audit_inert_wiring.py) added to CI.

Documentation

  • Third-party plugin development guide updated for the evolution contracts; repository-wide copyright headers.

wangxingjun778 and others added 6 commits September 7, 2026 15:45
Two-agent split: the world model (cold path) grades each session and distils
what it learned into the student's next-turn context. It answers four-value
adaptation verdicts (absorb / rebind / acquire / escalate), each carrying
knowledge for the acting agent.

- C1 distilled-knowledge channel with supersede/expire/retract retirement
- C2 rebind recommendation as a resolver preference (never a gate)
- C3 acquire -> queued plugin proposal, behind the evolution.enabled switch
- degradation feedback loop wires plugin health into capability evidence;
  recovery retires stale knowledge
- evolution.enabled switch (default off), own config category, announced at
  startup in both states
- fix: lifecycle governor / durable trust ledger / proposal sink were never
  wired in production; one clamp point for model-authored risk
- remove the unused Thompson/UCB1/Bucketed selection policies; keep the seam
- inert-wiring audit tool; repository-wide copyright headers

Verified: 3733 mock tests, journeys/regression/leapspace green, real-LLM S9
teacher accuracy with four-action discrimination.
@wangxingjun778
wangxingjun778 merged commit f5fcf9b into main Sep 15, 2026
1 of 2 checks passed
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.

2 participants