# Execution Plan for Extended Analysis ## Phase 0: Surgical Refactoring (The Enrichment Hook) - [ ] Create `AnalysisResult` and `CodebaseMetadata` models. - [ ] Update `ExportService.generateOutputs` to accept `AnalysisResult`. - [ ] Implement `EnrichmentService` and `AnalysisEnricher` interface. - [ ] Wrap current parser outputs in `AnalysisResult` within `ExportService`. ## Phase 1: Foundation - [ ] Implement `JdtIntelligenceProvider` as the primary semantic analyzer. - [ ] Implement `RegexIntelligenceProvider` for fast, lightweight metadata extraction. ... ## Phase 2: Direct Trigger Detection - [ ] Implement `GenericEventDetector` using `ASTVisitor` to find `sendEvent` calls. - [ ] Enhance `CodebaseContext` to provide mapping from `MethodDeclaration` to its callers (within the same codebase). ## Phase 3: Entry Point Mapping - [ ] Implement `SpringMvcDetector` for REST endpoints. - [ ] Implement `MessageListenerDetector` for Kafka/JMS. - [ ] Implement `ConfigurableTriggerDetector` for user-defined patterns. ## Phase 4: Call Graph Integration - [ ] Develop a simple call graph builder to link `Entry Points` to `Trigger Points` via intermediate service calls. - [ ] Support inheritance in call graph resolution (e.g., calling a method defined in an interface/base class). ## Phase 5: Correlation and Visualization - [ ] Update `ExportService` to include trigger information. - [ ] Update DOT exporter to show "external" entry points as boxes pointing to transitions. - [ ] Update SCXML exporter to include trigger metadata in `` tags. ## Phase 6: Validation - [ ] Create a "Complex Sample Project" with REST controllers, services, and multiple state machines. - [ ] Add unit tests for each detector and the aggregator. - [ ] Verify that inheritance in both state machine config and controllers is correctly handled. ## Phase 7: Advanced Value Resolution - [ ] Implement `PropertyResolver` to scan `application.properties/yml`. - [ ] Add support for `@Value` tracking in fields and constructors. - [ ] Implement constant resolution for cross-class references in annotations. - [ ] Integrate value propagation into the call graph analysis (linking injected values to `sendEvent` arguments).