---
description: Update this repo's AI docs (.claude/docs, README, CLAUDE.md) to match recent code changes
argument-hint: "[optional: a doc name or area to focus on]"
---

# Update docs

Update the project's AI documentation so it reflects recent code changes. Edit
**docs only** — never change source code.

## 1. Find what changed

From the repo root, inspect the working tree:

- `git status --short`
- `git diff --stat` and `git diff --cached --stat`

Treat only non-`.md` files as the "code changes". If there are none, say
"No code changes — nothing to update." and stop.

## 2. Gather candidate docs

- Every file under `.claude/docs/*.md`.
- Every `README.md` and `CLAUDE.md` found walking **up** from each changed
  file's directory to the repo root.

(This mirrors the scope the Stop hook uses, so the command and the hook agree on
which docs are in play.)

## 3. Decide and update

For each candidate doc, read it and compare it against the actual diff:

- If the change made something in the doc inaccurate, incomplete, or missing,
  update it with **minimal, surgical edits** that match the new code. Do not
  rewrite wholesale, restyle, or touch unrelated sections.
- If the doc is still accurate, leave it untouched.

## 4. Report

List each candidate doc as exactly one of:

- `updated — <one-line description of what changed>`
- `no change needed`

Keep the report tight.

---

**Constraints**

- Edit only `.claude/docs/*.md`, `README.md`, and `CLAUDE.md`. Never edit source
  code, tests, or config.
- If `$ARGUMENTS` is provided, treat it as a scope hint (e.g. a specific doc or
  area) and focus there.
