Documentation Creation Rules and Standards
File: docs/rules-howtodoc.md
Purpose: Define mandatory rules and patterns for creating documentation in the Urbalurba Infrastructure
Target Audience: Developers, technical writers, and LLMs creating documentation
Last Updated: September 23, 2025
π Overviewβ
This document establishes mandatory rules for creating and maintaining documentation in the docs/ folder. These rules ensure consistency, discoverability, and maintainability across all documentation types in the Urbalurba infrastructure.
ποΈ Core Documentation Architectureβ
Rule 1: Three-Tier Naming Conventionβ
ALL documentation files MUST follow the hierarchical naming pattern:
<larger-grouping>-<focus-grouping>-<service>.md
Mandatory Naming Patterns:β
- Service Documentation:
package-databases-postgresql.md - Index Files:
package-databases-readme.md - Technical Guides:
rules-ingress-traefik.md - Overview Documents:
overview-system-architecture.md
β Approved Larger Groupings:β
package- Service and application deploymentsoverview- High-level guides and architectural overviewsrules- Standards, patterns, and mandatory procedureshosts- Host system configuration and setupnetworking- Network configuration and connectivityprovision- Infrastructure provisioning and managementtroubleshooting- Problem diagnosis and resolutionsecrets- Security and secrets management
β Approved Package Focus Groupings:β
ai- Artificial Intelligence and ML servicesauth- Authentication and authorization systemscore- Essential infrastructure servicesdatabases- Data storage and managementdatascience- Analytics and data processingdevelopment- Developer tools and workflowsmanagement- Administrative and monitoring toolsqueues- Message brokers and queuing systemssearch- Search and indexing services
Rule 2: Index File Patternβ
Every focus grouping MUST have an index file:
<larger-grouping>-<focus-grouping>-readme.md
Purpose: Serve as the entry point and navigation hub for all related service documentation.
Required Index File Content:β
- Overview of the focus grouping purpose
- Service listing with status indicators
- Quick start instructions
- Architecture summary
- Cross-references to related documentation
π Document Structure Rulesβ
Rule 3: Standard Header Formatβ
ALL documentation files MUST start with this header:
# [Service Name] - [Brief Description]
**Key Features**: Feature1 β’ Feature2 β’ Feature3 β’ Feature4 β’ Feature5 β’ Feature6
**File**: `docs/[filename].md`
**Purpose**: [Single sentence describing document purpose]
**Target Audience**: [Specific user groups]
**Last Updated**: [Date in format: September 23, 2025]
Header Requirements:β
- Title: Clear service name with descriptive subtitle
- Key Features: 3-7 bullet points using β’ separator
- File Path: Exact relative path from repository root
- Purpose: One sentence maximum, specific and actionable
- Target Audience: Comma-separated list of user personas
- Last Updated: Date in full month format
Rule 4: Service Documentation Templateβ
Service documentation (package-*-[service].md) MUST follow this structure:
# [Service Name] - [Brief Description]
**Key Features**: [List using β’ separator]
**File**: `docs/package-[category]-[service].md`
**Purpose**: Complete guide to [service] deployment and configuration in Urbalurba infrastructure
**Target Audience**: [Specific personas]
**Last Updated**: [Date]
## π Overview
[2-3 paragraphs describing service role and capabilities]
**Key Features**:
- **Feature 1**: Description
- **Feature 2**: Description
- **Architecture Type**: Description
## ποΈ Architecture
### **Deployment Components**
[ASCII diagram of service stack]
### **File Structure**
[Directory structure showing related files]
## π Deployment
### **Manual Deployment**
### **Prerequisites**
## βοΈ Configuration
### **[Service] Configuration**
### **Resource Configuration**
### **Security Configuration**
## π Monitoring & Verification
### **Health Checks**
### **Service Verification**
### **[Service] Access Testing**
### **Automated Verification**
## π οΈ Management Operations
### **[Service] Administration**
### **Service Removal**
## π§ Troubleshooting
### **Common Issues**
## π Maintenance
### **Regular Tasks**
### **Backup Procedures**
### **Disaster Recovery**
## π Use Cases
[3-4 practical examples with code]
Rule 5: Index Documentation Templateβ
Index files (*-readme.md) MUST follow this structure:
# [Category Name] - [Description]
**File**: `docs/[category]-readme.md`
**Purpose**: Overview of all [category] services in Urbalurba infrastructure
**Target Audience**: [User groups]
**Last Updated**: [Date]
## π Overview
[Category description and purpose]
**Available [Category] Services**:
- **Service 1**: Brief description
- **Service 2**: Brief description
## [Icon] [Category] Services
### **Service Name - Primary Service** π₯
**Status**: Active | **Port**: [port] | **Type**: [type]
[Service description paragraph]
**Key Features**:
- **Feature 1**: Description
- **Feature 2**: Description
**Documentation**: [package-category-service.md](./package-category-service.md)
## π Quick Start
[Category-wide deployment instructions]
## π Related Documentation
[Cross-references to related docs]
π― Content Quality Rulesβ
Rule 6: Mandatory Metadata Fieldsβ
Every document MUST include:
Required Fields:β
**File**: Exact path from repository root**Purpose**: Single sentence description**Target Audience**: Specific user personas**Last Updated**: Date in full format
Service Documents Must Add:β
**Key Features**: 3-7 items with β’ separator- Architecture diagrams (ASCII or Mermaid)
- File structure listings
- Practical use case examples
Index Documents Must Add:β
- Service status indicators (Active/Inactive/Development)
- Quick start section
- Cross-reference links
Rule 7: Status Indicatorsβ
Use these standardized status indicators:
**Status**: β
Active | π Development | βΈοΈ Inactive | π« Deprecated
Rule 8: Cross-Reference Standardsβ
Link Format:β
[Document Title](./filename.md)
**Documentation**: [package-category-service.md](./package-category-service.md)
Required Cross-References:β
- Index files MUST link to all service documentation
- Service files MUST link back to index file
- Related services MUST be cross-referenced
- Prerequisites MUST link to setup documentation
π§ Technical Writing Standardsβ
Rule 9: Code and Configuration Examplesβ
Required Elements:β
- Command examples: Include description comments
- Configuration snippets: Show context and purpose
- File paths: Always use absolute paths from repository root
- Variable placeholders: Use
[variable-name]format
Code Block Standards:β
# Description of what this does
```bash
command --option value
# Configuration section purpose
key: value
Rule 10: Emoji and Visual Indicatorsβ
Use standardized emoji patterns:
## π Overview # Overview sections
## π Deployment # Getting started/deployment
## ποΈ Architecture # System design/structure
## βοΈ Configuration # Setup and config
## π Monitoring # Verification/monitoring
## π οΈ Management # Operations/admin
## π§ Troubleshooting # Problem solving
## π Maintenance # Ongoing tasks
## π Related # Cross-references
Status Indicators:β
β
Success/Active/Complete
π In Progress/Development
β οΈ Warning/Attention Required
β Error/Failed/Deprecated
π― Target/Goal/Objective
π‘ Tip/Insight/Key Point
π File Organization Rulesβ
Rule 11: Directory Structureβ
Files MUST be placed directly in /doc/ folder:
doc/
βββ README.md # Master index
βββ overview-*.md # High-level guides
βββ package-category-readme.md # Category indexes
βββ package-category-service.md # Service documentation
βββ rules-*.md # Standards and patterns
βββ hosts-*.md # Host configuration
βββ networking-*.md # Network setup
βββ provision-*.md # Infrastructure management
βββ troubleshooting-*.md # Problem resolution
Forbidden:β
- Subdirectories: All
.mdfiles must be in root/doc/ - Spaces in names: Use hyphens instead
- Version numbers: Use "Last Updated" metadata instead
- Duplicate names: Each filename must be unique
Rule 12: New Category Creationβ
Before creating a new larger grouping:
Required Justification:β
- Scope: Does it warrant 3+ service documents?
- Distinction: Is it clearly different from existing categories?
- Longevity: Will it remain relevant long-term?
- User Value: Does it improve navigation and discoverability?
Creation Process:β
- Document proposal with justification
- Create index file first:
[grouping]-readme.md - Add to main README.md navigation
- Create minimum 2 service documents
π Quality Assurance Rulesβ
Rule 13: Review Requirementsβ
Before publishing documentation:
Self-Review Checklist:β
- Header format matches Rule 3 exactly
- Structure follows appropriate template (Rule 4 or 5)
- All required metadata fields present
- Code examples tested and working
- Cross-references valid and functional
- Grammar and spelling checked
- Last Updated date is current
Content Validation:β
- Commands execute successfully
- File paths exist and are correct
- Configuration examples are valid
- Screenshots/diagrams are current
- Use cases demonstrate real value
Rule 14: Maintenance Standardsβ
Update Requirements:β
- Content changes: Update "Last Updated" date
- Significant revisions: Update purpose or target audience if needed
- Broken links: Fix within 24 hours of discovery
- Deprecated features: Mark clearly with status indicators
Regular Reviews:β
- Monthly: Check for broken internal links
- Quarterly: Validate code examples and commands
- Semi-annually: Review structure and cross-references
- Annually: Comprehensive content audit
π¨ Anti-Patterns and Violationsβ
Rule 15: Forbidden Practicesβ
Never Do This:β
β # How to setup postgres # Unclear, no context
β **File**: postgres.md # Wrong path format
β **Purpose**: This document... # Verbose, not specific
β **Target Audience**: Everyone # Too broad
β **Last Updated**: 2024 # Incomplete date format
β See documentation for setup # Vague cross-reference
β Run this command: sudo rm -rf / # Dangerous without context
Always Do This:β
β
# PostgreSQL - Primary Database Service
β
**File**: `docs/package-databases-postgresql.md`
β
**Purpose**: Complete guide to PostgreSQL deployment and configuration in Urbalurba infrastructure
β
**Target Audience**: Database administrators, developers, architects
β
**Last Updated**: September 23, 2025
β
**Documentation**: [PostgreSQL Setup Guide](./package-databases-postgresql.md)
β
# Deploy PostgreSQL with authentication
kubectl apply -f manifests/050-postgresql-config.yaml
π Success Metricsβ
Rule 16: Quality Indicatorsβ
Documentation quality is measured by:
Structure Compliance:β
- β 100% header format compliance
- β Template structure adherence
- β Required section completeness
- β Cross-reference accuracy
User Value Metrics:β
- β Clear, actionable instructions
- β Working code examples
- β Comprehensive troubleshooting
- β Practical use case demonstrations
Maintenance Health:β
- β Current "Last Updated" dates
- β No broken links
- β Accurate file references
- β Valid command examples
π‘ Key Insight: Consistent documentation structure and naming conventions are essential for maintainability and user experience. These rules ensure that all documentation in the Urbalurba infrastructure follows predictable patterns, making it easier for users to find information and for contributors to create high-quality documentation that serves its intended audience effectively.