Skip to main content

Documentation Quality Report

Documentation Quality Report

Generated: December 22, 2025 Analyzer: Documentation Librarian (Claude Opus 4.5) Repository: coditect-core Scope: docs/ and internal/ directories


Executive Summary

Critical Findings

Total Documents Analyzed: 477 markdown files

Issue CategoryCountSeverity
Broken Links1,419HIGH
Orphaned Documents437MEDIUM
Missing README.md74MEDIUM
Missing CLAUDE.md36LOW

Health Score: 37/100 (Needs Significant Improvement)

Breakdown:

  • Link Integrity: 0/30 (1,419 broken links)
  • Document Discoverability: 8/30 (437 orphaned)
  • Navigation Structure: 15/20 (74 missing READMEs)
  • AI Agent Context: 14/20 (36 missing CLAUDE.md)

Total Broken Links: 1,419 across 200+ files

Root Causes

A. Documentation Reorganization (December 21, 2025)

Impact: ~60% of broken links

The customer/contributor split moved many files without updating cross-references:

  • docs/02-user-guides/docs/guides/
  • docs/09-research-analysis/internal/research/
  • docs/05-deployment/internal/deployment/
  • docs/10-special-topics/ → various locations

Example Broken Links:

Source: internal/architecture/adrs/ADR-020-context-extraction.md
- Link: ../../docs/10-special-topics/memory-context/MEMORY-CONTEXT-COMPLETE.md
- Should be: ../../../docs/guides/MEMORY-MANAGEMENT-GUIDE.md (if migrated)
- Status: File moved during reorganization

B. Code Block Parsing Issues (~25%)

Many "broken links" are actually code snippets incorrectly parsed as markdown links:

# False positives from code:
raise HTTPException(403, "Insufficient permissions") # Parsed as link!
"""Docstring text""" # Parsed as link!
.format("{:.4f}") # Parsed as link!

Recommendation: Improve link parser to exclude code blocks.

C. Archive/Superseded References (~10%)

Links to files moved to archive or deleted during consolidation:

Source: internal/architecture/claude-4.5-optimization/
- Multiple links to CLAUDE-4.5-UPDATE-BATCH-X-SUMMARY.md files
- These files moved to internal/archive/architecture/2025/claude-4.5-batches/
- Status: Historical reference documents

D. Missing Documentation (~5%)

Legitimate references to planned but unwritten documentation:

- docs/guides/RECOVERY-MANAGER-GUIDE.md (referenced but not created)
- docs/guides/ORCHESTRATOR-GUIDE.md (referenced but not created)
- docs/guides/COST-OPTIMIZATION.md (referenced but not created)

Category 1: Customer Documentation (docs/)

  • 47 broken links in guides/ (mostly cross-references)
  • 12 broken links in getting-started/
  • 8 broken links in workflows/

Action: Update relative paths after Dec 21 reorganization.

Category 2: ADR Cross-References (internal/architecture/adrs/)

  • 89 broken links across 20 ADRs
  • Most reference old ../../docs/ paths
  • Some reference submodule paths incorrectly

Action: Update ADR link paths to reflect new structure.

Category 3: Archive References

  • 134 broken links in internal/archive/
  • Mostly historical references to deleted files

Action: Replace with "Historical reference - file archived/deleted" notes.


2. Orphaned Documents Analysis

Total Orphaned: 437 documents (92% of all docs!)

What Makes a Document "Orphaned"?

A document is orphaned if:

  1. Not linked from any README.md or index file
  2. Not a navigation file itself (README.md, CLAUDE.md)
  3. Not linked from any other markdown document

Critical Orphans (High-Value, Not Linked)

Customer Documentation (docs/)

15 orphaned guides in docs/guides/:

  • CIRCULAR-FIX-DETECTION-GUIDE.md (3KB technical guide)
  • QA-SELF-HEALING-LOOP-GUIDE.md (5KB QA guide)
  • SECURITY-PROFILING-GUIDE.md (4KB security guide)
  • THINKING-BUDGET-SYSTEM.md (8KB cost optimization)

Recommendation: Add to docs/guides/README.md with category sections.

Architecture Documentation (internal/architecture/)

82 orphaned ADRs and design docs in internal/architecture/:

  • 12 ADRs not linked from adrs/README.md
  • 24 system design documents in system-design/
  • 18 database architecture docs in database/
  • 8 multi-tenant architecture docs in multi-tenant/

Recommendation: Create comprehensive navigation in architecture/README.md.

Archive Files (internal/archive/)

287 orphaned archived docs - EXPECTED! Archive files are intentionally not linked (historical reference only).

Recommendation: Add archive/README.md explaining purpose and indexing.

Research Documentation (internal/research/)

43 orphaned research docs:

  • Anthropic research findings
  • Market research
  • Performance analysis
  • LLM council pattern research

Recommendation: Create research/README.md with research index.

False Positives (Linked but Not Detected)

Some files ARE linked but analyzer didn't detect:

  • Files linked from root CLAUDE.md (not in docs/ or internal/)
  • Files linked via full paths (not relative)
  • Files linked from .json config files
  • Files linked from code (Python imports, etc.)

3. Missing README.md Files

Total Missing: 74 directories

High-Priority Missing READMEs

Major Directories (Should Always Have README)

internal/architecture/system-design/     (15 markdown files, no README)
internal/architecture/database/ (6 markdown files, no README)
internal/architecture/multi-tenant/ (5 markdown files, no README)
internal/architecture/orchestration/ (2 markdown files, no README)
internal/architecture/vision/ (4 markdown files, no README)
internal/research/anthropic-research/ (files present, no README)
internal/research/business/ (files present, no README)
internal/research/market-research/ (files present, no README)
internal/project/docs/ (files present, no README)
internal/deployment/ (critical deployment docs, no README!)
internal/testing/ (test docs, no README!)

Archive Directories (Lower Priority)

Most archive subdirectories lack READMEs - acceptable for archived content.

README.md Best Practices

Required Sections:

  1. Overview - What this directory contains
  2. Documents - Categorized list with descriptions
  3. Quick Links - Most accessed documents
  4. Related Documentation - Cross-references

Example Structure:

# Directory Name

Overview paragraph.

## Documents

### Category 1
- **DOC-1.md** - Description of document 1
- **DOC-2.md** - Description of document 2

### Category 2
- **DOC-3.md** - Description of document 3

## Quick Links
- [Most Used Doc](#)

## Related Documentation
- [Related Dir](#)

4. Missing CLAUDE.md Files

Total Missing: 36 major directories

What Directories Need CLAUDE.md?

Criteria:

  • Direct child of docs/ or internal/
  • Contains significant subdirectories
  • Contains specialized documentation requiring AI agent context

High-Priority Missing CLAUDE.md

docs/ Subdirectories (Customer-Facing)

docs/guides/        ✓ Has CLAUDE.md
docs/reference/ ✗ Missing CLAUDE.md
docs/workflows/ ✗ Missing CLAUDE.md

Recommendation: Create CLAUDE.md for docs/reference/ and docs/workflows/.

internal/ Subdirectories (Contributor-Facing)

internal/architecture/              ✓ Has CLAUDE.md
internal/deployment/ ✗ Missing CLAUDE.md
internal/project/ ✓ Has CLAUDE.md
internal/research/ ✗ Missing CLAUDE.md
internal/testing/ ✗ Missing CLAUDE.md

Recommendation: Create CLAUDE.md for deployment/, research/, testing/.

Deep Subdirectories (Major Categories)

internal/architecture/adrs/         ✗ Missing CLAUDE.md
internal/architecture/system-design/ ✗ Missing CLAUDE.md
internal/architecture/database/ ✗ Missing CLAUDE.md
internal/project/v2/ ✗ Missing CLAUDE.md (epic-based roadmap!)
internal/project/v2/epics/ ✗ Missing CLAUDE.md

Recommendation: Add CLAUDE.md to major architecture and project subdirectories.


5. Cross-Cutting Issues

Absolute vs. Relative Paths:

# Absolute (breaks easily when files move)
[Link](#)

# Relative (portable, preferred)
[Link](#)

# Root-relative (semi-portable)
[Link](#)

Recommendation: Standardize on relative paths for all internal links.

Many links are just anchors (#section-name) with no file reference:

[See Below](#installation)  # Not validated by analyzer

Recommendation: Validate anchor targets in separate pass.

Analyzer skips http://, https://, mailto: links:

  • No validation of external link health
  • Could be broken external resources

Recommendation: Add external link validation in future.

Some links point to directories without trailing slash:

[Research](#)  # Should be internal/research/

Recommendation: Add trailing slash validator.


Phase 1: Critical Fixes (Week 1)

Priority 1.1: Fix Customer Documentation Links (docs/)

  • Effort: 4-6 hours
  • Files: ~67 broken links across 15 files
  • Action: Update relative paths after Dec 21 reorganization
  • Owner: Documentation Librarian

Priority 1.2: Create Missing Major READMEs

  • Effort: 6-8 hours
  • Directories: 10 major directories
    • internal/deployment/README.md
    • internal/testing/README.md
    • internal/architecture/system-design/README.md
    • internal/architecture/database/README.md
    • internal/architecture/multi-tenant/README.md
    • internal/research/README.md
    • internal/project/v2/README.md
    • docs/reference/README.md
    • docs/workflows/README.md (exists - verify completeness)
  • Action: Create comprehensive navigation READMEs
  • Owner: Documentation Librarian

Priority 1.3: Fix ADR Cross-References

  • Effort: 3-4 hours
  • Files: ~20 ADRs with broken links
  • Action: Update old doc structure references to new paths
  • Owner: Documentation Librarian

Phase 2: Improve Discoverability (Week 2)

Priority 2.1: Link High-Value Orphans

  • Effort: 8-10 hours
  • Files: 15 customer guides, 25 architecture docs
  • Action: Add to appropriate README.md files with descriptions
  • Owner: Documentation Librarian

Priority 2.2: Create Archive Navigation

  • Effort: 2-3 hours
  • Action: Add internal/archive/README.md explaining archive purpose
  • Owner: Documentation Librarian

Priority 2.3: Improve Link Parser

  • Effort: 4-6 hours
  • Action: Exclude code blocks from link detection
  • Owner: Developer

Phase 3: Complete Navigation (Week 3)

Priority 3.1: Create Missing CLAUDE.md Files

  • Effort: 6-8 hours
  • Directories: 8 major subdirectories
  • Action: Add AI agent context for:
    • docs/reference/CLAUDE.md
    • internal/deployment/CLAUDE.md
    • internal/research/CLAUDE.md
    • internal/testing/CLAUDE.md
    • internal/architecture/adrs/CLAUDE.md
    • internal/project/v2/CLAUDE.md
    • internal/project/v2/epics/CLAUDE.md
  • Owner: Documentation Librarian

Priority 3.2: Fix Remaining Broken Links

  • Effort: 6-8 hours
  • Action: Clean up archive references, add "file deleted" notes
  • Owner: Documentation Librarian

Priority 3.3: Create Documentation Index

  • Effort: 4-6 hours
  • Action: Generate master documentation index (DOCUMENTATION-INDEX.md)
  • Owner: Documentation Librarian

Phase 4: Automation (Week 4)

Priority 4.1: Automated Link Validation

  • Effort: 8-10 hours
  • Action: CI/CD integration for link checking
  • Owner: DevOps

Priority 4.2: Orphan Detection Reports

  • Effort: 2-3 hours
  • Action: Weekly automated orphan detection
  • Owner: Developer

7. Known Limitations of Analysis

False Positives

  1. Code Blocks Parsed as Links: ~350 false broken links from code snippets
  2. External Links Not Validated: HTTP/HTTPS links assumed valid
  3. Full Path Links: Some absolute path links not correctly resolved

False Negatives

  1. Anchor-Only Links: Not validated (e.g., [text](#anchor))
  2. Links in JSON/YAML: Config file links not analyzed
  3. Dynamic Links: Programmatically generated links not detected

Not Analyzed

  1. Images: Image references not checked
  2. Submodule Links: Cross-submodule links not fully validated
  3. External Resources: No dead link checking for external URLs

8. Metrics and Tracking

Target Health Score: 90/100

Current: 37/100 Target: 90/100 by January 15, 2026

Breakdown Targets:

MetricCurrentTargetGap
Link Integrity0/3028/30Fix 95% of broken links
Document Discoverability8/3028/30Link 90% of orphans
Navigation Structure15/2019/20Create 90% of READMEs
AI Agent Context14/2018/20Create 80% of CLAUDE.md

Weekly Progress Tracking

Week 1 Goal: 60/100 (Customer docs fixed, major READMEs created) Week 2 Goal: 75/100 (Orphans linked, archive indexed) Week 3 Goal: 85/100 (CLAUDE.md files created, most links fixed) Week 4 Goal: 90/100 (Automation in place, remaining cleanup)


9. Tooling and Automation

Current Tools

analyze-documentation-links.py:

  • Python script analyzing all markdown links
  • Outputs: DOCUMENTATION-LINK-ANALYSIS.md, documentation-link-analysis.json
  • Runtime: ~30 seconds for 477 files
  • Location: /Users/halcasteel/PROJECTS/coditect-rollout-master/submodules/core/coditect-core/scripts/

CI/CD Integration:

# .github/workflows/documentation-quality.yml
name: Documentation Quality Check
on: [push, pull_request]
jobs:
link-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check Links
run: python3 scripts/analyze-documentation-links.py
- name: Report Broken Links
run: |
BROKEN=$(jq '.summary.broken_links' internal/project/reports/documentation-link-analysis.json)
if [ $BROKEN -gt 50 ]; then
echo "ERROR: $BROKEN broken links found (threshold: 50)"
exit 1
fi

Pre-Commit Hook:

# .git/hooks/pre-commit
python3 scripts/analyze-documentation-links.py --fast
# Warn if new broken links introduced

10. Specific Fix Examples

File: internal/architecture/adrs/ADR-020-context-extraction.md

Before:

See [Memory Context Guide](#)

After:

See [Memory Management Guide](/guides/memory-management-guide)

Reasoning: Dec 21 reorganization moved memory guides to docs/guides/.

File: docs/guides/README.md

Add Section:

## Quality Assurance

- **[QA-SELF-HEALING-LOOP-GUIDE.md](#)** - Automated quality assurance with self-healing error recovery for production deployments
- **[CIRCULAR-FIX-DETECTION-GUIDE.md](#)** - Detect and prevent circular fix patterns in error recovery workflows

Example 3: Create Missing README

File: internal/deployment/README.md

Content:

# Deployment Documentation

Production deployment guides for CODITECT framework.

## Documents

### Docker Development
- **[LOCAL-DEVELOPMENT-DOCKER.md](#)** - Complete Docker-based local development environment setup

### CI/CD Pipelines
- **[AGENT-SELECTION-CI-CD-DEPLOYMENT.md](#)** - Multi-agent workflow for implementing CI/CD and production deployment

## Quick Links
- [Docker Guide](#) - Most accessed

## Related Documentation
- [Architecture Overview](#)
- [System Design](#)

Example 4: Create CLAUDE.md for AI Agent Context

File: docs/reference/CLAUDE.md

Content:

# Reference Documentation - AI Agent Context

**Purpose:** Technical reference documentation for CODITECT components, architecture, and specifications.

## When Agents Should Use These Documents

**Use reference documentation when:**
- Looking up component specifications
- Understanding system architecture
- Reviewing Claude 4.5 optimization patterns
- Finding complete component inventory

**Don't use when:**
- Learning how to use CODITECT (use docs/guides/)
- Setting up for first time (use docs/getting-started/)

## Key Documents for Agents

### Architecture Reference
- **ARCHITECTURE-OVERVIEW.md** - Complete system design and component relationships
- **COMPONENT-REFERENCE.md** - Full component inventory with counts

### Claude 4.5 Optimization
- **CLAUDE-4.5-GUIDE.md** - Best practices, patterns, and action policies for Claude 4.5

### Agent Configuration
- **AGENT-FRONTMATTER-THINKING-CONFIG.md** - Agent frontmatter configuration and thinking budget system

## Agent Workflow Guidance

1. **Check ARCHITECTURE-OVERVIEW.md** for high-level system understanding
2. **Review COMPONENT-REFERENCE.md** for component details
3. **Apply CLAUDE-4.5-GUIDE.md** patterns for optimal performance
4. **Refer to specific specs** for deep technical details

## Cross-References

- [User Guides](/guides/) - How-to documentation
- [Architecture ADRs](#) - Architecture decisions
- [System Design](#) - Detailed system design

Appendices

Appendix A: Directory-by-Directory Breakdown

Complete analysis available in:

  • internal/project/reports/DOCUMENTATION-LINK-ANALYSIS.md (full markdown report)
  • internal/project/reports/documentation-link-analysis.json (programmatic access)

Recommended Regex Updates:

# Exclude code blocks
def extract_markdown_links(content):
# Remove code blocks first
content = re.sub(r'```.*?```', '', content, flags=re.DOTALL)
content = re.sub(r'`[^`]+`', '', content)

# Then extract links
inline_pattern = r'\[([^\]]+)\]\(([^)]+)\)'
reference_pattern = r'\[([^\]]+)\]:\s*(.+)'
# ... rest of implementation

Appendix C: Documentation Standards

Established Standards:


Report Generated By: Documentation Librarian (documentation-librarian agent) Analysis Tool: /Users/halcasteel/PROJECTS/coditect-rollout-master/submodules/core/coditect-core/scripts/analyze-documentation-links.py Next Review: January 5, 2026 Owner: Hal Casteel, CTO


Quick Summary for Stakeholders

The Good News

  • 477 documents thoroughly analyzed
  • Clear action plan with 4-week timeline
  • Automated tooling in place for ongoing monitoring

The Bad News

  • 1,419 broken links (mostly from December 21 reorganization)
  • 437 orphaned documents (92% of all docs not linked!)
  • 74 directories missing navigation READMEs

The Fix

  • Week 1: Fix customer-facing documentation (highest priority)
  • Week 2: Link orphaned documents, improve discoverability
  • Week 3: Complete navigation structure (READMEs + CLAUDE.md)
  • Week 4: Automate quality checks in CI/CD

Cost

  • Time: ~50-60 engineering hours over 4 weeks
  • Risk: Low (documentation-only changes)
  • Value: Significantly improved documentation usability and discoverability

Success Metrics

  • Health Score: 37 → 90 (Target: 90/100 by Jan 15, 2026)
  • Broken Links: 1,419 → <100
  • Orphaned Documents: 437 → <50
  • Missing READMEs: 74 → <10

END OF REPORT