refactor: split AnalyzeProject into pipeline components

Split 615-line God Use-Case into focused pipeline components:
- FileCollectionStep.ts (66 lines) - file scanning and basic parsing
- ParsingStep.ts (51 lines) - AST parsing and dependency graph
- DetectionPipeline.ts (371 lines) - all 7 detectors
- ResultAggregator.ts (81 lines) - response DTO builder

Reduced AnalyzeProject.ts from 615 to 245 lines (60% reduction).

All 345 tests pass, no breaking changes.
Improved separation of concerns and testability.

Closes #0.7.5 roadmap task.
This commit is contained in:
imfozilbek
2025-11-25 16:07:20 +05:00
parent 2479bde9a8
commit 8a2c6fdc0e
7 changed files with 635 additions and 420 deletions

View File

@@ -5,7 +5,20 @@ All notable changes to @samiyev/guardian will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [0.7.5-beta.1] - 2025-11-25
## [0.7.5] - 2025-11-25
### Changed
- ♻️ **Refactored AnalyzeProject use-case** - improved maintainability and testability:
- Split 615-line God Use-Case into focused pipeline components
- Created `FileCollectionStep.ts` for file scanning and basic parsing (66 lines)
- Created `ParsingStep.ts` for AST parsing and dependency graph construction (51 lines)
- Created `DetectionPipeline.ts` for running all 7 detectors (371 lines)
- Created `ResultAggregator.ts` for building response DTO (81 lines)
- Reduced `AnalyzeProject.ts` from 615 to 245 lines (60% reduction)
- All 345 tests pass, no breaking changes
- Improved separation of concerns and single responsibility
- Easier to test and modify individual pipeline steps
### Added