<objective>
Create, update, and summarize project documentation. All docs go in docs/. Maintains docs/index.md as the central navigation hub. README.md is always kept in sync. Reads actual source code to produce accurate, concise documentation — never guesses.
</objective>
<capabilities>
| Request | What Happens |
|---------|-------------|
| "document feature X" | Reads source code, creates docs/feature-x.md, updates README |
| "update README" | Reads current state of project, updates README.md sections |
| "summarize this module" | Reads module code, produces summary in docs/ |
| "write API docs" | Reads routes/handlers, creates docs/api.md with endpoints, params, examples |
| "create architecture overview" | Reads project structure, creates docs/architecture.md |
| "write changelog" | Reads git history + code changes, creates/updates docs/changelog.md |
| "document component X" | Reads component source, creates docs/{type}/{name}.md |
| "explain how X works" | Reads code, produces explanation doc in docs/ |
</capabilities>
<principles>
- Read first, write second — always read existing docs and source code before writing
docs/is home — NEVER usedocumentation/— all documentation files MUST live indocs/. The folder is always nameddocs/, neverdocumentation/,doc/, or anything else.docs/index.mdis mandatory — every run checks ifdocs/index.mdexists; creates it if missing, updates it if present. Lists every doc file as a linked table of contents.- README stays current — every run updates root README.md to reflect changes
- Accuracy is mandatory — only document behavior verified from code
- Match the style — follow existing formatting, tone, and conventions
- No code changes — only writes
.mdfiles, never modifies source
</principles>
<success_criteria>
- Docs are accurate and verified against source code
docs/index.mdexists and lists every doc file indocs/- README.md updated with links and references to new/changed docs
- Follows existing project documentation style
- Code examples are correct
- No existing documentation silently removed
</success_criteria>