---
id: hippocampus-living-memory-howto
app: personal-docs
description: "T2 domain tier of hippocampus-living-memory: the wkhippo umbrella subcommands (recall, foresee, export, status) as the canonical final form, recall and foresight usage and spec, the end-of-session life-review encoding trigger, the two unlocks plus noise rule, and the wkfind four-source find organ with the time-join. Consult when using or extending the memory organ."
tags: [memory, hippocampus, wkhippo, recall, foresee, howto, t2]
---

> **Refresh**: `wkappbot skill read hippocampus-living-memory-howto --if-newer` — v1.18 (2026-06-05)

# Hippocampus Living-Memory HowTo (T2)

## Steps

1. WKHIPPO UMBRELLA equals the FINAL FORM and the single fixed way to express every memory action: ALWAYS call the wkhippo subcommand form so intent is explicit. wkhippo with no args equals memory STATUS (the announce of encoding, recall, sleep state); wkhippo recall (kw) equals session recall (hoesang); wkhippo foresee (kw) equals predecessor-outcome foresight (mirae-gwancheuk); wkhippo export (sessionid) equals auto-topic-MD encoding (haema). There are NO standalone aliases: the former wkrecall and wkforesee commands were removed 2026-06-05 for consistency, so the wkhippo subcommands (recall, foresee, export, status) are the one fixed interface. This keeps the command stream self-describing and future search easy: one tool, named subcommands.
2. FILES: D:/GitHub/WKAppBot/bin holds wkhippo.ps1 (the single brain and the ONLY hippo command) and session-find.ps1 (the underlying search engine). The standalone wkrecall.ps1 and wkforesee.ps1 alias scripts were REMOVED 2026-06-05; use the wkhippo subcommand form (wkhippo recall, wkhippo foresee, wkhippo export, wkhippo status). All path joins use Join-Path PSScriptRoot for portability. wkhippo is a read-only wk search tool and MUST stay busy-fleet-guard plus pace exempt so recall is frictionless.
3. RECALL USAGE plus SPEC: wkhippo recall (kw...) ripgreps the RAW unprocessed session transcripts of ALL AIs as-is (Claude under the home claude projects slug jsonl, Codex under home codex sessions, Gemini wkgemini logs), with no derived or scored base and zero transform lag, using the bundled ripgrep via wkgrep as the fastest backend. No transform-first; grep the originals.
4. FORESEE equals RECALL-AS-FORESIGHT: before committing to an approach, wkhippo foresee (approach) to find a PREDECESSOR session that already tried that path and read HOW IT TURNED OUT (worked, burned tokens, hit a guard cascade, got reverted). This upgrades recall from fact-lookup to strategy: infer your future from a senior outcome and avoid repeating the wrong road. Automated success or fail or revert extraction is a future enhancement.
5. ENCODING TRIGGER equals END-OF-SESSION LIFE-REVIEW: a Claude death equals session end or context exhaustion or compaction. On a Stop or SessionEnd hook, or just before compaction, auto-run a life-review: first wkhippo export the whole session to a topic-segmented MD, second run the opus-self-reflection audit, so the session life consolidates into the hippocampus BEFORE the context dies. Floor equals at minimum one guaranteed death-bed encode (the whole life saved at the last moment beats lost entirely); a per-turn encode is the ideal. Rebirth equals post-compaction-recovery reading what the death-bed review saved.
6. TWO UNLOCKS plus NOISE: to keep this a true hippocampus, build the auto-topic-MD exporter on the session-find JSONL parser (encoding), and keep the busy-fleet-guard read-only exemption for wk search (frictionless recall). REDUCE NOISE in recall and encoding: filter low-signal churn (PSScriptPolicyTest and tmp compilation artifacts, repetitive json-write lines, the suggestions.jsonl pattern). Aim HIGH-SIGNAL not lossless: acceptable imperfection, since human memory distorts too; filter the obvious churn and accept the rest.
7. wkfind equals the BROADER FIND ORGAN over FOUR sources: code (ripgrep via wkgrep, exists), session recall (wkfind session forwards to session-find over all-AI raw transcripts, exists), git commit history (git log dash-S and grep pickaxe, to add), and web (WebSearch plus WebFetch, to add). wkhippo with recall and foresee is the MEMORY organ; wkfind is the cross-source FIND organ that INCLUDES session recall. TIME-JOIN: session turns and git commits both carry timestamps, so recall a moment to get its time window then wkfind the commit history in that window for a full reconstruction of what-happened-then (conversation plus commits plus code, time-aligned).
8. PROMPT + TOOL-CALL PRE-SEARCH (user insight 2026-06-05, the efficiency unlock): recall/foresee index BOTH the user PROMPTS (USER turns) and every TOOL CALL (Bash command=, PowerShell, Edit, CronCreate, etc.) in the session transcripts, so you can SEARCH them BEFORE acting. Two power use-cases: (1) PROMPT SEARCH -- has the user asked this before, and what similar request was handled and how -> find the past request plus its handling. (2) TOOL-CALL SEARCH -- what EXACT commands did a predecessor run to solve task X -> copy the PROVEN command sequence instead of reinventing it (e.g. recall the exact wkappbot/git/python invocations a senior used for a migration, a mail scan, a 3-tier skill split, a cron dedup). COMBINED WITH foresee OUTCOME: one match shows the predecessor's command sequence AND whether it worked or broke -> REPLAY the sequence that succeeded, AVOID the one that broke. NET: the session corpus is not just memory of facts and outcomes but a reusable LIBRARY OF WORKING ACTION SEQUENCES -- recall a predecessor's method and make it your own. Strongest efficiency move: before starting a task, recall the proven tool-call recipe rather than deriving it from scratch.
9. GEMINI SESSION INTEGRATION: Gemini CLI stores conversation history at ~/.gemini/tmp/<project>/chats/session-*.jsonl (JSONL format, one file per session). Each line is a JSON message with timestamp, type (user/info/error), and content array. The recall/foresee system now indexes Gemini sessions the same way as Claude: grep user messages for keyword matches, extract exchanges (user turn boundaries), score by token frequency. Gemini results appear as 'gemini:projectname/sessionid' in recall output. Searches automatically include Gemini history alongside Claude and Codex sessions across all projects (or single repo with -RepoOnly flag).
10. Verified 2026-06-06: ev-hippo-bug1-codex-cwd.sh (resolve ts=2026-06-06T03:59:37)
11. Verified 2026-06-06: ev-hippo-bug2-gemini-all.sh (resolve ts=2026-06-06T04:00:14)
12. Verified 2026-06-06: ev-hippo-bug3-toolresult-display.sh (resolve ts=2026-06-06T04:00:51)
13. Verified 2026-06-06: ev-hippo-bug4-foresee-double.sh (resolve ts=2026-06-06T04:01:28)
14. [USE INSTEAD OF ask gpt FOR PRECEDENT QUESTIONS] wkhippo recall/foresee is the FIRST-CHOICE answer source for any 'how did we solve X / what's the root cause / did this approach work before' question -- prefer it OVER 'ask gpt'. Why: (1) zero CDP/ChatGPT dependency, so it works when the ask pipeline is down (ChatGPT session expired etc); (2) pace-exempt + instant; (3) it returns the ACTUAL predecessor command sequence + whether it succeeded/broke, which is more actionable than GPT's cold guess. Reach for ask gpt ONLY when the corpus has no precedent (foresee prints [FRONTIER]) and you need genuinely new reasoning. Cross-refs: [[ask-health-check]] (ASK DOWN -> wkhippo local fallback step) and [[ask-suggest-priority-batching]] (RECALL BEFORE ASK step) now route here.
