Skip to content

docs: Add YAML frontmatter to all docs/ markdown files #562

Description

@kcenon

What

Add standardized YAML frontmatter metadata to all markdown files in docs/
directories across 8 ecosystem projects (~578 files total).

Why

Without frontmatter metadata, it is impossible to programmatically track document
currency, ownership, or status. YAML frontmatter enables automated validation,
version tracking, and document registry management. This is a prerequisite for the
document audit tool.

Where

Repository docs/ File Count Estimated Effort
common_system ~85 files High
thread_system ~83 files High
monitoring_system ~80 files High
network_system ~76 files Medium
pacs_system ~74 files Medium
logger_system ~69 files Medium
database_system ~57 files Medium
container_system ~54 files Medium
Total ~578 files

How

Frontmatter Schema

---
doc_id: "{PREFIX}-{CATEGORY}-{NNN}"
doc_title: "Document Title"
doc_version: "1.0.0"
doc_date: "YYYY-MM-DD"
doc_status: "Released"
project: "{project_name}"
category: "{category}"
---

Field Definitions

Field Required Format Example
doc_id Yes {PREFIX}-{CAT}-{NNN} THR-ARCH-001
doc_title Yes Free text Architecture Guide
doc_version Yes Semver 1.0.0
doc_date Yes ISO 8601 2026-04-03
doc_status Yes Enum Draft, In Review, Released, Deprecated
project Yes Snake case thread_system
category Yes Enum See below

Project Prefix Table

Project Prefix
common_system COM
thread_system THR
logger_system LOG
container_system CNT
monitoring_system MON
database_system DBS
network_system NET
pacs_system PAC

Category Enum

Category Description Examples
ARCH Architecture ARCHITECTURE.md
API API Reference API_REFERENCE.md
GUID User Guide QUICK_START.md, BUILD_GUIDE.md
PERF Performance BENCHMARKS.md, BASELINE.md
MIGR Migration MIGRATION.md, MIGRATION_GUIDE.md
PROJ Project Info PROJECT_STRUCTURE.md, CONTRIBUTING.md
FEAT Features FEATURES.md
QUAL Quality PRODUCTION_QUALITY.md
SECU Security SECURITY.md
INTR Integration INTEGRATION.md
ADR Decision Record ADR-001.md

Implementation Strategy

  1. Create a Python script tools/add_frontmatter.py that:
    • Scans docs/ for .md files without frontmatter
    • Infers category from filename patterns
    • Generates doc_id from project prefix + category + sequential number
    • Adds frontmatter without modifying existing content
    • Outputs a summary report
  2. Run script per-project, review output, commit
  3. Validate with grep: grep -rL "^---" docs/*.md should return 0 matches

Acceptance Criteria

  • tools/add_frontmatter.py script created in common_system
  • All ~578 docs/ markdown files have valid YAML frontmatter
  • All doc_id values follow {PREFIX}-{CAT}-{NNN} format
  • No duplicate doc_id values within a project
  • Existing document content unchanged (frontmatter prepended only)
  • Script can be re-run idempotently (skips files with existing frontmatter)

Related

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions