Evolution Model
Demiurge treats the runtime agents tree as a Git-versioned filesystem surface.
Evolution is not arbitrary self-modification of the host runtime. It is a host-owned workflow that edits an isolated worktree and promotes it only after review gates pass.
Agent Slots are a primary evolution surface. A proposal worktree can replace, reorder, or compose slot behavior while the host keeps provider calls, tools, approvals, state, Git revision promotion, and rollback behind stable contracts.
Current Flow
- The active core asks for evolution through the host tool runtime.
- The host creates
.evolve/runs/<run_id>/agentsas a Git worktree ofrefs/demiurge/live. - The host runs the
evolvercore with worktree-scoped editing tools. - Review runs host-owned gates and records the proposal at
refs/demiurge/runs/<run_id>. - Promote reruns gates, advances
refs/demiurge/previousandrefs/demiurge/live, and refreshes the live agents checkout.
Rollback is also host-owned.
Evolver Scope
The evolver core may edit authored files inside the isolated agents-tree worktree,
especially:
agent/skills/agent/tools/agent/input/agent/output/agent/bootstrap/
It may change agent.yaml only when that is the minimum needed to keep the
edited core loadable after an authored-surface edit.
What Evolution Must Not Do
Evolution proposal worktrees must not edit:
- source checkout files
- host config
- sessions
- production state
- release files
- dependency files
- runtime files outside the isolated worktree
.core.gitrefs directly.temp/reference checkouts
It also must not promote, roll back, install dependencies, or bypass host capabilities.
Contract
The exact agent-readable rules live in /docs/reference/contracts/evolver-safe-edits.