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.
data-ai
license: Apache-2.0 NOT for unrelated tasks outside this domain.
development
Use when designing caching strategies (cache-aside, write-through, write-behind), implementing distributed locks, building rate limiters, leaderboards, real-time streams (XADD/consumer groups), pub/sub, or tuning eviction policies. Triggers: thundering-herd on cache miss, dogpile on key expiry, Redlock vs SET-NX-PX choice, sliding-window rate limiter, hot-key on a single cluster slot, big-key blowup, MULTI/EXEC across slots, KEYS in production. NOT for Redis Cluster operations/admin (different domain), embedded KV (SQLite, leveldb), in-process LRU caches, or Memcached.
tools
Drawing the `'use client'` boundary correctly in React Server Components apps (Next.js App Router, RSC frameworks) — leaf-pushing, slot composition, serialization rules, and environment poisoning prevention. Grounded in react.dev and Next.js 16 docs.
development
Use when designing rate limiting for an API, choosing between token bucket / sliding window / leaky bucket / fixed window, implementing it in Redis, deciding edge (Cloudflare/Upstash) vs origin enforcement, sizing per-user vs per-IP vs per-endpoint quotas, returning the right 429 response with Retry-After, or fixing the boundary-burst bug in fixed-window limiters. Triggers: 429 too many requests, INCR + EXPIRE, ZADD + ZREMRANGEBYSCORE + ZCARD, X-RateLimit-Remaining header, Cloudflare WAF rate limiting rules, Upstash @upstash/ratelimit, leaky bucket shaping vs policing, distributed rate limiter consistency. NOT for DDoS mitigation specifically (different scale), CAPTCHA / bot management, full WAF design, or per-user quota billing.