AGPL-3.0-or-later · forever.

the deterministic authoring path

fanout

Agents do not invent structure — they instantiate it. Each skeleton below is a complete, valid workflow with # SLOT: markers at every decision point: route your intent, copy, fill the slots, nika check, done. Machines read the same pack at /templates/catalog.json; the originals live in the spec, conformance- gated on every push.

  • 10skeletonsroute · copy · fill
  • 94slot markersthe only blanks
  • validevery fileconformance-gated
  • sha256every copypinned, re-proven
  1. take data, produce words, save them

    chain9 slotschain.nika.yaml
    • deterministic gather
    • one model job
    • explicit persist

    open the skeleton →

  2. watch X, act when Y

    gate-and-act8 slotsgate-and-act.nika.yaml
    • jq extraction
    • CEL skip-gate
    • often zero model calls

    open the skeleton →

  3. do this for EVERY item

    fanout9 slotsfanout.nika.yaml
    • runtime collection
    • the full leash (max_parallel
    • fail_fast
    • retry)
    fanout.nika.yaml
    # SPDX-License-Identifier: Apache-2.0# yaml-language-server: $schema=https://nika.sh/spec/v1/workflow.schema.json## TEMPLATE · fanout: discover a collection, process every item in# parallel (with a leash), merge the results.# The default shape for « N pages / N files / N records » jobs.## Instantiate · copy → fill `# SLOT:` → `nika check` → repair → re-check.# The leash (pattern 4 · ALWAYS set all three) ·#   max_parallel  cap concurrency (APIs rate-limit · GPUs thrash)#   fail_fast: false + on_error recover: null: one bad item yields null#     at its index (order preserved) · the batch lives · filter downstream#   per-iteration retry/timeout · the flaky world is normalnika: v1workflow: fanout-template           # SLOT: kebab-case workflow iddescription: "discover N items · process in parallel · merge"   # SLOTmodel: ollama/qwen3.5:4b           # SLOT: provider/model · local · zero keyvars:  collection_source: "./items"      # SLOT: where the collection comes fromtasks:  - id: discover    invoke:                         # SLOT: glob / fetch sitemap / exec + jq split      tool: "nika:glob"      args: { pattern: "${{ vars.collection_source }}/*.md" }  - id: process    depends_on: [discover]    for_each: ${{ tasks.discover.output }}    max_parallel: 4                 # SLOT: the polite ceiling    fail_fast: false    timeout: "60s"                  # SLOT: per-iteration bound    retry:      max_attempts: 3      backoff_strategy: exponential      jitter: true    on_error:      recover: null                 # a failed item yields null at its index · the batch lives    infer:                          # SLOT: the per-item job (any verb)      prompt: |        Process this item · ${{ item }}  - id: survivors    depends_on: [process]    invoke:                         # the null-aware fan-in · order preserved      tool: "nika:jq"      args:        input: ${{ tasks.process.output }}        expression: "[ .[] | select(. != null) ]"  - id: merge    depends_on: [survivors]    infer:      prompt: |        # SLOT: the fan-in · the survivors array (failed items filtered)        Merge these results into one report · ${{ tasks.survivors.output }}outputs:  report: ${{ tasks.merge.output }}

    sha256 7a16dcdb72c0c3ce… · conformance-gated upstream · source

  4. only what changed since last run · survive bad input

    etl-state6 slotsetl-state.nika.yaml
    • state read→diff→write
    • `on_error: recover:` quarantine

    open the skeleton →

  5. research / review / open-ended

    agent-loop7 slotsagent-loop.nika.yaml
    • plan-then-execute
    • default-deny tools
    • budgets
    • typed final message

    open the skeleton →

  6. anything irreversible (deploy · send · publish)

    human-gated-ship10 slotshuman-gated-ship.nika.yaml
    • parallel gates
    • assert
    • `nika:prompt` GO
    • `on_finally` record

    open the skeleton →

  7. understand a site (domain · theme · assets) from a URL

    website-brief10 slotswebsite-brief.nika.yaml
    • fetch `traverse:` crawl
    • one typed infer
    • explicit persist
    • zero exec

    open the skeleton →

  8. generate image/audio assets from a brief

    media-asset-pack10 slotsmedia-asset-pack.nika.yaml
    • `nika:image_generate`
    • `nika:jq` manifest
    • local/mock provider first

    open the skeleton →

  9. call a product API: upload a file, then create from it

    api-upload-and-create15 slotsapi-upload-and-create.nika.yaml
    • fetch `multipart:` upload
    • masked secrets header
    • mode/jq extraction

    open the skeleton →

  10. read a system's state (docker · kubectl · gh), explain it, keep the report

    docker-report10 slotsdocker-report.nika.yaml
    • argv-array exec (provable allowlist)
    • parallel reads
    • exec ledger
    • one artifact

    open the skeleton →

The protocol is mechanical: route with the phrases above, instantiate, fill the slots, then nika check teaches anything you missed before anything runs. Try one in the playground, or install and start from a real file. Read the spec →