Implement unified Discoverer + Enhancer architecture

- Rename AutoEnhancer to Discoverer with clear element discovery focus
- Implement unified enhancement pipeline in Enhancer:
  * Phase 1: Element Discovery (configurable, respects existing insertr classes)
  * Phase 2: ID Generation via engine
  * Phase 3: Content Injection via engine
- Add EnhancementConfig and DiscoveryConfig for flexible configuration
- Update all method names and references (discoverNode, DiscoveryResult, etc.)
- Support both manual class insertion and automatic discovery
- Maintain single enhance command interface while providing unified internal pipeline
- Update all constructors to use new configuration-based approach

This establishes the clean Discoverer + Enhancer architecture discussed, with discovery as configurable first phase and enhancement as unified pipeline.
This commit is contained in:
2025-09-16 16:50:07 +02:00
parent d877366be0
commit 35855ac0f5
5 changed files with 217 additions and 93 deletions

View File

@@ -53,11 +53,11 @@ func runAutoEnhance(cmd *cobra.Command, args []string) error {
}
fmt.Printf("\n")
// Create auto enhancer
enhancer := content.NewAutoEnhancer()
// Create discoverer
discoverer := content.NewDiscoverer()
// Run auto enhancement
result, err := enhancer.EnhanceDirectory(inputDir, autoEnhanceOutput, autoEnhanceAggressive)
// Run element discovery
result, err := discoverer.DiscoverDirectory(inputDir, autoEnhanceOutput, autoEnhanceAggressive)
if err != nil {
return fmt.Errorf("auto-enhancement failed: %w", err)
}