Skip to content

feat: call graph queries #85

Description

@Lucas-Bur

What to build

Add call graph query capability: \pix query "who calls authenticate?" --mode call-graph\ returns callers and callees of a given function. This requires building a call/import/type graph at index time (likely via tree-sitter AST analysis) and storing it alongside the vector index.

Support two query modes:

  • --mode callers\ — what functions call X?
  • --mode callees\ — what does X call?

This is HITL because it requires significant architectural decisions: graph storage format, tree-sitter call resolution strategy, cross-file import tracking, and how to handle dynamic/indirect calls.

Acceptance criteria

  • Call graph built at index time via tree-sitter AST analysis
  • \pix query "authenticate" --mode callers\ returns all caller functions
  • \pix query "authenticate" --mode callees\ returns all functions called by authenticate
  • Cross-file calls resolved via import analysis
  • Graph stored efficiently alongside existing index files
  • Works with incremental indexing (graph updates only for changed files)
  • Decision on graph storage format documented (adjacency list, edge list, etc.)

Blocked by

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions