Skip to content

docs-disc phase1a: docs.schema.json + validate-docs.py (TDD)#45

Merged
rafael5 merged 1 commit into
mainfrom
phase1a-docs-schema
May 12, 2026
Merged

docs-disc phase1a: docs.schema.json + validate-docs.py (TDD)#45
rafael5 merged 1 commit into
mainfrom
phase1a-docs-schema

Conversation

@rafael5
Copy link
Copy Markdown
Contributor

@rafael5 rafael5 commented May 12, 2026

Summary

Lands rows P1.1, P1.2, P1.3 from the docs-discoverability phases tracker. Foundation for Phase 1 — schema + validator that the 7 tier-1/2 repos will adopt in their own P1.4/P1.5 sessions.

  • P1.1profile/docs.schema.json: Draft 2020-12 schema for prose-doc frontmatter. 23-type doc_type enum + 5-state lifecycle enum + 6-vocab connections. Two variants (prose vs generated) gated on the generated field via if/then per spec §5.1.
  • P1.2profile/repo.meta.schema.json: extended with optional docs.generated_paths array (enables §5.1 exclusion rule). Additive; no schema_compat bump (this schema isn't routing-layer).
  • P1.3profile/build/validate-docs.py + 13 TDD'd cases: covers spec §9 checks 0–4 (generated-doc bidirectional path↔marker check, frontmatter present, required keys, doc_type enum, lifecycle enum). Skips docs/recipes/ (own schema; covered by recipes-check). --warn-only flag for the Phase 1 rollout.
  • P1.3b (bonus self-check)Makefile + .github/workflows/ci.yml: the meta-repo dogfoods the validator. make check-docs runs in CI in warn-only mode against .github/docs/. Surfaces 21 legitimate gaps (this repo wasn't in Phase 0's 7-repo backfill — to be addressed in P1.6) plus 1 real bug: cli-ux-plan.md uses SUMMARY, not in the 23-vocab.
  • Tracker — P1.1/2/3/3b → done; Phase 1 row → in-progress; CI checks #0-4 → done; docs: add phase1-plan.md (org routing layer) #5-8 carved into new row P1.11 (validator-side follow-up).

Out of scope (separate sessions per "one session ↔ one repo" rule):

  • P1.4 / P1.5 — per-repo make check-docs + CI step in each of the 7 tier-1/2 repos
  • P1.6 / P1.7 — lifecycle / owner backfill across 108 docs
  • P1.8 / P1.9 — m-stdlib docs.generated_paths declaration
  • P1.11 — validator §9 checks 5–8 (git-derived field drift, README existence, orphan/dangling refs)

Test plan

  • 13 new TDD cases in profile/build/test_validate_docs.py pass
  • Full suite green: 129/129 (was 116; +13 new)
  • `make check-docs` runs end-to-end against `.github/docs/` — exits 0 in `--warn-only` mode, surfaces 21 expected gaps + 1 real `SUMMARY` bug
  • CI green on this PR (the new `docs frontmatter gate` step is wired warn-only so the existing 21 gaps won't fail the build)

🤖 Generated with Claude Code

Lands rows P1.1, P1.2, P1.3 from the docs-discoverability phases
tracker. Foundation for Phase 1 — schema + validator that the 7
tier-1/2 repos will adopt in their own P1.4/P1.5 sessions.

- profile/docs.schema.json (P1.1): Draft 2020-12 schema for prose-doc
  frontmatter. 23-type doc_type enum + 5-state lifecycle enum +
  6-vocab connections. Two variants (prose vs generated) gated on the
  `generated` field via if/then per spec §5.1.

- profile/repo.meta.schema.json (P1.2): extended with optional
  `docs.generated_paths` array (enables §5.1 exclusion rule). Additive
  change; no schema_compat bump (this schema isn't routing-layer).

- profile/build/validate-docs.py (P1.3): TDD'd validator covering spec
  §9 checks 0-4 — generated-doc bidirectional check (path↔marker),
  frontmatter present, required keys, doc_type enum, lifecycle enum.
  Skips docs/recipes/ (own schema; covered by `recipes-check`).
  --warn-only flag for the Phase 1 rollout.

- Makefile + .github/workflows/ci.yml (P1.3b — bonus self-check): the
  meta-repo dogfoods the validator. `make check-docs` runs in CI in
  warn-only mode against .github/docs/. Surfaces 21 legitimate gaps
  (this repo wasn't in Phase 0's 7-repo backfill — to be addressed in
  P1.6) plus 1 real bug: cli-ux-plan.md uses `SUMMARY`, not in the
  23-vocab.

- docs/docs-discoverability/phases-tracker.md: P1.1/2/3/3b → done;
  Phase 1 row → in-progress; CI checks #0-4 → done; #5-8 carved into
  new row P1.11 (validator-side follow-up).

Tests: 13 new in test_validate_docs.py; full suite 129/129 green.

Out of scope (separate sessions per "one session ↔ one repo" rule):
P1.4/P1.5 (per-repo make + CI in each of the 7 repos), P1.6/P1.7
(lifecycle/owner backfill across 108 docs), P1.8/P1.9 (m-stdlib
generated_paths declaration), P1.11 (validator checks 5-8).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@rafael5 rafael5 merged commit 873b740 into main May 12, 2026
2 checks passed
@rafael5 rafael5 deleted the phase1a-docs-schema branch May 12, 2026 14:10
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