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.
Files changed (214) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/.claude-plugin/plugin.json +2 -1
  3. package/.codex-plugin/plugin.json +1 -1
  4. package/CHANGELOG-assets.md +7 -1
  5. package/CHANGELOG-cli.md +7 -0
  6. package/CHANGELOG-kernel.md +9 -0
  7. package/CHANGELOG-mcp.md +8 -0
  8. package/CHANGELOG-vendors.md +6 -0
  9. package/CHANGELOG.md +7 -1
  10. package/README.ko.md +34 -100
  11. package/README.md +35 -101
  12. package/assets/claude/CLAUDE.md +16 -20
  13. package/assets/codex/AGENTS.md +14 -9
  14. package/assets/codex/rules/oms.md +11 -12
  15. package/assets/hermes/SOUL.md +11 -13
  16. package/assets/hermes-manifest.json +1 -1
  17. package/assets/skills/doctor/SKILL.md +10 -9
  18. package/assets/skills/search/SKILL.md +9 -20
  19. package/assets/skills/status/SKILL.md +3 -9
  20. package/assets/skills/template/SKILL.md +29 -0
  21. package/assets/skills/write/SKILL.md +20 -14
  22. package/core/AGENTS.md +41 -104
  23. package/dist/cli/args.d.ts +3 -2
  24. package/dist/cli/args.js +31 -17
  25. package/dist/cli/args.js.map +1 -1
  26. package/dist/cli/audit.d.ts +0 -1
  27. package/dist/cli/audit.js +45 -80
  28. package/dist/cli/audit.js.map +1 -1
  29. package/dist/cli/doctor-lint.d.ts +1 -1
  30. package/dist/cli/doctor-lint.js +23 -65
  31. package/dist/cli/doctor-lint.js.map +1 -1
  32. package/dist/cli/host-commands.d.ts +7 -7
  33. package/dist/cli/host-commands.js +102 -25
  34. package/dist/cli/host-commands.js.map +1 -1
  35. package/dist/cli/linkify.d.ts +2 -3
  36. package/dist/cli/linkify.js +9 -9
  37. package/dist/cli/linkify.js.map +1 -1
  38. package/dist/cli/oms.js +15 -19
  39. package/dist/cli/oms.js.map +1 -1
  40. package/dist/cli/setup-command.d.ts +4 -9
  41. package/dist/cli/setup-command.js +28 -132
  42. package/dist/cli/setup-command.js.map +1 -1
  43. package/dist/cli/usage.js +24 -11
  44. package/dist/cli/usage.js.map +1 -1
  45. package/dist/kernel/capture/safe.d.ts +43 -97
  46. package/dist/kernel/capture/safe.js +288 -517
  47. package/dist/kernel/capture/safe.js.map +1 -1
  48. package/dist/kernel/contracts/index.d.ts +3 -138
  49. package/dist/kernel/contracts/index.js +22 -340
  50. package/dist/kernel/contracts/index.js.map +1 -1
  51. package/dist/kernel/conventions/frontmatter.js +5 -4
  52. package/dist/kernel/conventions/frontmatter.js.map +1 -1
  53. package/dist/kernel/conventions/lint.js +4 -1
  54. package/dist/kernel/conventions/lint.js.map +1 -1
  55. package/dist/kernel/conventions/note-exclude.d.ts +9 -2
  56. package/dist/kernel/conventions/note-exclude.js +105 -14
  57. package/dist/kernel/conventions/note-exclude.js.map +1 -1
  58. package/dist/kernel/conventions/report.d.ts +0 -51
  59. package/dist/kernel/conventions/report.js +36 -204
  60. package/dist/kernel/conventions/report.js.map +1 -1
  61. package/dist/kernel/conventions/write-contract.d.ts +11 -25
  62. package/dist/kernel/conventions/write-contract.js +42 -78
  63. package/dist/kernel/conventions/write-contract.js.map +1 -1
  64. package/dist/kernel/conventions/write-protocol.d.ts +1 -10
  65. package/dist/kernel/conventions/write-protocol.js +1 -1
  66. package/dist/kernel/conventions/write-protocol.js.map +1 -1
  67. package/dist/kernel/doctor/service.d.ts +2 -4
  68. package/dist/kernel/doctor/service.js +12 -12
  69. package/dist/kernel/doctor/service.js.map +1 -1
  70. package/dist/kernel/engine/axes/store.js +3 -3
  71. package/dist/kernel/engine/axes/store.js.map +1 -1
  72. package/dist/kernel/engine/embed/sync.js +12 -6
  73. package/dist/kernel/engine/embed/sync.js.map +1 -1
  74. package/dist/kernel/engine/graph/builder.d.ts +19 -64
  75. package/dist/kernel/engine/graph/builder.js +241 -461
  76. package/dist/kernel/engine/graph/builder.js.map +1 -1
  77. package/dist/kernel/engine/graph/explore.d.ts +4 -4
  78. package/dist/kernel/engine/graph/explore.js +0 -0
  79. package/dist/kernel/engine/graph/explore.js.map +1 -1
  80. package/dist/kernel/engine/graph/node.d.ts +29 -93
  81. package/dist/kernel/engine/graph/node.js +87 -234
  82. package/dist/kernel/engine/graph/node.js.map +1 -1
  83. package/dist/kernel/engine/linkify/suggest.d.ts +0 -9
  84. package/dist/kernel/engine/linkify/suggest.js +0 -11
  85. package/dist/kernel/engine/linkify/suggest.js.map +1 -1
  86. package/dist/kernel/engine/linkify/types.d.ts +1 -3
  87. package/dist/kernel/engine/mcp/facade.d.ts +3 -3
  88. package/dist/kernel/engine/mcp/facade.js +95 -327
  89. package/dist/kernel/engine/mcp/facade.js.map +1 -1
  90. package/dist/kernel/engine/mcp/types.d.ts +2 -2
  91. package/dist/kernel/engine/tracer.js +7 -3
  92. package/dist/kernel/engine/tracer.js.map +1 -1
  93. package/dist/kernel/graph/cache.d.ts +1 -84
  94. package/dist/kernel/graph/cache.js +5 -438
  95. package/dist/kernel/graph/cache.js.map +1 -1
  96. package/dist/kernel/graph/explore.d.ts +32 -24
  97. package/dist/kernel/graph/explore.js +32 -101
  98. package/dist/kernel/graph/explore.js.map +1 -1
  99. package/dist/kernel/harness/surface-registry.js +9 -7
  100. package/dist/kernel/harness/surface-registry.js.map +1 -1
  101. package/dist/kernel/index.d.ts +0 -4
  102. package/dist/kernel/index.js +0 -4
  103. package/dist/kernel/index.js.map +1 -1
  104. package/dist/kernel/install/hosts.d.ts +1 -0
  105. package/dist/kernel/install/hosts.js +1 -0
  106. package/dist/kernel/install/hosts.js.map +1 -1
  107. package/dist/kernel/install/pointer.d.ts +28 -0
  108. package/dist/kernel/install/pointer.js +232 -0
  109. package/dist/kernel/install/pointer.js.map +1 -0
  110. package/dist/kernel/link/link.d.ts +4 -2
  111. package/dist/kernel/link/link.js +6 -4
  112. package/dist/kernel/link/link.js.map +1 -1
  113. package/dist/kernel/link/workflow.d.ts +17 -7
  114. package/dist/kernel/link/workflow.js +66 -56
  115. package/dist/kernel/link/workflow.js.map +1 -1
  116. package/dist/kernel/runtime/assets.d.ts +3 -14
  117. package/dist/kernel/runtime/assets.js +9 -37
  118. package/dist/kernel/runtime/assets.js.map +1 -1
  119. package/dist/kernel/search/morning-test-fixtures.js +22 -27
  120. package/dist/kernel/search/morning-test-fixtures.js.map +1 -1
  121. package/dist/kernel/setup/documents.d.ts +25 -14
  122. package/dist/kernel/setup/documents.js +10 -111
  123. package/dist/kernel/setup/documents.js.map +1 -1
  124. package/dist/kernel/setup/service.d.ts +16 -35
  125. package/dist/kernel/setup/service.js +16 -91
  126. package/dist/kernel/setup/service.js.map +1 -1
  127. package/dist/kernel/templates/axes.d.ts +29 -0
  128. package/dist/kernel/templates/axes.js +45 -0
  129. package/dist/kernel/templates/axes.js.map +1 -0
  130. package/dist/kernel/templates/canonical.d.ts +8 -0
  131. package/dist/kernel/templates/canonical.js +193 -0
  132. package/dist/kernel/templates/canonical.js.map +1 -0
  133. package/dist/kernel/templates/defaults.d.ts +17 -0
  134. package/dist/kernel/templates/defaults.js +127 -0
  135. package/dist/kernel/templates/defaults.js.map +1 -0
  136. package/dist/kernel/templates/doctor.d.ts +40 -0
  137. package/dist/kernel/templates/doctor.js +226 -0
  138. package/dist/kernel/templates/doctor.js.map +1 -0
  139. package/dist/kernel/templates/extract.d.ts +31 -0
  140. package/dist/kernel/templates/extract.js +136 -0
  141. package/dist/kernel/templates/extract.js.map +1 -0
  142. package/dist/kernel/templates/index.d.ts +19 -0
  143. package/dist/kernel/templates/index.js +11 -0
  144. package/dist/kernel/templates/index.js.map +1 -0
  145. package/dist/kernel/templates/migration.d.ts +63 -0
  146. package/dist/kernel/templates/migration.js +733 -0
  147. package/dist/kernel/templates/migration.js.map +1 -0
  148. package/dist/kernel/templates/naming.d.ts +10 -0
  149. package/dist/kernel/templates/naming.js +47 -0
  150. package/dist/kernel/templates/naming.js.map +1 -0
  151. package/dist/kernel/templates/note-index.d.ts +33 -0
  152. package/dist/kernel/templates/note-index.js +125 -0
  153. package/dist/kernel/templates/note-index.js.map +1 -0
  154. package/dist/kernel/templates/paths.d.ts +29 -0
  155. package/dist/kernel/templates/paths.js +132 -0
  156. package/dist/kernel/templates/paths.js.map +1 -0
  157. package/dist/kernel/templates/policy.d.ts +59 -0
  158. package/dist/kernel/templates/policy.js +308 -0
  159. package/dist/kernel/templates/policy.js.map +1 -0
  160. package/dist/kernel/templates/resolver.d.ts +18 -0
  161. package/dist/kernel/templates/resolver.js +598 -0
  162. package/dist/kernel/templates/resolver.js.map +1 -0
  163. package/dist/kernel/templates/transaction.d.ts +8 -0
  164. package/dist/kernel/templates/transaction.js +452 -0
  165. package/dist/kernel/templates/transaction.js.map +1 -0
  166. package/dist/kernel/templates/types.d.ts +368 -0
  167. package/dist/kernel/{ontology → templates}/types.js.map +1 -1
  168. package/dist/kernel/update/update.js +1 -1
  169. package/dist/kernel/update/update.js.map +1 -1
  170. package/dist/mcp/link-tools.d.ts +3 -4
  171. package/dist/mcp/link-tools.js +3 -18
  172. package/dist/mcp/link-tools.js.map +1 -1
  173. package/dist/mcp/server.js +383 -219
  174. package/dist/mcp/server.js.map +1 -1
  175. package/dist/vendors/claude/claude-hooks.js +24 -6
  176. package/dist/vendors/claude/claude-hooks.js.map +1 -1
  177. package/dist/vendors/claude/hook/post-tool-use.d.ts +2 -11
  178. package/dist/vendors/claude/hook/post-tool-use.js +48 -81
  179. package/dist/vendors/claude/hook/post-tool-use.js.map +1 -1
  180. package/docs/architecture.md +45 -0
  181. package/docs/conventions.md +64 -0
  182. package/docs/install.md +41 -141
  183. package/docs/verified-target.md +41 -0
  184. package/package.json +5 -3
  185. package/core/ontology/concepts/inbox.yaml +0 -4
  186. package/core/ontology/concepts/literature.yaml +0 -27
  187. package/core/ontology/concepts/term.yaml +0 -12
  188. package/core/ontology/schemas/README.md +0 -55
  189. package/core/ontology/schemas/concept.schema.yaml +0 -70
  190. package/core/ontology/schemas/note.schema.yaml +0 -40
  191. package/core/ontology/taxonomy.yaml +0 -14
  192. package/dist/kernel/conventions/validate.d.ts +0 -24
  193. package/dist/kernel/conventions/validate.js +0 -88
  194. package/dist/kernel/conventions/validate.js.map +0 -1
  195. package/dist/kernel/engine/conventions/vault-lint.d.ts +0 -112
  196. package/dist/kernel/engine/conventions/vault-lint.js +0 -213
  197. package/dist/kernel/engine/conventions/vault-lint.js.map +0 -1
  198. package/dist/kernel/engine/linkify/apply.d.ts +0 -56
  199. package/dist/kernel/engine/linkify/apply.js +0 -65
  200. package/dist/kernel/engine/linkify/apply.js.map +0 -1
  201. package/dist/kernel/ontology/active.d.ts +0 -7
  202. package/dist/kernel/ontology/active.js +0 -41
  203. package/dist/kernel/ontology/active.js.map +0 -1
  204. package/dist/kernel/ontology/loader.d.ts +0 -2
  205. package/dist/kernel/ontology/loader.js +0 -54
  206. package/dist/kernel/ontology/loader.js.map +0 -1
  207. package/dist/kernel/ontology/resolver.d.ts +0 -2
  208. package/dist/kernel/ontology/resolver.js +0 -23
  209. package/dist/kernel/ontology/resolver.js.map +0 -1
  210. package/dist/kernel/ontology/types.d.ts +0 -47
  211. package/dist/kernel/setup/axis.d.ts +0 -36
  212. package/dist/kernel/setup/axis.js +0 -232
  213. package/dist/kernel/setup/axis.js.map +0 -1
  214. /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.8.4",
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.8.4"
40
+ "version": "0.9.0"
41
41
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oms",
3
- "version": "0.8.4",
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.8.4",
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/",
@@ -1,9 +1,15 @@
1
1
  # Assets Changelog
2
2
 
3
- Skills, agents, and ontology data changes belong here.
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
@@ -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
@@ -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 ontology data
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
- > Obsidian 일반 마크다운 지식 볼트를 위한, 호스트에 종속되지 않고 사용자가 소유하는 컨벤션 레이어.
3
+ Oh My Second Brain(`oms`)은 기존 Obsidian/Markdown 볼트를 노트 소유권을 빼앗지 않고 AI 호스트에 연결한다. 볼트는 계속 평범한 Markdown이다.
4
4
 
5
- [English](./README.md) · **한국어**
5
+ ## 템플릿·온톨로지 볼트 모델
6
6
 
7
- [![npm](https://img.shields.io/npm/v/oh-my-second-brain)](https://www.npmjs.com/package/oh-my-second-brain)
8
- ![license](https://img.shields.io/npm/l/oh-my-second-brain)
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
- Oh My Second Brain(`oms`)은 기존 Obsidian/마크다운 볼트를 에이전트가 읽을 있는 지식 베이스로 만든다. 볼트가 가진 고유한 폴더/프론트매터 컨벤션을 로드하고, 그에 맞게 노트를 검증하고, 로컬 링크 그래프를 만들고, 이 모든 것을 단일 MCP 서버를 통해 AI 코딩 호스트(Claude Code, Codex, Hermes)에 노출한다. 특정 호스트에 종속되지 않으며 노트를 다른 곳으로 옮기지도 않는다.
14
+ 제거된 것은 노트 정체성으로서의 `concept`와 번들 runtime 기본값이지, 의미 계층으로서의 온톨로지가 아니다.
11
15
 
12
- **컨벤션 우선, 사용자 소유**가 원칙이다. 볼트는 그대로 일반 마크다운으로 남고, 온톨로지는 사용자가 통제하는 커밋된 `.oms/` 폴더에 살며, 어떤 것도 독점 저장소 뒤에 숨지 않는다.
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
- npm install -g oh-my-second-brain
54
- oms install --runtime all --vault /path/to/vault --dry-run # 미리보기
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
- 전체 가이드: [docs/install.md](./docs/install.md).
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 기존 볼트를 컨벤션으로 채택 (.oms/taxonomy.yaml 작성, 노트는 수정하지 않음)
74
- oms install 호스트 어댑터 + MCP 등록 설치
75
- oms uninstall 호스트 어댑터 + MCP 등록 제거
29
+ ```text
30
+ oms setup 기존 볼트 템플릿 탐색 채택
31
+ oms install 호스트 어댑터와 관리형 MCP 등록 설치
32
+ oms uninstall 호스트 어댑터와 관리형 MCP 등록 제거
76
33
  oms update 패키지 업데이트 확인/적용 후 어댑터 재조정
77
- oms doctor 온톨로지 기준으로 노트 frontmatter 검증 (필드/컨셉별 집계)
78
- oms lint 볼트 링크 건강도 점검: 깨진 [[wikilink]] + 고아 노트
79
- oms semantic 네이티브 마크다운 시맨틱 인덱스 / 검색 / 조회
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 볼트 가드 훅 (Claude Code pre/post tool-use)
39
+ oms hook Claude pre/post tool-use 볼트 가드 실행
82
40
  ```
83
41
 
84
- `oh-my-second-brain`이 정식 명령이고, `oms`는 짧은 별칭이다.
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
- `oms_write`는 경로 안전성, 볼트 격리, 커널이 소유한 컨셉 계약으로 게이트된다.
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
- 시맨틱 검색에는 실제 임베딩 모델이 필요하다 프로덕션 경로에 가짜/해시 폴백은 없다(ADR-007). 가장 간단한 경로는 고정된 로컬 기본 모델이다:
54
+ 일반 lexical 검색은 projection과 독립적이다. 템플릿·선언 필드·폴더·링크 축은 쓰기와 같은 projection을 사용하며 누락·stale 상태를 크게 실패시킨다. 관리 템플릿 원본은 검색 대상에서 제외한다. Vector/HyDE는 provider와 model이 모두 설정되지 않으면 가짜 대체 없이 실패한다.
107
55
 
108
- ```bash
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
- npm run build
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
- 릴리스 절차: [docs/release.md](https://github.com/GoBeromsu/oh-my-second-brain/blob/main/docs/release.md).
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
- MIT. 상위 출처 크레딧은 [ACKNOWLEDGMENTS.md](./ACKNOWLEDGMENTS.md) 참고.
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
- > A host-agnostic, user-owned convention layer for Obsidian and plain-markdown knowledge vaults.
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
- **English** · [한국어](./README.ko.md)
5
+ ## Template and ontology vault model
6
6
 
7
- [![npm](https://img.shields.io/npm/v/oh-my-second-brain)](https://www.npmjs.com/package/oh-my-second-brain)
8
- ![license](https://img.shields.io/npm/l/oh-my-second-brain)
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
- Oh My Second Brain (`oms`) turns an existing Obsidian/markdown vault into an agent-readable knowledge base. It loads your vault's own folder/frontmatter conventions, validates notes against them, builds a local link graph, and exposes all of it to AI coding hosts (Claude Code, Codex, Hermes) through a single MCP server without locking you into any one host or moving your notes.
14
+ The retired model is `concept` as note identity and bundled runtime defaultsnot ontology as semantic meaning.
11
15
 
12
- It is **convention-first and user-owned**: your vault stays plain markdown, the ontology lives in a committed `.oms/` folder you control, and nothing is hidden behind a proprietary store.
16
+ ## Setup
13
17
 
14
- ## How it works
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
- npm install -g oh-my-second-brain
54
- oms install --runtime all --vault /path/to/vault --dry-run # preview
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
- Full guide: [docs/install.md](./docs/install.md).
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 Adopt an existing vault into the convention (writes .oms/taxonomy.yaml; never edits notes)
74
- oms install Install host assets + MCP registration
75
- oms uninstall Remove host assets + MCP registration
76
- oms update Check/apply a package update, then reconcile host assets
77
- oms doctor Validate note frontmatter against the ontology (aggregated by field & concept)
78
- oms lint Check vault link health: broken [[wikilinks]] + orphan notes
79
- oms semantic Native markdown semantic index / search / get
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 Vault guard hooks (Claude Code pre/post tool-use)
39
+ oms hook Run Claude pre/post tool-use vault guards
82
40
  ```
83
41
 
84
- `oh-my-second-brain` is the canonical command; `oms` is the short alias.
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
- `oms_write` is gated by path-safety, vault-confinement, and the kernel-owned concept contract.
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
- ## Semantic search (optional)
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
- Semantic retrieval requires a real embedding model there is no fake/hash fallback (ADR-007). The quickest path is the pinned local default:
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
- ```bash
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
- ## Development
58
+ Node.js 20 or later is required.
123
59
 
124
60
  ```bash
125
- npm install
126
- npm run build
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
- Release process: [docs/release.md](https://github.com/GoBeromsu/oh-my-second-brain/blob/main/docs/release.md).
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
- ## License
67
+ `OMS_VAULT` is the supported environment fallback when no explicit, local, or bridge target exists.
134
68
 
135
- MIT. See [ACKNOWLEDGMENTS.md](./ACKNOWLEDGMENTS.md) for upstream credits.
69
+ See [installation](./docs/install.md), [architecture](./docs/architecture.md), [conventions](./docs/conventions.md), and [verified targets](./docs/verified-target.md).
@@ -1,25 +1,21 @@
1
- # Oh My Second Brain Convention Fragment
1
+ # Oh My Second Brain Claude Code
2
2
 
3
- <!-- Append this block to your project's CLAUDE.md to activate Oh My Second Brain conventions in Claude Code. -->
3
+ This vault is governed by user-owned template conventions in `.oms/`.
4
4
 
5
- ## Vault Convention (Oh My Second Brain)
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
- This vault is governed by Oh My Second Brain conventions stored in `.oms/`.
8
- All knowledge capture and retrieval must follow the declared semantic convention.
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
- **Before working with vault notes:**
11
- - Run `oms doctor` to validate existing notes against the convention (exits 0, non-blocking).
12
- - Read `.oms/taxonomy.yaml` to understand which folders hold which concepts.
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
- **When writing vault notes:**
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.
@@ -1,16 +1,21 @@
1
1
  # Oh My Second Brain Convention Shim — Codex
2
2
 
3
- <!-- Append this block to your project's AGENTS.md to activate Oh My Second Brain conventions in Codex (oh-my-codex). -->
3
+ <!-- Append this block to a project's AGENTS.md to activate Oh My Second Brain conventions in Codex. -->
4
4
 
5
- ## Vault Convention (Oh My Second Brain)
5
+ ## Vault Convention
6
6
 
7
- This vault is governed by Oh My Second Brain conventions stored in `.oms/`.
7
+ The vault is governed by user-owned template conventions in `.oms/`.
8
8
 
9
- **Before working with vault notes:**
10
- - Run `oms doctor` to validate notes against the convention (exits 0, non-blocking).
11
- - Read `.oms/taxonomy.yaml` and `.oms/concepts/*.yaml` for folder and field declarations.
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`. Call MCP `oms_write`. Do not use host Write/Edit for vault `.md` files.
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
- > **v0 native install:** `oms install --runtime codex` installs Codex rules, the `$oms-write`, `$oms-search`, `$oms-link`, `$oms-distill`, `$oms-status`, and `$oms-doctor` skills, and a managed Codex MCP config. Use Oh My Second Brain MCP tools for vault operations and CLI commands for lifecycle.
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 when the user asks to set up, validate, capture into, retrieve from, or inspect an Obsidian/Markdown vault governed by `vault/.oms/`.
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
- Oh My Second Brain is a convention harness, not a content generator. The user owns the ontology in `vault/.oms/`; agents must use the declared folder axis, frontmatter/property axes, wikilinks, and retrieval lenses before reading or writing notes.
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 Oh My Second Brain surface |
11
+ | User intent | Preferred surface |
12
12
  |---|---|
13
- | adopt a vault | `oms setup --vault <path>` |
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
- | uninstall host integration | `oms uninstall --runtime codex --yes` |
16
- | validate notes | `$oms-doctor` or `oms doctor --vault <path>` |
17
- | write a vault note | use `$oms-write` / MCP `oms_write` (`create`, `append`, or `update`) |
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 `vault/.oms/` during uninstall.
23
- - Capture must stay inside the configured vault and target Markdown files only.
24
- - If required frontmatter is missing, ask for it; do not invent user-owned ontology values.
25
- - Route ambiguous captures to inbox when the ontology cannot decide.
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.