From taches-principled
Update project documentation for code changes using multi-agent workflow with specialized tech-writer agents. Covers READMEs, guides, API docs, and JSDoc.
How this skill is triggered — by the user, by Claude, or both
Slash command
/taches-principled:update-docs Optional: documentation type or area (api, guides, readme, jsdoc)Optional: documentation type or area (api, guides, readme, jsdoc)The summary Claude sees in its skill listing — used to decide when to auto-load this skill
IF code changes affect user-facing APIs or workflows → Update documentation for those changes
IF code changes affect user-facing APIs or workflows → Update documentation for those changes IF 1-2 files with simple changes → Write documentation directly (no agents needed) IF 3+ files or significant changes → Use multi-agent workflow with analysis + tech-writer + review agents IF change introduces a new module or feature → Ensure index documents are updated (README, docs/index) IF no uncommitted changes exist → Cover the latest commit
Ensure all code changes are properly documented with clear, maintainable documentation that helps users accomplish real tasks. Preserve existing documentation style — follow established patterns.
Not every code change needs documentation. Focus on user-facing impact.
find . -name "*.md" | grep -E "(README|CHANGELOG|CONTRIBUTING|docs/)"
find . -name "openapi.*" -o -name "*.graphql" -o -name "swagger.*"
git status -u (or git show --name-status for latest commit). Filter changes that impact documentation:
Index documents to check:
| Document | Update When |
|---|---|
| Root README.md | Features, modules, or overview changes |
| Module README.md | Module exports or purpose changes |
| docs/index.md | Docs structure changes |
| SUMMARY.md / _sidebar.md | Navigation structure changes |
| mkdocs.yml nav | Navigation changes |
Simple changes (1-2 files): Write documentation directly. Follow project conventions, include working examples, avoid duplication.
Multi-agent flow (3+ files or significant changes):
Launch doc-analysis agents (Haiku, parallel) — one per documentation area. Each produces a prioritized list of documentation tasks (CRITICAL: breaking changes / IMPORTANT: new features / NICE_TO_HAVE: clarifications).
Launch tech-writer agents (Sonnet or Opus, parallel) — one per documentation area. Provide them with: documentation requirements, target files, project conventions, and existing docs for style reference. Create/update documentation.
Launch quality review agents (Sonnet or Opus, parallel) — verify: all user-facing changes covered, code examples accurate, links valid, follows conventions, no bloat.
Iterate if needed — re-launch tech-writer agents only for areas with gaps.
Final verification — cross-references work, no conflicting information, documentation is navigable.
Documentation must justify its existence. For every document ask: does it help users accomplish real tasks? Is it discoverable? Will it be maintained? Does it duplicate existing docs?
Before finishing:
Analyze documentation needs for changes in {DOCUMENTATION_AREA}.
Context: These files were modified:
{CHANGED_FILES_LIST}
Git diff summary:
{GIT_DIFF_SUMMARY}
Your task:
1. Review the changes and understand their documentation impact
2. Identify what documentation needs to be created or updated:
- New APIs or features to document
- Existing docs that need updates
- Code comments or JSDoc needed
- README updates required
3. Identify index documents requiring updates:
- Module README.md files affected by changes
- Root README.md if features or modules changed
- docs/ index files (index.md, SUMMARY.md, guides.md, getting-started.md)
- Navigation files (_sidebar.md, mkdocs.yml nav section)
4. Check existing documentation to avoid duplication
5. Create prioritized list of documentation tasks:
- CRITICAL: Breaking changes, new public APIs
- IMPORTANT: New features, configuration changes, index updates
- NICE_TO_HAVE: Code comments, minor clarifications
Output: List of documentation tasks with priorities, file locations, and index documents to update.
Create/update documentation for {DOCUMENTATION_AREA}.
Documentation requirements identified:
{DOCUMENTATION_TASKS_LIST}
Your task:
1. Read the changed files and understand the impact
2. Read @README.md for project context and conventions
3. Review existing documentation for style and patterns
4. Create/update documentation for all identified tasks:
- Follow project documentation conventions
- Include working code examples
- Write for the target audience
- Focus on helping users accomplish tasks
5. Ensure documentation:
- Is clear and concise
- Avoids duplication with existing docs
- Has valid links and references
- Includes necessary context and examples
Target files: {TARGET_DOCUMENTATION_FILES}
Review documentation quality for {DOCUMENTATION_AREA}.
Context: Documentation was created/updated for local code changes.
Files to review:
{DOCUMENTATION_FILES}
Your task:
1. Read the documentation created/updated
2. Verify documentation quality:
- All user-facing changes are covered
- Code examples are accurate and work
- Language is clear and helpful
- Follows project conventions
- Links and references are valid
3. Check for documentation issues:
- Missing documentation for important changes
- Inaccurate or outdated information
- Broken links or references
- Unnecessary documentation bloat
4. Verify no conflicts with existing documentation
Output: PASS confirmation or list of issues to fix.
Project Root README:
# Project Name
Brief description (1-2 sentences max).
## Quick Start
[Fastest path to success - must work in <5 minutes]
## Documentation
- [API Reference](./docs/api/) - if complex APIs
- [Guides](./docs/guides/) - if complex workflows
- [Contributing](./CONTRIBUTING.md) - if accepting contributions
## Status
[Current state, known limitations]
Module README Pattern:
# Module Name
**Purpose**: One sentence describing why this module exists.
**Key exports**: Primary functions/classes users need.
**Usage**: One minimal example.
See: [Main documentation](../docs/) for detailed guides.
Document These:
/**
* Processes payment with retry logic and fraud detection.
*
* @param payment - Payment details including amount and method
* @param options - Configuration for retries and validation
* @returns Promise resolving to transaction result with ID
* @throws PaymentError when payment fails after retries
*
* @example
* ```typescript
* const result = await processPayment({
* amount: 100,
* currency: 'USD',
* method: 'card'
* });
* ```
*/
async function processPayment(payment: PaymentRequest, options?: PaymentOptions): Promise<PaymentResult>
Don't Document These:
// Obvious functionality
getName(): string
// Simple CRUD
save(user: User): Promise<void>
// Self-explanatory utilities
toLowerCase(str: string): string
Use Automated Generation For:
Write Manual Documentation For:
When documentation changes affect a module or feature:
| Document | Update When |
|---|---|
README.md (root) | New features, modules, or overview changes |
README.md (module) | Module exports, purpose, or usage changes |
docs/index.md | New documentation pages or structure changes |
getting-started.md | Setup steps or quickstart changes |
guides.md | New guides or guide categories |
reference.md | New API references or structure |
SUMMARY.md | Documentation structure changes (GitBook) |
_sidebar.md | Navigation structure changes (Docsify) |
mkdocs.yml nav | Documentation navigation changes (MkDocs) |
Example: Adding a New Feature
Files to update:
├── src/reporting/README.md → Add to key exports
├── docs/guides/index.md → Link to new guide
├── docs/guides/exporting.md → Create new guide
├── docs/reference/index.md → Link to API reference
├── README.md → Mention in features list
└── SUMMARY.md → Add navigation entries
Report of documentation updates completed:
## Documentation Updates
### Files Updated
- [ ] Root README.md
- [ ] Module README files
- [ ] docs/ content files
- [ ] JSDoc comments
### Index Documents Updated
- [ ] Root README.md
- [ ] docs/index.md / SUMMARY.md
- [ ] Module README files
### Changes Documented
- [List of changes covered]
### Quality Review
- [ ] All criteria passed
Analysis, writing, and review require different expertise and perspective. Parallel agents with distinct focuses produce more complete documentation coverage.
Index documents (READMEs, docs/index, navigation) are the most commonly missed update — they connect users to content. Explicitly checking them prevents orphaned documentation.
For 1-2 file changes, the overhead of spawning agents exceeds the value. Direct writing is faster and equally effective.
Not all docs are equal. The CRITICAL/IMPORTANT/NICE_TO_HAVE triage ensures effort goes where it matters most — breaking changes and new APIs before polish.
npx claudepluginhub git-fg/taches-principled --plugin tp-session-auditProvides CDSS development patterns for drug interaction checking, dose validation, clinical scoring (NEWS2, qSOFA), and alert classification integrated into EMR workflows.