Mermaid Agent Flow with MAIDR

An agent's steps, tools and decisions are read inside its flow, each branch with its label.

agentflow-beta TB
  flow reviewer["Review Agent"]
    changes["Gather changes"]@{ shape: input }
    analyse["Analyse diff"]@{ shape: task }
    lint["run_linter"]@{ shape: tool }
    ok["Clean?"]@{ shape: decision }
    approve["Approve"]@{ shape: action }
    comment["Leave comments"]@{ shape: action }
    changes --> analyse --> lint --> ok
    ok -- yes --> approve
    ok -- no --> comment
  end