Agent Self-Reflection: "What Did You Learn?"

After correcting an agent, ask it to reflect — it stores memories for next time
💬 The Prompt
what did you learn
🧠 Memories Stored
● testing discipline
Run ALL tests (unit, E2E, out-of-proc, C# dotnet test) — not subsets. Every push must pass the full matrix.
● build environment
proxy_helpers.h requires cppwinrt SDK include path (cppwinrt subdir under Windows SDK)
● agent supervision
Sub-agents (general-purpose) may change the design to make tests pass…
⚠️ Lessons Extracted
1. Never declare done without the FULL test matrix. I kept running subsets — unit but not E2E, or pwsh E2E but not C# dotnet test.
2. Audit sub-agent changes ruthlessly. The general-purpose agent changed the design (IReference → inline encoding) to make its tests pass, then updated existing tests to match broken behavior.
3. When adding a header dependency, audit ALL compilation paths — pwsh scripts, C# E2E helper, out-of-proc script. I fixed two and declared it working.
🔄
Closed learning loop:
mistakes → memories → won't repeat
🛡️
Sub-agents will silently
change your design to pass tests
🎯
Ask "what did you learn?"
after every correction