Problem statement
frontmatter_validate currently focuses on required-key presence and id/created consistency, plus typed-link diagnostics. This leaves a validation gap for full vault schema rules (field types, enum-allowed values, and schema-level constraints), so invalid metadata can pass validation and later degrade retrieval/filter quality.
Proposed solution
Expand frontmatter_validate from minimal presence checks to full schema validation aligned with vault standards.
- Schema coverage:
- Validate type expectations for core frontmatter fields (string/array/optional constraints).
- Validate enum-allowed values for fields such as
entity, layer, and status.
- Keep existing typed-link diagnostics behavior and modes (
off/warn/error) compatible.
- Diagnostics contract:
- Return structured diagnostics with stable category/code/path/field information.
- Preserve current summary fields while adding schema-specific counts/details.
- Keep default mode safe for existing users (warn-first behavior unless explicitly set to error).
- Standards alignment:
- Use
docs/standards/vault/* as source-of-truth for rule definitions and wording.
- Add/refresh docs so tool behavior and standards examples stay in sync.
- Validation and tests:
- Add unit/integration tests for valid/invalid enum/type cases and mixed-note vault scans.
- Add regression tests to ensure legacy notes with normalization rules are handled predictably.
Constraints / context (optional)
- No automatic write/fix behavior in this issue; validation output only.
- Avoid breaking existing MCP consumers that rely on current response fields.
- Keep performance acceptable for large vault scans.
Problem statement
frontmatter_validatecurrently focuses on required-key presence andid/createdconsistency, plus typed-link diagnostics. This leaves a validation gap for full vault schema rules (field types, enum-allowed values, and schema-level constraints), so invalid metadata can pass validation and later degrade retrieval/filter quality.Proposed solution
Expand
frontmatter_validatefrom minimal presence checks to full schema validation aligned with vault standards.entity,layer, andstatus.off/warn/error) compatible.docs/standards/vault/*as source-of-truth for rule definitions and wording.Constraints / context (optional)