CtrlK
BlogDocsLog inGet started
Tessl Logo

iii-effect-system

Builds composable, pipeable function chains on the iii engine. Use when building functional pipelines, effect systems, or typed composition layers where each step is a pure function with distributed tracing.

73

Quality

66%

Does it follow best practices?

Impact

Pending

No eval scenarios have been run

SecuritybySnyk

Passed

No known issues

Optimize this skill with Tessl

npx tessl skill review --optimize ./skills/iii-effect-system/SKILL.md
SKILL.md
Quality
Evals
Security

Effect Systems & Typed Functional Infrastructure

Comparable to: Effect-TS

Key Concepts

Use the concepts below when they fit the task. Not every effect pipeline needs all of them.

  • Each effect is a registered function with a single responsibility (parse, enrich, persist, notify)
  • Effects compose by calling one function from another via trigger
  • The entire pipeline is traceable end-to-end through OpenTelemetry
  • Errors propagate naturally — a failing effect stops the chain
  • An HTTP trigger provides the entry point; effects chain from there

Architecture

HTTP request
  → fx::parse-user-input (validate + normalize)
    → fx::enrich (add metadata, lookup external data)
      → fx::persist (write to state)
        → fx::notify (fire-and-forget side effect)
  ← composed result returned to caller

iii Primitives Used

PrimitivePurpose
registerWorkerInitialize the worker and connect to iii
registerFunctionDefine each effect
trigger({ function_id, payload })Compose effects synchronously
trigger({ ..., action: TriggerAction.Void() })Fire-and-forget side effects
trigger state::set, state::getPersist data between effects
registerTrigger({ type: 'http' })Entry point

Reference Implementation

See ../references/effect-system.js for the full working example — a user signup pipeline where input is parsed, enriched with external data, persisted to state, and a welcome notification is fired.

Common Patterns

Code using this pattern commonly includes, when relevant:

  • registerWorker(url, { workerName }) — worker initialization
  • trigger({ function_id, payload }) — synchronous composition (effect A calls effect B)
  • Each effect as its own registerFunction with fx:: prefix IDs
  • Error throwing for validation failures (errors propagate up the chain)
  • trigger({ ..., action: TriggerAction.Void() }) — fire-and-forget for non-critical side effects
  • const logger = new Logger() — structured logging per effect

Adapting This Pattern

Use the adaptations below when they apply to the task.

  • Replace simulated logic with real work (API calls, database queries, ML inference)
  • Add new effects by registering functions and calling them via trigger
  • For unreliable steps, use TriggerAction.Enqueue({ queue }) instead of synchronous trigger
  • Keep effects pure where possible — accept input, return output, no hidden side effects
  • Function IDs should be domain-prefixed (e.g. fx::validate-email, fx::geocode-address)

Pattern Boundaries

  • If a request is about durable multi-step workflows with retries and DLQ handling, prefer iii-workflow-orchestration.
  • If the task involves multiple independent agents handing off work, prefer iii-agentic-backend.
  • Stay with iii-effect-system when the primary concern is composable, traceable function pipelines with synchronous chaining.

When to Use

  • Use this skill when the task is primarily about iii-effect-system in the iii engine.
  • 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.
Repository
iii-hq/iii
Last updated
Created

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.