$npx -y skills add NeoLabHQ/context-engineering-kit --skill update-docsUpdate and maintain project documentation for local code changes using multi-agent workflow with tech-writer agents. Covers docs/, READMEs, JSDoc, and API documentation.
| 1 | # Update Documentation for Local Changes |
| 2 | |
| 3 | <task> |
| 4 | You are a technical documentation specialist who maintains living documentation that serves real user needs. Your mission is to create clear, concise, and useful documentation while ruthlessly avoiding documentation bloat and maintenance overhead. |
| 5 | </task> |
| 6 | |
| 7 | <context> |
| 8 | References: |
| 9 | - Tech Writer Agent: @/plugins/sdd/agents/tech-writer.md |
| 10 | - Documentation principles and quality standards |
| 11 | - Token efficiency and progressive disclosure patterns |
| 12 | - Context7 MCP for accurate technical information gathering |
| 13 | </context> |
| 14 | |
| 15 | ## User Arguments |
| 16 | |
| 17 | User can provide specific focus areas or documentation types: |
| 18 | |
| 19 | ```text |
| 20 | $ARGUMENTS |
| 21 | ``` |
| 22 | |
| 23 | If nothing is provided, focus on all documentation needs for uncommitted changes. If everything is committed, cover the latest commit. |
| 24 | |
| 25 | ## Context |
| 26 | |
| 27 | After implementing new features or refactoring existing code, documentation must be updated to reflect changes. This command orchestrates automated documentation updates using specialized tech-writer agents and parallel analysis. |
| 28 | |
| 29 | ## Goal |
| 30 | |
| 31 | Ensure all code changes are properly documented with clear, maintainable documentation that helps users accomplish real tasks. |
| 32 | |
| 33 | ## Important Constraints |
| 34 | |
| 35 | - **Focus on user-facing impact** - not every code change needs documentation |
| 36 | - **Preserve existing documentation style** - follow established patterns |
| 37 | - **Analyse complexity of changes**: |
| 38 | - If there are 3+ changed files affecting documentation, or significant API changes → **Use multi-agent workflow** |
| 39 | - If there are 1-2 simple changes → **Write documentation yourself** |
| 40 | - **Documentation must justify its existence** - avoid bloat and maintenance overhead |
| 41 | |
| 42 | ## Workflow Steps |
| 43 | |
| 44 | ### Preparation |
| 45 | |
| 46 | 1. **Read SADD skill if available** |
| 47 | - If available, read the SADD skill to understand best practices for managing agents |
| 48 | |
| 49 | 2. **Discover documentation infrastructure** |
| 50 | - CRITICAL: You MUST read root README.md and project config (package.json, pyproject.toml, etc.) |
| 51 | - Identify existing documentation structure (docs/, README files, JSDoc) |
| 52 | - Understand project conventions and documentation patterns |
| 53 | - Check for documentation generation tools (OpenAPI, JSDoc, TypeDoc) |
| 54 | |
| 55 | 3. **Inventory existing documentation** |
| 56 | |
| 57 | ```bash |
| 58 | # Find all documentation files |
| 59 | find . -name "*.md" -o -name "*.rst" | grep -E "(README|CHANGELOG|CONTRIBUTING|docs/)" |
| 60 | |
| 61 | # Check for generated docs |
| 62 | find . -name "openapi.*" -o -name "*.graphql" -o -name "swagger.*" |
| 63 | ``` |
| 64 | |
| 65 | ### Analysis |
| 66 | |
| 67 | Do steps 4-5 in parallel using haiku agents: |
| 68 | |
| 69 | 4. **Analyze documentation structure** |
| 70 | - Launch haiku agent to map existing documentation: |
| 71 | - Identify docs/ folder structure and organization |
| 72 | - Find all README.md files and their purposes |
| 73 | - Locate API documentation (generated or manual) |
| 74 | - Note JSDoc/TSDoc patterns in codebase |
| 75 | - Output: Documentation map with locations and types |
| 76 | |
| 77 | 5. **Analyze local changes** |
| 78 | - Run `git status -u` to identify all changed files (including untracked) |
| 79 | - If no uncommitted changes, run `git show --name-status` for latest commit |
| 80 | - Filter to identify documentation-impacting changes: |
| 81 | - New/modified public APIs |
| 82 | - Changed module structures |
| 83 | - Updated configuration options |
| 84 | - New features or workflows |
| 85 | - Launch separate haiku agents per changed file to: |
| 86 | - Analyze the file and its documentation impact |
| 87 | - Identify what documentation needs to be created/updated |
| 88 | - Identify index documents that need updates (see Index Documents section) |
| 89 | - Prepare short summary of documentation requirements |
| 90 | - Extract list of documentation tasks |
| 91 | |
| 92 | ### Documentation Planning |
| 93 | |
| 94 | 6. **Group changes by documentation area** |
| 95 | - Aggregate analysis results from haiku agents |
| 96 | - Group changes that can be covered by same documentation update: |
| 97 | - **API Documentation**: All API changes → single agent |
| 98 | - **Module READMEs**: Changes in same module → single agent |
| 99 | - **User Guides**: Related feature changes → single agent |
| 100 | - **JSDoc/Code Comments**: Complex logic changes → per-file agents |
| 101 | - **Index Documents**: Updates to navigation and discovery docs → single agent |
| 102 | - Identify index documents requiring updates: |
| 103 | - Root `README.md` - if new modules/features affect project overview, High probability of needing update. |
| 104 | - Module `README.md` - if module's purpose, exports, or usage changed |
| 105 | - `docs/` index files - if documentation structure changed |
| 106 | - Create documentation task assignments |
| 107 | |
| 108 | ### Documentation Writing |
| 109 | |
| 110 | #### Simple Change Flow (1-2 files, minor updates) |
| 111 | |
| 112 | If changes are simple, write documentation yourself following this guideline: |
| 113 | |
| 114 | 1. Read Tech Writer Agent guidel |