Update and reorganize README documentation based on codebase changes. Use when adding features, refactoring modules, updating APIs, or when documentation drifts from implementation.
Analyze codebase changes and intelligently update README documentation to reflect current implementation.
Identify what has changed since README was last accurate:
# Find when README was last modified
git log -1 --format="%h %s" -- README.md
# Get commits since README update
git log $(git log -1 --format="%h" -- README.md)..HEAD --oneline --no-merges
# See what files changed
git diff --name-only $(git log -1 --format="%h" -- README.md)..HEAD
Deploy parallel sub-agents to analyze different aspects:
| Sub-Agent | Task |
|---|---|
| Structure Analyzer | Review current README structure, identify sections, assess organization |
| Codebase Scanner | Scan exports, public APIs, module structure, entry points |
| Change Detector | Compare README claims against current implementation |
| Example Validator | Verify code examples still compile/work |
Prompt each sub-agent with:
"Analyze [scope] and report findings relevant to README accuracy. Focus on public-facing APIs, usage patterns, and installation/setup procedures."
Aggregate sub-agent reports into:
# README Update Report
## Analysis Summary
[One paragraph overview of changes needed]
## Sections Updated
| Section | Change Type | Description |
|---------|-------------|-------------|
| Installation | Updated | New dependency added |
| API Reference | Added | New `createClient()` function |
| Examples | Fixed | Updated import paths |
## Sections Reorganized
[Describe any structural changes and rationale]
## Code Examples Validated
- [x] Quick start example
- [x] API usage example
- [ ] Advanced configuration (needs fix)
## Changes Applied
[Summary of edits made to README.md]
When reorganizing README content:
Input: User says "update the readme, I just added the Groq provider"
Action:
Output: Updated README with Groq documentation + report of changes made