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
With Processes
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
maxTraceDepth: 10
maxTraceDepth: 10
Limits the depth of tracing to prevent infinite loops and keep processes focused. Most meaningful execution flows complete within 10 steps.
maxBranching: 4
maxBranching: 4
Limits how many outgoing calls to follow from each node. Prevents explosion on utility functions that call dozens of helpers.
maxProcesses: 75 (dynamic)
maxProcesses: 75 (dynamic)
Total number of processes to detect. Dynamically scaled based on codebase size:
max(20, min(300, symbolCount / 10))minSteps: 3
minSteps: 3
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
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
- 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
- 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
EachProcess node in the graph has:
Example Process Node
STEP_IN_PROCESS Edges
Each symbol in a process has aSTEP_IN_PROCESS edge with a step property:
MCP Resources
Processes are exposed via MCP resources for instant context:List All Processes
Get Process Details
MCP Context Tool
Thecontext tool shows which processes a symbol participates in:
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
Process-Grouped Search
When you use thequery tool, results are grouped by process:
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