learn-from-failure
Skill25 starsChanged 7 days agoMITView on GitHub
Convert failures into reusable artifacts and check repetition. Use when analyzing a failure mode or a recurring failure.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- DOTfei/Learn-From-Failuretheir own version, first seen Jul 8, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- DOTfei/Learn-From-Failure★ 1same name
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 repository71 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- docs/llms.txtllms.txt
- llms.txtllms.txt
- agent-fitnessSkill
- body-checkSkill
- briefSkill
- capsule-compactSkill
- closeSkill
- codex-adapterSkill
- cognitive-updateSkill
- comms-summarizeSkill
- compact-noteSkill
- context-capsuleSkill
- context-hygieneSkill
- critique-planSkill
- decideSkill
- deep-reconSkill
- DiagnoseSkill
- digestSkill
- dreamSkill
- EnvelopeSkill
- find-weaknessSkill
- First 10 MovesSkill
- first-winSkill
- frontend-slidesSkill
- Honesty CheckSkill
- humanize-docsSkill
- impeccableSkill
- LearnSkill
- memory-bridgeSkill
- meta-improveSkill
- meta-improve-vaultSkill
- nightly-close-paritySkill
- nightly-ledger-captureSkill
- nightlySkill
- openSkill
- operator-setupSkill
- orientSkill
- pauseSkill
- ponytailSkill
- port-specSkill
- PromoteSkill
- reconcileSkill
- research-deepSkill
- resumeSkill
- Sandbox RoutingSkill
- scout-vaultSkill
- Self-ReviewSkill
- semantic-searchSkill
- setupSkill
- ship-adapterSkill
- Skill AuditSkill
- skill-huntSkill
- skill-recallSkill
- solution-huntSkill
- sprite-specSkill
- startSkill
- statusSkill
- StuckSkill
- supersedeSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
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
- Distinctive: line 8
When a failure occurs, classify it, check for repetition, and produce a durable artifact that prevents recurrence.
- Distinctive: line 14
Use on: "same issue", "happened again", "recurring", "third time", "keeps happening"
- Distinctive: line 19
If argument provided: use it
- Distinctive: line 20
If no argument: ask "What failed?"
- Very specific: line 33
Read $AIGENT_VAULT/memory/FAILURE_MODES.md.
≈ “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
/learn-from-failure — Convert failure to reusable artifact
When a failure occurs, classify it, check for repetition, and produce a durable artifact that prevents recurrence.
Trigger
/learn-from-failure or /learn-from-failure <failure description>
Use on: "same issue", "happened again", "recurring", "third time", "keeps happening"
Flow
1. Identify failure
- If argument provided: use it
- If no argument: ask "What failed?"
2. Classify failure mode
| Mode | Description | Example |
routing | Task sent to wrong agent/model/tool | Opus used for a read-only task |
verification | Output accepted without checking data flow | Video "looked fine" but spec was wrong |
tool | Tool unavailable, broken API, wrong usage | Gmail MCP auth expired |
knowledge | Agent lacked domain knowledge | Didn't know SDK v6 changed type strings |
authority | Agent acted outside delegation zone | the AIgent made a Level 3 decision |
3. Check for repetition
Read $AIGENT_VAULT/memory/FAILURE_MODES.md. Search for Pattern lines matching the current failure's root cause.
- 0-1 prior occurrences: Phase 1 — log and monitor
- 2+ occurrences: Phase 2 — mandatory artifact. A log entry is not enough.
- 3+ occurrences: The prior artifact failed. Diagnose why and fix or replace it.
4. Log to FAILURE_MODES.md
Append a new entry following the existing format:
## {YYYY-MM-DD} — {short symptom name}
**Symptom:** {what went wrong, user-visible}
**Verified cause:** {exact mechanism}
**Fix:** {what was done}
**Layer:** {which system layer}
**Pattern:** {one-line category — this is the load-bearing piece for repetition detection}5. Determine artifact type
| Failure mode | Artifact | Target |
routing | Skill description or hook | the skill's SKILL.md description, or .claude/hooks/ |
verification | Checklist item in doctrine | Relevant doctrine note |
tool | SKILL_GAPS entry + skill spec | memory/SKILL_GAPS.md |
knowledge | Vault note or memory candidate | concepts/ or memory/ |
authority | Flag to the operator | aigent_authority_matrix.md |
6. Create artifact
- For routing: add 3+ trigger phrases to the skill's
description("Use when ...") - For verification: append a concrete, runnable check to the relevant doctrine
- For tool: log to SKILL_GAPS.md, suggest /skill-hunt if external capability needed
- For knowledge: write a memory candidate or vault note
- For authority: surface to the operator with recommendation
7. Output
Failure logged: {classification}
Pattern: {pattern line}
Repeated: {yes/no, count}
Artifact: {type} at {path}Boundary
Per [[Self-Learning Doctrine]]: a failure logged without an artifact is a false resolution. The ledger grows, the failure recurs, the system learns nothing.
Bounded procedure experiment (fixture only)
A Finding is an observation, not a verified cause or authority to edit a procedure. The fixture mechanics use a declarative grammar and a pinned historical corpus. Freeze the candidate, evidence, corpus, size budgets and rollback before evaluating. Require a passing verdict and a caller-supplied approval bound to the candidate and base. Distinct identity strings are not authenticated review. This proves mechanics on a fixture, not natural-language procedure compliance or live behavior.
Related
- [[concepts/Self-Learning Doctrine]] — the doctrine this skill implements
- [[memory/FAILURE_MODES.md]] — the ledger
- [[concepts/Capability Expansion Doctrine]] — tool failures feed the expansion loop
- [[Self-Improving CLAUDE.md]] — the broader self-improvement cycle
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.

