iii-architecture-patterns
Installation
SKILL.md
Architecture Patterns
Use this skill when the task is larger than one function or observer. Pick the pattern from the requirement, then implement it with workers, functions, observers, state, queues, and streams.
Pattern Map
| Requirement | Pattern | iii shape |
|---|---|---|
| Sequential work with retries, DLQ, step tracking | Durable workflow | Functions chained through named queues, progress in state |
| Keep views, metrics, cache, or clients in sync | Reactive backend | Observers of state::on-changed that push to streams |
| React to another function's calls, results, or failures without changing it | Observer side effect | iii.observe({ function_id, on, filters }, target) (iii-observe) |
| Specialized AI agents hand work to each other | Agentic backend | One function per agent, queue handoffs, shared state |
| Commands produce events and projections update independently | Event-driven CQRS | Command functions that return the event, event log in state, projections that observe the commands |
| Pure, traceable composition | Effect pipeline | Small functions composed synchronously with call() |
| Webhook/cron automation chains | Low-code automation | An observer of http::on-request or cron::on-tick, then transform and action functions chained by enqueue |