Version: 1.0
Last Updated: 2026-01-12
Status: Official
This guide documents the process for archiving outdated, superseded, or no-longer-relevant documentation in ThemisDB while preserving historical context and maintaining git history.
Archive documentation when:
- ✅ Content is outdated and superseded by newer documentation
- ✅ Feature/component no longer exists or has been replaced
- ✅ Information has been consolidated into another document
- ✅ Content is no longer accurate or relevant to current versions
- ✅ Duplicate or redundant information exists
- ✅ Planned feature was not implemented
- ✅ Implementation summaries from completed work (keep for reference but move from active docs)
ThemisDB uses a language-specific archive structure:
docs/
├── archive/ # Root-level archives (language-agnostic)
│ ├── README.md # Archive index
│ └── ARCHIVE_NOTE_TEMPLATE.md
├── de/
│ └── archive/ # German documentation archives
│ └── README.md
├── en/
│ └── archive/ # English documentation archives
│ └── README.md
├── fr/
│ └── archive/ # French documentation archives
│ └── README.md
├── es/
│ └── archive/ # Spanish documentation archives
│ └── README.md
└── ja/
└── archive/ # Japanese documentation archives
└── README.md
- Keep original filename when archiving
- Add date prefix if multiple versions:
YYYY-MM-DD_original-name.md - Use lowercase with hyphens:
feature-implementation-summary.md
-
Verify Need for Archival
# Check document age git log --follow path/to/document.md # Check references to document grep -r "document-name" docs/
-
Review Content
- Identify valuable information to preserve
- Check for content that should be moved to current docs
- Review git history for important context
-
Get Approval (if needed)
- Discuss with team for major documentation
- Document decision in issue or PR
-
Extract Valuable Content
- Copy relevant sections to current documentation
- Update current docs with preserved information
- Note the source in commit message
-
Create Archive Note
- Use template from
docs/archive/ARCHIVE_NOTE_TEMPLATE.md - Fill in all required fields:
- Archived Date
- Reason for archival
- Replacement documentation link
- Last valid version (commit SHA)
- Add historical context
- Document migration path if applicable
- Use template from
-
Find All References
# Search for references grep -r "path/to/document" docs/ grep -r "document-name" docs/ # Check mkdocs navigation grep -A 5 -B 5 "document-name" mkdocs.yml
-
Move Document
# Move preserves git history git mv path/to/document.md docs/LANG/archive/document.md # Or for root-level docs git mv document.md docs/archive/document.md
-
Add Archive Note to Document
- Add archive note as first section of moved document
- Keep original content below the note
- Example:
# ARCHIVED: Original Document Title **Archived Date:** 2026-01-12 **Reason:** Superseded by new implementation guide **Replaced By:** [New Implementation Guide](../guides/new-guide.md) **Last Valid Version:** a1b2c3d (2025-12-15) ## Context This document described the original implementation approach... --- [Original document content follows...]
-
Update Archive Index
- Add entry to
docs/LANG/archive/README.md - Include metadata table entry
- Link to replacement documentation
- Add entry to
-
Update Internal Links
- Find all references:
grep -r "old-document-name" docs/ - Update links to point to:
- New replacement documentation, or
- Archive location with note that it's archived
- Remove from navigation menus
- Find all references:
-
Update mkdocs.yml
# Remove from navigation vim mkdocs.yml # Search for document and remove entry
-
Update Index Files
- Remove from
docs/DOCUMENTATION_INDEX.md - Remove from
docs/00_DOCUMENTATION_INDEX.md - Update any category-specific indexes
- Remove from
-
Check for Broken Links
# Build documentation mkdocs build # Check for broken links (if tool available) # Or manually verify navigation
-
Verify Git History
# Confirm history preserved git log --follow docs/archive/document.md -
Test Documentation Build
mkdocs serve # Verify site builds without errors
-
Update CHANGELOG
### Documentation - Archived `old-document.md` (superseded by new-guide.md)
-
Commit Changes
git add docs/ git commit -m "docs: Archive outdated-document (superseded by new-guide)" -
Create PR
- Use descriptive title:
docs: Archive [Document Name] - Reference issue if applicable
- List documents archived
- Note replacement documentation
- Use descriptive title:
-
Notify Stakeholders (if significant)
- Comment on related issues
- Update team in appropriate channel
- Note in release notes if user-facing
Use the template located at docs/archive/ARCHIVE_NOTE_TEMPLATE.md.
Required fields:
- Archived Date
- Reason
- Replaced By (or "N/A")
- Last Valid Version
Recommended sections:
- Context (why archived)
- Historical Information (important context)
- Migration Path (how to transition)
- See Also (links to current docs)
# 1. Review document
git log --follow LORA_IMPLEMENTATION_SUMMARY.md
# 2. Find references
grep -r "LORA_IMPLEMENTATION_SUMMARY" docs/
# 3. Move to archive
git mv LORA_IMPLEMENTATION_SUMMARY.md docs/archive/LORA_IMPLEMENTATION_SUMMARY.md
# 4. Edit document to add archive note at top
vim docs/archive/LORA_IMPLEMENTATION_SUMMARY.md
# 5. Update archive README
vim docs/archive/README.md
# 6. Update references (if any)
# Update links to point to current documentation
# 7. Update CHANGELOG
vim CHANGELOG.md
# 8. Commit
git add docs/ CHANGELOG.md
git commit -m "docs: Archive LORA_IMPLEMENTATION_SUMMARY (implementation complete)"
# 9. Create PR
gh pr create --title "docs: Archive LORA implementation summary" --body "..."- Review archives annually
- Remove archives older than 3 years if no longer relevant
- Update archive READMEs with better organization if needed
Each archive directory should have a README.md with:
# Archive - [Language] Documentation
**Last Updated:** YYYY-MM-DD
## Overview
This directory contains archived documentation that is no longer current but preserved for historical reference.
## Archived Documents
| Document | Archived Date | Reason | Replaced By |
|----------|---------------|--------|-------------|
| old-doc.md | 2026-01-12 | Superseded | [new-doc.md](../new-doc.md) |
## Notes
Archived documents are preserved with full git history. Content may be outdated and should not be used for current development.
For current documentation, see [Documentation Index](../DOCUMENTATION_INDEX.md).Solution: Always use git mv instead of manual copy/delete:
git mv source.md destination.mdSolution: Use grep to find all references before archiving:
grep -r "document-name" docs/Solution: Create it first:
mkdir -p docs/LANG/archive- ✅ Always preserve git history - Use
git mv, never delete and recreate - ✅ Add archive notes - Future readers need context
- ✅ Update all references - Prevent broken links
- ✅ Keep archive READMEs current - Maintain organized indexes
- ✅ Document in CHANGELOG - Track what was archived
- ✅ Be conservative - When in doubt, keep documentation active
- ✅ Extract valuable content first - Preserve useful information in current docs
- ✅ Test documentation builds - Ensure no errors introduced
- Archive Policy: CONTRIBUTING.md § Documentation Archival
- Archive Template: docs/archive/ARCHIVE_NOTE_TEMPLATE.md
- Investigation Report: docs/DOCUMENTATION_ARCHIVAL_INVESTIGATION.md
- Documentation Standards: CONTRIBUTING.md § Documentation
Questions? Open an issue or ask in the project chat.