Class: EnhanceSwarm::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/enhance_swarm/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



16
17
18
19
20
21
22
23
24
# File 'lib/enhance_swarm/configuration.rb', line 16

def initialize
  # Apply smart defaults from project analysis if no config exists
  if config_file_exists?
    apply_hardcoded_defaults
    load_from_file
  else
    apply_smart_defaults
  end
end

Instance Attribute Details

#code_standardsObject

Returns the value of attribute code_standards.



8
9
10
# File 'lib/enhance_swarm/configuration.rb', line 8

def code_standards
  @code_standards
end

#desktop_commander_enabledObject

Returns the value of attribute desktop_commander_enabled.



8
9
10
# File 'lib/enhance_swarm/configuration.rb', line 8

def desktop_commander_enabled
  @desktop_commander_enabled
end

#gemini_enabledObject

Returns the value of attribute gemini_enabled.



8
9
10
# File 'lib/enhance_swarm/configuration.rb', line 8

def gemini_enabled
  @gemini_enabled
end

#important_notesObject

Returns the value of attribute important_notes.



8
9
10
# File 'lib/enhance_swarm/configuration.rb', line 8

def important_notes
  @important_notes
end

#max_concurrent_agentsObject

Returns the value of attribute max_concurrent_agents.



8
9
10
# File 'lib/enhance_swarm/configuration.rb', line 8

def max_concurrent_agents
  @max_concurrent_agents
end

#max_disk_mbObject

Returns the value of attribute max_disk_mb.



8
9
10
# File 'lib/enhance_swarm/configuration.rb', line 8

def max_disk_mb
  @max_disk_mb
end

#max_memory_mbObject

Returns the value of attribute max_memory_mb.



8
9
10
# File 'lib/enhance_swarm/configuration.rb', line 8

def max_memory_mb
  @max_memory_mb
end

#mcp_toolsObject

Returns the value of attribute mcp_tools.



8
9
10
# File 'lib/enhance_swarm/configuration.rb', line 8

def mcp_tools
  @mcp_tools
end

#monitor_intervalObject

Returns the value of attribute monitor_interval.



8
9
10
# File 'lib/enhance_swarm/configuration.rb', line 8

def monitor_interval
  @monitor_interval
end

#monitor_timeoutObject

Returns the value of attribute monitor_timeout.



8
9
10
# File 'lib/enhance_swarm/configuration.rb', line 8

def monitor_timeout
  @monitor_timeout
end

#project_descriptionObject

Returns the value of attribute project_description.



8
9
10
# File 'lib/enhance_swarm/configuration.rb', line 8

def project_description
  @project_description
end

#project_nameObject

Returns the value of attribute project_name.



8
9
10
# File 'lib/enhance_swarm/configuration.rb', line 8

def project_name
  @project_name
end

#task_commandObject

Returns the value of attribute task_command.



8
9
10
# File 'lib/enhance_swarm/configuration.rb', line 8

def task_command
  @task_command
end

#task_move_commandObject

Returns the value of attribute task_move_command.



8
9
10
# File 'lib/enhance_swarm/configuration.rb', line 8

def task_move_command
  @task_move_command
end

#technology_stackObject

Returns the value of attribute technology_stack.



8
9
10
# File 'lib/enhance_swarm/configuration.rb', line 8

def technology_stack
  @technology_stack
end

#test_commandObject

Returns the value of attribute test_command.



8
9
10
# File 'lib/enhance_swarm/configuration.rb', line 8

def test_command
  @test_command
end

#worktree_enabledObject

Returns the value of attribute worktree_enabled.



8
9
10
# File 'lib/enhance_swarm/configuration.rb', line 8

def worktree_enabled
  @worktree_enabled
end

Instance Method Details

#save!Object



56
57
58
# File 'lib/enhance_swarm/configuration.rb', line 56

def save!
  File.write(config_file_path, Psych.dump(to_h))
end

#to_hObject



26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# File 'lib/enhance_swarm/configuration.rb', line 26

def to_h
  {
    project: {
      name: @project_name,
      description: @project_description,
      technology_stack: @technology_stack
    },
    commands: {
      test: @test_command,
      task: @task_command,
      task_move: @task_move_command
    },
    orchestration: {
      max_concurrent_agents: @max_concurrent_agents,
      monitor_interval: @monitor_interval,
      monitor_timeout: @monitor_timeout,
      worktree_enabled: @worktree_enabled
    },
    mcp: {
      tools: @mcp_tools,
      gemini_enabled: @gemini_enabled,
      desktop_commander_enabled: @desktop_commander_enabled
    },
    standards: {
      code: @code_standards,
      notes: @important_notes
    }
  }
end