Template Pipeline
Templates define both the structure of a note and the rules it has to follow. They load from a registry, apply at workspace or note scope, and enforce their anchors in the editor; edited variants can be saved back to the template library.
Template Sources
| Source | What it is |
|---|---|
| built in templates | Templates shipped with the app |
| user templates | Templates saved in versioned local storage |
| workspace template | Default template selected for the current workspace session |
| local note template | A local override of the template anchor set |
Pipeline Steps
- Select template: load the structure and its anchor and field definitions.
- Bind field values: resolve
SELECT,MULTISELECT, andDYNAMIC_SELECTinputs and insert them at their anchors. - Run agent transforms: agents propose edits against the bound document.
- Validate locked regions: any proposed change that overlaps a locked anchor is dropped before it reaches the review queue.
- Queue pending edits: remaining suggestions wait for the user to accept or reject them.
Global vs Local Template Modes
| Mode | What it is |
|---|---|
global | The note follows a shared template definition |
local | The note stores its own anchor list and optional custom name |
Local mode is useful when a note needs custom headings but you do not want to change the shared template for every future note.
Template Inference
Template state can be inferred from the note content itself. If the note headings match a known template anchor sequence, the app attaches that template state. If headings no longer match, it clears or replaces the template association.
Template Editor
The template editor supports two formats:
| Format | What it is |
|---|---|
natural | Template content with readable headings |
smartphrase | SmartPhrase content with a reusable trigger |
When you save template edits, you can:
- overwrite the current template
- save a new template
- store SmartPhrase metadata alongside the template
- save the SmartPhrase into the SmartPhrase registry