> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nika.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# Watch a run

> Three moments to look at a workflow: inspect the waves before, read the live render during, and the waterfall + verdict card after.

A run answers three questions at three different times: *what will
happen?* (before), *what is happening?* (during), *what happened?*
(after). One command each, all offline-friendly — every frame below is
real output from this workflow:

```yaml standup-digest.nika theme={"system"}
# Pull commits and tickets in parallel, then digest.
nika: standup-digest

model: mock/echo                       # simulation · swap for ollama/qwen3.5:4b or any provider

permits:
  exec: true                           # both probes are shell strings · only the argv form takes an allowlist

tasks:
  commits:
    exec:
      shell: "sleep 0.4 && git log --oneline -5 2>/dev/null || printf 'feat: resume'"

  tickets:
    exec:
      shell: "sleep 0.3 && printf 'NIKA-42 open'"

  digest:
    with:
      commits: ${{ tasks.commits.output }}
      tickets: ${{ tasks.tickets.output }}
    infer:
      prompt: "Digest commits ${{ with.commits }} and tickets ${{ with.tickets }}"
      max_tokens: 400

outputs:
  digest: "${{ tasks.digest.output }}"
```

## Before · `nika inspect`

Static anatomy: the DAG's **wave groups** (what runs in parallel), plus
three planning lines — the parallelism width, the pinch points, and each
task's blast radius. Zero execution, zero tokens:

```text theme={"system"}
$ nika inspect standup-digest.nika
standup-digest · 3 tasks · 2 waves · ≥ $0.0000 (floor — unbounded tasks)
  ╭ wave 1 ── 2 in parallel ─╮
  │ ◆ commits  exec          │
  │ ◆ tickets  exec          │
  ╰──────────────────────────╯
    ↓
  ◆ digest   infer · mock/echo
  (no orphans · DAG check NIKA-DAG-001 clean)

parallelism  width 2 · can run together: commits · tickets
pinch        digest · nothing else runs while these run
blast        commits blocks 1 · tickets blocks 1
```

Read it before a long run the way you read a query plan before an
expensive query.

## During · the live render

In an interactive terminal, `nika run` animates a storyboard: tasks
light up as their dependencies clear, in the wave order `inspect`
predicted. Piped (CI logs, `tee`), the same run prints one plain,
deterministic frame instead — `∥` marks tasks that ran in parallel:

```text theme={"system"}
$ nika run standup-digest.nika
  🦋 nika · standup-digest · 3 tasks
     permits ✓ declared boundary · default-deny

  ✔  commits  exec · sleep  428ms
  ✔  tickets  exec · sleep  313ms ∥
  ✔  digest   infer · mock/echo  0ms
  ── 3/3 done · ≥ $0.00 (1 unpriced) · elapsed 0.4s ──────────────
    trace: .nika/traces/2026-07-28T06-58-44Z-bb6e.ndjson · 15 events · chain b35e86afcb024cab8b17cc0c7701d99034ecf5aa70ab4fc5e28d6225933b13be
  (historical capture 2026-07-28 · re-run for a current journal)
```

Four render modes, one per audience:

| Flag | Surface |
| - | - |
| *(none, terminal)* | Live animated storyboard, then waterfall + verdict card |
| `--no-progress` | One plain final frame (the CI-stable surface · default when piped) |
| `--quiet` | The final verdict line only — `✔  standup-digest · 3 tasks · 0.4s · ≥ $0.00 (1 unpriced)` |
| `--json` | Pure NDJSON events on stdout, progress to stderr (the machine lane · see [Traces](https://docs.nika.sh/concepts/traces.md)) |

## After · the waterfall and the verdict card

An interactive run ends with two frames. The **waterfall** shows where
the wall-clock went — overlapping bars are the parallelism you actually
got. The **verdict card** compresses the run into one box: the wave
shape (`◆◆ ⇉ ◆` — two in parallel, then one), tasks, waves, retries,
duration, cost (its `≥`/`unpriced` grammar is the
[cost-honesty vocabulary](https://docs.nika.sh/guides/cost-honesty.md)), model, and the typed
outputs it produced:

```text theme={"system"}
  commits  ▕██████████████████████████████████▏  416ms
  tickets  ▕         █████████████████████████▏  305ms
  digest   ▕                                 █▏    0ms
  0s ···································· 417ms
  ╭─ nika ✓ standup-digest ───────────────────╮
  │  ◆◆ ⇉ ◆    3 tasks · 2 waves · 0 retries  │
  │  418ms · $0.0000 · mock/echo              │
  │  outputs → digest (string)                │
  ╰───────────────────────────────────────────╯
```

The same frames are recoverable from any recorded trace, hours or
machines later. After a run, the journal is already on disk. With no
path, these commands read the workspace's latest journal:

```bash theme={"system"}
nika trace show     # storyboard + waterfall + verdict card — a reading
nika trace replay   # re-render the run live · never re-execute — a reading
nika trace verify   # walk the hash chain — the proof, not a reading
```

`trace show` prints the final frames; `trace replay` plays the recorded
events through the same renderer that drew the original run. Replay
calls no model and runs no command — it is a projection of what already
happened. Neither `show` nor `replay` proves the chain;
`nika trace verify` does ([Traces & replay](https://docs.nika.sh/concepts/traces.md)).

## Export to your tracing stack · OTLP

A recorded trace projects to OTLP/JSON lines, so any OpenTelemetry
viewer becomes a Nika run viewer — no collector, no daemon, no vendor.
Unlike `show` / `replay` / `verify`, **`nika trace export` requires the
journal path** — there is no workspace-latest default. Fill `<path>`
with a row from `nika trace ls`.

```text theme={"system"}
nika trace ls
nika trace export <path>
# default sidecar: same stem, `.otlp.jsonl` beside the journal
nika trace export <path> -o run.otlp.jsonl
```

Each verb becomes a span (duration, tokens, the ADR-099 identity
hashes). An `infer:` or `agent:` task also carries the **model** it ran
on, in the standard [OpenTelemetry GenAI semantic
conventions](https://opentelemetry.io/docs/specs/semconv/gen-ai/):
`gen_ai.provider.name`, `gen_ai.request.model`, `gen_ai.response.model`,
`gen_ai.response.id`, `gen_ai.usage.input_tokens`,
`gen_ai.usage.output_tokens` and `gen_ai.workflow.name` — the current
names, so any GenAI-aware viewer (Grafana, Langfuse, Phoenix) reads which
model produced which output with no translation.
Drag the file into the Jaeger UI (≥ 1.60), or POST the lines to any
OTLP/HTTP endpoint. Task outputs stay **local** by default;
`--include-content` widens the exported file to carry them as span
attributes when you explicitly want them. The export is a projection of
the journal — it never re-runs anything.

> [!NOTE]
>
> Because the model, provider, tokens, cost, and status ride every run's
> own trace, **your runs are your own analytics store** — query them with
> `jq`, feed them to any OTel-native eval tool, on files you own, with no
> vendor and no cloud. There is no dataset export for fine-tuning or eval
> sets in 0.123: a training set needs the input prompts, which a trace
> does not capture by default.

## Terminals & CI

The live surfaces are TTY-only by design. Piped or `NO_COLOR` output is
the sober register (plain per-line events — what CI logs want). Two
render themes ship: unicode (default) and `--ascii` (every glyph has an
ASCII twin — use it on terminals without good box-drawing fonts,
including older Windows setups; Windows Terminal renders the default
theme fine). `--color never` (or `--plain`), `NO_COLOR`, and
`CLICOLOR_FORCE` follow the standard resolution order — one global
colour chain, no per-verb twins.

## Related

From an app, iterate `run.events()` then await `run.result()` — see
[SDK runtime events](https://docs.nika.sh/sdk/runtime/events.md). `traceVerify` only reads
evidence the run already left.

* [Concepts · Traces](https://docs.nika.sh/concepts/traces.md): the NDJSON event stream behind
  every frame on this page.
* [Guides · Resume](https://docs.nika.sh/guides/resume.md): the same trace doubles as a
  checkpoint — `--resume` skips completed work with visible cache hits.
* [Reference · CLI](https://docs.nika.sh/reference/cli.md): every render flag.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.