| name | recall |
| description | This skill should be used when the user asks about past work or prior decisions — "what did we decide about X", "how did we do this before", "do we have notes on X", "why did we choose Y", "recall X", "check memory" — or when a task needs context from earlier sessions. Retrieves from the turing-mem store index-first, opening at most three notes. |
| argument-hint | [question] |
tm — recall
Index-first retrieval from the turing-mem store. Fixed budget: one index read → open ≤3 notes → at most one wikilink hop → answer. Never bulk-load the store into context.
1. Guard (always first)
Run ${CLAUDE_PLUGIN_ROOT}/scripts/tm-guard.sh "$PWD" and parse its KEY=VALUE output. When this skill auto-triggered (a description match, not an explicit user request) and the guard is not fully healthy (TM_STATUS not OK, or PROJECT_EXISTS=false), skip the retrieval and at most mention /tm:init in one line — never start a repair or scaffold flow from an auto-trigger; the statuses below apply to explicit invocations.
NEED_INIT / NEED_ADOPT: stop; follow the repair flows in <MEMORY_DIR>/references/bootstrap.md (if the store does not exist yet, the same file ships in the plugin at ${CLAUDE_PLUGIN_ROOT}/references/bootstrap.md) — or suggest /tm:init.
NEED_MIGRATE / READ_ONLY: proceed read-only — recall never writes, so retrieval is allowed. Mention the status to the user once.
OK with PROJECT_EXISTS=false: no project memory exists yet for this directory. Search the global scope only and say so; offer /tm:init to create the project folder.
2. Retrieval loop
- Read the project index:
<MEMORY_DIR>/<PROJECT_PATH>/INDEX.md. When the question is not project-local — user preferences, environment facts, cross-project workflow — also read <MEMORY_DIR>/global/INDEX.md.
- Scan the
## Notes rows (newest-first, shaped - YYYY-MM-DD · <type> · [[notes/<file>]] — <gist> #tags). Match candidates on gist text, type, tags, and recency. For consolidated current state ("where were we", "current status"), prefer the scope's MEMORY.md — the index points at it.
- Cross-project hop: when the answer likely lives in another project's memory ("how did we do X in project Y", a technique used elsewhere), read the global index's
## Projects section, pick the matching project, and read its INDEX.md. Index reads are cheap and don't count toward the note budget.
- Open at most 3 note files total across all scopes visited (
MEMORY.md counts toward the 3).
- From an opened note, follow at most one wikilink hop, and only when the link clearly leads to the answer.
- Answer the question, citing the store-relative paths of the notes used so the user can open them.
3. Miss fallback — tm-librarian
If the index rows (including a ## Projects hop) yield no plausible candidates, or the opened notes do not answer the question:
- Dispatch the tm-librarian agent via the Task tool. Pass it: the question,
MEMORY_DIR, and PROJECT_PATH. It greps the whole store out-of-context and returns ≤3 note paths with gists.
- Open the returned paths (a fresh ≤3 budget) and answer as in step 2.5.
- If the librarian also misses, tell the user nothing relevant is stored and offer
/tm:remember once the answer is worked out in-session.
4. Codex fallback
No agent dispatch on Codex — run the librarian search inline, keeping output small:
grep -ril "<term>" "<MEMORY_DIR>/projects" "<MEMORY_DIR>/global" | head -20
Narrow to ≤3 files by reading only their gists (grep -h "^\*\*Gist:" <file>), then open just those. Never cat whole directories.
Rules
- Never bulk-load: no reading more than 3 notes plus 1 hop, regardless of how tempting the index looks.
log/ checkpoints are not a retrieval surface; they are only reached through the librarian grep.
- Recall is read-only in every status — it never creates, edits, or commits store files.