Purpose
Help keep documentation in /docs and related rule files accurate, concise, and useful for:
- Engineers extending or refactoring the app.
- AI agents implementing new features or fixes.
Always treat documentation as docs-as-code: versioned, reviewed, and updated together with implementation changes.
When to use this skill
Use this skill whenever:
- The user asks you to create or update docs in
/docs, .cursor/rules, .cursor/skills or other markdown guides.
- Your code changes modify behavior, data models, APIs, or architecture.
- Existing docs clearly contradict the current code.
- Product behavior changed: consider updating the relevant REQ-* lines in
docs/prds/prd.md (see .cursor/rules/project-context.mdc — PRD and implementation); use the PRD-docs skill for structure and EARS style.
Sources of truth
/docs/ (technical, product, and architecture docs; built via MkDocs).
.cursor/rules/** and .cursor/skills/** (project rules and skills for APIs, frontend, backend, database, etc.).
Never invent architecture or behavior that is not supported by the codebase.
How to update documentation
Review impact
- Identify all files you edited and summarize what changed.
- Open the relevant doc(s) and see what they currently claim.
- Decide what must change so the docs describe the current full state, not just your diff.
Plan the doc changes
- List the key topics affected (e.g. API route behavior, data model fields, key workflows).
- Decide which doc sections map to which topics (or whether a new section is needed).
Write concise, structured content
- Prefer short paragraphs and bullet lists.
- Focus on the what, why, when, where, and how:
- What this module/route/component does.
- Why it exists and key design trade-offs.
- When it is called or used.
- Where it lives in the codebase.
- How data flows through it and how it interacts with other parts.
- Highlight exposed functions, hooks, types, interfaces, API routes, and data models.
Use diagrams where helpful
- Use Mermaid for:
- Flowcharts (control or request flow).
- Sequence diagrams (API/client interactions).
- Data diagrams (entities and relationships).
- Keep diagrams small and focused on a single concern.
Link code and docs
- Mention key files, modules, or directories by relative path.
- Describe how code interfaces with the rest of the application (dependencies, upstream/downstream callers).
- Prefer canonical examples (short code snippets, ≤3 lines) instead of large copies of code.
Style guidelines
- Be concise; avoid repetition and filler language.
- Use clear headings and lists; keep sections short and focused.
- Use present tense and neutral tone; avoid status judgments like “production ready”.
- Do not paste long code blocks; only include short examples when necessary.
- Keep terminology consistent with existing docs and code (naming, domain language).
What not to do
- Do not describe only “what changed”; rewrite sections so they describe the current behavior end-to-end.
- Do not contradict
.cursor/rules/**, .cursor/skills or the actual implementation.
- Do not weaken or ignore security/privacy aspects documented elsewhere.
Final checklist before saving
1---2name: documentation3description: Writing and updating project documentation for humans and AI agents4---56## Purpose78Help keep documentation in `/docs` and related rule files accurate, concise, and useful for:9- Engineers extending or refactoring the app.10- AI agents implementing new features or fixes.1112Always treat documentation as **docs-as-code**: versioned, reviewed, and updated together with implementation changes.1314## When to use this skill1516Use this skill whenever:17- The user asks you to create or update docs in `/docs`, `.cursor/rules`, `.cursor/skills` or other markdown guides.18- Your code changes modify behavior, data models, APIs, or architecture.19- Existing docs clearly contradict the current code.20- **Product behavior changed:** consider updating the relevant REQ-* lines in [`docs/prds/prd.md`](../../docs/prds/prd.md) (see `.cursor/rules/project-context.mdc` — **PRD and implementation**); use the PRD-docs skill for structure and EARS style.2122## Sources of truth2324- `/docs/` (technical, product, and architecture docs; built via MkDocs).25- `.cursor/rules/**` and `.cursor/skills/**` (project rules and skills for APIs, frontend, backend, database, etc.).2627Never invent architecture or behavior that is not supported by the codebase.2829## How to update documentation30311. **Review impact**32 - Identify all files you edited and summarize what changed.33 - Open the relevant doc(s) and see what they currently claim.34 - Decide what must change so the docs describe the **current full state**, not just your diff.35362. **Plan the doc changes**37 - List the key topics affected (e.g. API route behavior, data model fields, key workflows).38 - Decide which doc sections map to which topics (or whether a new section is needed).39403. **Write concise, structured content**41 - Prefer short paragraphs and bullet lists.42 - Focus on the **what, why, when, where, and how**:43 - What this module/route/component does.44 - Why it exists and key design trade-offs.45 - When it is called or used.46 - Where it lives in the codebase.47 - How data flows through it and how it interacts with other parts.48 - Highlight exposed **functions, hooks, types, interfaces, API routes, and data models**.49504. **Use diagrams where helpful**51 - Use Mermaid for:52 - Flowcharts (control or request flow).53 - Sequence diagrams (API/client interactions).54 - Data diagrams (entities and relationships).55 - Keep diagrams small and focused on a single concern.56575. **Link code and docs**58 - Mention key files, modules, or directories by relative path.59 - Describe how code interfaces with the rest of the application (dependencies, upstream/downstream callers).60 - Prefer **canonical examples** (short code snippets, ≤3 lines) instead of large copies of code.6162## Style guidelines6364- Be **concise**; avoid repetition and filler language.65- Use clear headings and lists; keep sections short and focused.66- Use present tense and neutral tone; avoid status judgments like “production ready”.67- Do **not** paste long code blocks; only include short examples when necessary.68- Keep terminology consistent with existing docs and code (naming, domain language).6970## What not to do7172- Do not describe only “what changed”; rewrite sections so they describe the **current behavior end-to-end**.73- Do not contradict `.cursor/rules/**`, `.cursor/skills` or the actual implementation.74- Do not weaken or ignore security/privacy aspects documented elsewhere.7576## Final checklist before saving7778- [ ] All described behavior matches the current code.79- [ ] New/changed APIs, data models, and flows are documented.80- [ ] Links, paths, and references are correct.81- [ ] No unnecessary long code blocks; examples are minimal and canonical.82- [ ] Language is concise and clear enough for another AI agent to follow.83