Problem
User context (profile, preferences, current focus, orientation) currently lives in markdown files at parachute/context/*.md. These files:
- Go stale (now.md last updated Jan 2026, two months ago)
- Are not accessible across sandbox containers (filesystem-bound)
- Have no update mechanism beyond manual editing
- Are referenced via
@ imports in CLAUDE.md that may not resolve correctly
Proposed
Move user context to the brain graph as Note nodes with note_type: "context". Auto-load context notes into every chat session's system prompt. Provide a write_note tool so the AI can create/update notes conversationally.
Implementation Plan
Step 1: Add write_note to vault_tools.py
New shared handler:
async def write_note(graph, note_type, title, content, date=None) -> dict:
- For
note_type: "context" — MERGE on note_type + title (exactly one note per context title)
- For other note_types — CREATE with generated
entry_id
- Sets
created_by: "agent", status: "active", created_at: now()
date optional (required for journals, not for context)
- Content capped at 10K chars
Add tool definition to VAULT_TOOLS list.
Files: vault_tools.py
Step 2: Register write_note in both MCP servers
- Direct MCP (
mcp_server.py): Import and add handler in handle_tool_call
- HTTP Bridge (
mcp_tools.py): Add to _VAULT_TOOL_NAMES, add case in _handle_vault_tool
Files: mcp_server.py, mcp_tools.py
Step 3: Auto-load context notes in orchestrator
In _build_system_prompt(), after PARACHUTE_PROMPT + CLAUDE.md, before container context:
New method _load_context_notes():
- Query:
MATCH (n:Note) WHERE n.note_type = 'context' AND n.status = 'active' RETURN n ORDER BY n.title
- Format as:
## User Context\n\n### {title}\n{content}\n for each note
- Cap total at 8K chars
Files: orchestrator.py
Step 4: Update tool guidance
Add write_note to Browse group in tool_guidance.py. Update list_notes description to mention context notes.
Files: tool_guidance.py
Step 5: Update system prompt vault guidance
Add to PARACHUTE_PROMPT Vault and Memory section:
**Updating context:** When the user says "remember" something about themselves
(preferences, location, current focus), use write_note with note_type='context'
to save it. Context notes are automatically loaded into every session.
Files: orchestrator.py
Step 6: Ensure Note schema exists in core
Move ensure_node_table("Note", ...) to brain_chat_store.py so it runs at startup regardless of whether the daily module is loaded. Daily module can still call it too (idempotent).
Files: brain_chat_store.py
Step 7: Migration script
scripts/migrate_context_to_graph.py — reads existing context/*.md files, creates Note nodes:
profile.md → Note(note_type="context", title="Profile")
now.md → Note(note_type="context", title="Now")
memory.md → Note(note_type="context", title="Preferences")
orientation.md → Note(note_type="context", title="Orientation")
Skips identity.md and tools.md (redundant with PARACHUTE_PROMPT).
Files: new scripts/migrate_context_to_graph.py
Step 8: Tests
test_chat_memory.py: Add write_note tests (create, update/merge, size cap, validation)
test_orchestrator_phases.py: Add context note loading test
test_tool_guidance.py: Verify write_note in guidance
Not in scope
- Per-session context selection (load all context notes for now)
- Agent-driven context updates (works automatically once
write_note exists)
- UI for managing context notes
- Removing old
context/*.md files (leave as fallback)
Context
Part of the system prompt overhaul. The CLAUDE.md file has been simplified to no longer reference context files. This issue tracks building the replacement.
Problem
User context (profile, preferences, current focus, orientation) currently lives in markdown files at
parachute/context/*.md. These files:@imports in CLAUDE.md that may not resolve correctlyProposed
Move user context to the brain graph as Note nodes with
note_type: "context". Auto-load context notes into every chat session's system prompt. Provide awrite_notetool so the AI can create/update notes conversationally.Implementation Plan
Step 1: Add
write_notetovault_tools.pyNew shared handler:
note_type: "context"— MERGE onnote_type + title(exactly one note per context title)entry_idcreated_by: "agent",status: "active",created_at: now()dateoptional (required for journals, not for context)Add tool definition to
VAULT_TOOLSlist.Files:
vault_tools.pyStep 2: Register
write_notein both MCP serversmcp_server.py): Import and add handler inhandle_tool_callmcp_tools.py): Add to_VAULT_TOOL_NAMES, add case in_handle_vault_toolFiles:
mcp_server.py,mcp_tools.pyStep 3: Auto-load context notes in orchestrator
In
_build_system_prompt(), after PARACHUTE_PROMPT + CLAUDE.md, before container context:New method
_load_context_notes():MATCH (n:Note) WHERE n.note_type = 'context' AND n.status = 'active' RETURN n ORDER BY n.title## User Context\n\n### {title}\n{content}\nfor each noteFiles:
orchestrator.pyStep 4: Update tool guidance
Add
write_noteto Browse group intool_guidance.py. Updatelist_notesdescription to mention context notes.Files:
tool_guidance.pyStep 5: Update system prompt vault guidance
Add to PARACHUTE_PROMPT Vault and Memory section:
Files:
orchestrator.pyStep 6: Ensure Note schema exists in core
Move
ensure_node_table("Note", ...)tobrain_chat_store.pyso it runs at startup regardless of whether the daily module is loaded. Daily module can still call it too (idempotent).Files:
brain_chat_store.pyStep 7: Migration script
scripts/migrate_context_to_graph.py— reads existingcontext/*.mdfiles, creates Note nodes:profile.md→ Note(note_type="context", title="Profile")now.md→ Note(note_type="context", title="Now")memory.md→ Note(note_type="context", title="Preferences")orientation.md→ Note(note_type="context", title="Orientation")Skips
identity.mdandtools.md(redundant with PARACHUTE_PROMPT).Files: new
scripts/migrate_context_to_graph.pyStep 8: Tests
test_chat_memory.py: Addwrite_notetests (create, update/merge, size cap, validation)test_orchestrator_phases.py: Add context note loading testtest_tool_guidance.py: Verifywrite_notein guidanceNot in scope
write_noteexists)context/*.mdfiles (leave as fallback)Context
Part of the system prompt overhaul. The CLAUDE.md file has been simplified to no longer reference context files. This issue tracks building the replacement.