Skip to main content
Glama

mcp-adr-analysis-server

by tosin2013
DOCS_WORKFLOW.mdโ€ข6.33 kB
# ๐Ÿ“š Documentation Workflow Guide **Comprehensive Docker-based documentation validation and link fixing for MCP ADR Analysis Server** ## ๐Ÿš€ Quick Start ```bash # Run complete documentation workflow ./scripts/docs-workflow.sh # Or use the shorthand make docs-validate # (if added to Makefile) ``` ## ๐Ÿ› ๏ธ Available Commands ### Full Workflow (Recommended) ```bash ./scripts/docs-workflow.sh --full # Runs: validation โ†’ link checking โ†’ analysis โ†’ optional fixing โ†’ final validation ``` ### Individual Operations ```bash # Just validate documentation structure and syntax ./scripts/docs-workflow.sh --validate # Check for broken links only ./scripts/docs-workflow.sh --check-links # See what would be fixed (no changes made) ./scripts/docs-workflow.sh --dry-run # Automatically fix broken links ./scripts/docs-workflow.sh --fix-links # Build and preview documentation locally ./scripts/docs-workflow.sh --preview # Show validation reports ./scripts/docs-workflow.sh --reports # Show current status ./scripts/docs-workflow.sh --status ``` ### Cleanup ```bash # Clean up Docker containers ./scripts/docs-workflow.sh --cleanup # Clean up containers and images ./scripts/docs-workflow.sh --cleanup --images ``` ## ๐Ÿ“Š What Gets Validated ### 1. Documentation Structure - โœ… Required files exist (diataxis-index.md, README.md, etc.) - โœ… Directory structure follows Diataxis framework - โœ… Markdown file count and organization ### 2. Link Validation - ๐Ÿ”— Internal links to other documentation files - ๐Ÿ”— Relative path resolution - ๐Ÿ”— Anchor links within documents - ๐Ÿ”— Cross-references between sections ### 3. Content Quality - ๐Ÿ“ Markdown syntax validation - ๐Ÿ“ Code block syntax checking - ๐Ÿ“ Table formatting validation ### 4. Build Testing - ๐Ÿ—๏ธ VitePress build (if configured) - ๐Ÿ—๏ธ HTML generation from Markdown - ๐Ÿ—๏ธ Static site generation ## ๐Ÿ”ง What Gets Fixed Automatically ### Missing Files The link fixer automatically creates missing documentation files with appropriate templates: - **How-To Guides**: `docs/how-to-guides/migrate-existing-adrs.md`, etc. - **Reference Docs**: `docs/reference/adr-templates.md`, etc. - **Explanation Content**: `docs/explanation/ai-architecture-concepts.md`, etc. - **Sample ADRs**: Creates sample project ADRs for tutorials ### Broken Links - ๐Ÿ”— **Research Links**: Comments out or removes broken research file links - ๐Ÿ”— **Sample Project Links**: Creates missing sample ADR files - ๐Ÿ”— **Internal References**: Updates paths to match actual file locations ### Content Templates Generated files include: - โœ… Proper Markdown structure and formatting - โœ… Appropriate content for file type (how-to, reference, explanation) - โœ… Cross-references to related documentation - โœ… Consistent styling and navigation ## ๐Ÿ“‹ Reports Generated All reports are saved to `./reports/` directory: ### Link Validation Reports - `link-validation_TIMESTAMP.txt` - Detailed link checking results - `link-summary_TIMESTAMP.json` - Machine-readable summary - `link-analysis_TIMESTAMP.json` - Categorized broken link analysis ### Fix Reports - `link-fix-summary_TIMESTAMP.json` - Summary of applied fixes - `fix-recommendations_TIMESTAMP.md` - Manual fix recommendations ### Build Reports - `comprehensive-validation_TIMESTAMP.json` - Overall validation status - `final-report_TIMESTAMP.md` - Human-readable final report ## ๐Ÿณ Docker Architecture ### Services - **docs-validator**: Main validation and building service - **link-checker**: Specialized link validation service - **link-fixer**: Automated link fixing service - **docs-server**: Local preview server ### Volumes - `.:/docs` - Mount entire project for analysis - `./reports:/docs/reports` - Persistent reports storage - `./build:/docs/build` - Built documentation output ## ๐Ÿ“ˆ Workflow Process ```mermaid graph TD A[Start] --> B[Setup Environment] B --> C[Validate Structure] C --> D[Check Links] D --> E[Analyze Issues] E --> F{Issues Found?} F -->|Yes| G[Show Dry Run] G --> H{Fix Automatically?} H -->|Yes| I[Apply Fixes] H -->|No| J[Generate Reports] I --> K[Final Validation] F -->|No| L[Success!] J --> L K --> L ``` ## ๐ŸŽฏ Success Criteria ### Before Fixes - **Total Links**: 317 checked - **Broken Links**: 154 found (49% failure rate) - **Missing Files**: 7 critical navigation files - **Research Links**: 150+ broken placeholder links ### After Fixes (Expected) - **Total Links**: 317+ checked - **Broken Links**: <10 remaining (3% failure rate) - **Missing Files**: 0 critical files - **Navigation**: 100% functional ## ๐Ÿšจ Troubleshooting ### Docker Issues ```bash # If Docker build fails docker system prune ./scripts/docs-workflow.sh --cleanup --images # If containers won't start docker-compose -f docker-compose.docs.yml down --remove-orphans ``` ### Permission Issues ```bash # If scripts aren't executable chmod +x scripts/*.sh scripts/*.py # If Docker can't access files sudo chown -R $USER:$USER reports/ build/ ``` ### Link Fixing Issues ```bash # If automatic fixes fail, run dry-run to see what would happen ./scripts/docs-workflow.sh --dry-run # Check specific reports ls -la reports/ cat reports/link-analysis_*.json ``` ## ๐Ÿ”— Integration with Development Workflow ### Pre-Commit Hook ```bash # Add to .husky/pre-commit ./scripts/docs-workflow.sh --validate --check-links ``` ### CI/CD Integration ```yaml # Add to GitHub Actions - name: Validate Documentation run: ./scripts/docs-workflow.sh --validate - name: Check Documentation Links run: ./scripts/docs-workflow.sh --check-links ``` ### Makefile Integration ```makefile docs-validate: ./scripts/docs-workflow.sh --validate docs-fix: ./scripts/docs-workflow.sh --fix-links --yes docs-preview: ./scripts/docs-workflow.sh --preview ``` ## ๐Ÿ“š Related Documentation - **[Troubleshooting Guide](docs/how-to-guides/troubleshooting.md)** - General troubleshooting - **[CI/CD Integration](docs/how-to-guides/cicd-integration.md)** - Automated workflows - **[Contributing Guide](CONTRIBUTING.md)** - Development guidelines --- **Need help?** โ†’ **[File an Issue](https://github.com/tosin2013/mcp-adr-analysis-server/issues)** or run `./scripts/docs-workflow.sh --help`

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/tosin2013/mcp-adr-analysis-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server