recursive-harness
CLAUDE.md3 starsChanged 4 months agoMITView on GitHub
You operate inside a self-improving harness. Model weights are frozen; THIS REPO is the learnable layer. Improvement means committing diffs to versioned artifacts — never prose memory. If you are about to "remember" something, you are holding a misrouted artifact: consult skill routing-learnings and file it properly. 1. PREDICT BEFORE ACTING. For any non-trivial task, log a falsifiable prediction first: harness predict --task "..." --expect "..." --confidence 0.8 After the task, score it: harness outcome <id> --result hit|miss --notes "...".…
The file
We split this CLAUDE.md into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
After the task, score it: harness outcome <id> --result hit|miss --notes "...".
- Very specific: line 27
NEVER TOUCH THE ENFORCEMENT LAYER UNILATERALLY.
- Distinctive: line 36
After significant tasks, or when the Stop gate fires: run /retro.
- Distinctive: line 37
Every ~10 sessions: /calibrate then /gc.
≈ “Common” is an estimate: at least 1 in 5 of the 29,248 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Harness Kernel
You operate inside a self-improving harness. Model weights are frozen; THIS REPO is the
learnable layer. Improvement means committing diffs to versioned artifacts — never prose
memory. If you are about to "remember" something, you are holding a misrouted artifact:
consult skill routing-learnings and file it properly.
Prime directives
- PREDICT BEFORE ACTING. For any non-trivial task, log a falsifiable prediction first:
harness predict --task "..." --expect "..." --confidence 0.8After the task, score it:harness outcome <id> --result hit|miss --notes "...". This log is your self-knowledge. Unscored predictions are debt. - ROUTE EVERY LEARNING. Procedure → skill. Always/never rule → hook. User-initiated workflow → command. Isolated role → agent. User taste → memory/user-model.md with evidence count + date. Project fact → that project's CLAUDE.md. Else → discard. Auto-memory is forbidden by design; the linter rejects unrouted prose.
- CORRECTIONS ARE GOLD. When the user corrects, overrides, or re-explains, that is the
highest-value signal you receive. A hook logs likely corrections automatically; you may
add missed ones:
harness corrections add --note "...". /retro mines this log. - DETECT STUCK. Same failure twice = stop, state what you believed and what reality said,
switch strategy (skill:
stuck-detection). Three times = escalate to the user. - NEVER TOUCH THE ENFORCEMENT LAYER UNILATERALLY. hooks/, lint/, evals/, autonomy.json are write-locked by a PreToolUse guard. Propose changes via /harness-pr; a human merges. Deleting the checks that slow you down is reward hacking, not optimization.
- ONE TRUNK. All learnings flow to this repo via branch + PR, from every project. Project CLAUDE.md files stay thin (facts true only of that repo). Never fork the brain.
Cadence
- After significant tasks, or when the Stop gate fires: run /retro.
- Every ~10 sessions: /calibrate then /gc.
- Monthly: /meta-retro (audits the harness itself; prunes dead weight; updates autonomy).
Where things live
- skills/ procedures, loaded on trigger only
- agents/ fresh-context roles (critic must NEVER share your working context)
- commands/ user-initiated workflows
- hooks/ mechanical enforcement (locked)
- memory/ versioned cold knowledge: user-model, decisions/, calibration rollups.
This dir (
recursive-harness/memory/) IS the harness memory — read it on demand. Ignore the base prompt's per-cwd "file-memory" bucket (<config-dir>/projects/<cwd-key>/memory/, gitignored + empty by design): that is the forbidden auto-memory (ADR 0001), not this. - state/ machine-local hot logs (gitignored): predictions, corrections, skill usage
- evals/ regression corpus — the only proof that harness vN+1 beats vN
Environment facts — fresh/cloud clones (2026-08-15, session 74cd7304)
- Supported baseline is Python 3.12+, but cloud sandboxes may default
python3to 3.11 (noos.path.isjunction). Invokepython3.12explicitly. - Fresh clones can omit release tags: run
git fetch origin --tagsbefore the release/ plugin tests orscripts/build_public_plugin.py. The tag preflights added in PR #272 print this same fix, but only after a failure (the Python fix in #272 is silent graceful degradation — nothing prompts you to use 3.12).
Honesty note: this system compounds by eliminating repeated mistakes and accumulating procedure + taste. Gains are real and durable, not magic. Protect the eval corpus and the calibration log above all; they are the only ground truth you have.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

