SourceViz User Guide & Documentation

Step-by-step walkthroughs, architectural health formulas, and AI-ready workflows for developers, software architects, and engineering managers.

Fundamentals
DevelopersArchitectsEngineering Managers

Canvas & Navigation Fundamentals

Navigate the interactive 2D React Flow codebase topology, switch abstraction levels, search symbols, and inspect commit-anchored source code.

How-To Walkthrough

  1. Use the left sidebar under Visualization Mode to toggle between Files Only (high-level module map) and Detailed Graph (functions, classes, and call/import edges).
  2. Select any Business Capability domain in the sidebar to filter and automatically center the canvas viewport on that domain.
  3. Use the Search Codebase input or Cmd/Ctrl+K search to jump directly to a file, class, or function node.
  4. Click any node on the canvas to open its right-hand inspection drawer and view commit-anchored source code with exact line ranges.
Files Only vs. Detailed Graph

Files Only reduces visual density for system-wide reviews; Detailed Graph exposes function-level edges and complexity hotspots.

Commit-Anchored Snapshots

Every graph is immutably tied to a Git commit SHA so architectural metrics and line numbers stay 100% consistent.

Fundamentals
DevelopersArchitectsEngineering Managers

Architectural Health & Worst-Child Inheritance

Understand the 3-tier health model (Good, Warning, Critical) and how worst-child inheritance surfaces hidden structural bottlenecks.

How-To Walkthrough

  1. Check the top-left Repository Health Scorecard for an immediate summary of Good, Warning, and Critical capabilities.
  2. Click a red or amber capability in the Business Capabilities list to isolate the exact child file or function causing the degradation.
  3. Inspect the node's Metric Contributors tab to see which threshold (Maintainability, Complexity, Instability, or Cycle) triggered the status.
Good / Warning / Critical

Green (Good) meets all thresholds; Amber (Warning) indicates emerging complexity or coupling; Red (Critical) signals structural debt or guardrail breaches.

Worst-Child Inheritance

A parent file or capability inherits the worst health status of its children so critical hotspots are never masked by healthy averages.

Diagnostics & AI
DevelopersArchitects

Metric Explainability & Deep Diagnostics

Interpret Maintainability Index, Cyclomatic & Cognitive Complexity, Robert C. Martin Instability (I), and Afferent/Efferent Coupling (Ca/Ce).

How-To Walkthrough

  1. Open any node's Detail Drawer and select the Diagnostics / Metrics section to view exact numeric scores.
  2. Review Efferent Coupling (Ce — outgoing dependencies) vs. Afferent Coupling (Ca — incoming dependents) to understand blast radius.
  3. Read the root-cause contributor breakdown to see which specific functions, branches, or imports contributed most to the score.
Instability: I = Ce / (Ca + Ce)

Ranges from 0.0 (maximally stable, depended upon by many) to 1.0 (maximally unstable, depends on many external modules).

Maintainability Index & Complexity

Combines Halstead volume, Cyclomatic Complexity, and lines of code; Cognitive Complexity penalizes deeply nested control flow.

Diagnostics & AI
DevelopersArchitects

Actionable Recommendations & AI Prompt Workflows

Generate deterministic, AI-consumable architectural prescriptions and copy zero-translation refactoring prompts directly into your coding agent.

How-To Walkthrough

  1. Click the purple AI Prompt button in the top visualizer toolbar for repository-wide priorities, or inside a node drawer for targeted refactoring.
  2. Review the generated prescription: it includes exact file paths, line ranges, metric contributors, and architectural constraints.
  3. Click Copy AI Prompt and paste it directly into your AI coding assistant without manual translation.
Zero-Translation AI Prompts

Prompts are structured with concrete file paths, dependency edges, and invariant constraints so AI agents can execute safe refactors immediately.

Diagnostics & AI
DevelopersArchitectsEngineering Managers

Component Tagging & Target-State Annotations

Label files or entire capability domains with preset lifecycle tags (target-state, in-migration, legacy, deprecated, quarantined) or custom colored tags.

How-To Walkthrough

  1. Click any tile on the canvas (or select a capability in the sidebar) and open the Component Tags section in the drawer.
  2. Apply a preset tag (target-state, in-migration, legacy, deprecated, quarantined) or create a custom colored tag.
  3. Choose whether to scope the tag to the single tile or propagate across the capability domain.
  4. Use the Component Tags filter pills in the left sidebar to highlight or isolate tagged components on the canvas.
Orthogonal to Objective Health

Lifecycle tags do not alter AST health metrics, but importing a deprecated or quarantined component triggers an actionable AI recommendation.

Cross-Commit Persistence

Tags are keyed by repository and canonical file path in Supabase (with instant localStorage caching) so annotations survive new commits.

Governance & Supply Chain
DevelopersArchitectsEngineering Managers

Architecture Drift & Snapshot Comparison

Compare two commits, releases, or PR branches to detect coupling creep, new circular dependencies, and architectural drift.

How-To Walkthrough

  1. Use the Diff vs. selector in the top Architecture Drift Toolbar to pick a baseline snapshot commit.
  2. Inspect highlighted added, removed, or degraded nodes and new cross-boundary edges on the canvas.
  3. Review the Drift Summary badge for net changes in coupling, complexity, and health regressions.
Immutable Baseline Comparison

Comparing two commit-anchored snapshots isolates structural deltas introduced between releases or inside a Pull Request.

Governance & Supply Chain
ArchitectsEngineering Managers

Custom Guardrails & ADR Boundary Enforcement

Configure Clean Architecture and custom layer import rules, and spot forbidden edges directly on the graph and in CI/CD.

How-To Walkthrough

  1. Navigate to Settings -> Guardrails & ADRs (or click the Guardrails button in the visualizer toolbar).
  2. Define source and forbidden target path patterns (for example, src/domain/** must not import src/infra/**).
  3. Return to the canvas to inspect flagged forbidden edges in red and enforce them in GitHub PR checks.
Forbidden Edge Detection

AST-extracted import edges are evaluated against your organization's guardrail rules on every snapshot.

Governance & Supply Chain
DevelopersArchitectsEngineering Managers

Supply-Chain Dependency Topology & CVE Blast Radius

Inspect third-party package dependencies, trace CVE vulnerability contagion across internal modules, and jump to upstream open-source repositories.

How-To Walkthrough

  1. Open the Supply-Chain / Dependencies view in the visualizer to inspect parsed manifest packages (npm, PyPI, Go, Cargo, etc.).
  2. Click a flagged package to highlight the internal blast radius — every internal file and capability that transitively imports it.
  3. Follow upstream repository links to inspect the dependency's own SourceViz topology when available.
CVE Blast Radius

Maps external package vulnerabilities onto your internal call/import graph so teams prioritize patching high-exposure packages first.

Governance & Supply Chain
ArchitectsEngineering Managers

Strategic Business Goal Alignment & Goal Lens

Define executive architectural goals, apply Strategic Archetype templates, evaluate fitness functions, and toggle the Goal Lens overlay.

How-To Walkthrough

  1. Click the Goals button in the top visualizer toolbar to open the Strategic Business Goal Alignment modal.
  2. Create a custom goal or apply a Strategic Archetype template (PCI-DSS Financial Isolation, Conway's Law Autonomy, Microservices Readiness, Zero-Trust Supply Chain).
  3. Activate the Goal Lens toggle on any goal to overlay alignment status and fitness function violations directly onto the canvas.
Architectural Fitness Functions

Automated checks that continuously verify whether your codebase topology satisfies business, compliance, and team-autonomy objectives.

Account & Alerting
DevelopersArchitectsEngineering Managers

User Accounts, Workspaces & Proactive Notifications

Create an account with automatic organization workspace onboarding and configure proactive Email, Slack, Discord, Teams, Webhook, and GitHub Issue alerts.

How-To Walkthrough

  1. Register at /signup with email verification (or GitHub OAuth) to automatically provision your default organization workspace.
  2. Open Settings -> Notifications & Alerts to add Slack, Discord, Microsoft Teams, Resend Email, HMAC-signed HTTP Webhooks, or Automated GitHub Issue channels.
  3. Select event triggers (Critical Health, Layer Violations, Instability Spikes, Weekly/Monthly Digests) and click Test to verify delivery.
Cooldown Deduplication

Automated alerts and GitHub Issues are deduplicated within cooldown windows to prevent notification fatigue on repeated commits.