AgentSkillsCN

multi-scenario-orchestration

在 3 个并行场景中编排单个用户可调用的技能,实现状态同步与难度渐进。适用于演示、测试以及逐步验证的工作流。

SKILL.md
--- frontmatter
name: multi-scenario-orchestration
description: Orchestrate single user-invocable skill across 3 parallel scenarios with synchronized state and progressive difficulty. Use for demos, testing, and progressive validation workflows.
tags: [orchestration, parallel, supervisor, state-machine, scenario, testing]
context: fork
agent: workflow-architect
version: 1.0.0
author: OrchestKit
user-invocable: false

Multi-Scenario Orchestration

Design patterns for showcasing one skill across 3 parallel scenarios with synchronized execution and progressive difficulty.

Core Pattern

code
┌─────────────────────────────────────────────────────────────────────┐
│                   MULTI-SCENARIO ORCHESTRATOR                        │
├─────────────────────────────────────────────────────────────────────┤
│                                                                     │
│  [Coordinator] ──┬─→ [Scenario 1: Simple]       (Easy)            │
│       ▲          │      └─→ [Skill Instance 1]                    │
│       │          ├─→ [Scenario 2: Medium]       (Intermediate)    │
│       │          │      └─→ [Skill Instance 2]                    │
│       │          └─→ [Scenario 3: Complex]      (Advanced)        │
│       │                 └─→ [Skill Instance 3]                    │
│       │                                                             │
│   [State Manager] ◄──── All instances report progress              │
│   [Aggregator] ─→ Cross-scenario synthesis                         │
│                                                                     │
└─────────────────────────────────────────────────────────────────────┘

When to Use

ScenarioExample
Skill demosShow /implement on simple, medium, complex tasks
Progressive testingValidate skill scales with complexity
Comparative analysisHow does approach differ by difficulty?
Training/tutorialsShow skill progression from easy to hard

Quick Start

python
from langgraph.graph import StateGraph

# 1. Define 3 scenarios with progressive difficulty
scenarios = [
    {"name": "simple", "complexity": 1.0, "input_size": 10},
    {"name": "medium", "complexity": 3.0, "input_size": 50},
    {"name": "complex", "complexity": 8.0, "input_size": 200},
]

# 2. Fan out to parallel execution
# 3. Aggregate results
# 4. Report comparative metrics

Scenario Difficulty Scaling

LevelComplexityInput SizeTime BudgetQuality
Simple1xSmall (10)30sBasic
Medium3xMedium (50)90sGood
Complex8xLarge (200)300sExcellent

Synchronization Modes

ModeDescriptionUse When
Free-runningAll run independentlyDemo videos
Milestone-syncWait at 30%, 70%, 100%Comparative analysis
Lock-stepAll proceed togetherTraining

Key Components

  1. Coordinator - Spawns and monitors 3 instances
  2. State Manager - Tracks progress per scenario
  3. Aggregator - Merges results, extracts patterns

Key Decisions

DecisionRecommendation
Synchronization modeFree-running with checkpoints
Scenario countAlways 3: simple, medium, complex
Input scaling1x, 3x, 8x (exponential)
Time budgets30s, 90s, 300s
Checkpoint frequencyEvery milestone + completion

Common Mistakes

  • Sequential instead of parallel: Defeats purpose. Always fan-out.
  • No synchronization: Results appear disjointed.
  • Unclear difficulty scaling: Differ in scale, not approach.
  • Missing aggregation: Individual results lack comparative insights.

Related Skills

  • langgraph-supervisor - Supervisor routing pattern
  • langgraph-parallel - Fan-out/fan-in execution
  • langgraph-state - State management
  • langgraph-checkpoints - Persistence
  • multi-agent-orchestration - Coordination patterns

References