Skip to content

feat(memory): add proactive auto-remember triggers and session distill#269

Merged
marcusquinn merged 2 commits intomainfrom
feature/memory-auto-triggers
Jan 31, 2026
Merged

feat(memory): add proactive auto-remember triggers and session distill#269
marcusquinn merged 2 commits intomainfrom
feature/memory-auto-triggers

Conversation

@marcusquinn
Copy link
Owner

@marcusquinn marcusquinn commented Jan 31, 2026

Summary

Makes memory creation more automated by:

  1. Enforcing proactive /remember suggestions - AI must suggest when patterns detected
  2. Auto-running session-distill - Automatically extracts learnings at session end
  3. Adding conversation pattern detection - Triggers based on what user says

Changes

AGENTS.md

  • Added MANDATORY proactive memory triggers section
  • Defined trigger patterns with memory types
  • Added table of triggers (solution found, preference stated, etc.)

remember.md

  • Expanded auto-remember triggers to MANDATORY
  • Added conversation pattern detection table
  • Added required response format
  • Added examples for each trigger type

session-review.md

  • Made session-distill auto-run mandatory (Step 4)
  • Renumbered subsequent steps
  • Added command to run: session-distill-helper.sh auto

Trigger Patterns

User Says Memory Type
"that fixed it", "it works now" WORKING_SOLUTION
"I prefer", "always use" USER_PREFERENCE
"don't do X", "X doesn't work" FAILED_APPROACH
"let's go with", "decided to" DECISION
"the trick is", "workaround" WORKING_SOLUTION
"configure X as", "set X to" TOOL_CONFIG

Why

Currently memories are only created when:

  • User explicitly runs /remember
  • User runs /session-review and manually captures learnings

This 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

    • Introduced automated session learning distillation to systematically capture and store session insights.
    • Enhanced proactive memory suggestions triggered by detected conversation patterns without waiting for user prompts.
  • Documentation

    • Updated mandatory auto-remember trigger guidelines with structured rules and response formats.
    • Reorganized session review workflow incorporating automated distillation as a core step.

✏️ Tip: You can customize this high-level summary in your review settings.

@gemini-code-assist
Copy link

Summary of Changes

Hello @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

  • Proactive Memory Suggestions: AI agents are now mandated to proactively suggest /remember commands when specific conversation patterns are detected, such as solutions found, user preferences, or failed approaches. This ensures valuable learnings are captured without explicit user initiation.
  • Automated Session Distillation: The session-review process now includes a mandatory auto-distillation step that automatically extracts and stores learnings from git commits at the end of a session, streamlining the knowledge capture workflow.
  • Enhanced Trigger Detection: Detailed conversation patterns and their corresponding memory types (e.g., WORKING_SOLUTION, USER_PREFERENCE, FAILED_APPROACH) have been defined and documented to improve the accuracy and relevance of proactive memory suggestions.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 31, 2026

Warning

Rate limit exceeded

@marcusquinn has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 10 minutes and 44 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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.

Walkthrough

The 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

Cohort / File(s) Summary
Memory Trigger Documentation
\.agent/AGENTS\.md
Adds new documentation block defining mandatory proactive memory triggers, including trigger types, associated memory types, concrete examples, and required prompt format for user interaction.
Remember Command Specification
\.agent/scripts/commands/remember\.md
Restructures Auto-Remember Triggers from optional guidance to mandatory rules with conversation pattern detection table, required response format specification, concrete examples for bug fixes/preferences/failed approaches, and "Do NOT Wait" enforcement section.
Session Review Automation
\.agent/scripts/commands/session-review\.md
Elevates Step 4 to mandatory "Auto-Distill Session Learnings" with automated helper script invocation (session-distill-helper\.sh auto), renumbers subsequent steps, and refines documentation guidance for capturing additional learnings beyond auto-distillation.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🧠 Memories now proactive bloom,
No waiting—suggest when patterns loom.
Session learnings auto-distilled with care,
Remember commands fill the DevOps air! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: adding proactive auto-remember triggers and session distillation for automated memory creation, matching the core objectives.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/memory-auto-triggers

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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" |

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Suggested change
| 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?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Suggested change
That worked! Want me to remember this for future sessions?
Got it. Want me to remember this for future sessions?

Comment on lines +151 to +169
**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)
```

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Comment on lines 70 to 75
For each additional learning, suggest:
```text
/remember {concise description of learning}
```

Or document in:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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:

@github-actions
Copy link

🔍 Code Quality Report

�[0;35m[MONITOR]�[0m Code Review Monitoring Report

�[0;34m[INFO]�[0m Latest Quality Status:
SonarCloud: 0 bugs, 0 vulnerabilities, 411 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Sat Jan 31 22:19:09 UTC 2026: Code review monitoring started
Sat Jan 31 22:19:09 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 411
Sat Jan 31 22:19:09 UTC 2026: Qlty - 0 issues found, auto-formatting applied
Sat Jan 31 22:19:11 UTC 2026: Codacy analysis completed with auto-fixes

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 411
  • VULNERABILITIES: 0

Generated on: Sat Jan 31 22:20:36 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:line references 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 /remember block with a pointer to .agent/scripts/commands/remember.md (ideally with file:line references). As per coding guidelines: “Apply progressive disclosure pattern by using pointers to subagents rather than including inline content in agent documentation.”

Comment on lines 70 to 74
For each additional learning, suggest:
```text
/remember {concise description of learning}
```

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

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.

@augmentcode
Copy link

augmentcode bot commented Jan 31, 2026

🤖 Augment PR Summary

Summary: This PR makes memory capture more automatic and consistent by requiring proactive “/remember” suggestions and adding an automatic session distillation step.

Changes:

  • Added a mandatory proactive memory-trigger section to .agent/AGENTS.md with example triggers and a suggested response format
  • Expanded remember.md to define mandatory auto-remember triggers with a conversation-pattern table and concrete examples
  • Updated session-review.md to require running session-distill-helper.sh auto and renumbered subsequent steps

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 👎

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 2 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.


/remember {concise, actionable description}

(Reply 'y' to confirm, or edit the description)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Fix This in Augment

🤖 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}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This proactive /remember suggestion format differs from the “Required Response Format” in .agent/scripts/commands/remember.md, which can create conflicting agent instructions; consider standardizing on one template.

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

@github-actions
Copy link

🔍 Code Quality Report

�[0;35m[MONITOR]�[0m Code Review Monitoring Report

�[0;34m[INFO]�[0m Latest Quality Status:
SonarCloud: 0 bugs, 0 vulnerabilities, 411 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Sat Jan 31 22:26:48 UTC 2026: Code review monitoring started
Sat Jan 31 22:26:49 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 411
Sat Jan 31 22:26:49 UTC 2026: Qlty - 0 issues found, auto-formatting applied
Sat Jan 31 22:26:51 UTC 2026: Codacy analysis completed with auto-fixes

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 411
  • VULNERABILITIES: 0

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
@marcusquinn marcusquinn force-pushed the feature/memory-auto-triggers branch from 280b251 to ed0e62a Compare January 31, 2026 22:32
@marcusquinn marcusquinn merged commit 198b5a8 into main Jan 31, 2026
6 of 8 checks passed
@sonarqubecloud
Copy link

@github-actions
Copy link

🔍 Code Quality Report

�[0;35m[MONITOR]�[0m Code Review Monitoring Report

�[0;34m[INFO]�[0m Latest Quality Status:
SonarCloud: 0 bugs, 0 vulnerabilities, 411 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Sat Jan 31 22:32:36 UTC 2026: Code review monitoring started
Sat Jan 31 22:32:37 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 411
Sat Jan 31 22:32:37 UTC 2026: Qlty - 0 issues found, auto-formatting applied
Sat Jan 31 22:32:39 UTC 2026: Codacy analysis completed with auto-fixes

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 411
  • VULNERABILITIES: 0

Generated on: Sat Jan 31 22:34:04 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

@marcusquinn marcusquinn deleted the feature/memory-auto-triggers branch February 21, 2026 01:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant