Skip to main content
Every recurring workflow shape has a complete, valid skeleton in the spec, gated by the conformance suite on every push, with a # SLOT: marker at every decision point. The path from intent to a correct file is mechanical: route → copy → fill slots → nika check → repair → re-check.

Route by intent

Composite jobs compose templates: a fanout whose merge feeds a human-gated-ship, an etl-state whose delta fans out. Start from the template matching the outer shape.
The YAML below is normally projected from nika-spec/templates/ — the source of truth, validated by the conformance runner — by nika-spec/scripts/showcase-projector.py.It is ahead of that projection right now: these copies were migrated by hand to the 0.106 grammar, and four of them gained the permits: block an effect-bearing workflow now requires. The templates upstream need the same pass, after which the projector reclaims these blocks and the two surfaces agree again.

chain

The default shape for « take real data, produce words, save them ».
chain.nika.yaml

gate-and-act

Watch something, act only when a condition holds (often zero model calls).
gate-and-act.nika.yaml

fanout

The same work for every item of a runtime collection, fully leashed.
fanout.nika.yaml

etl-state

Incremental runs: only what changed since last time, survive bad input.
etl-state.nika.yaml

agent-loop

Open-ended work: plan with a fast model, execute with a budgeted agent, validate the typed result. Never ship an unleashed agent.
agent-loop.nika.yaml

human-gated-ship

Anything irreversible: parallel gates, a hard assert, a human GO, and an on_finally record whatever happens.
human-gated-ship.nika.yaml

website-brief

Understand a site from a URL: bounded traverse: crawl → one typed brief → persist. Zero exec.
website-brief.nika.yaml

media-asset-pack

Generate assets from a brief: typed creative direction → nika:image_generate → jq manifest.
media-asset-pack.nika.yaml

api-upload-and-create

Call a product API natively: multipart: upload (masked secrets header) → JSON create → typed result.
api-upload-and-create.nika.yaml

docker-report

The audited-ops shape: read a system’s real state via a pinned CLI (argv-array exec — the only form a permits.exec allowlist can prove), explain it with one bounded model call, keep the report as a file. Swap docker for any product CLI. The live-proven walkthrough: A Docker AI workflow.
Shipped in the engine pack since 0.99.0: nika new --from docker-report <dest>.nika.yaml scaffolds this exact skeleton (verified on the released binary). The block below is the same conformance-validated source, if you prefer to copy it.
docker-report.nika.yaml

The instantiation protocol

1

Route

Pick the template whose intent row matches. Never free-form a workflow when a template routes.
2

Copy + fill

Copy the skeleton, change ONLY the # SLOT: lines. Everything else is locked structure.
3

Check

nika check workflow.nika.yaml: the validator names the exact rule on every error.
4

Repair from the error

Fix exactly what the named rule says, re-check until clean. Don’t fix what the validator didn’t name.

See also

Writing Nika as an agent

The deterministic protocol these templates anchor.

Patterns

The twelve composition patterns the templates lock in.

Examples

full tiered workflows built from these shapes.

Templates source

The skeletons in the spec repo, conformance-gated.