Commit ec4225d
committed
add: spec 170 - module facade detection and scoring adjustment
Implements AST-based detection of Rust module facades to fix critical
false positive issue where well-organized files with submodules are
incorrectly flagged as god objects requiring urgent splitting.
Key features:
- Parse #[path = "..."] attributes to detect external submodules
- Calculate facade score (0.0-1.0) based on declaration ratio
- Adjust god object scores: 90% reduction for excellent facades
- Generate facade-aware recommendations with organization quality
Impact:
- Fixes Issue #1 from Prodigy analysis (executor.rs: 69.4 → 6.9)
- Eliminates false positives on well-structured codebases
- Maintains accuracy on genuinely monolithic files
Implementation approach:
- ModuleFacadeInfo data structure with organization quality
- detect_module_facade() for AST analysis
- adjust_score_for_facade() for scoring adjustment
- Enhanced recommendations with submodule breakdown
Estimated effort: 46 hours across 4 phases
Expected ROI: High - fixes #1 false positive, restores tool credibility1 parent 0fd8ecf commit ec4225d
1 file changed
+936
-0
lines changed
0 commit comments