agentleFS
scolladonscolladon/craft/skills/lessons/SKILL.md

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

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.
  • OpenSWESkill

    distill-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

  • OpenSWESkill

    herdr-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

  • gootfSkill

    log-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

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
  1. Very specific:

    Cross-phase wait: start only once the in-session awaitingHarnesses set is empty — every awaited executing-harness has landed, its triage is …

    line 12
  2. Very specific:

    Standalone: no run ledger for this branch → record NO-OP(lessons): no run ledger and stop.

    line 16
  3. Distinctive:

    Harvest: Read the ledger for lesson-shaped events:

    line 23
  4. Very specific:

    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 …

    line 34
  5. Very specific:

    Dedupe (merge before insert): Run consult(<event paths>, { listCorpus: () => [], listLessons, readPage }).

    line 42
  6. Very specific:

    Lint and commit: Run node "${CRAFT_ROOT:-${CLAUDE_PLUGIN_ROOT}}/engine/bin/lesson-lint.js" "<lessons-dir>".

    line 49

“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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

craft:lessons

Preamble (always runs — non-overridable)

  1. Manifest read (run manifest-lint.sh if standalone). Resolve <lessons-dir> = paths.lessons, else docs/lessons/.
  2. Cross-phase wait: start only once the in-session awaitingHarnesses set 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 by auto-skip, NO-OP or a waiver. Not yet → wait. This phase is never itself awaited.
  3. Standalone: no run ledger for this branch → record NO-OP(lessons): no run ledger and stop.

Procedure (default body — a manifest override: replaces everything below)

Session-owned, never delegated: the ledger and the handbacks live in the session.

  1. Harvest. Read the ledger for lesson-shaped events:

    EventLedger signal
    reset-on-redPART(<n>): … outcome=blocked, or GATE(<phase>): red later followed by green
    a review finding that needed more than one convergence roundFINDINGS(<dim>): c<k≥2> <path> n=<m≥1>
    a harness finding triaged as a real defecta fix(/test( triage commit after HARNESS-BG(validation:…)
    a decision deviation folded back into the designDECISION-REVERSAL(…), or a design-doc Divergences entry
    a gate that failed for an environmental reasonGATE(<phase>): red resolved with no tracked-source change
    a lesson to re-verifyLESSON-REVERIFY(<lesson>): <path>

    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 LESSON-REVERIFY event.

  2. Draft, only with proof. An event yields a draft only when it names at least one repo path that exists at HEAD and reproduces the event: a red test, a file: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.phase and source.date come from the event's ledger line. The trigger is one line; How to apply states the rule in at most 6 non-empty lines.
  3. 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 bumped last-verified; never add a near-duplicate. This also makes a resumed harvest idempotent.
  4. Re-verify. For each LESSON-REVERIFY event, re-check the lesson's evidence. Then bump last-verified, or set superseded and write the successor with a supersedes entry, or set retired. Never delete a lesson.
  5. 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 added 002-*.md): record NO-OP(lessons): corpus lint red on <file> and stop without committing drafts; never renumber or edit a committed lesson here. Commit docs(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.
  6. Record. Append LESSONS: <path> (new|refreshed|reverified|superseded|retired)[, …], or NO-OP(lessons): <reason> (for example no 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).

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.