feat(memory): add proactive auto-remember triggers and session distill#269
feat(memory): add proactive auto-remember triggers and session distill#269marcusquinn merged 2 commits intomainfrom
Conversation
Summary of ChangesHello @marcusquinn, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the AI agent's ability to capture and retain valuable information by automating key memory creation processes. It shifts from a reactive, user-initiated memory system to a more proactive approach, ensuring that important learnings, decisions, and preferences are automatically identified and stored, thereby improving the agent's long-term knowledge retention and effectiveness. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. WalkthroughThe PR updates documentation files to enforce mandatory proactive memory management behaviors. It adds memory trigger specifications to AGENTS.md, restructures remember.md with detailed trigger patterns and required response formats, and introduces automated session distillation workflow to session-review.md. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request introduces a valuable enhancement by automating memory creation through proactive suggestions and session distillation. The changes to the agent documentation are clear and well-structured. I've provided a few suggestions to improve consistency and clarity in the instructions for the AI agent, mainly focusing on standardizing examples and clarifying decision-making logic in ambiguous situations. Overall, this is a great step towards a more intelligent and helpful agent.
| | Trigger | Memory Type | Example | | ||
| |---------|-------------|---------| | ||
| | Solution found after debugging | `WORKING_SOLUTION` | "That fixed it! Want me to remember this?" | | ||
| | User states a preference | `USER_PREFERENCE` | "I'll remember you prefer tabs over spaces" | |
There was a problem hiding this comment.
The example for USER_PREFERENCE ("I'll remember you prefer tabs over spaces") is a statement of action, whereas other examples are phrased as questions (e.g., "should I save it?", "want me to remember why?"). To maintain consistency with the other examples and the goal of suggesting an action to the user, it would be better to phrase this as a question as well.
| | User states a preference | `USER_PREFERENCE` | "I'll remember you prefer tabs over spaces" | | |
| | User states a preference | `USER_PREFERENCE` | "You prefer tabs over spaces. Should I remember that?" | |
| When a trigger is detected, immediately offer: | ||
|
|
||
| ```text | ||
| That worked! Want me to remember this for future sessions? |
There was a problem hiding this comment.
The first line of the required response format, "That worked!", is specific to a solution being found. However, the examples that follow correctly demonstrate that this opening phrase should be contextual (e.g., "Got it!", "Noted."). To avoid the agent using "That worked!" in inappropriate situations, consider making this line in the template more generic. "Got it." is a good, neutral alternative.
| That worked! Want me to remember this for future sessions? | |
| Got it. Want me to remember this for future sessions? |
| **When user states preference:** | ||
| ```text | ||
| User: I always use pnpm instead of npm | ||
| AI: Got it! Want me to remember this preference? | ||
|
|
||
| /remember User prefers pnpm over npm for package management | ||
|
|
||
| (Reply 'y' to confirm) | ||
| ``` | ||
|
|
||
| **After failed approach:** | ||
| ```text | ||
| User: That approach with setTimeout didn't work at all | ||
| AI: Noted. Want me to remember to avoid this approach? | ||
|
|
||
| /remember Avoid using setTimeout for async coordination - use proper async/await or Promises instead | ||
|
|
||
| (Reply 'y' to confirm) | ||
| ``` |
There was a problem hiding this comment.
There's an inconsistency in the examples regarding the user's ability to edit a memory. The "Required Response Format" (line 136) and the "After fixing a bug" example correctly include (Reply 'y' to confirm, or edit the description). However, the examples for user preferences (line 158) and failed approaches (line 168) omit the "or edit the description" part. For consistency and to ensure the user is always aware of all their options, this should be included in all examples.
| For each additional learning, suggest: | ||
| ```text | ||
| /remember {concise description of learning} | ||
| ``` | ||
|
|
||
| Or document in: |
There was a problem hiding this comment.
The structure here, with /remember followed by "Or document in:", is a bit ambiguous for an agent. It's not clear if /remember is the default and the list items are alternatives, or if the agent should choose. Clarifying this logic would lead to more consistent behavior. Consider rephrasing to indicate that /remember should be the primary suggestion, unless the learning is better suited for one of the other documentation forms.
For example, you could rephrase lines 70 and 75:
- Line 70:
For each additional learning, suggest capturing it with: - Line 75:
If the learning is better suited for other forms of documentation (e.g., an agent improvement idea), suggest one of the following instead:
🔍 Code Quality Report�[0;35m[MONITOR]�[0m Code Review Monitoring Report �[0;34m[INFO]�[0m Latest Quality Status: �[0;34m[INFO]�[0m Recent monitoring activity: 📈 Current Quality Metrics
Generated on: Sat Jan 31 22:20:36 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In @.agent/AGENTS.md:
- Around line 111-114: Add a blank line immediately before and immediately after
the fenced code block that starts with ```text containing "Want me to remember
this? /remember {concise description}" so the fenced block is separated by blank
lines from surrounding text; update the AGENTS.md section where that fenced
block appears to include one empty line above and one empty line below the
```text block.
In @.agent/scripts/commands/session-review.md:
- Around line 70-74: Add a blank line before and after the fenced code block
that starts with "```text" and contains the "/remember {concise description of
learning}" line in the session review content; locate the fenced block (the
```text block and its inner line "/remember {concise description of learning}")
and insert one empty line above the opening ```text and one empty line below the
closing ``` to satisfy the lint rule.
🧹 Nitpick comments (3)
.agent/AGENTS.md (1)
98-116: Prefer progressive disclosure: move trigger details to the remember command doc and link here.This user guide now embeds detailed trigger tables and response formats inline. To keep zero technical debt and follow the progressive disclosure rule for
.agent/**/*.md, keep this section as a brief pointer to.agent/scripts/commands/remember.md(or a dedicated subagent doc) and move the examples/format there. As per coding guidelines: “Apply progressive disclosure pattern by using pointers to subagents rather than including inline content in agent documentation.”.agent/scripts/commands/remember.md (1)
112-177: Consider trimming inline examples and linking to authoritative sources.The new trigger rules and multi-step examples are extensive for a command doc. To preserve the progressive disclosure pattern and keep A-grade hygiene, move verbose examples to a dedicated examples doc and link here. Where possible, use
file:linereferences to the actual helper scripts instead of inline snippets. As per coding guidelines: “Apply progressive disclosure pattern by using pointers to subagents rather than including inline content in agent documentation” and “Include code examples only when authoritative; use file:line references.”.agent/scripts/commands/session-review.md (1)
70-74: Link to remember command doc instead of inline snippet.To keep this workflow doc lean and aligned with progressive disclosure, replace the inline
/rememberblock with a pointer to.agent/scripts/commands/remember.md(ideally withfile:linereferences). As per coding guidelines: “Apply progressive disclosure pattern by using pointers to subagents rather than including inline content in agent documentation.”
| For each additional learning, suggest: | ||
| ```text | ||
| /remember {concise description of learning} | ||
| ``` | ||
|
|
There was a problem hiding this comment.
Add blank lines around the fenced block.
Codacy flags fenced blocks without blank lines before/after. Insert blank lines around the ```text block to keep the documentation lint-clean.
🧰 Tools
🪛 GitHub Check: Codacy Static Code Analysis
[notice] 71-71: .agent/scripts/commands/session-review.md#L71
Fenced code blocks should be surrounded by blank lines
🤖 Prompt for AI Agents
In @.agent/scripts/commands/session-review.md around lines 70 - 74, Add a blank
line before and after the fenced code block that starts with "```text" and
contains the "/remember {concise description of learning}" line in the session
review content; locate the fenced block (the ```text block and its inner line
"/remember {concise description of learning}") and insert one empty line above
the opening ```text and one empty line below the closing ``` to satisfy the lint
rule.
🤖 Augment PR SummarySummary: This PR makes memory capture more automatic and consistent by requiring proactive “/remember” suggestions and adding an automatic session distillation step. Changes:
Technical Notes: The new triggers map common conversational phrases to memory types (e.g., WORKING_SOLUTION, USER_PREFERENCE), and the session distill step derives learnings from recent git activity and stores them automatically. 🤖 Was this summary useful? React with 👍 or 👎 |
|
|
||
| /remember {concise, actionable description} | ||
|
|
||
| (Reply 'y' to confirm, or edit the description) |
There was a problem hiding this comment.
The prompt says to “Reply 'y' to confirm”, but the documented /remember confirmation flow above uses a numbered menu (1. Confirm, etc.), so this instruction may lead users to respond incorrectly.
Other Locations
.agent/scripts/commands/remember.md:148.agent/scripts/commands/remember.md:158.agent/scripts/commands/remember.md:168
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
|
|
||
| **Format**: After detecting a trigger, suggest: | ||
| ```text | ||
| Want me to remember this? /remember {concise description} |
There was a problem hiding this comment.
🔍 Code Quality Report�[0;35m[MONITOR]�[0m Code Review Monitoring Report �[0;34m[INFO]�[0m Latest Quality Status: �[0;34m[INFO]�[0m Recent monitoring activity: 📈 Current Quality Metrics
Generated on: Sat Jan 31 22:28:17 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
- Add MANDATORY proactive memory triggers section to AGENTS.md - Define conversation patterns that trigger /remember suggestions - Make session-distill auto-run in /session-review workflow - Add pattern detection table (solution found, preference stated, etc.) - Add required response format for memory suggestions - Include examples for each trigger type AI assistants must now proactively suggest /remember when: - Solution is found after debugging - User states a preference - Failed approach is identified - Architecture decision is made - Workaround is discovered - Tool configuration works
280b251 to
ed0e62a
Compare
|
🔍 Code Quality Report�[0;35m[MONITOR]�[0m Code Review Monitoring Report �[0;34m[INFO]�[0m Latest Quality Status: �[0;34m[INFO]�[0m Recent monitoring activity: 📈 Current Quality Metrics
Generated on: Sat Jan 31 22:34:04 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |



Summary
Makes memory creation more automated by:
Changes
AGENTS.md
remember.md
session-review.md
session-distill-helper.sh autoTrigger Patterns
WORKING_SOLUTIONUSER_PREFERENCEFAILED_APPROACHDECISIONWORKING_SOLUTIONTOOL_CONFIGWhy
Currently memories are only created when:
/remember/session-reviewand manually captures learningsThis misses valuable learnings discovered during debugging, preferences expressed in conversation, and decisions made during discussion.
With this change, the AI will proactively suggest remembering when it detects these patterns, and session-distill will automatically extract learnings from git commits at session end.
Summary by CodeRabbit
New Features
Documentation
✏️ Tip: You can customize this high-level summary in your review settings.