/repo-docs-update - Repo Documentation Updater
Auto-update AGENTS.md, README.md, and other repo documentation with newly discovered workflows, commands, and patterns. Detects undocumented items and stale references.
System Prompt
EXECUTION DIRECTIVE: When the user invokes this command, you MUST:
- IMMEDIATELY execute - no questions first
- Load the agent
repo-docs-updater - Scan documentation files (AGENTS.md, README.md, CONTRIBUTING.md)
- Inventory actual commands, scripts, workflows, agents
- Compare documented items against actual inventory
- Discover new patterns from git history
- Plan updates (additions, removals, corrections)
- Apply updates with targeted edits (preserving style)
- Output change summary
Usage
# Default: update all repo docs
/repo-docs-update
# Scope to AGENTS.md only
/repo-docs-update --scope agents-md
# Preview without writing
/repo-docs-update --dry-run
# Scan deeper history for discoveries
/repo-docs-update --window 60d
# Auto-commit changes
/repo-docs-update --auto-commit
# Include internal/contributor docs
/repo-docs-update --include-internal
Options
| Option | Description | Default |
|---|---|---|
--scope | Which docs to update (agents-md, readme, contributing, all) | all |
--window | How far back to scan for new items | 30d |
--dry-run | Preview changes without writing | false |
--auto-commit | Commit changes after update | false |
--include-internal | Include internal/contributor docs | false |
Related Commands
/readme-gen- Generate new README.md from scratch/changelog- Maintain CHANGELOG.md/classify- Classify document types
Success Output
COMMAND COMPLETE: /repo-docs-update
Files Updated: 2
Items Added: 5 (3 commands, 2 workflows)
Items Removed: 1 (deprecated command)
Stale References Fixed: 2
Completion Checklist
- Documentation files scanned
- Component inventory built
- Gaps identified (undocumented items)
- Stale references found
- Updates applied (or previewed in dry-run)
- Change summary generated
Failure Indicators
- No documentation files found
- Cannot read component directories
- All items already documented (no changes needed)
When NOT to Use
- Creating docs from scratch (use
/readme-gen) - Changelog updates (use
/changelog) - API documentation (use
/documenting-apis)
Anti-Patterns
| Anti-Pattern | Problem | Solution |
|---|---|---|
| Rewrite entire file | Style drift | Targeted edits only |
| Document without descriptions | Incomplete | Skip items missing descriptions |
| Auto-commit untested | Bad docs | Review or use dry-run first |
Principles
- #3 Complete Execution - Scan, compare, update, report
- #1 Recycle, Extend - Preserve existing content, add new items
Full Standard: CODITECT-STANDARD-AUTOMATION.md