feat(docs): intelligent section recategorization + i18n infrastructure
This commit includes two major improvements to the documentation system:
## 1. Section Recategorization (UX Fix)
**Problem**: 64 sections (24%) were incorrectly marked as "critical" and
displayed at the bottom of documents, burying important foundational content.
**Solution**:
- Created intelligent recategorization script analyzing titles, excerpts,
and document context
- Reduced "critical" from 64 → 2 sections (97% reduction)
- Properly categorized content by purpose:
- Conceptual: 63 → 138 (+119%) - foundations, "why this matters"
- Practical: 3 → 46 (+1433%) - how-to guides, examples
- Technical: 111 → 50 (-55%) - true implementation details
**UI Improvements**:
- Reordered category display: Critical → Conceptual → Practical → Technical → Reference
- Changed Critical color from amber to red for better visual distinction
- All 22 documents recategorized (173 sections updated)
## 2. i18n Infrastructure (Phase 2)
**Backend**:
- DeepL API integration service with quota management and error handling
- Translation API routes (GET /api/documents/:slug?lang=de, POST /api/documents/:id/translate)
- Document model already supports translations field (no schema changes)
**Frontend**:
- docs-app.js enhanced with language detection and URL parameter support
- Automatic fallback to English when translation unavailable
- Integration with existing i18n-simple.js system
**Scripts**:
- translate-all-documents.js: Batch translation workflow (dry-run support)
- audit-section-categories.js: Category distribution analysis
**URL Strategy**: Query parameter approach (?lang=de, ?lang=fr)
**Status**: Backend complete, ready for DeepL API key configuration
**Files Modified**:
- Frontend: document-cards.js, docs-app.js
- Backend: documents.controller.js, documents.routes.js, DeepL.service.js
- Scripts: 3 new governance/i18n scripts
**Database**: 173 sections recategorized via script (already applied)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>