DITA Integration Strategy for LLM Platform
Overviewβ
This document outlines the comprehensive integration of Darwin Information Typing Architecture (DITA) across all LLM Platform projects. The goal is to create a unified, professional documentation ecosystem that scales from individual components to platform-wide documentation.
Implementation Phasesβ
Phase 1: Core Infrastructure (Immediate)β
-
Central DITA Repository
- Create shared DITA resources in
/LLM/dita-shared/
- Common keydefs, conrefs, and templates
- Shared CSS and branding elements
- Master build scripts
- Create shared DITA resources in
-
Project Templates
- Standard DITA structure for each project type
- TypeScript/Node.js project template
- Drupal module template
- Infrastructure component template
Phase 2: High-Priority Projects (Week 1)β
- llm (Core Drupal module)
- llmcli (Primary CLI tool)
- gov_compliance (Critical for government deployments)
- api_normalizer (Key integration component)
Phase 3: Supporting Projects (Week 2)β
- tddai (Development standards enforcer)
- llm-gateway (API infrastructure)
- llm-mcp (Protocol implementation)
- alternative_services (Service discovery)
Phase 4: Extended Ecosystem (Week 3+)β
- All AI agent modules
- AI provider modules
- Infrastructure components
- Deployment configurations
DITA Structure Per Projectβ
Standard Project DITA Layoutβ
project-root/
βββ dita/
β βββ project.ditamap # Project-specific map
β βββ topics/
β β βββ overview.dita # Project overview
β β βββ installation.dita # Installation guide
β β βββ configuration.dita # Configuration reference
β β βββ api-reference.dita # API documentation
β β βββ troubleshooting.dita # Common issues
β β βββ changelog.dita # Version history
β βββ shared/ # Symlink to central resources
β ββ β build.xml # Project-specific build config
βββ docs/ # Generated documentation
βββ scripts/
βββ build-docs.sh # Local build script
Content Types by Project Typeβ
TypeScript/Node.js Projectsβ
- Concepts: Architecture, design patterns, integration points
- Tasks: Installation, configuration, development workflows
- References: API documentation, CLI commands, configuration options
Drupal Modulesβ
- Concepts: Module purpose, entity types, plugin system
- Tasks: Installation, configuration, usage workflows
- References: Hooks, services, permissions, settings
Infrastructure Componentsβ
- Concepts: Architecture, security model, scaling strategies
- Tasks: Deployment, configuration, monitoring setup
- References: Helm values, environment variables, metrics
Automated Content Generationβ
Code-to-DITA Generatorsβ
-
TypeScript/JavaScript
- Extract JSDoc comments to DITA reference topics
- Generate API documentation from TypeScript interfaces
- Create CLI command reference from command definitions
-
PHP/Drupal
- Extract docblock comments to DITA topics
- Generate hook documentation from implementations
- Create service documentation from annotations
-
Infrastructure
- Generate Helm chart documentation from values.yaml
- Create environment variable reference from configs
- Document Docker image configurations
Integration with Existing Toolsβ
llmcli Integrationβ
# New DITA commands for llmcli
llmcli dita init [project] # Initialize DITA for a project
llmcli dita build [project] # Build DITA documentation
llmcli dita validate [project] # Validate DITA content
llmcli dita generate [type] # Generate DITA from code
tddai Integrationβ
- Add DITA documentation coverage to TDD score
- Enforce documentation standards
- Auto-generate missing documentation stubs
CI/CD Integrationβ
- Automated DITA validation in pipelines
- Documentation building on releases
- Publishing to central documentation site
Shared Resourcesβ
Key Definitions (keydefs.ditamap)β
<keydef keys="company-name"><topicmeta><keywords><keyword>Bluefly</keyword></keywords></topicmeta></keydef>
<keydef keys="platform-name"><topicmeta><keywords><keyword>LLM Platform</keyword></keywords></topicmeta></keydef>
<keydef keys="default-ai-provider"><topicmeta><keywords><keyword>Ollama</keyword></keywords></topicmeta></keydef>
Common Warnings/Notes (common-content.dita)β
<topic id="common-content">
<note id="security-warning" type="warning">This operation requires appropriate security clearance and audit logging.</note>
<note id="api-key-note" type="important">Never commit API keys or secrets to version control.</note>
</topic>
Conditional Processing Profilesβ
- audience: developer, admin, user, integrator
- platform: kubernetes, docker, local, cloud
- security-level: public, confidential, secret, top-secret
Master Documentation Portalβ
Aggregated Documentation Structureβ
/LLM/documentation-portal/
βββ master.ditamap # Combines all project maps
βββ platform-overview.ditamap # High-level platform docs
βββ projects/
β βββ drupal-modules.ditamap # All Drupal module docs
β βββ npm-packages.ditamap # All NPM package docs
β βββ infrastructure.ditamap # All infrastructure docs
βββ build-all.sh # Master build script
Quality Standardsβ
DITA Best Practicesβ
- Topic Granularity: One concept/task/reference per file
- ID Conventions: Consistent, meaningful topic IDs
- Metadata: Complete metadata for all topics
- Linking: Use keyrefs and conrefs for maintainability
- Validation: All content must validate against DTD
Review Processβ
- Automated validation in PR checks
- Documentation review alongside code review
- Cross-project consistency checks
- Terminology consistency enforcement
Metrics and Success Criteriaβ
Coverage Metricsβ
- 100% of public APIs documented
- 100% of configuration options documented
- 90%+ of common tasks documented
- 80%+ of troubleshooting scenarios covered
Quality Metricsβ
- Zero validation errors
- <5% duplicate content (use conrefs)
- 100% of external links validated
- Consistent terminology usage
Implementation Timelineβ
Week 1β
- Set up shared DITA infrastructure
- Implement templates and generators
- Complete Phase 2 projects
Week 2β
- Extend llmcli with DITA commands
- Complete Phase 3 projects
- Set up CI/CD integration
Week 3β
- Complete remaining projects
- Build master documentation portal
- Launch unified documentation site
Benefitsβ
- Professional Documentation: Enterprise-grade technical documentation
- Consistency: Uniform structure and style across all projects
- Efficiency: Reuse common content, reduce duplication
- Maintainability: Single source of truth for shared concepts
- Flexibility: Generate multiple output formats from single source
- Scalability: Easy to add new projects and content
- Searchability: Unified search across all project documentation
- Versioning: Document multiple versions simultaneously
- Localization: Built-in support for translations
- Compliance: Meets government documentation requirements
This comprehensive DITA integration will transform the LLM Platform's documentation from scattered README files into a professional, maintainable, and scalable documentation system worthy of an enterprise platform.