{"passport":{"unfragile":{"@version":"1.0","version":"2026-05","artifact":{"id":"npm-code-graph-llm","slug":"code-graph-llm","name":"code-graph-llm","type":"repo","url":"https://github.com/jabhijeet/code-graph#readme","page_url":"https://unfragile.ai/code-graph-llm","categories":["frameworks-sdks"],"tags":["llm","context","token-efficiency","codebase-map","ai-agent","documentation"],"pricing":{"model":"open_source","free":true,"starting_price":null},"status":"active","verified":false},"capabilities":[{"id":"npm-code-graph-llm__cap_0","uri":"capability://data.processing.analysis.language.agnostic.codebase.graph.construction","name":"language-agnostic codebase graph construction","description":"Builds a compact abstract syntax tree (AST) representation of codebases across multiple programming languages without language-specific parsers. Uses a unified graph schema to represent code structure (functions, classes, imports, dependencies) as nodes and edges, enabling consistent analysis regardless of source language. The graph is serialized into a compact format optimized for LLM token consumption.","intents":["I need to map a polyglot codebase (Python, JavaScript, Go, etc.) into a single queryable structure for LLM context","I want to understand code dependencies and call graphs without running language-specific analysis tools","I need to generate documentation or summaries from code structure without parsing each language separately"],"best_for":["developers building LLM agents that need to understand multi-language codebases","teams using LLMs for code analysis and refactoring across heterogeneous tech stacks","builders creating AI-powered code documentation and knowledge extraction tools"],"limitations":["Language-agnostic approach may miss language-specific semantics (e.g., Python decorators, Rust lifetimes, Go goroutines)","Accuracy depends on consistent naming conventions and code structure across languages","Does not perform semantic analysis or type inference — purely structural mapping","May require post-processing for languages with non-standard syntax or DSLs"],"requires":["Node.js 14+ or Python 3.7+ (depending on implementation)","Read access to source code files","Sufficient disk space for graph serialization (typically <5% of original codebase size)"],"input_types":["source code files (text)","directory paths","file globs or patterns"],"output_types":["graph data structure (JSON/YAML serialized)","compact token-optimized representation","structured metadata (nodes, edges, relationships)"],"categories":["data-processing-analysis","code-analysis"],"confidence":0.5,"matches":0,"success_rate":0},{"id":"npm-code-graph-llm__cap_1","uri":"capability://data.processing.analysis.token.efficient.codebase.context.serialization","name":"token-efficient codebase context serialization","description":"Converts the constructed code graph into a compact, LLM-friendly text representation that minimizes token count while preserving semantic relationships. Uses techniques like symbol deduplication, hierarchical summarization, and selective edge inclusion to create a serialized format that fits within LLM context windows. The output is optimized for both readability and token efficiency, enabling larger codebases to fit in a single prompt.","intents":["I want to include my entire codebase context in an LLM prompt without exceeding token limits","I need to generate a compact codebase map that I can paste into Claude or GPT-4 for code analysis","I want to reduce the cost of API calls by minimizing the context tokens sent to LLMs"],"best_for":["developers using token-limited LLM APIs (OpenAI, Anthropic, etc.)","teams optimizing LLM API costs for large codebase analysis","builders creating LLM-powered code assistants with strict context budgets"],"limitations":["Serialization may lose fine-grained details (e.g., exact line numbers, comments, docstrings) depending on compression level","Trade-off between compression and information density — higher compression may reduce LLM reasoning quality","No built-in versioning or delta encoding for incremental updates","Serialized format is read-only for LLM consumption — not designed for round-trip editing"],"requires":["Completed code graph from codebase-graph-construction capability","Target token budget or compression ratio specification","Optional: language-specific formatting preferences"],"input_types":["code graph (structured data)","compression parameters (integer or ratio)","filtering rules (optional)"],"output_types":["plain text (markdown or custom format)","structured text (YAML/JSON)","token-count metadata"],"categories":["data-processing-analysis","memory-knowledge"],"confidence":0.5,"matches":0,"success_rate":0},{"id":"npm-code-graph-llm__cap_2","uri":"capability://data.processing.analysis.dependency.and.import.graph.extraction","name":"dependency and import graph extraction","description":"Automatically identifies and maps all import statements, module dependencies, and inter-file references within a codebase, building a directed graph of dependencies. Handles multiple import syntaxes (ES6 imports, CommonJS require, Python imports, Go imports, etc.) through pattern matching and heuristic analysis. Produces a queryable dependency graph that reveals code coupling, circular dependencies, and module boundaries without executing code.","intents":["I need to understand which files depend on which other files to plan refactoring or modularization","I want to detect circular dependencies and tightly coupled modules in my codebase","I need to generate a dependency diagram or visualization for documentation purposes"],"best_for":["developers analyzing legacy codebases for refactoring opportunities","teams assessing code modularity and architecture quality","builders creating code visualization and documentation tools"],"limitations":["Pattern-based import detection may miss dynamic imports (e.g., require() with variables, dynamic imports in loops)","Does not resolve relative paths or module aliases without explicit configuration","Cannot detect runtime dependencies or plugins loaded dynamically","Accuracy varies by language — some languages have more consistent import conventions than others"],"requires":["Source code files with standard import/require statements","Optional: configuration file specifying module resolution rules or path aliases","Optional: .gitignore or similar to exclude vendored/node_modules directories"],"input_types":["source code files (text)","directory paths","optional configuration (JSON/YAML)"],"output_types":["dependency graph (nodes and edges)","adjacency list or matrix","circular dependency report","module coupling metrics"],"categories":["data-processing-analysis","code-analysis"],"confidence":0.5,"matches":0,"success_rate":0},{"id":"npm-code-graph-llm__cap_3","uri":"capability://data.processing.analysis.function.and.class.signature.extraction","name":"function and class signature extraction","description":"Parses and extracts function/method signatures, class definitions, and their metadata (parameters, return types, visibility modifiers, decorators) from source code across multiple languages. Uses regex-based pattern matching and lightweight AST-like analysis to identify callable entities and their interfaces without full semantic parsing. Stores signatures in a queryable format that enables LLMs to understand the public API surface of code modules.","intents":["I want to generate API documentation from code signatures without writing docstrings","I need to understand what functions are available in a module and their parameters for code generation","I want to identify breaking changes when comparing function signatures across versions"],"best_for":["developers generating API documentation from code","teams using LLMs to generate code that calls existing functions","builders creating code completion or IDE integration tools"],"limitations":["Regex-based extraction may miss complex signatures (e.g., nested generics, union types, variadic arguments)","Does not extract or infer return types if not explicitly declared in source","Cannot distinguish between public and private methods without language-specific conventions (e.g., Python's underscore prefix)","Decorators and annotations are extracted as text but not semantically analyzed"],"requires":["Source code files with function/class definitions","Optional: language-specific configuration for signature patterns"],"input_types":["source code files (text)","directory paths"],"output_types":["structured signature data (JSON/YAML)","function/class inventory with metadata","API surface documentation"],"categories":["data-processing-analysis","code-analysis"],"confidence":0.5,"matches":0,"success_rate":0},{"id":"npm-code-graph-llm__cap_4","uri":"capability://search.retrieval.codebase.indexing.and.querying","name":"codebase indexing and querying","description":"Creates an in-memory or persistent index of the code graph that enables fast queries for specific symbols, functions, files, or relationships. Supports queries like 'find all callers of function X', 'list all files importing module Y', or 'get the dependency chain from A to B'. Uses hash maps, adjacency lists, or similar data structures for O(1) or O(log n) lookup performance. Enables LLM agents to dynamically retrieve relevant code context based on user queries.","intents":["I want to quickly find all places where a function is called or imported","I need to trace the dependency chain from one module to another for impact analysis","I want to retrieve only the relevant code context for a specific LLM query instead of loading the entire codebase"],"best_for":["developers building LLM agents that need dynamic code context retrieval","teams performing impact analysis or refactoring on large codebases","builders creating code search or navigation tools"],"limitations":["In-memory indexing requires sufficient RAM for large codebases (typically 2-5x the source code size)","Index must be rebuilt when code changes — no incremental update mechanism","Query performance degrades with very large graphs (>100k nodes) without optimization","No built-in support for fuzzy matching or approximate queries"],"requires":["Completed code graph from codebase-graph-construction capability","Sufficient RAM for index storage (typically 100MB-1GB for medium codebases)","Optional: persistent storage backend (SQLite, file-based) for large codebases"],"input_types":["code graph (structured data)","query strings (natural language or structured format)"],"output_types":["query results (list of matching nodes/edges)","subgraph (relevant context around query results)","ranked results with relevance scores"],"categories":["search-retrieval","memory-knowledge"],"confidence":0.5,"matches":0,"success_rate":0},{"id":"npm-code-graph-llm__cap_5","uri":"capability://text.generation.language.codebase.summarization.and.documentation.generation","name":"codebase summarization and documentation generation","description":"Generates human-readable summaries and documentation from the code graph by combining function signatures, dependency information, and structural metadata. Creates markdown or HTML documentation that describes module purposes, public APIs, and inter-module relationships. Uses the graph structure to automatically organize documentation by module hierarchy and dependency chains, reducing manual documentation effort.","intents":["I want to auto-generate README or API documentation from my codebase structure","I need to create an architecture overview document showing module relationships and dependencies","I want to generate a quick reference guide for onboarding new developers"],"best_for":["teams maintaining large codebases with outdated or missing documentation","developers creating API documentation without writing docstrings","builders creating documentation generation tools or plugins"],"limitations":["Generated documentation lacks semantic meaning and examples — requires manual enhancement","Does not extract or include comments, docstrings, or inline documentation from source","Organization and structure are based on code graph only — may not reflect intended logical grouping","No built-in support for custom templates or styling beyond markdown/HTML"],"requires":["Completed code graph with function/class signatures and dependencies","Optional: custom templates or formatting preferences"],"input_types":["code graph (structured data)","optional template configuration"],"output_types":["markdown documentation","HTML documentation","structured documentation (JSON/YAML)"],"categories":["text-generation-language","data-processing-analysis"],"confidence":0.5,"matches":0,"success_rate":0},{"id":"npm-code-graph-llm__cap_6","uri":"capability://data.processing.analysis.multi.language.code.pattern.recognition","name":"multi-language code pattern recognition","description":"Identifies common code patterns and idioms across multiple programming languages by analyzing the code graph for recurring structural motifs (e.g., factory patterns, dependency injection, middleware chains). Uses heuristic matching on function signatures, class hierarchies, and call patterns to detect design patterns without language-specific semantic analysis. Enables LLMs to understand architectural patterns and suggest refactorings based on pattern recognition.","intents":["I want to identify design patterns used in my codebase to understand architectural decisions","I need to detect anti-patterns or code smells that might indicate refactoring opportunities","I want to suggest consistent patterns to developers based on existing codebase conventions"],"best_for":["architects analyzing codebase design and architectural consistency","teams enforcing coding standards and design patterns across polyglot codebases","builders creating code quality analysis or refactoring suggestion tools"],"limitations":["Pattern recognition is heuristic-based and may produce false positives or false negatives","Requires sufficient code examples to establish reliable pattern baselines","Cannot detect patterns that rely on runtime behavior or dynamic dispatch","Language-specific idioms may not translate across languages, reducing pattern relevance"],"requires":["Completed code graph with function signatures and call relationships","Optional: pattern definition library or configuration"],"input_types":["code graph (structured data)","optional pattern definitions"],"output_types":["pattern detection results (list of matches with confidence scores)","pattern recommendations","architectural analysis report"],"categories":["data-processing-analysis","planning-reasoning"],"confidence":0.5,"matches":0,"success_rate":0},{"id":"npm-code-graph-llm__cap_7","uri":"capability://data.processing.analysis.incremental.codebase.change.tracking","name":"incremental codebase change tracking","description":"Tracks changes to the codebase between versions by comparing code graphs and identifying added, modified, or removed functions, classes, imports, and dependencies. Produces a delta representation showing what changed in the code structure without requiring full re-analysis. Enables LLM agents to understand code evolution and generate change summaries or migration guides.","intents":["I want to understand what changed in my codebase between two versions for release notes","I need to identify breaking changes (removed functions, changed signatures) for API versioning","I want to generate a migration guide showing how code structure evolved"],"best_for":["developers managing API versioning and backward compatibility","teams generating release notes and change documentation","builders creating code evolution analysis or migration tools"],"limitations":["Change detection is structural only — does not detect behavioral changes or logic modifications","Requires two complete code graphs for comparison — no streaming or incremental diff support","Renamed functions appear as deletions and additions rather than renames without additional heuristics","Does not track changes to comments, docstrings, or non-structural code elements"],"requires":["Two code graphs representing different versions of the codebase","Optional: mapping configuration for renamed symbols or refactored modules"],"input_types":["code graph (version 1)","code graph (version 2)","optional mapping configuration"],"output_types":["delta representation (added/modified/removed items)","change summary (text or structured format)","breaking change report"],"categories":["data-processing-analysis","planning-reasoning"],"confidence":0.5,"matches":0,"success_rate":0},{"id":"npm-code-graph-llm__cap_8","uri":"capability://memory.knowledge.llm.aware.context.window.optimization","name":"llm-aware context window optimization","description":"Dynamically selects and prioritizes code context based on LLM token budget and query relevance, using the code graph to identify the most important symbols and relationships for a given task. Implements strategies like relevance ranking, hierarchical summarization, and selective edge inclusion to fit the most informative context within token limits. Adapts context selection based on LLM model capabilities and token limits (e.g., GPT-4 vs Claude vs open-source models).","intents":["I want to automatically select the most relevant code context for an LLM query without manual filtering","I need to fit large codebases into LLM context windows by prioritizing the most important code","I want to optimize context selection based on my LLM's token limits and capabilities"],"best_for":["developers building LLM agents that need to work within strict token budgets","teams optimizing LLM API costs by minimizing context tokens","builders creating intelligent code assistants that adapt to different LLM models"],"limitations":["Relevance ranking is heuristic-based and may not always select the most important context for complex queries","Requires knowledge of LLM token limits and model capabilities — not all models are supported","Trade-off between context completeness and token efficiency — higher compression may reduce reasoning quality","No built-in support for multi-turn conversations or context persistence across queries"],"requires":["Completed code graph with dependency and relevance information","LLM model specification (name, token limit, capabilities)","Query or task description for relevance ranking"],"input_types":["code graph (structured data)","query or task description (text)","LLM model specification (JSON/YAML)"],"output_types":["selected code context (text or structured format)","token count estimate","relevance scores for selected items"],"categories":["memory-knowledge","planning-reasoning"],"confidence":0.5,"matches":0,"success_rate":0}],"trust":{"score":31,"verified":false,"data_access_risk":"low","permissions":["Node.js 14+ or Python 3.7+ (depending on implementation)","Read access to source code files","Sufficient disk space for graph serialization (typically <5% of original codebase size)","Completed code graph from codebase-graph-construction capability","Target token budget or compression ratio specification","Optional: language-specific formatting preferences","Source code files with standard import/require statements","Optional: configuration file specifying module resolution rules or path aliases","Optional: .gitignore or similar to exclude vendored/node_modules directories","Source code files with function/class definitions"],"failure_modes":["Language-agnostic approach may miss language-specific semantics (e.g., Python decorators, Rust lifetimes, Go goroutines)","Accuracy depends on consistent naming conventions and code structure across languages","Does not perform semantic analysis or type inference — purely structural mapping","May require post-processing for languages with non-standard syntax or DSLs","Serialization may lose fine-grained details (e.g., exact line numbers, comments, docstrings) depending on compression level","Trade-off between compression and information density — higher compression may reduce LLM reasoning quality","No built-in versioning or delta encoding for incremental updates","Serialized format is read-only for LLM consumption — not designed for round-trip editing","Pattern-based import detection may miss dynamic imports (e.g., require() with variables, dynamic imports in loops)","Does not resolve relative paths or module aliases without explicit configuration","builder identity is not verified yet","no observed match outcomes yet"],"rank_breakdown":{"adoption":0.17689339421867814,"quality":0.28,"ecosystem":0.5800000000000001,"match_graph":0.25,"freshness":0.75,"weights":{"adoption":0.3,"quality":0.2,"ecosystem":0.15,"match_graph":0.3,"freshness":0.05}},"observed_outcomes":{"matches":0,"success_rate":0,"avg_confidence":0,"top_intents":[],"last_matched_at":null},"maintenance":{"status":"active","updated_at":"2026-05-24T12:16:23.901Z","last_scraped_at":"2026-04-22T08:08:13.652Z","last_commit":null},"community":{"stars":null,"forks":null,"weekly_downloads":2937,"model_downloads":null,"model_likes":null}},"distribution":{"claim_url":"https://unfragile.ai/submit?claim=code-graph-llm","compare_url":"https://unfragile.ai/compare?artifact=code-graph-llm"}},"signature":"XEW55IbFAjPKz2g++0bJuIQ+u6FZyDTbQii6sOIqQb4/du4VfTDHyy1vI/gUQgeI8lvMqxjo5P9q4seN/gWbCQ==","signedAt":"2026-06-20T13:12:41.290Z","signedBy":"unfragile.ai","version":1},"_links":{"self":"https://unfragile.ai/api/v1/passport/code-graph-llm","artifact":"https://unfragile.ai/code-graph-llm","verify":"https://unfragile.ai/api/v1/verify?slug=code-graph-llm","publicKey":"https://unfragile.ai/api/v1/trust-passport-public-key","spec":"https://unfragile.ai/trust","schema":"https://unfragile.ai/schema.json","docs":"https://unfragile.ai/docs"}}