Note Properties / Frontmatter Validation
Add support for YAML frontmatter parsing, validation, and indexing for note metadata (properties).
YAML Frontmatter Support
Parse standard Obsidian-compatible frontmatter:
---
title: My Note
aliases: [MN, My-Note]
tags: [reference, documentation]
created: 2026-05-25T10:00:00
updated: 2026-05-25T11:30:00
category: technical
status: draft
custom_field: value
---
Schema Validation
Use the existing SchemaValidator from src/infra/schema_validation.rs with a JSON Schema for frontmatter validation:
{
"type": "object",
"properties": {
"title": { "type": "string", "maxLength": 200 },
"aliases": { "type": "array", "items": { "type": "string" } },
"tags": { "type": "array", "items": { "type": "string" } },
"created": { "type": "string", "format": "date-time" },
"updated": { "type": "string", "format": "date-time" },
"category": { "type": "string", "enum": ["technical", "personal", "project", "reference"] }
}
}
Frontmatter Index
Store frontmatter fields in indexed column families for searchability:
cf "fm":
fm:title:{title} -> [note_path1, note_path2]
fm:category:{category} -> [note_path1, note_path2]
fm:status:{status} -> [note_path1, note_path2]
fm:created:{timestamp}:{path} -> "" (sorted by creation date)
fm:updated:{timestamp}:{path} -> "" (sorted by update date)
Queries Enabled by Frontmatter Index
GET /notes?category=technical — Filter by category
GET /notes?status=draft — Filter by status
GET /notes?sort=created&order=desc — Sort by creation date
GET /notes?sort=updated&order=desc — Sort by last update
GET /notes?since=2026-01-01 — Notes created after date
API Extensions
// PUT /notes/{path} — updated body
{
"content": "# Note content...",
"frontmatter": {
"title": "My Note",
"tags": ["reference"],
"category": "technical",
"status": "draft"
}
}
// GET /notes/{path} — now includes parsed frontmatter
{
"path": "my-note",
"content": "# Note content...",
"frontmatter": { ... },
"properties": {
"title": "My Note",
"tags": ["reference"],
"category": "technical",
"status": "draft",
"created": "2026-05-25T10:00:00Z",
"updated": "2026-05-25T11:30:00Z"
}
}
Acceptance Criteria
Parent Epic
#275
Note Properties / Frontmatter Validation
Add support for YAML frontmatter parsing, validation, and indexing for note metadata (properties).
YAML Frontmatter Support
Parse standard Obsidian-compatible frontmatter:
Schema Validation
Use the existing
SchemaValidatorfromsrc/infra/schema_validation.rswith a JSON Schema for frontmatter validation:{ "type": "object", "properties": { "title": { "type": "string", "maxLength": 200 }, "aliases": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "type": "string" } }, "created": { "type": "string", "format": "date-time" }, "updated": { "type": "string", "format": "date-time" }, "category": { "type": "string", "enum": ["technical", "personal", "project", "reference"] } } }Frontmatter Index
Store frontmatter fields in indexed column families for searchability:
Queries Enabled by Frontmatter Index
GET /notes?category=technical— Filter by categoryGET /notes?status=draft— Filter by statusGET /notes?sort=created&order=desc— Sort by creation dateGET /notes?sort=updated&order=desc— Sort by last updateGET /notes?since=2026-01-01— Notes created after dateAPI Extensions
Acceptance Criteria
Parent Epic
#275