Loading...
Loading...
Analyse code changes since the last docs update and refresh the project's documentation files. Use when code has changed and documentation needs to be updated, after implementing new features, or before a milestone commit.
npx skill4agent add a-green-hand-jack/ml-research-skills update-docsgit# Project root and current branch
git rev-parse --show-toplevel && git branch --show-current
# Last 5 commits (so we can pick the baseline)
git log --oneline -5# Look for common doc directory patterns
find "$(git rev-parse --show-toplevel)" -maxdepth 3 -type d \
\( -name "docs" -o -name "doc" -o -name "wiki" -o -name "pages" \) \
! -path "*/.git/*" ! -path "*/node_modules/*" ! -path "*/.venv/*"
# Also check for top-level markdown files
find "$(git rev-parse --show-toplevel)" -maxdepth 1 -name "*.md" -type f$ROOT$DOCS_DIRdocs/src/docs/wiki/$DOCS_DIRdocs/docs/src/README.mdgit log --oneline --all -- "$DOCS_DIR" | head -5<baseline>git log --oneline --all | tail -1git diff <baseline> HEAD --stat -- . \
':!'"$DOCS_DIR" ':!*.md' ':!*.rst' ':!*.txt' ':!*.json'git diff <baseline> HEAD -- . \
':!'"$DOCS_DIR" ':!*.md' ':!*.rst' ':!*.txt' ':!*.json'Tip: If the diff exceeds ~400 lines, analyse it file by file using:bashgit diff <baseline> HEAD -- path/to/file.pyFocus on: new/deleted classes or functions, changed method signatures, new modules, changed configuration keys, new data files.
| Type of code change | What to update |
|---|---|
| New class or module added | Add it to whichever architecture/overview doc covers that layer; update dependency diagrams |
| Class or function deleted | Remove or strike from all docs that mention it |
| Method signature / parameter changed | Update code examples, parameter tables |
| New config key or environment variable | Update configuration docs |
| New external dependency added | Update setup/installation docs |
| Data schema changed (DB, JSON, Pydantic, etc.) | Update data model docs |
| New CLI command or flag | Update CLI reference / usage docs |
| Behaviour change (algorithm, business logic) | Update design/architecture docs |
| New test coverage (major new tests) | No doc update usually needed unless testing guide exists |
docs: update <DOCS_DIR> to reflect changes since <baseline-short-hash><DOCS_DIR><message>git add <DOCS_DIR> && git commit -m "<message>"git add <DOCS_DIR> && git commit -m "docs: ..."