chore(analysis): update dependency analysis artifacts
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
This commit is contained in:
@@ -1,33 +1,30 @@
|
||||
# G3 Dependency Graph Summary
|
||||
# Dependency Graph Summary
|
||||
|
||||
## Overview
|
||||
|
||||
| Metric | Value |
|
||||
|--------|-------|
|
||||
| Total Crates | 10 |
|
||||
| Internal Dependency Edges | 16 |
|
||||
| Total Source Files | 76 |
|
||||
| Leaf Crates (no internal dependents) | 4 |
|
||||
| Root Crates (no internal dependencies except leaves) | 2 |
|
||||
| Total Source Files | 139 |
|
||||
| Crate-Level Dependency Edges | 16 |
|
||||
| File-Level Dependency Edges | 72 |
|
||||
|
||||
## Crate Inventory
|
||||
|
||||
| Crate | Type | Path | Files |
|
||||
|-------|------|------|-------|
|
||||
| g3 | binary | . | 1 |
|
||||
| g3-cli | library | crates/g3-cli | 8 |
|
||||
| g3-core | library | crates/g3-core | 27 |
|
||||
| g3-providers | library | crates/g3-providers | 6 |
|
||||
| g3-config | library | crates/g3-config | 1 |
|
||||
| g3-execution | library | crates/g3-execution | 1 |
|
||||
| g3-computer-control | library | crates/g3-computer-control | 14 |
|
||||
| g3-console | library+binary | crates/g3-console | 15 |
|
||||
| g3-ensembles | library | crates/g3-ensembles | 3 |
|
||||
| g3-planner | library | crates/g3-planner | 8 |
|
||||
| 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 |
|
||||
|
||||
## Dependency Structure
|
||||
|
||||
### Internal Crate Dependencies (16 edges)
|
||||
## Crate Dependency Structure
|
||||
|
||||
```
|
||||
g3 (root binary)
|
||||
@@ -47,27 +44,24 @@ g3 (root binary)
|
||||
│ ├── g3-core
|
||||
│ └── g3-config
|
||||
└── g3-providers
|
||||
|
||||
g3-console (standalone binary)
|
||||
(no internal dependencies - uses g3 via process spawning)
|
||||
```
|
||||
|
||||
### Fan-In (Dependents Count)
|
||||
## Fan-In Analysis (Crates Depended Upon)
|
||||
|
||||
| Crate | Fan-In | Dependents |
|
||||
|-------|--------|------------|
|
||||
| g3-config | 5 | g3-cli, g3-core, g3-ensembles, g3-planner |
|
||||
| g3-core | 4 | g3-cli, g3-ensembles, g3-planner |
|
||||
| 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-ensembles | 1 | g3-cli |
|
||||
| g3-planner | 1 | g3-cli |
|
||||
| g3 | 0 | (root) |
|
||||
| g3-console | 0 | (standalone) |
|
||||
| g3 | 0 | (root) |
|
||||
|
||||
### Fan-Out (Dependencies Count)
|
||||
## Fan-Out Analysis (Crates Depending On Others)
|
||||
|
||||
| Crate | Fan-Out | Dependencies |
|
||||
|-------|---------|-------------|
|
||||
@@ -77,30 +71,44 @@ g3-console (standalone binary)
|
||||
| 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-providers | 0 | (leaf) |
|
||||
| g3-console | 0 | (standalone) |
|
||||
|
||||
## Entrypoints
|
||||
|
||||
1. **g3** (main binary) - `src/main.rs` delegates to `g3-cli`
|
||||
2. **g3-console** (standalone binary) - `crates/g3-console/src/main.rs`
|
||||
| Binary | Entry File |
|
||||
|--------|------------|
|
||||
| g3 | src/main.rs |
|
||||
| g3-console | crates/g3-console/src/main.rs |
|
||||
|
||||
## Layering (Observed)
|
||||
## High Fan-In Files (Within Crates)
|
||||
|
||||
```
|
||||
Layer 4 (Entry): g3, g3-console
|
||||
Layer 3 (CLI/UI): g3-cli
|
||||
Layer 2 (Features): g3-ensembles, g3-planner
|
||||
Layer 1 (Core): g3-core
|
||||
Layer 0 (Foundation): g3-config, g3-providers, g3-execution, g3-computer-control
|
||||
```
|
||||
| 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
|
||||
|
||||
- Graph derived from Cargo.toml `[dependencies]` sections only
|
||||
- File-level dependencies inferred from `use` statements (not fully traced)
|
||||
- Conditional compilation (`#[cfg(...)]`) dependencies not distinguished
|
||||
- Test dependencies excluded from analysis
|
||||
- Dynamic/runtime dependencies not captured
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user