{
  "id": "recipe.branch-condition-flow",
  "goal": "Create or repair condition branches.",
  "readFirst": [
    "/llm/schema/wire-diagram.json",
    "/llm/validation.shape.json"
  ],
  "preferredPath": [
    "Create a condition node with branches: ['yes', 'no'] or domain-specific slug names.",
    "Connect each branch target by setting target.from to '<conditionId>.<branch>'.",
    "Use MCP add_node with from plus branch, or pass the full branched ref directly.",
    "Validate for edge.unknown-branch and condition.unused-branch.",
    "Use explicit edge labels only when the visual label needs to differ from branch names."
  ],
  "minimalJsonNodes": [
    {
      "id": "route",
      "kind": "condition",
      "title": "Route?",
      "branches": [
        "sales",
        "support"
      ],
      "from": "classify"
    },
    {
      "id": "sales",
      "kind": "action",
      "title": "Create sales lead",
      "from": "route.sales"
    },
    {
      "id": "support",
      "kind": "action",
      "title": "Open support ticket",
      "from": "route.support"
    }
  ],
  "avoid": [
    "Do not set branch targets with source/target fields on nodes.",
    "Do not use branch names that are absent from the condition branches array.",
    "Do not put dots or spaces in branch names."
  ]
}
