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

# audit

> Audit feature groups for gaps and follow-up work.

`audit` 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, then run it with the command below.

`audit` runs a feature-by-feature or group-by-group review using `ForEachFeature`. It's designed to consume `feature-enum`'s output, but accepts any feature map: an object whose keys are group names and values are arrays of feature identifiers:

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{ "GROUP_NAME": ["FEATURE_A", "FEATURE_B"] }
```

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
bunx smthrs workflow run audit \
  --input '{"features":{"GATEWAY":["GATEWAY_RPC_LIST_RUNS"]},"focus":"test coverage"}'
```

<Frame caption="The audit UI fans out across feature groups and merges a single gap report covering tests, docs, and error handling.">
  <img src="https://mintcdn.com/smithers/py7ertgBTLCgQQDl/images/workflow-ui/audit.png?fit=max&auto=format&n=py7ertgBTLCgQQDl&q=85&s=8d57eca551475be3c359fbcb38265d47" alt="audit workflow UI fanning out across feature groups and merging a report" width="1280" height="832" data-path="images/workflow-ui/audit.png" />
</Frame>

## Inputs

| Input               | Type                                                                                               | Default                        |
| ------------------- | -------------------------------------------------------------------------------------------------- | ------------------------------ |
| `features`          | object                                                                                             | `{}`                           |
| `focus`             | string                                                                                             | `"code review"`                |
| `additionalContext` | string or null                                                                                     | `null`                         |
| `maxConcurrency`    | number                                                                                             | `5`                            |
| `agentTier`         | `"cheapFast"` \| `"smart"` \| `"smartTool"` \| `"planning"` \| `"review"` \| `"implement"` or null | `null` (falls back to `smart`) |

## Output

Returns two structured outputs in the run result; nothing is written to disk:

| Key            | Shape                                                  | Description                               |
| -------------- | ------------------------------------------------------ | ----------------------------------------- |
| `auditFeature` | `{ groupName, result, featuresCovered[], score? }`     | One entry per group processed in parallel |
| `audit`        | `{ totalGroups, summary, mergedResult, markdownBody }` | Merged report across all groups           |

## Use it when

* You have a feature map (from [`feature-enum`](/workflows/feature-enum) or your own) and want a per-group gap review.
* You want findings on missing tests, docs, observability, error handling, or maintainability work.

## Use something else when

* You lack a feature inventory: run [`feature-enum`](/workflows/feature-enum) first.
* You want to review a diff rather than feature groups: use [`review`](/workflows/review).

## Resume & retry

Groups process in parallel; runs are durable and resume with `up --resume`.
