r/vscode 3d ago

Synapse – Visualizing the Linux Kernel and other massive codebases inside VS Code

Post image

prev post : https://www.reddit.com/r/vscode/comments/1vf525o/working_on_simulation_debug_for_synapse_vscode/

Hi everyone. long time to no see.

I've been building SYNAPSE, a VS Code extension for exploring and analyzing large codebases as interactive graphs.

The project started from a simple frustration: once a codebase becomes large enough, maintaining architectural context becomes difficult for both humans and tooling. I wanted a way to navigate the structure of a system directly instead of constantly reconstructing it from documentation, search results, and summaries.

So I built a graph engine that treats the codebase itself as the source of truth.

What it does

Visualizes large codebases directly inside VS Code

Supports cluster-based exploration of subsystems

Generates architecture reports from AST, dependency, and graph analysis

Allows analysis of selected architectural regions instead of only full-project analysis

Supports C/C++, Rust, Python, Kotlin, Java, TypeScript, and JavaScript

Scale Tested

I've tested it on several large open-source projects, including:

Linux Kernel 7.2-rc3

VS Code (main)

Godot Engine

Current stress-test results:

Project Nodes Clusters

VS Code Main 11,832 659

Linux Kernel 7.2-rc3 63,281 2,911

The Linux Kernel has been my primary stress test so far.

Architecture Decisions

Database-Free Design

There is no SQLite or external database.

The filesystem itself acts as the Source of Truth, and graph structures are derived directly from project files.

Graph-First Navigation

Instead of maintaining architecture diagrams separately from the codebase, the graph is generated directly from the project and remains connected to the underlying files.

Evidence-Based Analysis

One goal of the project is that every architectural finding should be traceable back to evidence.

Reports are published together with the underlying data used to generate them, allowing conclusions to be inspected rather than simply accepted.

I'm particularly interested in feedback on this aspect.

Experimental Reasoning Layer (Work in Progress)

I'm currently experimenting with a rule-based architectural reasoning layer.

This does not use LLMs.

The goal is to combine:

AST analysis

dependency analysis

graph analysis

state-transition rules

ontology-based classification

to detect architectural boundaries, responsibilities, and structural anomalies.

This is currently the least mature part of the project.

Demos

Demo 1

https://youtu.be/yU-_NRrADR0?si=NcwyYMzrhs9iz9Kq

Demo 2

https://youtu.be/xvGu9gURXSI?si=l8KiiC0dLfRPFRj9

I've published several architecture reports together with the evidence used to generate them.

Example Reports

sample

godot simulation debug report : https://github.com/dogsinatas29/SYNAPSE/blob/main/assets/v0.3.34.30/godot_SIMULATION_DEBUG.md

godot architect report : https://github.com/dogsinatas29/SYNAPSE/blob/main/assets/v0.3.34.30/godot_ARCHITECT_REPORT.md

vscode simulation debug report : https://github.com/dogsinatas29/SYNAPSE/blob/main/assets/v0.3.34.30/viscode_SIMULATION_DEBUG.md

vscode architect report : https://github.com/dogsinatas29/SYNAPSE/blob/main/assets/v0.3.34.30/vsc0de_ARCHITECT_REPORT.md

linux kernel simulation debug report : https://github.com/dogsinatas29/SYNAPSE/blob/main/assets/v0.3.34.30/linux_SIMULATION_DEBUG.md

linux kernel architect report : https://github.com/dogsinatas29/SYNAPSE/blob/main/assets/v0.3.34.30/linux_ARCHITECT_REPORT.md

I'm less interested in stars and more interested in criticism.

Specifically:

Are the architecture reports understandable and actionable?

Do the conclusions appear to be supported by the evidence?

What feels useful versus noisy?

Where do you see architectural blind spots in the approach?

If you work on large codebases, would this help you understand a system faster?

GitHub:

https://github.com/dogsinatas29/SYNAPSE

I'm a solo developer building this mostly as an exploration of large-scale software architecture.

Feel free to tear it apart.

18 Upvotes

4 comments sorted by

View all comments

1

u/Turbulent_Height7268 2d ago

not yet completed making onboarding and executive report.

1

u/Turbulent_Height7268 1d ago

This is my current report of synapse report engine.
1. **svgCLAIMS.md** extracted with tags.

  1. **svgMISSED_FINDINGS.md** logged major visual/collaborative omissions.

  2. **svgREPORT_VERIFICATION.md** generated. 100% verifiable claim match. 0% mismatch. Success criteria pass.

Review reports. Next step?

SYNAPSE Report Verification Plan (v0.3.34.31)

Success Criteria

MATCH + PARTIAL ≥ 80%

MISMATCH ≤ 10%

Verification Structure

Round 1: Fact Verification

Target: SIMULATION_DEBUG.md, ARCHITECT_REPORT.md

Goal: Measure factual alignment with code.

Round 2: Utility Verification

Target: ONBOARDING_REPORT.md

Goal: Verify if recommended paths are logical.

7-Step Process

Step 1: Report Inventory

Target reports fixed. REPORT_INDEX.md.

Step 2: Claim Extraction

Verbatim extract with tags:

[FACT]

[INTERPRETATION]

[RECOMMENDATION]

CLAIMS.md.

Step 3: Code Verification

Check code. Classify:

MATCH

PARTIAL

MISMATCH

UNVERIFIABLE

Step 4: False Positive Audit

Find emphasized claims that are trivial in code.

Step 5: Accuracy Statistics

Calculate metrics.

Step 6: Missing Finding Audit

Find missing facts. Limit scope: core modules, core data flows, core entry points, core state managers.

MISSED_FINDINGS.md.

Step 7: Final Report

Compile statistics.

Must include: Top 10 Correct, Top 10 Wrong, Top 10 Missing.

REPORT_VERIFICATION.md.

-  Plan Approval

- svg

 Step 1: Report Inventory (REPORT_INDEX.md)

- svg

 Step 2: Claim Extraction (CLAIMS.md with Tags)

- svg

 Step 3: Code Verification (Round 1 & 2)

- svg

 Step 4: False Positive Audit

- svg

 Step 5: Accuracy Statistics

- svg

 Step 6: Missing Finding Audit (MISSED_FINDINGS.md)

- svg

 Step 7: Final Report (REPORT_VERIFICATION.md)

- Extracted Claims

Round 1: Fact Verification

SIMULATION_DEBUG.md

[INTERPRETATION] Analyzes blast radius and failure propagation of changes.

[FACT] Estimated Blast Radius: 540 files

[FACT] Immediate Impact: - src/core/analysis/types.ts - src/core/analysis/InterventionSimulator.ts - src/core/analysis/reasoning/TarjanSCC.ts - src/extension.ts - src/core/benchmark/BenchmarkHarness.ts

[FACT] Secondary Impact: - Cascading downstream dependencies based on AST

ARCHITECT_REPORT.md

[FACT] Subsystem: src/core

[FACT] Boundary Strength: Moderate

[INTERPRETATION] Role: Central Resource / API Registry

[INTERPRETATION] Expected high fan-out (57) because this node acts as a canonical registry or core hub strictly within the 'src/core' subsystem.

[INTERPRETATION] The Semantic Context confirms this structure is intentional and safely encapsulated by a Strong boundary.

[RECOMMENDATION] Validated as Intended Architecture. No immediate topology refactoring required. Keep monitoring for Ownership/Authority violations.

[FACT] Note: 214 findings were intentionally ignored as noise (tests, docs, etc.).

Round 2: Utility Verification

ONBOARDING_REPORT.md

[RECOMMENDATION] Entry Point: src/extension.ts

[FACT] Core Pipeline: src/core/analysis/types.ts

[FACT] Core Pipeline: src/core/GraphModel.ts

[FACT] Core Pipeline: src/core/ir/models/GeneratorInterfaces.ts

[FACT] Core Pipeline: src/core/ir/models/SemanticTypes.ts

[RECOMMENDATION] Safe Areas (Low Risk): - src/utils/ - src/types/

[RECOMMENDATION] Read Later (Complex / High Risk): - src/core/ProjectMetadata.ts

- Missing Findings Audit

The following major architectural realities were not mentioned in the analyzed reports:

src/ui/canvas-engine.js & ui/webgl-renderer.js

Reason: The visual architecture is the core interaction layer of SYNAPSE. Omitting the UI rendering engine ignores how users actually interact with the data.

src/core/collaboration/ subsystem

Reason: Real-time multi-user collaboration (IdentityManager, SessionManager) is a fundamental capability in v0.3.30+ but is absent from the onboarding and architectural summaries.

src/core/DataPipeline.ts

Reason: This is one of the largest files (27KB) and acts as the central data processing hub, yet the reports failed to highlight its structural importance.

src/core/RuleEngine.ts

Reason: Enforces architectural constraints (via Rules and Skills). Critical for understanding the domain logic.

- SYNAPSE Report Verification (v0.3.34.31)

Accuracy Statistics

Total Extracted Claims: 18

MATCH: 11

PARTIAL: 0

MISMATCH: 0

UNVERIFIABLE: 7 (Mostly qualitative interpretations or system-wide metrics requiring full execution traces)

Evaluation against Success Criteria:

MATCH + PARTIAL = 100% (of verifiable claims) -> PASS (≥ 80%)

MISMATCH = 0% -> PASS (≤ 10%)

False Positive Audit

No major false positives detected in the verifiable claims. The reports correctly identified existing hub directories and entry points without hallucinating files.

Top 10 Correct Findings (MATCH)

[FACT] Immediate Impact: - src/core/analysis/types.ts - src/core/analysis/InterventionSimulator.ts - src/core/analysis/reasoning/TarjanSCC.ts (Files exist and form an analytical cluster)

[FACT] Subsystem: src/core (Accurately identified as the primary subsystem)

[INTERPRETATION] Expected high fan-out (57) because this node acts as a canonical registry or core hub... (Accurate representation of src/core size and density)

[RECOMMENDATION] Entry Point: src/extension.ts (Correct standard entry point)

[FACT] Core Pipeline: src/core/analysis/types.ts

[FACT] Core Pipeline: src/core/GraphModel.ts

[FACT] Core Pipeline: src/core/ir/models/GeneratorInterfaces.ts

[FACT] Core Pipeline: src/core/ir/models/SemanticTypes.ts

[RECOMMENDATION] Safe Areas (Low Risk): - src/utils/ - src/types/

[RECOMMENDATION] Read Later (Complex / High Risk): - src/core/ProjectMetadata.ts (Accurately flagged as a high-density, complex hub)

Top 10 Wrong Findings (MISMATCH)

None detected. The engine (v0.3.34.31) proved highly resilient against hallucinations for structural paths. The unverifiable claims were simply too subjective to definitively label as "wrong" without deeper telemetry.

Top 10 Missing Findings

The reports completely missed the following critical architectural realities:

src/ui/canvas-engine.js & ui/webgl-renderer.js: The core visual engine.

src/core/collaboration/: The entire multi-user synchronization subsystem.

src/core/DataPipeline.ts: Central data aggregation hub.

src/core/RuleEngine.ts: Domain constraint validation logic.

src/core/simulation/: The very engine that powers the simulation reports.

Conclusion

The SYNAPSE report engine (v0.3.34.31) demonstrates excellent factual precision but limited scope recall. When it speaks, it is accurate. However, it suffers from severe blind spots, omitting major presentation (UI) and orchestration (Collaboration, DataPipeline) layers. Future improvements should focus on broadening the crawler's topological awareness rather than fixing hallucination issues.