From rune
Generates and maintains project documentation including README, API docs, architecture docs, and changelogs. Keeps docs in sync with code changes via codebase scans and git history.
npx claudepluginhub rune-kit/rune --plugin @rune/analyticsThis skill uses the workspace's default tool permissions.
Documentation lifecycle manager. Generates initial project documentation, keeps docs in sync with code changes, produces API references, and auto-generates changelogs. Solves the #1 documentation problem: docs that exist but are outdated.
Generates READMEs, API docs, changelogs, and architecture docs for code projects using TypeDoc, JSDoc, Sphinx, godoc. Guides documentation workflows for JS/TS, Python, Go.
Generates READMEs, API references, inline comments, architecture docs with diagrams, changelogs, and developer guides for codebases, APIs, libraries, and projects.
Generates READMEs, OpenAPI/Swagger API docs, user guides, developer guides, and changelogs for codebases. Use for creating or improving project documentation and onboarding materials.
Share bugs, ideas, or general feedback.
Documentation lifecycle manager. Generates initial project documentation, keeps docs in sync with code changes, produces API references, and auto-generates changelogs. Solves the #1 documentation problem: docs that exist but are outdated.
Docs MUST be generated from actual code, not invented. Every statement in generated docs must be traceable to a specific file, function, or configuration in the codebase. If code doesn't exist yet, docs describe the PLAN, not the implementation.scaffold Phase 7 for initial documentation generationcook post-Phase 7 to update docs after feature implementationlaunch pre-deploy to ensure docs are current/rune docs init — first-time documentation generation/rune docs update — sync docs with recent code changes/rune docs api — generate API documentation/rune docs changelog — auto-generate changelog from git historyscout (L2): scan codebase for documentation targets (routes, exports, components, configs)doc-processor (L3): generate PDF/DOCX exports if requestedgit (L3): read commit history for changelog generationscaffold (L1): Phase 7 — generate initial docs for new projectcook (L1): post-implementation — update docs for changed moduleslaunch (L1): pre-deploy — verify docs are currentmcp-builder (L2): generate MCP server documentation/rune docs direct invocation/rune docs initFirst-time documentation generation for a project.
/rune docs updateIncremental sync — update only docs affected by recent code changes.
/rune docs apiGenerate or update API documentation specifically.
/rune docs changelogAuto-generate changelog from git commit history.
Invoke rune:scout to extract:
Structure:
# [Project Name]
[One-line description]
## Quick Start
[3-5 commands to get running: install, configure, start]
## Features
[Bullet list extracted from code — routes, components, capabilities]
## Tech Stack
[Detected from package.json, requirements.txt, Cargo.toml, etc.]
## Project Structure
[Key directories with one-line descriptions]
## Configuration
[Environment variables from .env.example with descriptions]
## Development
[Dev server, test, lint, build commands]
## API Reference
[Link to API.md if applicable, or inline summary]
## License
[Detected from LICENSE file or package.json]
Structure:
# Architecture
## Overview
[System diagram in text/mermaid — components and data flow]
## Key Decisions
[Detected patterns: framework choice, state management, DB, auth approach]
## Module Map
[Each top-level directory: purpose, key files, dependencies]
## Data Flow
[Request lifecycle or data pipeline description]
Scan route files and extract:
Format as markdown table or OpenAPI-compatible reference.
Present generated docs to user with summary:
Read git diff since last docs update (tracked via git log on doc files or .rune/docs-sync.json).
Identify:
For each changed area:
Delegate to rune:git changelog to produce a changelog entry from commits since last docs update.
From gstack (garrytan/gstack, 50.9k★): "Cross-document consistency prevents the #2 docs problem: docs that exist but contradict each other."
After updating any doc, verify consistency across all project documentation:
| Check | Files | What to Compare |
|---|---|---|
| Version numbers | README, CLAUDE.md, package.json, CHANGELOG | Must all match current version |
| Feature lists | README, landing page, CLAUDE.md | Same features listed (may differ in detail level) |
| Stats | README, CLAUDE.md, landing page, dashboard | Skill count, test count, signal count must match |
| Commands | README, CLAUDE.md, docs/ | Same commands with same flags |
| Tech stack | README, ARCHITECTURE.md, CLAUDE.md | Consistent framework/library references |
Cross-Doc Consistency:
- [x] README.md ↔ CLAUDE.md: versions match, commands match
- [x] README.md ↔ docs/index.html: stats match, features match
- [ ] README.md says "62 skills" but CLAUDE.md says "59" → FIX CLAUDE.md
Fix inconsistencies immediately — don't just report them. Update the stale doc to match the source of truth (usually the code or the most recently updated doc).
Show user: what was updated, what was added, what was flagged for review. Include Cross-Doc Consistency results.
| Framework | Route Pattern | File Pattern |
|---|---|---|
| Express | router.get/post/put/delete | routes/*.ts, *.router.ts |
| FastAPI | @app.get/post/put/delete | routers/*.py, main.py |
| NestJS | @Get/@Post/@Put/@Delete | *.controller.ts |
| Next.js App | export async function GET/POST | app/**/route.ts |
| Next.js Pages | export default function handler | pages/api/**/*.ts |
| SvelteKit | export function GET/POST | src/routes/**/+server.ts |
| Hono | app.get/post/put/delete | src/*.ts |
For each detected route:
authMiddleware, @UseGuards)Format as markdown:
# API Reference
## Authentication
[Auth mechanism description]
## Endpoints
### `POST /api/auth/login`
**Description**: Authenticate user and return tokens
**Auth**: None
**Request Body**:
| Field | Type | Required | Description |
|-------|------|----------|-------------|
| email | string | yes | User email |
| password | string | yes | User password |
**Response** (200):
```json
{ "token": "string", "refreshToken": "string" }
Errors:
#### Step 4 — Output
Save to `docs/API.md` or project-specific location. If OpenAPI requested, generate `openapi.yaml`.
### Changelog Mode
#### Step 1 — Delegate to Git
Invoke `rune:git changelog` to group commits by type and format as Keep a Changelog.
#### Step 2 — Enhance
Add context to raw changelog:
- Link PR numbers to actual descriptions
- Group related changes under feature headers
- Highlight breaking changes prominently
#### Step 3 — Output
Append to or update `CHANGELOG.md`.
## Output Format
### Init Mode Output
Files generated in project root:
- `README.md` — Quick Start, Features, Tech Stack, Structure, Config, Dev Commands
- `ARCHITECTURE.md` — Overview diagram, Key Decisions, Module Map, Data Flow (if 10+ files)
- `docs/API.md` — Endpoint reference with method, path, params, response, auth (if routes detected)
### Update Mode Output
Modified doc sections with change summary:
Docs Update Report:
### API Mode Output
`docs/API.md` — markdown reference per endpoint:
METHOD /path/:paramDescription: [from JSDoc/docstring] Auth: [required/none] Request: [params, query, body table] Response: [shape with status codes] Errors: [error codes and descriptions]
### Changelog Mode Output
`CHANGELOG.md` — Keep a Changelog format grouped by: Added, Fixed, Changed, Removed.
## Constraints
1. MUST generate docs from actual code — never invent features or APIs that don't exist
2. MUST preserve existing docs — update sections, don't overwrite entire files
3. MUST detect doc staleness — flag sections that reference deleted/changed code
4. MUST include Quick Start in every README — users need to get running in < 2 minutes
5. MUST NOT generate docs for code that doesn't exist yet (unless explicitly creating spec docs)
6. API docs MUST match actual route signatures — wrong API docs are worse than no docs
## Returns
| Artifact | Format | Location |
|----------|--------|----------|
| README.md | Markdown | project root |
| ARCHITECTURE.md | Markdown | project root (if 10+ files) |
| API reference | Markdown | `docs/API.md` |
| Changelog entry | Markdown (Keep a Changelog) | `CHANGELOG.md` |
| Docs update report | Markdown | inline (chat output) |
**Scope guardrail:** Documents only what exists in the codebase — never invents features, endpoints, or APIs.
## Sharp Edges
| Failure Mode | Severity | Mitigation |
|---|---|---|
| Inventing API endpoints that don't exist | CRITICAL | Constraint 1: scan actual route files, not guess |
| Overwriting user-written README sections | HIGH | Constraint 2: merge, don't overwrite — detect custom sections |
| Stale docs after code changes | HIGH | Update mode detects diffs and updates affected sections |
| API docs with wrong request/response shapes | HIGH | Extract from Zod/Pydantic/TypeScript types, not from memory |
| Missing Quick Start section | MEDIUM | Constraint 4: every README has Quick Start |
| Changelog with orphan PR links | LOW | Validate PR numbers exist before linking |
| Cross-document inconsistency (README says X, CLAUDE.md says Y) | HIGH | Step 7: Cross-Doc Consistency Pass — verify stats, versions, and feature lists match across all docs |
| Updating one doc but not others (stats drift) | HIGH | After any doc update, sweep all related docs for stale stats — especially README ↔ CLAUDE.md ↔ landing page |
## Done When
### Init Mode
- Codebase scanned with scout
- README.md generated with Quick Start, Features, Tech Stack, Structure
- ARCHITECTURE.md generated (if 10+ files)
- API.md generated (if routes detected)
- Coverage report presented to user
### Update Mode
- Changes since last doc update detected
- Affected doc sections updated
- Changelog entry generated
- Update report presented to user
### API Mode
- API framework detected
- All endpoints extracted with method, path, request, response
- API reference generated in markdown
- Saved to docs/API.md
### Changelog Mode
- Commits grouped by type
- Formatted as Keep a Changelog
- CHANGELOG.md updated
## Cost Profile
~2000-5000 tokens input, ~1000-3000 tokens output. Sonnet — documentation requires understanding code patterns but not deep architectural reasoning.