This project uses a local dual-graph MCP server for efficient context retrieval.
Call graph_continue ONLY when you do NOT already know the relevant files.
- This is the first message of a new task / conversation
- The task shifts to a completely different area of the codebase
- You need files you haven't read yet in this session
- You already identified the relevant files earlier in this conversation
- You are doing follow-up work on files already read (verify, refactor, test, docs, cleanup, commit)
- The task is pure text (writing a commit message, summarising, explaining)
If skipping, go directly to graph_read on the already-known file::symbol.
-
If
graph_continuereturnsneeds_project=true: callgraph_scanwithpwd. Do NOT ask the user. -
If
graph_continuereturnsskip=true: fewer than 5 files — read only specifically named files. -
Read
recommended_filesusinggraph_read.- Always use
file::symbolnotation (e.g.src/auth.ts::handleLogin) — never read whole files. recommended_filesentries that already contain::must be passed verbatim.
- Always use
-
Obey confidence caps:
confidence=high→ Stop. Do NOT grep or explore further.confidence=medium→fallback_rgat mostmax_supplementary_grepstimes, thengraph_readat mostmax_supplementary_filesmore symbols. Stop.confidence=low→ same as medium. Stop.
Maintain a short JSON block in your working memory. Update it after each turn:
{
"files_identified": ["path/to/file.py"],
"symbols_changed": ["module::function"],
"fix_applied": true,
"features_added": ["description"],
"open_issues": ["one-line note"]
}Use this state — not prose summaries — to remember what's been done across turns.
A token-counter MCP is available for tracking live token usage.
- Before reading a large file:
count_tokens({text: "<content>"})to check cost first. - To show running session cost:
get_session_stats() - To log completed task:
log_usage({input_tokens: N, output_tokens: N, description: "task"})
- Do NOT use
rg,grep, or bash file exploration before callinggraph_continue(when required). - Do NOT do broad/recursive exploration at any confidence level.
max_supplementary_grepsandmax_supplementary_filesare hard caps — never exceed them.- Do NOT call
graph_continuemore than once per turn. - Always use
file::symbolnotation withgraph_read— never bare filenames. - After edits, call
graph_register_editwith changed files usingfile::symbolnotation.
Whenever you make a decision, identify a task, note a next step, fact, or blocker during a conversation, append it to .dual-graph/context-store.json.
Entry format:
{"type": "decision|task|next|fact|blocker", "content": "one sentence max 15 words", "tags": ["topic"], "files": ["relevant/file.ts"], "date": "YYYY-MM-DD"}To append: Read the file → add the new entry to the array → Write it back → call graph_register_edit on .dual-graph/context-store.json.
Rules:
- Only log things worth remembering across sessions (not every minor detail)
contentmust be under 15 wordsfileslists the files this decision/task relates to (can be empty)- Log immediately when the item arises — not at session end
When the user signals they are done (e.g. "bye", "done", "wrap up", "end session"), proactively update CONTEXT.md in the project root with:
- Current Task: one sentence on what was being worked on
- Key Decisions: bullet list, max 3 items
- Next Steps: bullet list, max 3 items
Keep CONTEXT.md under 20 lines total. Do NOT summarize the full conversation — only what's needed to resume next session.