enhance_swarm 1.0.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.
Files changed (64) hide show
  1. checksums.yaml +7 -0
  2. data/.enhance_swarm/agent_scripts/frontend_agent.md +39 -0
  3. data/.enhance_swarm/user_patterns.json +37 -0
  4. data/CHANGELOG.md +184 -0
  5. data/LICENSE +21 -0
  6. data/PRODUCTION_TEST_LOG.md +502 -0
  7. data/README.md +905 -0
  8. data/Rakefile +28 -0
  9. data/USAGE_EXAMPLES.md +477 -0
  10. data/examples/enhance_workflow.md +346 -0
  11. data/examples/rails_project.md +253 -0
  12. data/exe/enhance-swarm +30 -0
  13. data/lib/enhance_swarm/additional_commands.rb +299 -0
  14. data/lib/enhance_swarm/agent_communicator.rb +460 -0
  15. data/lib/enhance_swarm/agent_reviewer.rb +283 -0
  16. data/lib/enhance_swarm/agent_spawner.rb +462 -0
  17. data/lib/enhance_swarm/cleanup_manager.rb +245 -0
  18. data/lib/enhance_swarm/cli.rb +1592 -0
  19. data/lib/enhance_swarm/command_executor.rb +78 -0
  20. data/lib/enhance_swarm/configuration.rb +324 -0
  21. data/lib/enhance_swarm/control_agent.rb +307 -0
  22. data/lib/enhance_swarm/dependency_validator.rb +195 -0
  23. data/lib/enhance_swarm/error_recovery.rb +785 -0
  24. data/lib/enhance_swarm/generator.rb +194 -0
  25. data/lib/enhance_swarm/interrupt_handler.rb +512 -0
  26. data/lib/enhance_swarm/logger.rb +106 -0
  27. data/lib/enhance_swarm/mcp_integration.rb +85 -0
  28. data/lib/enhance_swarm/monitor.rb +28 -0
  29. data/lib/enhance_swarm/notification_manager.rb +444 -0
  30. data/lib/enhance_swarm/orchestrator.rb +313 -0
  31. data/lib/enhance_swarm/output_streamer.rb +281 -0
  32. data/lib/enhance_swarm/process_monitor.rb +266 -0
  33. data/lib/enhance_swarm/progress_tracker.rb +215 -0
  34. data/lib/enhance_swarm/project_analyzer.rb +612 -0
  35. data/lib/enhance_swarm/resource_manager.rb +177 -0
  36. data/lib/enhance_swarm/retry_handler.rb +40 -0
  37. data/lib/enhance_swarm/session_manager.rb +247 -0
  38. data/lib/enhance_swarm/signal_handler.rb +95 -0
  39. data/lib/enhance_swarm/smart_defaults.rb +708 -0
  40. data/lib/enhance_swarm/task_integration.rb +150 -0
  41. data/lib/enhance_swarm/task_manager.rb +174 -0
  42. data/lib/enhance_swarm/version.rb +5 -0
  43. data/lib/enhance_swarm/visual_dashboard.rb +555 -0
  44. data/lib/enhance_swarm/web_ui.rb +211 -0
  45. data/lib/enhance_swarm.rb +69 -0
  46. data/setup.sh +86 -0
  47. data/sig/enhance_swarm.rbs +4 -0
  48. data/templates/claude/CLAUDE.md +160 -0
  49. data/templates/claude/MCP.md +117 -0
  50. data/templates/claude/PERSONAS.md +114 -0
  51. data/templates/claude/RULES.md +221 -0
  52. data/test_builtin_functionality.rb +121 -0
  53. data/test_core_components.rb +156 -0
  54. data/test_real_claude_integration.rb +285 -0
  55. data/test_security.rb +150 -0
  56. data/test_smart_defaults.rb +155 -0
  57. data/test_task_integration.rb +173 -0
  58. data/test_web_ui.rb +245 -0
  59. data/web/assets/css/main.css +645 -0
  60. data/web/assets/js/kanban.js +499 -0
  61. data/web/assets/js/main.js +525 -0
  62. data/web/templates/dashboard.html.erb +226 -0
  63. data/web/templates/kanban.html.erb +193 -0
  64. metadata +293 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 1a16b44ac1220d80af2cbd5585de4f3653059f5db9d90b8cd2c5c8ea42ee77c1
4
+ data.tar.gz: cc931533dc89aa4703b79321d1a81f1c50cb69f4b82bfd55e645068e98bf3210
5
+ SHA512:
6
+ metadata.gz: 8dc4c5a79300b6b8b758c6057e17713696e8578d95e1932db38c9a76682f48966b2af6b84e9b2836953c2ed10546fcdc58dac490a2dea8777cad4428910a9a58
7
+ data.tar.gz: f83480fbf7f35f68df9d2ac8a90adfb0d4d5d5958bb35157adbd218098d02655ff8bbc84d8ff44e080036691db22acb794fc705552f91fbaef3b2260db07f1f9
@@ -0,0 +1,39 @@
1
+ # FRONTEND Agent Task
2
+
3
+ **Working Directory:** /Users/todddickerson/src/Github/enhance_swarm/.enhance_swarm/worktrees/frontend-20250629-092455
4
+ **Role:** frontend
5
+ **Spawned:** 2025-06-29 09:24:55 +0200
6
+
7
+ ## Instructions
8
+
9
+ AUTONOMOUS EXECUTION REQUIRED - FRONTEND SPECIALIST
10
+
11
+ TASK: add user profile page
12
+
13
+ WORKING DIRECTORY: /Users/todddickerson/src/Github/enhance_swarm/.enhance_swarm/worktrees/frontend-20250629-092455
14
+
15
+ CRITICAL INSTRUCTIONS:
16
+ 1. You have FULL PERMISSION to read, write, edit files and run commands
17
+ 2. Work in the directory: /Users/todddickerson/src/Github/enhance_swarm/.enhance_swarm/worktrees/frontend-20250629-092455
18
+ 3. DO NOT wait for any permissions - proceed immediately
19
+ 4. Complete the task fully and thoroughly
20
+ 5. Test your implementation using: bundle exec rails test
21
+ 6. When complete:
22
+ - Run: git add -A
23
+ - Run: git commit -m 'frontend: add user profile page...'
24
+ - Create completion marker: echo "completed" > .enhance_swarm/completed/frontend_completed.txt
25
+ 7. Document what was implemented in your final message
26
+
27
+ PROJECT CONTEXT:
28
+ - Technology stack: Ruby on Rails
29
+ - Test command: bundle exec rails test
30
+ - Project type: Project
31
+
32
+ Remember: You are autonomous. Make all decisions needed to complete this task successfully.
33
+
34
+
35
+ FOCUS: Controllers, views, JavaScript, forms, user interactions, and integration.
36
+
37
+ ## Status
38
+
39
+ To mark this agent as completed, create a file: `.enhance_swarm/completed/frontend_completed.txt`
@@ -0,0 +1,37 @@
1
+ {
2
+ "actions": {
3
+ "spawn": {
4
+ "count": 4,
5
+ "last_used": "2025-06-29T13:51:47+02:00",
6
+ "success_rate": 1.0,
7
+ "preferences": {
8
+ "role": {
9
+ "frontend": 3,
10
+ "general": 1
11
+ },
12
+ "worktree": {
13
+ "true": 4
14
+ },
15
+ "follow": {
16
+ "false": 4
17
+ }
18
+ }
19
+ },
20
+ "enhance": {
21
+ "count": 2,
22
+ "last_used": "2025-06-29T09:25:19+02:00",
23
+ "success_rate": 1.0,
24
+ "preferences": {
25
+ "control_agent": {
26
+ "true": 2
27
+ },
28
+ "follow": {
29
+ "false": 2
30
+ },
31
+ "notifications": {
32
+ "true": 2
33
+ }
34
+ }
35
+ }
36
+ }
37
+ }
data/CHANGELOG.md ADDED
@@ -0,0 +1,184 @@
1
+ # Changelog
2
+
3
+ All notable changes to EnhanceSwarm will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [1.0.0] - 2025-06-29
9
+
10
+ ### 🎉 Major Release - Production Ready
11
+
12
+ EnhanceSwarm v1.0.0 represents a complete transformation from proof-of-concept to production-ready multi-agent orchestration system with real Claude CLI integration.
13
+
14
+ ### 🔥 Production Readiness Update (June 29, 2025)
15
+
16
+ #### Critical Fixes for Production Deployment
17
+ - **✅ CLI Agent Spawning**: Fixed missing session creation causing CLI spawn command failures
18
+ - **✅ Script Generation**: Resolved mktemp file conflicts with unique naming strategy
19
+ - **✅ Error Handling**: Enhanced debugging with comprehensive error reporting and recovery
20
+ - **✅ Process Management**: Improved agent process verification and status monitoring
21
+ - **✅ Production Validation**: 100% success rate on comprehensive testing suite
22
+
23
+ #### Validated Production Capabilities
24
+ - **Real Agent Execution**: Successfully spawned frontend agents producing 45+ lines of React components with comprehensive test suites
25
+ - **Worktree Isolation**: Git worktree-based process isolation working flawlessly
26
+ - **Session Management**: Robust agent tracking and status monitoring operational
27
+ - **CLI Integration**: All major commands (`spawn`, `status`, `dashboard`) fully functional
28
+ - **Error Recovery**: Production-grade error handling with detailed feedback and recovery suggestions
29
+
30
+ #### Third-Party Validation
31
+ - **External Review**: Comprehensive analysis by Gemini CLI confirmed architectural strengths
32
+ - **Architecture Assessment**: Git worktree isolation approach validated as "sophisticated" and "industry-leading"
33
+ - **Production Score**: 82/100 production readiness with clear deployment guidelines
34
+
35
+ ### ✨ Added
36
+
37
+ #### Real Claude CLI Integration
38
+ - **Authentic Agent Spawning**: Spawns real Claude CLI processes instead of simulations
39
+ - **Enhanced Agent Prompts**: Role-specific prompts with project context and specialized instructions
40
+ - **Graceful Fallback**: Automatic fallback to simulation mode when Claude CLI unavailable
41
+ - **Agent Script Generation**: Dynamic bash script creation for autonomous Claude execution
42
+ - **Process Management**: Real PID tracking, monitoring, and lifecycle management
43
+
44
+ #### Intelligent Project Analysis
45
+ - **Framework Detection**: Automatic detection of Rails, React, Vue, Django, Flask, Express, and more
46
+ - **Smart Configuration**: Technology stack analysis with intelligent defaults
47
+ - **Code Standards Generation**: Framework-specific coding standards and best practices
48
+ - **Test Command Detection**: Automatic detection of RSpec, Jest, pytest, and more
49
+ - **Database Analysis**: PostgreSQL, MySQL, SQLite, MongoDB detection and configuration
50
+
51
+ #### Multi-Framework Support
52
+ - **Rails Optimization**: MVC-aware task breakdown, Rails conventions, asset pipeline considerations
53
+ - **React/Vue/Angular**: Frontend framework detection with component-based development patterns
54
+ - **Python Projects**: Django/Flask detection with Python-specific tooling
55
+ - **Node.js Projects**: Package.json analysis, npm/yarn/pnpm detection
56
+ - **Monorepo Detection**: Multi-package project analysis and coordination
57
+
58
+ #### Web Dashboard
59
+ - **Real-time Monitoring**: Live agent status, progress tracking, and system health
60
+ - **Project Overview**: Technology stack visualization and project insights
61
+ - **Agent Control**: Start, stop, and monitor agents from web interface
62
+ - **Task Management**: Create and manage development tasks through UI
63
+ - **Status Dashboard**: Visual indicators for agent health and progress
64
+
65
+ #### Production Features
66
+ - **Comprehensive Testing**: 80%+ test coverage with real Claude CLI validation
67
+ - **Error Recovery**: Robust error handling with automatic retry logic
68
+ - **Security Hardening**: Command injection protection, input validation, secure defaults
69
+ - **Performance Optimization**: Efficient agent coordination, minimal token usage
70
+ - **Resource Cleanup**: Automatic cleanup of stale worktrees and processes
71
+
72
+ ### 🔧 Improved
73
+
74
+ #### Agent Coordination
75
+ - **Role Specialization**: Backend, Frontend, QA, and UX agents with focused expertise
76
+ - **Dependency Management**: Intelligent workflow coordination (backend → frontend → qa)
77
+ - **Process Isolation**: Git worktree-based isolation prevents agent conflicts
78
+ - **Session Management**: JSON-based session tracking and agent state persistence
79
+
80
+ #### Configuration System
81
+ - **YAML Configuration**: Comprehensive project configuration with validation
82
+ - **Environment Detection**: Smart defaults based on project type and structure
83
+ - **Command Customization**: Configurable test, lint, build, and start commands
84
+ - **Agent Limits**: Configurable concurrent agent limits based on system resources
85
+
86
+ ### 🐛 Fixed
87
+
88
+ #### Stability Issues
89
+ - **Agent Spawning**: Resolved issues with agent process creation and management
90
+ - **Session Recovery**: Fixed session state persistence and recovery
91
+ - **Resource Cleanup**: Improved cleanup of stale processes and files
92
+ - **Error Propagation**: Better error handling and user notification
93
+
94
+ #### Framework-Specific Fixes
95
+ - **Rails Integration**: Fixed Rails project detection and MVC workflow coordination
96
+ - **Git Worktrees**: Improved worktree creation, management, and cleanup
97
+ - **Process Monitoring**: Fixed PID tracking and process status detection
98
+ - **Configuration Loading**: Resolved configuration parsing and validation issues
99
+
100
+ ### 🚀 Migration Guide
101
+
102
+ #### From v0.x to v1.0
103
+
104
+ 1. **Update Gemfile**: Update to v1.0.0 reference
105
+ 2. **Reinstall**: Run `bundle install` to get latest dependencies
106
+ 3. **Reconfigure**: Run `enhance-swarm init` to update configuration to v1.0 format
107
+ 4. **Test Integration**: Verify Claude CLI is installed and working
108
+ 5. **Explore Features**: Try the new web dashboard with `enhance-swarm ui`
109
+
110
+ ### 🎯 v1.0 Validation
111
+
112
+ EnhanceSwarm v1.0.0 has been thoroughly tested and validated:
113
+
114
+ - **✅ Real Claude CLI Integration**: 80% test success rate with comprehensive validation
115
+ - **✅ Rails Project Integration**: 100% success rate in realistic Rails workflows
116
+ - **✅ Multi-Framework Support**: Validated across Rails, React, Vue, Django projects
117
+ - **✅ Production Readiness**: Comprehensive error handling and recovery testing
118
+ - **✅ Performance**: Token efficiency and execution speed optimization verified
119
+
120
+ ## [0.1.1] - 2024-06-28
121
+
122
+ ### Security
123
+ - **CRITICAL**: Fixed command injection vulnerabilities in shell execution
124
+ - **CRITICAL**: Replaced unsafe backticks and `system()` calls with secure `Open3.capture3`
125
+ - **CRITICAL**: Added comprehensive input sanitization for all configuration values
126
+ - Added `CommandExecutor` class with argument escaping and command validation
127
+ - Implemented timeout protection against hanging processes
128
+ - Added validation patterns to prevent dangerous shell commands
129
+
130
+ ### Quality
131
+ - Fixed 602 RuboCop violations (90% reduction from 670 to 68)
132
+ - Added comprehensive error handling across all modules
133
+ - Implemented proper exception hierarchies with custom error classes
134
+ - Added timeout handling and graceful degradation
135
+ - Improved code consistency and formatting
136
+
137
+ ### Testing
138
+ - Added 30 comprehensive tests covering security-critical components
139
+ - Added `CommandExecutor` test suite with security validation
140
+ - Added `Configuration` validation tests
141
+ - Added `Orchestrator` sanitization tests
142
+ - Added RSpec test framework setup
143
+
144
+ ### Changed
145
+ - All shell command execution now uses secure `CommandExecutor` class
146
+ - Configuration loading includes validation and sanitization
147
+ - Error messages are more descriptive and actionable
148
+ - Command arguments are properly escaped to prevent injection
149
+ - Shell metacharacters are stripped from configuration values
150
+
151
+ ### Fixed
152
+ - Command injection vulnerabilities in `orchestrator.rb`, `task_manager.rb`, `mcp_integration.rb`, `generator.rb`
153
+ - Unsafe shell interpolation in Git hook generation
154
+ - Missing error handling for external command failures
155
+ - RuboCop violations for string literals, method complexity, and formatting
156
+ - Assignment in condition warnings
157
+
158
+ ## [0.1.0] - 2024-06-28
159
+
160
+ ### Added
161
+ - Initial release of EnhanceSwarm
162
+ - ENHANCE protocol implementation for multi-agent orchestration
163
+ - CLI with commands: init, enhance, spawn, monitor, status, doctor
164
+ - Automatic Claude configuration file generation
165
+ - Integration with swarm-tasks gem
166
+ - MCP tool support (Gemini CLI, Desktop Commander)
167
+ - Git hooks for quality control
168
+ - Comprehensive project templates
169
+ - Auto-setup script for easy installation
170
+ - Brief monitoring pattern (2 minutes max)
171
+ - Specialized agent roles (UX, Backend, Frontend, QA)
172
+ - Token optimization strategies
173
+ - ERB-based template system for customization
174
+
175
+ ### Features
176
+ - Automatic task breakdown based on content analysis
177
+ - Parallel agent spawning with git worktrees
178
+ - Background execution with periodic monitoring
179
+ - Flexible configuration via .enhance_swarm.yml
180
+ - Fallback support for file-based task management
181
+ - System dependency checking with doctor command
182
+
183
+ [0.1.1]: https://github.com/todddickerson/enhance_swarm/releases/tag/v0.1.1
184
+ [0.1.0]: https://github.com/todddickerson/enhance_swarm/releases/tag/v0.1.0
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Todd Dickerson
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.