Documentation Workflows Hub
Overview
This hub provides a central guide to all documentation automation systems, workflows, and tools in the Aitana Labs frontend project. It connects the technical implementation details with practical developer workflows and quality assurance processes.
System Architecture
The documentation system consists of three interconnected components:
1. Technical Implementation
- Stub File Detection - Python script that intelligently detects documentation placeholders
- GitHub Actions Workflows - Automated workflows that trigger documentation analysis
- Quality Analysis Scripts - Shell scripts that analyze documentation gaps and quality
2. GitHub Integration
- GitHub Documentation Workflow - Automated issue creation and management
- Pull Request Analysis - Automatic documentation impact assessment
- Issue Lifecycle Management - Automated creation, assignment, and resolution
3. Quality Management
- Auto Documentation Workflows - Continuous quality monitoring
- Evolution Tracking - Documentation freshness and improvement suggestions
- Metrics and Reporting - Quality scores and coverage analysis
Quick Start Workflows
For Developers
1. Adding Documentation for New Features
# 1. Create a stub file in the appropriate location
mkdir -p docs/features
cat > docs/features/NEW_FEATURE_STUB.md << 'EOF'
# New Feature Documentation
STUB: This feature needs comprehensive documentation
## Overview
TODO: Add detailed feature description
## Usage Examples
PLACEHOLDER: Include practical code examples
## Integration Guide
IMPORTANT: Document how this integrates with existing systems
EOF
# 2. The automation system will:
# - Detect the stub file within 24 hours (daily run)
# - Create a GitHub issue assigned to @claude
# - Provide detailed completion requirements
# - Track progress until completion
2. Updating Documentation After Code Changes
# 1. Make your code changes
git add src/components/NewComponent.tsx
# 2. Check if documentation exists
find docs/ -name "*.md" -exec grep -l "NewComponent" {} \;
# 3. If found, update the documentation
# If not found, create a stub or add to existing docs
# 4. Push changes - the system will:
# - Analyze impact of your changes
# - Suggest documentation updates if needed
# - Create issues for critical documentation gaps
3. Responding to Documentation Issues
When you receive a documentation issue from the automation system:
- Review the issue requirements and analysis
- Check linked code files for context
- Complete the documentation following the provided checklist
- The system will automatically close the issue when resolved
For Documentation Maintainers
1. Monitoring Documentation Quality
# Check daily quality reports (generated at 2 AM UTC)
# Reports include:
# - Documentation coverage metrics
# - Quality scores and trends
# - Priority recommendations
# - Stub file analysis
2. Managing Documentation Workflows
# Manual workflow triggers for testing:
gh workflow run documentation-check.yml --ref dev
gh workflow run documentation-evolution.yml --ref dev
# Check workflow status
gh run list --workflow=documentation-check.yml
Complete Developer Workflows
Workflow 1: Feature Documentation Lifecycle
graph TD
A[New Feature Development] --> B[Create Stub File]
B --> C[Automation Detects Stub]
C --> D[GitHub Issue Created]
D --> E[@claude Assigned]
E --> F[Documentation Completed]
F --> G[Issue Auto-Closed]
G --> H[Quality Monitoring]
Steps:
- Development Phase: Create stub file with
STUB:markers - Detection Phase: Automation detects stub within 24 hours
- Assignment Phase: Issue created and assigned to @claude
- Completion Phase: Documentation written following requirements
- Resolution Phase: Issue automatically closed when complete
- Monitoring Phase: Ongoing quality monitoring and updates
Workflow 2: Documentation Impact Assessment
graph TD
A[Code Changes] --> B[PR Created]
B --> C[Automation Analyzes Changes]
C --> D{Documentation Impact?}
D -->|High Impact| E[Issue Created]
D -->|Medium Impact| F[PR Comment Added]
D -->|Low Impact| G[No Action]
E --> H[Documentation Updated]
F --> H
H --> I[PR Approved]
Steps:
- Code Changes: Developer modifies code
- PR Analysis: Automation analyzes changed files
- Impact Assessment: Determines documentation requirements
- Notification: Creates issues or PR comments based on impact
- Resolution: Documentation updated as needed
- Completion: PR approved with documentation requirements met
Workflow 3: Quality Assurance Process
graph TD
A[Daily Quality Check] --> B[Analyze Documentation]
B --> C[Calculate Quality Score]
C --> D{Score < 70?}
D -->|Yes| E[Create High Priority Issue]
D -->|No| F[Continue Monitoring]
E --> G[Documentation Improved]
G --> H[Score Recalculated]
H --> I[Issue Closed]
Steps:
- Daily Analysis: Automated quality assessment
- Score Calculation: Quality metrics calculated
- Threshold Check: Issues created if score too low
- Improvement Process: Documentation enhanced
- Validation: Quality score recalculated
- Resolution: Issue closed when threshold met
Documentation Standards Integration
File Organization (from CLAUDE.md)
- Development docs →
docs/development/ - Feature docs →
docs/features/ - Testing docs →
docs/testing/ - Troubleshooting docs →
docs/troubleshooting/
Naming Conventions
- Use
CAPS_WITH_UNDERSCORES.mdfor new documentation - Stub files:
FEATURE_NAME_STUB.mdorTODO_FEATURE_NAME.md - Update
docs/README.mdwhen adding new documentation
Quality Markers
Use these markers in your documentation to help automation:
STUB:- Needs comprehensive documentationTODO:- Specific tasks to completePLACEHOLDER:- Content to be filled inCRITICAL:- Essential documentationIMPROVEMENT:- Section needs enhancementMISSING_EXAMPLE:- Needs code examples
Tool Integration
Frontend Components
- Tool Confirmation Usage - How to document frontend components
- Component Documentation Patterns - Standard patterns for React component docs
- Integration Testing Documentation - How components work with backend
Backend Integration
- API Documentation Standards - RESTful API documentation patterns
- Tool Configuration Documentation - How to document tool configurations
- Service Integration Patterns - Documentation for service integrations
Common Use Cases
1. Documenting a New React Component
// 1. Create the component with clear interfaces
export interface MyComponentProps {
config: ToolConfiguration;
onChange: (config: ToolConfiguration) => void;
}
// 2. Create documentation stub
// docs/features/MY_COMPONENT_USAGE.md
2. Documenting a New API Endpoint
# 1. Create the endpoint with docstrings
def new_endpoint(request: Request) -> Response:
"""
New API endpoint for feature X.
Args:
request: HTTP request object
Returns:
Response with processed data
"""
pass
# 2. Create API documentation
# docs/development/NEW_ENDPOINT_API.md
3. Documenting a Complex Workflow
# 1. Create workflow documentation
# docs/features/COMPLEX_WORKFLOW_GUIDE.md
# 2. Include cross-references to:
# - Related components
# - API endpoints
# - Configuration options
# - Testing procedures
Troubleshooting
Common Issues
Documentation Not Being Detected
- Check file naming conventions
- Ensure files are in correct
docs/subdirectories - Verify stub markers are outside code blocks
- Check workflow permissions and execution
Quality Issues Not Flagged
- Review quality threshold settings
- Check if files are excluded from analysis
- Verify automation workflows are running
- Ensure quality markers are properly formatted
Integration Problems
- Verify GitHub token permissions
- Check workflow file locations
- Ensure all scripts are executable
- Review automation logs for errors
Debug Commands
# Test stub detection locally
python3 scripts/detect_stub_files.py
# Check documentation gaps
./scripts/analyze-documentation-gaps.sh
# Verify workflow configuration
gh workflow view documentation-check.yml
Performance Metrics
Quality Indicators
- Documentation Coverage: Target >70% (excellent >90%)
- Quality Score: Target >75 (excellent >90)
- Stub Resolution Time: Target <7 days for critical, <14 days for moderate
- Issue Resolution Rate: Target >80% within 30 days
Monitoring Dashboard
Access real-time metrics through:
- GitHub Actions workflow summaries
- Daily quality reports
- Issue tracking and resolution rates
- Documentation coverage badges
Future Enhancements
Planned Improvements
- AI-Powered Content Generation: Automated draft generation from code analysis
- Visual Documentation: Support for diagrams and flowcharts
- Multi-Repository Support: Extend workflows to multiple repositories
- Advanced Metrics: Detailed analytics and trend analysis
- Integration Improvements: Better integration with development tools
Contributing to Documentation Automation
- Improve Detection Scripts: Enhance pattern recognition
- Add Quality Checks: Develop new quality assessment criteria
- Enhance Workflow Logic: Improve automation decision-making
- Documentation Templates: Create reusable documentation templates
Related Documentation
Core System Documentation
- Stub File Detection - Technical implementation details
- GitHub Documentation Workflow - Workflow system overview
- Auto Documentation Workflows - Quality management system
Development Guidelines
- Development Documentation Index - All development documentation
- Project Documentation Standards - Overall documentation organization
- CLAUDE.md - Complete project development guidelines
Feature-Specific Documentation
- Tool Confirmation Usage - Frontend component documentation
- Testing Documentation - Testing procedures and guidelines
- Troubleshooting Guides - Common issues and solutions
Support
For questions about documentation workflows:
- Check the troubleshooting section above
- Review related documentation links
- Check GitHub workflow logs for specific errors
- Create an issue with the
documentationlabel for assistance
This hub connects all documentation automation processes and provides clear workflows for both developers and maintainers. It serves as the central entry point for understanding and using the documentation system effectively.