Architecture Engine: dependency/module/folder/call graphs + JSON export (v0.1.2)#9
Merged
Merged
Conversation
…rt (v0.1.2) No AI. Builds four graphs from AST data. ArchitectureModel in core with a generic typed Graph; pure deterministic builders in devpilot-core::architecture for folder (containment), dependency (file imports), module (directory-level) and call (function) graphs. Import and call resolution are documented name-based heuristics. AnalyzeArchitecture use case parses every supported file and builds the model, skipping bad files. The AST analyzer now captures per-function call sites. Exposed as analyze_architecture and export_architecture (JSON to disk) commands via DI with a typed lib/ipc/architecture layer. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Architecture Engine — builds four graphs from AST data and exports them as JSON. No AI.
ArchitectureModelin core over a generic typedGraph(GraphNode/GraphEdgewithNodeKind/EdgeKind):devpilot-core::architecture. Import resolution matches an import's final segment (after/or::) to a source file's stem; call resolution matches by name, preferring the same file then a unique repo-wide match. Both heuristics are documented; unresolved imports becomeExternalnodes, ambiguous calls are dropped.FunctionDef.calls) for Rust and TS/JS.AnalyzeArchitectureparses every supported file in the repo and builds the model; unreadable/unparsable files are skipped.analyze_architecture(returns the model) andexport_architecture(writes pretty JSON to a path) via DI; typedlib/ipc/architecture.ts.Verification
cargo fmt --check,clippy -D warnings, fullcargo test --workspace: clean.AnalyzeArchitectureuse-case test over mocks.cargo build -p devpilot-desktopandpnpm build(tsc strict): clean.Scope per plan: graphs in core, one PR, backend + JSON export, no graph-visualization UI (that can follow).
🤖 Generated with Claude Code