Last Updated: January 6, 2026
This document outlines the strategy for maintaining accurate, up-to-date documentation in the AI Coding Stack project.
- Code is the source of truth - Documentation should reflect what the code actually does
- When code changes, documentation must be updated
- Use code examples that can be tested/verified
- Avoid duplicating information across multiple documents
- Use cross-references instead of rewriting content
- Each document should have a clear, single purpose
- Explain design decisions and trade-offs
- Include context for architectural choices
- Document edge cases and gotchas
- All changes to docs/ should follow the same review process as code
- Use descriptive commit messages for documentation updates
- Include the document name in commit messages:
docs(specs.md): update manifest types table
Each document has clear ownership and update triggers:
| Document | Owner Type | Update Triggers | Review Frequency |
|---|---|---|---|
ORIGINAL-SPECS.md |
Core team | Project scope changes, new manifest types | Never |
COMPONENT-RELATIONSHIP-DIAGRAM.md |
Core team | Architectural changes, new systems | Monthly |
SCHEMA-ARCHITECTURE.md |
Metadata lead | Schema system changes | As needed |
METADATA_OPTIMIZATION.md |
Metadata lead | SEO/metadata system changes | As needed |
SEO-AUDIT-REPORT.md |
SEO lead | Quarterly SEO audit | Quarterly |
MANIFEST_I18N.md |
i18n lead | Translation system changes | As needed |
PERFORMANCE.md |
Performance lead | Performance guidelines changes | As needed |
GITHUB_SETUP_MANUAL_STEPS.md |
DevOps lead | CI/CD workflow changes | As needed |
FETCH_GITHUB_STARS.md |
DevOps lead | External fetching system changes | As needed |
Before updating documentation:
- Verify the code change is complete
- Test the code examples (if any)
- Check if other docs reference this content
- Plan the update purpose (clarification, correction, addition)
Follow these guidelines:
# Use conventional commits for documentation
git add docs/COMPONENT-RELATIONSHIP-DIAGRAM.md
git commit -m "docs(COMPONENT-RELATIONSHIP-DIAGRAM.md): add Deployment flow section"Commit Types:
docs(filename):- Documentation only changeschore(filename):- Documentation maintenance updatesfeat(filename):- New documentation sectionsfix(filename):- Documentation corrections
After updating documentation:
- Update the "Last Updated" date
- Update version number (if applicable)
- Verify cross-references are still valid
- Check for broken links
- Request a review from the document owner
- Verify
COMPONENT-RELATIONSHIP-DIAGRAM.mdagainst current codebase structure - Check all "Last Updated" dates - flag documents >6 months old
- Review recent code changes for documentation needs
- Complete SEO audit updates in
SEO-AUDIT-REPORT.md - Review
specs.mdfor project scope changes - Verify all documentation links are working
- Update version references (Next.js, React, etc.)
All other documents are updated as changes occur in their respective domains.
Potential automated checks:
- Markdown linting (markdownlint)
- Link checker for all docs/
- Spelling check on documentation files
- Code block syntax validation
Currently generated:
-
src/lib/generated/*.ts- Typed manifest imports - Consider: Auto-generating API docs from TypeScript types
Potential metrics to track:
- Number of files with "Last Updated" > 6 months
- Code changes without corresponding documentation updates
- Broken links in documentation
All new documentation files should follow this structure:
# Document Title
**Last Updated:** YYYY-MM-DD
**Owner:** [Team member or role]
**Version:** x.y
---
## Purpose
Brief description of what this document covers and who should read it.
---
## Overview
High-level introduction to the topic.
---
## [Sections...]
Organized content with clear headings and subheadings.
Use code blocks for examples:
```typescript
// Example codeUse tables for structured data:
| Column 1 | Column 2 |
|---|---|
| Value A | Value B |
| File | Purpose |
|---|---|
path/to/file |
Description |
[Link](./other-doc.md)- Brief description
Version: x.y Last Updated: YYYY-MM-DD
---
## Deprecated Documentation
When a document becomes obsolete:
1. Add a DEPRECATED notice at the top:
```markdown
> **DEPRECATED:** This document is no longer maintained.
> Please see [NEW_DOCUMENT.md](./NEW_DOCUMENT.md) for current information.
-
Update cross-references to point to the new document
-
After 3 months, remove the deprecated document
- Check if similar documentation exists
- Choose an appropriate filename
- Follow the documentation template
- Add to the documentation index (if applicable)
- Submit as a PR with the
documentationlabel
- Read the entire document first
- Preserve the structure and style
- Update the "Last Updated" date
- Increment version number if the change is significant
- Submit as a PR with the
documentationlabel
If you find documentation that doesn't match the code:
- Check the git blame for the last update
- Create an issue labeled
documentation-outdated - Tag the document owner
- Include the specific discrepancy
If you can't find information you need:
- Check the documentation map in
specs.md - Search in the codebase for comments
- Create an issue labeled
documentation-need
Track the following to ensure documentation quality:
| Metric | Target | Frequency |
|---|---|---|
| Docs updated in last 6 months | >90% | Monthly |
| Broken links in docs/ | 0 | Quarterly |
| docs/ coverage for major features | 100% | Per release |
| Documentation review time | <3 days | Per PR |
Quarterly reviews should include:
- What documentation updates were needed?
- What was difficult to document?
- What documentation was most helpful?
- What can be improved?
Create issues for:
- Outdated documentation (
documentation-outdated) - Missing documentation (
documentation-need) - Documentation improvements (
documentation-improvement)
Version: 1.0 Last Updated: January 6, 2026