| name | lesson-aware-agent |
| version | 1.0.0 |
| category | software-development |
| description | Universal lesson-aware injection pattern. Makes every agent action memory-aware: search lessons before acting, save lessons after fixing. Works across all skills, not just change-test-loop. |
| author | Hermes Cortex |
| license | MIT |
| platforms | ["linux","macos","windows"] |
| metadata | {"hermes":{"tags":["memory","lessons","compounding","agent-pattern","universal"],"related_skills":["change-test-loop","save-lesson","offline-knowledge","agent-contract"]}} |
Lesson-Aware Agent — Memory That Compounds
The Core Insight
The most expensive fix is the one you've already made. Lesson-aware agents prevent re-discovery by searching personal memory before every non-trivial action. Every fix compounds — 10 lessons saves an hour, 100 lessons saves a day, 1,000 lessons transforms how you develop.
Universal Protocol
This skill defines one pattern that applies everywhere — not just change-test-loop, but PR review, debugging, refactoring, even answering questions:
Before Every Action
if is_non_trivial(problem):
result = json.loads(terminal(
"offline_knowledge lesson search " + shlex.quote(problem) + " --limit 3"
)["output"])
if result.get("count", 0) > 0:
lesson = result["results"][0]
After Every Fix
if should_save(problem, solution):
terminal(f"""offline_knowledge lesson create \\
--title {shlex.quote(title)} \\
--problem {shlex.quote(problem)} \\
--cause {shlex.quote(cause)} \\
--solution {shlex.quote(solution)} \\
--language {lang} \\
--tags {" ".join(["tag"] if tag else [])}""")
terminal("offline_knowledge lesson index")