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

# improve-test-coverage

> Add missing tests and validate the result.

`improve-test-coverage` is archived (not installed by `init`): copy it from `examples/init-pack/` with its dependency closure, or ask `create-workflow` to build an equivalent. It runs the shared `ValidationLoop`, prompted to find and fill high-impact test gaps.

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
bunx smthrs workflow run improve-test-coverage --prompt "Add regression coverage for webhook signature failures"
```

<Frame caption="The improve-test-coverage UI shows the high-impact gaps it fills and validates that the new tests pass.">
  <img src="https://mintcdn.com/smithers/py7ertgBTLCgQQDl/images/workflow-ui/improve-test-coverage.png?fit=max&auto=format&n=py7ertgBTLCgQQDl&q=85&s=54753037040645363cb936ee099a427b" alt="improve-test-coverage workflow UI showing added and validated tests" width="1280" height="832" data-path="images/workflow-ui/improve-test-coverage.png" />
</Frame>

## Inputs

| Input    | Type   | Default                                                   |
| -------- | ------ | --------------------------------------------------------- |
| `prompt` | string | `"Improve the test coverage for the current repository."` |

## Use it when

* A feature landed without enough tests.
* A bug fix needs regression coverage.
* Review/audit found weak boundary coverage.

## Use something else when

* Still fixing the bug: use [`debug`](/workflows/debug) first, then this workflow for regression coverage.
* Want a broad gap report instead of new tests: use [`audit`](/workflows/audit) with `focus: "test coverage"`.

## Resume & retry

Runs the shared validation loop (up to 3 iterations), commits to the working tree, and resumes durably with `up --resume`.

Transient session/infra errors (`SESSION_ERROR`, stream disconnects, rate limits, OOMs, timeouts) must never fail a whole run; retry the affected node, let unrelated verified work continue.
