| name | generate-doc |
| description | Generate documentation based on the current conversation |
| allowed-tools | Bash(ls:*), Bash(tree:*), Bash(fd:*), Read, Write, Edit, Glob, Grep |
| model | haiku |
Context
- Project root: !
git rev-parse --show-toplevel
- Existing docs structure: !
tree -d --noreport docs/ 2>/dev/null || echo "No docs/ directory found"
- Existing doc files: !
fd -e md . docs/ 2>/dev/null || echo "No documentation files found"
Guidelines
- Write documentation in English
- Place the file inside the
docs/ folder. If subfolders exist, choose the most relevant one. Create a new subfolder only if no existing one fits
- Use a descriptive kebab-case filename that clearly communicates the content (e.g.,
nix-flake-structure.md, karabiner-custom-shortcuts.md)
- Structure the document with a clear title (
#), an introductory paragraph, and organized sections (##, ###)
- Keep documentation minimal. The purpose is to guide agents/humans on where to make changes and what files are involved, not to explain general concepts. Only document repo-specific details (file paths, conventions, structure). Assume the reader already knows how the tools work
- Avoid generic explanations, tutorials, or "how X works" sections. Focus on: which file to edit, what format to follow, and any repo-specific conventions
Task
Based on the current conversation:
- Identify the key topic or knowledge worth documenting
- Explore the existing
docs/ structure to find the best location
- Write the documentation file following the guidelines above
- Check
AGENTS.md — if the new doc belongs to an existing referenced folder, no update needed. If it creates a new docs/ subfolder, add a reference line in the Documentation section of AGENTS.md
- Confirm the file path and a brief summary of what was documented