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

# debug

> Reproduce and fix a reported bug with validation.

`debug` is an archived example, not installed by `init`. Copy it from `examples/init-pack/` with its dependency closure, or ask `create-workflow` to build an equivalent.

`debug` reuses `implement`'s `ValidationLoop` component with a bug-focused default prompt, but skips early-exit (`done`) and prior-attempt feedback, so it always runs all `maxIterations` (up to 3) instead of stopping once validation passes and a reviewer approves.

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
bunx smthrs workflow run debug --prompt "Fix the intermittent gateway reconnect failure"
```

<Frame caption="The debug UI shows the reproduce → fix → validate iterations, with no early exit until the fix is verified.">
  <img src="https://mintcdn.com/smithers/py7ertgBTLCgQQDl/images/workflow-ui/debug.png?fit=max&auto=format&n=py7ertgBTLCgQQDl&q=85&s=518bab900cbf56c9520f44fbc6e41f47" alt="debug workflow UI showing reproduce, fix, and validation iterations" width="1280" height="832" data-path="images/workflow-ui/debug.png" />
</Frame>

## Inputs

| Input    | Type   | Default                                 |
| -------- | ------ | --------------------------------------- |
| `prompt` | string | `"Reproduce and fix the reported bug."` |

## How It Runs

1. Reproduces the bug.
2. Applies a targeted fix.
3. Validates the result.
4. Reviews the fix, repeating the implement/validate/review cycle via `ValidationLoop` for all `maxIterations` (up to 3).

After the fix lands, run `improve-test-coverage` for a regression test, then `review` to confirm production-readiness.

## Output Shape

`debug` commits changes directly to the working tree. The run log records each iteration's validation result and reviewer feedback; the last iteration's output is the final result.

## Use it when

* A reported bug needs reproduction, a fix, and validation.
* You want every iteration to run rather than stopping at the first green check.

## Use something else when

* You already know the fix and just want it applied and reviewed: use [`implement`](/workflows/implement).
* You need a regression test for the fix: follow with [`improve-test-coverage`](/workflows/improve-test-coverage).

## Resume & retry

Runs are durable and resume with `up --resume`.
