19 Interface and workflow diagrams
raco mcp diagram module.rkt emits a Mermaid flowchart from the static manifest. manifest->mermaid, exported by mcp/cli, accepts an already read manifest and returns the same text. Neither operation runs application handlers.
The diagram shows declarations, dotted resource-reference and prompt-completion edges, workflow entry points, sequential stage transitions, numbered branch alternatives, explicit joins, and effect adapters labelled with their policy. Completion stages have no implicit outgoing transition. Imported resources outside the local manifest are labelled external or unresolved. Unresolved prompt targets receive the same explicit treatment. Generated manifests use lexical local targets; older manifests lacking these fields use source/name hints. Explicit external targets never fall back to those hints. Ambiguous matches remain explicit.
All node identifiers are generated. Declaration and stage names are escaped as quoted labels using Mermaid decimal entities. The diagram does not execute callbacks, render HTML supplied by declarations, or infer additional edges from separately defined helpers or dynamic composition expressions.