> ## 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 refine

> Add a description of a change to requirements.md, context.md and prompts.md, with a preview first.

```bash theme={null}
specpilot refine [description] [options]
```

Alias: `specpilot ref`. Without a description, it asks for one.

## Options

| Option | What it does | Default |
| - | - | - |
| `-d, --dir <directory>` | The project folder | `.` |
| `--specs-name <name>` | The specs folder's name | `.specs` |
| `--no-prompts` | Writes without asking | Off |
| `-u, --update` | Replaces the overview and creates missing spec and IDE files | Off |

## What it does

It shows the changes as a diff and asks before writing:

* [`requirements.md`](https://docs.specpilot.dev/reference/spec-files/requirements): your text, as `### Additional Context` under `## Project Overview`.
* [`context.md`](https://docs.specpilot.dev/reference/spec-files/context): a dated "Latest Specification Update" under `## Project Memory`.
* [`prompts.md`](https://docs.specpilot.dev/reference/spec-files/prompts): an entry for the change.

It adds text, not requirements with `REQ-###` IDs. For those, use `/specpilot-refine` in your agent. See [Slash commands](https://docs.specpilot.dev/slash-commands.md).

## With `--update`

`--update` replaces the overview with your text and sets the `description:` line in `project.yaml` to it, as one more change in the diff. Then it creates any spec or IDE file that's missing. Every file that's there, `project.yaml` included, stays as it is.

If `project.yaml` has no top-level `description:` line, or doesn't parse, refine says so and leaves it as it is. Without `--update`, refine doesn't touch `project.yaml`.

## Example

```bash theme={null}
specpilot refine "Add CSV export of the board"
```

Checked against SpecPilot 2.22.0.


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