pub fn build_module_graph(
project_root: &Path,
parsed_files: &[ProjectFile],
branch_id: &BranchId,
) -> ModuleGraphExpand description
Analyze parsed files to detect module structure and build a dependency graph.
§Arguments
project_root- The root directory of the project (used to compute relative paths).parsed_files- All parsedProjectFiles from the scanning pipeline.branch_id- The branch identifier for the knowledge graph nodes and edges.
§Returns
A ModuleGraph containing:
- Knowledge nodes (Fact nature, Info weight) for each detected module.
- DependsOn edges between modules based on import relationships.
- PartOf edges from submodules to their parent modules.