{
  "markdown": "# Prism\n\n[![Node.js](https://img.shields.io/badge/node-%3E%3D22-brightgreen)](https://nodejs.org)\n[![Website](https://img.shields.io/badge/website-prismhq.in-00c2c2)](https://www.prismhq.in)\n[![npm @repo-prism/cli](https://img.shields.io/npm/v/@repo-prism/cli.svg?label=@repo-prism/cli)](https://www.npmjs.com/package/@repo-prism/cli)\n[![npm @repo-prism/mcp-server](https://img.shields.io/npm/v/@repo-prism/mcp-server.svg?label=@repo-prism/mcp-server)](https://www.npmjs.com/package/@repo-prism/mcp-server)\n[![VS Marketplace](https://vsmarketplacebadges.dev/version/prismhq.repo-prism.svg)](https://marketplace.visualstudio.com/items?itemName=prismhq.repo-prism)\n[![Open VSX](https://img.shields.io/open-vsx/v/prismhq/repo-prism)](https://open-vsx.org/extension/prismhq/repo-prism)\n[![License: MIT](https://img.shields.io/github/license/Shailesh200/prism)](./LICENSE)\n\n**Local-first Software Intelligence Engine** for humans and AI agents.\n\n**Website:** [https://www.prismhq.in](https://www.prismhq.in) · **Docs:** [https://www.prismhq.in/docs](https://www.prismhq.in/docs) · **Get started:** [https://www.prismhq.in/docs/start/get-started](https://www.prismhq.in/docs/start/get-started)\n\nMaps, graphs, blast radius, health — on your machine. No account. Nothing uploaded for core analysis.\n\nPrism is **not** an AI coding assistant. It is the intelligence layer behind an IDE extension, a CLI, and an MCP server that agents can call.\n\n---\n\n## Table of contents\n\n1. [Get started in 60 seconds](#get-started-in-60-seconds)\n2. [Install — step by step](#install--step-by-step)\n   - [A. CLI](#a-cli--repo-prismcli)\n   - [B. MCP (agents)](#b-mcp--repo-prismmcp-server)\n   - [C. IDE extension](#c-ide-extension-prism)\n3. [CLI — commands](#cli--commands)\n4. [MCP — tools & how agents use them](#mcp--tools--how-agents-use-them)\n5. [Docs](#docs)\n6. [Privacy](#privacy)\n7. [Build from source](#build-from-source)\n8. [License](#license)\n\n---\n\n## Get started in 60 seconds\n\n**Needs Node.js 22+.** No need to clone this repository.\n\n```bash\n# 1) Go to your project\ncd /path/to/your/project\n\n# 2) CLI — no --workspace; uses git root from where you run\nnpx -y @repo-prism/cli doctor\nnpx -y @repo-prism/cli dna\nnpx -y @repo-prism/cli health\n\n# 3) MCP once (Claude Code), then ask in plain English — no tool names:\n#    claude mcp add prism -- npx -y @repo-prism/mcp-server\n#    “How healthy is this repo?” / “What breaks if I change src/index.ts?”\n```\n\n| You want… | Follow |\n|---|---|\n| Terminal / CI | [A. CLI](#a-cli--repo-prismcli) |\n| Cursor / Claude / Codex agents | [B. MCP](#b-mcp--repo-prismmcp-server) |\n| Visual map & dashboards | [C. IDE extension](#c-ide-extension-prism) |\n| Embed in code | [`@repo-prism/core`](https://www.npmjs.com/package/@repo-prism/core) |\n\nAll surfaces call the same Core SDK. None re-implements analysis.\n\n---\n\n## Install — step by step\n\n### A. CLI — `@repo-prism/cli`\n\n1. `cd` into your project.\n2. Run doctor:\n   ```bash\n   npx -y @repo-prism/cli doctor\n   ```\n3. Confirm **Workspace** points at your repo (`from git root` is normal). A\n   **warn** on Index cache on first run is expected.\n4. Analyse:\n   ```bash\n   npx -y @repo-prism/cli dna\n   npx -y @repo-prism/cli health\n   npx -y @repo-prism/cli blast src/index.ts --fail-on high\n   ```\n5. Optional global install:\n   ```bash\n   npm install -g @repo-prism/cli\n   prism doctor\n   prism health --verbose   # shows workspace + index timing\n   ```\n\nPackage: [npmjs.com/package/@repo-prism/cli](https://www.npmjs.com/package/@repo-prism/cli) · Guide: [CLI docs](https://www.prismhq.in/docs/usage)\n\n### B. MCP — `@repo-prism/mcp-server`\n\n**Set up once. Then ask the agent in plain language — never type tool names\nlike `repository_health`.** The server tells the agent which tools to call.\n\n#### One-click (Cursor)\n\n[Add to Cursor](cursor://anysphere.cursor-deeplink/mcp/install?name=prism&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIi0tcHJlZmVyLW9ubGluZSIsIkByZXBvLXByaXNtL21jcC1zZXJ2ZXJAbGF0ZXN0Il0sImVudiI6eyJOT0RFX1VTRV9TWVNURU1fQ0EiOiIxIn19) · [Install guide](https://www.prismhq.in/docs/start/install) · [Benchmarks](https://www.prismhq.in/benchmarks)\n\n#### Copy-paste config (Cursor / Claude Desktop)\n\n```json\n{\n  \"mcpServers\": {\n    \"prism\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@repo-prism/mcp-server\"]\n    }\n  }\n}\n```\n\nSave as `.cursor/mcp.json` (project) or add to Claude Desktop config. Enable in **Settings → MCP** (~40 tools).\n\n#### Claude Code\n\n1. `cd /path/to/your/project`\n2. `claude mcp add prism -- npx -y @repo-prism/mcp-server`\n3. Restart Claude Code if it was already running.\n4. Ask: “What is this repository?” or “How healthy is this codebase?”\n\n#### Cursor (manual)\n\nIf the one-click link above does not work:\n\n1. Open the project folder in Cursor.\n2. Create `.cursor/mcp.json`:\n   ```json\n   {\n     \"mcpServers\": {\n       \"prism\": {\n         \"command\": \"npx\",\n         \"args\": [\"-y\", \"@repo-prism/mcp-server\"]\n       }\n     }\n   }\n   ```\n3. **Settings → MCP** → enable **prism** → wait for ~40 tools.\n4. In Agent chat, ask normally (no tool names).\n\n#### Claude Desktop / Codex\n\nSame `npx` / `@repo-prism/mcp-server` config — no `--workspace`. Full numbered\nsteps for every client: [MCP install](https://www.prismhq.in/docs/start/install).\n\nOnly add `--workspace` / `PRISM_WORKSPACE` if auto-detection picks the wrong folder.\n\nPackage: [npmjs.com/package/@repo-prism/mcp-server](https://www.npmjs.com/package/@repo-prism/mcp-server)\n\n### C. IDE extension (Prism)\n\n1. Install **Prism** (Marketplace / Open VSX id `prismhq.repo-prism`):\n   - **VS Code** — [Marketplace](https://marketplace.visualstudio.com/items?itemName=prismhq.repo-prism) or search `Prism`\n   - **Cursor** — [Open VSX](https://open-vsx.org/extension/prismhq/repo-prism) or Install from VSIX\n2. **Open Folder** on your project.\n3. Command Palette → **Prism: Open Prism**.\n4. Wait for indexing; use the UI.\n5. (Cursor) Also complete [B. MCP](#b-mcp--repo-prismmcp-server) so the agent\n   shares the same analysis — [IDE install](https://www.prismhq.in/docs/start/install).\n\n---\n\n## CLI — commands\n\nGlobal flags: `-w/--workspace`, `--json`, `--no-color`, `-q/--quiet`, `--verbose`, `-y/--yes`.\n\nExit codes: **0** ok · **1** gated finding (`--fail-on`) · **2** usage error · **3** Prism failed.\n\n### Diagnostics\n\n| Command | Purpose |\n|---|---|\n| `prism doctor` | Environment, workspace chosen, index |\n| `prism index` | Build / refresh the index |\n\n### Understand\n\n| Command | Purpose |\n|---|---|\n| `prism dna` | Languages, frameworks, domains, stack |\n| `prism health` | Health score + factors |\n| `prism map [--zoom repo\\|package\\|feature\\|file\\|symbol]` | Repository map |\n| `prism explain <path>` | What a path is for / ownership |\n| `prism explore <target>` | Usages, ownership, similar code |\n| `prism stack` | Stack signals |\n| `prism features` | Inferred features |\n| `prism landmarks` | Entrypoints & anchors |\n| `prism packages` | Workspace packages |\n\n### Assess a change\n\n| Command | Purpose |\n|---|---|\n| `prism blast <target> [--fail-on low\\|mid\\|high]` | Blast radius |\n| `prism review [paths…] [--base <ref>]` | Change review |\n| `prism safe-delete <target>` | Safe to delete? |\n| `prism rename <target> <newName>` | Rename edit sites |\n| `prism test-impact <target>` | Related tests |\n\n### Structure\n\n| Command | Purpose |\n|---|---|\n| `prism deps` | Graph size / hubs |\n| `prism cycles [--fail-on any]` | Import cycles |\n| `prism symbol <name>` | Find declaration |\n| `prism refs <name>` | Find references |\n| `prism route <from> <to>` | Dependency path |\n\n### Reports\n\n| Command | Purpose |\n|---|---|\n| `prism engineering` | Entropy, drift, debt, hotspots |\n| `prism testing` | Suites + on-disk coverage |\n| `prism security` | Left-shift checklist |\n| `prism backend` | Routes, data, env, jobs |\n| `prism bundle` | Bundle weight (ingested stats) |\n\n**CI sketch:**\n\n```yaml\n- uses: actions/setup-node@v4\n  with:\n    node-version: \"26.5.0\"\n- run: npx -y @repo-prism/cli review --base origin/main --fail-on high\n- run: npx -y @repo-prism/cli cycles --fail-on any\n```\n\n---\n\n## MCP — tools & how agents use them\n\n**28 read-only tools** + **3 optional prompts** (`orient`, `before_edit`, `review_diff`).\nNo network. No consent APIs for agents.\n\n**You do not type tool names.** After MCP is connected, ask in plain language —\nthe server’s instructions tell the agent when to call which tool.\n\n| You say | Agent should call |\n|---|---|\n| “What is this repo?” | `repository_dna` / landmarks |\n| “Is it healthy?” | `repository_health` |\n| “What breaks if I edit `src/…`?” | `blast_radius`, `test_impact` |\n| “Can I delete this?” | `safe_delete` |\n| “Review my changes” | `review_changes` |\n\n| Group | Tools |\n|---|---|\n| **Orientation** | `repository_dna`, `repository_health`, `repository_map`, `repository_overview`, `list_packages`, `stack_profile`, `landmarks`, `explain_area` |\n| **Graphs** | `dependency_graph`, `dependency_cycles`, `knowledge_graph`, `feature_graph`, `list_features`, `find_symbol`, `find_references`, `dependency_route` |\n| **Impact** | `blast_radius`, `safe_delete`, `rename_impact`, `test_impact`, `breaking_change_hints`, `review_changes`, `explore_code` |\n| **Reports** | `engineering_health`, `health_history`, `backend_report`, `testing_report`, `security_report` |\n\nSetup steps: [MCP install](https://www.prismhq.in/docs/start/install) · Full tool list: [MCP tools](https://www.prismhq.in/docs/reference/mcp-tools).\n\n---\n\n## Demo — with vs without Prism\n\nSide-by-side script: [`plans/notes/M-063-demo.md`](./plans/notes/M-063-demo.md) · measured savings: [prismhq.in/benchmarks](https://www.prismhq.in/benchmarks)\n\n1. Ask **“What is this repository?”** — Prism returns DNA + landmarks in 2–3 calls; a naive agent walks directories.\n2. Ask **“Is this edit safe?”** on a file — `blast_radius` replaces scanning the tree for imports.\n\nReproduce numbers: `bun run bench:orientation` (after `bun run build`).\n\n---\n\n## Docs\n\n**Site:** [https://www.prismhq.in/docs](https://www.prismhq.in/docs)\n\n| Topic | Link |\n|---|---|\n| What Prism is | [docs/what-is-prism](https://www.prismhq.in/docs/what-is-prism) |\n| Install (CLI / IDE / MCP) | [docs/start/install](https://www.prismhq.in/docs/start/install) |\n| Quickstart | [docs/start/quickstart](https://www.prismhq.in/docs/start/quickstart) |\n| Capabilities | [docs/reference/capabilities](https://www.prismhq.in/docs/reference/capabilities) |\n| Task guides | [docs/guides](https://www.prismhq.in/docs/guides/understand-a-repo) |\n| Usage (CLI / IDE / MCP) | [docs/usage](https://www.prismhq.in/docs/usage) |\n| Dispatch | [docs/guides/dispatch](https://www.prismhq.in/docs/guides/dispatch) |\n| CLI reference | [docs/reference/cli-commands](https://www.prismhq.in/docs/reference/cli-commands) |\n| MCP tools | [docs/reference/mcp-tools](https://www.prismhq.in/docs/reference/mcp-tools) |\n| Known limitations | [docs/help/known-limitations](https://www.prismhq.in/docs/help/known-limitations) |\n| FAQ | [docs/help/faq](https://www.prismhq.in/docs/help/faq) |\n| Changelog | [`CHANGELOG.md`](./CHANGELOG.md) |\n\nMarkdown sources also live in [`docs/`](./docs/) in this repo. Local preview: `bun run docs:dev`\n\n---\n\n## Privacy\n\nCore analysis makes **no network requests** (proven by a trap test suite). Optional features (GitHub, PageSpeed, Gravatar, …) are **off by default** and gated per purpose in `.prism/consent.json`. Agents cannot grant consent.\n\n→ [`PRIVACY.md`](./PRIVACY.md) · [`SECURITY.md`](./SECURITY.md)\n\n---\n\n## Build from source\n\nFor contributors (not required to use CLI/MCP):\n\n```bash\ngit clone https://github.com/Shailesh200/prism\ncd prism\nnvm use          # Node 26.5.0\nbun install\nbun run build\nbun run verify:milestone\n```\n\nSee [`CONTRIBUTING.md`](./CONTRIBUTING.md).\n\nPublished npm packages under this org: **[`@repo-prism`](https://www.npmjs.com/org/repo-prism)** (`cli`, `mcp-server`, `core`, and engine libraries).\n\n---\n\n## License\n\n[MIT](./LICENSE)\n",
  "bytes": 11929,
  "sha": "72f5dde7af3d6691bf1b85c80e689e79c071ad6aedafe2125b0348d76908cc6a",
  "repo_slug": "shailesh200/prism",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_shailesh200_prism_5ac1bd1d/readme"
}