digraph system_diagram {
    label="Single Player System Diagram";

    UI;
    "Semantic Events";
    Resolution [label="AGO Resolution"];
    Transact [label="AGO Transact"];

    Datascript;

    UI -> "Semantic Events";
    "Semantic Events" -> Resolution [label="Composed of AGO"];
    Resolution -> Transact;
    Transact -> Datascript;

    Datascript -> UI [style=dotted; color=blue];
    Datascript -> Resolution [style=dotted; color=blue];
    Datascript -> "Semantic Events" [style=dotted; color=blue];

    subgraph cluster_legend {
        rank=sink;
        label="Legend";

        AGO [label=<AGO = Atomic Graph Operations>; shape=plaintext]
        A [shape=plaintext];
        B [shape=plaintext];
        C [shape=plaintext];
        D [shape=plaintext];

        { rank=same AGO }
        { rank=same A B }
        { rank=same C D }
        A->B [label="Invokes";];
        C->D [style=dotted; color=blue; label="Provides Context";];
        AGO -> A -> D [style=invis]
    }
}
