Skip to main content

Module learn

Module learn 

Source

Structs§

Learning
A distilled learning from error-resolution correlation.

Functions§

apply_learnings
Write learnings into the project’s agent-memory files (#980), replacing the auto-generated marker section in each. AGENTS.md (the lean-ctx standard) is created if absent; CLAUDE.local.md (Claude Code’s local memory) is updated only when the project already keeps one, so a non-Claude project is never littered with a file it did not ask for. Returns the file names written.
apply_to_agents_md
Back-compat single-target wrapper (AGENTS.md only). Prefer apply_learnings, which also updates CLAUDE.local.md when present.
extract_learnings
Extract high-confidence learnings from the gotcha store.
format_agents_section
Generate the markdown section to inject into AGENTS.md.