Purpose: Rules and standards for organizing documentation in the CloudEmpiere REST API project
Last Updated: 2025-12-19
Rule: All documentation files MUST use lowercase-kebab-case.md
Examples:
- ✅
auth-api-reference.md - ✅
quickstart.md - ✅
metadata-specification.md - ❌
API_REFERENCE.md - ❌
QuickStart.md - ❌
metadataSpec.md
Use clear suffixes to indicate document type:
| Suffix | Purpose | Example |
|---|---|---|
-reference |
API endpoint reference | auth-api-reference.md |
-architecture |
Technical architecture docs | auth-architecture.md |
-specification |
Technical specifications | metadata-specification.md |
-overview |
High-level overviews | oauth2-plugin-overview.md |
-guide |
How-to guides | frontend-validation-guide.md |
-template |
Reusable templates | strategic-review-template.md |
README.md- Directory index (UPPERCASE by convention)CHANGELOG.md- Project changelog (UPPERCASE by convention)CLAUDE.md- AI assistant guidance (UPPERCASE by convention)
docs/
├── README.md # Main documentation index
├── quickstart.md # Quick start guide
├── {topic}-{type}.md # Core documentation files
│
├── guides/ # User guides and how-tos
│ ├── README.md
│ └── {topic}-guide.md
│
├── adr/ # Architecture Decision Records
│ ├── README.md
│ ├── 000-template.md
│ └── NNNN-{decision-title}.md
│
├── templates/ # Reusable templates
│ ├── README.md
│ └── {name}-template.md
│
└── reports/ # Historical reports
├── README.md
├── audits/
└── code-reviews/
Root docs/ - Core Documentation Only
- Essential technical documentation
- High-level architecture
- Main API references
- Quick start guides
docs/guides/ - User Guides
- Step-by-step instructions
- How-to guides
- Technical specifications for features
- Integration guides
- Maintenance documentation
docs/adr/ - Architecture Decisions
- Follow ADR template format
- Use sequential numbering (0001, 0002, etc.)
- Document significant architectural choices
docs/templates/ - Templates
- Reusable planning templates
- Use
-templatesuffix - Keep empty/example templates
docs/reports/ - Historical Reports
- Audit reports (in
audits/) - Code review findings (in
code-reviews/) - Use date prefix:
YYYY-MM-DD-{topic}.md
- Core Documentation - New major feature or API endpoint
- Guide - User-facing how-to or integration instructions
- ADR - Significant architectural decision
- Report - Audit or review findings
- Feature changes affect documented behavior
- New examples or use cases discovered
- Errors or unclear sections identified
- Cross-references need updating
- Deprecated features (move to
reports/) - Superseded decisions (mark in ADR, create new ADR)
- Historical audits (keep in
reports/)
- Duplicate content (merge into canonical location)
- Temporary analysis files (after incorporation)
- Obsolete content with no historical value
All documentation MUST include:
- Title (H1 header)
- Purpose/Overview (first paragraph)
- Table of Contents (if >3 sections)
- Last Updated date (at bottom)
Consider adding:
- Target Audience
- Prerequisites
- Related Documents (cross-references)
- Examples (code snippets, curl commands)
- Diagrams (architecture, flows)
- Be concise - Short sentences, clear language
- Use examples - Code snippets over abstract explanations
- Link related docs - Create cross-references
- Keep updated - Remove outdated content
- Use active voice - "Create a token" not "A token is created"
Always use relative paths from the linking document:
<!-- From docs/README.md -->
[Quickstart](quickstart.md)
[ADR-0001](adr/0001-odata-hierarchy-filter-functions.md)
[URL Token Auth](guides/url-token-authentication.md)
<!-- From docs/adr/0001-*.md -->
[Metadata Specification](../metadata-specification.md)
[OData Guide](../guides/odata-hierarchy-filters-guide.md)
<!-- From docs/guides/{file}.md -->
[Auth Architecture](../auth-architecture.md)
[ADR-0008](../adr/0008-card-authentication-extension-grant.md)- Update the file name
- Search for references:
grep -r "old-name.md" docs/ - Update all cross-references
- Test links locally
- Commit with descriptive message
- File uses
lowercase-kebab-case.mdnaming - File is in correct directory
- Cross-references use correct relative paths
- Document has title and purpose
- Last updated date is current
- No broken links (test locally)
- README index updated (if new file)
Quarterly:
- Review documentation structure
- Identify outdated content
- Check for broken links
- Update cross-references
When Adding Features:
- Update relevant documentation
- Create ADR if architectural change
- Update API reference
- Add examples to guides
# 1. Create file with proper naming
touch docs/guides/new-feature-guide.md
# 2. Use standard structure
cat > docs/guides/new-feature-guide.md <<'EOF'
# New Feature Guide
Brief description of what this guide covers.
## Table of Contents
## Overview
## Prerequisites
## Step-by-Step Instructions
## Examples
## Related Documentation
---
**Last Updated:** YYYY-MM-DD
EOF
# 3. Update guides/README.md
# 4. Update docs/README.md if needed# 1. Copy template
cp docs/adr/000-template.md docs/adr/00XX-decision-title.md
# 2. Fill in template sections
# 3. Update docs/adr/README.md index
# 4. Update docs/README.md ADR list# Move audit report to reports/audits/
mv REPORT.md docs/reports/audits/YYYY-MM-DD-topic.md
# Update docs/reports/README.mdConsider adding pre-commit hooks to check:
- File naming conventions
- Broken internal links
- Required document elements
- Cross-reference validity
When reviewing documentation PRs, check:
- Naming conventions followed
- Files in correct directories
- Cross-references updated
- README indexes updated
- No broken links
When finding non-compliant documentation:
- Analyze - Read file, determine purpose and category
- Categorize - Decide: core, guide, ADR, template, or report?
- Rename - Apply naming conventions with descriptive suffix
- Relocate - Move to correct directory
- Update References - Fix all cross-references
- Update Indexes - Update README files
- Verify - Test links, check structure
✅ docs/quickstart.md - Clear name, right location
✅ docs/auth-api-reference.md - Descriptive suffix
✅ docs/guides/url-token-authentication.md - Proper categorization
✅ docs/adr/0008-card-authentication-extension-grant.md - ADR format
❌ OAUTH2_IMPROVEMENTS.md - UPPERCASE, unclear location
❌ authentication.md - Needs suffix (auth-architecture.md)
❌ docs/CODE_REVIEW.md - Should be in reports/code-reviews/
This governance document should evolve with the project. When proposing changes:
- Create ADR for significant governance changes
- Update this document
- Notify team of changes
- Update tooling/automation if needed
Maintained by: CloudEmpiere Team Last Updated: 2025-12-19 Next Review: 2026-03-19 (Quarterly)