Agent Context Graph VisualizerA VS Code extension that turns a folder of interconnected markdown files into an interactive force-directed graph — with built-in analysis tools to optimize your documentation for AI agents. Surfaces broken links, orphan documents, health scores, token budgets, and structural issues so your knowledge base delivers maximum context to LLMs. Quick Start
The extension recursively scans all Core VisualizationForce-Directed GraphDocuments appear as nodes connected by directed edges. The d3-force layout automatically arranges nodes so related documents cluster together. Importance at a GlanceNodes are sized by in-degree — files that are linked to most frequently appear largest. This immediately surfaces hub documents (indexes, architecture overviews) without any manual configuration. Category ColoringNodes are colored by their parent directory, creating natural visual clusters:
Interactive Controls
Live UpdatesA file watcher monitors the folder for Theme AwareAdapts to your VS Code theme automatically. Dark, light, and high-contrast themes are all supported through VS Code's CSS custom properties. Agent-Readiness AnalysisDocumentation Health ScoreEvery document gets a 0-100 health score based on 8 metrics:
A global health score averages all documents. The Health mode recolors nodes green (75+), yellow (50-74), orange (25-49), or red (0-24). The detail panel and insights panel show per-metric breakdown bars. Broken Link DetectionThe parser tracks every markdown link and checks whether the target exists on disk. Missing targets appear as red ghost nodes with dashed borders, connected by red dashed edges. The insights panel lists all broken links with their source documents. Structure ValidationEach document is checked for common structural issues. Orange warning badges appear on nodes that have problems:
Bidirectional Link SuggestionsThe analyzer detects one-way links — where A links to B but B doesn't link back. In Suggestions mode, green dashed edges overlay the graph showing where backlinks should be added. The insights panel lists each suggestion. Missing Link DetectionContent similarity analysis using Jaccard similarity on extracted keywords. Compares every pair of unlinked documents and surfaces the top 20 most similar pairs. Helps discover related documents that should be cross-referenced. Context Window BudgetEvery document gets a token estimate (~1.3x word count). In Budget mode, nodes resize and recolor based on token count — making it easy to spot oversized documents that may blow context limits. The insights panel shows total tokens, averages, and the largest/smallest documents. Reachability AnalysisSelect an entry point (README, index, CLAUDE.md are prioritized at the top of the dropdown) and see which documents are reachable via outgoing links using BFS. Nodes color by hop distance: blue (entry) → green (1 hop) → yellow (3 hops) → red (5+ hops). Unreachable nodes turn gray with dashed outlines. The info bar shows reachability percentage. Navigation Path AnalysisIn Path mode, click two nodes to find the shortest path between them via BFS on outgoing edges. The path highlights in bright blue with hop count and total token cost displayed in a bottom bar. Useful for understanding how an agent would navigate from one document to another. Export Agent-Ready Artifacts
Visualization Modes
Click any mode button again to toggle it off and return to default. How Link Parsing WorksThe parser extracts links in two phases to maximize coverage while avoiding duplicates:
All paths are resolved relative to the source file's directory, so Development
Press F5 in VS Code to launch an Extension Development Host with the extension loaded. Project Structure
Publishing
License |