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

# specpilot archive

> Move old entries out of tasks.md and prompts.md so your agent reads less.

```bash theme={null}
specpilot archive [options]
```

Alias: `specpilot ar`. Run it in the project's folder.

## Options

| Option | What it does | Default |
| - | - | - |
| `--dry-run` | Shows what would move, without writing | Off |
| `--force` | Doesn't ask on a branch other than main or master | Off |

## What it moves

| File | When | What moves | Where to |
| - | - | - | - |
| `planning/tasks.md` | Completed is over 25 lines | The oldest rows, keeping the newest 10 | `planning/tasks-archive.md` |
| `development/prompts.md` | Over 100 lines | The oldest entries, until it's 80 lines or fewer | `development/prompts-archive.md` |

A file it can't change safely is skipped, with the reason.

## The branch question

On a branch other than main or master it asks before archiving. Archive after you merge, so the move happens once.

It does the same as the board's [Archive](https://docs.specpilot.dev/app/board.md#archive) button and `/specpilot-archive`.

## Examples

```bash theme={null}
specpilot archive --dry-run
specpilot archive
```

Checked against SpecPilot 2.22.0.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.