documenting-code
Documentation Update
Update project documentation to reflect current code state.
Use TaskCreate / TaskUpdate to track these 5 phases:
- Determine documentation scope
- Analyze recent changes
- Spawn docs-keeper agent
- Update documentation
- Verify and report
Phase 1: Determine Scope
Use AskUserQuestion:
| Header | Question | Options |
|---|---|---|
| Doc scope | What documentation should I update? | 1. Auto-detect - Scan for outdated docs based on recent changes 2. README - Update project README 3. API docs - Update API/function documentation 4. All - Comprehensive documentation refresh |
Phase 2-4: Spawn docs-keeper Agent
Spawn docs-keeper agent with documentation prompt:
Task with docs-keeper agent:
"Update documentation for this project.
## Your Task
1. Analyze current state:
- Run `git diff --name-only HEAD~5` for recent changes
- Find existing docs: `find . -name '*.md' -o -name 'doc.go'`
- Check project structure and dependencies
2. Scope: {user's choice from Step 1}
3. Update focus:
- Accurate function/method documentation
- README sections matching current state
- API endpoint documentation
- Architecture notes if significant changes
4. Verify:
- No broken links
- Code examples compile/run
- Markdown renders correctly
## Output Format
DOCUMENTATION UPDATE
====================
Updated:
- file.md (what changed)
- pkg/doc.go (added GoDoc)
Verified: All links valid, examples compile"
Phase 4: Research Best Practices (If Needed)
Use Context7 for documentation patterns:
mcp__context7__query-docs for GoDoc, Sphinx, or framework-specific docs
Phase 5: Verify and Present Summary
Independent verification (do not trust the agent's self-report):
- Run
git diff --statto confirm files were actually changed - For each changed file, verify the diff looks correct (no broken links, no placeholder text)
- If no files changed, report that docs-keeper made no modifications
Report what was updated, verified diffs, and any issues found.
If no recent changes are found or documentation scope is unclear, ask the user what to document rather than generating speculative documentation.
Execute documentation update now.
More from alexei-led/cc-thingz
improving-tests
Improve test design and coverage, including TDD/red-green-refactor guidance. Use when user says "improve tests", "refactor tests", "test coverage", "combine tests", "table-driven", "parametrize", "test.each", "test-first", "TDD", "red-green-refactor", or wants to remove test waste.
4refactoring-code
Batch refactoring via MorphLLM edit_file. Use for "refactor across files", "batch rename", "update pattern everywhere", large files (500+ lines), 5+ edits in same file, or applying an approved architecture-deepening refactor.
3debating-ideas
Dialectic thinking — spawn thesis and antithesis agents to stress-test ideas, then synthesize and verify against code. Use when user says "debate", "argue both sides", "devil's advocate", "stress test this idea", "pros and cons of approach", or wants rigorous evaluation of a design decision.
3linting-instructions
Lint plugin agent/skill prompts against rules derived from Anthropic model cards (Opus 4.6, Sonnet 4.6). Use when authoring or reviewing skills and agents — "lint instructions", "audit prompts", "model card rules".
3learning-patterns
Extract learnings and generate project-specific customizations (CLAUDE.md, commands, skills, hooks). Use when user says "learn", "extract learnings", "what did we learn", "save learnings", "adapt config", or wants to improve Claude Code based on conversation patterns.
3analyzing-usage
>-
3