Skip to main content

How it works

Doc is the second step in the Lift pipeline, running after 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.
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.

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:
$ 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:
# 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:
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:
$ 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:
No documentation updates needed.
This is the most common outcome for internal changes. No files are modified, no commit amendments happen.