skills/van-der-aalst-2003-workflow-patterns/SKILL.md
Apply the foundational taxonomy of workflow control patterns to evaluate, design, and debug complex coordination systems. Based on the seminal "Workflow Patterns" research establishing pattern-based expressiveness evaluation.
npx skillsauth add curiositech/windags-skills van-der-aalst-2003-workflow-patternsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Activate when encountering coordination complexity beyond simple sequential task execution: multi-agent orchestration, parallel processing with synchronization, conditional routing, iterative refinement, or system evaluation for workflow capability.
IF designing coordination structure:
Sequential dependency only?
Multiple parallel branches needed?
Synchronization requirements?
Decision timing?
Iteration needed?
IF evaluating orchestration systems:
Decision criteria:
Detection: OR-split activates all branches instead of runtime-determined subset, or requires manual branch selection Root cause: System conflates OR-split with AND-split or lacks runtime evaluation capability Fix: Implement true OR-split with condition evaluation at runtime, or redesign using multiple XOR-splits
Detection: "First wins" logic processes multiple completions, late arrivals not ignored, state corruption on near-simultaneous finish Root cause: Missing atomic completion detection or lack of proper discriminator semantics Fix: Implement atomic first-completion detection with explicit late-arrival ignoring, use proper discriminator pattern not AND-join
Detection: System polls for external conditions instead of event-driven activation, high CPU usage during wait states Root cause: No event-driven external choice mechanism, treating deferred choice as sequence + condition check Fix: Implement event-based deferred choice with proper external stimulus handling, avoid polling-based workarounds
Detection: Workflows with cycles never terminate naturally, require manual intervention, or deadlock on exit conditions Root cause: No implicit termination support or cycle exit condition evaluation Fix: Implement proper cycle semantics with exit conditions, use state-based termination detection
Detection: Individual patterns work but combinations crash, undefined behavior at interaction boundaries Root cause: Ad-hoc pattern implementations without unified execution model Fix: Use systems with formal execution semantics (Petri nets, process algebras) or explicitly test all pattern combinations
Scenario: Code review requiring parallel analysis (security, performance, style) with first-completion wins logic and iterative refinement.
Pattern identification:
Decision walkthrough:
Expert insight: DAG-based orchestrators fail here because they cannot express discriminator + cycles combination. Need state machine or Petri net model.
Novice mistake: Using AND-join instead of discriminator, causing system to wait for all agents even after first success.
Scenario: Data processing pipeline where downstream stages depend on upstream results and data characteristics determine stage activation.
Pattern identification:
Decision walkthrough:
Expert insight: OR-split/OR-join combination requires the join to know which branches were activated by the split. Many systems lack this state tracking.
Novice mistake: Using XOR-split with manual branch tracking instead of true OR-split, losing semantic clarity and introducing bugs.
Scenario: Multiple agents bid on task, first acceptable bid wins, with timeout fallback to direct assignment.
Pattern identification:
Decision walkthrough:
Expert insight: This requires discriminator inside deferred choice inside cancellation region. Pattern interaction complexity eliminates most orchestrators.
Novice mistake: Manual timeout handling instead of proper deferred choice, creating race conditions between bid acceptance and timeout.
This skill is NOT for:
Delegate to other skills:
Boundary indicator: If you're designing WHAT agents do (task logic), use domain skills. If you're designing HOW agents coordinate (control flow), use this skill.
tools
Building resilient distributed systems with circuit breakers, retries with full-jitter exponential backoff, retry budgets (per-request 3-attempt + per-client 10% ratio per Google SRE), deadline propagation, and the cascading-failure math (4 layers × 3 retries = 64x amplification). Grounded in Resilience4j, Microsoft Cloud Patterns, AWS Architecture Blog (Marc Brooker), and Google SRE Book.
testing
Designing HTTP cache headers that work correctly across browsers, CDNs, and shared proxies — `Cache-Control` directives per RFC 9111, `stale-while-revalidate` and `stale-if-error` per RFC 5861, the Vary header for varying responses, and surrogate keys for tag-based purging. Grounded in IETF RFCs and Cloudflare/Fastly docs.
development
Use when designing or fixing a Content Security Policy on a real site, choosing between nonce-based and hash-based CSP, adding strict-dynamic, debugging "Refused to execute inline script" errors, deploying CSP in report-only mode first, configuring report-to / report-uri, or auditing an existing policy for unsafe-inline / unsafe-eval / wildcards. Triggers: "CSP blocks legitimate inline script", strict-dynamic, nonce-{RANDOM}, sha256-{HASH}, object-src none, base-uri none, frame-ancestors, Trusted Types, X-Content-Security-Policy obsolete, report-only vs enforced. NOT for general HTTP security headers (HSTS, COOP/COEP), Trusted Types deep dive, CORS configuration, or building a WAF.
tools
Choosing and operating an HTTP API versioning strategy that doesn't break clients — Stripe's date-based pinned versions, the Deprecation/Sunset header pair (RFC 9745 + RFC 8594), URI vs header vs media-type approaches, and the version-transformer pattern. Grounded in Stripe's published architecture and IETF RFCs.