Skip to Content
WorkflowsTemplate Pipeline

Template Pipeline

Templates define both the structure of a note and the rules it has to follow. Rosetta loads templates from a registry, applies them at workspace or note scope, enforces anchors in the editor, and can save edited variants back to the template library.

Template Sources

SourceWhat it contains
built in templatesTemplates shipped with the app
user templatesTemplates saved in versioned local storage
workspace templateDefault template selected for the current workspace session
local note templateA local override of the template anchor set

Apply Order

Template application resolves in this order:

  1. load the template registry
  2. choose the workspace default
  3. open the note
  4. resolve shared or local template mode
  5. render anchors and fields
  6. enforce lock rules

Pipeline Steps

  1. Select template: load the structure and its anchor and field definitions.
  2. Bind field values: resolve SELECT, MULTISELECT, and DYNAMIC_SELECT inputs and insert them at their anchors.
  3. Run agent transforms: agents propose edits against the bound document.
  4. Validate locked regions: any proposed change that overlaps a locked anchor is dropped before it reaches the review queue.
  5. Queue pending edits: remaining suggestions wait for the user to accept or reject them.

Global Vs Local Template Modes

ModeWhat it means
globalThe note follows a shared template definition
localThe 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

Rosetta can infer template state from the note content itself. If the note headings match a known template anchor sequence, the app can attach that template state. If headings no longer match, the app can clear or replace the template association.

This keeps template behavior aligned with the actual note text.

Template Editor

The template editor supports two formats:

FormatWhat Rosetta stores
naturalTemplate content with readable headings
smartphraseSmartPhrase content with a reusable trigger

When you save template edits, Rosetta can:

  • overwrite the current template
  • save a new template
  • store SmartPhrase metadata alongside the template
  • save the SmartPhrase into the SmartPhrase registry

Structured Fields

Templates can include field metadata such as:

  • text
  • select
  • multiselect
  • dynamic_select

These fields are rendered by the editor and can be extended while editing a template.

Guardrails

  • Agents cannot write to locked regions at any step.
  • Required fields are checked at export. You can fill sections in any order.

Promotion Path

Rosetta supports a practical upgrade path:

  1. start with a shared template
  2. customize one note locally
  3. save the local template as a reusable global template later

That is the main reason the app distinguishes between global template state and local note template overrides.

Last updated on