Found during the architecture audit (sub-agent review).
Finding (HIGH, XL)
Three crates are ~70% of all source (≈429k total): storage 127,371 LOC / api 89,257 / exec 84,065. Crate boundaries no longer reflect module structure; change blast radius and compile time concentrate there. Monolith files:
graphforge-rel/src/expr.rs — 18,350 lines (whole rel crate: 28,591 in 5 files)
graphforge-api/src/lib.rs — 20,534 lines
graphforge-storage/src/uuid_membership.rs — 10,965
graphforge-storage/src/graph_construction.rs — 10,912
graphforge-exec/src/algorithm_rank.rs — 10,407
graphforge-exec/src/lib.rs — 8,061
graphforge-storage/src/writer.rs — 8,910
Acceptance criteria
Architecture review decision
This is an epic, not a single implementation PR. File-size reduction follows settled crate boundaries; it must not run ahead of #1006, #1008, #1010, #1013, #1015, #1017, #1018, or #1021 and cause the same code to be moved twice.
The suggested 3,000-line figure is a review trigger, not an arbitrary universal hard limit. Create one child issue per file/domain extraction, with behavior-preserving commits and normal test gates. ADR exemptions should explain cohesion and reviewability, not merely file length.
Found during the architecture audit (sub-agent review).
Finding (HIGH, XL)
Three crates are ~70% of all source (≈429k total): storage 127,371 LOC / api 89,257 / exec 84,065. Crate boundaries no longer reflect module structure; change blast radius and compile time concentrate there. Monolith files:
graphforge-rel/src/expr.rs— 18,350 lines (whole rel crate: 28,591 in 5 files)graphforge-api/src/lib.rs— 20,534 linesgraphforge-storage/src/uuid_membership.rs— 10,965graphforge-storage/src/graph_construction.rs— 10,912graphforge-exec/src/algorithm_rank.rs— 10,407graphforge-exec/src/lib.rs— 8,061graphforge-storage/src/writer.rs— 8,910Acceptance criteria
crates/*/srcfile exceeds a stated bound (suggest 3,000 lines) without an ADR exemptionrel/expr.rsdecomposed along its existing internal sections (lowering, UDFs, scalar eval) with no behavior changeapi/lib.rsdecomposed into existing topic modules (search/knowledge/provenance already split out — continue the pattern)Architecture review decision
This is an epic, not a single implementation PR. File-size reduction follows settled crate boundaries; it must not run ahead of #1006, #1008, #1010, #1013, #1015, #1017, #1018, or #1021 and cause the same code to be moved twice.
The suggested 3,000-line figure is a review trigger, not an arbitrary universal hard limit. Create one child issue per file/domain extraction, with behavior-preserving commits and normal test gates. ADR exemptions should explain cohesion and reviewability, not merely file length.