Issue #114: feat: Issue解決エージェントとtmux分散Workerの実連携システム実装

Opened 2025/7/16 by @nyasuto Open
priority: high type: feature

Description

🎯 Type: Feature

Priority: HIGH

Impact: New Architecture Integration

Component: examples/poc/issue_solver_agent.py, scripts/start_hive_distributed.sh

Files:

  • examples/poc/issue_solver_agent.py
  • scripts/start_hive_distributed.sh
  • scripts/worker_communication.py (新規)
  • config/worker_config.yaml (新規)

Problem Description

現在のIssue解決エージェントは自己完結型シミュレーションで動作しており、tmux分散システムで起動した実際のWorkerと連携していません。

現在の状況:

  • issue_solver_agent.py: 内部シミュレーションで完結
  • tmux workers: 7つのWorkerが待機中(beekeeper, queen, developer, tester, analyzer, documenter, reviewer)
  • 両システムが独立して動作

問題点:

  1. 実際のWorkerとの通信機能が未実装
  2. tmux環境での実処理が行われていない
  3. 真の分散処理が実現されていない

Recommended Solution

1. Worker通信システム実装

# scripts/worker_communication.py
class WorkerCommunicator:
    def send_task_to_worker(self, worker_name: str, task: dict) -> dict
    def collect_worker_results(self, session_id: str) -> dict
    def monitor_worker_status(self) -> dict

2. tmux統合機能

  • issue_solver_agent.pyからtmuxコマンド実行
  • 各WorkerペインでClaudeインスタンス起動
  • 結果収集・統合システム

3. 実装手順

# Step 1: Worker通信基盤
python examples/poc/issue_solver_agent.py "Issue 84の内容を教えて"
# → tmux documenter ペインに実際のタスク送信

# Step 2: 結果収集
# → documenter ペインから実際のGitHub Issue情報取得

# Step 3: 統合結果表示
# → BeeKeeperペインに実際の結果表示

4. 設定システム

# config/worker_config.yaml
workers:
  developer:
    tmux_pane: "hive:developer"
    claude_command: "claude-code --role=developer"
  tester:
    tmux_pane: "hive:tester"
    claude_command: "claude-code --role=tester"
  # ... 他のWorker

Technical Requirements

必要な機能:

  1. tmux通信: Python→tmuxペイン間でのコマンド送信
  2. Claude起動: 各WorkerペインでのClaude Code実行
  3. 結果収集: 各Workerからの結果取得・解析
  4. エラーハンドリング: Worker障害時の復旧機能
  5. 進捗監視: リアルタイムでの作業状況表示

パフォーマンス目標:

  • Worker起動時間: 5秒以内
  • タスク完了時間: 実際のIssue処理に応じて
  • 結果統合時間: 3秒以内

Acceptance Criteria

  • issue_solver_agent.pyがtmux Workerに実際のタスクを送信
  • 各WorkerペインでClaudeインスタンスが起動・実行
  • 実際のGitHub Issue情報が取得・表示される
  • 複数Worker並列実行が正常動作
  • エラー時の適切な処理・復旧機能
  • 進捗状況のリアルタイム表示
  • make quality でエラーが発生しない

Implementation Notes

段階的実装:

  1. Phase 1: 単一Worker通信(documenter のみ)
  2. Phase 2: 複数Worker並列実行
  3. Phase 3: エラーハンドリング・監視機能
  4. Phase 4: パフォーマンス最適化

技術的考慮事項:

  • tmux send-keys によるコマンド送信
  • ファイルベースまたはSocket通信での結果収集
  • Worker間の依存関係管理
  • セッション管理とクリーンアップ

新アーキテクチャの真の分散処理実現により、Hiveの実用性が大幅に向上します

Comments

コメント機能は現在実装されていません。
GitHub API の comments エンドポイントを統合する予定です。

🤖 AI分析

分類結果

✨ 新機能
🟠 高
76 スコア
カテゴリ 40
優先度 36
0

適用されたルール

Enhanced Feature Request Detection
• Body contains keyword: "feature"• Has matching label: "feature"
feature
Enhanced Bug Detection
• Title contains keyword: "issue"• Title matches pattern: /\b(bug|error|issue|fix|crash|fail)\b/i
issue

Details

Assignees:

None

Milestone:

None

Created:

2025/7/16

Updated:

2025/7/16