Projects
Dependency Analysis

DepGraph

A dependency-graph tool for exploring code structure, highlighting cycles, and surfacing high-impact files.

Problem

Large codebases become risky when dependency structure is invisible; developers need to know which files create cycles or carry broad downstream impact before they change them.

What I Built

Built a VS Code-oriented dependency analysis surface that parses project structure, models reach and cycles, and turns graph findings into editor diagnostics and navigable project context.

Hardest Tradeoff

I favored fewer, explainable diagnostics over maximum graph output, because trust depends on warnings that connect to a concrete review or refactor decision.

Result / Proof

The result is proof that I can connect parsing, graph modeling, UI feedback, and developer workflow design into a tool that makes codebase risk easier to act on.

Outcomes
  • Reduces detached debugging by putting dependency-risk signals directly in the editor.
  • Designed for small-to-mid-sized TypeScript workspaces with dozens of files and reviewable graph nodes.
  • Improves workflow reliability by making high-reach files and cycles visible before a change lands.
Architecture Sketch

The project combines a graph engine, UI layer, query tools, and editor diagnostics so structural signals can move from analysis into daily development.

  1. Workspace files
  2. Dependency graph
  3. Reach and cycle analysis
  4. VS Code diagnostics
Recently Improved

What changed in the proof surface.

  • Added public-facing source context so the excerpt explains the engineering signal, not just the syntax.
  • Clarified the next improvement around graph snapshots and drift comparison.
Proof Points

What this project demonstrates.

  • Flags circular dependencies and high-impact files.
  • Supports graph querying for deeper codebase inspection.
  • Turns dependency analysis into editor-visible feedback.

The result is proof that I can connect parsing, graph modeling, UI feedback, and developer workflow design into a tool that makes codebase risk easier to act on.

DepGraph / TypeScripthstephan23/dep_graph
  1. export class DepGraphDiagnostics {
  2. private collection: vscode.DiagnosticCollection;
  3. update(graph: GraphData): void {
  4. this.collection.clear();
  5. const root = getWorkspaceRoot();
  6. if (!root) { return; }
  7. const diagnosticMap =
  8. new Map<string, vscode.Diagnostic[]>();
  9. const addDiag = (
  10. fileId: string,
  11. diag: vscode.Diagnostic,
  12. ) => {
  13. const absPath = path.join(root, fileId);
  14. const uri = vscode.Uri.file(absPath).toString();
  15. if (!diagnosticMap.has(uri)) {
  16. diagnosticMap.set(uri, []);
  17. }
  18. diagnosticMap.get(uri)!.push(diag);
  19. };
  20. for (const node of graph.nodes) {
  21. if (node.data.reach_pct > 50) {
  22. const pct = node.data.reach_pct.toFixed(1);
  23. const message = `High-impact file: ${pct}% reach`;
  24. const diag = new vscode.Diagnostic(
  25. new vscode.Range(0, 0, 0, 0),
  26. message,
  27. vscode.DiagnosticSeverity.Hint,
  28. );
  29. diag.source = "DepGraph";
  30. diag.code = "high-impact";
  31. addDiag(node.data.id, diag);
  32. }
  33. }
  34. }
  35. }
Line 15Signal lands where developers work.

The graph result becomes a file-level diagnostic instead of a detached report.

2026 · Harrison Stephan · Building Calm, Reliable Software Systems