%%{init: {'theme':'base', 'themeVariables': {'lineColor':'#888888', 'edgeLabelBackground':'#ffffff', 'clusterBorder':'#b0b0b0', 'clusterBkg':'#d4e8fb', 'primaryColor':'#ffe9b3'}}}%%
graph TB
    subgraph IDE["Developer IDE — VS Code"]
        Dev["👩‍💻 Developer"]
        Copilot["🤖 GitHub Copilot<br/>(Chat + Agent mode)"]
    end

    subgraph AGDT["AGDT Framework"]
        Agents["/agdt.* Chat Agents<br/>& Prompts"]
        CLI["agdt-* CLI commands<br/>(the 'macros')"]
        WF["Workflow Engine<br/>(state machine)"]
        State["JSON State Store<br/>(per-worktree)"]
        BG["Background Task<br/>Runner"]
        MCP["MCP Server<br/>(protocol bridge)"]
    end

    subgraph Ext["Integrated Services"]
        Git["Git / GitHub"]
        ADO["Azure DevOps"]
        Jira["Jira"]
        AI["App Insights / Azure"]
        PyPI["PyPI"]
    end

    Dev --> Copilot
    Copilot --> Agents
    Agents --> CLI
    Copilot -.MCP.-> MCP
    MCP --> CLI
    CLI --> WF
    CLI --> State
    CLI --> BG
    WF --> State
    BG --> Git & ADO & Jira & AI & PyPI
