Install
openclaw skills install @terr123123/workflow-orchestrationA lightweight workflow orchestration engine for multi-phase task coordination with routing, phase execution, and exception handling.
openclaw skills install @terr123123/workflow-orchestrationA lightweight workflow orchestration engine that enables multi-phase task coordination with intelligent routing, phase execution, gate validation, and exception handling.
clawhub install workflow-orchestration
from workflow_orchestration import WorkflowOrchestrator
# Initialize with template
orchestrator = WorkflowOrchestrator(template="standard")
# Start workflow instance
instance = orchestrator.start_workflow("standard", {
"change_type": "feature",
"change_size": "m",
"risk_level": "medium"
})
# Advance phase
result = orchestrator.advance_phase(instance.id, gate_passed=True)
# Handle exception
result = orchestrator.handle_exception(
instance.id,
ExceptionType.QUALITY_GATE_FAILURE,
SeverityLevel.CRITICAL
)
# Get status
status = orchestrator.get_workflow_status(instance.id)
from workflow_orchestration import TaskMetadata, ChangeType, SizeLevel, RiskLevel
metadata = TaskMetadata(
change_type=ChangeType.BUGFIX,
change_size=SizeLevel.S,
risk_level=RiskLevel.MEDIUM
)
workflow_name = orchestrator.route_task(metadata)
from workflow_orchestration import WorkflowConfig, PhaseConfig
custom_workflow = WorkflowConfig(
name="custom",
description="Custom workflow",
phases=[
PhaseConfig(id="step1", gate="gate1", agent="agent1"),
PhaseConfig(id="step2", gate="gate2", agent="agent2"),
]
)
orchestrator.register_workflow(custom_workflow)
instance = orchestrator.start_workflow("custom", {})
start_workflow(workflow_name, initial_context) → Start a workflow instanceadvance_phase(instance_id, gate_passed) → Advance to next phasehandle_exception(instance_id, exception_type, severity) → Handle exceptionget_workflow_status(instance_id) → Get instance statusroute_task(metadata) → Route task to appropriate workflowregister_workflow(workflow_config) → Register custom workflowsave_instance(instance_id) → Save instance stateload_instance(data) → Load instance from datatemplate: Workflow template (standard, lightweight, hotfix)workflow_name: Workflow to startinitial_context: Initial context with change_type, change_size, risk_levelgate_passed: Whether gate validation passesexception_type: Exception type (REQUIREMENT_CHANGE, TECHNICAL_DEBT, etc.)severity: Exception severity (MINOR, MAJOR, CRITICAL)