"""
Genesis V2 Agents Module
=========================
Agent role definitions and team architecture.
"""

import logging
from typing import Dict, List

logger = logging.getLogger("genesis_v2.core.agents")


AGENT_ROLES = {
    "orchestrator": {
        "model": "opus-4.6",
        "role": "Strategic reasoning, task decomposition, orchestration",
        "tier": "STRATEGIC",
    },
    "complex_worker": {
        "model": "sonnet-4",
        "role": "Implementation, complex coding, architecture",
        "tier": "TACTICAL",
    },
    "simple_worker": {
        "model": "haiku-4",
        "role": "Exploration, summarization, verification, data processing",
        "tier": "EXECUTION",
    },
    "gemini_flash": {
        "model": "gemini-3-flash",
        "role": "High-volume parallel execution, code gen, testing",
        "tier": "EXECUTION",
    },
}


TEAM_ARCHITECTURE = {
    "name": "Agent Teams Architecture",
    "pattern": "B-Thread pattern from IndyDevDan framework, now production-grade via Agent Teams",
    "roles": [
        {"role": "Team Lead", "description": "Coordinates, spawns teammates, synthesizes (Opus 4.6 orchestrator)"},
        {"role": "Teammates", "description": "Independent workers with own context (Sonnet/Haiku for cost efficiency)"},
        {"role": "Shared Task List", "description": "DAG-based work coordination (centralized hub)"},
        {"role": "Mailbox", "description": "Direct inter-agent messaging via SendMessage (MOST IMPORTANT tool)"},
    ],
}


def get_team_info() -> Dict:
    """Get current team architecture info."""
    return TEAM_ARCHITECTURE


def get_agent_roles() -> List[Dict]:
    """Get all defined agent roles."""
    return [{"name": k, **v} for k, v in AGENT_ROLES.items()]
