Hindsight Memory
Shared brain across all agents/repos. One MCP server (hindsight), tool names
below have no server prefix in this doc — call them as-is via the MCP tool
interface for server hindsight (or user-hindsight, depending on how the
client namespaces it).
Quick Start
At the start of any task that isn't trivially simple — before deep-diving
into the codebase, before asking the user clarifying questions they may have
already answered before, before debugging an error from scratch — call:
recall(query="<plain-language restatement of the task/problem>")
- Phrase the query naturally, in your own words — recall is semantic, not
keyword search. You don't need to guess how the fact was originally worded.
- If recall returns relevant hits, use them directly. State briefly what you
found ("Hindsight has a note on this: ...") and skip redundant exploration.
- If recall returns nothing useful, proceed with normal investigation
(reading code, running commands, asking the user) as you would anyway.
Do this silently and by default — don't ask the user for permission to
check memory first, and don't announce the tool name; just fold the result
into your answer naturally.
When to Recall (trigger scenarios)
- Investigating an error, crash, or "why is X broken/404/failing" question
- Starting work in an unfamiliar module, service, or repo area
- About to ask the user for context/background that might already be recorded
(architecture decisions, past incidents, env quirks, naming conventions)
- Before repeating a large repo read/explore pass "from the start" — check if
someone already mapped this territory
- Any task that feels like it could be a recurring/known issue
When to Retain (write facts back)
After you (or the user) resolve something non-obvious, persist it so nobody
re-solves it:
- Root cause of a bug, especially non-obvious ones
- A gotcha / footgun (e.g. "API X silently drops unknown fields")
- An architecture or process decision and its rationale
- A workaround for a broken/flaky external dependency
- A newly learned project convention or naming rule
Use sync_retain (blocks until stored, safe default) or retain (async, fine
for fire-and-forget):
sync_retain(
content="<the fact, self-contained — include what/why/when so it reads standalone later>",
context="<short label, e.g. 'quizverse gotcha', 'nakama infra', 'frontend api contract'>",
tags=["project:<slug>"] # omit for cross-project/org-wide facts
)
Valid project:<slug> values: quizverse-unity, quizverse-frontend,
backend-ai, nakama, kube-infra.
Before retaining, do a quick recall on the same fact — if it's already
there, use update_memory to correct/extend it instead of creating a
near-duplicate. (This dedupe + tagging convention is also enforced bank-side
via a directive named "Retain quality bar", so it applies to every agent
hitting this bank, not just Cursor sessions.)
Skip retaining: pure scratch/session chatter, anything only relevant to the
current chat, or facts already confirmed present via recall. Never retain
secrets, API keys, passwords, or tokens.
Other Useful Tools
reflect(query=...) — ask for synthesized analysis/reasoning across
memories rather than a raw fact list. Use when the question needs judgment
("what's our overall approach to X"), not just lookup.
list_memories(q=...) — direct browse/search without relevance ranking,
useful for auditing what's stored on a topic.
update_memory / invalidate_memory — correct or retire a fact that turns
out to be wrong or outdated (don't just retain a contradicting fact on top).
Troubleshooting
- If the
hindsight MCP tools aren't available (server disconnected, needs
auth, or times out): don't block the task on it. Note it briefly and
continue with normal investigation — memory lookup is an accelerator, not a
hard dependency.
- If a call fails with an auth error, that's a server-side/token issue — flag
it to the user rather than retrying repeatedly.
- Read-only tools (
recall, reflect, list_*, get_*) and retain/
sync_retain are auto-approved in mcp.json, so they run without a
confirmation prompt. Destructive tools (delete_*, clear_*,
invalidate_memory, update_*) are intentionally left out of
auto-approve — expect (and respect) a confirmation prompt for those.
Notes
- Verified end-to-end (2026-07-09):
recall("why is the quizverse article page giving a 404?") correctly surfaces the seeded fact about Sanity
blogPost vs post types. Bank currently holds 77+ facts across infra,
LLM ops, process rules, and app-specific gotchas.
- This is a shared, cross-team memory — never retain secrets, credentials, or
anything a client/user isolation rule would forbid sharing.
1---2name: ivx-hindsight-memory3description: Shared long-term memory for IntelliVerse-X agents and Cursor sessions, backed by the "hindsight" MCP server. Stores root causes, gotchas, decisions, and process rules learned once so they never have to be re-explained or re-discovered. Use PROACTIVELY at the start of any non-trivial task (bug investigation, "why is X happening", error triage, unfamiliar area of a repo, or anything that smells like "we've probably hit this before") by calling recall BEFORE reading the repo from scratch or asking the user to restate context. Also use after solving something non-obvious to write the lesson back with retain/sync_retain, and applies across every workspace (QuizVerse Unity, Quizverse-web-frontend, Intelliverse-X-AI, nakama, intelli-verse-kube-infra).4---56# Hindsight Memory78Shared brain across all agents/repos. One MCP server (`hindsight`), tool names9below have no server prefix in this doc — call them as-is via the MCP tool10interface for server `hindsight` (or `user-hindsight`, depending on how the11client namespaces it).1213## Quick Start1415**At the start of any task that isn't trivially simple** — before deep-diving16into the codebase, before asking the user clarifying questions they may have17already answered before, before debugging an error from scratch — call:1819```20recall(query="<plain-language restatement of the task/problem>")21```2223- Phrase the query naturally, in your own words — recall is semantic, not24 keyword search. You don't need to guess how the fact was originally worded.25- If recall returns relevant hits, use them directly. State briefly what you26 found ("Hindsight has a note on this: ...") and skip redundant exploration.27- If recall returns nothing useful, proceed with normal investigation28 (reading code, running commands, asking the user) as you would anyway.2930**Do this silently and by default** — don't ask the user for permission to31check memory first, and don't announce the tool name; just fold the result32into your answer naturally.3334## When to Recall (trigger scenarios)3536- Investigating an error, crash, or "why is X broken/404/failing" question37- Starting work in an unfamiliar module, service, or repo area38- About to ask the user for context/background that might already be recorded39 (architecture decisions, past incidents, env quirks, naming conventions)40- Before repeating a large repo read/explore pass "from the start" — check if41 someone already mapped this territory42- Any task that feels like it could be a recurring/known issue4344## When to Retain (write facts back)4546After you (or the user) resolve something non-obvious, persist it so nobody47re-solves it:4849- Root cause of a bug, especially non-obvious ones50- A gotcha / footgun (e.g. "API X silently drops unknown fields")51- An architecture or process decision and its rationale52- A workaround for a broken/flaky external dependency53- A newly learned project convention or naming rule5455Use `sync_retain` (blocks until stored, safe default) or `retain` (async, fine56for fire-and-forget):5758```59sync_retain(60 content="<the fact, self-contained — include what/why/when so it reads standalone later>",61 context="<short label, e.g. 'quizverse gotcha', 'nakama infra', 'frontend api contract'>",62 tags=["project:<slug>"] # omit for cross-project/org-wide facts63)64```6566Valid `project:<slug>` values: `quizverse-unity`, `quizverse-frontend`,67`backend-ai`, `nakama`, `kube-infra`.6869Before retaining, do a quick `recall` on the same fact — if it's already70there, use `update_memory` to correct/extend it instead of creating a71near-duplicate. (This dedupe + tagging convention is also enforced bank-side72via a directive named "Retain quality bar", so it applies to every agent73hitting this bank, not just Cursor sessions.)7475Skip retaining: pure scratch/session chatter, anything only relevant to the76current chat, or facts already confirmed present via `recall`. Never retain77secrets, API keys, passwords, or tokens.7879## Other Useful Tools8081- `reflect(query=...)` — ask for synthesized analysis/reasoning across82 memories rather than a raw fact list. Use when the question needs judgment83 ("what's our overall approach to X"), not just lookup.84- `list_memories(q=...)` — direct browse/search without relevance ranking,85 useful for auditing what's stored on a topic.86- `update_memory` / `invalidate_memory` — correct or retire a fact that turns87 out to be wrong or outdated (don't just retain a contradicting fact on top).8889## Troubleshooting9091- If the `hindsight` MCP tools aren't available (server disconnected, needs92 auth, or times out): don't block the task on it. Note it briefly and93 continue with normal investigation — memory lookup is an accelerator, not a94 hard dependency.95- If a call fails with an auth error, that's a server-side/token issue — flag96 it to the user rather than retrying repeatedly.97- Read-only tools (`recall`, `reflect`, `list_*`, `get_*`) and `retain`/98 `sync_retain` are auto-approved in `mcp.json`, so they run without a99 confirmation prompt. Destructive tools (`delete_*`, `clear_*`,100 `invalidate_memory`, `update_*`) are intentionally left out of101 auto-approve — expect (and respect) a confirmation prompt for those.102103## Notes104105- Verified end-to-end (2026-07-09): `recall("why is the quizverse article106 page giving a 404?")` correctly surfaces the seeded fact about Sanity107 `blogPost` vs `post` types. Bank currently holds 77+ facts across infra,108 LLM ops, process rules, and app-specific gotchas.109- This is a shared, cross-team memory — never retain secrets, credentials, or110 anything a client/user isolation rule would forbid sharing.