Skip to content

Domain Profiles

David edited this page May 31, 2026 · 1 revision

Domain Profiles

Reading code, scripture, science papers, and meeting notes all need different anchors. The 19 built-in tags are general-purpose; domain profiles swap in a specialized toolkit per note.

Activating a profile

Add semantic_domain: to a note's frontmatter:

---
semantic_domain: programming
---

That's it. Open the note: the tagbar now surfaces Fn (function), Cls (class), Algo, Bug, Perf, API, Pat, DS alongside the builtins. Switch to a note without semantic_domain: and you're back to the 19 builtins.

The switch is reactive — change frontmatter, the tagbar updates immediately via metadataCache.changed.

The 5 starter profiles

Edit, disable, or delete any of these under Settings → Domains.

programmingadd mode

Stacks on top of the 19 builtins.

Sigil Name Captures
Fn Function a function / procedure
Cls Class class / type / module
Algo Algorithm algorithm or method
Bug Bug known defect or footgun
Perf Performance performance characteristic
API API public interface / endpoint
Pat Pattern design pattern / idiom
DS Data structure a data structure

biblesubset mode

Keeps only Def, Q, R, N, P from the builtins and adds:

Sigil Name Captures
Vrs Verse scripture reference (book ch:vs)
Cmd Command imperative — what to do
Prom Promise a promise / blessing
Cov Covenant covenant / treaty / oath
Prph Prophecy prophetic statement
Typ Typology type/antitype foreshadowing
Char Character biblical figure

scienceadd mode

Sigil Name Captures
Hyp Hypothesis a testable claim
Var Variable a measured quantity
Exp Experiment experimental procedure
Res Result empirical finding
Lit Literature citation / prior work
Stt Statistic numerical signal

legalsubset mode

Keeps Def, R, Q, A and adds:

Sigil Name Captures
Stt Statute code / regulation reference
Hold Holding court's binding decision
Dict Dicta non-binding court commentary
Prec Precedent prior case relied on
Cls Clause contract / statute clause
Rule Rule legal rule extracted from case

meetingadd mode

Sigil Name Captures
Dec Decision a decision taken
Own Owner responsible person
Rsk Risk identified risk
Blk Blocker what's blocking progress
MS Milestone scheduled milestone

Merge modes

Each profile picks one merge mode that decides how its tags combine with the builtins:

add

Builtins stay + universal custom tags stay + this profile's tags layered on top. Use when domain tags augment the general taxonomy (programming, science, meeting all default to add).

subset

Drop most builtins; keep only the sigils listed in keepBuiltins; add this profile's tags. Use when the domain has a sharp focus and you want a clean palette without noise (bible, legal).

{
  mergeMode: 'subset',
  keepBuiltins: ['Def', 'Q', 'R', 'N', 'P'],
  tags: [/* Vrs, Cmd, Prom, ... */]
}

replace

Drop all builtins. Only the profile's tags are active. Use when the domain has its own complete taxonomy and the builtins would just confuse readers of those notes.

Default reading mode per domain

Optional defaultMode: 1..5 field on a profile. When set, opening any note in that domain uses this mode as the tagbar default — unless the note itself has semantic_mode: set, which always wins.

Editing profiles in settings

Settings → Domains shows each profile as a card:

  • Enable / disable checkbox
  • name (slug — matches semantic_domain:)
  • label (human label)
  • Merge mode dropdown
  • Keep builtins field (only shown for subset mode)
  • Default reading mode (optional)
  • Inline tag editor — same row layout as Custom tags: sigil, name, family, description, light/dark colors, key binding, modes

Buttons at the bottom: + Add domain profile and Reset to presets (overwrites your edits).

Querying domains

From your own code or another plugin:

const sr = app.plugins.plugins['semantic-reading']?.api;

// Every configured profile (including disabled ones)
sr.domains.list();

// Active profile for a specific note path
sr.domains.forNote('wiki/programming/closures.md');
// → { name: 'programming', label: 'Programming', mergeMode: 'add', tags: [...] }

// Effective TAGS dictionary for a note (respects mergeMode)
sr.domains.tagsFor('wiki/programming/closures.md');
// → { Def: {...}, Q: {...}, Fn: {...}, Cls: {...}, ... }

The same surface is available over MCP — see sr_domains_list and sr_domains_for_note.

Tag-name collisions across domains

Cls is a programming class and a legal contract clause. Stt is a science statistic and a legal statute. That's fine — only one domain is active per note, so the meaning is unambiguous in context. Across notes, the tag counts and Atlas just lump them by sigil. If you want strict separation, use distinct sigils (e.g. LCls vs PCls).

When a domain isn't enough

If you find yourself tagging the same way across many domains, promote that tag to a vault-wide custom tag (Settings → Custom tags). Custom tags coexist with every domain in add mode and become part of the canonical set.

See also

Clone this wiki locally