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

# Doc 📝

> Automatic documentation updates generated via Claude CLI, keeping your docs in sync with every commit.

## How it works

Doc is the second step in the Lift pipeline, running after [Inky](/lift/tools/inky) rewrites your commit message.

1. Your latest commit diff is retrieved
2. The diff is sent to Claude CLI for analysis
3. Claude determines which documentation files (if any) need updates
4. If updates are needed, the relevant files are edited directly
5. The changes are left in your working directory for you to review

Doc tags your commit with `#doc` so the pipeline knows this tool has run. If the commit has already been processed, Doc skips it in passive mode.

## What Doc considers

Doc looks at documentation files that already exist in your repository. The default paths are:

* **README.md** — project overview and setup instructions
* **CLAUDE.md** — AI context files in the root or subdirectories
* **.mdx files** — documentation pages
* **.feature files** — BDD/Gherkin specifications

These paths are configurable via the `doc.paths` setting in your [lift config](/lift/reference/configuration).

<Note>
  Doc only edits existing files. It never creates new documentation files. If your project needs a new doc, you write it — Doc keeps it current after that.
</Note>

## When Doc makes changes

Doc only updates documentation when code changes affect:

* User-facing behavior
* APIs or endpoints
* Configuration options
* Workflows or setup instructions

Internal refactors, test changes, and code reorganization that don't change how someone uses the project are left alone. Doc matches the existing style and tone of each file it edits, so the updates read like the rest of your docs.

## Running Doc by itself

To run only Doc without the rest of the pipeline:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
$ lift -d
```

This is useful when you want to update documentation for a commit without rewriting the commit message.

You can combine it with other flags:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
# Force re-processing even if already processed
$ lift -d -f
```

## Reviewing changes

After Doc runs, any modified files appear in your working directory as uncommitted changes. You'll see output like:

```shellsession wrap theme={"theme":{"light":"github-light","dark":"github-dark"}}
Temporal modifications detected in the following files:
  M README.md
  M taho-swarm/CLAUDE.md

Now, carefully inspect the alterations and commit them to the timeline.
```

Review the changes before committing. Doc is good at identifying what needs updating, but you should always verify the edits make sense in context.

## Cleanup mode

If Doc made changes you don't want, cleanup mode reverts all `.md` file modifications from the current commit:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
$ lift -c
```

This reverts every `.md` file to its state before the pipeline ran and amends the commit to remove those changes.

## When Doc does nothing

If the diff doesn't affect anything user-facing, Doc reports that no updates are needed and exits cleanly:

```shellsession theme={"theme":{"light":"github-light","dark":"github-dark"}}
No documentation updates needed.
```

This is the most common outcome for internal changes. No files are modified, no commit amendments happen.
