colearn
Skill0 starsChanged 5 months agoMITView on GitHub
The "learn" step of the core loop. Capture lessons from completed or failed work, recall relevant lessons before new work, and graduate recurring lessons into guardrails. Use after fixing a bug, finishing a feature, or discovering a better pattern (capture); before starting a task, choosing an approach, or onboarding (recall); and whenever the same lesson keeps firing (graduate). Self-learning, self-updating guardrails — not a write-only log.
In this repository20 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- new-skillSkill
- cobuildSkill
- cochallengeSkill
- cochangelogSkill
- coconsolidateSkill
- cocreatorSkill
- cocritiqueSkill
- codebugSkill
- codirectSkill
- codrawSkill
- cohardenSkill
- coplanSkill
- coresearchSkill
- cospecifySkill
- costudySkill
- cotestSkill
- cotranslateSkill
- my-skillSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 37
If a record for this lesson already exists, update it and bump hits — don't duplicate.
- Distinctive: line 93
Update, don't pile up — a superseded lesson is corrected in place.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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
colearn — capture, recall, graduate
The doer is colearner. This is the "learn" leg of the core make → check → learn loop. It runs in three modes; pick by what you're doing.
Purpose
Turn experience into guardrails that make the same mistake harder next time. Lessons are self-updating (corrected when superseded, not just appended) and self-promoting (recurring lessons graduate from advisory note → applied skill → enforcing sub-agent).
When to Use
- Capture — after fixing a non-obvious bug, finishing a feature, or finding a better pattern.
The core loop calls this automatically when
cotestorcodebugfinds a failure (the backprop reflex): every failure writes a lesson. - Recall — before starting a feature/bug fix, when choosing between approaches, when you hit a familiar error, or when onboarding / returning to a project.
- Graduate — when the same lesson or bug-class keeps firing (hit-count climbs).
How to Use
Recall (do this first, before new work)
- Skim the resolved
memory-bank/LEARNING.md(the index) for titles/tags related to the task. - Open the matching records; apply their Prevention/Solution to the current work.
- Cite what you applied: title, date, and the specific insight. If nothing matches, proceed on best judgment.
Capture (after work, or on a verify/debug failure)
- Name the insight in one searchable line.
- Save a record (template below) as
YYYY-MM-DD-kebab-title.md. - If a record for this lesson already exists, update it and bump
hits— don't duplicate. - Refresh the index:
node .agents/skills/colearn/index.mjs.
Graduate (lesson → skill → sub-agent)
Promotion is triggered by recurrence, tracked in each record's hits field:
tier: lesson(default) — one record. Advisory; recalled before related work.tier: skill— whenhitskeeps climbing, fold the lesson into a checklist inside the relevantco-*skill (or a small new skill) so it's applied by default, not by luck.tier: subagent— when the guardrail needs autonomous enforcement on every run (e.g. an always-on reviewer), add it to/cocreator's roster as a dispatched doer. Record the promotion by updatingtierin the record and noting where it graduated to.
Memory Bank
Storage: Resolve
workspaceRootfrom.agents/workspace/cocreation.yaml(default.agents). Inlocal, write the full record to<workspaceRoot>/skills/<name>/memory-bank/and refresh its index. Inlinear-primary, write the human-facing artifact through the active backend and keep provider metadata, links, and the local navigation/index cache; never write project records into the plugin cache.
Records live in skills/colearn/memory-bank/ (installed: .agents/skills/colearn/memory-bank/).
Copy _template.md, keep its frontmatter filled. LEARNING.md is the auto-generated index — never
edit it by hand.
Template
---
title: Short, searchable title
date: YYYY-MM-DD
tags: tag-one, tag-two
tier: lesson
hits: 1
---
# Lesson: [Short, searchable title]
- **Context**: [What were you working on?]
- **Problem**: [What went wrong?]
- **Root cause**: [Why did it happen?]
- **Solution**: [What fixed it or what pattern works?]
- **Prevention**: [How to avoid this next time — this is the guardrail.]
- **Graduated to**: [skill/sub-agent name, once promoted — else leave blank]Self-eval gate (close the loop)
End every run by routing:
- Captured + indexed → PASS, return to the loop you came from.
- Found a matching lesson on recall → apply it, cite it, then continue.
hitscrossed your promotion bar → graduate the lesson, note where, then PASS.
Principles
- One insight per record; keep it atomic and searchable.
- Update, don't pile up — a superseded lesson is corrected in place.
- The Prevention line is the actual guardrail; make it concrete and actionable.
- Graduation is data-driven (recurrence), not opinion.
- Include versions/environment details when relevant.
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.

