nika-debugginglisted
Install: claude install-skill supernovae-st/nika-agents
# Debugging Nika runs
Every run writes a hash-chained journal to `.nika/traces/`. That journal
is the ONLY truth about what happened — debug from the trace, never from
a memory of the terminal scroll.
## The forensic loop (evidence first)
0. **A failed run already names its trace**: the card's `autopsy:`
line carries the FULL trace path — start there when you have it.
1. **Locate the run**: `nika trace ls` — age · size · workflow ·
terminal state (completed/failed/paused) · `★` marks the newest
trace of each workflow (the resume candidate). Address a trace by
its store path — `.nika/traces/<name>` — everywhere below (`ls`
prints bare names; the readers take the path form on every
version).
2. **Read the card**: `nika trace show <trace>` — the final verdict,
the waves, per-task outcome. `nika trace replay <trace>` re-renders
the run live (replay = re-render, NEVER re-execute).
3. **Find the failing task**: `nika trace outputs <trace>` — verb ·
duration · tokens · a bounded preview per task (full value:
`nika trace peek`). The first red task is the root; everything
downstream is fallout.
4. **Decode the finding**: `nika explain NIKA-XXXX` teaches the cause ·
category · fix-form of any code the trace carries.
5. **Re-audit the file**: `nika check <file>` — a run that failed often
fails again at check once you know what to look for (a model that no
longer resolves, a missing env var, a permits violation).
6. **Fix minimally, rerun surg