Skills

Iii Architecture Patterns

Use when composing iii primitives into backend architectures: durable workflows...

Install

npx skills add iii-hq/iii --skill iii-architecture-patterns -g -a claude-code -y
Repository
iii-hq/iii18.9k
Category
Engineering
Updated
3d ago
License
See repository
Context cost
Mediumabout 2,231 tokens
Runs scripts
No, instructions only

What it does

Use when composing iii primitives into backend architectures: durable workflows, reactive backends, observer side effects, agentic pipelines, event-driven CQRS, effect pipelines, and trigger-transform-action automation.

Architecture Patterns

Use this skill when the task is larger than one function or trigger. Pick the pattern from the requirement, then implement it with Function, Trigger, Worker, observers, state, queues, streams, and pub/sub.

Pattern Map

RequirementPatterniii shape
Sequential work with retries, DLQ, step trackingDurable workflowFunctions chained through named queues, progress in state
Keep views, metrics, cache, or clients in syncReactive backendState triggers plus stream/pubsub side effects
React to another function's calls, results, or failures without changing itObserver side effectiii.observe({ function_id, on, filters }, target) (iii-observe)
Specialized AI agents hand work to each otherAgentic backendOne function per agent, queue handoffs, shared state
Commands publish events and projections update independentlyEvent-driven CQRSCommand functions, event log in state, subscribe triggers
Pure, traceable compositionEffect pipelineSmall functions composed synchronously with trigger()
Webhook/cron automation chainsLow-code automationTrigger, transform, action nodes chained by enqueue

Durable Workflow

Use named queues when steps need different retry, FIFO, or concurrency policy.

TypeScript

import { registerWorker, TriggerAction } from "iii-sdk";

const iii = registerWorker("ws://localhost:49134", { workerName: "order-workflow" });

async function track(orderId: string, step: string, status: string) {
  await iii.trigger({
    function_id: "state::update",
    payload: { scope: "orders", key: orderId, ops: [{ type: "merge", path: ["steps"], value: { [step]: status } }] },
  });
}
Read the whole SKILL.md on GitHub

More in Engineering