doc-updater
Documentation & Codemap Specialist
Maintain accurate, up-to-date documentation that reflects actual code state. Generate architectural codemaps and refresh documentation from source.
Related Skills:
kavak-documentation- Query for Kavak documentation standards, README templates, architecture docs format- Use
kavak-platform/platform_docs_searchMCP tool for Kavak-specific documentation patterns
Quick Start
Detect project type and use appropriate tools:
# TypeScript/Node.js
npx madge --image graph.svg src/
# Go
go mod graph | dot -Tsvg -o graph.svg
# Python
pydeps src/ --output graph.svg
Core Workflow
1. Analyze Repository Structure
a) Detect language/runtime (go.mod, package.json, pyproject.toml)
b) Identify workspaces/packages
c) Map directory structure
d) Find entry points:
- Go: cmd/*, main.go
- Node: apps/*, packages/*, src/index.*
- Python: src/*/__main__.py, main.py
e) Detect framework patterns
2. Generate Codemaps
Create docs/CODEMAPS/ with one file per major architectural area. The specific files depend on the project — adapt to what exists:
docs/CODEMAPS/
├── INDEX.md # Overview and navigation (always)
├── <area>.md # One per major area (examples below)
Common areas: frontend, backend/api, database/models, integrations/external, workers/jobs, cli, shared/utils. Only create codemaps for areas that actually exist in the project.
3. Update Documentation
Files to refresh:
README.md- Setup instructions, architecture overviewdocs/GUIDES/*.md- Feature guides and tutorialsCONTRIBUTING.md- Development workflow
4. Validate
- Verify all file paths exist
- Check links work
- Ensure examples run
- Update timestamps
Codemap Format
Each codemap follows this structure:
# [Area] Codemap
**Last Updated:** YYYY-MM-DD
**Entry Points:** list of main files
## Architecture
[ASCII diagram]
## Key Modules
| Module | Purpose | Exports | Dependencies |
| ------ | ------- | ------- | ------------ |
## Data Flow
[Description]
## External Dependencies
- package - Purpose, Version
See references/codemap-format.md for complete specification.
When to Update
ALWAYS update when:
- New major feature added
- API routes changed
- Dependencies added/removed
- Architecture significantly changed
OPTIONAL when:
- Minor bug fixes
- Cosmetic changes
- Internal refactoring
References
Detailed documentation for specific tasks:
| Reference | Purpose |
|---|---|
references/codemap-format.md |
Complete codemap specification |
references/codemap-examples.md |
Frontend, backend, integrations examples |
references/scripts.md |
Generation scripts (ts-morph, madge) |
references/scripts-go.md |
Go-specific tools and scripts |
references/maintenance.md |
Schedule and quality checklist |
references/readme-template.md |
README update template |
Quality Checklist
Before committing:
- Codemaps generated from actual code
- All file paths verified
- Code examples compile/run
- Timestamps updated
- No obsolete references
Best Practices
- Single Source of Truth - Generate from code, don't manually write
- Freshness Timestamps - Always include last updated date
- Token Efficiency - Keep codemaps under 500 lines each
- Actionable - Include commands that actually work
Principle: Documentation that doesn't match reality is worse than no documentation. Generate from source of truth (the actual code).
More from carvalab/k-skills
code-simplifier
Use this skill after writing or modifying code to simplify it — reduces complexity, eliminates redundancy, and improves naming while preserving exact behavior. Trigger after implementing a feature, after a refactor, or when asked to "clean up this code", "simplify this", "make this more readable", or "reduce complexity". Also use when code feels too nested, verbose, or hard to follow. For removing dead code and unused dependencies with detection tools (knip, ts-prune, deadcode), use refactor-cleaner instead.
24backend-development
Use this skill for ANY task in a Node.js/TypeScript or Go backend codebase — adding features, fixing bugs, refactoring, adding flows, modifying handlers, changing business logic, or writing new code. Trigger even when the task is vague like "add the flow to this", "implement this feature", "fix this", or "add X like Y" — if the project has go.mod, nest-cli.json, express routes, or server-side TypeScript, this skill applies. Covers REST APIs, PostgreSQL, Redis, authentication, job queues, events, microservices, Docker, CI/CD, Clean Architecture, SOLID, DRY, and code reuse patterns. When in doubt whether this is backend work, use this skill.
24kavak-documentation
Use this skill FIRST before implementing anything in a Kavak project — it provides internal platform documentation for architecture, kbroker events, STS auth, SDKs, databases, GitLab CI/CD, Docker configs, and workload creation. Trigger when planning features, designing services, configuring pipelines, writing Dockerfiles, or whenever you need Kavak-specific patterns instead of generic solutions. Query platform_docs_search before writing code.
13torque-refine
Use this skill for planning and requirements work — exploring ideas, improving prompts, creating PRDs, breaking features into tasks, or iterating on existing plans. Trigger on "plan this feature", "break this down into tasks", "create a PRD", "improve this prompt", "what should the subtasks be", "refine the requirements", or when a Jira ticket needs task breakdown with subtasks. Routes to 6 modes (Start, Improve, Summarize, PRD, Plan, Refine) based on intent.
5