Reflection loop: learn from conversation (propose standing rules) - #16
Merged
Conversation
A first-cut feedback loop. Each evening ReflectionMonitor reviews the day's working memory (what the user told Aria + actions taken) and proposes up to two durable STANDING RULES worth adopting — a recurring preference, a correction, a pattern worth codifying. Propose-only by design: the suggestion is sent (and, via the engine's notify, lands in the conversation thread), the user replies yes/no, and the agent adds it through the existing add_standing_instruction tool. Nothing is auto-applied, so behavior can't silently drift. Complements nightly compaction (which already consolidates facts) by adding the behavioral- rule layer — closing the "learn from talking to you" loop with machinery that already exists (standing instructions → prompt, memory → retrieval). Once/day, evening only, dedups recent suggestions, silent by default. 5 tests; 225 pass. Assisted-by: Claude Code (Opus 4.8)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A first-cut "learn from conversation" feedback loop — the easy, right version (retrieval + rules + reflection, not fine-tuning).
ReflectionMonitor(engine): each evening it reviews the day's working memory (what you told Aria + actions taken) and proposes up to two durable standing rules worth adopting — a recurring preference, a correction, a pattern worth codifying.Propose-only by design: the suggestion is sent and (via the engine's notify) lands in the conversation thread; you reply yes/no, and the agent adds it through the existing
add_standing_instructiontool. Nothing is auto-applied, so behavior can't silently drift — which fits the earlier wariness about over-reach.It complements nightly compaction (which already consolidates facts into long-term memory) by adding the behavioral-rule layer, and closes the loop using machinery that already exists (standing instructions → prompt, memory → retrieval).
Once/day, evening only, dedups recent suggestions, silent by default. 5 new tests; 225 pass.
Future (noted, not here): read the raw conversation transcript (richer signal than the scratchpad) and an explicit 👍/👎 feedback signal.
🤖 Generated with Claude Code