/** * Claude Code instruction templates for Cortex integration. * * PROJECT_INSTRUCTIONS — appended to a project's CLAUDE.md * GLOBAL_INSTRUCTIONS — written to ~/.claude/CLAUDE.md */ export declare const START_MARKER = ""; export declare const END_MARKER = ""; export declare const PROJECT_INSTRUCTIONS = "\n## Memory System (Cortex MCP)\n\nYou have access to a persistent memory system called Cortex, connected via MCP. It stores knowledge across sessions and projects. **Use it proactively without being asked.**\n\n### Automatic behaviours\n\n**At the start of every non-trivial task:**\n1. Call `memory_context` with a description of what you're about to do and the current project name.\n2. Read the returned context. Let it inform your approach \u2014 don't ignore it.\n\n**During work, store memories when you encounter:**\n- An architectural or design decision (type: `decision`) \u2014 include the reasoning, not just the outcome.\n- A bug and its root cause (type: `insight`) \u2014 future you will thank past you.\n- A pattern or convention being used in the project (type: `pattern`).\n- A useful code snippet worth reusing (type: `snippet`).\n- A factual piece of project knowledge (type: `fact`).\n- A gotcha, caveat, or non-obvious behaviour (type: `note`).\n\n**When you discover relationships between components:**\n- Call `memory_relate` to connect entities in the knowledge graph.\n- Use meaningful relation types: `DEPENDS_ON`, `USES`, `PART_OF`, `RELATED_TO`, `IMPLEMENTS`, `CALLS`.\n\n### Available tools\n\n| Tool | When to use |\n|------|-------------|\n| `memory_store` | Store a specific piece of knowledge with type, tags, and entities. |\n| `memory_search` | Find memories by semantic similarity. Use when you need specific past knowledge. |\n| `memory_relate` | Connect two entities with a typed relationship. |\n| `memory_graph_query` | Explore what's connected to an entity in the knowledge graph. |\n| `memory_context` | Get the best available context for a task. Call this at the start of work. |\n| `memory_forget` | Remove outdated or incorrect memories. Requires `confirm: true`. |\n| `memory_ingest` | Process a large block of text (meeting notes, docs) into memories. |\n| `memory_consolidate` | Merge redundant memories. Use `dry_run: true` to preview first. |\n| `memory_config` | Check config, storage health, stats. Set API key at runtime. |\n| `memory_stats` | View aggregate stats: counts by type/project, access patterns, staleness, graph stats. |\n| `memory_share` | Promote memory visibility across projects and link related projects. |\n| `memory_export` | Export memories to portable JSON. Supports filters (project, type, date, access count). |\n| `memory_import` | Import memories from Cortex JSON. Defaults to dry_run. Supports merge mode for dedup. |\n\n### Extraction tiers\n\nCortex extracts entities using a tiered system that adapts to available resources:\n\n- **Tier 1 (Regex):** Always available. Detects snake_case, camelCase, PascalCase identifiers and basic verb patterns.\n- **Tier 2 (NLP):** Always available. Linguistic analysis with embedding similarity for smarter entity and relationship detection.\n- **Tier 2.5 (Ollama):** Requires a local Ollama instance. Local LLM extraction with JSON repair \u2014 good balance of quality and privacy.\n- **Tier 3 (LLM):** Requires Anthropic API key. Full semantic understanding of natural language entity names and complex relationships.\n\nThe active tier is selected automatically (3 \u2192 2.5 \u2192 2 \u2192 1). Check it with `memory_config({ action: 'get' })`. To unlock Tier 3, set an API key: `memory_config({ action: 'set', key: 'anthropic_api_key', value: 'sk-ant-...' })`. To use Ollama: `memory_config({ action: 'set', key: 'ollama_enabled', value: 'true' })`.\n\n### What NOT to store\n\n- Code patterns, conventions, architecture, file paths, or project structure \u2014 these can be derived by reading the current project state.\n- Git history, recent changes, or who-changed-what \u2014 `git log` / `git blame` are authoritative.\n- Debugging solutions or fix recipes \u2014 the fix is in the code; the commit message has the context.\n- Anything already documented in CLAUDE.md files.\n- Ephemeral task details: in-progress work, temporary state, current conversation context.\n\n### Memory search before assumptions\n\nIf you're unsure about a project's conventions, past decisions, or how something works \u2014 search Cortex first (`memory_search`), then check the codebase, then ask the user. In that order.\n\n### Always include\n\n- The `project` parameter \u2014 infer it from the current working directory or ask if unclear.\n- Relevant `entities` as snake_case identifiers when storing memories.\n- Meaningful `tags` for discoverability.\n"; export declare const GLOBAL_INSTRUCTIONS = "\n## Memory System (Cortex)\n\nYou have access to a persistent memory system called Cortex, connected via MCP. It stores knowledge across sessions and projects. **Use it proactively without being asked.**\n\n### Automatic behaviours\n\n**At the start of every non-trivial task:**\n1. Call `memory_context` with a description of what you're about to do and the current project name.\n2. Read the returned context. Let it inform your approach \u2014 don't ignore it.\n\n**During work, store memories when you encounter:**\n- An architectural or design decision (type: `decision`) \u2014 include the reasoning, not just the outcome.\n- A bug and its root cause (type: `insight`) \u2014 future you will thank past you.\n- A pattern or convention being used in the project (type: `pattern`).\n- A useful code snippet worth reusing (type: `snippet`).\n- A factual piece of project knowledge (type: `fact`).\n- A gotcha, caveat, or non-obvious behaviour (type: `note`).\n\n**When you discover relationships between components:**\n- Call `memory_relate` to connect entities in the knowledge graph.\n- Use meaningful relation types: `DEPENDS_ON`, `USES`, `PART_OF`, `RELATED_TO`, `IMPLEMENTS`, `CALLS`.\n\n### What NOT to store\n- Trivial information (file listed, routine shell commands).\n- Information already in the codebase (don't duplicate what's in README, package.json, etc.).\n- Temporary debugging steps that won't matter tomorrow.\n\n### Always include\n- The `project` parameter \u2014 infer it from the current working directory or ask if unclear.\n- Relevant `entities` as snake_case identifiers.\n- Meaningful `tags` for discoverability.\n\n### Memory search before assumptions\nIf you're unsure about a project's conventions, past decisions, or how something works \u2014 search Cortex first (`memory_search`), then check the codebase, then ask the user. In that order.\n"; //# sourceMappingURL=claude-instructions.d.ts.map