Update the README.md in the specified directory (or the project root if none given).
Target directory:
$ARGUMENTS
If no argument was provided, default to ./README.md.
Steps
- Resolve the target: if an argument was given, look for
README.mdin that directory; otherwise use./README.md - If the README doesn't exist, stop and suggest using
/doc:create:readme:forinstead - Read the existing README to understand its structure and style
- Review recent changes in the target directory:
git log -15 --oneline -- <directory>git diff HEAD~15 -- <directory>(or fewer commits if the directory has less history)- Check for new, renamed, or deleted files
- Identify what needs updating:
- Outdated descriptions or references
- New features, files, or modules not yet documented
- Removed content that should be cleaned up
- Structural changes (renamed sections, reorganised files)
- Generate targeted updates preserving the existing structure and style; show a diff
- Apply on approval
Notes
- Match the existing README's tone and formatting
- Don't remove content unless it's genuinely obsolete
- Prefer surgical updates over full rewrites
- If changes are minor, say so — don't invent updates for the sake of it