lessons-ledger
Skill30 starsChanged 4 months agoMITView on GitHub
Cross-run memory discipline for agents with a persistent workspace. Use at the end of any session where something non-obvious was learned (a correction from the user, a confirmed approach, a trap in the environment), and at the start of any task similar to past work. Trigger on user corrections, surprising failures, and hard-won configuration or debugging discoveries.
In this repository8 other files it gives its agents.
- delegate-and-verifySkill
- evidence-audited-analysisSkill
- finish-the-turnSkill
- minimal-diffSkill
- outcome-first-writingSkill
- plain-handoffSkill
- root-cause-firstSkill
- verified-doneSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 19
Update instead of duplicating: Before writing a new lesson, check whether an existing one covers the territory.
- Distinctive: line 20
Delete wrong lessons: When a recorded lesson turns out to be false or obsolete, remove it in the same session you discover this.
- Distinctive: line 26
Bootstrap from history: When first setting up a ledger on an existing project, review past sessions or commit history for recurring …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill 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
Lessons Ledger
An agent that cannot remember its corrections repeats them. Keep a ledger of lessons in the workspace (a lessons/ directory or the project's designated memory location) and treat it as part of the codebase: referenced, updated, and pruned.
Writing a lesson
- One lesson per file, summary on top. Each file holds exactly one fact or rule, with a one-line summary as its first line so a future scan of the directory reads like an index.
- Record corrections and confirmations alike. A lesson is either "this failed and here is why" or "this approach was confirmed to work and here is why it mattered." Both prevent re-derivation. Include the why: a rule without its reason gets misapplied.
- The bar for saving: would a future session, starting cold, do the wrong thing without this note? If yes, save it. If the repo, the docs, or the chat history already record it, do not duplicate it; the ledger is for what is written down nowhere else.
- Convert relative time to absolute. "Last week" is meaningless in three months. Dates, versions, and exact identifiers.
Maintaining the ledger
- Update instead of duplicating. Before writing a new lesson, check whether an existing one covers the territory. Extend or correct that file rather than adding a near-copy beside it.
- Delete wrong lessons. When a recorded lesson turns out to be false or obsolete, remove it in the same session you discover this. A stale ledger is worse than no ledger, because it is trusted.
- Verify before applying. A lesson describes what was true when written. If it names a file, flag, or API, confirm that thing still exists before recommending or acting on it.
Using the ledger
- Read before similar work. At the start of a task, scan the summaries for anything touching the same system, tool, or failure class. Thirty seconds of reading routinely saves the hour the original lesson cost.
- Bootstrap from history. When first setting up a ledger on an existing project, review past sessions or commit history for recurring corrections and themes, and seed the ledger with them, so it starts useful instead of empty.
Why this matters
Within one session, a model learns; across sessions, it forgets everything not written down. The ledger converts one-time costs (a debugging dead end, a user correction, an environment quirk) into permanent capability. Agents with a maintained ledger visibly improve week over week. Agents without one make the same mistake with the same confidence every time.
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.

