How aashutosh-mahajan/prism works
PRISM is a local, deterministic codebase index and context service for coding agents. Its principal workflow scans and parses a repository, derives symbols, dependency graphs and health signals, writes persistent artifacts, then serves budgeted search, location, context and impact results through CLI or MCP. Separate product branches generate agent-facing narratives and audit plans, and provide a browser graph viewer with live updates. The README documents the major pipeline and capabilities; some subsystem links below are therefore documented flows rather than inspected call sites.
Main entry points: pipeline.py Index pipeline · manifest.py Index artifacts · api.py Search and context · cli.py CLI
Components 23
Indexing
- Source discovery
prism/discovery/scanner.py - Language parsing
prism/parsing/treesitter.py - Index pipeline
prism/pipeline.py - Index data models
prism/core/models.py - Symbols and graphs
prism/graph/ranking.py - Domain extractors
prism/extractors - Health and drift
prism/health - Scan and update
prism/lifecycle.py
Persistent artifacts
- Index artifacts
prism/writers/manifest.py - Stable file writer
prism/writers/json_writer.py
Agent navigation
- CLI
prism/cli.py - MCP tools
prism/mcp/server.py - Index store
prism/navigator/store.py - Search and context
prism/navigator/api.py
Narrative and audit
- Brief and summaries
prism/narrator/refresh.py - Audit planning
prism/audit/plan.py
Graph viewer
- Viewer HTTP service
prism/viewer/server.py - Viewer state and UI
viewer/src/app.ts - Viewer data access
viewer/src/data.ts - Graph encoding
viewer/src/encode.ts - Viewer interactions
viewer/src/ui.ts
Other components
- Coding agent
- Repository source
Connections 24
- Coding agent → CLI: requests commands
README.md - Coding agent → MCP tools: uses tools
README.md - Repository source → Source discovery: scans files
README.md - Source discovery → Index pipeline: provides files
README.md - Index pipeline → Language parsing: parses sources
README.md - Index pipeline → Symbols and graphs: builds graphs
README.md - Index pipeline → Domain extractors: runs extractors
prism/pipeline.py - Index pipeline → Health and drift: derives health
README.md - Index pipeline → Index data models: produces index
prism/pipeline.py - Scan and update → Index pipeline: builds index
prism/lifecycle.py - Scan and update → Index artifacts: writes artifacts
README.md - Index artifacts → Stable file writer: writes JSON
prism/writers/manifest.py - Index store → Index artifacts: reads index
prism/navigator/store.py - CLI → Search and context: runs navigation
prism/cli.py - MCP tools → Search and context: calls navigation
prism/mcp/server.py - Search and context → Index store: queries index
prism/navigator/api.py - Search and context → Coding agent: returns context
README.md - Index artifacts → Brief and summaries: supplies index facts
README.md - Index artifacts → Audit planning: supplies audit inputs
prism/audit/plan.py - CLI → Viewer HTTP service: starts viewer
prism/cli.py - Viewer HTTP service → Viewer data access: serves viewer data
prism/viewer/server.py - Viewer data access → Viewer state and UI: loads graph
viewer/src/app.ts - Viewer state and UI → Graph encoding: encodes graph
viewer/src/app.ts - Viewer state and UI → Viewer interactions: renders interactions
viewer/src/app.ts