Skip to main content

Decision Tree Editor

The Decision Tree Editor is the core of SOP Studio. It provides a visual canvas powered by React Flow where you can build, connect, and configure SOP decision trees.

Canvas Overview

The editor consists of three areas:

AreaPurpose
Node palette (left)Drag node types onto the canvas
Canvas (center)Visual graph of your decision tree
Property panel (right)Edit the selected node's properties

Node Types

Step Node

A Step node represents a single action or instruction in the SOP.

PropertyTypeDescription
stepstringUnique step identifier
instructionstringWhat to do at this step
criteriaRecordKey-value pairs defining evaluation criteria
tool_suggestionsArrayOptional tools that can assist this step

Condition Node

A Condition node creates branching logic. Each outgoing edge represents a possible condition value.

PropertyTypeDescription
fieldstringThe field or variable to evaluate
conditionsRecordMaps condition values to actions
sla_minnumberOptional SLA in minutes per branch

Tool Node

A Tool node references an external MCP tool or API that should be invoked at a particular point in the flow.

PropertyTypeDescription
namestringTool name (must match MCP tool registry)
whenstringCondition under which to invoke the tool
input_templateRecordDefault input parameters

Working with the Canvas

Adding Nodes

Drag a node type from the left palette onto the canvas. The node appears with default properties that you can edit in the right panel.

Connecting Nodes

Click on a node's output handle (bottom) and drag to another node's input handle (top) to create an edge. For Condition nodes, each edge can be labeled with the condition value it represents.

Editing Properties

Select any node to view and edit its properties in the right panel. Changes are reflected in real time on the canvas.

Keyboard Shortcuts

ShortcutAction
Ctrl+SSave SOP
Ctrl+ZUndo
Ctrl+Shift+ZRedo
DeleteRemove selected node or edge
Ctrl+ASelect all nodes
Ctrl+DDuplicate selected node

Save and Export

Save to Registry

Click "Save" or press Ctrl+S to persist the SOP to the connected KnowledgePulse Registry. The SOP is stored as an ExpertSOP knowledge unit.

Export as Skill-MD

Click "Export > Skill-MD" to generate a SKILL.md file from the SOP. This produces a portable markdown file with KnowledgePulse extension fields.

# Exported SKILL.md structure
---
name: Bug Triage
description: Standard procedure for classifying and routing bugs
version: "1.0"
tags: [engineering, triage]
kp:
domain: engineering
knowledge_capture: true
visibility: org
---

## Steps
1. Classify the bug by severity
- **Critical**: Escalate to on-call (SLA: 15 min)
- **Major**: Assign to sprint (SLA: 60 min)
- **Minor**: Add to backlog

Export as JSON

Click "Export > JSON" to download the raw ExpertSOP JSON structure for use with the SDK or API.

Validation

The editor validates your decision tree in real time:

  • Disconnected nodes -- Warns if any node has no incoming or outgoing edges
  • Missing instructions -- Warns if a Step node has no instruction text
  • Duplicate step IDs -- Errors if two nodes share the same step identifier
  • Circular references -- Errors if the graph contains cycles

Validation issues appear as colored badges on affected nodes and in the bottom status bar.