A lightweight task routing engine for intelligent task assignment based on change type, size, risk, and urgency.
编程
Workflow Orchestration
试用A lightweight workflow orchestration engine for multi-phase task coordination with routing, phase execution, and exception handling.
它能做什么
A lightweight workflow orchestration engine for multi-phase task coordination with routing, phase execution, and exception handling.
技能文档
Workflow Orchestration Skill
Overview
A lightweight workflow orchestration engine that enables multi-phase task coordination with intelligent routing, phase execution, gate validation, and exception handling.
Key Features
- 3 Preset Workflow Templates: Standard (8 phases), Lightweight (4 phases), Hotfix (5 phases)
- Intelligent Task Routing: Route tasks to appropriate workflows based on change type, size, and risk
- Phase Execution & Gate Validation: Execute phases with gate checks and artifact validation
- Exception Handling: Handle workflow exceptions with rollback triggers and escalation
- Custom Workflow Support: Register and run custom workflow definitions
- Persistence: Save/load workflow instances to/from JSON/YAML
Use Cases
- Multi-agent task coordination
- Development workflow orchestration
- CI/CD pipeline management
- Project lifecycle coordination
- Enterprise workflow governance
Installation
clawhub install workflow-orchestration
Usage
Basic Usage
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)
Task Routing
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)
Custom Workflow
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", {})
API Reference
WorkflowOrchestrator
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 data
Parameters
template: 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)
Quality Metrics
- 80 comprehensive tests (unit + integration + e2e)
- Complete documentation
- Multi-format support (JSON/YAML)
- MIT License
Changelog
v1.0.0 (2026-07-02)
- Initial release
- 3 preset workflow templates
- Task routing engine
- Phase execution with gate validation
- Exception handling with rollback triggers
- Custom workflow support
- Persistence support
相关技能
Generate reusable multi-step agent workflow blueprints. Use for trigger/action orchestration, deterministic workflow definitions, and automation handoff arti...
产出可复用的工作流蓝图,包含触发器、步骤、依赖关系和可导出产物。
Design and orchestrate robust multi-step agent workflows with reusable blueprints. Automate complex trigger-action sequences, define deterministic workflows,...
Configure, adjust, debug, and verify React Flow workflow nodes. Use when working on custom node components, especially for node handles, multi-channel connec...
Use this skill to coordinate local research work across multiple agents and tools when the task needs lightweight routing, decomposition, handoffs, and local...