learn
Learn
Extract non-obvious session learnings into scoped AGENTS.md files to preserve knowledge across sessions.
When to Use
Activate after completing a non-trivial task to capture insights that would otherwise be lost.
Instructions
What to Capture (Non-Obvious Only)
- Hidden relationships between files or scripts not obvious from code.
- Execution paths that differ from what the code appears to do.
- Non-obvious config, env vars, or flags (see root
AGENTS.mdandagent_docs/building_the_project.md). - Debugging breakthroughs where error messages were misleading.
- Files that must change together (e.g.,
AGENTS.md+agent_docs/AVAILABLE_SKILLS.mdwhen adding skills). - Build/test commands not documented in README.
- Architectural constraints discovered at runtime.
What NOT to Capture
- Obvious documentation or standard behavior.
- Duplicates of existing entries.
- Verbose explanations or session-specific notes.
Scoping Rules
Place learnings in the most specific AGENTS.md file:
- Project-wide: Root
AGENTS.md. - Script-specific:
scripts/AGENTS.md. - Skill-specific:
.agents/skills/<name>/AGENTS.md.
Dual-Write Requirement
Every new non-obvious insight must be recorded in two places:
- Verbose Log: Add a full
LESSON-NNNentry toagent_docs/LESSONS.mdwith Issue/Root Cause/Solution. - Distilled Note: Add a 1–3 line note to the nearest
AGENTS.md(this is whatlearnautomates).
If agent_docs/LESSONS.md does not exist yet, create it before relying on the dual-write workflow.
Format
- 1–3 lines per insight in
AGENTS.md. - Fits within
MAX_LINES_AGENTS_MD=150constraint. - Bulleted list under a "Learnings" or "Context" section.
Reference Files
agent_docs/LESSONS.md- Project-wide lessons log.AGENTS.md- Root agent guidance and constraints.agent_docs/README.md- Index of workflow-impacting reference files.
More from d-o-hub/rust-self-learning-memory
loop-agent
Execute workflow agents iteratively for refinement and progressive improvement until quality criteria are met. Use when tasks require repetitive refinement, multi-iteration improvements, progressive optimization, or feedback loops until convergence.
51web-search-researcher
Research topics using web search and content fetching to find accurate, current information. Use when you need modern information, official documentation, best practices, technical solutions, or comparisons beyond your training data.
46perplexity-researcher-reasoning-pro
Highest level of research and reasoning capabilities for complex decision-making with significant consequences, strategic planning, technical architecture decisions, multi-stakeholder problems, or high-complexity troubleshooting requiring expert-level judgment and sophisticated reasoning chains. Prioritizes actively maintained repositories and validates website sources for 2025 relevance.
44context-retrieval
Retrieve relevant episodic context from memory for informed decision-making. Use when you need past episodes, patterns, or solutions to similar tasks.
44rust-code-quality
Perform comprehensive Rust code quality reviews against best practices for async Rust, error handling, testing, and project structure
43codebase-analyzer
Analyze implementation details, trace data flow, explain technical workings, locate files, and consolidate codebases. Use when you need to understand HOW code works, find file locations, or assess technical debt.
40