cds-search
Search past session observations using the sessions.search MCP tool. Falls back to CLI if the MCP server is not available.
/cds-search -- Search session memory
Search for past decisions, bugs, patterns, and observations stored in the project's SQLite session database.
How to execute
-
Extract the search query from
$ARGUMENTS(everything after/cds-search). -
Primary path (MCP tool): Call
mcp__cds__sessions.searchwith the query:mcp__cds__sessions.search({ query: "$ARGUMENTS" })Format the returned hits as a readable list showing:
- Observation type (decision, bug, pattern, etc.)
- Content snippet (first 2-3 lines)
- Session date
- Session ID (abbreviated)
-
Fallback path (CLI): If
mcp__cds__sessions.searchis not available (MCP server not registered), use Bash:Bash("npx claude-dev-stack search \"$ARGUMENTS\"")Display the CLI output verbatim.
When to use
- User asks about past decisions ("what did we decide about X")
- User asks about past bugs ("did we see this bug before")
- User asks about patterns ("how did we implement X")
- User explicitly invokes
/cds-search
Notes
- Results are ranked by FTS5 BM25 relevance
- Only searches the current project's sessions.db
- For cross-project search, use the CLI directly on each project