{
 "schema": "aiblocks-page/1",
 "id": "agency-specialized-workflow-architect",
 "type": "agent",
 "name": "Workflow specification writer",
 "summary": "Turn a feature into a workflow spec with every path, failure, cleanup and test case written down before anyone builds it.",
 "headline": "Workflow specification writer",
 "subhead": "Describe a workflow, such as signup or checkout, and share the code or notes you have. Your AI maps each step, what can go wrong and what must be cleaned up. You get a build-ready spec that engineers can build from and testers can test from.",
 "job": {
  "id": "document-work",
  "name": "Write down how work gets done"
 },
 "level": "intermediate",
 "thinking": "high",
 "tested": true,
 "updated": "2026-10-28",
 "first_published": "2026-10-26",
 "inputs": [
  {
   "type": "question",
   "required": true,
   "label": "Question",
   "what": "the problem, decision or piece of work you want help with, and what a good outcome looks like"
  },
  {
   "type": "codebase",
   "required": false,
   "label": "Codebase",
   "what": "a project's code, in a folder or repo the AI can open"
  }
 ],
 "outputs": [
  {
   "type": "document",
   "required": true,
   "label": "Document",
   "what": "a finished document, such as a Word file, a PDF or a page of notes"
  }
 ],
 "you_give": [
  "The workflow to spec, with its name, what starts it and the result you want",
  "The systems and people involved, such as the app, a payment service and an admin",
  "Code, routes, a database schema, config or design notes, if you have them (optional)",
  "Failures you already know about, or fear (optional)",
  "Time limits or service targets for the workflow (optional)"
 ],
 "you_get": [
  "A workflow spec with the steps, each with time limit, input, success output and failure branches",
  "A list of what the customer, the operator and the database show at each step",
  "A cleanup path that undoes partial work, with a list of everything created",
  "A table of handoffs between systems, with the data, success reply, failure reply and time limit",
  "A test case for every branch",
  "A list of assumptions and open questions that need a person to answer"
 ],
 "use_when": [
  "You are about to build a feature with several steps or systems, such as signup, checkout or account deletion.",
  "A flow fails midway in production and leaves half-created records, and you want the full set of paths written down.",
  "You hand a feature to a developer or a testing team and want them to stop asking what happens if it fails.",
  "You inherited a system and want to find the workflows that exist in the code but have no spec."
 ],
 "skip_when": [
  "You want to design how several AI agents hand work to each other. Use the AI agent workflow designer.",
  "You want an automation laid out in n8n. Use the n8n workflow designer.",
  "The process is a business process with people and paperwork, not software. Use the Operations Manager agent.",
  "You want a short task plan for a coding change. Use the Coding task planner."
 ],
 "output_sample": {
  "input": [
   "The workflow to spec, with what starts it and what it should produce",
   "The systems and people involved",
   "Code, routes, schema or design notes (optional)",
   "Known failures or fears (optional)"
  ],
  "prerequisites": [
   "An AI that can open files, if you want it to read your code"
  ],
  "output": [
   {
    "name": "Overview, actors and trigger",
    "contains": "What the workflow does, who is in it, what must be true first and what starts it."
   },
   {
    "name": "Workflow tree",
    "contains": "Each step with its time limit, input, outputs, failure branches and what each party sees."
   },
   {
    "name": "Cleanup path and inventory",
    "contains": "How partial work is undone, and a list of everything the workflow creates."
   },
   {
    "name": "Handoff contracts",
    "contains": "For each system boundary, the data sent, success and failure replies and the time limit."
   },
   {
    "name": "Test cases",
    "contains": "One test for every branch in the tree, with the trigger and the expected result."
   },
   {
    "name": "Assumptions and open questions",
    "contains": "Everything the AI could not verify, with the risk if it is wrong."
   }
  ]
 },
 "output_shape": "# WORKFLOW: <name>\nVersion: <0.1> | Date: <date> | Status: Draft\n\n## Overview\n<what it does, who starts it, what it produces>\n\n## Actors\n<actor> | <role in this workflow>\n\n## Prerequisites and trigger\n<what must be true first> | <what starts it>\n\n## Workflow tree\nSTEP <n>: <name> | Actor: <who> | Timeout: <time>\n  Input: <fields> | Success output: <fields> then GO TO <next step>\n  Failure branches: <type> then <recovery>\n  Observable states: customer sees <x> | operator sees <y> | database holds <z> | logs show <w>\n\n## Cleanup path and cleanup inventory\n<resource> | <created at step> | <how it is removed>\n\n## State transitions\n<state> to <state> when <condition>\n\n## Handoff contracts\n<system A> to <system B> | payload | success reply | failure reply | timeout\n\n## Test cases\n<test> | <trigger> | <expected behavior>\n\n## Assumptions and open questions\n<assumption> | <where verified or not verified> | <risk if wrong>",
 "how_to_use": [
  "Add the pack as a skill, or paste SKILL.md and then references/source-agent.md into a new chat.",
  "Name one workflow and say what starts it. Paste or upload any code, routes or notes. Say who the actors are.",
  "Run it once for one workflow. If the AI spots a related workflow, it will name it and leave it for the next run.",
  "Read the assumptions and open questions first. Answer them, or send them to the engineer who knows.",
  "Check the spec against the real code. Mark what matches and what does not. Do not approve a spec that nobody has compared with the code.",
  "Give the spec to the developer and give the test case table to whoever tests."
 ],
 "checks": [
  "The result addresses your actual task and cites the evidence used.",
  "Examples, role-play experience and targets are kept separate from verified results.",
  "Claims of tests, memory, tool access or completed actions match what actually happened."
 ],
 "next": [
  {
   "name": "SOP and runbook checker",
   "url": "https://useaiblocks.com/skills/sop-and-runbook-checker",
   "why": "SOP and runbook checker"
  },
  {
   "name": "Recurring task procedure writer",
   "url": "https://useaiblocks.com/skills/repeat-task-step-guide-writer",
   "why": "Recurring task procedure writer"
  },
  {
   "name": "Documentation system planner",
   "url": "https://useaiblocks.com/skills/documentation-system-planner",
   "why": "Documentation system planner"
  }
 ],
 "source": {
  "by": "Michael Sitarzewski and Agency Agents contributors",
  "repo": "msitarzewski/agency-agents",
  "url": "https://github.com/msitarzewski/agency-agents/blob/b37b5bb33b78f2c1d6567d98e25ca818e3259219/specialized/specialized-workflow-architect.md",
  "licence": "MIT",
  "original_name": "Workflow Architect",
  "commit": "b37b5bb33b78f2c1d6567d98e25ca818e3259219"
 },
 "credits": [
  {
   "title": "Workflow Architect",
   "by": "Michael Sitarzewski and Agency Agents contributors",
   "url": "https://github.com/msitarzewski/agency-agents/blob/b37b5bb33b78f2c1d6567d98e25ca818e3259219/specialized/specialized-workflow-architect.md",
   "used": "Original agent profile, preserved in references/source-agent.md; AI Blocks adds setup and review instructions."
  }
 ],
 "files": [
  "LICENSE",
  "references/source-agent.md",
  "SETUP.md",
  "source.json"
 ],
 "links": {
  "page": "https://useaiblocks.com/agents/agency-specialized-workflow-architect",
  "markdown": "https://useaiblocks.com/agents/agency-specialized-workflow-architect.md",
  "json": "https://useaiblocks.com/agents/agency-specialized-workflow-architect.json",
  "instructions": "https://useaiblocks.com/skills/agency-specialized-workflow-architect/SKILL.md",
  "download": "https://useaiblocks.com/skills/agency-specialized-workflow-architect.zip",
  "api_item": "https://useaiblocks.com/api/v1/items/agency-specialized-workflow-architect",
  "api_document": "https://useaiblocks.com/api/v1/documents/agent/agency-specialized-workflow-architect",
  "mcp": "https://useaiblocks.com/mcp"
 }
}
