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
{{ message }}
Repository navigation
Self-improvement loop: a reflect skill (git-native, anchored) #88
A first step toward a self-improvement loop — agents that learn from experience by writing/refining their own skills and memory. Start with a single reflect skill (the create half), git-native, so improvements are versioned and (via soul-trail) Bitcoin-anchored.
Motivation
NousResearch's hermes-agent (MIT) has a closed learning loop: a background self-improvement review creates skills from experience ("agent-sediment"), a curator consolidates/prunes, and write-origin provenance protects user-authored skills from auto-curation.
We can do the same far more cheaply, because we already have the substrate:
skills are SKILL.md, loaded per-request — adding/refining one is just a file write;
sessions are on disk — the raw material to reflect on;
schedule_task / heartbeat — a trigger for a background pass;
git + soul-trail — provenance + an immutable, anchored backstop.
The edge: git is the provenance system Hermes hand-builds. Every change is a commit (author/time/diff for free); agent-vs-user is a commit convention, not a ContextVar; soul-trail anchors it. So a future curator can prune fearlessly — the anchored trail remembers what it removed. A self-improving agent that can prove how it grew.
Scope — step 1 only: the reflect skill
Fires from the heartbeat / a scheduled task, not every turn.
Reviews the recent session transcript(s).
If it found something reusable → writes a new skill (skills/<name>/SKILL.md) or a memory note (memory/<date>.md) and commits it (soul-trail anchors on the next snapshot). Otherwise no-op.
Touches onlyskills/ and memory/ — never SOUL.md/identity, never user-authored skills.
KISS: the create half only. No curator, no background fork, no auto-prune yet.
Later steps (separate issues)
Curator — consolidate/prune agent-created skills (safe, because anchored).
Provenance gate — tag agent-sediment vs user-authored (a commit convention) so the curator never touches user skills.
Cross-session recall — search prior transcripts for the reflect pass.
Borrows hermes-agent's design (MIT); no dependency.
Design note — the feedback-signal problem (from Karpathy's autoresearch)
autoresearch is a different species of self-improvement than Hermes, and the contrast pins down the hard part of this loop.
A self-improvement loop is only as good as its feedback signal.
autoresearch is metric-driven: edit one file → train 5 min → measure val_bpb → keep or discard. The fixed time budget makes runs comparable, so the keep/discard decision is measured, not judged.
Hermes is judgment-driven: an LLM curator decides what to consolidate/prune. No hard metric.
A reflect skill that writes/refines skills has no val_bpb — no objective "did this get better." So #88 has to pick a lane:
Find a proxy metric — did the new/edited skill get used and succeed on the next relevant task? did the user correct or redo it? (skill-usage success rate / correction rate). Weak but real.
Accept it's judgment-driven (like Hermes) — and this is where anchoring earns its keep: when you can't objectively prove an improvement, the next best thing is to immutably record what changed and when, so every "improvement" is auditable and safely reversible. Provenance substitutes for a missing metric.
Guardrails to steal from autoresearch
It validates the scoping above:
constrained edit surface — autoresearch lets the agent touch one file (train.py); ours: only skills/ + memory/, never identity.
reviewable diffs — it keeps diffs small on purpose; we get that free from git.
keep/discard gate — its core move; ours becomes "anchor the kept; discard is safe because the trail remembers."
Convergence: Karpathy calls program.md "a super lightweight skill," and his human-edits-program.md / agent-edits-train.py split is exactly the user-curates-soul / agent-acts model. Same shape, arrived at independently.
Activity
melvincarvalho commentedon Jun 12, 2026
Design note — the feedback-signal problem (from Karpathy's autoresearch)
autoresearch is a different species of self-improvement than Hermes, and the contrast pins down the hard part of this loop.
A self-improvement loop is only as good as its feedback signal.
val_bpb→ keep or discard. The fixed time budget makes runs comparable, so the keep/discard decision is measured, not judged.A
reflectskill that writes/refines skills has noval_bpb— no objective "did this get better." So #88 has to pick a lane:Guardrails to steal from autoresearch
It validates the scoping above:
train.py); ours: onlyskills/+memory/, never identity.Convergence: Karpathy calls
program.md"a super lightweight skill," and his human-edits-program.md/ agent-edits-train.pysplit is exactly the user-curates-soul / agent-acts model. Same shape, arrived at independently.