graph TB
    INPUT["Proof Upload<br/>(Image / PDF)"] --> DECODE["Decode & Rasterize"]
    DECODE --> PARALLEL

    subgraph PARALLEL ["Parallel Agent Execution"]
        direction LR
        LEGAL["Legal Agent<br/>Advertising standards,<br/>disclaimers, financial<br/>promotion detection"]
        BRAND["Brand Agent<br/>Logo usage, colors,<br/>typography, design<br/>principles"]
        CBP["Channel Best<br/>Practices Agent<br/>Platform guidelines,<br/>accessibility"]
        CTS["Channel Tech<br/>Specs Agent<br/>Dimensions, file size,<br/>format compliance"]
    end

    PARALLEL --> LEAD["Lead Agent<br/>(Synthesis)"]

    LEAD --> DECISION{RAG Decision}
    DECISION -->|"All pass,<br/>max 1 amber/agent,<br/>no Legal amber"| GREEN["GREEN<br/>Passed"]
    DECISION -->|">1 issue/agent,<br/>or Legal amber"| AMBER["AMBER<br/>Requires Manual<br/>Legal Review"]
    DECISION -->|"Any Red"| RED["RED<br/>Failed"]

    subgraph "Revision-Aware"
        PREV["Previous Version<br/>Analysis"] -.->|"Context"| LEGAL
        PREV -.->|"Context"| BRAND
        PREV -.->|"Context"| CBP
        PREV -.->|"Context"| CTS
    end

    classDef input fill:#006DE3,stroke:#1A2142,color:#fff
    classDef agent fill:#1A2142,stroke:#006DE3,color:#fff
    classDef lead fill:#7A0FF9,stroke:#1A2142,color:#fff
    classDef green fill:#09821F,stroke:#1A2142,color:#fff
    classDef amber fill:#FFBA00,stroke:#1A2142,color:#1A2142
    classDef red fill:#E3000F,stroke:#1A2142,color:#fff
    classDef revision fill:#01A1A2,stroke:#1A2142,color:#fff

    class INPUT,DECODE input
    class LEGAL,BRAND,CBP,CTS agent
    class LEAD lead
    class GREEN green
    class AMBER amber
    class RED red
    class PREV revision
