Class: Aidp::FeatureAnalyzer

Inherits:
Object
  • Object
show all
Defined in:
lib/aidp/analyze/feature_analyzer.rb

Instance Method Summary collapse

Constructor Details

#initialize(project_dir = Dir.pwd) ⇒ FeatureAnalyzer

Returns a new instance of FeatureAnalyzer.



7
8
9
# File 'lib/aidp/analyze/feature_analyzer.rb', line 7

def initialize(project_dir = Dir.pwd)
  @project_dir = project_dir
end

Instance Method Details

#coordinate_feature_analysis(feature) ⇒ Object

Coordinate multi-agent analysis for a feature



41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# File 'lib/aidp/analyze/feature_analyzer.rb', line 41

def coordinate_feature_analysis(feature)
  agents = get_feature_agent_recommendations(feature)

  {
    feature: feature[:name],
    primary_analysis: {
      agent: agents[:primary_agent],
      focus_areas: get_agent_focus_areas(agents[:primary_agent]),
      output_files: generate_output_files(feature, agents[:primary_agent])
    },
    specialized_analyses: agents[:specialized_agents].map do |agent|
      {
        agent: agent,
        focus_areas: get_agent_focus_areas(agent),
        output_files: generate_output_files(feature, agent)
      }
    end,
    coordination_notes: generate_coordination_notes(feature, agents)
  }
end

#detect_featuresObject

Detect and categorize features in the codebase



12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/aidp/analyze/feature_analyzer.rb', line 12

def detect_features
  features = []

  # Scan directories for potential features
  scan_directories_for_features(features)

  # Scan files for feature indicators
  scan_files_for_features(features)

  # Analyze feature relationships
  analyze_feature_relationships(features)

  # Categorize features
  categorize_features(features)

  features
end

#get_feature_agent_recommendations(feature) ⇒ Object

Get feature-specific agent recommendations



31
32
33
34
35
36
37
38
# File 'lib/aidp/analyze/feature_analyzer.rb', line 31

def get_feature_agent_recommendations(feature)
  {
    feature: feature[:name],
    primary_agent: determine_primary_agent(feature),
    specialized_agents: determine_specialized_agents(feature),
    analysis_priority: determine_analysis_priority(feature)
  }
end