Skip to main content
A Process in GitNexus represents an execution flow — a traced sequence of function calls from an entry point through the codebase. Processes help AI agents understand how features work by showing the actual call chains that implement them.
Processes are detected automatically during Phase 6 of indexing, after communities have been identified.

Why Process Detection?

Traditional code search returns individual functions. GitNexus returns execution flows — the complete path from entry point to terminal node.

Without Processes

Problem: Agent doesn’t know these functions are related or in what order they execute.

With Processes

Result: Agent sees the complete execution flow and architectural boundaries.

Entry Point Detection

Processes start from entry points — functions that initiate execution flows.

Entry Point Scoring

GitNexus uses a multi-factor scoring system to identify entry points:
entry-point-scoring.ts

Framework Detection

Functions with framework decorators get boosted scores:
  • TypeScript: @Controller, @Get, @Post
  • Python: @app.route(), @api_view()
  • Java: @RestController, @RequestMapping
process-processor.ts:298

Example Entry Points

Test files are excluded from entry point detection to avoid polluting processes with test-only execution flows.

Trace Algorithm

From each entry point, GitNexus traces forward using BFS (Breadth-First Search):
process-processor.ts:337

Configuration

process-processor.ts:30
Limits the depth of tracing to prevent infinite loops and keep processes focused. Most meaningful execution flows complete within 10 steps.
Limits how many outgoing calls to follow from each node. Prevents explosion on utility functions that call dozens of helpers.
Total number of processes to detect. Dynamically scaled based on codebase size: max(20, min(300, symbolCount / 10))
Minimum steps for a valid process. Filters out trivial 2-step flows (A calls B).

Confidence Filtering

Only edges with confidence ≥ 0.5 are used for tracing:
process-processor.ts:219
This filters out ambiguous fuzzy-global matches (0.3 confidence) that cause traces to jump across unrelated code.

Deduplication

Multiple similar traces are deduplicated to avoid redundant processes:

1. Subset Removal

Remove traces that are subsets of longer traces:
process-processor.ts:396
Example:
  • Trace 1: A → B → C → D
  • Trace 2: A → B → C ← removed (subset of Trace 1)

2. Endpoint Deduplication

Keep only the longest trace per entry→terminal pair:
process-processor.ts:427
Example:
  • Trace 1: login → validate → checkPassword → createSession (4 steps)
  • Trace 2: login → validate → createSession (3 steps) ← removed (same endpoints, shorter)

Process Types

Processes are classified by community span:

Intra-Community

All steps stay within a single functional area (community):

Cross-Community

Execution spans multiple functional areas:
Cross-community processes are often the most architecturally important — they show how different parts of the system interact.

Process Properties

Each Process node in the graph has:

Example Process Node

STEP_IN_PROCESS Edges

Each symbol in a process has a STEP_IN_PROCESS edge with a step property:
Result:

MCP Resources

Processes are exposed via MCP resources for instant context:

List All Processes

Returns:

Get Process Details

Returns:

MCP Context Tool

The context tool shows which processes a symbol participates in:
Returns:

Example: Login Flow

Here’s a real example from a typical web application: Process properties:
  • Type: cross_community (spans 4 communities)
  • Steps: 7
  • Communities: Api, Authentication, Session, Logging
Query to find this process:
Returns this process as the top result because it contains symbols that match all query terms. When you use the query tool, results are grouped by process:
Returns:
Process-grouped search gives agents architectural context — not just individual functions, but complete execution flows.

Statistics

Typical process counts by repository size:
Set NODE_ENV=development to see detailed process detection logs, including entry point scoring and trace statistics.

Next Steps

Hybrid Search

Learn how search results are grouped by process

Knowledge Graph

Understand the graph schema for processes