> ## Documentation Index
> Fetch the complete documentation index at: https://developer.watson-orchestrate.ibm.com/llms.txt
> Use this file to discover all available pages before exploring further.

# sop-builder skill

The `sop-builder` skill converts complex technical workflows (such as BPMN diagrams, Langflow JSON files, and n8n export files) or procedural specifications into business-readable Standard Operating Procedures (SOPs).

**Source location:** [`skills/sop-builder/SKILL.md`](https://github.com/IBM/ibm-watsonx-orchestrate-adk/blob/main/skills/sop-builder/SKILL.md) in the ADK repository.

## Overview

Complex workflows in visual builders or legacy integration platforms are often difficult for business stakeholders to review and maintain. The `sop-builder` skill reverse-engineers technical definitions into structured, human-readable SOPs that capture every decision point, prompt, exception rule, and integration.

**Best for:** Standardizing, validating, and operationalizing multi-step processes prior to code generation.

## Key capabilities

* **Multi-Format Ingestion**: Analyzes BPMN 2.0 XML, Langflow flow JSON, n8n workflow JSON, and raw textual procedures.
* **Business Process Flowcharts**: Generates Mermaid diagrams illustrating happy paths, branch conditions, and exception loops.
* **Decision Matrix Documentation**: Clarifies deterministic branch conditions, threshold triggers, and approval requirements.
* **Prompt and Context Specification**: Documents GenAI prompt templates, input variables, output formatting, and context requirements.
* **Exception and Fallback Rules**: Explicitly maps error-handling behaviors, retry policies, and human escalation handoffs.

## Recommended workflow

```mermaid theme={null}
flowchart LR
    A[BPMN / Langflow / n8n / Spec] --> B[sop-builder]
    B --> C[Validated SOP Document]
    C --> D[SME Review & Sign-Off]
    D --> E[wxo-builder]
```

1. Run `sop-builder` on your source workflow or process description.
2. Have the Subject Matter Expert (SME) validate the resulting SOP document to confirm business accuracy.
3. Feed the validated SOP directly into **[wxo-builder](/bob_skills/wxo_builder)** to generate the complete watsonx Orchestrate project.

## Activation

In Bob, activate the skill by asking Bob to create an SOP from a workflow artifact or text description:

```text theme={null}
Convert this BPMN workflow into a business-readable SOP:
<paste BPMN XML or workflow description here>
```

Or when analyzing Langflow / n8n exports:

```text theme={null}
Use the sop-builder skill to document this Langflow flow as an SOP:
<paste Langflow JSON here>
```

## Next steps

Once your SOP is reviewed and approved, pass it to **[wxo-builder](/bob_skills/wxo_builder)** to automatically scaffold and generate the watsonx Orchestrate implementation.
