agentleFS
MicrosoftKnown publishermicrosoft/amplifier-bundle-recipes/skills/recipe-to-dot/SKILL.md

recipe-to-dot

Skill8 starsChanged 3 months agoMITView on GitHub

Convention for generating DOT flowchart diagrams from Amplifier recipe YAML files

  • In this repositoryOne other file it gives its agents.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Every diagram has Start and Done nodes

    line 28

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Recipe-to-DOT Convention

Purpose

Recipe YAML files define multi-step AI agent workflows, but they're hard to understand at a glance. DOT flowchart diagrams make recipes visually understandable. This skill documents the standard mapping from recipe YAML structure to DOT visual elements.

Visual Convention Mapping

Recipe ConceptDOT ShapeFill ColorStyle
Start/End nodesoval#e0e0e0 (gray)filled,rounded
Bash step (type: bash)box#bbdefb (blue)filled,rounded
Agent step (type: agent / default)box#c8e6c9 (green)filled,rounded
Sub-recipe call (type: recipe)box#e0e0e0 (gray)filled,rounded,dashed
Approval gatediamond#ffe0b2 (orange)filled
Condition decisiondiamond#fff9c4 (yellow)filled
Data/Outputnote or cylinder#e1bee7 (purple)filled

Graph Structure Rules

  • Graph flows top-to-bottom (rankdir=TB)
  • Every diagram has Start and Done nodes
  • Flat mode: steps flow sequentially, conditions get preceding diamonds
  • Staged mode: each stage is a cluster subgraph
  • Approval gates between stages when approval.required=true
  • Foreach/parallel get annotations on edges or node labels
  • While loops get dashed loop-back edges
  • Legend at bottom showing only step types actually used

Auto-labeling

Step IDs are converted to readable labels:

  • Split on hyphens, title-case each word
  • 3+ words split across 2 lines
  • Sub-recipe steps append "(sub-recipe)"

File Conventions

  • Recipe DOT files are co-located next to their source YAML file
  • Naming: same filename, different extension — .yaml → .dot and .png
    • recipes/validate-recipes.yaml → recipes/validate-recipes.dot + .png
    • examples/code-review-recipe.yaml → examples/code-review-recipe.dot + .png
  • Rendered with: dot -Tpng recipe-name.dot -o recipe-name.png

Programmatic Generation

The recipe_to_dot Python function in amplifier_module_tool_recipes.recipe_to_dot generates DOT deterministically from YAML:

from amplifier_module_tool_recipes.recipe_to_dot import recipe_to_dot, recipe_dot_hash

# Generate DOT string
dot = recipe_to_dot("path/to/recipe.yaml")

# Get hash for freshness checking
hash = recipe_dot_hash("path/to/recipe.yaml")

Freshness

DOT files embed a source_hash graph attribute that tracks the YAML's structural fingerprint. The validate-recipes recipe (Phase 7) compares this hash against the current YAML to detect stale diagrams — even when labels have been LLM-enhanced.

LLM Voice Enhancement (Default)

The standard generation pipeline (generate-recipe-docs recipe) includes an LLM pass that rewrites node labels so a non-technical person can understand them:

  • "Read Profile" → "Read Your Settings — What repos do we have?"
  • "Determine Tiers" → "Check For Changes — Look at git history"
  • "Structural Validation" → "Validate Structure — Are the YAML files well-formed?"

This is the default stance — visual documentation should be accessible to anyone. The LLM preserves all structural elements (node IDs, edges, shapes, colors) and only rewrites label text and the graph title.

To generate or regenerate flow diagrams for a repo:

amplifier tool invoke recipes operation=execute \
  recipe_path=recipes:recipes/generate-recipe-docs.yaml \
  context='{"repo_path": "/path/to/bundle-repo"}'

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.