Iii iii-workflow-orchestration
install
source · Clone the upstream repo
git clone https://github.com/iii-hq/iii
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/iii-hq/iii "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/iii-workflow-orchestration" ~/.claude/skills/iii-hq-iii-iii-workflow-orchestration && rm -rf "$T"
manifest:
skills/iii-workflow-orchestration/SKILL.mdsource content
Workflow Orchestration & Durable Execution
Comparable to: Temporal, Airflow, Inngest
Key Concepts
Use the concepts below when they fit the task. Not every workflow needs every durability or tracking mechanism shown here.
- Each pipeline step is a registered function chained via named queues with config-driven retries
- Step progress is tracked in shared state and broadcast via streams
- A cron trigger handles scheduled maintenance (e.g. stale order cleanup)
- Queue behavior (retries, backoff, concurrency, FIFO) is defined per queue in
iii-config.yaml
Architecture
HTTP (create order) → Enqueue(order-validate) → validate → Enqueue(order-payment) → charge-payment → Enqueue(order-ship) → ship → publish(order.fulfilled) Cron (hourly) → cleanup-stale Queue configs (iii-config.yaml): order-validate: max_retries: 2 order-payment: max_retries: 5, type: fifo, concurrency: 2 order-ship: max_retries: 3
iii Primitives Used
| Primitive | Purpose |
|---|---|
| Initialize the worker and connect to iii |
| Define each pipeline step |
| Durable step chaining via named queues |
| Track step progress |
| Fire-and-forget stream events and publish |
| Scheduled maintenance |
| Entry point |
Reference Implementation
See ../references/workflow-orchestration.js for the full working example — an order fulfillment pipeline with validate → charge → ship steps, retry configuration, stream-based progress tracking, and hourly stale-order cleanup.
Common Patterns
Code using this pattern commonly includes, when relevant:
— worker initializationregisterWorker(url, { workerName })
— durable step chaining via named queuestrigger({ function_id, payload, action: TriggerAction.Enqueue({ queue }) })
— step progress trackingtrigger({ function_id: 'state::update', payload: { scope, key, ops } })- Named queues with a comment referencing
for retry/concurrency settingsiii-config.yaml
— structured logging per stepconst logger = new Logger()- Each step as its own
with a single responsibilityregisterFunction
— completion broadcasttrigger({ function_id: 'publish', payload, action: TriggerAction.Void() })
Adapting This Pattern
Use the adaptations below when they apply to the task.
- Each step should do one thing and enqueue the next function on success
- Define separate named queues in
when steps need different retry/concurrency settingsiii-config.yaml - Capture enqueue receipts (
) for observability and DLQ correlation when neededmessageReceiptId - The
helper pattern (state update + stream event) is reusable for any pipelinetrackStep - Failed jobs exhaust retries and move to a DLQ — see the dead-letter-queues HOWTO
- DLQ support for named queues is provided by the Builtin and RabbitMQ adapters (Redis is pub/sub only)
- Cron expressions use 7-field format:
(every hour)0 0 * * * * *
Engine Configuration
Named queues for pipeline steps are declared in iii-config.yaml under
queue_configs with per-queue retry, concurrency, and FIFO settings. See ../references/iii-config.yaml for the full annotated config reference.
Pattern Boundaries
- If the task is "model HTTP endpoints as HTTP-invoked
functions" (includingregisterFunction
arrays iterated into registration), prefer{ path, id }
.iii-http-invoked-functions - Stay with
when durable step sequencing, queue retries/backoff, and workflow progress tracking are the primary concerns.iii-workflow-orchestration
When to Use
- Use this skill when the task is primarily about
in the iii engine.iii-workflow-orchestration - Triggers when the request directly asks for this pattern or an equivalent implementation.
Boundaries
- Never use this skill as a generic fallback for unrelated tasks.
- You must not apply this skill when a more specific iii skill is a better fit.
- Always verify environment and safety constraints before applying examples from this skill.