Skip to content

docs: enforce repository-wide YAML governance#919

Merged
huangzesen merged 2 commits into
mainfrom
docs/all-doc-yaml-governance-a2b7
Jul 14, 2026
Merged

docs: enforce repository-wide YAML governance#919
huangzesen merged 2 commits into
mainfrom
docs/all-doc-yaml-governance-a2b7

Conversation

@huangzesen

@huangzesen huangzesen commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add root docs.yaml as the single machine-readable contract for repository Markdown metadata
  • migrate all 244 current Markdown documents to nonempty repo-relative related_files plus a document-specific maintenance rule, with no path-level content exemptions
  • add scripts/check_docs_governance.py and regression coverage for strict frontmatter/YAML, maintenance placeholders and the exact 19/20 boundary, unsafe paths including Windows drive designators, specialized-owner boundaries, package/runtime consumers, and byte-exact notification bodies
  • preserve existing Anatomy/Contract, prompt-crawl, glossary, session-journal, PR-template, and raw-consumer ownership semantics
  • reconcile the reviewed V6R governance candidate onto live main a2b7d729: 167 files remain byte-identical to the reviewed candidate, while four overlapping manuals preserve the intervening fix(daemon): enforce explicit preset allowlist #917/fix: preserve timely-transient metadata during full replay #918 content and add only the exact reviewed governance blocks
  • add an optional lifecycle: temporary marker with a required, concrete temporary_until exit condition; the marker adds obligations and never exempts maintenance or related_files
  • mark exactly one evidence-backed transitional document, docs/plans/2026-06-25-fsutil-migration.md, while leaving durable/history documents unclassified by default

Validation

Current head f4163f2e9d2780d3d7a694b331b6f3b03e9aa670:

python scripts/check_docs_governance.py --check
OK: 244 documents (+ docs.yaml itself) validated.

python -m pytest -q -p no:cacheprovider --basetemp <scratch> \
  tests/test_docs_governance.py \
  tests/test_tool_glossary.py \
  tests/test_architecture_documents.py \
  tests/test_mcp_capability.py
288 passed in 1.83s

Earlier reconciled V6R full-suite baseline, before the lifecycle-only follow-up:

python -m pytest -q -p no:cacheprovider --basetemp <scratch>
4 failed, 5374 passed, 3 skipped in 240.78s (0:04:00)
# exact failed-node set matches the prior four classified baseline cases; candidate-specific failures: 0

Additional exact-candidate checks:

  • scratch simulated post-commit: 881 tracked files, 244 Markdown documents, 0 untracked files; git diff --cached --check passed; real worktree index remained byte-identical
  • initial reconciled candidate tree: bac66b18c2a7c8d55881c017e7f1516c19e617e2
  • independently applied scratch-index tree: bac66b18c2a7c8d55881c017e7f1516c19e617e2
  • initial exact live packet patch SHA-256: 0e3003629670b56d0d0197bf9a1fd69213d05d487ff9cbe6fba2ca1e51f524ce
  • lifecycle follow-up exact diff SHA-256: 96167b10d8109a28d58cb9f375e1dc99281a04beb8255176886a2cd65a4b448e
  • canonical pool Terra initial governance review: PASS, 0 blocker / 0 important / 0 NIT after its two bounded quality repairs
  • capability-enforced and mechanically verified claude-opus-4-8 initial governance review: PASS, 0 blocker / 0 important / 1 cosmetic non-blocking NIT (three stale “V5” labels in test comments/docstrings only)
  • lifecycle follow-up Terra exact review: PASS, 0 blocker / 0 important / 0 NIT after closing its anti-placeholder finding and non-whitespace-count NIT
  • lifecycle follow-up no-tools, mechanically verified claude-opus-4-8 final review: PASS, 0 blocker / 0 important; two observational non-blocking NITs, with no candidate change required

Scope notes

  • related_files remains a safe repo-relative logical/crawl-link field; deeper existence and graph semantics stay with their existing specialized owners.
  • lifecycle_contract supplies only a small mechanical floor. It rejects placeholder tokens and bare generic “when done” / “after migration” conditions, but owners and review remain responsible for semantic concreteness.
  • The read-only expiry audit found zero deletion-ready stale documents. This PR does not delete, archive, or move any document.
  • Two stale related_files entries discovered in src/lingtai/kernel/i18n/ANATOMY.md are reported separately and deliberately not mixed into this PR.
  • The HTML explainer is local-only and is not included in this PR.
  • This PR does not add or claim a new hosted CI workflow.

@huangzesen
huangzesen merged commit b410ffc into main Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant