update-project-documentation
Skill43 starsChanged 6 months agoMITView on GitHub
Update existing project documentation to maintain parity with source code changes. Analyzes code diffs, identifies documentation gaps, and surgically updates affected documents while preserving structure and style.
In this repository22 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- llms-full.txtllms.txt
- llms.txtllms.txt
- create-architectural-decision-recordSkill
- create-implementation-planSkill
- create-mcp-evaluationSkill
- create-mcp-toolSkill
- create-specificationSkill
- generate-project-documentationSkill
- generate-release-notesSkill
- git-commitSkill
- golang-patternsSkill
- golang-testingSkill
- go-safe-move-refactorSkill
- go-source-documentationSkill
- increase-test-coverageSkill
- modularize-go-packageSkill
- review-and-refactorSkill
- update-starlight-docsSkill
- upstream-contributionSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
32 rules. About 0 are common, 28 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈28
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 10
Update existing documentation in the docs/ directory to reflect current source code changes.
- Distinctive: line 20
Check recent changes using git diff or by examining the files provided
- Distinctive: line 21
If no specific files are indicated, scan all Go source files for modifications
- Distinctive: line 46
Read the current documentation
- Distinctive: line 56
UPD-002: Use surgical edits — replace only the changed sections, not entire files
- Distinctive: line 58
UPD-004: Update Mermaid diagrams if component relationships changed
- Distinctive: line 59
UPD-005: Update tables (parameters, types, functions) to match source
- Distinctive: line 60
UPD-006: Add deprecation notices for removed APIs rather than deleting immediately
- Distinctive: line 61
UPD-007: Never introduce TBD/TODO placeholders in updates
- Very specific: line 63
UPD-009: When creating or editing Markdown pipe tables in README.md or docs/, run go run ./cmd/format_md_tables/ and verify with go run …
- Very specific: line 64
UPD-010: Never hand-edit generator-owned content: the README stats block, docs/development/testing/testing.md, the catalog tables in …
- Distinctive: line 68
Add new entries to the appropriate reference document tables
- Distinctive: line 69
Add new sections following the existing document pattern and style
- Distinctive: line 70
Update the package documentation if the API belongs to an existing package
- Distinctive: line 71
Add cross-references from related documents
- Distinctive: line 72
Update the documentation index if new documents are created
- Very specific: line 76
Update parameter tables with new/changed/removed parameters
- Distinctive: line 77
Update return type documentation if changed
- Distinctive: line 78
Update code examples to reflect the new signature
- Distinctive: line 79
Add migration notes if the change is breaking
- Distinctive: line 80
Update Mermaid diagrams if type relationships changed
- Distinctive: line 86
Update cross-references that pointed to the removed API
- Distinctive: line 87
After one release cycle, fully remove the deprecated section
- Distinctive: line 91
Update the environment variables table
- Distinctive: line 92
Update default values and descriptions
- Distinctive: line 93
Add migration instructions if existing users need to change their config
- Distinctive: line 94
Update deployment documentation if the change affects deployment
- Distinctive: line 98
After all updates are applied, perform a parity check:
- Distinctive: line 102
Read the updated documentation
- Distinctive: line 104
Verify all code examples are syntactically valid
- Distinctive: line 106
Check all cross-reference links resolve correctly
- Distinctive: line 123
After completing updates, provide a summary:
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Update Project Documentation
Primary Directive
Update existing documentation in the docs/ directory to reflect current source code changes. Perform a delta analysis between the implementation and documentation, then surgically update only the affected sections while preserving the overall document structure, style, and formatting.
Execution Context
This skill is triggered after code changes to ensure documentation stays in sync. It focuses on efficiency — only updating what has changed rather than regenerating entire documents.
Analysis Phase
Step 1: Identify Changed Code
- Check recent changes using git diff or by examining the files provided
- If no specific files are indicated, scan all Go source files for modifications
- Build a list of changed exported types, functions, constants, and configurations
- Identify new, modified, or removed public APIs
Step 2: Map Changes to Documentation
For each code change, identify which documentation files are affected:
| Change Type | Affected Documentation |
| New exported type/function | Its godoc comment (make audit-godocs-check), possibly tools/resources reference |
| Modified function signature | Godoc comment, tools reference, examples |
| New MCP tool | The docs/reference/tools/ page that owns the domain (doc-ownership.json there; go run ./cmd/audit_doc_coverage/ gates it); the catalog tables in docs/reference/tools/README.md are generated |
| New MCP resource | docs/reference/resources.md |
| New MCP prompt | docs/reference/prompts.md |
| Configuration change | docs/reference/configuration.md, docs/reference/env.md, docs/reference/cli.md, and the CLAUDE.md variable and flag tables |
| New package | docs/concepts/architecture.md component view; docs/development/cmd-utilities.md for a new cmd/ utility |
| Architecture change | docs/concepts/architecture.md, diagrams |
| Build/deploy change | docs/development/development.md, docs/guides/installation.md, docs/guides/remote-deployment.md |
| Removed API | All referencing documents |
Step 3: Assess Impact
For each affected document:
- Read the current documentation
- Compare with the current source code
- Classify the update as: Minor (parameter change), Moderate (new section), or Major (restructure)
- Prioritize Critical and High priority documents first
Update Strategy
Principles
- UPD-001: Preserve existing document structure, heading hierarchy, and formatting style
- UPD-002: Use surgical edits — replace only the changed sections, not entire files
- UPD-003: Maintain cross-reference integrity — check all links still work
- UPD-004: Update Mermaid diagrams if component relationships changed
- UPD-005: Update tables (parameters, types, functions) to match source
- UPD-006: Add deprecation notices for removed APIs rather than deleting immediately
- UPD-007: Never introduce TBD/TODO placeholders in updates
- UPD-008: Maintain consistent terminology with the rest of the documentation
- UPD-009: When creating or editing Markdown pipe tables in
README.mdordocs/, rungo run ./cmd/format_md_tables/and verify withgo run ./cmd/format_md_tables/ --checkso source tables keep consistent padding and alignment markers - UPD-010: Never hand-edit generator-owned content: the README stats block,
docs/development/testing/testing.md, the catalog tables indocs/reference/tools/README.md, the benchmark charts and tables underdocs/reference/benchmarks/anddocs/charts/,llms.txt,llms-full.txt,lhm.plugin.json, and the versions stamped intoserver.json. Run the generator instead (make update-allruns them all; ADR-0013)
For New APIs
- Add new entries to the appropriate reference document tables
- Add new sections following the existing document pattern and style
- Update the package documentation if the API belongs to an existing package
- Add cross-references from related documents
- Update the documentation index if new documents are created
For Modified APIs
- Update parameter tables with new/changed/removed parameters
- Update return type documentation if changed
- Update code examples to reflect the new signature
- Add migration notes if the change is breaking
- Update Mermaid diagrams if type relationships changed
For Removed APIs
- Mark the API as deprecated with a notice and removal version/date
- Suggest the replacement API if one exists
- Update cross-references that pointed to the removed API
- After one release cycle, fully remove the deprecated section
For Configuration Changes
- Update the environment variables table
- Update default values and descriptions
- Add migration instructions if existing users need to change their config
- Update deployment documentation if the change affects deployment
Parity Verification
After all updates are applied, perform a parity check:
For Each Updated Document
- Read the updated documentation
- Compare every documented API, parameter, and type against source code
- Verify all code examples are syntactically valid
- Confirm Mermaid diagrams reflect current architecture
- Check all cross-reference links resolve correctly
Verification Checklist
- All changed exported types/functions are documented correctly
- Parameter tables match current function signatures
- Return types and error handling match implementation
- Code examples compile and reflect current API
- Mermaid diagrams reflect current component relationships
- Cross-reference links are valid
- No TBD/TODO placeholders in updated sections
- Consistent terminology and style with surrounding content
- Deprecation notices added for removed APIs
- Markdown pipe tables in
README.mdanddocs/were verified withgo run ./cmd/format_md_tables/ --check
Output Format
After completing updates, provide a summary:
## Documentation Update Summary
### Documents Updated
| Document | Sections Changed | Change Type |
|----------|-----------------|-------------|
| `docs/reference/tools/branches.md` | Added `gitlab_branch_new_action` section | New API |
| `docs/concepts/architecture.md` | Updated component view | Modified API |
### Parity Status
- [x] All changes documented
- [x] Examples validated
- [x] Diagrams updated
- [x] Cross-references verified
### Notes
[Any observations, recommendations for follow-up, or areas needing manual review]Error Handling
- ERR-001: Source file not found — report the expected path and skip
- ERR-002: Documentation file not found — recommend running
generate-project-documentationskill first - ERR-003: Ambiguous change — document both interpretations and flag for manual review
- ERR-004: Breaking change detected — add prominent migration notice with before/after examples
- ERR-005: Diagram rendering failure — provide the Mermaid source and flag for manual validation
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

