enhance_swarm 2.0.0 ā 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.claude/CLAUDE.md +164 -0
- data/.claude/MCP.md +117 -0
- data/.claude/PERSONAS.md +114 -0
- data/.claude/RULES.md +221 -0
- data/.enhance_swarm/logs/general_output.log +0 -404
- data/.enhance_swarm.yml +33 -0
- data/CHANGELOG.md +71 -0
- data/README.md +128 -3
- data/lib/enhance_swarm/agent_spawner.rb +205 -12
- data/lib/enhance_swarm/cli.rb +129 -1
- data/lib/enhance_swarm/task_coordinator.rb +363 -86
- data/lib/enhance_swarm/version.rb +1 -1
- metadata +13 -97
- data/PRODUCTION_TEST_LOG.md +0 -502
- data/debug_agent_spawner.rb +0 -99
- data/debug_cli_spawn.rb +0 -95
- data/debug_fixes.rb +0 -209
- data/debug_script_execution.rb +0 -124
- data/debug_session_issue.rb +0 -87
- data/debug_spawn.rb +0 -113
- data/debug_spawn_step_by_step.rb +0 -190
- data/debug_worktree.rb +0 -77
- data/enhance_swarm-0.1.1.gem +0 -0
- data/enhance_swarm-1.0.0.gem +0 -0
- data/final_validation_test.rb +0 -199
- data/setup.sh +0 -86
- data/test_blog_app/.enhance_swarm/archives/session_1751187575_e119ea73_20250629_105935.json +0 -16
- data/test_blog_app/.enhance_swarm/archives/session_1751187637_7fda97dd_20250629_110037.json +0 -32
- data/test_blog_app/.enhance_swarm/archives/session_1751190527_4c99147e_20250629_114847.json +0 -32
- data/test_blog_app/.enhance_swarm/archives/session_1751190541_8dc83406_20250629_114901.json +0 -16
- data/test_blog_app/.ruby-version +0 -1
- data/test_blog_app/Gemfile +0 -18
- data/test_blog_app/Gemfile.lock +0 -206
- data/test_blog_app/README.md +0 -24
- data/test_blog_app/Rakefile +0 -6
- data/test_blog_app/app/assets/images/.keep +0 -0
- data/test_blog_app/app/assets/stylesheets/application.css +0 -10
- data/test_blog_app/app/controllers/application_controller.rb +0 -4
- data/test_blog_app/app/controllers/concerns/.keep +0 -0
- data/test_blog_app/app/helpers/application_helper.rb +0 -2
- data/test_blog_app/app/models/application_record.rb +0 -3
- data/test_blog_app/app/models/concerns/.keep +0 -0
- data/test_blog_app/app/views/layouts/application.html.erb +0 -27
- data/test_blog_app/app/views/pwa/manifest.json.erb +0 -22
- data/test_blog_app/app/views/pwa/service-worker.js +0 -26
- data/test_blog_app/bin/dev +0 -2
- data/test_blog_app/bin/rails +0 -4
- data/test_blog_app/bin/rake +0 -4
- data/test_blog_app/bin/setup +0 -34
- data/test_blog_app/config/application.rb +0 -42
- data/test_blog_app/config/boot.rb +0 -3
- data/test_blog_app/config/credentials.yml.enc +0 -1
- data/test_blog_app/config/database.yml +0 -32
- data/test_blog_app/config/environment.rb +0 -5
- data/test_blog_app/config/environments/development.rb +0 -51
- data/test_blog_app/config/environments/production.rb +0 -67
- data/test_blog_app/config/environments/test.rb +0 -42
- data/test_blog_app/config/initializers/assets.rb +0 -7
- data/test_blog_app/config/initializers/content_security_policy.rb +0 -25
- data/test_blog_app/config/initializers/filter_parameter_logging.rb +0 -8
- data/test_blog_app/config/initializers/inflections.rb +0 -16
- data/test_blog_app/config/locales/en.yml +0 -31
- data/test_blog_app/config/master.key +0 -1
- data/test_blog_app/config/puma.rb +0 -38
- data/test_blog_app/config/routes.rb +0 -14
- data/test_blog_app/config.ru +0 -6
- data/test_blog_app/db/seeds.rb +0 -9
- data/test_blog_app/lib/tasks/.keep +0 -0
- data/test_blog_app/log/.keep +0 -0
- data/test_blog_app/public/400.html +0 -114
- data/test_blog_app/public/404.html +0 -114
- data/test_blog_app/public/406-unsupported-browser.html +0 -114
- data/test_blog_app/public/422.html +0 -114
- data/test_blog_app/public/500.html +0 -114
- data/test_blog_app/public/icon.png +0 -0
- data/test_blog_app/public/icon.svg +0 -3
- data/test_blog_app/public/robots.txt +0 -1
- data/test_blog_app/script/.keep +0 -0
- data/test_blog_app/storage/.keep +0 -0
- data/test_blog_app/test/controllers/.keep +0 -0
- data/test_blog_app/test/fixtures/files/.keep +0 -0
- data/test_blog_app/test/helpers/.keep +0 -0
- data/test_blog_app/test/integration/.keep +0 -0
- data/test_blog_app/test/models/.keep +0 -0
- data/test_blog_app/test/test_helper.rb +0 -15
- data/test_blog_app/test_enhance_swarm_e2e.rb +0 -244
- data/test_blog_app/test_realistic_workflow.rb +0 -292
- data/test_blog_app/tmp/.keep +0 -0
- data/test_blog_app/tmp/pids/.keep +0 -0
- data/test_blog_app/tmp/storage/.keep +0 -0
- data/test_blog_app/vendor/.keep +0 -0
- data/test_builtin_functionality.rb +0 -121
- data/test_complete_system.rb +0 -267
- data/test_core_components.rb +0 -156
- data/test_real_claude_integration.rb +0 -285
- data/test_security.rb +0 -150
- data/test_smart_defaults.rb +0 -155
- data/test_task_integration.rb +0 -173
- data/test_web_ui.rb +0 -245
- data/web/assets/css/main.css +0 -645
- data/web/assets/js/kanban.js +0 -499
- data/web/assets/js/main.js +0 -525
- data/web/templates/dashboard.html.erb +0 -226
- data/web/templates/kanban.html.erb +0 -193
data/debug_spawn.rb
DELETED
@@ -1,113 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# Debug script to test agent spawning
|
3
|
-
|
4
|
-
$LOAD_PATH.unshift File.expand_path('lib', __dir__)
|
5
|
-
require 'enhance_swarm'
|
6
|
-
|
7
|
-
def test_agent_spawning
|
8
|
-
puts "š Testing Agent Spawning Debug"
|
9
|
-
puts "=" * 50
|
10
|
-
|
11
|
-
begin
|
12
|
-
spawner = EnhanceSwarm::AgentSpawner.new
|
13
|
-
|
14
|
-
# Test Claude CLI availability
|
15
|
-
puts "\n1ļøā£ Testing Claude CLI..."
|
16
|
-
available = spawner.claude_cli_available?
|
17
|
-
puts " š Claude CLI available: #{available}"
|
18
|
-
|
19
|
-
if available
|
20
|
-
version = `claude --version 2>/dev/null`.strip
|
21
|
-
puts " š Claude version: #{version}"
|
22
|
-
end
|
23
|
-
|
24
|
-
# Test session manager
|
25
|
-
puts "\n2ļøā£ Testing Session Manager..."
|
26
|
-
session_manager = EnhanceSwarm::SessionManager.new
|
27
|
-
session = session_manager.create_session("Debug test session")
|
28
|
-
puts " š Session created: #{session[:session_id]}"
|
29
|
-
|
30
|
-
# Test enhanced prompt building
|
31
|
-
puts "\n3ļøā£ Testing Enhanced Prompt Building..."
|
32
|
-
prompt = spawner.send(:build_enhanced_agent_prompt,
|
33
|
-
"Test task for debugging",
|
34
|
-
"backend",
|
35
|
-
Dir.pwd)
|
36
|
-
puts " š Prompt length: #{prompt.length} characters"
|
37
|
-
puts " š Contains role: #{prompt.include?('BACKEND')}"
|
38
|
-
|
39
|
-
# Test script creation
|
40
|
-
puts "\n4ļøā£ Testing Agent Script Creation..."
|
41
|
-
script_path = spawner.send(:create_agent_script,
|
42
|
-
"Test prompt for script creation",
|
43
|
-
"backend",
|
44
|
-
Dir.pwd)
|
45
|
-
puts " š Script created: #{File.exist?(script_path)}"
|
46
|
-
puts " š Script executable: #{File.executable?(script_path)}"
|
47
|
-
|
48
|
-
if File.exist?(script_path)
|
49
|
-
script_content = File.read(script_path)
|
50
|
-
puts " š Script length: #{script_content.length} characters"
|
51
|
-
puts " š Contains claude command: #{script_content.include?('claude')}"
|
52
|
-
end
|
53
|
-
|
54
|
-
# Test the full spawn_agent method
|
55
|
-
puts "\n5ļøā£ Testing Full Agent Spawn..."
|
56
|
-
puts " š Attempting to spawn agent..."
|
57
|
-
|
58
|
-
result = spawner.spawn_agent(
|
59
|
-
role: "backend",
|
60
|
-
task: "Create a simple test file with hello world",
|
61
|
-
worktree: true
|
62
|
-
)
|
63
|
-
|
64
|
-
if result
|
65
|
-
puts " ā
Agent spawned successfully!"
|
66
|
-
puts " š PID: #{result[:pid]}"
|
67
|
-
puts " š Role: #{result[:role]}"
|
68
|
-
puts " š Worktree: #{result[:worktree_path]}"
|
69
|
-
|
70
|
-
# Check if the process is actually running
|
71
|
-
begin
|
72
|
-
if result[:pid]
|
73
|
-
running = Process.getpgid(result[:pid])
|
74
|
-
puts " š Process running: #{running ? 'Yes' : 'No'}"
|
75
|
-
end
|
76
|
-
rescue Errno::ESRCH
|
77
|
-
puts " š Process running: No (not found)"
|
78
|
-
end
|
79
|
-
|
80
|
-
# Wait a moment and check logs
|
81
|
-
sleep(3)
|
82
|
-
|
83
|
-
# Check log files
|
84
|
-
puts "\n6ļøā£ Checking Log Files..."
|
85
|
-
log_dir = '.enhance_swarm/logs'
|
86
|
-
if Dir.exist?(log_dir)
|
87
|
-
log_files = Dir.entries(log_dir).reject { |f| f.start_with?('.') }
|
88
|
-
log_files.each do |log_file|
|
89
|
-
log_path = File.join(log_dir, log_file)
|
90
|
-
content = File.read(log_path) rescue ""
|
91
|
-
puts " š #{log_file}: #{content.length} characters"
|
92
|
-
if content.length > 0
|
93
|
-
puts " Preview: #{content[0..100]}..."
|
94
|
-
end
|
95
|
-
end
|
96
|
-
end
|
97
|
-
else
|
98
|
-
puts " ā Agent spawn failed"
|
99
|
-
end
|
100
|
-
|
101
|
-
rescue => e
|
102
|
-
puts " ā Error: #{e.class}: #{e.message}"
|
103
|
-
puts " š Backtrace:"
|
104
|
-
e.backtrace.first(5).each { |line| puts " #{line}" }
|
105
|
-
ensure
|
106
|
-
# Cleanup
|
107
|
-
session_manager&.cleanup_session
|
108
|
-
end
|
109
|
-
end
|
110
|
-
|
111
|
-
if __FILE__ == $0
|
112
|
-
test_agent_spawning
|
113
|
-
end
|
data/debug_spawn_step_by_step.rb
DELETED
@@ -1,190 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# Debug spawn process step by step
|
3
|
-
|
4
|
-
$LOAD_PATH.unshift File.expand_path('lib', __dir__)
|
5
|
-
require 'enhance_swarm'
|
6
|
-
|
7
|
-
def debug_spawn_process
|
8
|
-
puts "š§ Debugging Spawn Process Step by Step"
|
9
|
-
puts "=" * 50
|
10
|
-
|
11
|
-
begin
|
12
|
-
ENV['ENHANCE_SWARM_DEBUG'] = 'true'
|
13
|
-
|
14
|
-
# Step 1: Test AgentSpawner initialization
|
15
|
-
puts "\n1ļøā£ Initializing AgentSpawner..."
|
16
|
-
spawner = EnhanceSwarm::AgentSpawner.new
|
17
|
-
puts " ā
AgentSpawner initialized"
|
18
|
-
|
19
|
-
# Step 2: Test Claude CLI availability
|
20
|
-
puts "\n2ļøā£ Testing Claude CLI..."
|
21
|
-
claude_available = spawner.claude_cli_available?
|
22
|
-
puts " š Claude CLI available: #{claude_available}"
|
23
|
-
|
24
|
-
if claude_available
|
25
|
-
claude_version = `claude --version 2>/dev/null`.strip
|
26
|
-
puts " š Claude version: #{claude_version}"
|
27
|
-
end
|
28
|
-
|
29
|
-
# Step 3: Test worktree creation
|
30
|
-
puts "\n3ļøā£ Testing Worktree Creation..."
|
31
|
-
role = "frontend"
|
32
|
-
|
33
|
-
# Call the private method using send
|
34
|
-
worktree_path = spawner.send(:create_agent_worktree, role)
|
35
|
-
puts " š Worktree created: #{worktree_path}"
|
36
|
-
|
37
|
-
if worktree_path
|
38
|
-
puts " š Worktree exists: #{Dir.exist?(worktree_path)}"
|
39
|
-
puts " š Worktree files: #{Dir.entries(worktree_path).reject { |f| f.start_with?('.') }}"
|
40
|
-
end
|
41
|
-
|
42
|
-
# Step 4: Test prompt building
|
43
|
-
puts "\n4ļøā£ Testing Prompt Building..."
|
44
|
-
task = "Create a simple test component"
|
45
|
-
prompt = spawner.send(:build_agent_prompt, task, role, worktree_path)
|
46
|
-
puts " š Prompt length: #{prompt.length} characters"
|
47
|
-
puts " š First 100 chars: #{prompt[0..100]}..."
|
48
|
-
|
49
|
-
# Step 5: Test script creation
|
50
|
-
puts "\n5ļøā£ Testing Script Creation..."
|
51
|
-
script_path = spawner.send(:create_agent_script, prompt, role, worktree_path || Dir.pwd)
|
52
|
-
puts " š Script created: #{script_path}"
|
53
|
-
puts " š Script exists: #{File.exist?(script_path)}"
|
54
|
-
puts " š Script executable: #{File.executable?(script_path)}"
|
55
|
-
|
56
|
-
if File.exist?(script_path)
|
57
|
-
script_content = File.read(script_path)
|
58
|
-
puts " š Script length: #{script_content.length} characters"
|
59
|
-
puts " š First few lines:"
|
60
|
-
script_content.lines.first(5).each_with_index do |line, i|
|
61
|
-
puts " #{i+1}: #{line.strip}"
|
62
|
-
end
|
63
|
-
end
|
64
|
-
|
65
|
-
# Step 6: Test environment building
|
66
|
-
puts "\n6ļøā£ Testing Environment..."
|
67
|
-
env = spawner.send(:build_agent_environment, role, worktree_path)
|
68
|
-
puts " š Environment variables set:"
|
69
|
-
env.select { |k, v| k.start_with?('ENHANCE_SWARM') }.each do |k, v|
|
70
|
-
puts " #{k}=#{v}"
|
71
|
-
end
|
72
|
-
|
73
|
-
# Step 7: Try manual script execution
|
74
|
-
puts "\n7ļøā£ Testing Manual Script Execution..."
|
75
|
-
if File.exist?(script_path)
|
76
|
-
puts " š Attempting to run script manually..."
|
77
|
-
|
78
|
-
# Change to the working directory
|
79
|
-
original_dir = Dir.pwd
|
80
|
-
working_dir = worktree_path || Dir.pwd
|
81
|
-
|
82
|
-
begin
|
83
|
-
Dir.chdir(working_dir)
|
84
|
-
puts " š Changed to directory: #{Dir.pwd}"
|
85
|
-
|
86
|
-
# Try to execute the script with timeout
|
87
|
-
require 'timeout'
|
88
|
-
|
89
|
-
output = ""
|
90
|
-
error = ""
|
91
|
-
|
92
|
-
begin
|
93
|
-
Timeout::timeout(10) do
|
94
|
-
output = `bash #{script_path} 2>&1`
|
95
|
-
end
|
96
|
-
exit_status = $?.exitstatus
|
97
|
-
|
98
|
-
puts " š Script exit status: #{exit_status}"
|
99
|
-
puts " š Output length: #{output.length}"
|
100
|
-
puts " š Output preview: #{output[0..300]}..." if output.length > 0
|
101
|
-
|
102
|
-
rescue Timeout::Error
|
103
|
-
puts " ā ļø Script execution timed out (>10s)"
|
104
|
-
end
|
105
|
-
|
106
|
-
ensure
|
107
|
-
Dir.chdir(original_dir)
|
108
|
-
end
|
109
|
-
end
|
110
|
-
|
111
|
-
# Step 8: Test Process.spawn approach
|
112
|
-
puts "\n8ļøā£ Testing Process.spawn..."
|
113
|
-
if File.exist?(script_path)
|
114
|
-
working_dir = worktree_path || Dir.pwd
|
115
|
-
log_dir = '.enhance_swarm/logs'
|
116
|
-
|
117
|
-
puts " š Spawning process..."
|
118
|
-
puts " š Working dir: #{working_dir}"
|
119
|
-
puts " š Log dir: #{log_dir}"
|
120
|
-
|
121
|
-
begin
|
122
|
-
FileUtils.mkdir_p(log_dir)
|
123
|
-
|
124
|
-
pid = Process.spawn(
|
125
|
-
'/bin/bash', script_path,
|
126
|
-
chdir: working_dir,
|
127
|
-
out: File.join(log_dir, 'debug_manual_output.log'),
|
128
|
-
err: File.join(log_dir, 'debug_manual_error.log')
|
129
|
-
)
|
130
|
-
|
131
|
-
puts " š Process spawned: PID #{pid}"
|
132
|
-
Process.detach(pid)
|
133
|
-
|
134
|
-
# Wait a moment and check status
|
135
|
-
sleep(3)
|
136
|
-
|
137
|
-
begin
|
138
|
-
Process.getpgid(pid)
|
139
|
-
puts " š Process still running"
|
140
|
-
rescue Errno::ESRCH
|
141
|
-
puts " š Process completed"
|
142
|
-
end
|
143
|
-
|
144
|
-
# Check output files
|
145
|
-
output_file = File.join(log_dir, 'debug_manual_output.log')
|
146
|
-
error_file = File.join(log_dir, 'debug_manual_error.log')
|
147
|
-
|
148
|
-
if File.exist?(output_file)
|
149
|
-
output = File.read(output_file)
|
150
|
-
puts " š Manual output: #{output.length} chars"
|
151
|
-
puts " š Output preview: #{output[0..200]}..." if output.length > 0
|
152
|
-
end
|
153
|
-
|
154
|
-
if File.exist?(error_file)
|
155
|
-
error = File.read(error_file)
|
156
|
-
puts " š Manual error: #{error.length} chars"
|
157
|
-
puts " š Error preview: #{error[0..200]}..." if error.length > 0
|
158
|
-
end
|
159
|
-
|
160
|
-
rescue => e
|
161
|
-
puts " ā Process spawn failed: #{e.message}"
|
162
|
-
end
|
163
|
-
end
|
164
|
-
|
165
|
-
# Cleanup
|
166
|
-
puts "\n9ļøā£ Cleanup..."
|
167
|
-
if worktree_path && Dir.exist?(worktree_path)
|
168
|
-
puts " š§¹ Cleaning up worktree..."
|
169
|
-
begin
|
170
|
-
system("git worktree remove #{worktree_path}")
|
171
|
-
branch_name = File.basename(worktree_path)
|
172
|
-
system("git branch -d #{branch_name}")
|
173
|
-
puts " ā
Worktree cleaned up"
|
174
|
-
rescue => e
|
175
|
-
puts " ā ļø Cleanup warning: #{e.message}"
|
176
|
-
end
|
177
|
-
end
|
178
|
-
|
179
|
-
rescue => e
|
180
|
-
puts " ā Error: #{e.class}: #{e.message}"
|
181
|
-
puts " š Backtrace:"
|
182
|
-
e.backtrace.first(10).each { |line| puts " #{line}" }
|
183
|
-
ensure
|
184
|
-
ENV.delete('ENHANCE_SWARM_DEBUG')
|
185
|
-
end
|
186
|
-
end
|
187
|
-
|
188
|
-
if __FILE__ == $0
|
189
|
-
debug_spawn_process
|
190
|
-
end
|
data/debug_worktree.rb
DELETED
@@ -1,77 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# Debug script to test worktree creation
|
3
|
-
|
4
|
-
$LOAD_PATH.unshift File.expand_path('lib', __dir__)
|
5
|
-
require 'enhance_swarm'
|
6
|
-
|
7
|
-
def test_worktree_creation
|
8
|
-
puts "š Testing Git Worktree Creation Debug"
|
9
|
-
puts "=" * 50
|
10
|
-
|
11
|
-
spawner = EnhanceSwarm::AgentSpawner.new
|
12
|
-
|
13
|
-
# Test the private create_agent_worktree method
|
14
|
-
begin
|
15
|
-
puts "\n1ļøā£ Testing worktree creation..."
|
16
|
-
|
17
|
-
# Check current git status
|
18
|
-
git_status = `git status --porcelain 2>&1`
|
19
|
-
puts " š Git status: #{git_status.strip}"
|
20
|
-
|
21
|
-
# Check if we're in a git repository
|
22
|
-
in_git_repo = system('git rev-parse --git-dir > /dev/null 2>&1')
|
23
|
-
puts " š In git repo: #{in_git_repo}"
|
24
|
-
|
25
|
-
# Check current branch
|
26
|
-
current_branch = `git branch --show-current 2>&1`.strip
|
27
|
-
puts " š Current branch: #{current_branch}"
|
28
|
-
|
29
|
-
# Check if we have commits
|
30
|
-
has_commits = system('git log --oneline -1 > /dev/null 2>&1')
|
31
|
-
puts " š Has commits: #{has_commits}"
|
32
|
-
|
33
|
-
# Test directory creation
|
34
|
-
worktree_dir = '.enhance_swarm/worktrees'
|
35
|
-
puts " š Creating directory: #{worktree_dir}"
|
36
|
-
FileUtils.mkdir_p(worktree_dir) unless Dir.exist?(worktree_dir)
|
37
|
-
puts " š Directory exists: #{Dir.exist?(worktree_dir)}"
|
38
|
-
|
39
|
-
# Try to call the create_agent_worktree method
|
40
|
-
puts "\n2ļøā£ Calling create_agent_worktree..."
|
41
|
-
worktree_path = spawner.send(:create_agent_worktree, 'debug_test')
|
42
|
-
|
43
|
-
if worktree_path
|
44
|
-
puts " ā
Success! Worktree created at: #{worktree_path}"
|
45
|
-
puts " š Directory exists: #{Dir.exist?(worktree_path)}"
|
46
|
-
|
47
|
-
# List contents
|
48
|
-
if Dir.exist?(worktree_path)
|
49
|
-
contents = Dir.entries(worktree_path).reject { |f| f.start_with?('.') }
|
50
|
-
puts " š Contents: #{contents.join(', ')}"
|
51
|
-
end
|
52
|
-
else
|
53
|
-
puts " ā Failed to create worktree"
|
54
|
-
end
|
55
|
-
|
56
|
-
rescue => e
|
57
|
-
puts " ā Error: #{e.class}: #{e.message}"
|
58
|
-
puts " š Backtrace: #{e.backtrace.first(3).join(', ')}"
|
59
|
-
end
|
60
|
-
|
61
|
-
puts "\n3ļøā£ Checking existing worktrees..."
|
62
|
-
existing_worktrees = `git worktree list 2>&1`
|
63
|
-
puts " š Existing worktrees:"
|
64
|
-
existing_worktrees.each_line { |line| puts " #{line.strip}" }
|
65
|
-
|
66
|
-
puts "\n4ļøā£ Testing CommandExecutor directly..."
|
67
|
-
begin
|
68
|
-
result = EnhanceSwarm::CommandExecutor.execute('git', 'worktree', 'list')
|
69
|
-
puts " ā
CommandExecutor works: #{result}"
|
70
|
-
rescue => e
|
71
|
-
puts " ā CommandExecutor error: #{e.message}"
|
72
|
-
end
|
73
|
-
end
|
74
|
-
|
75
|
-
if __FILE__ == $0
|
76
|
-
test_worktree_creation
|
77
|
-
end
|
data/enhance_swarm-0.1.1.gem
DELETED
Binary file
|
data/enhance_swarm-1.0.0.gem
DELETED
Binary file
|
data/final_validation_test.rb
DELETED
@@ -1,199 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# Final comprehensive validation test for EnhanceSwarm v1.0
|
3
|
-
|
4
|
-
$LOAD_PATH.unshift File.expand_path('lib', __dir__)
|
5
|
-
require 'enhance_swarm'
|
6
|
-
|
7
|
-
def run_final_validation
|
8
|
-
puts "š EnhanceSwarm v1.0 Final Validation Test"
|
9
|
-
puts "=" * 60
|
10
|
-
|
11
|
-
results = {
|
12
|
-
core_functionality: {},
|
13
|
-
reliability: {},
|
14
|
-
user_experience: {},
|
15
|
-
production_readiness: {}
|
16
|
-
}
|
17
|
-
|
18
|
-
begin
|
19
|
-
# 1. Core Functionality Tests
|
20
|
-
puts "\n1ļøā£ CORE FUNCTIONALITY VALIDATION"
|
21
|
-
puts "-" * 40
|
22
|
-
|
23
|
-
# Test AgentSpawner
|
24
|
-
puts " Testing AgentSpawner..."
|
25
|
-
spawner = EnhanceSwarm::AgentSpawner.new
|
26
|
-
claude_available = spawner.claude_cli_available?
|
27
|
-
results[:core_functionality][:claude_cli] = claude_available
|
28
|
-
puts " š Claude CLI: #{claude_available ? 'ā
' : 'ā'}"
|
29
|
-
|
30
|
-
# Test SessionManager
|
31
|
-
puts " Testing SessionManager..."
|
32
|
-
session_manager = EnhanceSwarm::SessionManager.new
|
33
|
-
session = session_manager.create_session("Validation test")
|
34
|
-
session_works = session && session[:session_id]
|
35
|
-
results[:core_functionality][:session_management] = session_works
|
36
|
-
puts " š Session Management: #{session_works ? 'ā
' : 'ā'}"
|
37
|
-
|
38
|
-
# Test Configuration
|
39
|
-
puts " Testing Configuration..."
|
40
|
-
config = EnhanceSwarm.configuration
|
41
|
-
config_works = config && config.project_name
|
42
|
-
results[:core_functionality][:configuration] = config_works
|
43
|
-
puts " š Configuration: #{config_works ? 'ā
' : 'ā'}"
|
44
|
-
|
45
|
-
# Test Orchestrator
|
46
|
-
puts " Testing Orchestrator..."
|
47
|
-
orchestrator = EnhanceSwarm::Orchestrator.new
|
48
|
-
orchestrator_works = orchestrator.respond_to?(:spawn_single)
|
49
|
-
results[:core_functionality][:orchestrator] = orchestrator_works
|
50
|
-
puts " š Orchestrator: #{orchestrator_works ? 'ā
' : 'ā'}"
|
51
|
-
|
52
|
-
# 2. Reliability Tests
|
53
|
-
puts "\n2ļøā£ RELIABILITY VALIDATION"
|
54
|
-
puts "-" * 40
|
55
|
-
|
56
|
-
# Test Error Handling
|
57
|
-
puts " Testing Error Handling..."
|
58
|
-
begin
|
59
|
-
# Test with invalid input
|
60
|
-
spawner.spawn_agent(role: nil, task: nil, worktree: false)
|
61
|
-
error_handling = false
|
62
|
-
rescue => e
|
63
|
-
error_handling = true
|
64
|
-
puts " š Error properly caught: #{e.class}"
|
65
|
-
end
|
66
|
-
results[:reliability][:error_handling] = error_handling
|
67
|
-
puts " š Error Handling: #{error_handling ? 'ā
' : 'ā'}"
|
68
|
-
|
69
|
-
# Test Logger
|
70
|
-
puts " Testing Logger..."
|
71
|
-
logger_works = EnhanceSwarm::Logger.respond_to?(:info)
|
72
|
-
results[:reliability][:logging] = logger_works
|
73
|
-
puts " š Logging System: #{logger_works ? 'ā
' : 'ā'}"
|
74
|
-
|
75
|
-
# Test Cleanup
|
76
|
-
puts " Testing Cleanup..."
|
77
|
-
cleanup_works = EnhanceSwarm::CleanupManager.respond_to?(:cleanup_stale_worktrees)
|
78
|
-
results[:reliability][:cleanup] = cleanup_works
|
79
|
-
puts " š Cleanup Manager: #{cleanup_works ? 'ā
' : 'ā'}"
|
80
|
-
|
81
|
-
# 3. User Experience Tests
|
82
|
-
puts "\n3ļøā£ USER EXPERIENCE VALIDATION"
|
83
|
-
puts "-" * 40
|
84
|
-
|
85
|
-
# Test CLI Components
|
86
|
-
puts " Testing CLI Components..."
|
87
|
-
cli_works = EnhanceSwarm::CLI.respond_to?(:new)
|
88
|
-
results[:user_experience][:cli] = cli_works
|
89
|
-
puts " š CLI Interface: #{cli_works ? 'ā
' : 'ā'}"
|
90
|
-
|
91
|
-
# Test Dashboard
|
92
|
-
puts " Testing Dashboard..."
|
93
|
-
dashboard_works = EnhanceSwarm::VisualDashboard.respond_to?(:instance)
|
94
|
-
results[:user_experience][:dashboard] = dashboard_works
|
95
|
-
puts " š Visual Dashboard: #{dashboard_works ? 'ā
' : 'ā'}"
|
96
|
-
|
97
|
-
# Test Smart Defaults
|
98
|
-
puts " Testing Smart Defaults..."
|
99
|
-
smart_defaults_works = EnhanceSwarm::SmartDefaults.respond_to?(:suggest_role_for_task)
|
100
|
-
results[:user_experience][:smart_defaults] = smart_defaults_works
|
101
|
-
puts " š Smart Defaults: #{smart_defaults_works ? 'ā
' : 'ā'}"
|
102
|
-
|
103
|
-
# 4. Production Readiness Tests
|
104
|
-
puts "\n4ļøā£ PRODUCTION READINESS VALIDATION"
|
105
|
-
puts "-" * 40
|
106
|
-
|
107
|
-
# Test actual spawn (non-blocking)
|
108
|
-
puts " Testing Real Agent Spawn..."
|
109
|
-
spawn_result = spawner.spawn_agent(
|
110
|
-
role: "general",
|
111
|
-
task: "Quick validation test - just echo 'validation successful'",
|
112
|
-
worktree: false
|
113
|
-
)
|
114
|
-
spawn_works = spawn_result && spawn_result[:pid]
|
115
|
-
results[:production_readiness][:real_spawn] = spawn_works
|
116
|
-
puts " š Real Agent Spawn: #{spawn_works ? 'ā
' : 'ā'}"
|
117
|
-
|
118
|
-
if spawn_works
|
119
|
-
puts " š Spawned PID: #{spawn_result[:pid]}"
|
120
|
-
|
121
|
-
# Brief wait to check process
|
122
|
-
sleep(2)
|
123
|
-
begin
|
124
|
-
Process.getpgid(spawn_result[:pid])
|
125
|
-
puts " š Process Status: Running ā
"
|
126
|
-
rescue Errno::ESRCH
|
127
|
-
puts " š Process Status: Completed ā
"
|
128
|
-
end
|
129
|
-
end
|
130
|
-
|
131
|
-
# Test Dependencies
|
132
|
-
puts " Testing Dependencies..."
|
133
|
-
deps_works = EnhanceSwarm::DependencyValidator.respond_to?(:validate_all)
|
134
|
-
results[:production_readiness][:dependencies] = deps_works
|
135
|
-
puts " š Dependency Validation: #{deps_works ? 'ā
' : 'ā'}"
|
136
|
-
|
137
|
-
# Test Process Monitoring
|
138
|
-
puts " Testing Process Monitoring..."
|
139
|
-
monitor_works = EnhanceSwarm::ProcessMonitor.respond_to?(:new)
|
140
|
-
results[:production_readiness][:monitoring] = monitor_works
|
141
|
-
puts " š Process Monitoring: #{monitor_works ? 'ā
' : 'ā'}"
|
142
|
-
|
143
|
-
# 5. Calculate Final Score
|
144
|
-
puts "\n5ļøā£ FINAL SCORING"
|
145
|
-
puts "-" * 40
|
146
|
-
|
147
|
-
total_tests = 0
|
148
|
-
passed_tests = 0
|
149
|
-
|
150
|
-
results.each do |category, tests|
|
151
|
-
category_passed = tests.values.count(true)
|
152
|
-
category_total = tests.count
|
153
|
-
total_tests += category_total
|
154
|
-
passed_tests += category_passed
|
155
|
-
|
156
|
-
percentage = category_total > 0 ? (category_passed.to_f / category_total * 100).round(1) : 0
|
157
|
-
puts " #{category.to_s.gsub('_', ' ').capitalize}: #{category_passed}/#{category_total} (#{percentage}%)"
|
158
|
-
end
|
159
|
-
|
160
|
-
overall_percentage = total_tests > 0 ? (passed_tests.to_f / total_tests * 100).round(1) : 0
|
161
|
-
|
162
|
-
puts "\n" + "=" * 60
|
163
|
-
puts "šÆ FINAL VALIDATION RESULTS"
|
164
|
-
puts "=" * 60
|
165
|
-
puts "Total Tests: #{total_tests}"
|
166
|
-
puts "Tests Passed: #{passed_tests}"
|
167
|
-
puts "Success Rate: #{overall_percentage}%"
|
168
|
-
|
169
|
-
if overall_percentage >= 95
|
170
|
-
puts "\nš PRODUCTION READY - EXCELLENT"
|
171
|
-
puts " All critical systems operational"
|
172
|
-
elsif overall_percentage >= 85
|
173
|
-
puts "\nā
PRODUCTION READY - GOOD"
|
174
|
-
puts " Minor issues, but deployable"
|
175
|
-
elsif overall_percentage >= 70
|
176
|
-
puts "\nā ļø PRODUCTION READY - WITH CAVEATS"
|
177
|
-
puts " Some issues need attention"
|
178
|
-
else
|
179
|
-
puts "\nā NOT PRODUCTION READY"
|
180
|
-
puts " Significant issues require resolution"
|
181
|
-
end
|
182
|
-
|
183
|
-
return overall_percentage
|
184
|
-
|
185
|
-
rescue => e
|
186
|
-
puts " ā Validation Error: #{e.class}: #{e.message}"
|
187
|
-
puts " š Backtrace:"
|
188
|
-
e.backtrace.first(3).each { |line| puts " #{line}" }
|
189
|
-
return 0
|
190
|
-
ensure
|
191
|
-
# Cleanup
|
192
|
-
session_manager&.cleanup_session
|
193
|
-
end
|
194
|
-
end
|
195
|
-
|
196
|
-
if __FILE__ == $0
|
197
|
-
score = run_final_validation
|
198
|
-
puts "\nšļø EnhanceSwarm v1.0 Production Score: #{score}/100"
|
199
|
-
end
|
data/setup.sh
DELETED
@@ -1,86 +0,0 @@
|
|
1
|
-
#!/bin/bash
|
2
|
-
set -e
|
3
|
-
|
4
|
-
# EnhanceSwarm Auto-Setup Script
|
5
|
-
# This script can be run directly from GitHub to set up EnhanceSwarm in any project
|
6
|
-
|
7
|
-
echo "š EnhanceSwarm Auto-Setup"
|
8
|
-
echo "========================="
|
9
|
-
|
10
|
-
# Colors
|
11
|
-
GREEN='\033[0;32m'
|
12
|
-
YELLOW='\033[1;33m'
|
13
|
-
RED='\033[0;31m'
|
14
|
-
NC='\033[0m' # No Color
|
15
|
-
|
16
|
-
# Check dependencies
|
17
|
-
echo -e "\n${YELLOW}Checking dependencies...${NC}"
|
18
|
-
|
19
|
-
check_dependency() {
|
20
|
-
if command -v $1 &> /dev/null; then
|
21
|
-
echo -e " ā
$1 found"
|
22
|
-
return 0
|
23
|
-
else
|
24
|
-
echo -e " ā $1 not found"
|
25
|
-
return 1
|
26
|
-
fi
|
27
|
-
}
|
28
|
-
|
29
|
-
MISSING_DEPS=0
|
30
|
-
check_dependency "ruby" || MISSING_DEPS=1
|
31
|
-
check_dependency "git" || MISSING_DEPS=1
|
32
|
-
check_dependency "bundle" || MISSING_DEPS=1
|
33
|
-
|
34
|
-
if [ $MISSING_DEPS -eq 1 ]; then
|
35
|
-
echo -e "\n${RED}Missing required dependencies. Please install them first.${NC}"
|
36
|
-
exit 1
|
37
|
-
fi
|
38
|
-
|
39
|
-
# Clone or update enhance_swarm
|
40
|
-
ENHANCE_DIR="$HOME/.enhance_swarm"
|
41
|
-
|
42
|
-
if [ -d "$ENHANCE_DIR" ]; then
|
43
|
-
echo -e "\n${YELLOW}Updating EnhanceSwarm...${NC}"
|
44
|
-
cd "$ENHANCE_DIR"
|
45
|
-
git pull origin main
|
46
|
-
else
|
47
|
-
echo -e "\n${YELLOW}Installing EnhanceSwarm...${NC}"
|
48
|
-
git clone https://github.com/todddickerson/enhance_swarm.git "$ENHANCE_DIR"
|
49
|
-
cd "$ENHANCE_DIR"
|
50
|
-
fi
|
51
|
-
|
52
|
-
# Install gem dependencies
|
53
|
-
echo -e "\n${YELLOW}Installing dependencies...${NC}"
|
54
|
-
bundle install
|
55
|
-
|
56
|
-
# Build and install the gem
|
57
|
-
echo -e "\n${YELLOW}Building and installing gem...${NC}"
|
58
|
-
rake build
|
59
|
-
gem install pkg/enhance_swarm-*.gem
|
60
|
-
|
61
|
-
# Check optional dependencies
|
62
|
-
echo -e "\n${YELLOW}Checking optional dependencies...${NC}"
|
63
|
-
check_dependency "claude" || echo " ā ļø Install Claude CLI for enhanced agent spawning"
|
64
|
-
check_dependency "gemini" || echo " ā ļø Install Gemini CLI for large context analysis"
|
65
|
-
|
66
|
-
# Initialize in current project if we're in a project directory
|
67
|
-
if [ -f "Gemfile" ] || [ -f "package.json" ] || [ -f ".git/config" ]; then
|
68
|
-
echo -e "\n${YELLOW}Detected project directory. Initialize EnhanceSwarm here?${NC}"
|
69
|
-
read -p "Initialize EnhanceSwarm in current directory? (y/n) " -n 1 -r
|
70
|
-
echo
|
71
|
-
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
72
|
-
enhance-swarm init
|
73
|
-
fi
|
74
|
-
else
|
75
|
-
echo -e "\n${GREEN}ā
EnhanceSwarm installed successfully!${NC}"
|
76
|
-
echo -e "\nTo initialize in a project, run:"
|
77
|
-
echo -e " ${YELLOW}cd your-project${NC}"
|
78
|
-
echo -e " ${YELLOW}enhance-swarm init${NC}"
|
79
|
-
fi
|
80
|
-
|
81
|
-
echo -e "\n${GREEN}š Setup complete!${NC}"
|
82
|
-
echo -e "\nAvailable commands:"
|
83
|
-
echo " enhance-swarm init - Initialize in a project"
|
84
|
-
echo " enhance-swarm enhance - Run ENHANCE protocol"
|
85
|
-
echo " enhance-swarm doctor - Check system setup"
|
86
|
-
echo " enhance-swarm --help - See all commands"
|
@@ -1,16 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"session_id": "1751187575_e119ea73",
|
3
|
-
"start_time": "2025-06-29T10:59:35+02:00",
|
4
|
-
"task_description": "Rails E2E test session",
|
5
|
-
"agents": [
|
6
|
-
{
|
7
|
-
"role": "test_agent",
|
8
|
-
"pid": 99999,
|
9
|
-
"worktree_path": "/test/path",
|
10
|
-
"task": "Test Rails development",
|
11
|
-
"start_time": "2025-06-29T10:59:35+02:00",
|
12
|
-
"status": "running"
|
13
|
-
}
|
14
|
-
],
|
15
|
-
"status": "active"
|
16
|
-
}
|