---
title: How Prism is built
description: One local map, one core, three doors. The CLI, the agent, and the editor all ask the same analysis. The analysis does not call the network.
date: 2026-10-22
slug: how-prism-is-built
topic: Tooling
series: Prism
seriesOrder: 3
tags:
  - prism
  - typescript
  - mcp
---

The job is on your machine: read the repo, keep a map, answer questions about it. A website cannot be that map. [prismhq.in](https://www.prismhq.in) is the docs. The index is local.

## One core, three doors

The analysis lives in one core. The CLI, the MCP server (what your agent calls), and the VS Code / Cursor extension are doors onto that core. They do not each keep their own copy of the graph.

<ArchitectureDiagram
  label="One core. Three doors."
  nodes={[
    { id: 'index', title: 'Index', subtitle: 'On this machine', icon: 'schema' },
    { id: 'core', title: 'Core', subtitle: 'The only analysis', icon: 'engine' },
    { id: 'doors', title: 'Doors', subtitle: 'CLI, agent, editor', icon: 'apps' },
  ]}
/>

Click a box below. The pieces it talks to light up. Core is the hub. The editor extension talks to core. Cursor, as an agent, talks to the MCP server, not to core directly.

<InteractiveGui label="Who talks to whom">
  <GraphQueryDemo />
</InteractiveGui>

The first use in a repository builds the index under `~/.prism/`. Nothing is written into the checkout. A background process keeps the map up to date. `prism install` records every file it writes, and `prism uninstall` removes exactly those files.

## What the map stores

The graph is packages, files, symbols, tests, and the imports between them.

Some links are measured from the code. Some are only a guess. If a link is a guess, open the file before you trust it. `prism graph export` writes that graph to `graph.json` for your own tools. Prism does not upload it.

Blast radius is the plain version of “who depends on this.” `prism blast` on a file lists what would feel a change there. `prism test-impact` lists the tests that reach it.

## What leaves the machine

Analysis makes no network requests. A test in the repo fails the build if the analysis path tries to open a connection.

Two other requests exist, and neither one carries source, paths, or prompts:

- Once a day, a version check against the npm registry. It never installs anything by itself. `PRISM_SKIP_SELF_UPDATE=1` turns it off.
- A usage ping: the command or tool name, whether it worked, and how long it took. `PRISM_PULSE=0` turns it off. It is also off in CI and in tests.

| Piece | Job |
|---|---|
| TypeScript | The codebase |
| Bun | Install and scripts |
| `@prismapp/cli` | The terminal |
| `@prismapp/mcp-server` | The agent |
| VS Code extension | The editor |
| Next.js | The docs site |

Core itself is not a separate npm package. It ships inside the CLI and the MCP server.

Next: what this is not, and the one command that connects an agent.
