oh-my-second-brain 0.8.4 → 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 +7 -1
- package/CHANGELOG-cli.md +7 -0
- package/CHANGELOG-kernel.md +9 -0
- package/CHANGELOG-mcp.md +8 -0
- package/CHANGELOG-vendors.md +6 -0
- package/CHANGELOG.md +7 -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
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
{
|
|
11
11
|
"name": "oms",
|
|
12
12
|
"description": "Oh My Second Brain convention layer for Obsidian vaults — capture, retrieve, and validate knowledge under a declared semantic convention.",
|
|
13
|
-
"version": "0.
|
|
13
|
+
"version": "0.9.0",
|
|
14
14
|
"author": {
|
|
15
15
|
"name": "gobeumsu",
|
|
16
16
|
"email": "gobeumsu@gmail.com"
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
]
|
|
38
38
|
}
|
|
39
39
|
],
|
|
40
|
-
"version": "0.
|
|
40
|
+
"version": "0.9.0"
|
|
41
41
|
}
|
|
@@ -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 — capture, retrieve, and validate knowledge under a declared semantic convention.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "gobeumsu"
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
"./assets/skills/link/",
|
|
21
21
|
"./assets/skills/search/",
|
|
22
22
|
"./assets/skills/status/",
|
|
23
|
+
"./assets/skills/template/",
|
|
23
24
|
"./assets/skills/write/"
|
|
24
25
|
]
|
|
25
26
|
}
|
|
@@ -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 — Codex native rules, skills, and MCP adapter.",
|
|
5
5
|
"_note": "oms install writes Codex MCP config, installs ~/.codex/rules/oms.md, and installs ~/.codex/skills/oms-*.",
|
|
6
6
|
"skills": "./assets/skills/",
|
package/CHANGELOG-assets.md
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
# Assets Changelog
|
|
2
2
|
|
|
3
|
-
Skills, agents, and
|
|
3
|
+
Skills, agents, templates, and host guidance changes belong here.
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.9.0] - 2026-08-31
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- **The seven shared skills, including the tool-less template authoring workflow, now teach stable template IDs, derived axes, explicit repair approval, and template/ontology coexistence.** Claude, Codex, and Hermes guidance separates template-owned shape from user-owned note/field/folder/link meaning. It no longer describes `concept` identity, personas, retrieval lenses, hand-edited projection state, or bundled note-type defaults.
|
|
12
|
+
|
|
7
13
|
## [0.8.4] - 2026-08-30
|
|
8
14
|
|
|
9
15
|
## [0.8.3] - 2026-08-29
|
package/CHANGELOG-cli.md
CHANGED
|
@@ -4,6 +4,13 @@ Changes to the `oms` command surface belong here.
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.9.0] - 2026-08-31
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- **`setup`, `doctor`, `audit`, and `linkify` now expose the template contract directly.** Setup uses dry-run plus `--approved-digest`, doctor reports template/projection health and renames the report cap to `--max-per-template`, audit fails closed against resolved template identities, and linkify uses the same stable identities as write/search. Retired Concept authoring and `--suggest-fields` are no longer accepted.
|
|
12
|
+
- **Host lifecycle commands now maintain a strict signed XDG vault pointer.** `install`, `update`, public `reconcile`, and `uninstall` compare-and-swap host stamps without affecting runtime vault resolution; `--template-folder` is also bound into setup discovery and its approval digest.
|
|
13
|
+
|
|
7
14
|
## [0.8.4] - 2026-08-30
|
|
8
15
|
|
|
9
16
|
## [0.8.3] - 2026-08-29
|
package/CHANGELOG-kernel.md
CHANGED
|
@@ -4,6 +4,15 @@ Domain logic changes belong here.
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.9.0] - 2026-08-31
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- **The domain kernel now keeps template shape and ontology meaning separate end to end.** Vault-resident Markdown templates own frontmatter/body shape; template policy carries note/field `intent`, naming, and defaults; taxonomy carries folder/link `intent` and placement; and Obsidian owns property types. They resolve into one signed projection shared by write, graph, link, search, setup, migration, diagnosis, and repair. Field intent is retained on search axes and folder intent is exposed through the derived `folder-ontology` axis. Legacy `concept` identity, bundled ontology runtime loaders, old capture APIs, writable projection contracts, graph cache, and fallback behavior were removed; managed template sources stay outside note indexes and embeddings.
|
|
12
|
+
- **Template migration and repair are guarded transactions.** Setup discovers existing templates and publishes only after an explicit approval digest; projection regeneration, template mutation, relocation/reclassification, and one-note identity backfill use verified targets, compare-and-swap expectations, and read-back postcondition receipts.
|
|
13
|
+
- **Migration now preserves legacy meaning while cutting over synchronously.** URL formats, enum/immutable field semantics, retrieval views, legacy type/allowed-value/axis contracts, unknown extensions, string/list/null taxonomy cardinality, raw source bytes, and provenance survive translation; one-to-many legacy routes materialize deterministic stable template clones. Unmarked managed-folder notes block activation. Durable checksummed plans can resume after interruption, invalid markers fail closed, taxonomy owns placement, and unbound templates route to the safe `Inbox/` fallback rather than their source folder.
|
|
14
|
+
- **Template rendering uses one exact source layout and instant.** `{{date}}` and `{{time}}` render as UTC `YYYY-MM-DD` and `HH:mm`, title-dependent templates require a non-empty title, only a standalone content-marker line is replaced, and BOM/EOL/final-newline semantics flow from the resolved source.
|
|
15
|
+
|
|
7
16
|
## [0.8.4] - 2026-08-30
|
|
8
17
|
|
|
9
18
|
## [0.8.3] - 2026-08-29
|
package/CHANGELOG-mcp.md
CHANGED
|
@@ -4,6 +4,14 @@ MCP server tools and resources belong here.
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.9.0] - 2026-08-31
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- **The five-tool MCP surface now uses stable templates for every note-shaped operation.** `oms_write` has strict create/append/update branches: create derives placement from `templateId`, while append/update resolve the persisted note identity; guarded template operations remain on the same tool. `oms_search` advertises template/field/folder/link axes; `oms_status` reports projection signatures; and `oms_doctor` adds template diagnosis, approved projection regeneration, and exact one-note backfill without adding public tools.
|
|
12
|
+
- **Graph, link, and search paths share one resolved convention.** Typed retrieval omits and reports unresolved note identities instead of failing the whole index, stale projections fail loudly, managed template sources are excluded, and every advertised search operation remains byte-identical read-only.
|
|
13
|
+
- **Doctor and template mutation use exact public operations and durable recovery.** Doctor exposes `validate`, `regenerate-types`, and `backfill-defaults`; interrupted template transactions resume by persisted transaction ID and the original approved digest instead of reconstructing mutable caller state.
|
|
14
|
+
|
|
7
15
|
## [0.8.4] - 2026-08-30
|
|
8
16
|
|
|
9
17
|
## [0.8.3] - 2026-08-29
|
package/CHANGELOG-vendors.md
CHANGED
|
@@ -4,6 +4,12 @@ Per-host adapter and installer changes belong here.
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.9.0] - 2026-08-31
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- **Claude, Codex, and Hermes host guidance and hooks now describe the template/ontology coexistence contract.** Templates own note shape, user-owned policy/taxonomy intent owns meaning, taxonomy owns placement, and Obsidian owns types. A signed XDG host-maintenance pointer lets install, update, public reconcile, and uninstall compare-and-swap every managed MCP/hook vault stamp while remaining completely outside runtime target resolution. Claude post-write checks resolve templates without rebuilding caches.
|
|
12
|
+
|
|
7
13
|
## [0.8.4] - 2026-08-30
|
|
8
14
|
|
|
9
15
|
## [0.8.3] - 2026-08-29
|
package/CHANGELOG.md
CHANGED
|
@@ -6,10 +6,16 @@ This aggregate changelog contains changes that span multiple layers.
|
|
|
6
6
|
- [CLI changelog](./CHANGELOG-cli.md) — the `oms` command surface
|
|
7
7
|
- [MCP changelog](./CHANGELOG-mcp.md) — MCP server tools and resources
|
|
8
8
|
- [Vendors changelog](./CHANGELOG-vendors.md) — per-host adapters and installers
|
|
9
|
-
- [Assets changelog](./CHANGELOG-assets.md) — skills, agents, and
|
|
9
|
+
- [Assets changelog](./CHANGELOG-assets.md) — skills, agents, templates, and host guidance
|
|
10
10
|
|
|
11
11
|
## [Unreleased]
|
|
12
12
|
|
|
13
|
+
## [0.9.0] - 2026-08-31
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
|
|
17
|
+
- **Oh My Second Brain now derives one write/search contract from templates and a coexisting user-owned ontology.** Vault Markdown templates own frontmatter/body shape; template policy owns note/field meaning, naming, and defaults; taxonomy owns folder/link meaning and placement; and Obsidian owns property types. The synchronized kernel, CLI, MCP, host, skill, setup, migration, diagnosis, and documentation cutover removes only the former `concept` note identity and bundled runtime authority. Stable template identities, inherited base defaults, managed-source exclusion, verified repair transactions, and host pointer reconciliation now work consistently across all supported environments.
|
|
18
|
+
|
|
13
19
|
## [0.8.4] - 2026-08-30
|
|
14
20
|
|
|
15
21
|
### Documentation
|
package/README.ko.md
CHANGED
|
@@ -1,87 +1,45 @@
|
|
|
1
1
|
# Oh My Second Brain
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Oh My Second Brain(`oms`)은 기존 Obsidian/Markdown 볼트를 노트 소유권을 빼앗지 않고 AI 호스트에 연결한다. 볼트는 계속 평범한 Markdown이다.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## 템플릿·온톨로지 볼트 모델
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
- 볼트에 실제로 존재하는 Obsidian `.md` 템플릿이 관리 노트의 frontmatter 형태와 본문 골격을 소유한다.
|
|
8
|
+
- 각 템플릿은 경로·digest와 독립적인 안정적 `templateId`를 가지며, 볼트 전체의 `BaseContract` 하나를 상속한다.
|
|
9
|
+
- `.obsidian/types.json`은 읽기 전용 타입 권위다.
|
|
10
|
+
- 사용자 소유 온톨로지는 계속 활성 상태다. `.oms/template-policy.json`은 노트·필드 의미와 필수값, 형식, 허용값, 기본값, 이름 규칙, 정체성, 바인딩을 기록한다.
|
|
11
|
+
- `.oms/taxonomy.yaml`은 폴더·링크 의미와 배치를 소유하며, 작성된 폴더 의미는 `folder-ontology` 검색 축으로 노출된다.
|
|
12
|
+
- `.oms/types.json`은 쓰기·검색용 검증된 파생 projection이다. 직접 편집하지 않는다.
|
|
9
13
|
|
|
10
|
-
|
|
14
|
+
제거된 것은 노트 정체성으로서의 `concept`와 번들 runtime 기본값이지, 의미 계층으로서의 온톨로지가 아니다.
|
|
11
15
|
|
|
12
|
-
|
|
16
|
+
## 설정
|
|
13
17
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
```
|
|
17
|
-
core (한 번만 작성) adapters (호스트마다 하나)
|
|
18
|
-
온톨로지 로딩 claude-code .claude-plugin + CLAUDE.md /sigil
|
|
19
|
-
컨벤션 검증 + codex .codex-plugin + AGENTS.md $sigil
|
|
20
|
-
그래프 + 시맨틱 런타임 hermes manifest.json + SOUL.md (MCP/tools)
|
|
21
|
-
MCP 서버 (capture/retrieve/validate)
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
- **core**는 호스트에 독립적이다: 온톨로지, 검증, 그래프/시맨틱 엔진, MCP 서버.
|
|
25
|
-
- 각 **adapter**는 호스트 하나의 구조적 차이(매니페스트 스키마, 컨벤션 파일, 호출 sigil)만 흡수한다. 호스트를 추가한다는 건 core를 건드리는 게 아니라 adapter 디렉터리 하나를 더하는 일이다.
|
|
26
|
-
- 호스트 간 연결 메커니즘은 모든 호스트가 함께 쓰는 단일 **MCP 서버**(`oms mcp`)다.
|
|
27
|
-
|
|
28
|
-
## 요구 사항
|
|
29
|
-
|
|
30
|
-
- Node.js 20 이상
|
|
31
|
-
- `PATH`에 `npm`
|
|
32
|
-
- Obsidian 볼트 또는 마크다운 노트 폴더
|
|
33
|
-
- (선택) 호스트 CLI: `claude`, `codex`, `hermes`
|
|
34
|
-
- (선택) [시맨틱 검색](#시맨틱-검색-선택)용 임베딩 백엔드
|
|
35
|
-
|
|
36
|
-
## 설치
|
|
37
|
-
|
|
38
|
-
원라인 설치(게시된 npm 패키지 사용):
|
|
39
|
-
|
|
40
|
-
```bash
|
|
41
|
-
curl -fsSL https://raw.githubusercontent.com/GoBeromsu/oh-my-second-brain/main/scripts/install.sh | bash
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
호스트를 선택하고 볼트를 지정:
|
|
45
|
-
|
|
46
|
-
```bash
|
|
47
|
-
curl -fsSL https://raw.githubusercontent.com/GoBeromsu/oh-my-second-brain/main/scripts/install.sh | bash -s -- --runtime all --vault /path/to/vault
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
또는 npm으로:
|
|
18
|
+
Setup은 기존 템플릿을 재귀 탐색하고 migration을 제안한다. 노트 타입 기본값을 번들로 강요하지 않으며 노트를 수정하지 않는다.
|
|
51
19
|
|
|
52
20
|
```bash
|
|
53
|
-
|
|
54
|
-
oms
|
|
55
|
-
oms install --runtime all --vault /path/to/vault --yes # 적용
|
|
21
|
+
oms setup --vault /path/to/vault --dry-run
|
|
22
|
+
oms setup --vault /path/to/vault --yes --approved-digest <표시된-digest>
|
|
56
23
|
```
|
|
57
24
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
## 호스트
|
|
61
|
-
|
|
62
|
-
| 호스트 | 매니페스트 | 컨벤션 파일 | Sigil | 상태 |
|
|
63
|
-
|------|----------|-----------|-------|--------|
|
|
64
|
-
| **claude-code** | `.claude-plugin/plugin.json` | `CLAUDE.md` | `/` | 설치 가능 |
|
|
65
|
-
| **codex** | `.codex-plugin/plugin.json` | `AGENTS.md` | `$` | 네이티브 스킬 + MCP |
|
|
66
|
-
| **hermes** | `manifest.json` | `SOUL.md` | (MCP/tools) | 네이티브 스킬 + MCP |
|
|
67
|
-
|
|
68
|
-
`oms install`은 호스트 네이티브 규칙/스킬과 관리형 `oms` MCP 등록을 작성하며, `oms uninstall`로 되돌릴 수 있다.
|
|
25
|
+
관리 템플릿 변경도 dry-run, 호출자가 검토한 정확한 digest, CAS, transaction, 사후조건 receipt를 거친다.
|
|
69
26
|
|
|
70
27
|
## CLI
|
|
71
28
|
|
|
72
|
-
```
|
|
73
|
-
oms setup 기존
|
|
74
|
-
oms install 호스트
|
|
75
|
-
oms uninstall 호스트
|
|
29
|
+
```text
|
|
30
|
+
oms setup 기존 볼트 템플릿 탐색 및 채택
|
|
31
|
+
oms install 호스트 어댑터와 관리형 MCP 등록 설치
|
|
32
|
+
oms uninstall 호스트 어댑터와 관리형 MCP 등록 제거
|
|
76
33
|
oms update 패키지 업데이트 확인/적용 후 어댑터 재조정
|
|
77
|
-
oms
|
|
78
|
-
oms
|
|
79
|
-
oms
|
|
34
|
+
oms reconcile 엄격한 전역 볼트 포인터로 호스트 재기록
|
|
35
|
+
oms doctor 템플릿 권위와 파생 상태 진단
|
|
36
|
+
oms lint 깨진 [[wikilink]]와 고아 노트 점검
|
|
37
|
+
oms semantic 네이티브 Markdown lexical/vector 검색 관리
|
|
80
38
|
oms mcp stdio MCP 서버 시작
|
|
81
|
-
oms hook
|
|
39
|
+
oms hook Claude pre/post tool-use 볼트 가드 실행
|
|
82
40
|
```
|
|
83
41
|
|
|
84
|
-
`oh-my-second-brain`이
|
|
42
|
+
`oh-my-second-brain`이 전체 명령이고 `oms`는 짧은 별칭이다.
|
|
85
43
|
|
|
86
44
|
## MCP 도구
|
|
87
45
|
|
|
@@ -89,47 +47,23 @@ oms hook 볼트 가드 훅 (Claude Code pre/post tool-use)
|
|
|
89
47
|
|
|
90
48
|
`oms_write` · `oms_search` · `oms_link` · `oms_status` · `oms_doctor`
|
|
91
49
|
|
|
92
|
-
`
|
|
93
|
-
|
|
94
|
-
## 볼트 구조 (`.oms/`)
|
|
95
|
-
|
|
96
|
-
`oms setup`은 볼트를 커밋된 `.oms/` 폴더로 채택하며, 두 개의 레이어를 둔다(ADR-006):
|
|
97
|
-
|
|
98
|
-
- **Contract (기계 검증)** — `taxonomy.yaml`(폴더 → intent → concept)와 `concepts/*.yaml`(노트 타입별 프론트매터 선언). `vault-lint`와 `oms_validate_contract`가 강제한다.
|
|
99
|
-
- **Governance (사람 의도)** — `governance/`의 ADR과 규칙. 기계가 파싱하지 않는다.
|
|
100
|
-
- `.oms/cache/`(파생 그래프/임베딩 아티팩트)는 gitignore된다.
|
|
101
|
-
|
|
102
|
-
`setup`은 `.oms/taxonomy.yaml`을 작성하고 기존 `.oms/concepts/`를 보존하며, 노트는 절대 수정하지 않는다.
|
|
50
|
+
일곱 스킬(`write`, `search`, `link`, `distill`, `status`, `doctor`, `template`)은 워크플로 안내이며 MCP 도구와 같은 집합이 아니다. 세부 기능은 다섯 도구의 `op` 값으로 제공한다.
|
|
103
51
|
|
|
104
|
-
|
|
52
|
+
쓰기는 하나의 `ResolvedTemplate`을 해석해 create, append, update를 수행한다. 템플릿 변경, projection 재생성, 한 노트 정체성 backfill은 검증된 target과 명시적 승인 digest가 필요하다. `status`와 모든 검색 동작은 읽기 전용이다.
|
|
105
53
|
|
|
106
|
-
|
|
54
|
+
일반 lexical 검색은 projection과 독립적이다. 템플릿·선언 필드·폴더·링크 축은 쓰기와 같은 projection을 사용하며 누락·stale 상태를 크게 실패시킨다. 관리 템플릿 원본은 검색 대상에서 제외한다. Vector/HyDE는 provider와 model이 모두 설정되지 않으면 가짜 대체 없이 실패한다.
|
|
107
55
|
|
|
108
|
-
|
|
109
|
-
oms setup --vault /path/to/vault --yes --embedding-default
|
|
110
|
-
oms embed --vault /path/to/vault
|
|
111
|
-
oms semantic vsearch "무엇을 찾아야 하나?" --vault /path/to/vault
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
`--embedding-default`는 EmbeddingGemma-300M(약 318 MB)을 내려받아 핀 고정된 SHA-256으로 검증한 뒤, 볼트가 아니라 사용자 캐시 디렉터리에 설치한다. `node-llama-cpp`로 로컬 실행되므로 API 키가 필요 없고, 모델 원본 768차원을 폴딩 없이 그대로 사용한다. 이후 `oms embed`와 벡터 검색은 환경변수 없이 동작한다.
|
|
115
|
-
|
|
116
|
-
의존하기 전에 알아둘 점이 하나 있다. 이 모델과 프롬프트 형식은 [qmd](https://github.com/tobi/qmd)가 기본으로 쓰는 것과 동일하지만, 이 프로젝트의 자체 검색 하네스에서 측정된 적은 한 번도 없다. 여기서의 랭킹 품질은 대안과의 측정 비교가 아니라 그 동일성에 근거한다. 그 이유와, 해당 측정이 단순히 '보류 중'이 아닌 이유는 [결정 기록](https://github.com/GoBeromsu/oh-my-second-brain/blob/main/docs/measurements/model-default-deferral.md)에 적혀 있다.
|
|
117
|
-
|
|
118
|
-
직접 고른 모델을 쓰려면 `OMS_EMBEDDING_PROVIDER`와 `OMS_EMBEDDING_MODEL`을 함께 지정한다(`gguf`에 로컬 GGUF 경로, 또는 `upstage`에 모델 id와 `UPSTAGE_API_KEY`). 둘 중 하나만 지정하면 두 변수 이름을 모두 알려주며 실패한다. 조용한 폴백은 없다.
|
|
119
|
-
|
|
120
|
-
모델이 없어도 어휘 검색, 그래프 기반 검색, 컨벤션 검증은 그대로 동작한다. 벡터와 HyDE 요청만 거부되며, 그때 어떤 변수를 설정해야 하는지 알려준다.
|
|
56
|
+
## 설치
|
|
121
57
|
|
|
122
|
-
|
|
58
|
+
Node.js 20 이상이 필요하다.
|
|
123
59
|
|
|
124
60
|
```bash
|
|
125
|
-
npm install
|
|
126
|
-
|
|
127
|
-
npm test
|
|
128
|
-
npm run release:check # lint + build + test + audit + pack + artifact-smoke + plugin 검증
|
|
61
|
+
npm install -g oh-my-second-brain
|
|
62
|
+
oms install --runtime all --vault /path/to/vault --yes
|
|
129
63
|
```
|
|
130
64
|
|
|
131
|
-
|
|
65
|
+
호스트 설치는 canonical 볼트를 `${XDG_CONFIG_HOME:-~/.config}/oms/vault.json`에 기록하고 각 관리형 등록에 `oms mcp --vault /path/to/vault`를 넣는다. `install`, `update`, `reconcile`, `uninstall`만 이 서명된 포인터를 호스트 stamp 관리에 사용한다. 런타임 쓰기·검색 target 해석은 포인터를 읽지 않으며 명시적 target, 로컬 볼트 control, bridge, `OMS_VAULT`, 읽기 전용 cwd fallback 순서를 유지한다.
|
|
132
66
|
|
|
133
|
-
|
|
67
|
+
`OMS_VAULT`는 명시적·로컬·bridge target이 없을 때 사용하는 지원 환경변수 fallback이다.
|
|
134
68
|
|
|
135
|
-
|
|
69
|
+
자세한 내용은 [설치](./docs/install.md), [아키텍처](./docs/architecture.md), [컨벤션](./docs/conventions.md), [검증된 target](./docs/verified-target.md)을 참고한다.
|
package/README.md
CHANGED
|
@@ -1,87 +1,45 @@
|
|
|
1
1
|
# Oh My Second Brain
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Oh My Second Brain (`oms`) connects an existing Obsidian or Markdown vault to AI hosts without taking ownership of its notes. The vault remains plain Markdown.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Template and ontology vault model
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
- Actual vault-resident Obsidian `.md` templates own managed frontmatter shape and body scaffolding.
|
|
8
|
+
- Each template has a stable `templateId`, independent of its path and digest, and inherits one vault-wide `BaseContract`.
|
|
9
|
+
- `.obsidian/types.json` is read-only type authority.
|
|
10
|
+
- The user-owned ontology remains active: `.oms/template-policy.json` records note/field meaning alongside requiredness, formats, allowed values, defaults, naming, identity, and bindings.
|
|
11
|
+
- `.oms/taxonomy.yaml` records folder/link meaning and owns placement; authored folder intents are exposed through the `folder-ontology` search axis.
|
|
12
|
+
- `.oms/types.json` is a validated derived write/search projection. Never hand-edit it.
|
|
9
13
|
|
|
10
|
-
|
|
14
|
+
The retired model is `concept` as note identity and bundled runtime defaults—not ontology as semantic meaning.
|
|
11
15
|
|
|
12
|
-
|
|
16
|
+
## Setup
|
|
13
17
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
```
|
|
17
|
-
kernel (written once) root host surfaces
|
|
18
|
-
ontology + convention logic .claude-plugin/ Claude plugin manifest
|
|
19
|
-
graph + semantic runtime + .codex-plugin/ Codex plugin manifest
|
|
20
|
-
gated note operations .mcp.json Claude MCP registration
|
|
21
|
-
CLI and MCP entry points .mcp.codex.json Codex MCP registration
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
- **kernel** is host-agnostic: ontology, validation, graph/semantic logic, and note operations.
|
|
25
|
-
- host-specific assets live at the package root: Claude hooks are in `assets/claude/hooks/`, Codex rules are in `assets/codex/rules/`, and Hermes metadata is `assets/hermes-manifest.json`.
|
|
26
|
-
- the cross-host mechanism is one **MCP server** (`oms mcp`) that every host talks to.
|
|
27
|
-
|
|
28
|
-
## Requirements
|
|
29
|
-
|
|
30
|
-
- Node.js 20+
|
|
31
|
-
- `npm` on `PATH`
|
|
32
|
-
- An Obsidian vault, or any folder of markdown notes
|
|
33
|
-
- Optional host CLIs: `claude`, `codex`, `hermes`
|
|
34
|
-
- Optional embedding backend for [semantic search](#semantic-search-optional)
|
|
35
|
-
|
|
36
|
-
## Install
|
|
37
|
-
|
|
38
|
-
One-line (uses the published npm package):
|
|
39
|
-
|
|
40
|
-
```bash
|
|
41
|
-
curl -fsSL https://raw.githubusercontent.com/GoBeromsu/oh-my-second-brain/main/scripts/install.sh | bash
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
Pick hosts and point at a vault:
|
|
45
|
-
|
|
46
|
-
```bash
|
|
47
|
-
curl -fsSL https://raw.githubusercontent.com/GoBeromsu/oh-my-second-brain/main/scripts/install.sh | bash -s -- --runtime all --vault /path/to/vault
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
Or via npm:
|
|
18
|
+
Setup recursively discovers existing templates and proposes migration. It ships no note-type defaults and never modifies notes.
|
|
51
19
|
|
|
52
20
|
```bash
|
|
53
|
-
|
|
54
|
-
oms
|
|
55
|
-
oms install --runtime all --vault /path/to/vault --yes # apply
|
|
21
|
+
oms setup --vault /path/to/vault --dry-run
|
|
22
|
+
oms setup --vault /path/to/vault --yes --approved-digest <shown-digest>
|
|
56
23
|
```
|
|
57
24
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
## Hosts
|
|
61
|
-
|
|
62
|
-
| Host | Manifest | Convention file | Sigil | Status |
|
|
63
|
-
|------|----------|-----------------|-------|--------|
|
|
64
|
-
| **claude-code** | `.claude-plugin/plugin.json` | `CLAUDE.md` | `/` | installable |
|
|
65
|
-
| **codex** | `.codex-plugin/plugin.json` | `AGENTS.md` | `$` | native skills + MCP |
|
|
66
|
-
| **hermes** | `assets/hermes-manifest.json` | `SOUL.md` | (MCP/tools) | native skills + MCP |
|
|
67
|
-
|
|
68
|
-
`oms install` writes the host-native rules/skills and a managed `oms` MCP registration, and is reversible with `oms uninstall`. Per-host details: [docs/install.md](./docs/install.md).
|
|
25
|
+
Managed-template changes use the same dry-run, exact caller approval, compare-and-swap, transaction, and postcondition receipt boundary.
|
|
69
26
|
|
|
70
27
|
## CLI
|
|
71
28
|
|
|
72
|
-
```
|
|
73
|
-
oms setup
|
|
74
|
-
oms install Install host
|
|
75
|
-
oms uninstall Remove host
|
|
76
|
-
oms update Check/apply a package update
|
|
77
|
-
oms
|
|
78
|
-
oms
|
|
79
|
-
oms
|
|
29
|
+
```text
|
|
30
|
+
oms setup Discover and adopt existing vault templates
|
|
31
|
+
oms install Install host adapters and managed MCP registration
|
|
32
|
+
oms uninstall Remove host adapters and managed MCP registration
|
|
33
|
+
oms update Check/apply a package update and reconcile adapters
|
|
34
|
+
oms reconcile Re-stamp hosts from the strict global vault pointer
|
|
35
|
+
oms doctor Diagnose template authority and derived state
|
|
36
|
+
oms lint Check broken [[wikilinks]] and orphan notes
|
|
37
|
+
oms semantic Manage native Markdown lexical/vector retrieval
|
|
80
38
|
oms mcp Start the stdio MCP server
|
|
81
|
-
oms hook
|
|
39
|
+
oms hook Run Claude pre/post tool-use vault guards
|
|
82
40
|
```
|
|
83
41
|
|
|
84
|
-
`oh-my-second-brain` is the
|
|
42
|
+
`oh-my-second-brain` is the full command; `oms` is its short alias.
|
|
85
43
|
|
|
86
44
|
## MCP tools
|
|
87
45
|
|
|
@@ -89,47 +47,23 @@ oms hook Vault guard hooks (Claude Code pre/post tool-use)
|
|
|
89
47
|
|
|
90
48
|
`oms_write` · `oms_search` · `oms_link` · `oms_status` · `oms_doctor`
|
|
91
49
|
|
|
92
|
-
`
|
|
93
|
-
|
|
94
|
-
## Vault layout (`.oms/`)
|
|
95
|
-
|
|
96
|
-
`oms setup` adopts your vault into a committed `.oms/` folder with two layers (ADR-006):
|
|
97
|
-
|
|
98
|
-
- **Contract (machine-validated)** — `taxonomy.yaml` (folder → intent → concept) and `concepts/*.yaml` (per-note-type frontmatter declarations). Enforced by `vault-lint` and `oms_validate_contract`.
|
|
99
|
-
- **Governance (human intent)** — `governance/` ADRs and rules; never machine-parsed.
|
|
100
|
-
- `.oms/cache/` (derived graph/embedding artifacts) is gitignored.
|
|
101
|
-
|
|
102
|
-
`setup` writes `.oms/taxonomy.yaml`, preserves existing `.oms/concepts/`, and never modifies your notes.
|
|
50
|
+
The seven skills (`write`, `search`, `link`, `distill`, `status`, `doctor`, `template`) are workflow guidance, not a tool-equality list. Detail capabilities remain `op` values under the five tools.
|
|
103
51
|
|
|
104
|
-
|
|
52
|
+
Writes resolve one `ResolvedTemplate` and support create, append, and update. Template mutation, projection regeneration, and one-note identity backfill require a verified target and explicit approval digest. `status` and every search operation are read-only.
|
|
105
53
|
|
|
106
|
-
|
|
54
|
+
Plain lexical search is projection-independent. Typed template/declared-field/folder/link axes use the same projection as writes and fail loudly when it is missing or stale. Managed template sources are excluded. Vector and HyDE requests fail loudly unless both embedding provider and model are configured.
|
|
107
55
|
|
|
108
|
-
|
|
109
|
-
oms setup --vault /path/to/vault --yes --embedding-default
|
|
110
|
-
oms embed --vault /path/to/vault
|
|
111
|
-
oms semantic vsearch "what should I retrieve?" --vault /path/to/vault
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
`--embedding-default` downloads EmbeddingGemma-300M (~318 MB), verifies it against a pinned SHA-256, and installs it under your user cache — not in the vault. It runs locally through `node-llama-cpp`, needs no API key, and embeds at the model's full 768 dimensions with no folding. After that, `oms embed` and vector search need no environment variables.
|
|
115
|
-
|
|
116
|
-
One thing to know before you rely on it: this is the same model and prompt format [qmd](https://github.com/tobi/qmd) resolves by default, but it has never been measured in this project's own retrieval harness. Its ranking quality here rests on that equivalence, not on a measured comparison against alternatives. [The decision record](https://github.com/GoBeromsu/oh-my-second-brain/blob/main/docs/measurements/model-default-deferral.md) explains why, and why the measurement is not merely pending.
|
|
117
|
-
|
|
118
|
-
To choose your own model instead, set `OMS_EMBEDDING_PROVIDER` + `OMS_EMBEDDING_MODEL` (`gguf` with a local GGUF path, or `upstage` with a model id and `UPSTAGE_API_KEY`). Setting only one of the pair is an error naming both, never a silent fallback.
|
|
119
|
-
|
|
120
|
-
Without any model, lexical search, graph-based retrieval, and convention validation all still work; only vector and HyDE requests are refused, and they say which variables to set.
|
|
56
|
+
## Install
|
|
121
57
|
|
|
122
|
-
|
|
58
|
+
Node.js 20 or later is required.
|
|
123
59
|
|
|
124
60
|
```bash
|
|
125
|
-
npm install
|
|
126
|
-
|
|
127
|
-
npm test
|
|
128
|
-
npm run release:check # lint + build + test + audit + pack + artifact-smoke + plugin validate
|
|
61
|
+
npm install -g oh-my-second-brain
|
|
62
|
+
oms install --runtime all --vault /path/to/vault --yes
|
|
129
63
|
```
|
|
130
64
|
|
|
131
|
-
|
|
65
|
+
Host installation records the canonical vault in `${XDG_CONFIG_HOME:-~/.config}/oms/vault.json` and stamps `oms mcp --vault /path/to/vault` into each managed host entry. `install`, `update`, `reconcile`, and `uninstall` use that signed pointer only to maintain host stamps. Runtime write/search target resolution never reads it and keeps this precedence: explicit target, local vault controls, bridge, `OMS_VAULT`, then read-only cwd fallback.
|
|
132
66
|
|
|
133
|
-
|
|
67
|
+
`OMS_VAULT` is the supported environment fallback when no explicit, local, or bridge target exists.
|
|
134
68
|
|
|
135
|
-
|
|
69
|
+
See [installation](./docs/install.md), [architecture](./docs/architecture.md), [conventions](./docs/conventions.md), and [verified targets](./docs/verified-target.md).
|
package/assets/claude/CLAUDE.md
CHANGED
|
@@ -1,25 +1,21 @@
|
|
|
1
|
-
# Oh My Second Brain
|
|
1
|
+
# Oh My Second Brain — Claude Code
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
This vault is governed by user-owned template conventions in `.oms/`.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Before vault work:
|
|
6
|
+
- Treat actual Obsidian `.md` templates as the note-shape and body source of truth.
|
|
7
|
+
- Treat `.obsidian/types.json` as read-only property-type authority.
|
|
8
|
+
- Read the user-owned ontology from `.oms/template-policy.json` for note/field meaning and policy, and `.oms/taxonomy.yaml` for folder/link meaning and placement.
|
|
9
|
+
- Never hand-edit derived `.oms/types.json`; use doctor diagnosis and an approved regeneration.
|
|
10
|
+
- People and agents follow the same stable `templateId` rules.
|
|
6
11
|
|
|
7
|
-
|
|
8
|
-
|
|
12
|
+
Writes:
|
|
13
|
+
- Use `/write` and MCP `oms_write`; never host Write/Edit for vault notes or managed templates.
|
|
14
|
+
- Notes use `op: "note"` with a stable template ID.
|
|
15
|
+
- Template changes use `op: "template"`: dry-run first, then apply only with the exact reviewed `approvalDigest`.
|
|
9
16
|
|
|
10
|
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
- Read `.oms/concepts/*.yaml` to understand field requirements and lenses.
|
|
17
|
+
Retrieval:
|
|
18
|
+
- Use `/search`; discover identities with `op: "templates"`.
|
|
19
|
+
- Filter with template, declared field, folder, and link axes. Plain lexical search remains read-only and projection-independent.
|
|
14
20
|
|
|
15
|
-
|
|
16
|
-
- Use the `/write` skill. Call MCP `oms_write`. Do not use host Write/Edit for vault `.md` files.
|
|
17
|
-
- The kernel fills and checks frontmatter from `.oms`. `ask` or `rejected` means fix and call `oms_write` again.
|
|
18
|
-
|
|
19
|
-
**When retrieving knowledge:**
|
|
20
|
-
- Use the `/search` skill.
|
|
21
|
-
- Apply the concept's declared lens for the retrieval purpose (synthesis, audit, etc.).
|
|
22
|
-
- Return only the fields the lens specifies — do not dump full frontmatter.
|
|
23
|
-
|
|
24
|
-
**Doctor is advisory. Write is not.**
|
|
25
|
-
`oms doctor` always exits 0. MCP `oms_write` rejects contract violations.
|
|
21
|
+
`status` is observational. `doctor` owns explicit diagnosis and repairs. The seven installed skills are write, search, link, distill, status, doctor, and tool-less template authoring.
|
package/assets/codex/AGENTS.md
CHANGED
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
# Oh My Second Brain Convention Shim — Codex
|
|
2
2
|
|
|
3
|
-
<!-- Append this block to
|
|
3
|
+
<!-- Append this block to a project's AGENTS.md to activate Oh My Second Brain conventions in Codex. -->
|
|
4
4
|
|
|
5
|
-
## Vault Convention
|
|
5
|
+
## Vault Convention
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
The vault is governed by user-owned template conventions in `.oms/`.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
9
|
+
- Actual Obsidian `.md` templates own note shape and body scaffolding.
|
|
10
|
+
- `.obsidian/types.json` is read-only type authority.
|
|
11
|
+
- 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.
|
|
12
|
+
- `.oms/types.json` is derived; never hand-edit it.
|
|
13
|
+
- Humans and agents use the same stable `templateId` rules.
|
|
12
14
|
|
|
13
|
-
**Write:** Use `$oms-write
|
|
14
|
-
**Retrieve:** Use the `$oms-search` skill with declared lenses.
|
|
15
|
+
**Write:** Use `$oms-write` and MCP `oms_write`, never host Write/Edit for vault notes or managed templates. Notes use `op: "note"`. Template changes use `op: "template"`, first as a dry-run and then only with the exact reviewed `approvalDigest`.
|
|
15
16
|
|
|
16
|
-
|
|
17
|
+
**Retrieve:** Use `$oms-search`; discover stable IDs with `op: "templates"`, then use template, declared field, folder, and link axes.
|
|
18
|
+
|
|
19
|
+
**Maintain:** `$oms-status` is read-only. `$oms-doctor` diagnoses and performs explicit repairs.
|
|
20
|
+
|
|
21
|
+
`oms install --runtime codex` installs seven skills: `$oms-write`, `$oms-search`, `$oms-link`, `$oms-distill`, `$oms-status`, `$oms-doctor`, and tool-less `$oms-template`, plus managed MCP configuration.
|
|
@@ -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.
|