Skip to content

Commit d7a29b1

Browse files
binarykclaude
andcommitted
feat: add /docs:update command for syncing docs with code changes
New command that analyzes git diff between current branch and base branch, identifies changed features, finds related documentation, and updates it. Features: - Compare against main/staging/custom branch - Analyze frontend and backend changes - Map code changes to affected features - Find and update related documentation - Optional screenshot refresh for UI changes - Dry-run mode for preview - Git staging/commit integration Usage: /docs:update [--base main] [--dry-run] [--screenshots] Bumped version to 0.2.0 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 32a0bf7 commit d7a29b1

4 files changed

Lines changed: 416 additions & 2 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "aidocs-cli"
3-
version = "0.1.0"
3+
version = "0.2.0"
44
description = "AI-powered documentation generator for web applications. Install docs commands into your Claude Code project."
55
readme = "README.md"
66
license = { text = "MIT" }

src/aidocs_cli/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""AI-powered documentation generator CLI for Claude Code projects."""
22

3-
__version__ = "0.1.0"
3+
__version__ = "0.2.0"
44

55
from .cli import app
66

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
name: docs:update
3+
description: Update documentation based on code changes in current branch
4+
---
5+
6+
# Update Documentation from Code Changes
7+
8+
Update existing documentation based on git diff between your current branch and a base branch.
9+
10+
**Usage:**
11+
```
12+
/docs:update [--base main] [--output ./docs]
13+
```
14+
15+
**Arguments:**
16+
- `--base` - Base branch to diff against (default: main)
17+
- `--output` - Documentation directory (default from config or ./docs)
18+
19+
**What it does:**
20+
1. Gets git diff between current branch and base branch
21+
2. Identifies changed routes, components, and features
22+
3. Finds related existing documentation
23+
4. Updates docs to reflect the code changes
24+
5. Optionally captures new screenshots if UI changed
25+
26+
---
27+
28+
**Execute workflow:** `@docs-workflows/update/workflow.md`

0 commit comments

Comments
 (0)