All Docs/Code Indexing

Code Indexing

Code indexing is the process that runs after you connect a repository. DevSpec parses your code using tree-sitter, a structural parsing library that understands 7 languages: TypeScript, TSX, JavaScript, Python, Go, Rust, and Java. The indexing extracts symbols (functions, classes, types, exports, imports), builds a dependency graph between files, and categorises each file by its role (API, database, auth, UI component, configuration, etc.).

How It Works

When a repository is connected or updated, DevSpec parses each file using language-aware parsers. The resulting index maps out your code structure, including what files exist, what they export, and how they relate to each other. The code index is what powers the AI's ability to answer questions about your code. When you ask "where is authentication handled?" the AI searches the index, finds the relevant files, and reads them.

Supported languages

  • TypeScript
  • TSX
  • JavaScript
  • Python
  • Go
  • Rust
  • Java

Files are automatically tagged across 30+ categories (API routes, database models, authentication, UI components, tests, middleware, and more) so the AI can find relevant code without scanning every file.

Incremental Updates

When you re-index a repository, only changed files are re-parsed using hash-based detection. The full repo doesn't need to be re-processed every time. The progress bar stays visible throughout the entire process, including during incremental updates.

File Categorisation

Files are automatically tagged by role across 30+ categories so the AI can find "all authentication code" or "all database migrations" without scanning every file. Categories include API routes, database models, authentication logic, UI components, configuration files, tests, middleware, and many more.

Context in Sessions

The code index is used to provide relevant context to the AI during sessions. When you ask about a file or concept, the AI can pull in the exact code and surrounding structure.