lessons
Skill2 starsChanged 34 days agoMITView on GitHub
Craft lessons phase - harvest evidence-backed lessons from the run ledger, lint them, and commit them on the PR branch.
12 other projects use a version of this.
Adopted by
Most recently taken up by
- GravionLabs/skillstheir own version, first seen Nov 15, 2026
- svandragt/lessonstheir own version, first seen Nov 15, 2026
- OpenSWE/log-decisionstheir own version, first seen Nov 1, 2026
- swe-workflow/log-decisionstheir own version, first seen Nov 1, 2026
- moberghr/mtk-agent-toolkittheir own version, first seen Oct 25, 2026
- OpenSWE/skillstheir own version, first seen Oct 15, 2026
Used with
Projects with it also use distill-prompt, herdr-advisor and 1 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
OpenSWESkilldistill-prompt
Distill this conversation's underlying goal into one reusable prompt that reaches the same final outcome in a fresh session.
Also in 3 projects that use this
OpenSWESkillherdr-advisor
Pair a Herdr worker with one advisor, a stronger model that answers questions on the user's behalf to unblock the worker and leads it to its next task, by accepting its prompt suggestion or sending it text: a worker "still waiting on your go" gets `go`. Invoked by the user (`/herdr-advisor`), and by you in one case only, before the first step of the work and whatever the plan's size, when a grilling session has ended with its frontier empty, the user's confirmation has you execute the plan now, no advisor pair is live, and the confirmation did not decline one.
Also in 3 projects that use this
gootfSkilllog-decisions
Append-only DECISIONS.md journal at the project root for consequential calls the spec didn't settle. Use when you (or the user) make a non-trivial call worth a durable record — an ambiguity you interpreted, a tradeoff, a deviation, or a hard-to-undo action.
Also in 3 projects that use this
Other versions12 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 12
- sampleXbro/agentsmesh★ 27same name
- moberghr/mtk-agent-toolkit★ 9same name
- OpenSWE/log-decisions★ 4same name
- OpenSWE/skills★ 4same name
- swe-workflow/log-decisions★ 4same name
- apinizer/agentnizer-cookbook★ 2same name
- ChewbaccaRoars/pathfinder-skills★ 2same name
- derekcedarbaum2/content-machine★ 2same name
- 3xian/lessons★ 1same name
- GravionLabs/skills★ 0same name
2 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository20 other files it gives its agents.
- architectureSkill
- decisionsSkill
- designSkill
- documentationSkill
- impact-triageSkill
- implementationSkill
- initSkill
- integrateSkill
- metricsSkill
- planningSkill
- promote-configSkill
- proposeSkill
- pruneSkill
- refactoringSkill
- requirementsSkill
- reviewSkill
- runSkill
- tuneSkill
- validationSkill
- workspaceSkill
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 1 is distinctive, and 5 are very specific to this project.
0
Common
Most of the 11 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
Cross-phase wait: start only once the in-session awaitingHarnesses set is empty — every awaited executing-harness has landed, its triage is …
- Very specific: line 16
Standalone: no run ledger for this branch → record NO-OP(lessons): no run ledger and stop.
- Distinctive: line 23
Harvest: Read the ledger for lesson-shaped events:
- Very specific: line 34
If validation did not run its step 5, run the assert-fresh lessons lane over <base>...HEAD here and treat each unwaived row as a …
- Very specific: line 42
Dedupe (merge before insert): Run consult(<event paths>, { listCorpus: () => [], listLessons, readPage }).
- Very specific: line 49
Lint and commit: Run node "${CRAFT_ROOT:-${CLAUDE_PLUGIN_ROOT}}/engine/bin/lesson-lint.js" "<lessons-dir>".
“Common” is measured: kept by at least 6 in 10 of the 11 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
craft:lessons
Preamble (always runs — non-overridable)
- Manifest read (run
manifest-lint.shif standalone). Resolve<lessons-dir>=paths.lessons, elsedocs/lessons/. - Cross-phase wait: start only once the in-session
awaitingHarnessesset is empty — every awaited executing-harness has landed, its triage is done (the documentation late-EXCEPTION synthesis included) and its gate is green, or it was released byauto-skip,NO-OPor a waiver. Not yet → wait. This phase is never itself awaited. - Standalone: no run ledger for this branch → record
NO-OP(lessons): no run ledgerand stop.
Procedure (default body — a manifest override: replaces everything below)
Session-owned, never delegated: the ledger and the handbacks live in the session.
Harvest. Read the ledger for lesson-shaped events:
Event Ledger signal reset-on-red PART(<n>): … outcome=blocked, orGATE(<phase>): redlater followed by greena review finding that needed more than one convergence round FINDINGS(<dim>): c<k≥2> <path> n=<m≥1>a harness finding triaged as a real defect a fix(/test(triage commit afterHARNESS-BG(validation:…)a decision deviation folded back into the design DECISION-REVERSAL(…), or a design-docDivergencesentrya gate that failed for an environmental reason GATE(<phase>): redresolved with no tracked-source changea lesson to re-verify LESSON-REVERIFY(<lesson>): <path>If
validationdid not run its step 5, run theassert-freshlessons lane over<base>...HEADhere and treat each unwaived row as aLESSON-REVERIFYevent.- Draft, only with proof. An event yields a draft only when it names at least one repo
path that exists at
HEADand reproduces the event: a red test, afile:line, or a script. The ledger lives in the git common dir and is never evidence. No such path → no draft. The next number is the highest existing lesson number + 1;source.run,source.phaseandsource.datecome from the event's ledger line. Thetriggeris one line; How to apply states the rule in at most 6 non-empty lines. - Dedupe (merge before insert). Run
consult(<event paths>, { listCorpus: () => [], listLessons, readPage }). An active lesson already covering the same trigger gets the new evidence and a bumpedlast-verified; never add a near-duplicate. This also makes a resumed harvest idempotent. - Re-verify. For each
LESSON-REVERIFYevent, re-check the lesson's evidence. Then bumplast-verified, or setsupersededand write the successor with asupersedesentry, or setretired. Never delete a lesson. - Lint and commit. Run
node "${CRAFT_ROOT:-${CLAUDE_PLUGIN_ROOT}}/engine/bin/lesson-lint.js" "<lessons-dir>". On exit 2, fix the draft, or drop it and record why. Never commit a red lesson. A red lint never blocks the phase: it ends with the lint-clean drafts that remain. When the INVALID lines name no draft of this run, the corpus itself is red (for example two merged branches each added002-*.md): recordNO-OP(lessons): corpus lint red on <file>and stop without committing drafts; never renumber or edit a committed lesson here. Commitdocs(lessons): record <n> lesson(s); when the repo README carries a counted link to the lessons directory, bump it in the same commit. Drafts committed on the branch are not injected into this run's later phases: injection reads only the default branch, so merging the PR ratifies and publishes them. - Record. Append
LESSONS: <path> (new|refreshed|reverified|superseded|retired)[, …], orNO-OP(lessons): <reason>(for exampleno lesson-shaped event carried evidence). Copy that line into the drafted PR body's- **Lessons:**line.
Lessons never gate: ratification is the PR review and merge, and the phase
never gates propose beyond its own lint of the drafts (a red draft is fixed or dropped,
never committed).
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.

