{
  "markdown": "<p align=\"center\">\n  <img src=\"docs/logo.png\" alt=\"Cortex\" width=\"600\" />\n</p>\n\n# Cortex\n\n**Give AI coding agents the right context from your repository.**\n\n[![npm version](https://img.shields.io/npm/v/%40danielblomma%2Fcortex-mcp)](https://www.npmjs.com/package/@danielblomma/cortex-mcp)\n[![license](https://img.shields.io/npm/l/%40danielblomma%2Fcortex-mcp)](./LICENSE)\n\nCortex builds a local map of your code, symbols, relationships, and project\nrules. Coding agents query that map through the CLI instead of guessing or\nreading the whole repository.\n\nYour code stays on your machine. MCP is not required.\n\n## Start\n\nRequires Node.js 20.9+ and Git.\n\n```bash\nnpm install --global @danielblomma/cortex-mcp\ncd your-project\ncortex init --bootstrap\n```\n\nThis indexes the repository, adds Cortex instructions to `AGENTS.md`, installs\nGit hooks, and starts the background watcher.\n\nCheck the setup:\n\n```bash\ncortex doctor\n```\n\n## Use\n\n```bash\n# Find relevant code.\ncortex search \"where is authentication handled?\" --json\n\n# Follow relationships from a search result.\ncortex related <entity-id> --json\n\n# See what a change may affect.\ncortex impact \"authentication\" --json\n\n# Read repository rules.\ncortex rules --json\n\n# Compare a changed file with nearby patterns.\ncortex pattern-evidence src/auth.ts --json\n\n# Inspect deterministic active conventions for a file or indexed entity.\ncortex conventions src/payments/retry.ts --json\n\n# Get cited, deterministic context before implementing a code task.\ncortex guidance src/payments/retry.ts --task \"add bounded retry handling\" --json\n\n# Review the staged, unstaged, and non-ignored untracked candidate against HEAD.\ncortex review --diff --json\n\n# Refresh context after significant changes.\ncortex update\n```\n\nAgents can run these commands directly. `cortex init` adds instructions that\ntell them to search before answering and check impact before refactoring. They\ndo not need an MCP connection.\n\n## What Cortex adds\n\nWithout Cortex, an agent often searches by filename and reads many unrelated\nfiles. Cortex gives it structured repository context:\n\n- semantic search across code, rules, and architecture decisions;\n- symbol definitions and file relationships;\n- caller and dependency traversal;\n- impact analysis before refactoring;\n- active rules, deprecations, and source-of-truth signals;\n- deterministic, subsystem-scoped convention profiles with cited reusable symbols;\n- incremental updates after Git and filesystem changes.\n\nThe pipeline is local and straightforward:\n\n```text\nrepository -> local index -> Cortex CLI -> coding agent\n```\n\n## Commands you will use\n\n| Command | Purpose |\n| --- | --- |\n| `cortex search \"...\" --json` | Find relevant code and context |\n| `cortex related <entity-id> --json` | Follow relationships from a result |\n| `cortex impact \"...\" --json` | Estimate the blast radius of a change |\n| `cortex rules --json` | Show active repository rules |\n| `cortex pattern-evidence <file> --json` | Find nearby implementation patterns |\n| `cortex conventions <file-or-entity> --json` | Inspect bounded repository convention profiles |\n| `cortex guidance <file-or-entity> --task <text> --json` | Get bounded cited pre-coding guidance |\n| `cortex review --diff --json` | Review the current Git candidate with cited local evidence |\n| `cortex update` | Refresh changed context |\n| `cortex status` | Show index status |\n| `cortex doctor` | Diagnose the local setup |\n| `cortex watch status` | Check background synchronization |\n| `cortex dashboard` | Open the local status dashboard |\n\nRun `cortex help` for the complete command list.\n\n`cortex conventions` uses only the local index. It returns bounded, live-backed\nversion-1 profiles and does not call a model, planner, provider, or network\nservice. See [Repository convention profiles](docs/repository-conventions.md)\nfor the exact eligibility, limit, hashing, persistence, and safety contract.\n\nBefore implementing a code task, use `cortex guidance` as cited additive\ncontext—not policy authority. Continue to use normal `search`, `related`, and\n`impact` when needed, and never skip explicit active rules or conflicts. The\ncommand is local-only and inspection-only; see the exact versioned contract in\n[Pre-coding guidance](docs/repository-guidance.md).\n\nAfter coding and before finalization, use `cortex review --diff`. It separates\nexact source-of-truth violations from heuristic local-pattern warnings and is\ninspection-only. See [Deterministic diff review](docs/repository-diff-review.md).\n\n## Keep the index fresh\n\nGit hooks and the watcher normally update Cortex automatically.\n\n```bash\ncortex status\ncortex watch status\ncortex update\n```\n\nRun `cortex update` manually after a large change or when results look stale.\n\n## Large repositories\n\nMake lexical and graph search available first while semantic indexing continues\nin the background:\n\n```bash\ncortex bootstrap --background --profile interactive\ncortex indexing status --json\n```\n\nThis mode supports macOS, Linux, and WSL. Native Windows should use normal\nforeground bootstrap.\n\n## Upgrade\n\n```bash\nnpm install --global @danielblomma/cortex-mcp@latest\ncortex init --force\ncortex bootstrap\ncortex update\n```\n\nProject configuration and rules are preserved. See\n[CHANGELOG.md](CHANGELOG.md) for version-specific notes.\n\n## Optional MCP compatibility\n\nThe normal Cortex workflow uses the CLI. If a client explicitly requires MCP,\nrun `cortex connect`.\n\n## DeepSeek Harness integration\n\nCortex supports DeepSeek Harness through the V1 explicit tools and skills\nintegration. Cortex 2.6.0 contains and validates the integration source against\nthe pinned Harness `0.1.1-rc.2` release. Separate npm bundle distribution is\ndeferred and currently unavailable.\n\nThe bundle provides four agent-scoped tools (`cortex_search`,\n`cortex_related`, `cortex_impact`, and `cortex_rules`) and five Cortex behavior\nskills (`change-impact`, `context-review`, `pattern-review`, `repo-research`,\nand `using-cortex`). Retrieval is local, repository-scoped, explicit, and\nuser-controlled. The integration does not automatically initialize, update,\nor watch a repository.\n\nV2 proactive/assistive retrieval remains planned and experimental; it is not\nincluded in Cortex 2.6.0. See the\n[V1-to-V2 integration plan](docs/superpowers/plans/2026-08-25-deepseek-harness-integration.md)\nfor details.\n\n## Links\n\n- [Website](https://danielblomma.github.io/cortex/)\n- [Changelog](CHANGELOG.md)\n- [Issues](https://github.com/DanielBlomma/cortex/issues)\n\n## License\n\nMIT\n",
  "bytes": 6509,
  "sha": "c689830a54ecd2ca831ff42d2af1b2c64732cdda2c92403c4a9fe6def5b8ce40",
  "repo_slug": "danielblomma/cortex",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_danielblomma_cortex_8e5993c3/readme"
}