DocsDiagram kinds

Workflow

Steps done by different owners, in order: a release process, an incident runbook, an agent’s tool call.

Owners are lanes, top to bottom in the order you list them, and stackmap picks the columns from the edges. Put failure and recovery in a lane of their own with tone exception, and label the columns with phases.

An example

The skill’s own example, release.workflow.json, laid out by stackmap.

file:///…/.stackmap/release/diagram.html
release.workflow.json126 lines
{  "kind": "workflow",  "title": "Release delivery",  "subtitle": "From merge to announced release",  "lanes": [    { "id": "ci", "label": "Continuous integration" },    { "id": "prod", "label": "Production" },    {      "id": "rollback",      "label": "Failure and rollback",      "tone": "exception"    }  ],  "phases": [    {      "id": "verify",      "label": "Build and verify",      "nodes": ["build", "checks", "stop"]    },    {      "id": "promote",      "label": "Promote",      "nodes": ["approve", "deploy", "verify", "revert"]    }  ],  "nodes": [    {      "id": "build",      "type": "service",      "lane": "ci",      "card": {        "title": "Build",        "subtitle": "Locked inputs",        "brand": "githubactions"      }    },    {      "id": "checks",      "type": "security",      "lane": "ci",      "card": {        "title": "Quality gates",        "subtitle": "Test and scan",        "tag": "blocking"      }    },    {      "id": "approve",      "type": "security",      "lane": "prod",      "card": {        "title": "Approve",        "subtitle": "Release owner",        "tag": "human gate"      }    },    {      "id": "deploy",      "type": "gateway",      "lane": "prod",      "card": {        "title": "Deploy",        "subtitle": "Canary 10%",        "brand": "kubernetes"      }    },    {      "id": "verify",      "type": "service",      "lane": "prod",      "card": { "title": "Verify", "subtitle": "Smoke and SLO" }    },    {      "id": "stop",      "type": "security",      "lane": "rollback",      "card": { "title": "Stop release", "subtitle": "Gate failed" }    },    {      "id": "revert",      "type": "queue",      "lane": "rollback",      "card": {        "title": "Rollback",        "subtitle": "Last good image",        "tag": "owner: on-call"      }    }  ],  "edges": [    { "id": "e1", "from": "build", "to": "checks", "tone": "main" },    { "id": "e2", "from": "checks", "to": "approve", "tone": "main" },    { "id": "e3", "from": "approve", "to": "deploy", "tone": "main" },    { "id": "e4", "from": "deploy", "to": "verify", "tone": "main" },    {      "id": "e5",      "from": "checks",      "to": "stop",      "label": "red",      "tone": "error"    },    {      "id": "e6",      "from": "verify",      "to": "revert",      "label": "unhealthy",      "tone": "error"    },    {      "id": "e7",      "from": "revert",      "to": "deploy",      "label": "restore",      "kind": "return"    }  ],  "notes": [    {      "title": "Stop conditions",      "items": [        "A red gate stops promotion",        "An unhealthy release rolls back to the last good image"      ]    }  ]}
Point at a node in the JSON, or at its card, to find the other.

Its parts

  • Lanes

    One owner each; four to six read well.

  • Phases

    Headers over the columns they span.

  • Exception lane

    Failure and recovery, dashed.

  • Tags

    A short pill on a compact card: human gate.

Rules

From the authoring contract the skill gives your agent. stackmap validate enforces the hard ones and names the fix.

  • Lanes are owners, top to bottom in the order you list them, and every node needs a lane. Four to six read well.
  • stackmap picks the columns from the edges: a step’s successor in the same lane moves right; a hand-off to another lane may drop straight down.
  • Put failure and recovery in a lane of their own, with "tone": "exception".
  • Phases (phases with nodes) label the columns: list them in order, and put each node in at most one.
  • Groups frame a few neighbouring steps in one lane; "tone": "security" marks a policy stop. They can’t span lanes or nest.
  • Cards are compact: title, subtitle, brand and a short tag pill. Workflow nodes use the component types: who or what does the step.

Ask for one

Draw our release process as a workflow, with a lane for rollbacks.

Your agent picks the kind that answers the question; naming it is the surest way to get it.

Examples

See workflow examples in the gallery