recall · diff
git:20260302.532eaf4 to git:20260329.dcd8be5
120 added, 97 removed. Audit A to A.
---
name: recall
+ effort: max
+ argument-hint: "[yesterday|today|last week|TOPIC|QUESTION]"
description: |
- Search memos and transcripts for prior context. Use when:
- - User asks "why did we...", "what was the decision...", "remind me..."
+ Search memos and transcripts for prior context — temporal browsing, targeted keyword lookup, or deep synthesis redirect. Use when:
+ - User asks "what did I do yesterday?", "show me last week", "today's sessions"
+ - User asks "what was the decision...", "remind me...", "find the memo about..."
- User references past work: "last time", "previously", "earlier we..."
- - User asks about past patterns, solutions, or architectural decisions
- - User explicitly says "find the memo about...", "search for...", "recall..."
- - User asks "when did we...", "what was the approach..."
+ - User explicitly says "search for...", "recall...", "when did we..."
+ For complex why/how questions that require synthesizing across many sessions or projects, prefer `ask-memex` instead.
+
Do NOT trigger for:
- Future-oriented questions ("how should we implement X?")
- General knowledge ("what is a closure?")
- Questions answerable from current session context
- Vault health, graph structure, or task queries (use garden-tending)
+ - Deep cross-project pattern questions (use ask-memex)
<example>
- Context: User asks about a past decision
- User: "Why did we choose JWT for authentication?"
- Assistant: "Let me search our memos for that decision."
+ Context: User asks what they worked on recently
+ User: "What did I do yesterday?"
+ Assistant: Runs temporal scan, presents timeline of sessions and memos.
<commentary>
- "Why did we..." triggers recall. Extract keywords: "JWT OR authentication"
+ Date reference "yesterday" triggers TEMPORAL mode. No keywords needed.
</commentary>
</example>
<example>
- Context: User wants to recall previous work
- User: "What did we discuss last session about error handling?"
- Assistant: "I'll search the memex for our error handling discussions."
+ Context: User asks about a past decision
+ User: "Why did we choose JWT for authentication?"
+ Assistant: Searches with expanded keyword variants, synthesizes answer.
<commentary>
- "last session" and "what did we discuss" indicate recall need. Search: "error OR handling"
+ "Why did we..." triggers KEYWORD mode. Expand: "JWT OR authentication", "OAuth OR token OR auth", "session OR credential"
</commentary>
</example>
<example>
- Context: User asks about current implementation
- User: "How should we implement caching?"
- Assistant: [Does NOT search - this is about future work, not past decisions]
+ Context: User asks about cross-project patterns
+ User: "What patterns do we use for config management across projects?"
+ Assistant: Redirects to ask-memex skill for deep synthesis.
<commentary>
- "How should we" is future-oriented. No memo search needed unless user references past work.
+ "across projects" + "patterns" triggers DEEP mode → redirect to ask-memex.
</commentary>
</example>
allowed-tools: Read, Bash, Glob
---
# Recall: Retrieving Session Memory
- Search the memex vault for prior context when users ask about past decisions, approaches, or learnings.
+ ## Context
+ **Project:** !`basename $(git remote get-url origin 2>/dev/null | sed 's/\.git$//' | xargs basename 2>/dev/null) 2>/dev/null || basename $(pwd)`
+ **Vault:** !`sqlite3 $(memex path 2>/dev/null)/_index.sqlite "SELECT COUNT(*) || ' documents indexed'" 2>/dev/null || echo "(index unavailable)"`
+
---
- ## When to Search
+ ## Step 0: Classify the Query
- Search memos when the user's prompt suggests they want prior context:
+ Before doing anything, classify the user's question into one of three modes:
- ### Decision Questions
- - "Why did we choose X?"
- - "What was the decision about Y?"
- - "How did we solve Z before?"
+ ### TEMPORAL — date-based browsing
+ **Triggers:** "yesterday", "last week", "today", "what did I do on Monday", "show me recent work", "last 3 days", "this week's sessions", any date reference without topic keywords.
- ### Recall Requests
- - "Remind me about..."
- - "What did we do about..."
- - "Can you recall..."
+ **Action:** Go to → [Temporal Recall](#temporal-recall)
- ### Continuity Questions
- - "Last time we discussed..."
- - "Previously we..."
- - "Where were we with..."
+ ### KEYWORD — topic/decision lookup
+ **Triggers:** "why did we...", "find the memo about...", "what was the decision on...", "remind me about the retry pattern", any question with specific technical terms or project names.
- ### Technical Lookups
- - Questions about architectural decisions
- - Questions about patterns or solutions used before
- - Questions referencing "we did" or "we decided"
+ **Action:** Go to → [Keyword Recall](#keyword-recall)
- ---
+ ### DEEP — cross-project synthesis
+ **Triggers:** "what patterns do we use across...", "how has our approach to X evolved...", "compare how we handle X in different projects", questions spanning multiple sessions or projects.
- ## When NOT to Search
+ **Action:** Redirect to the **ask-memex** skill. Do not handle here.
- 1. **Answer is already in context** — current conversation already contains the information
- 2. **Question is general knowledge** — "What is a closure?" (not project-specific)
- 3. **Question is purely future-oriented with no past context** — "What's the best way to do X?" (general approach, not referencing past work). But if implementing something the vault has worked on before, consider searching for past decisions
- 4. **User explicitly asks for fresh perspective** — "Without looking at past decisions..."
- 5. **Already searched this session** — avoid redundant searches for the same topic
+ **If mixed** (date + topic, e.g., "what auth work did I do last week"): Start with TEMPORAL to narrow the date range, then scan the results for the topic.
---
- ## Query Formulation
-
- **Do NOT search with the full question.** Extract keywords for effective FTS matching.
+ ## Temporal Recall
- ### Step 1: Identify content words
- Remove question words (why, what, how, when) and common verbs (did, do, is, are, was, were).
+ Run the temporal scanner to browse sessions and memos by date:
- ### Step 2: Extract domain terms
- Keep technical terms, project names, feature names, library names.
+ ```bash
+ memex timeline "<date-expression>"
+ ```
- ### Step 3: Format as FTS query
- Join 2-5 keywords with OR for broad matching.
+ With project filter:
+ ```bash
+ memex timeline "<date-expression>" --project=<name>
+ ```
- ### Examples
+ Filter by type:
+ ```bash
+ memex timeline "<date-expression>" --type=memo
+ ```
- | User Question | Bad Query | Good Query |
- |---------------|-----------|------------|
- | "Why did we choose JWT for authentication?" | why did we choose JWT for authentication | `JWT OR authentication` |
- | "What was the decision about error handling?" | what was the decision about error handling | `error OR handling OR decision` |
- | "Remind me about the retry pattern" | remind me about the retry pattern | `retry OR pattern` |
- | "What's left to do on the API?" | what's left to do on the API | `API OR todo OR thread` |
+ ### Supported date expressions
+ `yesterday`, `today`, `3 days ago`, `last 5 days`, `this week`, `last week`, `last monday`, `7d`, `2w`, `march 15`, `2026-03-15`
- ### Stop Words to Remove
- - Question words: why, what, how, when, where, who, which
- - Common verbs: did, do, does, is, are, was, were, have, has, had, can, could, would, should
- - Pronouns: we, you, i, they, he, she, it, me, us, them
- - Prepositions: the, a, an, of, to, for, with, on, at, by, from, in, about
- - Recall words: remind, remember, recall, previously, earlier, last, time, decide, chose
+ ### After getting results
+ 1. Present the timeline clearly — group by project if multiple projects
+ 2. If the user wants details on a specific session, read the full memo or transcript
+ 3. Go to → [One Thing Synthesis](#one-thing-synthesis)
---
- ## Running the Search
+ ## Keyword Recall
- ```bash
- # Hybrid search (default — combines BM25 keyword + vector semantic via RRF scoring)
- uv run scripts/search.py "JWT OR authentication" --format=text
+ ### Step 1: Generate 2-3 query variants
- # Recent docs only
- uv run scripts/search.py "retry pattern" --since=7d --format=text
+ Before searching, proactively generate keyword variants to compensate for FTS's literal matching. This is not optional — always expand.
- # Filter by type or project
- uv run scripts/search.py "architecture" --type=memo --format=text
- uv run scripts/search.py "auth" --project=my-app --format=text
+ **Process:**
+ 1. Extract exact technical terms from the question
+ 2. Generate synonyms and alternative phrasings
+ 3. Add related concepts that might appear in memos about this topic
- # Choose search mode explicitly
- uv run scripts/search.py "auth" --mode=fts --format=text # fastest, keyword-only
- uv run scripts/search.py "auth" --mode=vector --format=text # semantic-only
- uv run scripts/search.py "auth" --mode=hybrid --format=text # both (default)
+ **Example expansions:**
+
+ | User Question | Variant 1 (exact) | Variant 2 (synonyms) | Variant 3 (related) |
+ |---|---|---|---|
+ | "Why did we choose JWT?" | `JWT OR authentication` | `OAuth OR token OR auth` | `session OR credential OR stateless` |
+ | "Remind me about the retry pattern" | `retry OR pattern` | `backoff OR resilience` | `fault OR tolerance OR circuit` |
+ | "What was the API rate limiting decision?" | `rate OR limiting OR API` | `throttle OR quota` | `429 OR backpressure OR queue` |
+
+ ### Step 2: Run searches in parallel
+
+ Run all variants simultaneously:
+
+ ```bash
+ memex search "JWT OR authentication"
+ memex search "OAuth OR token OR auth"
```
Or use the slash command: `/memex:search "JWT OR authentication"`
- **Note:** Default output is JSON. Use `--format=text` for human-readable results. Hybrid mode requires LM Studio or Gemini for embeddings; falls back to FTS-only if unavailable.
-
- ### When to Use Each Mode
+ ### Search modes
- **Hybrid (default):** Best for most queries — combines keyword precision with semantic understanding
- **FTS (`--mode=fts`):** Fastest. Best for exact terms, names, acronyms, error codes
- **Vector (`--mode=vector`):** Best for conceptual questions when exact wording is unknown
- ### If Search Returns Nothing
+ ### Step 3: Merge and deduplicate
+ If the same document appears in multiple searches, keep the highest-scoring instance. Present the top 5-8 unique results.
+
+ ### Step 4: Present results
+
+ 1. **Summarize relevance** — explain how results relate to the question
+ 2. **Quote key snippets** — pull the most relevant sentences
+ 3. **Acknowledge gaps** — if results don't fully answer, say so
+ 4. **Offer to load more** — if a memo looks promising, offer to `/memex:load` the full content
+
+ ### If searches return nothing
+
1. Try broader terms: `"JWT"` → `"auth OR token OR JWT"`
2. Try vector mode for conceptual matching: `--mode=vector`
3. Remove project filter if you added one
- 4. Check spelling of technical terms
+ 4. Try temporal scan to find sessions from the right time period
+ 5. Check spelling of technical terms
+ ### Go to → [One Thing Synthesis](#one-thing-synthesis)
+
---
- ## Presenting Results
+ ## One Thing Synthesis
- 1. **Summarize relevance** - Explain how results relate to the question
- 2. **Quote key snippets** - Pull the most relevant sentences
- 3. **Acknowledge gaps** - If results don't fully answer, say so
- 4. **Offer to load more** - If a memo looks promising, offer to `/memex:load` the full content
+ **Every recall ends with ONE specific next action.** Not "what would you like to do?" — a concrete recommendation.
- ### Example Response
+ After presenting results (temporal or keyword), synthesize the single highest-leverage next step based on:
- ```
- I found relevant context from a previous session:
+ 1. **Momentum** — What's almost done? What was actively being worked on?
+ → "Continue the auth middleware rewrite in alcor — the token refresh handler is the last piece"
- **OAuth Token Refresh Fix** (2026-01-25):
- > "...chose JWT for authentication because it's stateless and works well
- > with our microservices architecture. We considered session tokens but
- > rejected them due to the distributed nature of our backend..."
+ 2. **Blockers** — What's stuck or waiting on a decision?
+ → "The rate limiter is blocked on the Redis config decision from last week — resolve that first"
- This answers why JWT was chosen. Want me to load the full memo for more details?
- ```
+ 3. **Recency** — What was just active and could benefit from a follow-up?
+ → "You were working on the MCP server yesterday — pick up where you left off with tool registration"
+
+ **Rules:**
+ - Be specific: include the project name and concrete task
+ - Reference the evidence: "Based on the memo from March 15..."
+ - If nothing actionable emerges, say so honestly: "These sessions are complete — no open threads"
+ - If multiple threads are open, pick the one with the most momentum
+
+ ---
+
+ ## When NOT to Search
+
+ 1. **Answer is already in context** — current conversation already contains the information
+ 2. **Question is general knowledge** — "What is a closure?" (not project-specific)
+ 3. **Question is purely future-oriented with no past context** — "What's the best way to do X?"
+ 4. **User explicitly asks for fresh perspective** — "Without looking at past decisions..."
+ 5. **Already searched this session** — avoid redundant searches for the same topic