light-rsi

AGENTS.md native ยท no dependencies

light-rsi

A lightweight recursive self-improvement loop that drops into any project following the AGENTS.md convention. Clone the folder, point the agent at goal.md, and let it run.

Goal anchor
1
Agent prompts
2
Dependencies
0
The light-rsi loop Nine steps arranged in a ring around the goal file: open, diagnose, blind check, gated brainstorm, evidence, implement, evaluate, iterate, close.

Click a step to inspect it. The loop always reads the goal first.

What lives where

light-rsi owns the loop and nothing else. Plans, state, logs, traces, code, data, and results stay with the host project.

Inside .light-rsi/

  • goal.mdObjective and done criteria. The anchor of every round.
  • memory/positive.mdWhat worked in the loop itself.
  • memory/negative.mdWhat failed, and under which conditions.
  • AGENTS.mdThe nine-step protocol, parallel-benefit gate, and hard rules.
  • agents/Web-research and blank-context evaluator prompts.

Outside .light-rsi/

  • Plans and stateThe host project's own trackers.
  • Logs and tracesRun history owned by the host.
  • Code, data, resultsEverything the work produces.
  • Project memoryDomain knowledge never enters RSI memory.

RSI memory is deliberately narrow: only rules about running the loop. Reuse is gated by compatibility: exact may be reused, partial and unknown must pass the cheapest adaptation test, none is contrast only.

Run it

  1. Clone into the project

    git clone https://github.com/ztxtech/light-rsi \
      <project-root>/.light-rsi
  2. Point the host AGENTS.md at it

    ## RSI loop
    
    Before each round, read `.light-rsi/AGENTS.md`
    and run its loop. The goal is `.light-rsi/goal.md`.
  3. State the goal

    On first run the loop creates goal.md and the memory files from templates. They are git-ignored, so upstream updates never conflict with your goal or memory.

Why this design works

01

A system must see what it is missing

Improvement starts with gap detection between the current state and the goal. Without it, the loop only re-runs what it already knows and mistakes motion for progress.

02

Judgment must have discriminating power

A weak evaluator cannot separate progress from activity, so it stops early or churns. Here the evaluator starts from raw artifacts with a blank context, and may not say "can stop" while a blocker or a higher-value action remains.

03

Solving requires new information

Pure self-analysis converges to a fixed point: the system keeps re-deriving its own assumptions. The loop opens outward instead, through ready-made answers, similar problems, weaker subproblems, leading-route DFS, failure questions, and cross-domain literature, and treats what it finds as evidence rather than conclusion.

04

Parallelism must earn its cost

A gate compares expected gain with coordination cost and risk before decomposition. If parallel wins, isolated blank-context brainstormers fill every usable slot; their raw results are merged by evidence, not agreement, and dissent is preserved.

Hard rules in the entry protocol

  • Terse by default. The fewest words that keep the meaning; terseness never removes evidence, uncertainty, or blockers.
  • No slacking. No fake completion, no superficial patch, no skipped check, no invented result.
  • Blind review. The evaluator never inherits the main agent's reasoning or expected conclusion.
  • Parallel-benefit gate. Parallel brainstorming runs only when expected gain exceeds its combined coordination cost and risk.

Acknowledgments

light-rsi is a lightweight extraction of the RSI loop from AION, a harness built for time-series work.

AION is a good project; it simply did not have enough compute and experiment hardware behind it. So we pulled its RSI loop out into a small external component that can be used every day.

It does not favor any harness: it follows the AGENTS.md convention. Your harness only needs a goal mode. Point it at the goal in .light-rsi/ and it can keep going, because the agent starts from this directory and runs the whole loop here.