Skip to content

feat: expand frontmatter_validate to full vault schema validation #168

Description

@maehwasoo

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

coreCore packageenhancementNew feature or requestmcpMCP server

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions