Skip to content

fix(P0010): corpus frontmatter cleanup (52 of 58 findings)#220

Merged
klappy merged 1 commit into
mainfrom
fix/p0010-corpus-cleanup
May 28, 2026
Merged

fix(P0010): corpus frontmatter cleanup (52 of 58 findings)#220
klappy merged 1 commit into
mainfrom
fix/p0010-corpus-cleanup

Conversation

@klappy
Copy link
Copy Markdown
Owner

@klappy klappy commented May 28, 2026

P0010 corpus cleanup — 52 of 58 retrieval-readiness findings

Fixes the structural-field drift the retrieval-readiness audit (#219) surfaced, clearing the path for the contract to eventually enforce. 6 findings deliberately left — the about/ pages (tier: 0, kind: unknown) stay flagged because they are slated to move to a separate KB rather than be patched with schema changes. The audit keeps surfacing them as a standing marker of that unfinished split.

Fixes by pattern (37 files)

Pattern Count Fix
fm-missing 11 Added complete frontmatter (READMEs, planning, audit, book-session notes, gauntlet evidence, 5 pre-schema ledger docs)
audience-invalid 20 ledger/handoff/journal/system/backlogodd; agentsdocs; practitionersdocs; humanoperators; internaldocs/apocrypha per role
tier-missing 9 Backfilled from directory convention (odd/* = 3, docs/* = 3)
exposure-missing 6 Backfilled (nav)
audience-missing 4 Backfilled from path
exposure-invalid 2 examples/constraintnav

Verification

  • Existing validate-frontmatter.py still passes on writings/ (41 files, 0 findings) — the hard-block gate is unaffected
  • All edited YAML parses cleanly (0 errors)
  • Retrieval-readiness audit drops 58 → 6 blocking (the 6 remaining are all about/, by design)

What this does NOT do

  • Does not touch about/ — that's the KB-split debt, kept visible
  • Does not change the schema — every fix uses existing valid enum values
  • Does not change stability values flagged informally (out of the audit's scope)

Depends on #219 (the audit) for context but is independently mergeable. Next: once both land, flip the audit to --strict for the knowledge corpus (excluding about/ until the split).


Note

Low Risk
Metadata-only YAML edits using existing enum values; no application code, schema changes, or about/ pages touched.

Overview
This PR normalizes YAML frontmatter across the knowledge corpus so retrieval and future strict audits can rely on consistent audience, tier, and exposure (and related fields) without changing document bodies or the schema.

Eleven files that had no frontmatter now get full blocks (agent READMEs, audits, planning, gauntlet evidence, several odd/ledger entries). Twenty files replace non-schema audience values (internal, handoff, ledger, agents, practitioners, human, system, backlog, etc.) with allowed values—mostly odd for handoffs/ledgers/constraints and docs for agent/orchestrator material; operators for docs/oddkit/WHY.md; apocrypha for Meta-ODD. tier and exposure are backfilled where missing (typically nav and tier 3 per path convention). Invalid exposure values like examples / constraint move to nav.

Per the PR description, six about/ findings stay open on purpose (KB split debt). Existing writings/ frontmatter validation is unchanged.

Reviewed by Cursor Bugbot for commit 8faeab7. Bugbot is set up for automated code reviews on this repo. Configure here.

Resolves 52 of 58 blocking findings from the retrieval-readiness audit.
The remaining 6 are about/ pages (tier:0, kind:unknown) — left flagged
deliberately, as they are slated to move to a separate KB rather than be
addressed with schema changes.

Fixes by pattern:
- 11 fm-missing: added complete frontmatter blocks (READMEs, planning,
  audit, book-session, evidence, and 5 old ledger docs predating the schema)
- 20 audience-invalid: ledger/handoff/journal/system/backlog -> odd;
  agents/practitioners/human/internal -> docs/operators/apocrypha per role
- 9 tier-missing, 6 exposure-missing, 4 audience-missing: backfilled from
  directory convention (odd/* = odd/nav/3; docs/* = docs/nav/3)
- 2 exposure-invalid: examples/constraint -> nav

Verified: existing validate-frontmatter.py still passes on writings/ (41/0);
all edited YAML parses; audit drops 58 -> 6 (about/ only).

Does not touch about/ — that debt stays visible in the audit until the
KB split addresses it.
@github-actions
Copy link
Copy Markdown

Canon Quality — oddkit_audit

No dead klappy:// references or legacy link patterns found in writings/. 42 files scanned.

Spec: klappy://docs/oddkit/specs/oddkit-audit · Workflow: .github/workflows/canon-quality.yml · Run: #177

@github-actions
Copy link
Copy Markdown

Canon Quality — Frontmatter Schema ✅

All 41 file(s) in writings/ conform to klappy://canon/meta/frontmatter-schema.

Validator: scripts/validate-frontmatter.py · Canon: klappy://canon/constraints/frontmatter-validation-before-merge · Run: #177

@klappy klappy merged commit 9225c6c into main May 28, 2026
3 checks passed
@klappy klappy deleted the fix/p0010-corpus-cleanup branch May 28, 2026 14:41
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