Update dependency analysis artifacts

Generated comprehensive static dependency analysis for g3 workspace:

- graph.json: 108 nodes (9 crates, 99 files), 186 edges
- graph.summary.md: Overview with metrics, entrypoints, fan-in/fan-out rankings
- sccs.md: No cycles detected (DAG structure confirmed)
- layers.observed.md: 4-layer crate hierarchy identified
- hotspots.md: ui_writer.rs (15 fan-in), agent_mode.rs (13 fan-out) as key nodes
- limitations.md: Documents extraction methodology and caveats

Updated AGENTS.md with artifact documentation table.

Agent: euler
This commit is contained in:
Dhanji R. Prasanna
2026-01-29 11:46:39 +11:00
parent cba7d31996
commit 853237e62e
7 changed files with 2234 additions and 2146 deletions

View File

@@ -2,92 +2,85 @@
## Overview
| Metric | Count |
| Metric | Value |
|--------|-------|
| Workspace crates | 10 |
| Crate-level edges | 17 |
| Source files (non-test) | 95 |
| File-level edges | 123 |
| Cross-crate imports | 43 |
| Strongly connected components | 0 |
| Total nodes | 108 |
| Total edges | 186 |
| Crate nodes | 9 |
| File nodes | 99 |
| Crate-level edges | 14 |
| File-level edges | 172 |
## Crate-Level Structure
## Crate Structure
### Crates by Type
| Crate | Type | Files |
|-------|------|-------|
| g3 | bin (root) | 1 |
| g3-cli | lib | 16 |
| g3-core | lib | 38 |
| g3-providers | lib | 7 |
| g3-config | lib | 2 |
| g3-execution | lib | 1 |
| g3-computer-control | lib | 16 |
| g3-planner | lib | 8 |
| g3-ensembles | lib | 4 |
| studio | bin | 3 |
### Fan-In (Most Depended Upon)
| Crate | Dependents |
|-------|------------|
| g3-config | 4 |
| g3-providers | 4 |
| g3-core | 3 |
| g3-computer-control | 2 |
| g3-cli | 1 |
| g3-ensembles | 1 |
| g3-execution | 1 |
| g3-planner | 1 |
### Fan-Out (Most Dependencies)
| Crate | Dependencies |
|-------|-------------|
| g3-cli | 6 |
| g3-core | 4 |
| g3-planner | 3 |
| g3 | 2 |
| g3-ensembles | 2 |
## File-Level Structure
### Top Fan-Out Files (Most Outgoing Edges)
| File | Edges | Description |
|------|-------|-------------|
| crates/g3-core/src/lib.rs | 29 | Core library root |
| crates/g3-cli/src/lib.rs | 17 | CLI library root |
| crates/g3-core/src/tools/mod.rs | 9 | Tools module root |
| crates/g3-planner/src/lib.rs | 8 | Planner library root |
| crates/g3-providers/src/lib.rs | 6 | Providers library root |
| crates/g3-computer-control/src/lib.rs | 5 | Computer control root |
| crates/g3-planner/src/llm.rs | 5 | LLM integration |
### Top Fan-In (Most Imported)
| Target | Imports |
|--------|--------|
| g3-core (crate) | 21 |
| g3-providers (crate) | 11 |
| g3-config (crate) | 9 |
| g3-computer-control (crate) | 2 |
| Crate | Path | Direct Dependencies |
|-------|------|---------------------|
| g3 | `.` | g3-cli, g3-providers |
| g3-cli | `crates/g3-cli` | g3-core, g3-config, g3-planner, g3-computer-control, g3-providers |
| g3-core | `crates/g3-core` | g3-providers, g3-config, g3-execution, g3-computer-control |
| g3-providers | `crates/g3-providers` | (none) |
| g3-config | `crates/g3-config` | (none) |
| g3-execution | `crates/g3-execution` | (none) |
| g3-planner | `crates/g3-planner` | g3-providers, g3-core, g3-config |
| g3-computer-control | `crates/g3-computer-control` | (none) |
| studio | `crates/studio` | (none) |
## Entrypoints
| File | Type |
|------|------|
| src/main.rs | Binary entrypoint (g3) |
| crates/studio/src/main.rs | Binary entrypoint (studio) |
| crates/g3-cli/src/lib.rs | Library root |
| crates/g3-core/src/lib.rs | Library root |
| Type | Location | Evidence |
|------|----------|----------|
| Binary | `crates/g3-cli/src/lib.rs` | `run()` function, CLI dispatch |
| Binary | `crates/studio/src/main.rs` | `main()` function |
| Library | `crates/g3-core/src/lib.rs` | `Agent` struct, core API |
## Top Fan-In Nodes (Most Depended Upon)
| Node | Fan-In | Type |
|------|--------|------|
| crate:g3-core | 35 | crate |
| crate:g3-providers | 19 | crate |
| file:crates/g3-core/src/ui_writer.rs | 15 | file |
| crate:g3-config | 13 | crate |
| file:crates/g3-cli/src/g3_status.rs | 10 | file |
| file:crates/g3-cli/src/simple_output.rs | 8 | file |
| file:crates/g3-core/src/context_window.rs | 6 | file |
| file:crates/g3-cli/src/template.rs | 6 | file |
| file:crates/g3-core/src/paths.rs | 5 | file |
| crate:g3-computer-control | 4 | crate |
## Top Fan-Out Nodes (Most Dependencies)
| Node | Fan-Out | Type |
|------|---------|------|
| file:crates/g3-cli/src/agent_mode.rs | 13 | file |
| file:crates/g3-core/src/lib.rs | 13 | file |
| file:crates/g3-cli/src/commands.rs | 12 | file |
| file:crates/g3-cli/src/interactive.rs | 12 | file |
| file:crates/g3-cli/src/accumulative.rs | 11 | file |
| file:crates/g3-planner/src/planner.rs | 8 | file |
| file:crates/g3-cli/src/autonomous.rs | 8 | file |
| file:crates/g3-core/src/tools/acd.rs | 7 | file |
| file:crates/g3-planner/src/llm.rs | 6 | file |
| file:crates/g3-cli/src/utils.rs | 5 | file |
## File Counts by Crate
| Crate | Source Files |
|-------|-------------|
| g3-cli | 23 |
| g3-core | 42 |
| g3-providers | 9 |
| g3-config | 2 |
| g3-execution | 1 |
| g3-planner | 8 |
| g3-computer-control | 11 |
| studio | 3 |
## Extraction Limitations
- Only `use` and `mod` statements at line start are parsed
- Conditional compilation (`#[cfg(...)]`) not evaluated
- Macro-generated imports not detected
- Re-exports through `pub use` not fully traced
- Test modules (`mod tests`) excluded from graph
- Test files (`*_test.rs`, `tests/`) excluded from graph
1. **Static analysis only**: Dynamic dispatch and trait objects not traced
2. **Use statement parsing**: Only `use g3_*` and `use crate::` patterns captured
3. **Conditional compilation**: `#[cfg(...)]` blocks not evaluated
4. **Re-exports**: `pub use` chains not fully resolved
5. **Test files excluded**: Files in `/tests/` directories not included
6. **Examples excluded**: Files in `/examples/` directories not included