Skip to content

Persistent project knowledge graph for coding agents. MCP server with semantic search, in-process embeddings, and web explorer.

docs: strengthen megamemory prompt wording from suggestive to mandatory

0xk3vinbd24596726a7
diff --git a/plugin/megamemory.ts b/plugin/megamemory.ts
index 29b66ee..535fa74 100644
--- a/plugin/megamemory.ts
+++ b/plugin/megamemory.ts
@@ -9,18 +9,18 @@ allowed-tools: "megamemory:*"
# Megamemory — Project Knowledge Graph
-Your persistent memory of the codebase. You write concepts as you work. You query them before starting new tasks. The graph survives across sessions.
+Your persistent memory of the codebase. You have no implicit memory of this project between sessions, so this graph is your continuity. You write concepts as you work, and you query them before starting tasks.
## When to Use
-- **Session start** → \`list_roots\` to orient yourself
-- **Before any task** → \`understand\` to load relevant context
-- **After any task** → \`create_concept\` / \`update_concept\` / \`link\` to record what you did
-- **Refactoring or removing features** → \`remove_concept\` to mark things as gone (with reason)
+- **Session start** → You must call \`list_roots\` before beginning work
+- **Before any task** → You must call \`understand\` before reading source files for project understanding
+- **After any task** → You must call \`create_concept\` / \`update_concept\` / \`link\` to record what you did
+- **Refactoring or removing features** → You must call \`remove_concept\` to mark things as gone (with reason)
## Core Principles
-1. **Query before work, update after work.** Always.
+1. **Query before work, update after work.** This is required, not optional.
2. **Concepts, not code.** Nodes are features, patterns, decisions — not files or symbols.
3. **Be specific.** Include parameter names, defaults, file paths, rationale.
4. **Keep it shallow.** Max 3 levels deep. Useful beats exhaustive.
diff --git a/src/install.ts b/src/install.ts
index 782f2e5..5881dc7 100644
--- a/src/install.ts
+++ b/src/install.ts
@@ -50,13 +50,13 @@ const AGENTS_MD_MARKER = "## Project Knowledge Graph";
const AGENTS_MD_SNIPPET = `
## Project Knowledge Graph
-You have access to a project knowledge graph via the \`megamemory\` MCP server and skill tool. This is your persistent memory of the codebase — concepts, architecture, decisions, and how things connect. You write it. You read it. The graph is your memory across sessions.
+You have access to a project knowledge graph via the \`megamemory\` MCP server and skill tool. You have no implicit memory of this project between sessions, so this graph is your only continuity for concepts, architecture, decisions, and relationships.
**Workflow: understand → work → update**
-1. **Session start:** Call \`megamemory\` tool with action \`overview\` (or \`megamemory:list_roots\` directly) to orient yourself.
-2. **Before each task:** Call \`megamemory\` tool with action \`query\` (or \`megamemory:understand\` directly) to load relevant context.
-3. **After each task:** Call \`megamemory\` tool with action \`record\` to create/update/link concepts for what you built.
+1. **Session start:** You must call \`megamemory\` with action \`overview\` (or \`megamemory:list_roots\` directly) before you begin work.
+2. **Before each task:** You must call \`megamemory\` with action \`query\` (or \`megamemory:understand\` directly) before reading source files for project understanding.
+3. **After each task:** You must call \`megamemory\` with action \`record\` to create/update/link concepts for what you built.
Be specific in summaries: include parameter names, defaults, file locations, and rationale. Keep concepts max 3 levels deep.
`;