Skip to content

Latest commit

 

History

History
303 lines (193 loc) · 7.13 KB

File metadata and controls

303 lines (193 loc) · 7.13 KB

Documentation Maintenance Strategy

Last Updated: January 6, 2026


Purpose

This document outlines the strategy for maintaining accurate, up-to-date documentation in the AI Coding Stack project.


Documentation Principles

1. Single Source of Truth

  • 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

2. DRY (Don't Repeat Yourself)

  • Avoid duplicating information across multiple documents
  • Use cross-references instead of rewriting content
  • Each document should have a clear, single purpose

3. Document Why, Not Just What

  • Explain design decisions and trade-offs
  • Include context for architectural choices
  • Document edge cases and gotchas

4. Version Control

  • 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

Document Ownership

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

Update Process

1. Pre-Update Checklist

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)

2. Making Updates

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 changes
  • chore(filename): - Documentation maintenance updates
  • feat(filename): - New documentation sections
  • fix(filename): - Documentation corrections

3. Post-Update Checklist

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

Review Schedule

Monthly Checks

  • Verify COMPONENT-RELATIONSHIP-DIAGRAM.md against current codebase structure
  • Check all "Last Updated" dates - flag documents >6 months old
  • Review recent code changes for documentation needs

Quarterly Reviews

  • Complete SEO audit updates in SEO-AUDIT-REPORT.md
  • Review specs.md for project scope changes
  • Verify all documentation links are working
  • Update version references (Next.js, React, etc.)

As-Needed Updates

All other documents are updated as changes occur in their respective domains.


Automation Opportunities

1. CI Checks

Potential automated checks:

  • Markdown linting (markdownlint)
  • Link checker for all docs/
  • Spelling check on documentation files
  • Code block syntax validation

2. Generated Documentation

Currently generated:

  • src/lib/generated/*.ts - Typed manifest imports
  • Consider: Auto-generating API docs from TypeScript types

3. Documentation Coverage Tracking

Potential metrics to track:

  • Number of files with "Last Updated" > 6 months
  • Code changes without corresponding documentation updates
  • Broken links in documentation

Documentation Template

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 code

Use tables for structured data:

Column 1 Column 2
Value A Value B

Related Files

File Purpose
path/to/file Description

Related Documentation

  • [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.
  1. Update cross-references to point to the new document

  2. After 3 months, remove the deprecated document


Contribute Guidelines

Adding New Documentation

  1. Check if similar documentation exists
  2. Choose an appropriate filename
  3. Follow the documentation template
  4. Add to the documentation index (if applicable)
  5. Submit as a PR with the documentation label

Updating Existing Documentation

  1. Read the entire document first
  2. Preserve the structure and style
  3. Update the "Last Updated" date
  4. Increment version number if the change is significant
  5. Submit as a PR with the documentation label

Troubleshooting

Documentation Discrepancies

If you find documentation that doesn't match the code:

  1. Check the git blame for the last update
  2. Create an issue labeled documentation-outdated
  3. Tag the document owner
  4. Include the specific discrepancy

Missing Documentation

If you can't find information you need:

  1. Check the documentation map in specs.md
  2. Search in the codebase for comments
  3. Create an issue labeled documentation-need

Metrics & KPIs

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

Continuous Improvement

Documentation Retrospectives

Quarterly reviews should include:

  • What documentation updates were needed?
  • What was difficult to document?
  • What documentation was most helpful?
  • What can be improved?

Documentation Debt Tracking

Create issues for:

  • Outdated documentation (documentation-outdated)
  • Missing documentation (documentation-need)
  • Documentation improvements (documentation-improvement)

Version: 1.0 Last Updated: January 6, 2026