Note types
A note’s type is a field in its frontmatter, type unless the settings
name another. Its folder does not decide it: a folder may hold several
types, and a type may live in several places.
A type file
Each type is a Markdown file in .vault/types/, settings above, the
template below. Acme’s .vault/types/decision.md:
---
places:
- "active/{project:slug}/decisions/{title:slug}.md"
frontmatter:
type: object
properties:
title:
type: string
description: The decision, in one line.
decided_by:
type: string
description: Who made it.
decided_on:
type: string
description: When, as YYYY-MM-DD.
required:
- title
- decided_by
- decided_on
---
# {title}
{body}
placesare the paths the type may have. A placeholder such as{title:slug}says both how a path is matched and how a new one is built:create_notebuilds the path from the first place.frontmatteris a JSON Schema for the note’s frontmatter.- The body is the template a new note starts from.
What the basic tools do with types
create_notetakes a type, builds the path, checks the frontmatter and fills the template. A repository may name adefaultTypefor a call that gives none.edit_notemay change a note’s type when its place fits the new one.move_noterefuses a target its type does not allow, and names the allowed places. Given a newtype, it changes both in one call.list_notesshows each note’s type and summary.
Only the change is checked. A call is refused for what it would break itself; older problems are reported, and never block a write.
Unknown and missing types
A note without a type is a hint, or an error where untyped says so. An
unknown type is always a warning. Paths in exempt follow no type rule at
all.