Authored by: Structural Analysis Agent (Euler) Updated all dependency analysis artifacts with fresh extraction: - graph.json: Canonical dependency graph with 10 crates, 139 files, 16 crate edges, 72 file edges - graph.summary.md: Overview with fan-in/fan-out rankings and crate inventory - sccs.md: SCC analysis confirming no cycles at crate or file level (clean DAG) - layers.observed.md: 5-layer architecture diagram derived from dependencies - hotspots.md: Coupling hotspots (g3-config highest fan-in, g3-cli highest fan-out) - limitations.md: Documented extraction limitations (conditional compilation, macros, etc.) Key findings: - All 10 workspace crates form a directed acyclic graph - g3-core/src/ui_writer.rs has highest file-level fan-in (10 dependents) - g3-console is standalone with no workspace dependencies - Clean layered architecture with no violations detected
115 lines
3.7 KiB
Markdown
115 lines
3.7 KiB
Markdown
# Dependency Graph Summary
|
|
|
|
## Overview
|
|
|
|
| Metric | Value |
|
|
|--------|-------|
|
|
| Total Crates | 10 |
|
|
| Total Source Files | 139 |
|
|
| Crate-Level Dependency Edges | 16 |
|
|
| File-Level Dependency Edges | 72 |
|
|
|
|
## Crate Inventory
|
|
|
|
| Crate | Type | File Count | Path |
|
|
|-------|------|------------|------|
|
|
| g3 | binary | 2 | . |
|
|
| g3-cli | library | 11 | crates/g3-cli |
|
|
| g3-core | library | 55 | crates/g3-core |
|
|
| g3-config | library | 3 | crates/g3-config |
|
|
| g3-providers | library | 9 | crates/g3-providers |
|
|
| g3-planner | library | 12 | crates/g3-planner |
|
|
| g3-execution | library | 2 | crates/g3-execution |
|
|
| g3-computer-control | library | 28 | crates/g3-computer-control |
|
|
| g3-console | binary+library | 18 | crates/g3-console |
|
|
| g3-ensembles | library | 5 | crates/g3-ensembles |
|
|
|
|
## Crate Dependency Structure
|
|
|
|
```
|
|
g3 (root binary)
|
|
├── g3-cli
|
|
│ ├── g3-core
|
|
│ │ ├── g3-providers
|
|
│ │ ├── g3-config
|
|
│ │ ├── g3-execution
|
|
│ │ └── g3-computer-control
|
|
│ ├── g3-config
|
|
│ ├── g3-planner
|
|
│ │ ├── g3-providers
|
|
│ │ ├── g3-core
|
|
│ │ └── g3-config
|
|
│ ├── g3-providers
|
|
│ └── g3-ensembles
|
|
│ ├── g3-core
|
|
│ └── g3-config
|
|
└── g3-providers
|
|
```
|
|
|
|
## Fan-In Analysis (Crates Depended Upon)
|
|
|
|
| Crate | Fan-In | Dependents |
|
|
|-------|--------|------------|
|
|
| g3-config | 5 | g3-cli, g3-core, g3-planner, g3-ensembles |
|
|
| g3-providers | 4 | g3, g3-cli, g3-core, g3-planner |
|
|
| g3-core | 3 | g3-cli, g3-planner, g3-ensembles |
|
|
| g3-cli | 1 | g3 |
|
|
| g3-planner | 1 | g3-cli |
|
|
| g3-ensembles | 1 | g3-cli |
|
|
| g3-execution | 1 | g3-core |
|
|
| g3-computer-control | 1 | g3-core |
|
|
| g3-console | 0 | (standalone) |
|
|
| g3 | 0 | (root) |
|
|
|
|
## Fan-Out Analysis (Crates Depending On Others)
|
|
|
|
| Crate | Fan-Out | Dependencies |
|
|
|-------|---------|-------------|
|
|
| g3-cli | 5 | g3-core, g3-config, g3-planner, g3-providers, g3-ensembles |
|
|
| g3-core | 4 | g3-providers, g3-config, g3-execution, g3-computer-control |
|
|
| g3-planner | 3 | g3-providers, g3-core, g3-config |
|
|
| g3-ensembles | 2 | g3-core, g3-config |
|
|
| g3 | 2 | g3-cli, g3-providers |
|
|
| g3-config | 0 | (leaf) |
|
|
| g3-providers | 0 | (leaf) |
|
|
| g3-execution | 0 | (leaf) |
|
|
| g3-computer-control | 0 | (leaf) |
|
|
| g3-console | 0 | (standalone) |
|
|
|
|
## Entrypoints
|
|
|
|
| Binary | Entry File |
|
|
|--------|------------|
|
|
| g3 | src/main.rs |
|
|
| g3-console | crates/g3-console/src/main.rs |
|
|
|
|
## High Fan-In Files (Within Crates)
|
|
|
|
| File | Fan-In | Role |
|
|
|------|--------|------|
|
|
| g3-core/src/ui_writer.rs | 10 | UI abstraction trait |
|
|
| g3-core/src/lib.rs | 8 | Core agent types (Agent, ToolCall, etc.) |
|
|
| g3-providers/src/lib.rs | 7 | Provider types (Message, MessageRole, etc.) |
|
|
| g3-config/src/lib.rs | 5 | Configuration (Config) |
|
|
| g3-core/src/utils.rs | 2 | Utility functions |
|
|
| g3-core/src/paths.rs | 2 | Path utilities |
|
|
| g3-core/src/webdriver_session.rs | 2 | WebDriver session management |
|
|
| g3-computer-control/src/types.rs | 5 | Type definitions |
|
|
| g3-console/src/models/mod.rs | 5 | Data models |
|
|
|
|
## Leaf Crates (No Internal Dependencies)
|
|
|
|
- g3-config
|
|
- g3-providers
|
|
- g3-execution
|
|
- g3-computer-control
|
|
- g3-console
|
|
|
|
## Extraction Limitations
|
|
|
|
1. **Dynamic imports**: Conditional compilation (`#[cfg(...)]`) may hide platform-specific dependencies
|
|
2. **Macro-generated imports**: Imports generated by macros are not captured
|
|
3. **Re-exports**: Transitive re-exports through `pub use` are not fully traced
|
|
4. **Test dependencies**: Test-only dependencies (dev-dependencies) are included but not distinguished in file-level analysis
|
|
5. **Build scripts**: build.rs dependencies are not analyzed for import relationships
|