oh-my-second-brain 0.16.0 → 0.17.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 (367) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/.claude-plugin/plugin.json +2 -5
  3. package/.codex-plugin/plugin.json +1 -1
  4. package/ACKNOWLEDGMENTS.md +2 -2
  5. package/CHANGELOG-assets.md +5 -0
  6. package/CHANGELOG-cli.md +8 -0
  7. package/CHANGELOG-kernel.md +7 -0
  8. package/CHANGELOG-mcp.md +7 -0
  9. package/CHANGELOG-vendors.md +6 -0
  10. package/CHANGELOG.md +4 -0
  11. package/README.ko.md +31 -33
  12. package/README.md +22 -24
  13. package/assets/claude/CLAUDE.md +40 -58
  14. package/assets/claude/hooks/oms-guard.mjs +304 -75
  15. package/assets/codex/AGENTS.md +38 -58
  16. package/assets/codex/rules/oms.md +21 -30
  17. package/assets/hermes/README.md +10 -13
  18. package/assets/hermes/SOUL.md +34 -67
  19. package/assets/hermes-manifest.json +2 -2
  20. package/assets/skills/distill/SKILL.md +1 -1
  21. package/assets/skills/doctor/SKILL.md +8 -8
  22. package/assets/skills/link/SKILL.md +3 -3
  23. package/assets/skills/search/SKILL.md +11 -18
  24. package/assets/skills/status/SKILL.md +14 -11
  25. package/assets/skills/write/SKILL.md +16 -46
  26. package/core/AGENTS.md +40 -40
  27. package/dist/cli/args.d.ts +6 -18
  28. package/dist/cli/args.js +11 -135
  29. package/dist/cli/args.js.map +1 -1
  30. package/dist/cli/audit.js +42 -49
  31. package/dist/cli/audit.js.map +1 -1
  32. package/dist/cli/contract-command.d.ts +16 -0
  33. package/dist/cli/contract-command.js +259 -0
  34. package/dist/cli/contract-command.js.map +1 -0
  35. package/dist/cli/engine-session.d.ts +1 -1
  36. package/dist/cli/engine-session.js +4 -4
  37. package/dist/cli/engine-session.js.map +1 -1
  38. package/dist/cli/host-commands.d.ts +2 -2
  39. package/dist/cli/host-commands.js +2 -2
  40. package/dist/cli/host-commands.js.map +1 -1
  41. package/dist/cli/host-probe.js +10 -42
  42. package/dist/cli/host-probe.js.map +1 -1
  43. package/dist/cli/link-command.d.ts +2 -2
  44. package/dist/cli/link-command.js +81 -40
  45. package/dist/cli/link-command.js.map +1 -1
  46. package/dist/cli/model-command.js +7 -7
  47. package/dist/cli/model-command.js.map +1 -1
  48. package/dist/cli/note-command.js +4 -170
  49. package/dist/cli/note-command.js.map +1 -1
  50. package/dist/cli/oms.d.ts +1 -1
  51. package/dist/cli/oms.js +22 -78
  52. package/dist/cli/oms.js.map +1 -1
  53. package/dist/cli/search-usage.js +1 -1
  54. package/dist/cli/setup-command.d.ts +4 -23
  55. package/dist/cli/setup-command.js +41 -76
  56. package/dist/cli/setup-command.js.map +1 -1
  57. package/dist/cli/status-command.js +8 -30
  58. package/dist/cli/status-command.js.map +1 -1
  59. package/dist/cli/usage.js +12 -39
  60. package/dist/cli/usage.js.map +1 -1
  61. package/dist/kernel/capture/safe.d.ts +0 -4
  62. package/dist/kernel/capture/safe.js +12 -5
  63. package/dist/kernel/capture/safe.js.map +1 -1
  64. package/dist/kernel/contract/audit.d.ts +15 -0
  65. package/dist/kernel/contract/audit.js +51 -0
  66. package/dist/kernel/contract/audit.js.map +1 -0
  67. package/dist/kernel/contract/contract-vault-fixture.d.ts +45 -0
  68. package/dist/kernel/contract/contract-vault-fixture.js +53 -0
  69. package/dist/kernel/contract/contract-vault-fixture.js.map +1 -0
  70. package/dist/kernel/contract/drift.d.ts +6 -0
  71. package/dist/kernel/contract/drift.js +27 -0
  72. package/dist/kernel/contract/drift.js.map +1 -0
  73. package/dist/kernel/contract/extract.d.ts +37 -0
  74. package/dist/kernel/contract/extract.js +101 -0
  75. package/dist/kernel/contract/extract.js.map +1 -0
  76. package/dist/kernel/contract/folders-axis.d.ts +17 -0
  77. package/dist/kernel/contract/folders-axis.js +19 -0
  78. package/dist/kernel/contract/folders-axis.js.map +1 -0
  79. package/dist/kernel/contract/fs-private.d.ts +6 -0
  80. package/dist/kernel/contract/fs-private.js +42 -0
  81. package/dist/kernel/contract/fs-private.js.map +1 -0
  82. package/dist/kernel/contract/guard-events.d.ts +16 -0
  83. package/dist/kernel/contract/guard-events.js +40 -0
  84. package/dist/kernel/contract/guard-events.js.map +1 -0
  85. package/dist/kernel/contract/interview.d.ts +65 -0
  86. package/dist/kernel/contract/interview.js +525 -0
  87. package/dist/kernel/contract/interview.js.map +1 -0
  88. package/dist/kernel/contract/judge-write.d.ts +51 -0
  89. package/dist/kernel/contract/judge-write.js +99 -0
  90. package/dist/kernel/contract/judge-write.js.map +1 -0
  91. package/dist/kernel/contract/judge.d.ts +9 -0
  92. package/dist/kernel/contract/judge.js +285 -0
  93. package/dist/kernel/contract/judge.js.map +1 -0
  94. package/dist/kernel/contract/obsidian.d.ts +16 -0
  95. package/dist/kernel/contract/obsidian.js +68 -0
  96. package/dist/kernel/contract/obsidian.js.map +1 -0
  97. package/dist/kernel/contract/redact.d.ts +17 -0
  98. package/dist/kernel/contract/redact.js +99 -0
  99. package/dist/kernel/contract/redact.js.map +1 -0
  100. package/dist/kernel/contract/scan.d.ts +35 -0
  101. package/dist/kernel/contract/scan.js +409 -0
  102. package/dist/kernel/contract/scan.js.map +1 -0
  103. package/dist/kernel/contract/status.d.ts +60 -0
  104. package/dist/kernel/contract/status.js +89 -0
  105. package/dist/kernel/contract/status.js.map +1 -0
  106. package/dist/kernel/contract/store.d.ts +90 -0
  107. package/dist/kernel/contract/store.js +640 -0
  108. package/dist/kernel/contract/store.js.map +1 -0
  109. package/dist/kernel/contract/types.d.ts +92 -0
  110. package/dist/kernel/contract/types.js +42 -0
  111. package/dist/kernel/contract/types.js.map +1 -0
  112. package/dist/kernel/contract/vault-id.d.ts +21 -0
  113. package/dist/kernel/contract/vault-id.js +74 -0
  114. package/dist/kernel/contract/vault-id.js.map +1 -0
  115. package/dist/kernel/contracts/index.d.ts +1 -11
  116. package/dist/kernel/contracts/index.js +1 -88
  117. package/dist/kernel/contracts/index.js.map +1 -1
  118. package/dist/kernel/conventions/canonical.d.ts +7 -0
  119. package/dist/kernel/{templates → conventions}/canonical.js +3 -69
  120. package/dist/kernel/conventions/canonical.js.map +1 -0
  121. package/dist/kernel/conventions/completion-contract.d.ts +1 -132
  122. package/dist/kernel/conventions/completion-contract.js +1 -525
  123. package/dist/kernel/conventions/completion-contract.js.map +1 -1
  124. package/dist/kernel/conventions/note-exclude.d.ts +25 -9
  125. package/dist/kernel/conventions/note-exclude.js +318 -159
  126. package/dist/kernel/conventions/note-exclude.js.map +1 -1
  127. package/dist/kernel/conventions/strict-json.d.ts +5 -0
  128. package/dist/kernel/conventions/strict-json.js +38 -0
  129. package/dist/kernel/conventions/strict-json.js.map +1 -0
  130. package/dist/kernel/conventions/template-paths.d.ts +11 -0
  131. package/dist/kernel/conventions/template-paths.js +138 -0
  132. package/dist/kernel/conventions/template-paths.js.map +1 -0
  133. package/dist/kernel/doctor/service.d.ts +1 -1
  134. package/dist/kernel/doctor/service.js +2 -3
  135. package/dist/kernel/doctor/service.js.map +1 -1
  136. package/dist/kernel/engine/assemble.d.ts +4 -3
  137. package/dist/kernel/engine/assemble.js +21 -16
  138. package/dist/kernel/engine/assemble.js.map +1 -1
  139. package/dist/kernel/engine/axes/store.js +3 -2
  140. package/dist/kernel/engine/axes/store.js.map +1 -1
  141. package/dist/kernel/engine/embed/config.d.ts +11 -9
  142. package/dist/kernel/engine/embed/config.js +36 -48
  143. package/dist/kernel/engine/embed/config.js.map +1 -1
  144. package/dist/kernel/engine/embed/deferred.d.ts +2 -2
  145. package/dist/kernel/engine/embed/deferred.js +2 -2
  146. package/dist/kernel/engine/embed/model.d.ts +9 -7
  147. package/dist/kernel/engine/embed/model.js +38 -89
  148. package/dist/kernel/engine/embed/model.js.map +1 -1
  149. package/dist/kernel/engine/embed/provider.js +3 -3
  150. package/dist/kernel/engine/embed/provider.js.map +1 -1
  151. package/dist/kernel/engine/embed/repair.d.ts +1 -1
  152. package/dist/kernel/engine/embed/repair.js +1 -1
  153. package/dist/kernel/engine/embed/sync.d.ts +1 -1
  154. package/dist/kernel/engine/embed/sync.js +9 -2
  155. package/dist/kernel/engine/embed/sync.js.map +1 -1
  156. package/dist/kernel/engine/graph/builder.d.ts +2 -2
  157. package/dist/kernel/engine/graph/builder.js +14 -11
  158. package/dist/kernel/engine/graph/builder.js.map +1 -1
  159. package/dist/kernel/engine/graph/node.js +1 -1
  160. package/dist/kernel/engine/graph/node.js.map +1 -1
  161. package/dist/kernel/engine/linkify/suggest.d.ts +1 -1
  162. package/dist/kernel/engine/mcp/facade.d.ts +5 -3
  163. package/dist/kernel/engine/mcp/facade.js +93 -57
  164. package/dist/kernel/engine/mcp/facade.js.map +1 -1
  165. package/dist/kernel/engine/mcp/query-mapper.d.ts +17 -1
  166. package/dist/kernel/engine/mcp/query-mapper.js +27 -4
  167. package/dist/kernel/engine/mcp/query-mapper.js.map +1 -1
  168. package/dist/kernel/engine/mcp/types.d.ts +8 -8
  169. package/dist/kernel/engine/paths.d.ts +12 -1
  170. package/dist/kernel/engine/paths.js +177 -2
  171. package/dist/kernel/engine/paths.js.map +1 -1
  172. package/dist/kernel/engine/retrieval/axes.d.ts +88 -0
  173. package/dist/kernel/{templates → engine/retrieval}/axes.js +35 -49
  174. package/dist/kernel/engine/retrieval/axes.js.map +1 -0
  175. package/dist/kernel/engine/retrieval/dispatcher.d.ts +2 -2
  176. package/dist/kernel/engine/retrieval/dispatcher.js +2 -2
  177. package/dist/kernel/engine/retrieval/dispatcher.js.map +1 -1
  178. package/dist/kernel/engine/retrieval/folder-context.d.ts +31 -0
  179. package/dist/kernel/engine/retrieval/folder-context.js +108 -0
  180. package/dist/kernel/engine/retrieval/folder-context.js.map +1 -0
  181. package/dist/kernel/engine/retrieval/generator.js +1 -1
  182. package/dist/kernel/engine/retrieval/generator.js.map +1 -1
  183. package/dist/kernel/engine/retrieval/passthrough.test-helper.d.ts +1 -1
  184. package/dist/kernel/engine/retrieval/passthrough.test-helper.js +1 -1
  185. package/dist/kernel/engine/retrieval/reranker.js +1 -1
  186. package/dist/kernel/engine/retrieval/template-source.d.ts +12 -11
  187. package/dist/kernel/engine/retrieval/template-source.js +104 -77
  188. package/dist/kernel/engine/retrieval/template-source.js.map +1 -1
  189. package/dist/kernel/engine/tracer.d.ts +5 -4
  190. package/dist/kernel/engine/tracer.js +15 -7
  191. package/dist/kernel/engine/tracer.js.map +1 -1
  192. package/dist/kernel/graph/explore.js +7 -1
  193. package/dist/kernel/graph/explore.js.map +1 -1
  194. package/dist/kernel/harness/surface-registry.d.ts +0 -19
  195. package/dist/kernel/harness/surface-registry.js +2 -53
  196. package/dist/kernel/harness/surface-registry.js.map +1 -1
  197. package/dist/kernel/harness/validation.js +1 -90
  198. package/dist/kernel/harness/validation.js.map +1 -1
  199. package/dist/kernel/install/asset-health.d.ts +2 -52
  200. package/dist/kernel/install/asset-health.js +1 -253
  201. package/dist/kernel/install/asset-health.js.map +1 -1
  202. package/dist/kernel/install/connection-coordinator.d.ts +150 -0
  203. package/dist/kernel/install/connection-coordinator.js +762 -0
  204. package/dist/kernel/install/connection-coordinator.js.map +1 -0
  205. package/dist/kernel/install/connection-registry.d.ts +109 -0
  206. package/dist/kernel/install/connection-registry.js +963 -0
  207. package/dist/kernel/install/connection-registry.js.map +1 -0
  208. package/dist/kernel/install/project-connection.d.ts +63 -0
  209. package/dist/kernel/install/project-connection.js +382 -0
  210. package/dist/kernel/install/project-connection.js.map +1 -0
  211. package/dist/kernel/install/vault-settings-publish.d.ts +5 -0
  212. package/dist/kernel/install/vault-settings-publish.js +22 -0
  213. package/dist/kernel/install/vault-settings-publish.js.map +1 -0
  214. package/dist/kernel/link/link.d.ts +113 -74
  215. package/dist/kernel/link/link.js +588 -158
  216. package/dist/kernel/link/link.js.map +1 -1
  217. package/dist/kernel/search/morning-test-fixtures.d.ts +5 -4
  218. package/dist/kernel/search/morning-test-fixtures.js +25 -62
  219. package/dist/kernel/search/morning-test-fixtures.js.map +1 -1
  220. package/dist/kernel/searchbackend/engine-search-backend.js +6 -4
  221. package/dist/kernel/searchbackend/engine-search-backend.js.map +1 -1
  222. package/dist/kernel/searchbackend/search-backend.d.ts +1 -1
  223. package/dist/kernel/semantic/semantic-engine.d.ts +2 -2
  224. package/dist/kernel/semantic/semantic-engine.js +7 -7
  225. package/dist/kernel/semantic/semantic-engine.js.map +1 -1
  226. package/dist/kernel/vault/paths.d.ts +25 -0
  227. package/dist/kernel/vault/paths.js +161 -0
  228. package/dist/kernel/vault/paths.js.map +1 -0
  229. package/dist/kernel/vault/settings.d.ts +25 -0
  230. package/dist/kernel/vault/settings.js +154 -0
  231. package/dist/kernel/vault/settings.js.map +1 -0
  232. package/dist/mcp/note-write.d.ts +12 -0
  233. package/dist/mcp/note-write.js +78 -0
  234. package/dist/mcp/note-write.js.map +1 -0
  235. package/dist/mcp/server.d.ts +0 -8
  236. package/dist/mcp/server.js +171 -368
  237. package/dist/mcp/server.js.map +1 -1
  238. package/dist/mcp/update-notice.d.ts +2 -2
  239. package/dist/mcp/update-notice.js +3 -5
  240. package/dist/mcp/update-notice.js.map +1 -1
  241. package/dist/vendors/claude/claude-hooks.d.ts +8 -1
  242. package/dist/vendors/claude/claude-hooks.js +65 -58
  243. package/dist/vendors/claude/claude-hooks.js.map +1 -1
  244. package/dist/vendors/claude/claude.d.ts +2 -2
  245. package/dist/vendors/claude/claude.js +2 -2
  246. package/dist/vendors/claude/claude.js.map +1 -1
  247. package/dist/vendors/claude/hook/pre-tool-use.d.ts +23 -9
  248. package/dist/vendors/claude/hook/pre-tool-use.js +112 -92
  249. package/dist/vendors/claude/hook/pre-tool-use.js.map +1 -1
  250. package/dist/vendors/claude/hook/stdin.d.ts +10 -2
  251. package/dist/vendors/claude/hook/stdin.js +27 -26
  252. package/dist/vendors/claude/hook/stdin.js.map +1 -1
  253. package/dist/vendors/codex/codex.js +17 -153
  254. package/dist/vendors/codex/codex.js.map +1 -1
  255. package/dist/vendors/hermes/hermes.js +1 -1
  256. package/dist/vendors/hermes/hermes.js.map +1 -1
  257. package/docs/adapters.md +13 -19
  258. package/docs/architecture.md +27 -49
  259. package/docs/cli-map.md +20 -32
  260. package/docs/conventions.md +26 -34
  261. package/docs/install.md +18 -24
  262. package/docs/verified-target.md +9 -15
  263. package/package.json +2 -4
  264. package/skills/distill/SKILL.md +1 -1
  265. package/skills/doctor/SKILL.md +8 -8
  266. package/skills/link/SKILL.md +3 -3
  267. package/skills/search/SKILL.md +11 -18
  268. package/skills/status/SKILL.md +14 -11
  269. package/skills/write/SKILL.md +16 -46
  270. package/agents/oms-reviewer.md +0 -57
  271. package/assets/claude/hooks/oms-post-guard.mjs +0 -108
  272. package/assets/codex/agents/oms-reviewer.toml +0 -68
  273. package/assets/skills/interview/SKILL.md +0 -88
  274. package/assets/skills/template/SKILL.md +0 -38
  275. package/dist/cli/template-command.d.ts +0 -2
  276. package/dist/cli/template-command.js +0 -291
  277. package/dist/cli/template-command.js.map +0 -1
  278. package/dist/kernel/capture/check.d.ts +0 -92
  279. package/dist/kernel/capture/check.js +0 -375
  280. package/dist/kernel/capture/check.js.map +0 -1
  281. package/dist/kernel/capture/guidance.d.ts +0 -108
  282. package/dist/kernel/capture/guidance.js +0 -373
  283. package/dist/kernel/capture/guidance.js.map +0 -1
  284. package/dist/kernel/conventions/write-contract.d.ts +0 -13
  285. package/dist/kernel/conventions/write-contract.js +0 -68
  286. package/dist/kernel/conventions/write-contract.js.map +0 -1
  287. package/dist/kernel/engine/retrieval/taxonomy-context.d.ts +0 -24
  288. package/dist/kernel/engine/retrieval/taxonomy-context.js +0 -102
  289. package/dist/kernel/engine/retrieval/taxonomy-context.js.map +0 -1
  290. package/dist/kernel/harness/reviewer.d.ts +0 -18
  291. package/dist/kernel/harness/reviewer.js +0 -62
  292. package/dist/kernel/harness/reviewer.js.map +0 -1
  293. package/dist/kernel/setup/documents.d.ts +0 -40
  294. package/dist/kernel/setup/documents.js +0 -27
  295. package/dist/kernel/setup/documents.js.map +0 -1
  296. package/dist/kernel/setup/service.d.ts +0 -36
  297. package/dist/kernel/setup/service.js +0 -168
  298. package/dist/kernel/setup/service.js.map +0 -1
  299. package/dist/kernel/templates/approved-vault-fixture.d.ts +0 -40
  300. package/dist/kernel/templates/approved-vault-fixture.js +0 -84
  301. package/dist/kernel/templates/approved-vault-fixture.js.map +0 -1
  302. package/dist/kernel/templates/axes.d.ts +0 -44
  303. package/dist/kernel/templates/axes.js.map +0 -1
  304. package/dist/kernel/templates/canonical.d.ts +0 -14
  305. package/dist/kernel/templates/canonical.js.map +0 -1
  306. package/dist/kernel/templates/census.d.ts +0 -77
  307. package/dist/kernel/templates/census.js +0 -571
  308. package/dist/kernel/templates/census.js.map +0 -1
  309. package/dist/kernel/templates/content-contract.d.ts +0 -18
  310. package/dist/kernel/templates/content-contract.js +0 -184
  311. package/dist/kernel/templates/content-contract.js.map +0 -1
  312. package/dist/kernel/templates/defaults.d.ts +0 -7
  313. package/dist/kernel/templates/defaults.js +0 -83
  314. package/dist/kernel/templates/defaults.js.map +0 -1
  315. package/dist/kernel/templates/doctor.d.ts +0 -48
  316. package/dist/kernel/templates/doctor.js +0 -237
  317. package/dist/kernel/templates/doctor.js.map +0 -1
  318. package/dist/kernel/templates/file-lock.d.ts +0 -3
  319. package/dist/kernel/templates/file-lock.js +0 -86
  320. package/dist/kernel/templates/file-lock.js.map +0 -1
  321. package/dist/kernel/templates/hints.d.ts +0 -36
  322. package/dist/kernel/templates/hints.js +0 -279
  323. package/dist/kernel/templates/hints.js.map +0 -1
  324. package/dist/kernel/templates/index.d.ts +0 -16
  325. package/dist/kernel/templates/index.js +0 -11
  326. package/dist/kernel/templates/index.js.map +0 -1
  327. package/dist/kernel/templates/interview-ledger.d.ts +0 -49
  328. package/dist/kernel/templates/interview-ledger.js +0 -250
  329. package/dist/kernel/templates/interview-ledger.js.map +0 -1
  330. package/dist/kernel/templates/interview-service.d.ts +0 -58
  331. package/dist/kernel/templates/interview-service.js +0 -644
  332. package/dist/kernel/templates/interview-service.js.map +0 -1
  333. package/dist/kernel/templates/interview.d.ts +0 -138
  334. package/dist/kernel/templates/interview.js +0 -576
  335. package/dist/kernel/templates/interview.js.map +0 -1
  336. package/dist/kernel/templates/note-index.d.ts +0 -65
  337. package/dist/kernel/templates/note-index.js +0 -253
  338. package/dist/kernel/templates/note-index.js.map +0 -1
  339. package/dist/kernel/templates/operations.d.ts +0 -12
  340. package/dist/kernel/templates/operations.js +0 -2
  341. package/dist/kernel/templates/operations.js.map +0 -1
  342. package/dist/kernel/templates/paths.d.ts +0 -35
  343. package/dist/kernel/templates/paths.js +0 -185
  344. package/dist/kernel/templates/paths.js.map +0 -1
  345. package/dist/kernel/templates/policy.d.ts +0 -100
  346. package/dist/kernel/templates/policy.js +0 -723
  347. package/dist/kernel/templates/policy.js.map +0 -1
  348. package/dist/kernel/templates/resolver.d.ts +0 -57
  349. package/dist/kernel/templates/resolver.js +0 -510
  350. package/dist/kernel/templates/resolver.js.map +0 -1
  351. package/dist/kernel/templates/review-context.d.ts +0 -27
  352. package/dist/kernel/templates/review-context.js +0 -55
  353. package/dist/kernel/templates/review-context.js.map +0 -1
  354. package/dist/kernel/templates/transaction.d.ts +0 -27
  355. package/dist/kernel/templates/transaction.js +0 -790
  356. package/dist/kernel/templates/transaction.js.map +0 -1
  357. package/dist/kernel/templates/types.d.ts +0 -323
  358. package/dist/kernel/templates/types.js +0 -3
  359. package/dist/kernel/templates/types.js.map +0 -1
  360. package/dist/mcp/template-notice.d.ts +0 -53
  361. package/dist/mcp/template-notice.js +0 -183
  362. package/dist/mcp/template-notice.js.map +0 -1
  363. package/dist/vendors/claude/hook/post-tool-use.d.ts +0 -11
  364. package/dist/vendors/claude/hook/post-tool-use.js +0 -93
  365. package/dist/vendors/claude/hook/post-tool-use.js.map +0 -1
  366. package/skills/interview/SKILL.md +0 -88
  367. package/skills/template/SKILL.md +0 -38
@@ -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.16.0",
13
+ "version": "0.17.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.16.0"
40
+ "version": "0.17.0"
41
41
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oms",
3
- "version": "0.16.0",
3
+ "version": "0.17.0",
4
4
  "description": "Oh My Second Brain convention layer for Obsidian vaults — eight shared skills and five MCP tools under a user-owned contract.",
5
5
  "author": {
6
6
  "name": "gobeumsu"
@@ -17,12 +17,9 @@
17
17
  "skills": [
18
18
  "./assets/skills/distill/",
19
19
  "./assets/skills/doctor/",
20
- "./assets/skills/interview/",
21
20
  "./assets/skills/link/",
22
21
  "./assets/skills/search/",
23
22
  "./assets/skills/status/",
24
- "./assets/skills/template/",
25
23
  "./assets/skills/write/"
26
- ],
27
- "agents": ["./agents/oms-reviewer.md"]
24
+ ]
28
25
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oms",
3
- "version": "0.16.0",
3
+ "version": "0.17.0",
4
4
  "description": "Oh My Second Brain convention layer for Obsidian vaults — Codex native rules, skills, and MCP adapter.",
5
5
  "_note": "oms host install writes Codex MCP config and provenance, installs ~/.codex/rules/oms.md, and installs the eight shared skills under ~/.codex/skills/oms-*.",
6
6
  "skills": "./assets/skills/",
@@ -166,9 +166,9 @@ M5 거버넌스/컨벤션/셋업/어댑터 레이어 구현 과정에서 아이
166
166
 
167
167
  | Pattern | Source | License | Note |
168
168
  |---------|--------|---------|------|
169
- | Two-layer `.oms/governance/` (decisions/ + rules/ + architecture.md) mirroring document-ontology discipline | craft-skills `documents` skill | Internal skill, no external restriction | STRUCTURE-ONLY — all YAML independently authored (ADR-003 / ADR-006) |
169
+ | Two-layer `.oms/governance/` (decisions/ + rules/ + architecture.md) mirroring document-ontology discipline | craft-skills `documents` skill | Internal skill, no external restriction | STRUCTURE-ONLY — all YAML independently authored (구 ADR-003 / 구 ADR-006; 현재 ADR-008) |
170
170
  | Thick-router (private) + generic-leaf (public) topology; monorepo + `private/` gitignore isolation | deep-interview R19 / R20 (self) | N/A — internal | No external code; user-ratified design decisions |
171
- | Layer-1 CONTRACT / Layer-2 GOVERNANCE separation invariants | ADR-006 (self) | N/A — internal | User-ratified 2026-06-13 |
171
+ | Layer-1 CONTRACT / Layer-2 GOVERNANCE separation invariants | 구 ADR-006 (self; 현재 ADR-008) | N/A — internal | User-ratified 2026-06-13 |
172
172
 
173
173
  **Shared skills** (`assets/skills/`)
174
174
 
@@ -4,6 +4,11 @@ Skills, agents, templates, and host guidance changes belong here.
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.17.0] - 2026-09-25
8
+
9
+ - **Breaking: host guidance describes the sealed contract.** The `interview` and `template` skills are deleted, leaving six skills. Guidance tells agents to write whole notes through `write {path, content, template?}`, to stay inside the sealed property pool, never to read or write `~/.oms/`, and to ask the user to run `oms setup` on `contract-unreadable`.
10
+ - **The `link` skill describes the payload it returns.** A suggestion carries a `baseContentHash` and a stable `id` per candidate, and `link { op: "check" }` requires `notePath`.
11
+
7
12
  ## [0.16.0] - 2026-09-23
8
13
  - Live host-facing docs no longer show a copyable `interview-next` call without `proposals`. Confirming the template notice still starts that mode, but the same proposals array must reach review, answer, and commit.
9
14
  - Search, status, and write skills now say `templateNotice.next` is a mode hint, not a replayable `interview-next` CallToolRequest.
package/CHANGELOG-cli.md CHANGED
@@ -4,6 +4,14 @@ Changes to the `oms` command surface belong here.
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.17.0] - 2026-09-25
8
+
9
+ - **Breaking: `oms template` is removed; the contract lives under `oms setup` and `oms contract setup|extract|status|doctor`.** `oms setup` is interactive only and refuses to run without a TTY or under `OMS_NON_INTERACTIVE=1`. `oms note guide` and `oms note check` are removed; `oms note audit` judges existing notes against the seal. `oms hook pre` replaces the retired hook leaves. Older `.oms/*` files are ignored and a `templateRoots` settings key is rejected. Upgrade order: (1) install this release and run `oms host sync`; (2) back up `.oms/settings.json` and keep only `version`, `vaultId`, `templateFolder` (formerly `templateRoots`), `embedding`, and `agentRepair`; (3) run `oms setup` at a terminal to seal the vault; (4) run `oms contract doctor` and review the unexpected control files it lists under `.oms/`; (5) keep those backups while a rollback to 0.16.0 is still possible.
10
+ - **Breaking: `oms setup` is the interactive vault-contract seal, the same as `oms contract setup`.** It needs an interactive terminal and refuses `--dry-run`, `--yes`, `--approval-token`, `--approved-digest`, `--install-claude`, `--models-default`, `--models-descriptor`, `--models-no-default`, and `--template-folder`, naming the command that now owns each concern (`oms host install`, `oms model install --default`, `oms model install --descriptor`, `oms model waive --yes`). Embedding remedies point at `oms model install` and `oms model select` rather than `.oms/models.json`.
11
+ - **`oms --help` describes real vault resolution.** It said an omitted `--vault` defaults to the current directory, hiding that resolution checks local vault controls, a bridge link, and `OMS_VAULT` first and treats the current directory as a read-only fallback that cannot admit a mutation.
12
+ - **`oms note` drops an empty repeatable-flag branch.** The set was permanently empty, so its accumulation path could never execute and the option type promised arrays the parser never produced.
13
+ - **`oms bridge` reports the stage that actually blocked.** Vault publication, global registry, reservation, and project projection each report their own bounded code and reason; stages that were never attempted are reported as unattempted rather than as failures, and malformed registry bytes are preserved exactly as found.
14
+
7
15
  ## [0.16.0] - 2026-09-23
8
16
 
9
17
  - Host discovery reports the eight actual Codex skill paths and installed reviewer-definition health instead of the retired setup skill. Discovery and installation now resolve relative host-home overrides consistently; definition health is not reviewer execution proof.
@@ -4,6 +4,13 @@ Domain logic changes belong here.
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.17.0] - 2026-09-25
8
+
9
+ - **Breaking: the sealed contract replaces the `.oms/` policy files.** Older `.oms/*` files (template policy, taxonomy, type projection) are no longer read; `oms contract doctor` reports them as unexpected control files. `.oms/settings.json` accepts only `version`, `vaultId`, `templateFolder`, `embedding`, and `agentRepair`, and a `templateRoots` key is rejected as `VAULT_SETTINGS_INVALID`. The contract is stored under `~/.oms/vaults/<vault-id>/` and one judge (`src/kernel/contract/judge.ts`) decides every write. Upgrade order: (1) install this release and run `oms host sync`; (2) back up `.oms/settings.json` and keep only `version`, `vaultId`, `templateFolder` (formerly `templateRoots`), `embedding`, and `agentRepair`; (3) run `oms setup` at a terminal to seal the vault; (4) run `oms contract doctor` and review the unexpected control files it lists under `.oms/`; (5) keep those backups while a rollback to 0.16.0 is still possible.
10
+ - **Breaking: folder meaning and exclusion come from the sealed `folders.json`, and the embedding model from `.oms/settings.json`.** Search intent, the graph folder axis, and the exclusion inventory no longer read `.oms/taxonomy.json`; runtime code no longer reads or writes `.oms/models.json`, `.oms/taxonomy.json`, `.oms/template-policy.json`, or `contract-public.json`, so a vault's `.oms/` holds only `settings.json`. The selected embedding model is `settings.json` `embedding.model`; a vault configured only through `models.json` must reselect its model with `oms model select`. `parseModelsConfig` and `ModelsConfigV1` remain in the embed config module for callers that still parse a descriptor. The contracts index no longer re-exports the template policy.
11
+ - Search query responses summarize at most 20 facet values and disclose truncation, keeping large link vocabularies out of ordinary agent responses without reducing hit counts or pagination. Collection facets are merged before summarizing. (#143)
12
+ - **The decision records are consolidated into nine topic records** under `docs/decisions/`, and `docs/release.md` uses version placeholders instead of fixed 0.13.0-to-0.14.0 examples that could go stale.
13
+
7
14
  ## [0.16.0] - 2026-09-23
8
15
  - Guide now binds a saved note to the template it declares when the caller omits `templateId`, matching check. Passing `templateId: null` still uses the default layer only.
9
16
 
package/CHANGELOG-mcp.md CHANGED
@@ -4,6 +4,13 @@ MCP server tools and resources belong here.
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.17.0] - 2026-09-25
8
+
9
+ - **Breaking: `write` takes `{path, content, template?}` with no `op`.** The whole note is judged against the sealed contract and saved atomically only when allowed; a denial returns `{field, kind}` violations and one guidance command. The `guide`, `check`, and `template` operations and the `folderIntents` input are removed. `search` `templates` returns the sealed folders, property names and types, and templates; `doctor` `validate` diagnoses the seal, and `doctor` `regenerate-types` is removed with no alias.
10
+ - **Breaking: retrieval metadata reads the sealed folder contract.** Search responses rename `taxonomyIntents` to `folderIntents`, semantic status reports `folderContext` instead of the taxonomy context, and `projectionSource` names `folders.json` (the sealed contract) instead of `.oms/template-policy.json`. A vault without a sealed contract reports `vault-invalid` and its remediation points at `oms setup`.
11
+ - **An unreachable search fallback is gone.** Every `oms_semantic_query` path returns inside its own block, so the later ephemeral-lexical branch keyed on that tool name could never run. Search's model-free lexical path stays where it actually executes.
12
+ - Tool schemas expose operation names and arguments at the top level so hosts can discover them without unpacking branch schemas. Strict operation-specific validation and approval requirements remain enforced. (#144)
13
+
7
14
  ## [0.16.0] - 2026-09-23
8
15
  - Host-facing docs no longer show a copyable `interview-next` call without `proposals`. Confirming the template notice still starts that mode, but the same proposals array must reach review, answer, and commit.
9
16
  - The machine template notice `next` field is a mode hint (`skill: interview`, `mode: interview-next`), not a replayable CallToolRequest. OMS still does not invent proposals; `확인하기` enters `/interview`.
@@ -4,6 +4,12 @@ Per-host adapter and installer changes belong here.
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.17.0] - 2026-09-25
8
+
9
+ - **Breaking: the Claude guard follows the judge.** The PostToolUse hook and the `oms-post-guard` bin are removed, and `OMS_GUARD` no longer exists. The PreToolUse write matcher is now `Write|Edit|MultiEdit|NotebookEdit`, and a second PreToolUse entry for `Read|Grep|Glob` denies access under `~/.oms/`. A write that the judge finds in violation is denied; when the judge cannot run, the call is allowed with a warning. The hook output format changed accordingly. Codex and Hermes still declare no write hook. Run `oms host sync` after upgrading to rewrite the registration.
10
+ - **The `oms-reviewer` host role is retired.** It was built around a completion protocol that no longer exists, so no surface could produce its request or consume its result. The Claude plugin agent, the Codex custom-agent role and its shipped asset, the harness reviewer registry, and the reviewer asset-health lane are gone with no alias. `oms host remove` still deletes a role and provenance sidecar an earlier version installed, and only when the OMS-written provenance record proves ownership; a foreign agent file is still left in place and reported.
11
+ - **Shipped host instructions no longer describe a completion reviewer or a retry budget.** The Claude and Codex guidance and the installed Hermes adapter README drop the semantic reviewer handshake and the finite retry budget; `agentRepair` lives in the portable `.oms/settings.json`.
12
+
7
13
  ## [0.16.0] - 2026-09-23
8
14
 
9
15
  - Codex installs an optional provenance-owned reviewer role while preserving unowned collisions; a genuine generic separate subagent remains valid without custom-role discovery. Dry-run skill paths now match the eight installed shared skills.
package/CHANGELOG.md CHANGED
@@ -10,6 +10,10 @@ This aggregate changelog contains changes that span multiple layers.
10
10
 
11
11
  ## [Unreleased]
12
12
 
13
+ ## [0.17.0] - 2026-09-25
14
+
15
+ - **Breaking: the vault contract is sealed once by the user and judged on every write.** The interactive `oms setup` interviews folders, the property pool, and templates together and seals the contract under `~/.oms/vaults/<vault-id>/`, outside the vault; `.oms/settings.json` is the only OMS file inside it. One judge decides MCP `write {path, content, template?}` and the Claude guard hook, and a violation is refused with `{field, kind}` entries and one guidance command. `oms template`, the MCP `write` guide, check, and template operations, the `interview` and `template` skills, the PostToolUse hook, and `OMS_GUARD` are removed. The public surface is six skills, five MCP tools, and fourteen CLI families. Upgrade order: (1) install this release and run `oms host sync`; (2) back up `.oms/settings.json` and keep only `version`, `vaultId`, `templateFolder` (formerly `templateRoots`), `embedding`, and `agentRepair`; (3) run `oms setup` at a terminal to seal the vault; (4) run `oms contract doctor` and review the unexpected control files it lists under `.oms/`; (5) keep those backups while a rollback to 0.16.0 is still possible.
16
+
13
17
  ## [0.16.0] - 2026-09-23
14
18
  - **Breaking: OMS is a user-owned contract and completion harness, not a note writer or template renderer.** Version 4 of `.oms/template-policy.json` is the only approved structure and meaning: an always-on empty default layer, optional templates that only add or tighten, and unmanaged frontmatter left unchecked. Agents write and repair notes. OMS guides, checks the saved file, and completes from a separate host review. Search stays read-only even when the contract is missing or mid-publish. Contract meaning enters only through explicit `proposals` on `interview-next`, `interview-answer`, and `commit-contracts`; a recorded answer whose proposals were omitted is refused rather than dropped. The public surface is eight skills (`interview` and `template` are tool-less), five MCP tools, and fourteen CLI families. Retired v3 registration, note-write, link-apply, and renderer paths are deleted, not aliased. The machine template notice `next` field is a mode hint into `/interview`, not a replayable CallToolRequest.
15
19
 
package/README.ko.md CHANGED
@@ -2,75 +2,73 @@
2
2
 
3
3
  Oh My Second Brain(`oms`)은 기존 Obsidian·Markdown 볼트를 AI 호스트와 연결하되 노트의 소유권은 가져가지 않는다. 볼트는 계속 평문 Markdown이고, Obsidian이 사령탑으로 남는다. OMS가 꺼져 있어도 노트는 사람이 읽고 고칠 수 있는 파일이다. OMS는 속성·폴더·heading의 의미를 스스로 만들어내지 않는다.
4
4
 
5
- ## 템플릿·온톨로지 볼트 모델
5
+ ## 볼트 계약
6
6
 
7
- 의미는 사용자에게 남는다. `.oms/template-policy.json` version 4가 승인된 구조이자 의미다. 속성 pool이 type, format, intent를 기록한다. 항상 켜져 있는 default 계층은 비어 있는 상태로 시작해 모든 노트에 적용된다. 선택적인 개별 템플릿은 필드·heading·의미 기준을 추가하거나 좁힐 수만 있고, default를 제거하거나 약화시킬 수 없다. 개별 템플릿이 없는 노트는 그 default 아래의 정상 노트다. 관리되지 않는 frontmatter는 보존하며 검사하지 않는다.
7
+ 의미는 사용자에게 남는다. 사용자는 터미널에서 대화형 `oms setup`을 한 번 실행해 볼트 계약을 봉인한다. 인터뷰는 세 부분을 함께 다룬다. 폴더(각 폴더의 의미와 배치 가능 대상), 속성 pool(각 속성의 type과 intent), 템플릿(템플릿 폴더의 각 템플릿이 선언하는 것)이다. 제품은 속성 이름·폴더·페르소나를 하드코딩하지 않고 Inbox fallback도 없다.
8
8
 
9
- 제품은 속성 이름·폴더·페르소나를 하드코딩하지 않고 Inbox fallback도 없다. 폐기된 것은 노트 정체성으로서의 `concept`와 번들 runtime 기본값이지, 사용자가 서술하는 의미 계층으로서의 온톨로지가 아니다. `.oms/taxonomy.json`은 배치와 폴더·링크의 의미를 기록한다. `.obsidian/types.json`은 읽기 전용 관측값이다. `.oms/types.json`(`oms.types.v2`)은 파생 projection이며 두 번째 권위가 아니다. version 3은 지원하지 않는다. 자동 변환도, 호환 reader도 없다.
9
+ 봉인된 계약은 볼트 밖 `~/.oms/vaults/<vault-id>/`에 있다. 볼트 안의 OMS 파일은 `.oms/settings.json` 하나이며 `version`, `vaultId`, `templateFolder`, `embedding`, `agentRepair`를 담는다. `.oms/`의 다른 항목은 `oms contract doctor`가 예상하지 않은 제어 파일로 보고하고, 그 밖에는 무시한다. `.obsidian/types.json`은 읽기 전용 관측값이며 봉인을 덮어쓰지 않는다.
10
10
 
11
- 노트 파일을 쓰고 고치는 주체는 에이전트다. 쓰기 전에 OMS는 승인된 Markdown, 유효 계약, task binding을 돌려준다. 그다음 디스크에 저장된 바이트를 검사한다. 완료 판정에는 같은 입력에 대한 호스트의 별도 리뷰가 필요하다. 지시 기반(instruction-only) 별도 리뷰도 유효하다. 리뷰어 파일의 바이트가 일치한다는 사실은 호스트가 그 역할을 실제로 실행했다는 증거가 아니다. 기계 검사 통과, 스스로 발급한 PASS, digest는 그 리뷰가 아니며, digest는 인증이 아니라 내용 무결성이다. 계약 설정은 사용자가 정확한 diff를 승인할 때만 compare-and-swap으로 바뀐다. 자동 보정은 사용자가 켜지 않는 한 꺼져 있다. 재시도 예산은 사용자가 정하는 유한한 0 이상의 정수이며 기본값은 2, 0도 허용하고 별도의 상한 3은 없다. 검색은 그 판정을 기다리지 않는다.
11
+ 템플릿은 `templateFolder` 안의 사용자 Markdown 파일 그대로 남는다. 봉인은 템플릿이 선언한 것을 기록할 뿐이며, OMS는 템플릿을 다시 쓰거나 복사하거나 노트에 적용하지 않는다. `oms contract status`는 봉인된 각 템플릿을 live 파일과 비교해 `active`, `drift`, `missing`으로 보고한다. drift는 보고만 하고 조용히 재봉인하지 않는다. 재봉인은 사용자가 `oms setup`으로 한다. OMS는 Templater, JavaScript, 전용 token 언어를 해석하거나 실행하지 않는다.
12
12
 
13
- 승인된 Markdown은 BOM과 원래 줄바꿈을 포함한 정확한 UTF-8 스냅샷이다. 관리 draft를 편집해도 그 스냅샷은 대체되지 않는다. OMS는 Templater, JavaScript, 전용 token 언어를 해석하거나 실행하지 않는다.
13
+ 노트를 쓰는 주체는 에이전트다. 하나의 판정자가 모든 쓰기를 봉인에 비추어 판정한다. 거부된 쓰기는 파일을 바꾸지 않고 `{field, kind}` 위반과 안내 명령 하나만 돌려주며, 규칙 값·저장소 경로·계약 본문은 돌려주지 않는다. 이 기기에 봉인이 없는 볼트는 판정하지 않는다. 이 기기의 봉인 증거가 볼트와 맞지 않으면 사용자가 `oms setup`을 다시 실행할 때까지 쓰기를 `contract-unreadable`로 거부한다. OMS에는 완료 호출도 리뷰어 대화도 없다. 허용된 쓰기는 노트가 봉인된 구조에 맞는다는 뜻이지 보존할 가치가 있다는 뜻이 아니다.
14
14
 
15
- ADR-014는 ADR-013을 대체한다. [ACKNOWLEDGMENTS](./ACKNOWLEDGMENTS.md)는 Ouroboros와 Gajae Code의 deep-interview를 설계 아이디어로 밝힌다. 이는 runtime 복제도 연구 결과도 아니다. 저장소의 도식은 설명용 스케치이며 G002 Excalidraw 산출물이 아니다. 이 문서들은 승인된 아키텍처 기록이지 host smoke 결과나 제품 gate 통과가 아니다.
15
+ 볼트 계약은 ADR-007(소스 저장소의 `docs/decisions/`)에 기록되며, 구 ADR-013–016을 대체한다. [ACKNOWLEDGMENTS](./ACKNOWLEDGMENTS.md)는 Ouroboros와 Gajae Code의 deep-interview를 설계 아이디어로 밝힌다. 이는 runtime 복제도 연구 결과도 아니다. 저장소의 도식은 설명용 스케치다. 이 문서들은 승인된 아키텍처 기록이지 host smoke 결과나 제품 gate 통과가 아니다.
16
16
 
17
17
  권위 모델은 [아키텍처](./docs/architecture.md), 볼트 파일은 [컨벤션](./docs/conventions.md), leaf 목록은 [CLI 맵](./docs/cli-map.md)에 있다.
18
18
 
19
19
  ## 설정
20
20
 
21
- `oms setup`은 비어 있는 version 4 policy를 제안한다. 노트 타입 기본값을 번들로 넣지 않고 노트를 수정하지도 않는다. 게시는 설정 interview를 거쳐 사용자가 승인한 diff만 기록한다. 모델 수명주기는 setup 시절 플래그가 아니라 `oms model install|select|waive|status`다.
21
+ `oms setup`은 `oms contract setup`과 같은 명령이다. 볼트 전체를 인터뷰해 계약을 봉인한다. 볼트 안에는 `.oms/settings.json`만 쓰고 노트는 수정하지 않는다. 대화형 터미널이 없거나 `OMS_NON_INTERACTIVE=1`이면 실행을 거부하므로 에이전트는 실행하지 않는다. 언제든 다시 실행해 재봉인할 수 있다.
22
22
 
23
23
  ```bash
24
- oms setup --vault /path/to/vault --dry-run
25
- oms setup --vault /path/to/vault --yes --approved-digest <digest>
24
+ oms setup --vault /path/to/vault
25
+ oms contract status --vault /path/to/vault
26
26
  ```
27
27
 
28
- interview leaf는 `oms template review --proposals`, `oms template answer`, `oms template commit`이다. 서버가 돌려준 question과 compare-and-swap 값을 그대로 전달하고, 세 호출 모두에 같은 `proposals`를 보낸다. parameter 이름을 만들어내지 않는다. 일반 질문, 알 수 없는 노트 값, 노트 오류, 관리되지 않는 속성, 검색은 그 interview를 시작하지 않는다.
29
-
30
- 호스트 알림 문구는 정확히 `템플릿에 변경이 있습니다`이고 동작은 `확인하기`와 `나중에` 둘뿐이다. 처음 알림에는 템플릿 이름·hash·change class를 표시하지 않는다. `나중에`는 host-only이며 서버를 호출하지 않는다. `확인하기`는 `write { op: "template", mode: "interview-next", proposals }`로 한 번에 한 질문씩 진행하는 resumable interview를 시작한다.
28
+ `oms contract extract --template <path>`는 템플릿 하나가 선언하는 것을 값 없이 보여준다. `oms contract doctor`는 봉인, 오래된 lock, 고아 generation, 예상하지 않은 제어 파일, hook 전송 실패를 진단한다. `--fix`는 이동했거나 색인되지 않은 볼트를 다시 색인할 뿐이다. 그 밖의 깨진 봉인은 `oms setup`을 다시 실행해 복구한다. 모델 수명주기는 `oms model install|select|waive|status`로 따로 존재한다.
31
29
 
32
30
  ## CLI
33
31
 
34
32
  ```text
35
33
  oms bridge add|remove|status 저장소-볼트 target bridge 관리
34
+ oms contract setup|extract|status|doctor 볼트 계약 봉인, 조회, 진단
36
35
  oms graph build|status 노트 그래프 생성 또는 조회
37
- oms hook pre|post pre/post-tool-use hook 실행
36
+ oms hook pre Claude 쓰기를 vault 계약으로 판정
38
37
  oms host install|remove|sync|status 호스트 asset과 MCP 등록 관리
39
38
  oms index sync|embed|repair|status|clean 파생 검색 상태 관리
40
- oms link suggest|check 노트 wikilink 제안·점검
39
+ oms link suggest|check 노트 wikilink 제안 또는 검사
41
40
  oms model install|select|waive|status 로컬 모델 선택 관리
42
- oms note guide|check|complete|audit|get 노트 안내·검사·완료·감사·조회
41
+ oms note audit|get 노트를 계약으로 감사하거나 읽기
43
42
  oms package check|update OMS 패키지 확인 또는 업데이트
44
- oms search query|context 명시적 query 실행 또는 구조화 context 조회
43
+ oms search query|context 명시적 질의 실행 또는 구조화 context 조회
45
44
  oms serve mcp|http stdio MCP 또는 로컬 HTTP 서버 시작
46
- oms setup 비어 있는 version 4 policy 제안
47
- oms status 읽기 전용 종합 상태 표시
48
- oms template scan|list|show|check|regenerate-types|review|answer|commit
45
+ oms setup 볼트를 인터뷰하고 계약 봉인
46
+ oms status 읽기 전용 통합 상태 표시
49
47
  ```
50
48
 
51
- `oh-my-second-brain`은 전체 명령이고 `oms`는 짧은 별칭이다. 이 열네 개 family, 여덟 개 skill, 다섯 개 MCP 도구는 서로 다른 세 집합이다. leaf 대응은 [CLI 맵](./docs/cli-map.md)에 있다.
49
+ `oh-my-second-brain`이 전체 명령이고 `oms`는 짧은 별칭이다. 이 14개 family, 6개 스킬, 5개 MCP 도구는 서로 다른 집합이다. leaf 목록은 [CLI 맵](./docs/cli-map.md)에 있다.
52
50
 
53
51
  ### 도움말 계약
54
52
 
55
- 인식된 모든 명령은 `--help`와 `-h`를 받아들이며, exit 0으로 종료하고 부작용을 수행하지 않는다. 알 수 없는 명령에 `--help`를 함께 주면 exit 1로 종료한다.
53
+ 인식되는 모든 명령은 `--help`와 `-h`를 받으며, exit 0으로 끝나고 부작용이 없다. 알 수 없는 명령에 `--help`를 붙이면 exit 1이다.
56
54
 
57
- `oms search query <text>`는 lexical-only다. `--vec`와 `--hyde`는 각각의 channel을 선택하고, `--expand`는 G004 expansion을 명시적으로 켜며, `--max-queries`는 1부터 32까지의 정수만 받는다. `--rerank`도 opt-in이다. `oms search context`는 별도의 구조화 context 표면이다. Embedding은 `oms index embed`이며 sync와 repair는 서로 다른 index mode다. `oms index status --view status|collections|contexts`는 세 읽기 전용 view를 모두 보존하고, `oms index clean`은 제거 가능한 파생 상태를 정리한다.
55
+ 일반 `oms search query <text>`는 lexical 전용이다. `--vec`와 `--hyde`는 각 채널을 선택하고, `--expand`는 G004 확장을 명시적으로 켜며, `--max-queries`는 1부터 32까지의 정수를 받고, `--rerank`는 opt-in이다. `oms search context`는 별도의 구조화 context 표면이다. embedding은 `oms index embed`이고 sync와 repair는 서로 다른 index 모드다. `oms index status --view status|collections|contexts`는 세 가지 읽기 전용 view를 유지하고, `oms index clean`은 제거 가능한 파생 상태를 지운다.
58
56
 
59
- lexical, vector, HyDE, typed-axis 질의는 템플릿에 결속되지 않았거나 계약을 어겼거나 미완성인 노트도 계속 포함한다. 계약이 없거나 손상되어도 검색은 멈추지 않는다. Vector 검색에는 완전한 `OMS_EMBEDDING_PROVIDER`/`OMS_EMBEDDING_MODEL` 쌍이 필요하다. HyDE에는 `OMS_GENERATE_PROVIDER`/`OMS_GENERATE_MODEL`이, reranking에는 `OMS_RERANK_PROVIDER`/`OMS_RERANK_MODEL`이 추가로 필요하다. 누락되거나 불완전하거나 설치되지 않은 선택은 크게 실패한다. G004 expansion은 명시적으로 선택할 때만 쓰이며 교체·parity·outperformance를 주장하지 않는다.
57
+ lexical, vector, HyDE, typed-axis 질의는 계약을 통과하지 못할 노트도 계속 포함한다. 계약이 없거나 손상되어도 검색은 멈추지 않는다. vector 검색에는 완전한 `OMS_EMBEDDING_PROVIDER`/`OMS_EMBEDDING_MODEL` 쌍이 필요하다. HyDE에는 `OMS_GENERATE_PROVIDER`/`OMS_GENERATE_MODEL`도 필요하다. reranking에는 `OMS_RERANK_PROVIDER`/`OMS_RERANK_MODEL`이 필요하다. 없거나 불완전하거나 설치되지 않은 선택은 크게 실패한다. G004 확장은 명시적으로 쓸 수 있는 기능이며 대체·동등·우월을 주장하지 않는다.
60
58
 
61
- `guide`는 노트를 쓰지 않는다. 에이전트가 파일을 저장한 뒤 `check`가 그 파일을 읽고, 별도 리뷰 후 `complete`가 같은 입력을 다시 읽는다. create, append, update, backfill은 노트 동작이 아니다. link apply도 동작이 아니다. template add, update, move, remove, default도 동작이 아니다. 폐기된 그 동작들을 위한 version 3 변환, 노트 renderer, 호환 경로는 없다.
59
+ `oms note audit`는 기존 노트를 봉인에 비추어 판정하고 `{path, field, kind}` 항목을 보고한다. 노트를 다시 쓰지 않는다. create, append, update, backfill은 폐기된 노트 작업이다. link apply는 작업이 아니다. 폐기된 작업을 위한 노트 렌더러나 호환 경로는 없다.
62
60
 
63
61
  ## MCP 도구
64
62
 
65
- `oms serve mcp`는 정확히 다섯 개의 공개 도구를 노출한다:
63
+ `oms serve mcp`는 정확히 다섯 개의 공개 도구를 노출한다.
66
64
 
67
65
  `write` · `search` · `link` · `status` · `doctor`
68
66
 
69
- 여덟 skill(`distill`, `doctor`, `interview`, `link`, `search`, `status`, `template`, `write`)은 호스트 워크플로다. `interview`와 `template`은 도구가 없다.
67
+ 6개 스킬(`distill`, `doctor`, `link`, `search`, `status`, `write`)은 호스트 workflow다. `distill`은 도구가 없다.
70
68
 
71
- 다섯 도구는 그 skill의 부분집합이고, 어느 쪽도 열네 개 CLI family와 같지 않다. 세부 기능은 다섯 도구의 `op` 값으로 남는다.
69
+ 다섯 도구는 스킬의 부분집합이며, 두 집합 모두 14개 CLI family와 다르다. 세부 기능은 다섯 도구 아래의 `op` 값으로 남는다. 봉인에는 MCP 작업도 스킬도 없다.
72
70
 
73
- `write`는 interview 답변과 승인된 계약 게시가 관리 상태를 바꾸기 때문에 쓰기 posture를 유지한다. `guide`, `check`, `complete`는 볼트 바이트를 쓰지 않는다. 계약 review는 `op: "template"`의 `interview-next`, `interview-answer`, `commit-contracts` mode만 사용한다. `status`와 모든 검색 동작은 읽기 전용이며 완료를 대신 판정하지 않는다. `doctor` 도구는 control과 index를 진단하며 노트를 backfill하지 않는다.
71
+ `write {path, content, template?}`는 노트 전체를 판정해 허용될 때만 저장한다. `template`은 선택 사항이며 노트가 따르는 봉인된 템플릿을 가리킨다. `status`와 모든 search 작업은 읽기 전용이다. `doctor` 도구는 봉인을 검증하고 노트를 감사하며 명시적인 index 유지보수를 실행한다. 노트를 backfill하지 않는다. 볼트 안에서 Claude의 기본 Write, Edit, MultiEdit, NotebookEdit는 `oms hook pre`를 통해 같은 판정자에 도달한다. Codex와 Hermes에는 쓰기 hook이 없으므로 MCP `write`로 쓴 노트만 판정된다.
74
72
 
75
73
  ## 설치
76
74
 
@@ -81,12 +79,12 @@ npm install -g oh-my-second-brain
81
79
  oms host install --runtime all --vault /path/to/vault --yes
82
80
  ```
83
81
 
84
- Gajae-Code에서는 npm 패키지를 marketplace plugin으로 설치한다: `gjc plugin install oms@oms`. GJC는 패키지 루트의 `skills/` convention path에서 여덟 개 OMS skill을 발견한다.
82
+ Gajae-Code에서는 npm 패키지를 marketplace plugin으로 설치한다: `gjc plugin install oms@oms`. GJC는 패키지 루트의 `skills/` 관례 경로에서 여섯 OMS 스킬을 찾는다.
85
83
 
86
- 호스트 설치는 canonical 볼트를 `${XDG_CONFIG_HOME:-~/.config}/oms/vault.json`에 기록하고 각 관리형 등록에 `oms serve mcp --vault /path/to/vault`를 넣는다. `oms host install|remove|sync|status`만 이 서명된 포인터로 호스트 통합을 관리한다. `oms package update`는 패키지만 업데이트하고 호스트를 암묵적으로 동기화하지 않는다. `oms host sync`는 별도로 실행한다.
84
+ 호스트 설치는 정식 볼트를 `${XDG_CONFIG_HOME:-~/.config}/oms/vault.json`에 기록하고, 관리하는 각 호스트 항목에 `oms serve mcp --vault /path/to/vault`를 새긴다. `oms host install|remove|sync|status`는 그 서명된 pointer를 호스트 통합 유지보수에만 쓴다. `oms package update`는 패키지를 업데이트하지만 호스트를 암묵적으로 sync하지 않는다. `oms host sync`를 따로 실행한다.
87
85
 
88
- 런타임 target 해석은 호스트 관리 포인터를 읽지 않는다. 우선순위는 명시적 target, 로컬 볼트 control, bridge, `OMS_VAULT`, 그리고 읽기 전용 fallback으로서의 cwd 순서다. cwd fallback에서는 계약 게시와 파생 상태 보정을 할 수 없다.
86
+ runtime target 해석은 호스트 유지보수 pointer를 읽지 않는다. 우선순위는 명시적 target, 로컬 볼트 제어 파일, bridge, `OMS_VAULT`, 그리고 안전한 읽기 전용 fallback으로서의 현재 디렉터리다. 봉인, 노트 쓰기, 파생 상태 repair는 그 fallback을 쓸 수 없다.
89
87
 
90
- `OMS_VAULT`는 명시적·로컬·bridge target이 없을 때 사용하는 환경변수 fallback이다.
88
+ `OMS_VAULT`는 명시적·로컬·bridge target이 없을 때 지원되는 환경 변수 fallback이다.
91
89
 
92
- 자세한 내용은 [설치](./docs/install.md), [아키텍처](./docs/architecture.md), [컨벤션](./docs/conventions.md), [검증된 target](./docs/verified-target.md)을 참고한다.
90
+ [설치](./docs/install.md), [아키텍처](./docs/architecture.md), [컨벤션](./docs/conventions.md), [CLI 맵](./docs/cli-map.md), [호스트 asset](./docs/adapters.md), [검증 대상](./docs/verified-target.md)을 참고한다.
package/README.md CHANGED
@@ -2,53 +2,51 @@
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. Obsidian stays the command center: the notes are still files a person can read and edit when OMS is not running. OMS does not invent the meaning of a property, a folder, or a heading.
4
4
 
5
- ## Template and ontology vault model
5
+ ## Vault contract
6
6
 
7
- Meaning stays with the user. Version 4 of `.oms/template-policy.json` is the approved structure and meaning. A property pool records type, format, and intent. An always-on default layer starts empty and applies to every note. An optional individual template may only add or tighten fields, headings, and semantic criteria. It cannot remove or weaken the default. A note with no individual template is an ordinary note under that default. Unmanaged frontmatter is kept and is not checked.
7
+ Meaning stays with the user. The user seals the vault's contract once, in an interactive `oms setup` run at a terminal. The interview covers three parts together: folders (what each folder means and what may be placed there), the property pool (each property's type and intent), and templates (what each template in the template folder declares). The product hardcodes no property names, folders, or personas, and it has no Inbox fallback.
8
8
 
9
- The product hardcodes no property names, folders, or personas, and it has no Inbox fallback. What was retired is `concept` as note identity and bundled runtime defaults, not ontology as the user's account of meaning. `.oms/taxonomy.json` records placement and what folders and links mean. `.obsidian/types.json` is a read-only observation. `.oms/types.json` (`oms.types.v2`) is a derived projection, not a second authority. Version 3 is unsupported: there is no migration and no compatibility reader.
9
+ The sealed contract lives outside the vault, under `~/.oms/vaults/<vault-id>/`. The only OMS file inside the vault is `.oms/settings.json`, which holds `version`, `vaultId`, `templateFolder`, `embedding`, and `agentRepair`. Any other entry in `.oms/` is reported by `oms contract doctor` as an unexpected control file and is otherwise ignored. `.obsidian/types.json` is a read-only observation and never overrides the seal.
10
10
 
11
- The agent writes and repairs note files. Before that write, OMS returns the approved Markdown, the effective contract, and a task binding. It then checks the bytes saved on disk. Completion requires a separate host review of those same inputs. A separate instruction-only review is valid. Matching reviewer-file bytes are not proof the host launched that role. A machine pass, a self-issued PASS, or a digest is not that review, and a digest is content integrity rather than authentication. Contract configuration changes only when the user approves the exact diff, by compare-and-swap. Repair is off unless the user enables it. The retry budget is that user's finite nonnegative integer, default 2, including 0, with no separate cap of 3. Search does not wait on that review.
11
+ A template stays the user's own Markdown file in `templateFolder`. Sealing records what it declares; OMS never rewrites, copies, or applies it. `oms contract status` reports each sealed template as `active`, `drift`, or `missing` against the live file. A drifted template is reported, never re-sealed silently; the user re-seals it with `oms setup`. OMS does not parse or execute Templater, JavaScript, or a private token language.
12
12
 
13
- Approved Markdown is the exact UTF-8 snapshot, including any BOM and the original line endings. Editing the managed draft does not replace that snapshot. OMS does not parse or execute Templater, JavaScript, or a private token language.
13
+ The agent writes notes. One judge decides every write against the seal. A denied write leaves the file unchanged and returns only `{field, kind}` violations and one guidance command, never a rule value, a store path, or the contract body. A vault with no seal on this machine is not judged. When this machine holds seal evidence that no longer matches the vault, writes are refused as `contract-unreadable` until the user runs `oms setup` again. OMS has no completion call and no reviewer conversation: an allowed write means the note fits the sealed structure, not that it is worth keeping.
14
14
 
15
- ADR-014 supersedes ADR-013. [ACKNOWLEDGMENTS](./ACKNOWLEDGMENTS.md) credits Ouroboros and Gajae Code's deep-interview as design ideas. Those credits are not a copied runtime and not a research result. Diagrams in this repository are explanatory sketches. They are not the G002 Excalidraw artifact. These pages record the approved architecture. They are not a host-smoke result and not a product-gate pass.
15
+ The vault contract is recorded in ADR-007 (`docs/decisions/` in the source repository), which replaces the former ADR-013 through ADR-016. [ACKNOWLEDGMENTS](./ACKNOWLEDGMENTS.md) credits Ouroboros and Gajae Code's deep-interview as design ideas. Those credits are not a copied runtime and not a research result. Diagrams in this repository are explanatory sketches. These pages record the approved architecture. They are not a host-smoke result and not a product-gate pass.
16
16
 
17
17
  The authority model is in [architecture](./docs/architecture.md). Vault files are in [conventions](./docs/conventions.md). Leaves are in [the CLI map](./docs/cli-map.md).
18
18
 
19
19
  ## Setup
20
20
 
21
- `oms setup` proposes an empty version-4 policy. It ships no note-type defaults and never modifies notes. Publication goes through the config interview and writes only the user-approved diff. Model lifecycle is `oms model install|select|waive|status`, not a setup-era model flag.
21
+ `oms setup` is the same command as `oms contract setup`. It interviews the whole vault and seals the contract. It writes only `.oms/settings.json` inside the vault and never modifies notes. It refuses to run without an interactive terminal or under `OMS_NON_INTERACTIVE=1`, so an agent never runs it. Run it again at any time to re-seal.
22
22
 
23
23
  ```bash
24
- oms setup --vault /path/to/vault --dry-run
25
- oms setup --vault /path/to/vault --yes --approved-digest <digest>
24
+ oms setup --vault /path/to/vault
25
+ oms contract status --vault /path/to/vault
26
26
  ```
27
27
 
28
- The interview leaves are `oms template review --proposals`, `oms template answer`, and `oms template commit`. Forward the question and compare-and-swap fields the server returns, and send the same `proposals` on every call. Do not invent parameter names. A general question, an unknown note value, a note error, an unmanaged property, or a search does not start that interview.
29
-
30
- The host notice text is exactly `템플릿에 변경이 있습니다` and its actions are exactly `확인하기` and `나중에`. The first notice shows no template name, hash, or change class. `나중에` is host-only and makes no server call. `확인하기` starts a resumable one-question interview at `write { op: "template", mode: "interview-next", proposals }`.
28
+ `oms contract extract --template <path>` shows what one template declares without printing values. `oms contract doctor` diagnoses the seal, stale locks, orphaned generations, unexpected control files, and hook transport failures; `--fix` only re-indexes a moved or unindexed vault. Any other broken seal is recovered by running `oms setup` again. Model lifecycle stands alone as `oms model install|select|waive|status`.
31
29
 
32
30
  ## CLI
33
31
 
34
32
  ```text
35
33
  oms bridge add|remove|status Manage repository-to-vault target bridges
34
+ oms contract setup|extract|status|doctor Seal the vault contract, or inspect and diagnose it
36
35
  oms graph build|status Build or inspect the note graph
37
- oms hook pre|post Run pre- or post-tool-use hooks
36
+ oms hook pre Judge a Claude write against the vault contract
38
37
  oms host install|remove|sync|status Manage host assets and MCP registrations
39
38
  oms index sync|embed|repair|status|clean Manage derived search state
40
39
  oms link suggest|check Suggest or check note wikilinks
41
40
  oms model install|select|waive|status Manage local model selection
42
- oms note guide|check|complete|audit|get Guide, check, complete, audit, or read a note
41
+ oms note audit|get Audit notes against the contract, or read them
43
42
  oms package check|update Check or update the OMS package
44
43
  oms search query|context Run an explicit query or retrieve structured context
45
44
  oms serve mcp|http Start the stdio MCP or local HTTP server
46
- oms setup Propose an empty version-4 policy
45
+ oms setup Interview the vault and seal its contract
47
46
  oms status Show the read-only aggregate status
48
- oms template scan|list|show|check|regenerate-types|review|answer|commit
49
47
  ```
50
48
 
51
- `oh-my-second-brain` is the full command; `oms` is its short alias. These fourteen families, the eight skills, and the five MCP tools are three different sets. The leaf map is [the CLI map](./docs/cli-map.md).
49
+ `oh-my-second-brain` is the full command; `oms` is its short alias. These fourteen families, the six skills, and the five MCP tools are three different sets. The leaf map is [the CLI map](./docs/cli-map.md).
52
50
 
53
51
  ### Help contract
54
52
 
@@ -56,9 +54,9 @@ Every recognized command accepts `--help` and `-h`, exits 0, and performs no sid
56
54
 
57
55
  A plain `oms search query <text>` is lexical-only. `--vec` and `--hyde` select their respective channels; `--expand` explicitly enables G004 expansion, `--max-queries` accepts an integer from 1 through 32, and `--rerank` is opt-in. `oms search context` is the separate structured-context surface. Embedding is `oms index embed`; sync and repair are distinct index modes. `oms index status --view status|collections|contexts` preserves all three read-only views, while `oms index clean` removes eligible derived state.
58
56
 
59
- Lexical, vector, HyDE, and typed-axis queries still include unbound, invalid, and incomplete notes. A missing or damaged contract does not stop search. Vector search requires a complete `OMS_EMBEDDING_PROVIDER`/`OMS_EMBEDDING_MODEL` pair. HyDE also requires `OMS_GENERATE_PROVIDER`/`OMS_GENERATE_MODEL`. Reranking requires `OMS_RERANK_PROVIDER`/`OMS_RERANK_MODEL`. Missing, incomplete, or uninstalled selections fail loudly. G004 expansion is an explicit available capability; it makes no replacement, parity, or outperformance claim.
57
+ Lexical, vector, HyDE, and typed-axis queries still include notes that would fail the contract. A missing or damaged contract does not stop search. Vector search requires a complete `OMS_EMBEDDING_PROVIDER`/`OMS_EMBEDDING_MODEL` pair. HyDE also requires `OMS_GENERATE_PROVIDER`/`OMS_GENERATE_MODEL`. Reranking requires `OMS_RERANK_PROVIDER`/`OMS_RERANK_MODEL`. Missing, incomplete, or uninstalled selections fail loudly. G004 expansion is an explicit available capability; it makes no replacement, parity, or outperformance claim.
60
58
 
61
- `guide` does not write the note. After the agent saves the file, `check` reads that file. `complete` reads it again after a separate review. Create, append, update, and backfill are not note operations. Link apply is not an operation. Template add, update, move, remove, and default are not operations. There is no version-3 migration, note renderer, or compatibility path for those retired operations.
59
+ `oms note audit` judges existing notes against the seal and reports `{path, field, kind}` entries; it never rewrites a note. Create, append, update, and backfill are retired note operations. Link apply is not an operation. There is no note renderer or compatibility path for retired operations.
62
60
 
63
61
  ## MCP tools
64
62
 
@@ -66,11 +64,11 @@ Lexical, vector, HyDE, and typed-axis queries still include unbound, invalid, an
66
64
 
67
65
  `write` · `search` · `link` · `status` · `doctor`
68
66
 
69
- The eight skills (`distill`, `doctor`, `interview`, `link`, `search`, `status`, `template`, `write`) are host workflows. `interview` and `template` are tool-less.
67
+ The six skills (`distill`, `doctor`, `link`, `search`, `status`, `write`) are host workflows. `distill` is tool-less.
70
68
 
71
- The five tools are a subset of those skills, and neither set is the fourteen CLI families. Detail capabilities remain `op` values under the five tools.
69
+ The five tools are a subset of those skills, and neither set is the fourteen CLI families. Detail capabilities remain `op` values under the five tools. Sealing has no MCP operation and no skill.
72
70
 
73
- `write` keeps a write posture because interview answers and approved contract publication change managed state. `guide`, `check`, and `complete` write no vault bytes. Contract review uses `op: "template"` with `interview-next`, `interview-answer`, and `commit-contracts` only. `status` and every search operation are read-only and do not decide completion. The `doctor` tool diagnoses controls and indexes; it does not backfill notes.
71
+ `write {path, content, template?}` judges the whole note and saves it only when it is allowed. `template` is optional and names the sealed template the note follows. `status` and every search operation are read-only. The `doctor` tool validates the seal, audits notes, and runs explicit index maintenance; it does not backfill notes. Claude's native Write, Edit, MultiEdit, and NotebookEdit inside the vault reach the same judge through `oms hook pre`; Codex and Hermes have no write hook, so their notes are judged only through MCP `write`.
74
72
 
75
73
  ## Install
76
74
 
@@ -81,11 +79,11 @@ npm install -g oh-my-second-brain
81
79
  oms host install --runtime all --vault /path/to/vault --yes
82
80
  ```
83
81
 
84
- For Gajae-Code, install the npm package as a marketplace plugin: `gjc plugin install oms@oms`. GJC discovers the eight OMS skills at the package-root `skills/` convention path.
82
+ For Gajae-Code, install the npm package as a marketplace plugin: `gjc plugin install oms@oms`. GJC discovers the six OMS skills at the package-root `skills/` convention path.
85
83
 
86
84
  Host installation records the canonical vault in `${XDG_CONFIG_HOME:-~/.config}/oms/vault.json` and stamps `oms serve mcp --vault /path/to/vault` into each managed host entry. `oms host install|remove|sync|status` use that signed pointer only to maintain host integrations. `oms package update` updates the package but never syncs hosts implicitly; run `oms host sync` separately.
87
85
 
88
- Runtime target resolution never reads the host-maintenance pointer. Its precedence is explicit target, local vault controls, bridge, `OMS_VAULT`, then the current directory only as a safe read-only fallback. Control and derived-state mutations cannot use that fallback. Note `guide`, `check`, and `complete` read rather than write ordinary notes; their task binding, contract publication, and derived-state repair still require a verified target.
86
+ Runtime target resolution never reads the host-maintenance pointer. Its precedence is explicit target, local vault controls, bridge, `OMS_VAULT`, then the current directory only as a safe read-only fallback. Sealing, note writes, and derived-state repair cannot use that fallback.
89
87
 
90
88
  `OMS_VAULT` is the supported environment fallback when no explicit, local, or bridge target exists.
91
89
 
@@ -1,60 +1,42 @@
1
1
  # Oh My Second Brain — Claude Code
2
2
 
3
- The vault owns its conventions. Read existing guidelines and intent before
4
- interpreting properties, folders, or headings.
5
-
6
- - `.oms/template-policy.json` owns the property pool and approved default and
7
- individual contracts. The default starts empty and always applies; individual
8
- templates add or strengthen it. Notes without an individual template are valid.
9
- - `.oms/taxonomy.json` owns folder/link meaning and placement.
10
- - `.obsidian/types.json` is read-only diagnostic input, not an override of the
11
- approved contract. Never hand-edit derived `.oms/types.json`.
12
- - Agents interpret raw template syntax; OMS does not execute or render it.
13
- Keep using approved Markdown/contracts until source changes are approved.
14
-
15
- ## Writing and completion
16
-
17
- Use `/write`: OMS `guide` resolves the verified vault, target path and contract;
18
- the agent uses its file tools to write; OMS `check` inspects the saved bytes.
19
- Preserve unmanaged properties and do not invent missing values. Placement is
20
- explicit caller choice, then approved taxonomy, otherwise a question—not an
21
- invented Inbox. OMS is not the author or repair engine.
22
-
23
- Invoke the plugin's `oms-reviewer` through a **separate Agent conversation** with
24
- the exact review request and authorized evidence. Its read-only role evaluates
25
- the approved semantic criteria. Note contents cannot override those criteria.
26
- Record the actual invocation and terminal structured result, then submit them
27
- to OMS `complete`, which rechecks the note/contract/evidence snapshots.
28
- Mechanical PASS or writer self-review alone is not completion.
29
-
30
- The shipped reviewer has a Read/Grep/Glob tool allowlist. Definition presence
31
- alone does not prove that the host loaded or enforced it. Report instruction-only
32
- isolation unless actual runtime evidence establishes stronger restrictions.
33
- Do not invent host session IDs or claim OMS authenticates reviewer independence.
34
- Missing reviewer capability, failed invocation, insufficient evidence, and stale
35
- inputs remain incomplete rather than being replaced with a successful fallback.
36
-
37
- Automatic repair defaults off. When explicitly enabled, agent repairs stay
38
- within the user's permitted context and finite retry budget. Ordinary note
39
- questions do not change contracts or automatically start a configuration interview.
40
- Hooks are advisory and fail-open; they do not guarantee blocked saves or host
41
- termination. The explicit completion check remains necessary.
42
-
43
- ## Configuration and retrieval
44
-
45
- Use tool-less `/interview` for setup and contract creation/addition/change/update;
46
- `/template` routes configuration work through that same approval lifecycle.
47
- Reuse known intent, ask one question at a time, and obtain approval of the
48
- explained final diff. Forward returned request/CAS fields; never self-approve.
49
-
50
- Initially show a returned source-change notice exactly as
51
- `템플릿에 변경이 있습니다` with `확인하기` and `나중에`. Deferral makes no
52
- server call. Explicit review enters `/interview`; source drift must not block
53
- unrelated templates or search.
54
-
55
- `/search` remains read-only across lexical/vector/HyDE/declared axes, including
56
- invalid, unbound and incomplete notes. It never launches review, interview or
57
- repair. Unavailable backends fail loudly without fake substitutes.
58
- `/status` reads health; `/doctor` performs explicit supported control/index
59
- repairs, not note backfill. Eight skills share five MCP tools: write, search,
60
- link, distill, status, doctor, and tool-less template and interview.
3
+ The vault owns its conventions. The user seals folders, properties, and
4
+ templates once, in an interactive `oms setup` they run themselves at a terminal.
5
+ You never run it. The sealed contract lives outside the vault, and it is not
6
+ yours to read.
7
+
8
+ ## Writing
9
+
10
+ Write vault notes with MCP `write {path, content, template?}` (the `/write`
11
+ skill). A denial gives only `{field, kind}` and a guidance command. Never ask
12
+ about or guess the contract's location or values.
13
+
14
+ - `template` is optional. Pass it only when the user names the template a note
15
+ follows.
16
+ - An allowed note is saved whole. A denied write leaves the file unchanged. Read
17
+ each `{field, kind}`, fix the content from what the user gave you, and write
18
+ again. When you cannot fix it, ask the user. Never invent a value.
19
+ - Native Write, Edit, MultiEdit, and NotebookEdit inside the vault reach the
20
+ same judge through the Claude write hook. The hook denies a write that breaks
21
+ the contract. When the hook itself cannot run, it allows the write and prints
22
+ a warning.
23
+ - `~/.oms` is off-limits. The hook denies reads, searches, and writes there as
24
+ `control-path`. Inside the vault, `.oms/settings.json` is the only OMS file.
25
+ - OMS is not the author or repair engine. An allowed write means the note fits
26
+ the sealed structure, not that it is worth keeping. That judgement is yours
27
+ and the user's.
28
+
29
+ ## Retrieval and health
30
+
31
+ - `/search` is read-only across lexical, vector, HyDE, and axis retrieval. It
32
+ also returns notes that would fail the contract. It never writes or repairs.
33
+ Unavailable backends fail loudly and are never replaced with a fake match.
34
+ - `/status` reads health. `oms contract status` and `oms contract doctor` are
35
+ for diagnosis. They report the seal's posture and template drift without
36
+ printing any value.
37
+ - `/doctor` runs explicit, supported index and control repairs. It never
38
+ backfills notes. A broken or missing seal is fixed by the user running
39
+ `oms setup`.
40
+
41
+ Six skills share five MCP tools: `write`, `search`, `link`, `distill`,
42
+ `status`, and `doctor`.