From 5a1bf2ed8604e2ab45dfae5068639f44d0072249 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivett=20=C3=96rd=C3=B6g?= Date: Wed, 29 Jul 2026 16:50:52 +0200 Subject: [PATCH] Add Learning Loop pattern Co-Authored-By: Claude Opus 5 --- documents/patterns/learning-loop.md | 27 +++++++++++++++++++++++++++ documents/relationships.mmd | 4 ++++ 2 files changed, 31 insertions(+) create mode 100644 documents/patterns/learning-loop.md diff --git a/documents/patterns/learning-loop.md b/documents/patterns/learning-loop.md new file mode 100644 index 0000000..e4447ab --- /dev/null +++ b/documents/patterns/learning-loop.md @@ -0,0 +1,27 @@ +--- +authors: [ivett_ordog] +--- + +# Learning Loop + +## Problem +The model cannot learn, so anything a session taught you evaporates when it ends. Extract Knowledge captures insights when you notice them — but noticing in the moment is unreliable, and nothing connects the dots across sessions to reveal recurring problems. + +## Pattern +Make capture a ritual instead of an accident: + +1. **End every session with a learning pass**: the agent reflects on the session — corrections you made, surprises, gotchas, things you had to repeat +2. **Categorize and route** each learning to the right durable store: + - behavioral rules → ground rules + - project facts → knowledge and reference docs + - recurring quality corrections → habit hooks + - repeated processes → a skill or automation +3. **You approve the routing** — the agent proposes, you decide +4. **Advanced**: also append a dated entry to a session log. Periodically have the agent read the accumulated log and surface recurring issues that deserve promotion into stronger mechanisms + +This closes the self-improvement loop: sessions generate learnings, learnings harden into mechanisms, mechanisms improve every future session. It ties the other knowledge patterns together into a genuinely self-improving system. + +## Example +A `/learn` command runs at session end and proposes: "you corrected mock-heavy tests twice → habit hook candidate; the deploy needs the VPN → project ground rules; the release process we walked through → new skill." + +A `/remember` variant first appends the session to a log, then reflects across the whole log. After a few sessions it notices the same flaky-test complaint keeps recurring — and suggests fixing the root cause instead of re-learning the workaround every session. diff --git a/documents/relationships.mmd b/documents/relationships.mmd index b4046f6..e86fc9b 100644 --- a/documents/relationships.mmd +++ b/documents/relationships.mmd @@ -22,6 +22,10 @@ graph LR patterns/context-management -->|solves| obstacles/limited-context-window patterns/context-markers -->|solves| obstacles/black-box-ai patterns/extract-knowledge -->|solves| obstacles/cannot-learn + patterns/learning-loop -->|solves| obstacles/cannot-learn + patterns/learning-loop -->|uses| patterns/extract-knowledge + patterns/learning-loop -->|uses| patterns/habit-hooks + patterns/learning-loop <-->|similar| patterns/show-the-agent-let-it-repeat-automate patterns/focused-agent -->|solves| anti-patterns/distracted-agent patterns/focused-agent -->|solves| obstacles/limited-focus patterns/focused-agent -->|solves| obstacles/context-rot