-
Notifications
You must be signed in to change notification settings - Fork 0
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.
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.
Edit, disable, or delete any of these under Settings → Domains.
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 |
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 |
| 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 |
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 |
| 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 |
Each profile picks one merge mode that decides how its tags combine with the builtins:
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).
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, ... */]
}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.
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.
Settings → Domains shows each profile as a card:
- Enable / disable checkbox
-
name(slug — matchessemantic_domain:) -
label(human label) - Merge mode dropdown
-
Keep builtinsfield (only shown forsubsetmode) - 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).
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.
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).
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.
- Tag Taxonomy — the 19 builtins each domain extends
- Settings Reference → Domains
- Public API → domains
- MCP Server → sr_domains_*