enhance_swarm 2.1.1 β†’ 2.1.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: efab3e0b7d7a5857a84e8006ba7612488b61256be452dec37db8a4eba7f28477
4
- data.tar.gz: 85c815c417227d52c83a066339be608b3b4d0eefd209450fd437afb43fe07f17
3
+ metadata.gz: 7b8c5522c0ed58c3863fddfd4e6f11d0d091440ae2de4b863bfae7e7bece5b6b
4
+ data.tar.gz: 286889e00e4f50c6100d5012f1320bb06ce6270c6b6b9dbcce2cd26846c1a16c
5
5
  SHA512:
6
- metadata.gz: 8e7ef2f29f7cce7692ef55f96a739a002aa7b719811a1fe64fbd8657530c5c622a4ce5fa0ef45267a823743a5eee4a24dd25a62f84a07eefb94e934df4df5502
7
- data.tar.gz: ad70ada684db28963f44c030bffb4451a19873b303adb09f07d7c6e9968ebf130718c823e6ef8a93cf13a07ae1cc5b351784f270b24ebeef9e7fb58251e2144b
6
+ metadata.gz: 9ed4192cb031f30d8baa2fcd9762ef161e463c23d01b44f14a6c2663dcac11896001a23fc8fb523fd75caf38e63c4d1555523c782c38ae7bc334d82e20ebb93d
7
+ data.tar.gz: 97aeaaf8afcd9396f6441ae82666759aaa25c545eb693371731a3d991372a25d1c9e84065143aad3a45155d0a58519f830dbfafa9dd6b518d517e045cb23bf27
data/CHANGELOG.md CHANGED
@@ -5,6 +5,24 @@ All notable changes to EnhanceSwarm will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [2.1.1] - 2025-06-30
9
+
10
+ ### πŸ”§ Critical Bug Fixes
11
+
12
+ #### πŸ’₯ Production Issues Resolved
13
+ - **βœ… CRITICAL: Fixed Detached Mode Logging** - Absolute paths prevent log files from disappearing in background processes
14
+ - **βœ… CRITICAL: Fixed Bullet Train Super Scaffolding** - Non-interactive printf commands prevent NoMethodError on interactive prompts
15
+ - **βœ… Enhanced Non-Interactive Templates** - Comprehensive printf templates for common BT scaffolding patterns
16
+ - **βœ… Improved Status Reporting** - Better orchestration monitoring and error handling
17
+
18
+ #### πŸ› οΈ Technical Improvements
19
+ - **Detached Mode:** Fixed absolute path resolution for `.enhance_swarm/logs/` directory
20
+ - **BT Scaffolding:** Added `printf "y\\n[slug]\\n[icon]\\n"` templates for common Super Scaffolding patterns
21
+ - **Error Handling:** Enhanced subprocess error capture and reporting
22
+ - **Status Monitoring:** Reliable status file writing with working directory context
23
+
24
+ This patch release ensures production orchestration reliability with proper logging and Bullet Train scaffolding compliance.
25
+
8
26
  ## [2.1.0] - 2025-06-30
9
27
 
10
28
  ### πŸ”₯ Critical Orchestration Fixes & Production Enhancements
@@ -20,19 +20,37 @@ module EnhanceSwarm
20
20
  end
21
21
 
22
22
  def coordinate_task(description)
23
- Logger.info("🎯 Starting intelligent task coordination: #{description}")
23
+ Logger.info("🎯 ENHANCE SWARM TASK COORDINATOR ACTIVATED")
24
+ Logger.info("πŸ“‹ Master Task: #{description}")
25
+ Logger.info("πŸ” Beginning intelligent task analysis and decomposition...")
24
26
 
25
27
  # 1. Analyze project context
28
+ Logger.info("πŸ”¬ PHASE 1: Project Context Analysis")
26
29
  @project_analyzer.analyze
27
30
  project_context = @project_analyzer.generate_smart_defaults
28
31
 
32
+ project_type = project_context[:project_type] || 'Generic'
33
+ tech_stack = project_context[:technology_stack]&.join(', ') || 'Unknown'
34
+ Logger.info(" πŸ“Š Detected: #{project_type} project using #{tech_stack}")
35
+
29
36
  # 2. Break down task into specialized subtasks
37
+ Logger.info("🧩 PHASE 2: Intelligent Task Decomposition")
30
38
  subtasks = decompose_task(description, project_context)
39
+ Logger.info(" ⚑ Decomposed into #{subtasks.length} specialized agent tasks")
40
+ subtasks.each_with_index do |task, i|
41
+ Logger.info(" #{i+1}. #{task[:role].upcase}: #{task[:description]}")
42
+ end
31
43
 
32
44
  # 3. Create dependency-aware execution plan
45
+ Logger.info("πŸ—ΊοΈ PHASE 3: Dependency-Aware Execution Planning")
33
46
  execution_plan = create_execution_plan(subtasks)
47
+ phases = execution_plan[:phases].length
48
+ total_agents = execution_plan[:phases].sum { |p| p[:tasks].length }
49
+ Logger.info(" 🎯 Generated #{phases}-phase execution plan with #{total_agents} coordinated agents")
34
50
 
35
51
  # 4. Execute plan with coordination
52
+ Logger.info("πŸš€ PHASE 4: Multi-Agent Orchestration Launch")
53
+ Logger.info("═" * 60)
36
54
  execute_coordinated_plan(execution_plan)
37
55
  end
38
56
 
@@ -538,71 +556,134 @@ module EnhanceSwarm
538
556
  end
539
557
 
540
558
  def execute_coordinated_plan(plan)
541
- Logger.info("πŸš€ Executing coordinated plan with #{plan[:phases].length} phases")
559
+ Logger.info("🎯 MULTI-AGENT ORCHESTRATION STARTING")
560
+ Logger.info("πŸ“‹ Execution Plan: #{plan[:phases].length} phases with #{plan[:phases].sum { |p| p[:tasks].length }} specialized agents")
561
+
562
+ # Show complete coordination plan
563
+ plan[:phases].each_with_index do |phase, i|
564
+ agent_roles = phase[:tasks].map { |t| "#{t[:role].upcase}" }.join(", ")
565
+ Logger.info(" Phase #{i + 1}: [#{agent_roles}] - #{phase[:description]}")
566
+ end
567
+ Logger.info("πŸ€– Agent specializations defined, beginning coordinated execution...")
568
+ Logger.info("")
542
569
 
543
570
  plan[:phases].each_with_index do |phase, index|
544
- Logger.info("πŸ“ Phase #{index + 1}: #{phase[:description]}")
571
+ Logger.info("πŸš€ PHASE #{index + 1} ACTIVATION: #{phase[:description]}")
572
+ agent_count = phase[:tasks].length
573
+ agent_list = phase[:tasks].map { |t| "#{t[:role].upcase} Agent" }.join(", ")
574
+ Logger.info("πŸ‘₯ Deploying #{agent_count} specialized agents: #{agent_list}")
575
+
576
+ # Show dependencies for this phase
577
+ if index > 0
578
+ Logger.info("πŸ”— Dependencies: Awaiting completion of Phase #{index} handoffs")
579
+ end
545
580
 
546
581
  # Execute all tasks in this phase (they can run in parallel)
547
582
  phase_results = execute_phase(phase[:tasks])
548
583
 
549
584
  # Validate phase completion before proceeding
550
585
  if phase_results.all? { |result| result[:success] }
551
- Logger.info("βœ… Phase #{index + 1} completed successfully")
586
+ Logger.info("βœ… PHASE #{index + 1} COMPLETE: All agents completed successfully")
587
+
588
+ # Show what each agent accomplished
589
+ phase_results.each do |result|
590
+ Logger.info(" πŸ“‹ #{result[:role].upcase} Agent: #{result[:summary] || 'Task completed'}")
591
+ end
552
592
 
553
593
  # CRITICAL: Merge all agent worktree changes back to main project
594
+ Logger.info("πŸ”„ COORDINATION: Merging agent changes to main project...")
554
595
  merge_agent_changes_to_main(phase_results)
596
+ Logger.info("βœ… HANDOFF: Phase #{index + 1} work integrated, ready for next phase")
555
597
  else
556
- Logger.error("❌ Phase #{index + 1} had failures, stopping execution")
598
+ Logger.error("❌ PHASE #{index + 1} FAILED: Agent coordination breakdown")
599
+ failed_agents = phase_results.select { |r| !r[:success] }.map { |r| r[:role].upcase }
600
+ Logger.error(" 🚨 Failed agents: #{failed_agents.join(', ')}")
557
601
  break
558
602
  end
559
603
 
560
604
  # Brief pause between phases for coordination
561
- sleep(2) if index < plan[:phases].length - 1
605
+ if index < plan[:phases].length - 1
606
+ Logger.info("⏸️ COORDINATION PAUSE: Preparing next phase handoff...")
607
+ sleep(2)
608
+ Logger.info("")
609
+ end
562
610
  end
563
611
 
564
612
  # Final cleanup and commit of merged changes
613
+ Logger.info("🎯 ORCHESTRATION FINALIZATION: Integrating all agent work...")
565
614
  finalize_orchestration_results
615
+ Logger.info("πŸ† MULTI-AGENT ORCHESTRATION COMPLETE: Full team coordination successful!")
566
616
  end
567
617
 
568
618
  def execute_phase(tasks)
569
619
  results = []
570
620
  threads = []
571
621
 
572
- Logger.info("πŸš€ Starting parallel execution of #{tasks.length} tasks")
622
+ Logger.info("⚑ PARALLEL AGENT DEPLOYMENT: Activating #{tasks.length} specialized agents")
623
+
624
+ # Show agent deployment plan
625
+ tasks.each_with_index do |task, i|
626
+ dependencies = task[:dependencies]&.empty? ? "None" : task[:dependencies].join(", ")
627
+ Logger.info(" πŸ€– #{task[:role].upcase} Agent ##{i+1}: #{task[:description]}")
628
+ Logger.info(" πŸ“‹ Dependencies: #{dependencies}")
629
+ end
630
+ Logger.info("πŸš€ Beginning parallel agent execution...")
573
631
 
574
632
  # Execute tasks in parallel threads
575
- tasks.each do |task|
633
+ tasks.each_with_index do |task, index|
576
634
  thread = Thread.new do
577
635
  Thread.current[:task_id] = task[:id]
578
636
  Thread.current[:role] = task[:role]
579
637
 
580
638
  begin
639
+ Logger.info("🟒 AGENT ACTIVATION: #{task[:role].upcase} Agent starting work...")
640
+ Logger.info(" πŸ“Œ Task: #{task[:description]}")
641
+
581
642
  enhanced_prompt = build_enhanced_task_prompt(task)
582
643
 
583
644
  # Try agent spawning first
645
+ Logger.info(" πŸ”§ Spawning specialized #{task[:role]} agent in isolated worktree...")
646
+ start_time = Time.now
647
+
584
648
  result = @agent_spawner.spawn_agent(
585
649
  role: task[:role],
586
650
  task: enhanced_prompt,
587
651
  worktree: true
588
652
  )
589
653
 
654
+ execution_time = (Time.now - start_time).round(1)
655
+
590
656
  if result
591
657
  @agent_assignments[task[:id]] = result
592
- Logger.info("βœ… Spawned #{task[:role]} agent for task: #{task[:id]}")
593
- { task_id: task[:id], success: true, agent_info: result }
658
+ Logger.info("βœ… AGENT SUCCESS: #{task[:role].upcase} Agent completed in #{execution_time}s")
659
+ Logger.info(" πŸ“Š Work completed in isolated environment, ready for integration")
660
+ {
661
+ task_id: task[:id],
662
+ role: task[:role],
663
+ success: true,
664
+ agent_info: result,
665
+ execution_time: execution_time,
666
+ summary: "Specialized #{task[:role]} work completed successfully"
667
+ }
594
668
  else
595
669
  # Fallback to direct execution
596
- Logger.warn("⚠️ Agent spawn failed for #{task[:role]}, executing directly")
670
+ Logger.warn("⚠️ AGENT FALLBACK: #{task[:role]} agent spawn failed, using control agent")
597
671
  direct_result = execute_task_directly(task)
598
672
 
599
673
  if direct_result
600
- Logger.info("βœ… Control agent completed task directly: #{task[:id]}")
674
+ Logger.info("βœ… CONTROL AGENT: Completed #{task[:role]} task directly in #{execution_time}s")
601
675
  else
602
- Logger.error("❌ Control agent failed to execute task: #{task[:id]}")
676
+ Logger.error("❌ AGENT FAILURE: Control agent could not complete #{task[:role]} task")
603
677
  end
604
678
 
605
- { task_id: task[:id], success: direct_result, executed_directly: true }
679
+ {
680
+ task_id: task[:id],
681
+ role: task[:role],
682
+ success: direct_result,
683
+ executed_directly: true,
684
+ execution_time: execution_time,
685
+ summary: direct_result ? "Control agent handled task" : "Task failed"
686
+ }
606
687
  end
607
688
  rescue StandardError => e
608
689
  Logger.error("πŸ’₯ Task #{task[:id]} failed: #{e.message}")
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EnhanceSwarm
4
- VERSION = '2.1.1'
4
+ VERSION = '2.1.2'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: enhance_swarm
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.1
4
+ version: 2.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Todd Dickerson