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

# Mini maintains your suite

> How Mini keeps your suite current with your app, drafting new user stories, retiring stale ones, and keeping criteria honest as the UI changes.

A test suite is easy to write and hard to keep honest. Your app keeps moving, and the suite has to move with it.

**Mini's self-maintenance** is what keeps the two in sync. Mini reads your codebase, generates the first version of the suite, and keeps it current as you ship. Add a feature and it drafts a story for it. Remove one and the story retires. Reshape a screen and it rewrites the criteria to match.

<Note>
  **Automatic self-maintenance needs the GitHub integration.** The background flow reads your repo to detect changes on the default branch, so without the [GitHub integration](/docs/minitest/integrations/github) active and pointed at the right repo, Mini has nothing to watch. No GitHub? Run maintenance yourself from the CLI. See [Maintenance from the CLI](#maintenance-from-the-cli).
</Note>

## What it covers

<CardGroup cols={3}>
  <Card title="Microscopic drift" icon="scan-line">
    A renamed button, a tweaked label, a reordered form. The story stays; criteria are rewritten to match what's on screen now.
  </Card>

  <Card title="Macroscopic drift" icon="layers">
    A whole feature removed, a new journey shipped. Stories are added or retired.
  </Card>

  <Card title="Connective tissue" icon="git-branch">
    Dependencies between stories get wired automatically. Existing profiles get linked to the journeys that need them.
  </Card>
</CardGroup>

## How it works

Mini watches what lands on the **default branch** (`main` in most cases). When the diff is meaningful, it updates the suite in the background: it drafts new stories, retires stale ones, and rewrites criteria to match the new UI.

You don't trigger it, and you don't review every change. You just keep shipping.

## What stays manual

Two things Mini can't infer from code alone:

<CardGroup cols={2}>
  <Card title="New profiles" icon="user-plus">
    If a new journey needs a new identity (a `Pro user` to test a paywall, an `Admin` for a settings screen), you'll be prompted to provide the credentials. Existing profiles get linked automatically.
  </Card>

  <Card title="Device files" icon="paperclip">
    Photos to upload, PDFs to attach, audio to play back. Anything that lives outside your repo, you attach by hand.
  </Card>
</CardGroup>

Both can be done from the [dashboard, your IDE, or Slack](/docs/minitest/suite/authoring).

## Maintenance from the CLI

If you'd rather not connect GitHub, run maintenance on demand from your app repository with the `minitest maintenance` command group. Your own AI coding agent reads the local diff and drafts the criteria edits; the CLI sends only those proposed edits and the local commit SHA, so your code never leaves your machine.

```bash theme={null}
minitest maintenance --agent
```

The agent opens a run, declares affected stories, and posts proposed changes to the Release queue. Review them in the dashboard or apply them straight away:

```bash theme={null}
minitest maintenance apply --review
```

See the [`maintenance` command reference](/docs/minitest/reference/cli-commands#maintenance) for the full workflow.
