SOP-Encoded Multi-Agent Workflow
Encode a human Standard Operating Procedure (roles, ordered phases, typed hand-off artifacts) into a multi-agent pipeline — agents communicate through structured documents, not free-form chat.
Intent & Description
🎯 Intent
Encode a human Standard Operating Procedure (roles, ordered phases, standardised hand-off artifacts) into a multi-agent pipeline so agents communicate through structured documents rather than free-form chat.
📋 Context
The task is a complex, repeatable process — software development, document production, regulatory submission — that already has a well-known human SOP. The SOP names specific roles and specifies deliverables that pass between them: requirements document, then design, then code, then test report. The shape is already understood; what’s being automated is the execution.
💡 Solution
Encode the SOP as: (a) a fixed set of named roles, each with a role-specific prompt and tool palette, (b) an ordered sequence of phases, (c) a typed artifact contract at each phase boundary (PRD → design doc → code → test plan → user manual). Agents communicate via artifacts; a shared message pool with subscription filters routes only relevant context to each role.
Real-world Use Case
- A complex repeatable task already has a documented human SOP with named roles.
- Hand-off artifacts between phases can be typed (PRD, design doc, code, test plan).
- An auditable trail of artifacts at every phase boundary is required.
Source
📌 TL;DR
Take the human SOP, give each role its own prompt and tools, type the hand-off artifacts between phases — agents communicate through structured documents and the audit trail comes for free.
Advantages
- Auditable artifact trail at every phase boundary — who produced what, in what order.
- Specialised role prompts consistently beat one mega-prompt on long, multi-discipline tasks.
- Typed artifact schemas catch ambiguity at the hand-off boundary, not at the final deliverable.
Disadvantages
- Designing the artifact contracts is the real work — bad contracts propagate errors to every downstream role.
- Procedure rigidity makes the system brittle when the actual task doesn’t match the SOP exactly.
- Token cost scales with the number of phases — long SOPs get expensive.