Skip to main content
a simple image showing code to graph text

Repo Onboarding

As you add a repository, Potpie instantly validates the current parsed status. If parsed graph exists, then potpie uses the existing graph, else the repository is passed to the File Analysis.

File Analysis

Every file in the repository is evaluated before parsing action is initiated.
  • Files without meaningful source code, such as images, binaries, or notebooks, are excluded early on to avoid unnecessary processing.
  • Files with recognized source extensions are accepted as valid inputs and forwarded for structured analysis.

AST Querying

Each file is parsed into an abstract syntax tree and queried for symbols, which are extracted by matching the file against the language grammar.
  • Every function, class, method, or interface discovered is recorded with its exact name and precise location in the codebase.
  • Each symbol is also classified to indicate whether it represents an original definition or a reference to a definition elsewhere.

Graph Construction

  • Definitions are represented as nodes in the knowledge graph.
  • References between symbols are represented as edges.
This creates a navigable structural map of the codebase that captures not only what exists, but also interdependency between the components.

Storage

  • The repository is marked as ready only when all nodes & relationships are persisted.
  • Any subsequent request for the same commit skips parsing entirely and queries the existing graph directly.