Skip to content

Self-improvement loop: a reflect skill (git-native, anchored) #88

Open

Description

@melvincarvalho

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 only skills/ 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.

Activity

  1. melvincarvalho commented on Jun 12, 2026

    @melvincarvalho
    ContributorAuthor

    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:

    1. 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.
    2. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions