diff --git a/AGENTS.md b/AGENTS.md index 9293822..86e9880 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -202,3 +202,25 @@ g3/ - [Control Commands](docs/CONTROL_COMMANDS.md) - Interactive commands - [Code Search](docs/CODE_SEARCH.md) - Tree-sitter search guide - [Flock Mode](docs/FLOCK_MODE.md) - Multi-agent development + +## Dependency Analysis Artifacts + +The `analysis/deps/` directory contains static analysis artifacts generated by the Euler agent: + +| File | Purpose | +|------|--------| +| `graph.json` | Raw dependency graph data (crate and file-level edges with evidence) | +| `graph.summary.md` | Overview metrics: crate counts, edge counts, fan-in/fan-out rankings | +| `sccs.md` | Strongly Connected Components analysis (cycle detection via Tarjan's algorithm) | +| `layers.observed.md` | Mechanically-derived layer diagram showing crate hierarchy and intra-crate module structure | +| `hotspots.md` | Coupling hotspots: files/crates with disproportionate fan-in or fan-out (>2× average) | +| `limitations.md` | Known limitations of the static analysis (conditional compilation, macros, re-exports) | + +**Key findings:** +- No cycles detected at crate or file level (strict DAG structure) +- `g3-config` and `g3-providers` are the most depended-upon crates (fan-in: 4) +- `g3-cli` has highest fan-out (5 crate dependencies) as the composition root +- `ui_writer.rs` is the most imported file (11 dependents) +- `g3-core/src/lib.rs` has highest fan-out (25 module declarations) + +These artifacts are useful for understanding coupling, planning refactors, and identifying architectural boundaries.