oh-my-second-brain 0.8.3 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +2 -1
- package/.codex-plugin/plugin.json +1 -1
- package/CHANGELOG-assets.md +9 -1
- package/CHANGELOG-cli.md +9 -0
- package/CHANGELOG-kernel.md +11 -0
- package/CHANGELOG-mcp.md +10 -0
- package/CHANGELOG-vendors.md +8 -0
- package/CHANGELOG.md +13 -1
- package/README.ko.md +34 -100
- package/README.md +35 -101
- package/assets/claude/CLAUDE.md +16 -20
- package/assets/codex/AGENTS.md +14 -9
- package/assets/codex/rules/oms.md +11 -12
- package/assets/hermes/SOUL.md +11 -13
- package/assets/hermes-manifest.json +1 -1
- package/assets/skills/doctor/SKILL.md +10 -9
- package/assets/skills/search/SKILL.md +9 -20
- package/assets/skills/status/SKILL.md +3 -9
- package/assets/skills/template/SKILL.md +29 -0
- package/assets/skills/write/SKILL.md +20 -14
- package/core/AGENTS.md +41 -104
- package/dist/cli/args.d.ts +3 -2
- package/dist/cli/args.js +31 -17
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/audit.d.ts +0 -1
- package/dist/cli/audit.js +45 -80
- package/dist/cli/audit.js.map +1 -1
- package/dist/cli/doctor-lint.d.ts +1 -1
- package/dist/cli/doctor-lint.js +23 -65
- package/dist/cli/doctor-lint.js.map +1 -1
- package/dist/cli/host-commands.d.ts +7 -7
- package/dist/cli/host-commands.js +102 -25
- package/dist/cli/host-commands.js.map +1 -1
- package/dist/cli/linkify.d.ts +2 -3
- package/dist/cli/linkify.js +9 -9
- package/dist/cli/linkify.js.map +1 -1
- package/dist/cli/oms.js +15 -19
- package/dist/cli/oms.js.map +1 -1
- package/dist/cli/setup-command.d.ts +4 -9
- package/dist/cli/setup-command.js +28 -132
- package/dist/cli/setup-command.js.map +1 -1
- package/dist/cli/usage.js +24 -11
- package/dist/cli/usage.js.map +1 -1
- package/dist/kernel/capture/safe.d.ts +43 -97
- package/dist/kernel/capture/safe.js +288 -517
- package/dist/kernel/capture/safe.js.map +1 -1
- package/dist/kernel/contracts/index.d.ts +3 -138
- package/dist/kernel/contracts/index.js +22 -340
- package/dist/kernel/contracts/index.js.map +1 -1
- package/dist/kernel/conventions/frontmatter.js +5 -4
- package/dist/kernel/conventions/frontmatter.js.map +1 -1
- package/dist/kernel/conventions/lint.js +4 -1
- package/dist/kernel/conventions/lint.js.map +1 -1
- package/dist/kernel/conventions/note-exclude.d.ts +9 -2
- package/dist/kernel/conventions/note-exclude.js +105 -14
- package/dist/kernel/conventions/note-exclude.js.map +1 -1
- package/dist/kernel/conventions/report.d.ts +0 -51
- package/dist/kernel/conventions/report.js +36 -204
- package/dist/kernel/conventions/report.js.map +1 -1
- package/dist/kernel/conventions/write-contract.d.ts +11 -25
- package/dist/kernel/conventions/write-contract.js +42 -78
- package/dist/kernel/conventions/write-contract.js.map +1 -1
- package/dist/kernel/conventions/write-protocol.d.ts +1 -10
- package/dist/kernel/conventions/write-protocol.js +1 -1
- package/dist/kernel/conventions/write-protocol.js.map +1 -1
- package/dist/kernel/doctor/service.d.ts +2 -4
- package/dist/kernel/doctor/service.js +12 -12
- package/dist/kernel/doctor/service.js.map +1 -1
- package/dist/kernel/engine/axes/store.js +3 -3
- package/dist/kernel/engine/axes/store.js.map +1 -1
- package/dist/kernel/engine/embed/sync.js +12 -6
- package/dist/kernel/engine/embed/sync.js.map +1 -1
- package/dist/kernel/engine/graph/builder.d.ts +19 -64
- package/dist/kernel/engine/graph/builder.js +241 -461
- package/dist/kernel/engine/graph/builder.js.map +1 -1
- package/dist/kernel/engine/graph/explore.d.ts +4 -4
- package/dist/kernel/engine/graph/explore.js +0 -0
- package/dist/kernel/engine/graph/explore.js.map +1 -1
- package/dist/kernel/engine/graph/node.d.ts +29 -93
- package/dist/kernel/engine/graph/node.js +87 -234
- package/dist/kernel/engine/graph/node.js.map +1 -1
- package/dist/kernel/engine/linkify/suggest.d.ts +0 -9
- package/dist/kernel/engine/linkify/suggest.js +0 -11
- package/dist/kernel/engine/linkify/suggest.js.map +1 -1
- package/dist/kernel/engine/linkify/types.d.ts +1 -3
- package/dist/kernel/engine/mcp/facade.d.ts +3 -3
- package/dist/kernel/engine/mcp/facade.js +95 -327
- package/dist/kernel/engine/mcp/facade.js.map +1 -1
- package/dist/kernel/engine/mcp/types.d.ts +2 -2
- package/dist/kernel/engine/tracer.js +7 -3
- package/dist/kernel/engine/tracer.js.map +1 -1
- package/dist/kernel/graph/cache.d.ts +1 -84
- package/dist/kernel/graph/cache.js +5 -438
- package/dist/kernel/graph/cache.js.map +1 -1
- package/dist/kernel/graph/explore.d.ts +32 -24
- package/dist/kernel/graph/explore.js +32 -101
- package/dist/kernel/graph/explore.js.map +1 -1
- package/dist/kernel/harness/surface-registry.js +9 -7
- package/dist/kernel/harness/surface-registry.js.map +1 -1
- package/dist/kernel/index.d.ts +0 -4
- package/dist/kernel/index.js +0 -4
- package/dist/kernel/index.js.map +1 -1
- package/dist/kernel/install/hosts.d.ts +1 -0
- package/dist/kernel/install/hosts.js +1 -0
- package/dist/kernel/install/hosts.js.map +1 -1
- package/dist/kernel/install/pointer.d.ts +28 -0
- package/dist/kernel/install/pointer.js +232 -0
- package/dist/kernel/install/pointer.js.map +1 -0
- package/dist/kernel/link/link.d.ts +4 -2
- package/dist/kernel/link/link.js +6 -4
- package/dist/kernel/link/link.js.map +1 -1
- package/dist/kernel/link/workflow.d.ts +17 -7
- package/dist/kernel/link/workflow.js +66 -56
- package/dist/kernel/link/workflow.js.map +1 -1
- package/dist/kernel/runtime/assets.d.ts +3 -14
- package/dist/kernel/runtime/assets.js +9 -37
- package/dist/kernel/runtime/assets.js.map +1 -1
- package/dist/kernel/search/morning-test-fixtures.js +22 -27
- package/dist/kernel/search/morning-test-fixtures.js.map +1 -1
- package/dist/kernel/setup/documents.d.ts +25 -14
- package/dist/kernel/setup/documents.js +10 -111
- package/dist/kernel/setup/documents.js.map +1 -1
- package/dist/kernel/setup/service.d.ts +16 -35
- package/dist/kernel/setup/service.js +16 -91
- package/dist/kernel/setup/service.js.map +1 -1
- package/dist/kernel/templates/axes.d.ts +29 -0
- package/dist/kernel/templates/axes.js +45 -0
- package/dist/kernel/templates/axes.js.map +1 -0
- package/dist/kernel/templates/canonical.d.ts +8 -0
- package/dist/kernel/templates/canonical.js +193 -0
- package/dist/kernel/templates/canonical.js.map +1 -0
- package/dist/kernel/templates/defaults.d.ts +17 -0
- package/dist/kernel/templates/defaults.js +127 -0
- package/dist/kernel/templates/defaults.js.map +1 -0
- package/dist/kernel/templates/doctor.d.ts +40 -0
- package/dist/kernel/templates/doctor.js +226 -0
- package/dist/kernel/templates/doctor.js.map +1 -0
- package/dist/kernel/templates/extract.d.ts +31 -0
- package/dist/kernel/templates/extract.js +136 -0
- package/dist/kernel/templates/extract.js.map +1 -0
- package/dist/kernel/templates/index.d.ts +19 -0
- package/dist/kernel/templates/index.js +11 -0
- package/dist/kernel/templates/index.js.map +1 -0
- package/dist/kernel/templates/migration.d.ts +63 -0
- package/dist/kernel/templates/migration.js +733 -0
- package/dist/kernel/templates/migration.js.map +1 -0
- package/dist/kernel/templates/naming.d.ts +10 -0
- package/dist/kernel/templates/naming.js +47 -0
- package/dist/kernel/templates/naming.js.map +1 -0
- package/dist/kernel/templates/note-index.d.ts +33 -0
- package/dist/kernel/templates/note-index.js +125 -0
- package/dist/kernel/templates/note-index.js.map +1 -0
- package/dist/kernel/templates/paths.d.ts +29 -0
- package/dist/kernel/templates/paths.js +132 -0
- package/dist/kernel/templates/paths.js.map +1 -0
- package/dist/kernel/templates/policy.d.ts +59 -0
- package/dist/kernel/templates/policy.js +308 -0
- package/dist/kernel/templates/policy.js.map +1 -0
- package/dist/kernel/templates/resolver.d.ts +18 -0
- package/dist/kernel/templates/resolver.js +598 -0
- package/dist/kernel/templates/resolver.js.map +1 -0
- package/dist/kernel/templates/transaction.d.ts +8 -0
- package/dist/kernel/templates/transaction.js +452 -0
- package/dist/kernel/templates/transaction.js.map +1 -0
- package/dist/kernel/templates/types.d.ts +368 -0
- package/dist/kernel/{ontology → templates}/types.js.map +1 -1
- package/dist/kernel/update/update.js +1 -1
- package/dist/kernel/update/update.js.map +1 -1
- package/dist/mcp/link-tools.d.ts +3 -4
- package/dist/mcp/link-tools.js +3 -18
- package/dist/mcp/link-tools.js.map +1 -1
- package/dist/mcp/server.js +383 -219
- package/dist/mcp/server.js.map +1 -1
- package/dist/vendors/claude/claude-hooks.js +24 -6
- package/dist/vendors/claude/claude-hooks.js.map +1 -1
- package/dist/vendors/claude/hook/post-tool-use.d.ts +2 -11
- package/dist/vendors/claude/hook/post-tool-use.js +48 -81
- package/dist/vendors/claude/hook/post-tool-use.js.map +1 -1
- package/docs/architecture.md +45 -0
- package/docs/conventions.md +64 -0
- package/docs/install.md +41 -141
- package/docs/verified-target.md +41 -0
- package/package.json +5 -3
- package/core/ontology/concepts/inbox.yaml +0 -4
- package/core/ontology/concepts/literature.yaml +0 -27
- package/core/ontology/concepts/term.yaml +0 -12
- package/core/ontology/schemas/README.md +0 -55
- package/core/ontology/schemas/concept.schema.yaml +0 -70
- package/core/ontology/schemas/note.schema.yaml +0 -40
- package/core/ontology/taxonomy.yaml +0 -14
- package/dist/kernel/conventions/validate.d.ts +0 -24
- package/dist/kernel/conventions/validate.js +0 -88
- package/dist/kernel/conventions/validate.js.map +0 -1
- package/dist/kernel/engine/conventions/vault-lint.d.ts +0 -112
- package/dist/kernel/engine/conventions/vault-lint.js +0 -213
- package/dist/kernel/engine/conventions/vault-lint.js.map +0 -1
- package/dist/kernel/engine/linkify/apply.d.ts +0 -56
- package/dist/kernel/engine/linkify/apply.js +0 -65
- package/dist/kernel/engine/linkify/apply.js.map +0 -1
- package/dist/kernel/ontology/active.d.ts +0 -7
- package/dist/kernel/ontology/active.js +0 -41
- package/dist/kernel/ontology/active.js.map +0 -1
- package/dist/kernel/ontology/loader.d.ts +0 -2
- package/dist/kernel/ontology/loader.js +0 -54
- package/dist/kernel/ontology/loader.js.map +0 -1
- package/dist/kernel/ontology/resolver.d.ts +0 -2
- package/dist/kernel/ontology/resolver.js +0 -23
- package/dist/kernel/ontology/resolver.js.map +0 -1
- package/dist/kernel/ontology/types.d.ts +0 -47
- package/dist/kernel/setup/axis.d.ts +0 -36
- package/dist/kernel/setup/axis.js +0 -232
- package/dist/kernel/setup/axis.js.map +0 -1
- /package/dist/kernel/{ontology → templates}/types.js +0 -0
|
@@ -1,25 +1,24 @@
|
|
|
1
1
|
# Oh My Second Brain for Codex
|
|
2
2
|
|
|
3
|
-
Use Oh My Second Brain
|
|
3
|
+
Use Oh My Second Brain for an Obsidian/Markdown vault governed by user-owned template controls in `.oms/`.
|
|
4
4
|
|
|
5
5
|
## Core rule
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Actual Obsidian Markdown templates own note shape and body scaffolding. The user-owned ontology remains active: template policy records note/field meaning and policy, while taxonomy records folder/link meaning and placement. `.obsidian/types.json` is read-only type authority; `.oms/types.json` is derived and must never be hand-edited.
|
|
8
8
|
|
|
9
9
|
## Command mapping
|
|
10
10
|
|
|
11
|
-
| User intent | Preferred
|
|
11
|
+
| User intent | Preferred surface |
|
|
12
12
|
|---|---|
|
|
13
|
-
| adopt
|
|
13
|
+
| inspect and adopt templates | `oms setup --vault <path> --dry-run`, then `--yes --approved-digest <digest>` |
|
|
14
14
|
| install host integration | `oms install --runtime codex --vault <path> --yes` |
|
|
15
|
-
|
|
|
16
|
-
|
|
|
17
|
-
|
|
|
18
|
-
| retrieve knowledge | use `$oms-search` / MCP `oms_search`, loading full notes only when needed |
|
|
15
|
+
| diagnose or repair | `$oms-doctor` or `oms doctor --vault <path>` |
|
|
16
|
+
| write a note | `$oms-write` / MCP `oms_write` with a stable `templateId` |
|
|
17
|
+
| retrieve knowledge | `$oms-search` / MCP `oms_search`; discover IDs with `op: "templates"` |
|
|
19
18
|
|
|
20
19
|
## Safety
|
|
21
20
|
|
|
22
|
-
- Never delete vault notes or
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
21
|
+
- Never delete vault notes or `.oms/` during uninstall.
|
|
22
|
+
- Never use direct file tools for vault notes or managed templates.
|
|
23
|
+
- Never invent required values or self-approve a repair digest.
|
|
24
|
+
- `status` and search are read-only; mutation requires a verified target.
|
package/assets/hermes/SOUL.md
CHANGED
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
# Oh My Second Brain
|
|
1
|
+
# Oh My Second Brain — Hermes
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
This vault uses user-owned template conventions in `.oms/`.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Before vault work:
|
|
6
|
+
- Actual Obsidian `.md` templates own note shape and body scaffolding.
|
|
7
|
+
- `.obsidian/types.json` is read-only type authority.
|
|
8
|
+
- The user-owned ontology remains active: `.oms/template-policy.json` records note/field meaning and policy; `.oms/taxonomy.yaml` records folder/link meaning and placement.
|
|
9
|
+
- `.oms/types.json` is derived and must never be hand-edited.
|
|
10
|
+
- Humans and agents use identical stable `templateId` rules.
|
|
6
11
|
|
|
7
|
-
|
|
12
|
+
**Write:** Use the `write` skill and MCP `oms_write`; never direct file tools for vault notes or managed templates. Notes use `op: "note"`. Template changes use `op: "template"`, dry-run first, then exact reviewed `approvalDigest`.
|
|
8
13
|
|
|
9
|
-
**
|
|
10
|
-
- Run `oms doctor` to validate notes against the convention (exits 0, non-blocking).
|
|
11
|
-
- Read `.oms/taxonomy.yaml` for folder-to-concept bindings.
|
|
12
|
-
- Read `.oms/concepts/*.yaml` for field declarations and lenses.
|
|
14
|
+
**Retrieve:** Use `search`, discover IDs through `op: "templates"`, and filter by template, declared fields, folder, or links.
|
|
13
15
|
|
|
14
|
-
**
|
|
15
|
-
|
|
16
|
-
**Retrieve:** Use the `search` skill or follow the retriever persona — identify purpose, match lens, project lens fields only.
|
|
17
|
-
|
|
18
|
-
> **v0 native install:** `oms install --runtime hermes` installs the `write`, `search`, `link`, `distill`, `status`, and `doctor` skills and registers Oh My Second Brain MCP in `~/.hermes/config.yaml`. Use Oh My Second Brain MCP tools for vault operations and CLI commands for lifecycle.
|
|
16
|
+
**Maintain:** `status` is read-only. `doctor` diagnoses and performs explicit repairs. Hermes installs the same seven write, search, link, distill, status, doctor, and tool-less template skills.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oms",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "Oh My Second Brain convention layer for Obsidian vaults — Hermes skill bundle and MCP adapter.",
|
|
5
5
|
"_note": "oms install writes ~/.hermes/config.yaml mcp_servers.oms and installs skills under ~/.hermes/skills/knowledge-management/oms/."
|
|
6
6
|
}
|
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: doctor
|
|
3
|
-
description: Diagnose
|
|
3
|
+
description: Diagnose template authority and index problems, then run explicit repairs.
|
|
4
4
|
mcp_tool: oms_doctor
|
|
5
5
|
mcp_args:
|
|
6
|
-
op: "
|
|
6
|
+
op: "validate"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# doctor
|
|
10
10
|
|
|
11
|
-
Diagnose vault
|
|
12
|
-
|
|
13
|
-
## Use when
|
|
14
|
-
|
|
15
|
-
Use this skill when a vault has convention violations, an unhealthy graph or semantic index, or stale generated state that needs correction. Use `status` instead when inspection alone is required.
|
|
11
|
+
Diagnose vault template and derived-index state, then run only the named repair.
|
|
16
12
|
|
|
17
13
|
## Usage
|
|
18
14
|
|
|
19
15
|
```text
|
|
20
|
-
/doctor <audit|
|
|
16
|
+
/doctor <validate|regenerate-types|backfill-defaults|audit|build-graph|cleanup|sync-embeddings>
|
|
21
17
|
```
|
|
22
18
|
|
|
23
|
-
|
|
19
|
+
- `validate` is read-only. It reports policy/projection/source-signature drift, migration marker state, managed source exclusions, and unresolved legacy notes.
|
|
20
|
+
- `regenerate-types` recomputes the derived `.oms/types.json` from actual templates, policy, taxonomy, and read-only Obsidian types.
|
|
21
|
+
- `backfill-defaults` updates exactly one explicit note with stable template identity while preserving unrelated frontmatter and body bytes.
|
|
22
|
+
- `build-graph`, `cleanup`, and `sync-embeddings` repair derived indexes.
|
|
23
|
+
|
|
24
|
+
Every note/control repair requires a verified target. Run a dry-run, review the receipt, then submit its exact `approvalDigest`; never self-approve or repair all notes implicitly.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: search
|
|
3
|
-
description: Retrieve vault knowledge through
|
|
3
|
+
description: Retrieve vault knowledge through resolved template axes.
|
|
4
4
|
aliases: [retrieve]
|
|
5
5
|
mcp_tool: oms_search
|
|
6
6
|
mcp_args:
|
|
@@ -10,11 +10,7 @@ mcp_args:
|
|
|
10
10
|
|
|
11
11
|
# search
|
|
12
12
|
|
|
13
|
-
Retrieve
|
|
14
|
-
|
|
15
|
-
## Use when
|
|
16
|
-
|
|
17
|
-
Use this skill to find and assemble relevant vault knowledge without changing the vault.
|
|
13
|
+
Retrieve vault knowledge without changing the vault.
|
|
18
14
|
|
|
19
15
|
## Usage
|
|
20
16
|
|
|
@@ -22,20 +18,13 @@ Use this skill to find and assemble relevant vault knowledge without changing th
|
|
|
22
18
|
/search <query>
|
|
23
19
|
```
|
|
24
20
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
## Axes
|
|
28
|
-
|
|
29
|
-
`query` scores text, so it reaches a note only where the words are actually written. A request that names a kind — a person, a meeting, a project — belongs on an axis instead: an entity note is titled with its subject and then seldom repeats it, which is precisely what text scoring cannot find.
|
|
30
|
-
|
|
31
|
-
Put the request on an axis whenever it names a kind, a declared property, or a relationship:
|
|
32
|
-
|
|
33
|
-
- `axes.field.<key>` filters on a frontmatter property declared by the vault contract. The value may be a scalar, a list of scalars (matching any of them), or a predicate object — `in`, `contains`, `containsAll`, `between`, `gte`/`gt`/`lte`/`lt`, `from`/`to`.
|
|
34
|
-
- `axes.folder` scopes to a top-level folder. It takes the folder's own name, not the concept name derived from it.
|
|
35
|
-
- `axes.link` follows the wikilink graph to reach the notes that reference an entity rather than the one describing it. It matches on filename alone: a bare title is enough, and a surrounding folder path or `.md` extension is ignored rather than narrowing the match.
|
|
21
|
+
Plain `query` is projection-independent lexical retrieval and remains available when no embedding provider is configured. Template-managed source files are never returned as notes.
|
|
36
22
|
|
|
37
|
-
|
|
23
|
+
Use `oms_search { op: "templates" }` to discover stable template IDs and declared axes. Typed queries use the same derived projection as writes:
|
|
38
24
|
|
|
39
|
-
|
|
25
|
+
- `axes.template` selects one stable template identity.
|
|
26
|
+
- `axes.field.<key>` filters a field declared by that template; values may be scalars, scalar lists, or supported predicate objects.
|
|
27
|
+
- `axes.folder` scopes physical placement.
|
|
28
|
+
- `axes.link` follows observed wikilinks.
|
|
40
29
|
|
|
41
|
-
|
|
30
|
+
Axes intersect. They require a current `.oms/types.json` projection and fail loudly on an undeclared field or stale signature; remove the typed axis or run template diagnosis rather than guessing. Vector or HyDE retrieval also fails loudly without configured embedding provider and model.
|
|
@@ -1,22 +1,16 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: status
|
|
3
|
-
description: Report read-only
|
|
3
|
+
description: Report read-only template, graph, and semantic-index health.
|
|
4
4
|
mcp_tool: oms_status
|
|
5
5
|
mcp_args: {}
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# status
|
|
9
9
|
|
|
10
|
-
Report
|
|
11
|
-
|
|
12
|
-
## Use when
|
|
13
|
-
|
|
14
|
-
Use this skill to inspect vault health and statistics before deciding whether maintenance is needed.
|
|
15
|
-
|
|
16
|
-
## Usage
|
|
10
|
+
Report vault health without changing files.
|
|
17
11
|
|
|
18
12
|
```text
|
|
19
13
|
/status
|
|
20
14
|
```
|
|
21
15
|
|
|
22
|
-
|
|
16
|
+
Show resolved template count, current projection/input signature, managed template-source exclusions, template diagnosis state, and graph/semantic-index availability. A malformed or missing projection is reported as invalid with an actionable doctor operation. Status never regenerates controls, rebuilds caches, repairs notes, or writes the vault.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: template
|
|
3
|
+
description: Design, migrate, and safely apply vault-resident Obsidian templates through the derived OMS contract.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# template
|
|
7
|
+
|
|
8
|
+
Turn the user's natural-language note design into an actual Obsidian Markdown template and the smallest matching policy change. People and agents follow the same template contract; never introduce personas.
|
|
9
|
+
|
|
10
|
+
## Authority
|
|
11
|
+
|
|
12
|
+
- The actual `.md` template owns frontmatter order/default scaffolding and body shape.
|
|
13
|
+
- `.obsidian/types.json` is read-only property-type authority.
|
|
14
|
+
- The user-owned ontology remains active: `.oms/template-policy.json` owns note/field `intent` plus BaseContract inheritance, requiredness, formats, allowed values, naming, stable identity, and bindings.
|
|
15
|
+
- `.oms/taxonomy.yaml` owns folder/link `intent`, note placement, and global axes.
|
|
16
|
+
- `.oms/types.json` is derived state. Never edit it directly.
|
|
17
|
+
|
|
18
|
+
Use an existing stable `templateId` when updating or moving a template. A path or digest change never creates a new identity. New OMS-managed templates default to `<templateFolder>/<templateId>.md`; registered existing templates keep their explicitly verified `sourcePath`.
|
|
19
|
+
|
|
20
|
+
## Workflow
|
|
21
|
+
|
|
22
|
+
1. Read `oms_search { op: "templates" }` and the user's requested shape. Do not guess existing IDs or fields.
|
|
23
|
+
2. Draft the exact Markdown and policy/taxonomy intent. Preserve unknown frontmatter, policy extensions, body bytes, and Obsidian property types.
|
|
24
|
+
3. Call `oms_write { op: "template", ..., dryRun: true }` for create, update, reclassify, or relocate-folder.
|
|
25
|
+
4. Show the proposal, paths, diagnostics, and `approvalDigest` to the user.
|
|
26
|
+
5. Apply only after the caller explicitly approves that exact digest. Submit the same request with `dryRun: false` and `approvedDigest`.
|
|
27
|
+
6. Report the server-verified receipt and postconditions.
|
|
28
|
+
|
|
29
|
+
Reject unsupported expressions, unsafe paths, unresolved legacy mappings, stale signatures, and identity changes. Never self-approve, silently fall back to a legacy Concept reader, or directly mutate managed template/control files.
|
|
@@ -1,30 +1,36 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: write
|
|
3
|
-
description: Write
|
|
3
|
+
description: Write vault notes and manage Obsidian templates through the guarded template contract.
|
|
4
4
|
mcp_tool: oms_write
|
|
5
5
|
mcp_args:
|
|
6
|
-
op: "
|
|
7
|
-
|
|
6
|
+
op: "note"
|
|
7
|
+
mode: "create"
|
|
8
|
+
templateId: "$1"
|
|
8
9
|
body: "$2"
|
|
9
10
|
---
|
|
10
11
|
|
|
11
12
|
# write
|
|
12
13
|
|
|
13
|
-
|
|
14
|
+
Use MCP `oms_write` for every vault-note or managed-template mutation. Do not use host Write/Edit for vault Markdown.
|
|
14
15
|
|
|
15
|
-
##
|
|
16
|
+
## Notes
|
|
16
17
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
## Usage
|
|
18
|
+
Translate the user's natural-language note kind into a stable ID returned by `oms_search { op: "templates" }`; never guess an ID.
|
|
20
19
|
|
|
21
20
|
```text
|
|
22
|
-
/write <
|
|
21
|
+
/write <template-id> [body]
|
|
23
22
|
```
|
|
24
23
|
|
|
25
|
-
|
|
24
|
+
For create, call `op: "note"` with `mode`, `templateId`, and body/frontmatter; placement and naming derive the path. For append/update, pass `notePath` without `templateId`; OMS resolves the persisted `frontmatter.template`. The actual Obsidian template supplies frontmatter shape and body scaffolding; OMS applies the vault-wide base defaults and policy.
|
|
25
|
+
|
|
26
|
+
## Templates
|
|
27
|
+
|
|
28
|
+
Template creation, updates, reclassification, and template-folder relocation use `op: "template"` with `mode: "create" | "update" | "reclassify" | "relocate-folder"`.
|
|
29
|
+
|
|
30
|
+
1. Submit `dryRun: true` with current input and source signatures.
|
|
31
|
+
2. Show the resulting proposal and `approvalDigest`.
|
|
32
|
+
3. Apply only with `dryRun: false` and that exact caller-approved digest.
|
|
33
|
+
|
|
34
|
+
Never self-approve, hand-edit the derived `.oms/types.json`, or directly edit a managed template.
|
|
26
35
|
|
|
27
|
-
|
|
28
|
-
- `inbox` — tell the user; do not invent a folder
|
|
29
|
-
- `written` — done
|
|
30
|
-
- `rejected` — fix `violations` or `reason` and call `write` again
|
|
36
|
+
Responses are `ask`, `written`, or `rejected`. Resolve named violations and retry; never invent missing required values.
|
package/core/AGENTS.md
CHANGED
|
@@ -1,112 +1,49 @@
|
|
|
1
1
|
# Oh My Second Brain Vault Convention — SSOT for Host Agents
|
|
2
2
|
|
|
3
|
-
This file
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
---
|
|
36
|
-
|
|
37
|
-
## 2. Field
|
|
38
|
-
|
|
39
|
-
A **field** is one frontmatter key — the smallest unit of convention. Each field declares:
|
|
40
|
-
|
|
41
|
-
| Property | Meaning |
|
|
42
|
-
|------------|---------|
|
|
43
|
-
| `name` | The frontmatter key (kebab-case, e.g. `source-url`). |
|
|
44
|
-
| `type` | One of `string`, `url`, `date`, `list`, `number`, `boolean`. |
|
|
45
|
-
| `required` | Whether the key must be present and non-empty. |
|
|
46
|
-
| `intent` | Semantic purpose: *what this field is FOR.* |
|
|
47
|
-
| `normalize` | Optional: `kebab`, `lower`, or `trim` — applied at validation. |
|
|
48
|
-
| `immutable` | Advisory: once written, should not change (v0: no-op, forward-compat). |
|
|
49
|
-
| `enum` | Optional closed vocabulary for string fields; values outside it are lint violations. |
|
|
50
|
-
|
|
51
|
-
Users grow their convention field-by-field. There is no mandatory field list.
|
|
52
|
-
|
|
53
|
-
---
|
|
54
|
-
|
|
55
|
-
## 3. Lens
|
|
56
|
-
|
|
57
|
-
A **lens** is a pre-declared, named retrieval view. It is NOT a query filter — it is a
|
|
58
|
-
concept's declaration of which fields matter for a specific retrieval purpose.
|
|
59
|
-
|
|
60
|
-
Example: a `synthesis` lens on `literature` surfaces `title` and `source-url`, because those
|
|
61
|
-
are the fields needed when synthesizing across references. A host agent uses the active lens
|
|
62
|
-
to know which frontmatter to surface during retrieval.
|
|
63
|
-
|
|
64
|
-
---
|
|
65
|
-
|
|
66
|
-
## 4. Taxonomy
|
|
67
|
-
|
|
68
|
-
The **taxonomy** binds folders to concepts and gives each folder a declared `intent`.
|
|
69
|
-
|
|
70
|
-
```yaml
|
|
71
|
-
version: 1
|
|
72
|
-
folders:
|
|
73
|
-
references:
|
|
74
|
-
intent: "Processed external sources the user has read and synthesized."
|
|
75
|
-
concept: literature
|
|
76
|
-
inbox:
|
|
77
|
-
intent: "Unprocessed captures awaiting triage."
|
|
78
|
-
concept: inbox
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
A folder may bind to one concept, multiple concepts (list), or `null` (not yet assigned). A folder binding may set `agentWritable: true`; paired with `routingLawStrict: true`, notes in that folder must carry `created_by`. Top-level `exclude` entries are vault-relative globs skipped by audit/lint scans.
|
|
82
|
-
|
|
83
|
-
---
|
|
84
|
-
|
|
85
|
-
## Enforcement Posture
|
|
86
|
-
|
|
87
|
-
| Setting | Value | Meaning |
|
|
88
|
-
|---------|-------|---------|
|
|
89
|
-
| `onViolation` | `warn` | Violations are logged but never block writes (v0 is non-blocking). |
|
|
90
|
-
| `additionalProperties` | `preserve` | Frontmatter keys not declared in the concept are left untouched. |
|
|
91
|
-
|
|
92
|
-
Oh My Second Brain enforces what the user declared; it does not touch anything else.
|
|
93
|
-
|
|
94
|
-
---
|
|
3
|
+
This file defines the end-user vault convention for host agents (Claude Code, Codex,
|
|
4
|
+
Hermes, and others). All convention data and its meaning remain vault-owned.
|
|
5
|
+
|
|
6
|
+
## Four Separate Authorities
|
|
7
|
+
|
|
8
|
+
These authorities do not overlap:
|
|
9
|
+
|
|
10
|
+
1. **Markdown templates — shape and body.** Actual vault Markdown templates own
|
|
11
|
+
frontmatter-key scaffolding, default literals, and note body shape. Do not infer
|
|
12
|
+
semantic meaning from a template's defaults.
|
|
13
|
+
2. **Ontology policy — note and field meaning.** `.oms/template-policy.json` owns
|
|
14
|
+
`intent` for notes and frontmatter fields. It is the note/field portion of the
|
|
15
|
+
semantic ontology, not template shape or type authority.
|
|
16
|
+
3. **Taxonomy — placement and folder/link ontology.** `.oms/taxonomy.yaml` owns note
|
|
17
|
+
placement and the folder/link portion of the semantic ontology, expressed through
|
|
18
|
+
folder and link `intent`. Authored folder intents surface on the derived
|
|
19
|
+
`folder-ontology` axis.
|
|
20
|
+
4. **Obsidian types — type authority.** `.obsidian/types.json` is the read-only type
|
|
21
|
+
authority. `.oms/types.json` is derived output, never an independent authority.
|
|
22
|
+
|
|
23
|
+
## Operating Boundaries
|
|
24
|
+
|
|
25
|
+
- Treat the verified target note and its applicable vault template as the write
|
|
26
|
+
boundary. Write only after verifying that target; never use a destination merely
|
|
27
|
+
because a template default suggests it.
|
|
28
|
+
- Read ontology and taxonomy to understand declared meaning and placement. Do not
|
|
29
|
+
overwrite them as a side effect of writing a note.
|
|
30
|
+
- Read `.obsidian/types.json` without modifying it. Do not edit derived
|
|
31
|
+
`.oms/types.json` as a source of truth.
|
|
32
|
+
- Preserve unknown frontmatter fields and their values. The convention constrains only
|
|
33
|
+
what the user declared.
|
|
95
34
|
|
|
96
35
|
## User Ownership
|
|
97
36
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
---
|
|
37
|
+
The user owns templates, ontology, taxonomy, and type definitions in the vault.
|
|
38
|
+
Oh My Second Brain applies those declarations without making them sticky: it does not
|
|
39
|
+
impose a folder structure, retain obsolete declarations, or replace user-authored
|
|
40
|
+
meaning. The user-owned semantic ontology remains active across ontology policy and
|
|
41
|
+
taxonomy; it is separate from template shape and type authority.
|
|
105
42
|
|
|
106
43
|
## Quick Reference for Host Agents
|
|
107
44
|
|
|
108
|
-
-
|
|
109
|
-
-
|
|
110
|
-
-
|
|
111
|
-
-
|
|
112
|
-
- When in doubt, preserve
|
|
45
|
+
- For note shape and default values, read the applicable vault Markdown template.
|
|
46
|
+
- For note or field ontology, read `intent` in `.oms/template-policy.json`.
|
|
47
|
+
- For destination and folder/link ontology, read `.oms/taxonomy.yaml`.
|
|
48
|
+
- For types, read `.obsidian/types.json`; treat `.oms/types.json` only as derived data.
|
|
49
|
+
- When in doubt, preserve user-authored content and unknown frontmatter.
|
package/dist/cli/args.d.ts
CHANGED
|
@@ -7,10 +7,12 @@ export interface ParsedCliArgs {
|
|
|
7
7
|
readonly vault: string;
|
|
8
8
|
readonly vaultExplicit: boolean;
|
|
9
9
|
readonly yes: boolean;
|
|
10
|
+
readonly approvedDigest?: string;
|
|
11
|
+
readonly templateFolder?: string;
|
|
12
|
+
readonly maxPerTemplate?: number;
|
|
10
13
|
/** linkify: opt into rewriting notes in place (still requires `--yes`). */
|
|
11
14
|
readonly apply: boolean;
|
|
12
15
|
readonly installClaude: boolean;
|
|
13
|
-
readonly suggestFields: boolean;
|
|
14
16
|
readonly runtime: RuntimeSelection | undefined;
|
|
15
17
|
readonly dryRun: boolean;
|
|
16
18
|
readonly executeExternal: boolean;
|
|
@@ -19,7 +21,6 @@ export interface ParsedCliArgs {
|
|
|
19
21
|
readonly agentVault: string | undefined;
|
|
20
22
|
readonly verbose: boolean;
|
|
21
23
|
readonly json: boolean;
|
|
22
|
-
readonly maxPerConcept: number | undefined;
|
|
23
24
|
readonly folders: readonly string[];
|
|
24
25
|
readonly conventionNote: boolean;
|
|
25
26
|
readonly embeddingDescriptorPath: string | undefined;
|
package/dist/cli/args.js
CHANGED
|
@@ -16,9 +16,11 @@ export function parseCliArgs(argv, cwd = process.cwd()) {
|
|
|
16
16
|
let vault = cwd;
|
|
17
17
|
let vaultExplicit = false;
|
|
18
18
|
let yes = false;
|
|
19
|
+
let approvedDigest;
|
|
20
|
+
let templateFolder;
|
|
21
|
+
let maxPerTemplate;
|
|
19
22
|
let apply = false;
|
|
20
23
|
let installClaude = false;
|
|
21
|
-
let suggestFields = false;
|
|
22
24
|
let runtime;
|
|
23
25
|
let dryRun = false;
|
|
24
26
|
let executeExternal = false;
|
|
@@ -27,7 +29,6 @@ export function parseCliArgs(argv, cwd = process.cwd()) {
|
|
|
27
29
|
let agentVault;
|
|
28
30
|
let verbose = false;
|
|
29
31
|
let json = false;
|
|
30
|
-
let maxPerConcept;
|
|
31
32
|
const folders = [];
|
|
32
33
|
let conventionNote = true;
|
|
33
34
|
let embeddingDescriptorPath;
|
|
@@ -45,15 +46,34 @@ export function parseCliArgs(argv, cwd = process.cwd()) {
|
|
|
45
46
|
else if (arg === "--yes") {
|
|
46
47
|
yes = true;
|
|
47
48
|
}
|
|
49
|
+
else if (arg === "--approved-digest") {
|
|
50
|
+
if (next === undefined || next.startsWith("--")) {
|
|
51
|
+
return parsedArgsWithError("[oms] Missing value for --approved-digest.");
|
|
52
|
+
}
|
|
53
|
+
approvedDigest = next;
|
|
54
|
+
i++;
|
|
55
|
+
}
|
|
56
|
+
else if (arg === "--template-folder") {
|
|
57
|
+
if (next === undefined || next.startsWith("--")) {
|
|
58
|
+
return parsedArgsWithError("[oms] Missing value for --template-folder.");
|
|
59
|
+
}
|
|
60
|
+
templateFolder = next;
|
|
61
|
+
i++;
|
|
62
|
+
}
|
|
63
|
+
else if (arg === "--max-per-template") {
|
|
64
|
+
const parsed = Number.parseInt(next ?? "", 10);
|
|
65
|
+
if (next === undefined || !Number.isFinite(parsed) || parsed <= 0 || `${parsed}` !== next) {
|
|
66
|
+
return parsedArgsWithError(`[oms] --max-per-template must be a positive integer.`);
|
|
67
|
+
}
|
|
68
|
+
maxPerTemplate = parsed;
|
|
69
|
+
i++;
|
|
70
|
+
}
|
|
48
71
|
else if (arg === "--apply") {
|
|
49
72
|
apply = true;
|
|
50
73
|
}
|
|
51
74
|
else if (arg === "--install-claude") {
|
|
52
75
|
installClaude = true;
|
|
53
76
|
}
|
|
54
|
-
else if (arg === "--suggest-fields") {
|
|
55
|
-
suggestFields = true;
|
|
56
|
-
}
|
|
57
77
|
else if (arg === "--check") {
|
|
58
78
|
checkUpdate = true;
|
|
59
79
|
}
|
|
@@ -90,14 +110,6 @@ export function parseCliArgs(argv, cwd = process.cwd()) {
|
|
|
90
110
|
else if (arg === "--json") {
|
|
91
111
|
json = true;
|
|
92
112
|
}
|
|
93
|
-
else if (arg === "--max" && next) {
|
|
94
|
-
const parsed = Number.parseInt(next, 10);
|
|
95
|
-
if (!Number.isFinite(parsed) || parsed <= 0) {
|
|
96
|
-
return parsedArgsWithError(`[oms] Unsupported --max value: ${next}`);
|
|
97
|
-
}
|
|
98
|
-
maxPerConcept = parsed;
|
|
99
|
-
i++;
|
|
100
|
-
}
|
|
101
113
|
else if (arg === "--folder" && next) {
|
|
102
114
|
folders.push(next);
|
|
103
115
|
i++;
|
|
@@ -124,9 +136,11 @@ export function parseCliArgs(argv, cwd = process.cwd()) {
|
|
|
124
136
|
vault,
|
|
125
137
|
vaultExplicit,
|
|
126
138
|
yes,
|
|
139
|
+
approvedDigest,
|
|
140
|
+
templateFolder,
|
|
141
|
+
maxPerTemplate,
|
|
127
142
|
apply,
|
|
128
143
|
installClaude,
|
|
129
|
-
suggestFields,
|
|
130
144
|
runtime,
|
|
131
145
|
dryRun,
|
|
132
146
|
executeExternal,
|
|
@@ -135,7 +149,6 @@ export function parseCliArgs(argv, cwd = process.cwd()) {
|
|
|
135
149
|
agentVault,
|
|
136
150
|
verbose,
|
|
137
151
|
json,
|
|
138
|
-
maxPerConcept,
|
|
139
152
|
folders,
|
|
140
153
|
conventionNote,
|
|
141
154
|
embeddingDescriptorPath,
|
|
@@ -150,9 +163,11 @@ export function parseCliArgs(argv, cwd = process.cwd()) {
|
|
|
150
163
|
vault,
|
|
151
164
|
vaultExplicit,
|
|
152
165
|
yes,
|
|
166
|
+
approvedDigest,
|
|
167
|
+
templateFolder,
|
|
168
|
+
maxPerTemplate,
|
|
153
169
|
apply,
|
|
154
170
|
installClaude,
|
|
155
|
-
suggestFields,
|
|
156
171
|
runtime,
|
|
157
172
|
dryRun,
|
|
158
173
|
executeExternal,
|
|
@@ -161,7 +176,6 @@ export function parseCliArgs(argv, cwd = process.cwd()) {
|
|
|
161
176
|
agentVault,
|
|
162
177
|
verbose,
|
|
163
178
|
json,
|
|
164
|
-
maxPerConcept,
|
|
165
179
|
folders,
|
|
166
180
|
conventionNote,
|
|
167
181
|
embeddingDescriptorPath,
|
package/dist/cli/args.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"args.js","sourceRoot":"","sources":["../../src/cli/args.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAG/E,MAAM,OAAO,gBAAiB,SAAQ,KAAK;IACzC,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,kBAAkB,CAAC;IACjC,CAAC;CACF;
|
|
1
|
+
{"version":3,"file":"args.js","sourceRoot":"","sources":["../../src/cli/args.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAG/E,MAAM,OAAO,gBAAiB,SAAQ,KAAK;IACzC,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,kBAAkB,CAAC;IACjC,CAAC;CACF;AA+BD,MAAM,UAAU,kBAAkB,CAAC,KAAa;IAC9C,IAAI,KAAK,KAAK,MAAM,IAAI,KAAK,KAAK,KAAK;QAAE,OAAO,IAAI,CAAC;IACrD,O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