| name | hmem-context |
| description | Load specific context from hmem based on what is needed RIGHT NOW. Use when load_project output is not enough for the current question. |
hmem-context
TRIGGER
Use when:
- The current question requires a past decision not in the project brief
- You need to recall a specific bug, pattern, or lesson
- You need code details not in the Overview
Do NOT use for session start — use hmem-session-start instead.
STEP 1: Identify what type of information is needed
Pick ONE:
- Past decision → use search_memory with keywords from that decision
- Lesson or pattern → use find_related on the concept
- Code details → use read_memory on P00XX.2 (Codebase section)
STEP 2: Run the search (pick ONE)
For keyword search:
search_memory(query: "")
For semantic search:
find_related(id: "P00XX", query: "")
For direct node:
read_memory(id: "P00XX.2")
Replace P00XX with the active project ID (e.g., P0056).
STEP 3: Filter results
Select at most 3 nodes that directly answer the question.
- Prefer L-Entries over O-Entries (more compact, already distilled)
- Prefer entries with matching keywords in title
- Discard everything else
STEP 4: Output
[CONTEXT LOADED]
: <body of node 1>
---
<title of node 2>: <body of node 2>
[/CONTEXT LOADED]
If nothing relevant found:
[CONTEXT LOADED]
No relevant context found for:
[/CONTEXT LOADED]
→ If the missing info is code structure: dispatch an Explore agent to locate it in the filesystem.
→ After finding it, update the Codebase node immediately using the correct depth:
L3 — module group (if the group is missing):
append_memory(id="P00XX.2", title="Core modules")
L4 — individual module with signature + purpose:
append_memory(id="P00XX.2.N", title="moduleName.ts", body="functionName(param: Type): Return — purpose. src/path/moduleName.ts")
L5 — optional extended notes (edge cases, caveats):
append_memory(id="P00XX.2.N.M", title="Note", body="...")