Skip to main content
Every recurring workflow shape has a structural skeleton in the spec, gated by the conformance suite on every push, with comments at decision points and <SLOT: …> values where input is required. The path from intent to a correct file starts with: route → copy → fill slots → nika check → repair → re-check.

Choose a starting point

nika compile --list names the exact skeletons embedded in your installed binary. Preview one with nika compile <slug> --json. Unknown intent stays incomplete and does not pick a substitute. Only a Ready candidate plus an explicit destination writes; remaining questions use repeatable --answer KEY=JSON_LITERAL. The copyable sources below also run through the released checker. See bounded authoring examples for filled workflows, expected outputs and rejection cases. 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 projected from nika-spec/templates/ — the source of truth, validated by the conformance runner — by nika-spec/scripts/showcase-projector.py.These are source templates, not completed workflows. An unfilled <SLOT: …> value is intentionally refused by nika check. Fill every slot, then check your file. The documentation gate checks each skeleton too: only the explicit slot findings are allowed; other errors still fail.

chain

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

gate-and-act

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

fanout

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

etl-state

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

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 skeleton

human-gated-ship

Anything irreversible: parallel gates, a hard assert, a human GO, and an after: { act: terminal } record whatever happens.
human-gated-ship.nika skeleton

website-brief

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

media-asset-pack

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

api-upload-and-create

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

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. On the 0.120 compile door, nika compile docker-report <dest>.nika is Ready (zero questions) and writes that destination. Preview with nika compile docker-report --json. The block below is the same conformance-validated source, if you prefer to copy it.
docker-report.nika skeleton

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: 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.

aggregate-by-key

Group validated integer amounts with exact totals.
aggregate-by-key.nika skeleton

bounded-batch

Admit a finite batch before starting model calls.
bounded-batch.nika skeleton

classify-and-route

Typed facts → evidence → decision → queue..
classify-and-route.nika skeleton

corpus-qa

Canonicalize corpus → retrieve → answer or abstain..
corpus-qa.nika skeleton

deduplicate-records

Collapse identical duplicates and refuse conflicts.
deduplicate-records.nika skeleton

document-to-fields

Source text → anchored facts → nonempty proof..
document-to-fields.nika skeleton

evaluate-and-optimize

Draft → two fixed critique/revision rounds..
evaluate-and-optimize.nika skeleton

parallel-review

Collect independent reviews with a deterministic conjunction.
parallel-review.nika skeleton

project-public-fields

Select allowed fields before sending data to a model.
project-public-fields.nika skeleton

recover-optional-file

Recover a missing optional file without hiding other failures.
recover-optional-file.nika skeleton

snapshot-diff

Compare two snapshots without model judgment.
snapshot-diff.nika skeleton

validate-records

Reject malformed records before producing totals.
validate-records.nika skeleton