agentleFS
zircotezircote/git-notes-memory/skills/memory-recall/SKILL.md

memory-recall

Skill4 starsChanged 12 months agoMITArchived repositoryView on GitHub

This skill should be used when the user asks about "past decisions", "previous learnings", "what did we decide", "how did we solve", "remember when", or mentions topics that may have stored memories. Also triggers when working on tasks where historical context would be valuable, such as "working on authentication", "implementing the database", or encountering errors similar to previously resolved issues.

10 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

6 rules. 0 are common, 5 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 8 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Relevance threshold: Only surface memories above 0.7 similarity

    line 147
  2. Distinctive:

    No interruption: Don't break user's flow mid-thought

    line 150
  3. Distinctive:

    When user starts: "I'm working on the authentication system"

    line 158
  4. Distinctive:

    When user encounters: "Getting a connection timeout error"

    line 167
  5. Distinctive:

    When user asks: "Why are we using Redis for caching?"

    line 176
  6. Very specific:

    references/namespace-guide.md: - When to use each namespace

    line 197

“Common” is measured: kept by at least 6 in 10 of the 8 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Memory Recall Skill

Automatically recalls relevant memories from the git-backed memory system to provide historical context during conversations.

Purpose

This skill bridges the gap between conversations by surfacing relevant decisions, learnings, context, and patterns stored in the git notes memory system. It helps maintain continuity across sessions and prevents re-solving problems that have already been addressed.

When This Skill Activates

Direct Triggers

  • Questions about past work: "what did we decide about...", "how did we handle...", "why did we choose..."
  • Explicit recall requests: "recall", "remember when", "previously", "last time"
  • Decision inquiries: "what was the reasoning", "why are we using..."

Contextual Triggers

  • Starting work on a feature that has related memories
  • Encountering errors similar to previously resolved issues
  • Discussing topics with high relevance scores to stored memories
  • Beginning tasks where historical context would be valuable

Core Workflow

Step 1: Context Extraction

Extract key concepts from the current conversation:

from git_notes_memory import get_recall_service

recall = get_recall_service()

# Extract concepts from recent messages
concepts = extract_concepts(conversation_context)
# Examples: file names, function names, error messages, technology terms

Step 2: Memory Search

Perform semantic search across namespaces:

python3 -c "
from git_notes_memory import get_recall_service

recall = get_recall_service()
results = recall.search(
    query='''$EXTRACTED_CONCEPTS''',
    k=5,
    min_similarity=0.7  # Only high-relevance results
)

for r in results:
    print(f'{r.memory.namespace}: {r.memory.summary} (score: {r.similarity:.2f})')
"

Step 3: Format Results

Present memories in a non-intrusive summary:

**Relevant Memories Found** (3 matches)

1. **Decisions** (0.92 relevance): Use PostgreSQL for JSONB support
2. **Learnings** (0.85 relevance): Connection pooling prevents timeouts
3. **Progress** (0.78 relevance): Database schema in migrations/

_Use `/memory:recall` for more details or `/memory:search` for custom queries._

Configuration

The skill respects environment variables:

VariableDefaultDescription
MEMORY_AUTO_RECALLtrueEnable/disable automatic recall
MEMORY_RECALL_THRESHOLD0.7Minimum similarity score
MEMORY_RECALL_LIMIT3Maximum memories to surface

Namespace Reference

The memory system supports 10 namespaces:

NamespaceContainsExample Query
inceptionProblem statements, scope, success criteria"project goals", "what are we building"
elicitationRequirements clarifications, constraints"requirements", "must support"
researchExternal findings, technology evaluations"compared options", "evaluated"
decisionsArchitectural and design decisions"database selection", "auth approach"
progressTask completions, milestones"completed phase", "finished"
blockersObstacles and impediments"stuck on", "blocked by"
reviewsCode review findings"code review", "security finding"
learningsKnowledge discoveries"pytest fixtures", "async patterns"
retrospectivePost-mortems and retrospectives"project retrospective", "lessons learned"
patternsRecurring solutions"error handling", "API patterns"

Memory Expansion and Hydration

Memories in <memory_context> are summaries only to save token budget. When a memory is highly relevant to the current task, you should expand it.

Auto-Expansion Triggers

Expand a memory automatically when:

  • Relevance > 0.85: High semantic similarity to current task
  • Active blocker: Memory is in blockers namespace and may be recurring
  • Decision context: User is making a similar decision and past context helps

How to Expand Memories

  1. Use recall command:
    /memory:recall <memory-id>
    Example: /memory:recall decisions:abc123:0
  2. Check git commits for file context: Memory IDs contain commit SHAs: namespace:COMMIT_SHA:index
    git show abc123 --name-only  # See files changed with this memory
  3. Reference expanded content in your response:
    • "Based on the decision (decisions:abc123:0), we chose PostgreSQL because..."
    • "This is similar to a previous blocker (blockers:def456:0) which was resolved by..."

When to Use Summaries Only

  • Memory is tangentially related (relevance < 0.7)
  • User is just exploring, not deeply working on the topic
  • Multiple memories match - summarize first, expand on request

Non-Intrusive Design Principles

  1. Relevance threshold: Only surface memories above 0.7 similarity
  2. Limited output: Show brief summaries, not full content
  3. Auto-expand high relevance: Expand memories above 0.85 automatically
  4. No interruption: Don't break user's flow mid-thought
  5. Escape hatch: Can be disabled via environment variable
  6. On-demand detail: Full content available via /memory:recall

Integration Examples

Automatic Context Loading

When user starts: "I'm working on the authentication system"

The skill:

  1. Extracts "authentication system" as the query
  2. Searches all namespaces
  3. Surfaces relevant decisions, learnings, and patterns

Error Resolution

When user encounters: "Getting a connection timeout error"

The skill:

  1. Extracts "connection timeout error"
  2. Searches for similar past issues
  3. Surfaces relevant learnings and patterns

Decision Inquiry

When user asks: "Why are we using Redis for caching?"

The skill:

  1. Extracts "Redis caching" as the query
  2. Focuses on decisions namespace
  3. Surfaces the original decision with reasoning

Related Commands

  • /memory:capture - Store new memories
  • /memory:recall - Manual recall with options
  • /memory:search - Advanced search with filters
  • /memory:sync - Synchronize memory index
  • /memory:status - Check system health

Additional Resources

Reference Files

For detailed implementation patterns:

  • references/search-optimization.md - Query optimization techniques
  • references/namespace-guide.md - When to use each namespace

Example Files

Working examples in examples/:

  • examples/auto-recall.py - Automatic context extraction
  • examples/filtered-search.py - Namespace-filtered queries

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.