| applyTo | **/*.md |
|---|
This document provides mandatory guidelines for creating and maintaining project documentation across the repository. It applies to all Markdown files and specializes rules for ADRs, PRDs, and Design docs.
- Ensure all docs are clear, consistent, and easy to maintain.
- Provide a standard workflow for planning, drafting, reviewing, and publishing documentation.
- Define default structures, formatting rules, and approval gates.
- Structure: Organize documentation into clear sections with headings and subheadings.
- Clarity: Use simple, concise language. Avoid unexplained jargon.
- Consistency: Maintain a consistent style and format throughout the documentation.
- Examples: Include examples and use cases to illustrate concepts.
- Purpose and scope of the document
- Target audience (developers, end-users, stakeholders)
- Key features, behaviors, or decisions to cover
- Existing related documentation or references
<PROCESS_REQUIREMENTS type="MANDATORY">
- If any inputs are missing or ambiguous, ask targeted questions and pause drafting until clarified.
- Confirm inferred inputs with the requester before proceeding. </PROCESS_REQUIREMENTS>
- Initial Draft: Create the first version following the general guidelines.
- Peer Review: Request reviews from relevant stakeholders and address feedback.
- Approval: Obtain final approval from the document owner before publishing.
- Publishing: Place approved docs in the appropriate folder (e.g.,
docs/,docs/ADRs/,plans/). - Archiving: Establish a process for archiving outdated documents while ensuring they remain accessible for reference.
<CRITICAL_REQUIREMENT type="MANDATORY">
- Do not publish without owner approval.
- Save documents in their canonical locations with appropriate filenames.
- Update indices or README links when adding new documents. </CRITICAL_REQUIREMENT>
- Title
- Introduction
- Purpose and Scope
- Target Audience
- Key Features / Main Content
- Examples and Code Snippets
- Diagrams (if applicable)
- Maintenance and Update Instructions (if applicable)
- Conclusion
- References (if applicable)
- Use Markdown with clear headings and subheadings.
- Prefer bullet points and numbered lists for clarity.
- Use fenced code blocks for code examples; include language identifiers.
- Link to related internal docs and authoritative external resources.
- Embed images/diagrams using Markdown.
- Ensure proper grammar and spelling.
- Avoid emojis and informal language.
- Purpose: State the decision and the problem it addresses.
- Context: Provide background and constraints.
- Options Considered: List alternatives and why they were rejected or accepted.
- Decision: Clearly state the chosen approach and rationale.
- Consequences: Note implications, migration steps, and follow-ups.
- Location & Naming: Save under
docs/ADRs/using the repository ADR naming convention and template (docs/ADRs/adr-template.md).
- Overview: Summarize the product, purpose, and target audience.
- Goals & Objectives: Define measurable goals.
- Stakeholders: List stakeholders and roles.
- Success Criteria: Define how success will be measured.
- Location & Naming: Save under
docs/PRDs/using the repository PRD template (docs/PRDs/prd-template.md).
- Architecture: Provide diagrams and component descriptions.
- Data Models: Describe schemas and relationships.
- APIs: Document endpoints, contracts, and authentication.
- User Interface: Include wireframes, mockups, and accessibility notes.
- Security: Outline security considerations and mitigations.
- Location & Naming: Save under
docs/design/with a concise, descriptive filename.
- Default format: Markdown (
.md). - Default directory:
/docs/with a relevant filename when no specialized folder applies. - Use specialized directories and templates for ADRs (
docs/ADRs/), PRDs (docs/PRDs/), and Design docs (docs/design/).
- All new or updated docs must pass a self-review for accuracy, completeness, and clarity.
- Ensure links are valid and images/diagrams render correctly in GitHub.
- Update indexes or README tables of contents where applicable.
flowchart TD
A[Collect inputs] --> B[Outline structure]
B --> C[Draft in clear, concise language]
C --> D[Add examples and diagrams]
D --> E[Peer review]
E --> F{Owner approval?}
F -- No --> C
F -- Yes --> G[Publish to correct location]
G --> H[Link/update indexes]
H --> I[Plan maintenance cadence]