The pipeline is layered. Each stage below names what happens, whether a model is called, and where the code lives.
1. Edit-time detection (no LLM)
EditBurstTracker watches the editor and the filesystem (CLI tools write straight to disk).
RegressionRiskScorer scores the diff with JS/TS patterns, paths, and scope — no model call.
RegressionNotificationService shows the IDE warning.
Files: src/services/EditBurstTracker.ts, RegressionRiskScorer.ts, RegressionNotificationService.ts.
flowchart LR
edit[AI edit] --> burst[EditBurstTracker]
burst --> score[RegressionRiskScorer]
score --> banner[IDE warning]
2. Context the review receives
The review starts with the diff, the risk signals, and plan files from Cursor, Claude Code, Windsurf, or Antigravity
(AIToolPlanDiscovery).
3. The review loop
PlanningAgent.execute repeats until a final report or timeout: thought, tool calls, or final response.
RuleSelector picks prompts; ToolRegistry runs tools.
Files: src/agent/core/PlanningAgent.ts, RuleSelector.ts, src/agent/tools/.
flowchart TD
start[PlanningAgent.execute] --> think[Model: thought / tools / final]
think -->|tools| registry[ToolRegistry]
registry --> think
think -->|final_response| report[Review report]
think -->|timeout| partial[Partial report]
4. Tools the agent can call
Search the codebase, read git diff/history, LSP diagnostics, static analysis, graph context, sandboxed file reads, and Node runtime inspection.
Original project files are never modified.
Engine tools live under src/agent/tools/engine/.
5. Debugging path (separate from regression review)
Epicenter search, hypothesis generation, runtime analysis, and the root-cause report live under
src/agent/tools/debugging/ and src/agent/prompts/debugging/.
This is why the tree looks large — keep it mentally separate from the edit-time review path.
6. Model call (bring your own key)
LLMProviderService uses the active user entry: provider, typed model name, and API key from VS Code Secret Storage.
No built-in catalog, no proxy, no sponsored tier.
Files: src/agent/llm/, src/common/utils/llmSecretStore.ts.
7. Where to change it
- JS/TS risk pattern →
src/services/RegressionRiskScorer.ts and src/agent/tools/analysis/
- Review prompt or rule →
src/agent/core/RuleSelector.ts and src/agent/prompts/
- New provider protocol → client in
src/agent/llm/ plus the add-model form (model names are not listed in the repo)
flowchart TB
ext[src/extension.ts] --> services[src/services]
ext --> agent[src/agent/core]
agent --> tools[src/agent/tools]
agent --> prompts[src/agent/prompts]
agent --> llm[src/agent/llm]
ext --> webview[src/webview]
Full write-up: ARCHITECTURE.md