---
name: memory-search
description: >
  Search and summarize memories from WALL-E's brain. Performs multi-query
  searches across Slack messages, chat history, and knowledge base.
  Use for research, finding past conversations, and building context.
version: 1.0.0
author: wall-e
execution: agent
trigger:
  type: manual
config:
  query:
    type: string
    default: ""
    description: "Search query or topic to research"
  source:
    type: string
    enum: [all, slack, ctm, wall-e-chat]
    default: all
    description: "Filter to a specific memory source"
  depth:
    type: string
    enum: [quick, deep]
    default: quick
    description: "quick = 1-2 searches, deep = exhaustive multi-query"
tags: [search, memory, research, knowledge, context]
permissions:
  - brain:read
---
# Memory Search & Summarize

## Your Goal

Search WALL-E's brain for information on a given topic and produce a clear,
organized summary of what was found. This skill is the foundation for
answering questions about past conversations, decisions, and context.

## Steps

### 1. Understand the Query
Parse the task description or config query to understand what information
is being sought. Identify:
- Key people involved
- Time period of interest
- Specific channels or topics
- Whether this is a factual lookup or a pattern/trend analysis

### 2. Execute Searches
Use `search_memories` with MULTIPLE queries in the SAME turn:

**For private/work-context queries:**
- If MCP `walle_context_hint` is available, call it first as a cheap preflight to decide whether Wall-E context is required.
- If MCP `walle_lookup_context` is available, call it first to route the request and gather memory/entity/session context together.
- Use MCP `walle_user_profile` for user writing style, tone, personality, leadership style, preference, and work-pattern questions.
- Treat WALL-E's brain as the primary source for remembered user context before public web search.
- Search prior conversations, decisions, preferences, project/task names, tool names, Slack/email/calendar terms, and any error text or session id the user provides.
- For self-analysis questions about the user's writing style, communication style, tone, personality, leadership style, work patterns, or whether they are "too terse", search memory and prior sessions before answering from the current chat alone.
- Use public web search only for public/current facts, after memory has no useful hits, or when the user explicitly asks for public information.

**For people-related queries:**
- Use `lookup_person` or `entity_search` first when available; note that MCP `entity_search` takes `name`, not `query`.
- Search by person's name
- Search by their common topics or projects
- Search in Slack specifically (`source: "slack"`)

**For topic-related queries:**
- Search the topic directly
- Search related/synonym terms
- Search in both English and Chinese (the owner uses both)

**For time-based queries:**
- Search with date-range keywords
- Search for events or milestones around that time

### 3. Analyze & Cross-Reference
Use the `think` tool to:
- Identify patterns across search results
- Note contradictions or evolving opinions
- Distinguish between the owner's views and others' views
- Consider what might be missing from the results

### 4. Synthesize
Produce a structured summary:

**Key Findings**
- Most important discoveries, with dates and people cited

**Evidence**
- Direct quotes from Slack messages (use > blockquotes)
- Dates and channels for context

**Gaps**
- What information is missing or ambiguous
- Suggested follow-up queries

## Guidelines

- Always cite sources: include timestamps and channel names
- For private work/person context, summarize minimally and do not expose emails, meeting links, or private document URLs unless needed
- Translate Chinese content -- it often contains the most candid opinions
- Distinguish between what the owner SAID vs what others SAID ABOUT/TO them
- When evidence is thin, say so explicitly rather than speculating
