searchlisted
Install: claude install-skill phnx-labs/.agents
# sessions:search
Recall is not "run one CLI query and paste the result." The index that backs
`agents sessions "<q>"` only covers **user turns + title/topic/project**
(`session_text`, bm25) and, separately, **tool activity**
(`tool_call_text`, trigram, needs `--include tools --query`). **Assistant
answers are never indexed.** A session can be 665 messages long with only a
43-character title in the index — the actual answer the user wants is buried
in an assistant turn the index cannot see. Follow this procedure in order;
do not skip straight to guessing an answer from memory.
## 1. Derive search terms from the user's ask
Pull out, in this priority order, every one of these that appears in the ask:
- **Ticket/issue IDs** — `PHNX-\d+`, `RUSH-\d+`, `#\d+`, or any tracker key shape.
- **Filenames / paths** — anything with a `/` or a file extension.
- **Symbols** — function/class/variable names, CLI flag names, config keys.
- **Distinctive keywords** — 2-4 words that would be rare together (skip
generic verbs like "fix", "add", "look at").
Keep 2-5 terms. Too many terms narrows an FTS query to zero; too few floods it.
If the ask is vague ("what did we decide about the recall design"), use the
closest concrete nouns ("recall design") — do not ask the user to rephrase
before trying at least one layer below.
## 2. Layered discovery — try each in order, stop at the first that returns real hits
**Layer 1 — user turns + titles (fastest, whole-session refs):**
```bash
agents s