update-workflow-diagram
Skill174 starsChanged 2 months agoMITView on GitHub
Convert the mermaid diagram in docs/workflow.md to a blueprint-styled SVG for the website. Use when the workflow diagram in agents.md is updated and needs to be reflected on the website.
In this repository59 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- agent-runtimeSkill
- arc42-documentationSkill
- authoring-rolesSkill
- context-packSkill
- create-agent-skillSkill
- create-pr-azdoSkill
- create-pr-githubSkill
- detect-diagram-crossingsSkill
- flowchart_layout_optimizerSkill
- generate-demo-artifactsSkill
- generate-release-screenshotsSkill
- git-rebase-mainSkill
- merge-conflict-resolutionSkill
- next-issue-numberSkill
- pre-pr-checklistSkill
- retrospective-evidenceSkill
- run-dotnet-testsSkill
- run-uatSkill
- run-workflowSkill
- update-test-snapshotsSkill
- view-pr-githubSkill
- watch-uat-azdo-prSkill
- watch-uat-github-prSkill
- website-accessibility-checkSkill
- website-create-examplesSkill
- website-devtoolsSkill
- website-quality-checkSkill
- website-visual-assetsSkill
- agent-runtimeSkill
- arc42-documentationSkill
- authoring-rolesSkill
- context-packSkill
- create-agent-skillSkill
- create-pr-azdoSkill
- create-pr-githubSkill
- detect-diagram-crossingsSkill
- flowchart_layout_optimizerSkill
- generate-demo-artifactsSkill
- generate-release-screenshotsSkill
- git-rebase-mainSkill
- merge-conflict-resolutionSkill
- next-issue-numberSkill
- pre-pr-checklistSkill
- retrospective-evidenceSkill
- run-dotnet-testsSkill
- run-uatSkill
- run-workflowSkill
- update-test-snapshotsSkill
- update-workflow-diagramSkill
- view-pr-githubSkill
- watch-uat-azdo-prSkill
- watch-uat-github-prSkill
- website-accessibility-checkSkill
- website-create-examplesSkill
- website-devtoolsSkill
- website-quality-checkSkill
- website-visual-assetsSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 3 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 14
After changes to the mermaid diagram in docs/workflow.md
- Distinctive: line 15
When adding, removing, or renaming agents/artifacts
- Distinctive: line 16
When modifying the workflow connections
- Very specific: line 22
Use mermaid-cli (mmdc) to render the mermaid diagram to SVG
- Distinctive: line 25
Keep each workflow in its own numbered sequence.
- Very specific: line 28
Keep the SVG self-contained (all styles inline or in <style> block)
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Update Workflow Diagram from Mermaid
Purpose
Regenerate the website/ai-workflow.svg file from the canonical mermaid diagram in docs/workflow.md. The website uses a hand-crafted blueprint-styled SVG that preserves the exact layout generated by mermaid but applies a custom visual style (technical drawing aesthetic with cyan/white on dark blue).
When to Use
- After changes to the mermaid diagram in
docs/workflow.md - When adding, removing, or renaming agents/artifacts
- When modifying the workflow connections
Hard Rules
Must
- Use mermaid-cli (
mmdc) to render the mermaid diagram to SVG - Parse the generated SVG to extract node positions and path definitions
- Preserve exact node positions and path routing from mermaid output
- Keep each workflow in its own numbered sequence; use plain labels rather than HTML bold or italic tags
- Preserve subgraph headings and nested transforms, and omit invisible links used only to order the layout
- Apply blueprint styling consistently per node type
- Keep the SVG self-contained (all styles inline or in
<style>block)
Must Not
- Manually calculate node positions (extract from rendered mermaid SVG)
- Manually recreate path curves (copy exact
dattributes from mermaid paths) - Change the visual styling without updating this skill documentation
Blueprint Style Reference
Colors
| Element | Color | Notes |
| Background | #0d1b2a | Dark navy blue |
| Grid lines | rgba(255,255,255,0.1) | Subtle white grid |
| Agent borders | #00ffff (cyan) | Solid 2px |
| Agent text | #ffffff (white) | Monospace font |
| Meta-agent borders | #34d399 (green) | Solid 2px |
| Meta-agent text | #34d399 (green) | Monospace font |
| Artifact borders | #ffffff (white) | Dashed 2px (2,2) |
| Artifact fill | rgba(0,255,255,0.1) | Subtle cyan |
| Artifact text | #00ffff (cyan) | Monospace font |
| Human borders | #ffffff (white) | Dashed 2px (4,2) |
| Human text | #00ffff (cyan) | Monospace font |
| Paths (solid) | #00ffff (cyan) | 2px without filters, so straight arrows render reliably |
| Paths (dashed/feedback) | #ff6b6b (coral red) | 2px, dasharray 6,3 |
| Arrow markers | Same as path color |
Node Classes (from mermaid)
| Mermaid Class | SVG Class | Description |
human | node-human | Maintainer (dashed white border) |
agent | node-agent | Regular agents (solid cyan border) |
metaagent | node-metaagent | Workflow Engineer (solid green border) |
artifact | node-artifact | Produced documents (dashed white, cyan fill) |
Glow Effects
Nodes have CSS filter glow. Edge paths have no filters: zero-width bounding boxes on perfectly vertical paths cause some SVG renderers to hide filtered arrows.
/* Nodes */
filter: drop-shadow(0 0 4px rgba(0,255,255,0.6));
Actions
One command. It extracts the mermaid block from docs/workflow.md, renders it with
mmdc for layout, and restyles the result:
scripts/render-workflow-diagram.py--check verifies the committed SVG was generated from the diagram as it stands now,
by comparing a source-sha256 stamp written into the file. It does not re-render, so it
needs no browser and runs in milliseconds — this is the CI check.
Mermaid lays out text by measuring it in a browser, so node coordinates depend on which fonts the machine has; a byte-for-byte comparison passes locally and fails in CI for no reason a reader could act on. The stamp catches the failure that matters — editing the diagram and forgetting to regenerate.
--check-render does the strict byte comparison against a fresh render. Use it on the
machine that generated the file, not in CI.
The stamp covers the diagram source, not this script: change the styling logic without
regenerating and --check still passes. If you edit the script, re-run it and commit the
SVG.
The script exists because this was a ten-step manual parse, and doing it by hand loses things quietly. Two failures found the first time it ran, neither visible in the output text:
- The Maintainer node vanished. It is a stadium, drawn as a free
<path>inside anouter-pathgroup — matching neither the<rect>nor the<polygon>pattern, so the node was skipped without an error. - The gate hexagons rendered ~100px from their own labels, because a mermaid
<polygon>carries its own innertransformin addition to the node group's. - Workflow lanes lost their headings and overlapped when nested subgraph transforms were ignored. The parser composes those translations for nodes, paths and labels.
- Invisible links used to order the workflows became visible arrows. They affect the Mermaid layout but must be omitted from the website SVG.
Always look at the rendered image before committing. A grep for the node names passes in both broken cases above.
npx --yes sharp-cli -i website/src/media-root/ai-workflow.svg -o .tmp/workflow-diagram.png resize 1400Node styling
| Mermaid classDef | SVG class | Appearance |
role | node-agent | solid cyan border, white text |
meta | node-metaagent | solid green border, green text |
external | node-external | solid pink border — the Codex reviewer |
gate | node-gate | amber hexagon, amber text |
artifact | node-artifact | dashed white border, cyan fill |
| (unclassed) | node-human | dashed white border, cyan text |
Adding a new classDef to the diagram means adding it to NODE_CLASS and STYLE in
the script; an unmapped class falls back to the human style, which will look wrong.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

