Skip to content

LeoYeAI/agent-master-skills / skills/agent-avengers

agent-avengers

Verified

올인원 멀티에이전트 오케스트레이션. 복잡한 태스크를 자동으로 분해하고, 전문 에이전트들을 즉석에서 생성/스폰하여 병렬 처리 후 결과를 통합합니다. TRIGGERS: avengers assemble, 어벤저스, agent-avengers, 멀티에이전트 자동화, 에이전트 팀 구성, 자동 에이전트

FileKindSize
ANNOUNCEMENT.mdmarkdown1.7 KB
README-kr.mdmarkdown1.0 KB
README.mdmarkdown2.7 KB
SKILL.mdskill md22.9 KB
_meta.jsonconfig283 B
examples/app-development.jsonconfig1.3 KB
examples/competitor-analysis.jsonconfig1.1 KB
package.jsonmanifest653 B
pytest.iniconfig125 B
scripts/assemble.pyscript10.0 KB
scripts/consolidate.pyscript6.4 KB
scripts/execute.pyscript6.5 KB
scripts/monitor.pyscript6.3 KB
tests/__init__.pyscript23 B
tests/test_assemble.pyscript7.8 KB
tests/test_consolidate.pyscript6.4 KB

tests/test_consolidate.py

View on GitHub
#!/usr/bin/env python3
"""Tests for consolidate.py"""

import json
import os
import sys
import tempfile
import pytest
from pathlib import Path

sys.path.insert(0, str(Path(__file__).parent.parent / "scripts"))

from consolidate import (
    collect_outputs,
    validate_outputs,
    generate_summary,
)


class TestCollectOutputs:
    """Test collecting agent output files"""
    
    def test_collect_existing_outputs(self):
        with tempfile.TemporaryDirectory() as tmpdir:
            mission_path = Path(tmpdir)
            outputs_dir = mission_path / "outputs"
            outputs_dir.mkdir()
            
            # Create sample output files
            (outputs_dir / "agent_01.md").write_text("# Agent 1 Output\nResult A")
            (outputs_dir / "agent_02.md").write_text("# Agent 2 Output\nResult B")
            
            plan = {
                "commands": [
                    {"agent_id": "agent_01"},
                    {"agent_id": "agent_02"}
                ]
            }
            
            results = collect_outputs(mission_path, plan)
            
            assert len(results) == 2
            assert results[0]["status"] == "completed"
            assert results[1]["status"] == "completed"
            assert "Result A" in results[0]["content"]
    
    def test_handle_missing_output(self):
        with tempfile.TemporaryDirectory() as tmpdir:
            mission_path = Path(tmpdir)
            outputs_dir = mission_path / "outputs"
            outputs_dir.mkdir()
            
            plan = {
                "commands": [
                    {"agent_id": "missing_agent"}
                ]
            }
            
            results = collect_outputs(mission_path, plan)
            
            assert len(results) == 1
            assert results[0]["status"] == "missing"
            assert results[0]["content"] is None


class TestValidateOutputs:
    """Test output validation"""
    
    def test_all_completed(self):
        results = [
            {"agent_id": "a1", "status": "completed", "size": 100},
            {"agent_id": "a2", "status": "completed", "size": 200}
        ]
        
        validation = validate_outputs(results)
        
        assert validation["total"] == 2
        assert validation["completed"] == 2
        assert validation["missing"] == 0
        assert validation["success"] is True
    
    def test_some_missing(self):
        results = [
            {"agent_id": "a1", "status": "completed", "size": 100},
            {"agent_id": "a2", "status": "missing", "size": 0}
        ]
        
        validation = validate_outputs(results)
        
        assert validation["completed"] == 1
        assert validation["missing"] == 1
        assert validation["success"] is False
        assert len(validation["issues"]) == 1
    
    def test_empty_outputs(self):
        results = [
            {"agent_id": "a1", "status": "completed", "size": 0}
        ]
        
        validation = validate_outputs(results)
        
        assert validation["empty"] == 1
        assert validation["success"] is False


class TestGenerateSummary:
    """Test summary generation"""
    
    def test_summary_structure(self):
        mission = {
            "id": "test_123",
            "task": "Test mission",
            "created_at": "2026-02-06T12:00:00"
        }
        
        results = [
            {
                "agent_id": "agent_01",
                "status": "completed",
                "content": "Research findings here",
                "size": 50
            }
        ]
        
        validation = {
            "total": 1,
            "completed": 1,
            "missing": 0,
            "empty": 0,
            "success": True,
            "issues": []
        }
        
        summary = generate_summary(mission, results, validation)
        
        assert "test_123" in summary
        assert "Test mission" in summary
        assert "Research findings here" in summary
        assert "✅ 성공" in summary
    
    def test_summary_with_issues(self):
        mission = {
            "id": "test_456",
            "task": "Failed mission",
            "created_at": "2026-02-06T12:00:00"
        }
        
        results = [
            {"agent_id": "a1", "status": "missing", "content": None, "size": 0}
        ]
        
        validation = {
            "total": 1,
            "completed": 0,
            "missing": 1,
            "empty": 0,
            "success": False,
            "issues": ["누락: a1"]
        }
        
        summary = generate_summary(mission, results, validation)
        
        assert "⚠️ 일부 실패" in summary
        assert "누락: a1" in summary


class TestConsolidateIntegration:
    """Integration tests for consolidation"""
    
    def test_full_consolidation_workflow(self):
        with tempfile.TemporaryDirectory() as tmpdir:
            mission_path = Path(tmpdir)
            outputs_dir = mission_path / "outputs"
            outputs_dir.mkdir()
            
            # Create mission file
            mission = {
                "id": "integration_test",
                "task": "Test consolidation workflow",
                "created_at": "2026-02-06T12:00:00",
                "agents": [
                    {"id": "agent_01", "type": "researcher"},
                    {"id": "agent_02", "type": "analyst"}
                ]
            }
            (mission_path / "mission.json").write_text(json.dumps(mission))
            
            # Create plan
            plan = {
                "commands": [
                    {"agent_id": "agent_01"},
                    {"agent_id": "agent_02"}
                ]
            }
            
            # Create output files
            (outputs_dir / "agent_01.md").write_text("# Research\nFound important data about X.")
            (outputs_dir / "agent_02.md").write_text("# Analysis\nData shows trend Y.")
            
            # Collect outputs
            results = collect_outputs(mission_path, plan)
            assert len(results) == 2
            
            # Validate
            validation = validate_outputs(results)
            assert validation["success"] is True
            
            # Generate summary
            summary = generate_summary(mission, results, validation)
            
            assert "integration_test" in summary
            assert "Found important data" in summary
            assert "Data shows trend" in summary


if __name__ == "__main__":
    pytest.main([__file__, "-v"])
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 472kUpdated Claude CodeCodexUnverifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall