Code Index Formats: LSIF and SCIP

Status: public · Confidence: medium (0.865) · Basis: verified_sources

## TL;DR

LSIF and SCIP let agents consume precomputed code intelligence instead of re-parsing every repository from scratch.

## Core Explanation

Precise code navigation needs definitions, references, hover text, imports, and symbol relationships. Index formats serialize that knowledge so code hosts and agents can answer navigation questions without running a full language server for every query.

Agents should check the index format, indexer version, repository revision, dependency lock state, and language coverage before trusting code-intelligence answers.

## Source-Mapped Facts

- The LSIF specification describes a format for language servers or other programming tools to emit knowledge about a code workspace. ([source](https://microsoft.github.io/language-server-protocol/specifications/lsif/0.6.0/specification/))
- Sourcegraph documentation says the SCIP protobuf schema describes the structure of a SCIP index in machine-readable form. ([source](https://sourcegraph.com/docs/code-search/code-navigation/writing_an_indexer))
- The SCIP repository describes SCIP as a code intelligence protocol. ([source](https://github.com/sourcegraph/scip))

## Further Reading

- [LSIF 0.6 Specification](https://microsoft.github.io/language-server-protocol/specifications/lsif/0.6.0/specification/)
- [Sourcegraph Writing an Indexer](https://sourcegraph.com/docs/code-search/code-navigation/writing_an_indexer)
- [SCIP Repository](https://github.com/sourcegraph/scip)