digraph AllNodeTypes {
    start [shape=Mdiamond, label="Start"]
    plan [label="Plan"]
    approve [shape=hexagon, label="Approve Plan"]
    implement [label="Implement", prompt="Read plan.md and implement every step."]
    spec [label="Write Spec", shape=tab, prompt="Write a brief spec for a string utility module."]
    test [label="Run Tests", shape=parallelogram, script="cargo test 2>&1 || true"]
    gate [shape=diamond, label="Tests passing?"]
    cooldown [label="Wait 30s", shape=insulator, duration="30s"]
    fork [label="Fan Out", shape=component, join_policy="wait_all"]
    security [label="Security Review"]
    architecture [label="Architecture Review"]
    quality [label="Quality Review"]
    merge [label="Merge Results", shape=tripleoctagon]
    exit [shape=Msquare, label="Exit"]

    start -> plan -> approve
    approve -> spec [label="[A] Approve"]
    approve -> plan [label="[R] Revise"]
    spec -> implement -> test -> gate
    gate -> fork      [label="Pass", condition="outcome=success"]
    gate -> cooldown  [label="Fix"]
    cooldown -> implement
    fork -> security
    fork -> architecture
    fork -> quality
    security     -> merge
    architecture -> merge
    quality      -> merge
    merge -> exit
}
