Generate missing documentation or architectural decision records (ADRs).
Process
- Identify context:
- If code changes are involved: run jj diff -s first to see changed files - If the user specified specific files or paths, focus on those
- Determine Documentation Type:
- Inline Docs: Docstrings, comments for functions/classes - File/Module Docs: Top-level explanations (README.md updates) - ADR: Architecture Decision Record for design choices
- Execute based on type: Inline/Module Docs: ADR (Architecture Decision Record):
- Read and understand the code - Check existing doc style (Google, NumPy, Javadoc, etc.) - Generate documentation that matches the project style - Action: Propose changes to files - Ask user for: Context, Decision, Consequences (if not provided) - Format it correctly (Title, Status, Context, Decision, Consequences) - Action: Create new file in doc/adr/ (or project equivalent)
Output
- Documentation Plan (what will be documented)
- Generated Content (preview)
- Changes Applied (file paths)