Skip to content

Align obsidian-vault frontmatter schema with obsidian-master-kit - #4

Open
fabiusilva wants to merge 1 commit into
melgarafael:mainfrom
fabiusilva:feat/obsidian-master-kit-frontmatter-schema
Open

Align obsidian-vault frontmatter schema with obsidian-master-kit#4
fabiusilva wants to merge 1 commit into
melgarafael:mainfrom
fabiusilva:feat/obsidian-master-kit-frontmatter-schema

Conversation

@fabiusilva

Copy link
Copy Markdown

Summary

  • mcp-obsidian-vault wrote frontmatter with a bare date field and empty-string defaults (type: "", status: ""), which doesn't match obsidian-master-kit's canonical schema (created/updated/area, status defaulting to "draft"). If a vault is shared between growthOS and obsidian-master-kit, every note growthOS creates gets flagged as a schema mismatch by the librarian skill.
  • Switches _FRONTMATTER_DEFAULTS to created+updated (both set on create, updated refreshed on every update()), defaults area to "ai-memory" (the area obsidian-master-kit reserves for AI-generated content), and defaults status to "draft".
  • Adds an optional area param to the create_note MCP tool so callers can target pessoal/profissional/pesquisa instead of the default.
  • created is now treated as immutable on update() (mirrors the rule obsidian-master-kit's librarian already enforces: a skill that tries to change created gets reverted).
  • Updated the 3 test_vault_ops.py assertions that depended on the old date field / empty-string status default.

Test plan

  • Manually traced all call sites of vault_ops/VaultOperations in the repo — confirmed nothing else programmatically depends on the date field (only this package's own tests).
  • Verified the new create/update/immutable-created behavior with a standalone script exercising VaultOperations directly (sandbox had no pip available to run pytest with real deps installed).
  • Please run pytest mcp-servers/mcp-obsidian-vault/tests/ in an environment with python-frontmatter/fastmcp installed to confirm before merging.

🤖 Generated with Claude Code

Notes written by mcp-obsidian-vault used date/status="" defaults that
don't match obsidian-master-kit's canonical schema (created/updated/
area, status defaulting to "draft"), so any vault shared between the
two tools would have every growthOS-created note flagged as a mismatch
by its librarian. Switches to created+updated, defaults area to
"ai-memory" (overridable via a new area param on create_note), and
makes created immutable on update the same way the librarian enforces
it.
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