oh-my-second-brain 0.16.0 → 0.18.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 (378) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/.claude-plugin/plugin.json +4 -6
  3. package/.codex-plugin/plugin.json +2 -2
  4. package/ACKNOWLEDGMENTS.md +2 -2
  5. package/CHANGELOG-assets.md +10 -0
  6. package/CHANGELOG-cli.md +13 -0
  7. package/CHANGELOG-kernel.md +13 -0
  8. package/CHANGELOG-mcp.md +12 -0
  9. package/CHANGELOG-vendors.md +10 -0
  10. package/CHANGELOG.md +9 -0
  11. package/README.ko.md +31 -33
  12. package/README.md +22 -24
  13. package/assets/claude/CLAUDE.md +42 -58
  14. package/assets/claude/hooks/oms-guard.mjs +344 -75
  15. package/assets/codex/AGENTS.md +40 -58
  16. package/assets/codex/rules/oms.md +22 -30
  17. package/assets/hermes/README.md +10 -13
  18. package/assets/hermes/SOUL.md +36 -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/setup/SKILL.md +42 -0
  25. package/assets/skills/status/SKILL.md +14 -11
  26. package/assets/skills/write/SKILL.md +16 -46
  27. package/core/AGENTS.md +43 -40
  28. package/dist/cli/args.d.ts +6 -18
  29. package/dist/cli/args.js +11 -135
  30. package/dist/cli/args.js.map +1 -1
  31. package/dist/cli/audit.js +42 -49
  32. package/dist/cli/audit.js.map +1 -1
  33. package/dist/cli/contract-command.d.ts +16 -0
  34. package/dist/cli/contract-command.js +338 -0
  35. package/dist/cli/contract-command.js.map +1 -0
  36. package/dist/cli/engine-session.d.ts +1 -1
  37. package/dist/cli/engine-session.js +4 -4
  38. package/dist/cli/engine-session.js.map +1 -1
  39. package/dist/cli/host-commands.d.ts +2 -2
  40. package/dist/cli/host-commands.js +2 -2
  41. package/dist/cli/host-commands.js.map +1 -1
  42. package/dist/cli/host-probe.js +10 -42
  43. package/dist/cli/host-probe.js.map +1 -1
  44. package/dist/cli/link-command.d.ts +2 -2
  45. package/dist/cli/link-command.js +81 -40
  46. package/dist/cli/link-command.js.map +1 -1
  47. package/dist/cli/model-command.js +7 -7
  48. package/dist/cli/model-command.js.map +1 -1
  49. package/dist/cli/note-command.js +4 -170
  50. package/dist/cli/note-command.js.map +1 -1
  51. package/dist/cli/oms.d.ts +1 -1
  52. package/dist/cli/oms.js +22 -78
  53. package/dist/cli/oms.js.map +1 -1
  54. package/dist/cli/search-usage.js +1 -1
  55. package/dist/cli/setup-command.d.ts +4 -23
  56. package/dist/cli/setup-command.js +49 -76
  57. package/dist/cli/setup-command.js.map +1 -1
  58. package/dist/cli/status-command.js +8 -30
  59. package/dist/cli/status-command.js.map +1 -1
  60. package/dist/cli/usage.js +12 -39
  61. package/dist/cli/usage.js.map +1 -1
  62. package/dist/kernel/capture/safe.d.ts +0 -4
  63. package/dist/kernel/capture/safe.js +12 -5
  64. package/dist/kernel/capture/safe.js.map +1 -1
  65. package/dist/kernel/contract/audit.d.ts +15 -0
  66. package/dist/kernel/contract/audit.js +51 -0
  67. package/dist/kernel/contract/audit.js.map +1 -0
  68. package/dist/kernel/contract/contract-vault-fixture.d.ts +45 -0
  69. package/dist/kernel/contract/contract-vault-fixture.js +53 -0
  70. package/dist/kernel/contract/contract-vault-fixture.js.map +1 -0
  71. package/dist/kernel/contract/drift.d.ts +6 -0
  72. package/dist/kernel/contract/drift.js +27 -0
  73. package/dist/kernel/contract/drift.js.map +1 -0
  74. package/dist/kernel/contract/extract.d.ts +37 -0
  75. package/dist/kernel/contract/extract.js +101 -0
  76. package/dist/kernel/contract/extract.js.map +1 -0
  77. package/dist/kernel/contract/folders-axis.d.ts +17 -0
  78. package/dist/kernel/contract/folders-axis.js +19 -0
  79. package/dist/kernel/contract/folders-axis.js.map +1 -0
  80. package/dist/kernel/contract/fs-private.d.ts +6 -0
  81. package/dist/kernel/contract/fs-private.js +42 -0
  82. package/dist/kernel/contract/fs-private.js.map +1 -0
  83. package/dist/kernel/contract/guard-events.d.ts +16 -0
  84. package/dist/kernel/contract/guard-events.js +40 -0
  85. package/dist/kernel/contract/guard-events.js.map +1 -0
  86. package/dist/kernel/contract/interview.d.ts +83 -0
  87. package/dist/kernel/contract/interview.js +562 -0
  88. package/dist/kernel/contract/interview.js.map +1 -0
  89. package/dist/kernel/contract/judge-write.d.ts +51 -0
  90. package/dist/kernel/contract/judge-write.js +99 -0
  91. package/dist/kernel/contract/judge-write.js.map +1 -0
  92. package/dist/kernel/contract/judge.d.ts +13 -0
  93. package/dist/kernel/contract/judge.js +294 -0
  94. package/dist/kernel/contract/judge.js.map +1 -0
  95. package/dist/kernel/contract/loosening.d.ts +30 -0
  96. package/dist/kernel/contract/loosening.js +205 -0
  97. package/dist/kernel/contract/loosening.js.map +1 -0
  98. package/dist/kernel/contract/obsidian.d.ts +16 -0
  99. package/dist/kernel/contract/obsidian.js +68 -0
  100. package/dist/kernel/contract/obsidian.js.map +1 -0
  101. package/dist/kernel/contract/pattern.d.ts +15 -0
  102. package/dist/kernel/contract/pattern.js +71 -0
  103. package/dist/kernel/contract/pattern.js.map +1 -0
  104. package/dist/kernel/contract/redact.d.ts +17 -0
  105. package/dist/kernel/contract/redact.js +99 -0
  106. package/dist/kernel/contract/redact.js.map +1 -0
  107. package/dist/kernel/contract/scan.d.ts +35 -0
  108. package/dist/kernel/contract/scan.js +409 -0
  109. package/dist/kernel/contract/scan.js.map +1 -0
  110. package/dist/kernel/contract/scripted-interview.d.ts +24 -0
  111. package/dist/kernel/contract/scripted-interview.js +59 -0
  112. package/dist/kernel/contract/scripted-interview.js.map +1 -0
  113. package/dist/kernel/contract/status.d.ts +63 -0
  114. package/dist/kernel/contract/status.js +93 -0
  115. package/dist/kernel/contract/status.js.map +1 -0
  116. package/dist/kernel/contract/store.d.ts +90 -0
  117. package/dist/kernel/contract/store.js +658 -0
  118. package/dist/kernel/contract/store.js.map +1 -0
  119. package/dist/kernel/contract/types.d.ts +94 -0
  120. package/dist/kernel/contract/types.js +42 -0
  121. package/dist/kernel/contract/types.js.map +1 -0
  122. package/dist/kernel/contract/vault-id.d.ts +21 -0
  123. package/dist/kernel/contract/vault-id.js +74 -0
  124. package/dist/kernel/contract/vault-id.js.map +1 -0
  125. package/dist/kernel/contracts/index.d.ts +1 -11
  126. package/dist/kernel/contracts/index.js +1 -88
  127. package/dist/kernel/contracts/index.js.map +1 -1
  128. package/dist/kernel/conventions/canonical.d.ts +7 -0
  129. package/dist/kernel/{templates → conventions}/canonical.js +3 -69
  130. package/dist/kernel/conventions/canonical.js.map +1 -0
  131. package/dist/kernel/conventions/completion-contract.d.ts +1 -132
  132. package/dist/kernel/conventions/completion-contract.js +1 -525
  133. package/dist/kernel/conventions/completion-contract.js.map +1 -1
  134. package/dist/kernel/conventions/note-exclude.d.ts +25 -9
  135. package/dist/kernel/conventions/note-exclude.js +318 -159
  136. package/dist/kernel/conventions/note-exclude.js.map +1 -1
  137. package/dist/kernel/conventions/strict-json.d.ts +5 -0
  138. package/dist/kernel/conventions/strict-json.js +38 -0
  139. package/dist/kernel/conventions/strict-json.js.map +1 -0
  140. package/dist/kernel/conventions/template-paths.d.ts +11 -0
  141. package/dist/kernel/conventions/template-paths.js +138 -0
  142. package/dist/kernel/conventions/template-paths.js.map +1 -0
  143. package/dist/kernel/doctor/service.d.ts +1 -1
  144. package/dist/kernel/doctor/service.js +2 -3
  145. package/dist/kernel/doctor/service.js.map +1 -1
  146. package/dist/kernel/engine/assemble.d.ts +4 -3
  147. package/dist/kernel/engine/assemble.js +21 -16
  148. package/dist/kernel/engine/assemble.js.map +1 -1
  149. package/dist/kernel/engine/axes/store.js +3 -2
  150. package/dist/kernel/engine/axes/store.js.map +1 -1
  151. package/dist/kernel/engine/embed/config.d.ts +11 -9
  152. package/dist/kernel/engine/embed/config.js +36 -48
  153. package/dist/kernel/engine/embed/config.js.map +1 -1
  154. package/dist/kernel/engine/embed/deferred.d.ts +2 -2
  155. package/dist/kernel/engine/embed/deferred.js +2 -2
  156. package/dist/kernel/engine/embed/model.d.ts +9 -7
  157. package/dist/kernel/engine/embed/model.js +38 -89
  158. package/dist/kernel/engine/embed/model.js.map +1 -1
  159. package/dist/kernel/engine/embed/provider.js +3 -3
  160. package/dist/kernel/engine/embed/provider.js.map +1 -1
  161. package/dist/kernel/engine/embed/repair.d.ts +1 -1
  162. package/dist/kernel/engine/embed/repair.js +1 -1
  163. package/dist/kernel/engine/embed/sync.d.ts +1 -1
  164. package/dist/kernel/engine/embed/sync.js +9 -2
  165. package/dist/kernel/engine/embed/sync.js.map +1 -1
  166. package/dist/kernel/engine/graph/builder.d.ts +2 -2
  167. package/dist/kernel/engine/graph/builder.js +14 -11
  168. package/dist/kernel/engine/graph/builder.js.map +1 -1
  169. package/dist/kernel/engine/graph/node.js +1 -1
  170. package/dist/kernel/engine/graph/node.js.map +1 -1
  171. package/dist/kernel/engine/linkify/suggest.d.ts +1 -1
  172. package/dist/kernel/engine/mcp/facade.d.ts +5 -3
  173. package/dist/kernel/engine/mcp/facade.js +93 -57
  174. package/dist/kernel/engine/mcp/facade.js.map +1 -1
  175. package/dist/kernel/engine/mcp/query-mapper.d.ts +17 -1
  176. package/dist/kernel/engine/mcp/query-mapper.js +27 -4
  177. package/dist/kernel/engine/mcp/query-mapper.js.map +1 -1
  178. package/dist/kernel/engine/mcp/types.d.ts +8 -8
  179. package/dist/kernel/engine/paths.d.ts +12 -1
  180. package/dist/kernel/engine/paths.js +177 -2
  181. package/dist/kernel/engine/paths.js.map +1 -1
  182. package/dist/kernel/engine/retrieval/axes.d.ts +88 -0
  183. package/dist/kernel/{templates → engine/retrieval}/axes.js +35 -49
  184. package/dist/kernel/engine/retrieval/axes.js.map +1 -0
  185. package/dist/kernel/engine/retrieval/dispatcher.d.ts +2 -2
  186. package/dist/kernel/engine/retrieval/dispatcher.js +2 -2
  187. package/dist/kernel/engine/retrieval/dispatcher.js.map +1 -1
  188. package/dist/kernel/engine/retrieval/folder-context.d.ts +31 -0
  189. package/dist/kernel/engine/retrieval/folder-context.js +108 -0
  190. package/dist/kernel/engine/retrieval/folder-context.js.map +1 -0
  191. package/dist/kernel/engine/retrieval/generator.js +1 -1
  192. package/dist/kernel/engine/retrieval/generator.js.map +1 -1
  193. package/dist/kernel/engine/retrieval/passthrough.test-helper.d.ts +1 -1
  194. package/dist/kernel/engine/retrieval/passthrough.test-helper.js +1 -1
  195. package/dist/kernel/engine/retrieval/reranker.js +1 -1
  196. package/dist/kernel/engine/retrieval/template-source.d.ts +12 -11
  197. package/dist/kernel/engine/retrieval/template-source.js +104 -77
  198. package/dist/kernel/engine/retrieval/template-source.js.map +1 -1
  199. package/dist/kernel/engine/tracer.d.ts +5 -4
  200. package/dist/kernel/engine/tracer.js +15 -7
  201. package/dist/kernel/engine/tracer.js.map +1 -1
  202. package/dist/kernel/graph/explore.js +7 -1
  203. package/dist/kernel/graph/explore.js.map +1 -1
  204. package/dist/kernel/harness/surface-registry.d.ts +0 -19
  205. package/dist/kernel/harness/surface-registry.js +5 -53
  206. package/dist/kernel/harness/surface-registry.js.map +1 -1
  207. package/dist/kernel/harness/validation.js +1 -90
  208. package/dist/kernel/harness/validation.js.map +1 -1
  209. package/dist/kernel/install/asset-health.d.ts +2 -52
  210. package/dist/kernel/install/asset-health.js +1 -253
  211. package/dist/kernel/install/asset-health.js.map +1 -1
  212. package/dist/kernel/install/connection-coordinator.d.ts +150 -0
  213. package/dist/kernel/install/connection-coordinator.js +762 -0
  214. package/dist/kernel/install/connection-coordinator.js.map +1 -0
  215. package/dist/kernel/install/connection-registry.d.ts +109 -0
  216. package/dist/kernel/install/connection-registry.js +963 -0
  217. package/dist/kernel/install/connection-registry.js.map +1 -0
  218. package/dist/kernel/install/project-connection.d.ts +63 -0
  219. package/dist/kernel/install/project-connection.js +382 -0
  220. package/dist/kernel/install/project-connection.js.map +1 -0
  221. package/dist/kernel/install/vault-settings-publish.d.ts +5 -0
  222. package/dist/kernel/install/vault-settings-publish.js +22 -0
  223. package/dist/kernel/install/vault-settings-publish.js.map +1 -0
  224. package/dist/kernel/link/link.d.ts +113 -74
  225. package/dist/kernel/link/link.js +588 -158
  226. package/dist/kernel/link/link.js.map +1 -1
  227. package/dist/kernel/search/morning-test-fixtures.d.ts +5 -4
  228. package/dist/kernel/search/morning-test-fixtures.js +25 -62
  229. package/dist/kernel/search/morning-test-fixtures.js.map +1 -1
  230. package/dist/kernel/searchbackend/engine-search-backend.js +6 -4
  231. package/dist/kernel/searchbackend/engine-search-backend.js.map +1 -1
  232. package/dist/kernel/searchbackend/search-backend.d.ts +1 -1
  233. package/dist/kernel/semantic/semantic-engine.d.ts +2 -2
  234. package/dist/kernel/semantic/semantic-engine.js +7 -7
  235. package/dist/kernel/semantic/semantic-engine.js.map +1 -1
  236. package/dist/kernel/vault/paths.d.ts +25 -0
  237. package/dist/kernel/vault/paths.js +161 -0
  238. package/dist/kernel/vault/paths.js.map +1 -0
  239. package/dist/kernel/vault/settings.d.ts +25 -0
  240. package/dist/kernel/vault/settings.js +154 -0
  241. package/dist/kernel/vault/settings.js.map +1 -0
  242. package/dist/mcp/note-write.d.ts +29 -0
  243. package/dist/mcp/note-write.js +107 -0
  244. package/dist/mcp/note-write.js.map +1 -0
  245. package/dist/mcp/server.d.ts +0 -8
  246. package/dist/mcp/server.js +171 -368
  247. package/dist/mcp/server.js.map +1 -1
  248. package/dist/mcp/update-notice.d.ts +2 -2
  249. package/dist/mcp/update-notice.js +3 -5
  250. package/dist/mcp/update-notice.js.map +1 -1
  251. package/dist/vendors/claude/claude-hooks.d.ts +8 -1
  252. package/dist/vendors/claude/claude-hooks.js +65 -58
  253. package/dist/vendors/claude/claude-hooks.js.map +1 -1
  254. package/dist/vendors/claude/claude.d.ts +2 -2
  255. package/dist/vendors/claude/claude.js +2 -2
  256. package/dist/vendors/claude/claude.js.map +1 -1
  257. package/dist/vendors/claude/hook/pre-tool-use.d.ts +23 -9
  258. package/dist/vendors/claude/hook/pre-tool-use.js +112 -92
  259. package/dist/vendors/claude/hook/pre-tool-use.js.map +1 -1
  260. package/dist/vendors/claude/hook/stdin.d.ts +10 -2
  261. package/dist/vendors/claude/hook/stdin.js +27 -26
  262. package/dist/vendors/claude/hook/stdin.js.map +1 -1
  263. package/dist/vendors/codex/codex.js +17 -153
  264. package/dist/vendors/codex/codex.js.map +1 -1
  265. package/dist/vendors/hermes/hermes.js +1 -1
  266. package/dist/vendors/hermes/hermes.js.map +1 -1
  267. package/docs/adapters.md +13 -19
  268. package/docs/architecture.md +27 -49
  269. package/docs/cli-map.md +20 -32
  270. package/docs/conventions.md +26 -34
  271. package/docs/install.md +18 -24
  272. package/docs/verified-target.md +9 -15
  273. package/package.json +2 -4
  274. package/skills/distill/SKILL.md +1 -1
  275. package/skills/doctor/SKILL.md +8 -8
  276. package/skills/link/SKILL.md +3 -3
  277. package/skills/search/SKILL.md +11 -18
  278. package/skills/setup/SKILL.md +42 -0
  279. package/skills/status/SKILL.md +14 -11
  280. package/skills/write/SKILL.md +16 -46
  281. package/agents/oms-reviewer.md +0 -57
  282. package/assets/claude/hooks/oms-post-guard.mjs +0 -108
  283. package/assets/codex/agents/oms-reviewer.toml +0 -68
  284. package/assets/skills/interview/SKILL.md +0 -88
  285. package/assets/skills/template/SKILL.md +0 -38
  286. package/dist/cli/template-command.d.ts +0 -2
  287. package/dist/cli/template-command.js +0 -291
  288. package/dist/cli/template-command.js.map +0 -1
  289. package/dist/kernel/capture/check.d.ts +0 -92
  290. package/dist/kernel/capture/check.js +0 -375
  291. package/dist/kernel/capture/check.js.map +0 -1
  292. package/dist/kernel/capture/guidance.d.ts +0 -108
  293. package/dist/kernel/capture/guidance.js +0 -373
  294. package/dist/kernel/capture/guidance.js.map +0 -1
  295. package/dist/kernel/conventions/write-contract.d.ts +0 -13
  296. package/dist/kernel/conventions/write-contract.js +0 -68
  297. package/dist/kernel/conventions/write-contract.js.map +0 -1
  298. package/dist/kernel/engine/retrieval/taxonomy-context.d.ts +0 -24
  299. package/dist/kernel/engine/retrieval/taxonomy-context.js +0 -102
  300. package/dist/kernel/engine/retrieval/taxonomy-context.js.map +0 -1
  301. package/dist/kernel/harness/reviewer.d.ts +0 -18
  302. package/dist/kernel/harness/reviewer.js +0 -62
  303. package/dist/kernel/harness/reviewer.js.map +0 -1
  304. package/dist/kernel/setup/documents.d.ts +0 -40
  305. package/dist/kernel/setup/documents.js +0 -27
  306. package/dist/kernel/setup/documents.js.map +0 -1
  307. package/dist/kernel/setup/service.d.ts +0 -36
  308. package/dist/kernel/setup/service.js +0 -168
  309. package/dist/kernel/setup/service.js.map +0 -1
  310. package/dist/kernel/templates/approved-vault-fixture.d.ts +0 -40
  311. package/dist/kernel/templates/approved-vault-fixture.js +0 -84
  312. package/dist/kernel/templates/approved-vault-fixture.js.map +0 -1
  313. package/dist/kernel/templates/axes.d.ts +0 -44
  314. package/dist/kernel/templates/axes.js.map +0 -1
  315. package/dist/kernel/templates/canonical.d.ts +0 -14
  316. package/dist/kernel/templates/canonical.js.map +0 -1
  317. package/dist/kernel/templates/census.d.ts +0 -77
  318. package/dist/kernel/templates/census.js +0 -571
  319. package/dist/kernel/templates/census.js.map +0 -1
  320. package/dist/kernel/templates/content-contract.d.ts +0 -18
  321. package/dist/kernel/templates/content-contract.js +0 -184
  322. package/dist/kernel/templates/content-contract.js.map +0 -1
  323. package/dist/kernel/templates/defaults.d.ts +0 -7
  324. package/dist/kernel/templates/defaults.js +0 -83
  325. package/dist/kernel/templates/defaults.js.map +0 -1
  326. package/dist/kernel/templates/doctor.d.ts +0 -48
  327. package/dist/kernel/templates/doctor.js +0 -237
  328. package/dist/kernel/templates/doctor.js.map +0 -1
  329. package/dist/kernel/templates/file-lock.d.ts +0 -3
  330. package/dist/kernel/templates/file-lock.js +0 -86
  331. package/dist/kernel/templates/file-lock.js.map +0 -1
  332. package/dist/kernel/templates/hints.d.ts +0 -36
  333. package/dist/kernel/templates/hints.js +0 -279
  334. package/dist/kernel/templates/hints.js.map +0 -1
  335. package/dist/kernel/templates/index.d.ts +0 -16
  336. package/dist/kernel/templates/index.js +0 -11
  337. package/dist/kernel/templates/index.js.map +0 -1
  338. package/dist/kernel/templates/interview-ledger.d.ts +0 -49
  339. package/dist/kernel/templates/interview-ledger.js +0 -250
  340. package/dist/kernel/templates/interview-ledger.js.map +0 -1
  341. package/dist/kernel/templates/interview-service.d.ts +0 -58
  342. package/dist/kernel/templates/interview-service.js +0 -644
  343. package/dist/kernel/templates/interview-service.js.map +0 -1
  344. package/dist/kernel/templates/interview.d.ts +0 -138
  345. package/dist/kernel/templates/interview.js +0 -576
  346. package/dist/kernel/templates/interview.js.map +0 -1
  347. package/dist/kernel/templates/note-index.d.ts +0 -65
  348. package/dist/kernel/templates/note-index.js +0 -253
  349. package/dist/kernel/templates/note-index.js.map +0 -1
  350. package/dist/kernel/templates/operations.d.ts +0 -12
  351. package/dist/kernel/templates/operations.js +0 -2
  352. package/dist/kernel/templates/operations.js.map +0 -1
  353. package/dist/kernel/templates/paths.d.ts +0 -35
  354. package/dist/kernel/templates/paths.js +0 -185
  355. package/dist/kernel/templates/paths.js.map +0 -1
  356. package/dist/kernel/templates/policy.d.ts +0 -100
  357. package/dist/kernel/templates/policy.js +0 -723
  358. package/dist/kernel/templates/policy.js.map +0 -1
  359. package/dist/kernel/templates/resolver.d.ts +0 -57
  360. package/dist/kernel/templates/resolver.js +0 -510
  361. package/dist/kernel/templates/resolver.js.map +0 -1
  362. package/dist/kernel/templates/review-context.d.ts +0 -27
  363. package/dist/kernel/templates/review-context.js +0 -55
  364. package/dist/kernel/templates/review-context.js.map +0 -1
  365. package/dist/kernel/templates/transaction.d.ts +0 -27
  366. package/dist/kernel/templates/transaction.js +0 -790
  367. package/dist/kernel/templates/transaction.js.map +0 -1
  368. package/dist/kernel/templates/types.d.ts +0 -323
  369. package/dist/kernel/templates/types.js +0 -3
  370. package/dist/kernel/templates/types.js.map +0 -1
  371. package/dist/mcp/template-notice.d.ts +0 -53
  372. package/dist/mcp/template-notice.js +0 -183
  373. package/dist/mcp/template-notice.js.map +0 -1
  374. package/dist/vendors/claude/hook/post-tool-use.d.ts +0 -11
  375. package/dist/vendors/claude/hook/post-tool-use.js +0 -93
  376. package/dist/vendors/claude/hook/post-tool-use.js.map +0 -1
  377. package/skills/interview/SKILL.md +0 -88
  378. 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.18.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.18.0"
41
41
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "oms",
3
- "version": "0.16.0",
4
- "description": "Oh My Second Brain convention layer for Obsidian vaults — eight shared skills and five MCP tools under a user-owned contract.",
3
+ "version": "0.18.0",
4
+ "description": "Oh My Second Brain convention layer for Obsidian vaults — seven shared skills and five MCP tools under a user-owned contract.",
5
5
  "author": {
6
6
  "name": "gobeumsu"
7
7
  },
@@ -17,12 +17,10 @@
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/",
22
+ "./assets/skills/setup/",
23
23
  "./assets/skills/status/",
24
- "./assets/skills/template/",
25
24
  "./assets/skills/write/"
26
- ],
27
- "agents": ["./agents/oms-reviewer.md"]
25
+ ]
28
26
  }
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "oms",
3
- "version": "0.16.0",
3
+ "version": "0.18.0",
4
4
  "description": "Oh My Second Brain convention layer for Obsidian vaults — Codex native rules, skills, and MCP adapter.",
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-*.",
5
+ "_note": "oms host install writes Codex MCP config and provenance, installs ~/.codex/rules/oms.md, and installs the seven shared skills under ~/.codex/skills/oms-*.",
6
6
  "skills": "./assets/skills/",
7
7
  "mcpServers": "./.mcp.codex.json"
8
8
  }
@@ -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,16 @@ Skills, agents, templates, and host guidance changes belong here.
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.18.0] - 2026-09-25
8
+
9
+ - **The `setup` skill is added (seven skills).** It walks the owner through `oms setup --questions` and `oms setup --answers`, asking each question with the recommended option first, keeping the answers file outside the vault and deleting it afterwards, and sending any loosening reseal or seal recovery to the owner's terminal. Host guidance and the `doctor`, `status`, and `write` skills no longer say the agent never runs setup; they name the skill for a first or stricter seal and keep recovery and loosening with the terminal.
10
+ - **The `setup` skill spells out what it must never do.** It never runs `oms setup` or `oms contract setup` without `--questions` or `--answers`, never runs setup under a pty wrapper (`script`, `expect`, `unbuffer`), and never moves the vault or deletes, edits, or re-IDs `.oms/settings.json`. It notes that adding a folder, property, or template widens a closed axis, and sends a `pattern-unsafe` change to the owner's terminal. It says the skill path may add new entries, but changing a sealed template, even to make it stricter, is `template-tightened` and needs `oms setup` in the owner's terminal.
11
+
12
+ ## [0.17.0] - 2026-09-25
13
+
14
+ - **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`.
15
+ - **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`.
16
+
7
17
  ## [0.16.0] - 2026-09-23
8
18
  - 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
19
  - 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,19 @@ Changes to the `oms` command surface belong here.
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.18.0] - 2026-09-25
8
+
9
+ - **`oms setup` and `oms contract setup` take `--questions` and `--answers <file|->`.** `--questions` prints the interview questions as JSON and seals nothing; `--answers` runs the same interview from a JSON object of answers by question id (`-` reads stdin) and seals. Missing answers return `incomplete` with the follow-up questions; an invalid, unknown, or malformed answer, an answers file inside the vault, or both flags together exit 1 and seal nothing. A reseal through `--answers` must be equal or stricter; loosening exits 1 with `status: loosening`, `{field, kind}` changes and no values, and points at `oms setup` in a terminal. The interactive setup is unchanged and keeps full authority, and the non-TTY refusal now names the two-step path.
10
+ - **`oms contract doctor` reports `unsafePatterns`.** Each entry is `{field, kind: "pattern-unsafe"}` for a sealed pattern the seal screen now refuses; the report is unhealthy and recovery is `oms setup` in a terminal. `--answers` now accepts an answers file whose name merely starts with two dots (such as `..answers.json`) only when it is actually outside the vault; one inside the vault is refused.
11
+
12
+ ## [0.17.0] - 2026-09-25
13
+
14
+ - **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.
15
+ - **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`.
16
+ - **`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.
17
+ - **`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.
18
+ - **`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.
19
+
7
20
  ## [0.16.0] - 2026-09-23
8
21
 
9
22
  - 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,19 @@ Domain logic changes belong here.
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.18.0] - 2026-09-25
8
+
9
+ - **The interview can run from scripted answers and refuse a loosening reseal.** `runInterview` takes `nonLoosening`, which accepts only a first seal or a reseal of a readable seal and, before sealing, compares the new contract with the sealed one through `looseningChanges` (`src/kernel/contract/loosening.ts`). Removing a folder, property, or template, opening an axis, dropping a requirement, heading, or search exclusion, changing a type, fixed value, pattern, or apply folder, and widening an allowed list or range are loosening; for a single-valued type, fixed and allowed rules compare as value sets. Moving a sealed template's source is `removed` under `templates.<name>.source`, since search exclusion is built from sealed sources, and apply folders compare after NFC and separator normalization. The result names `{field, kind}` only. `scriptedIO` (`src/kernel/contract/scripted-interview.ts`) answers questions by id, turns a re-ask into `CONTRACT_ANSWER_INVALID`, reports an unknown id as `CONTRACT_ANSWER_UNKNOWN`, and ends `incomplete` with the unanswered questions instead of sealing.
10
+ - **`looseningChanges` keeps a sealed template exactly as strict.** The judge enforces a scoped template on an edit only when the previous content passed it, so a stricter template would switch its checks off for notes that fail it. Under `nonLoosening`, an added required heading, required property, or narrowed rule, a narrower narrowed rule, or a narrowed property whose type becomes newly known is `template-tightened`; only a fixed value and an allowed list that accept the same single value count as equal, and headings compare after NFC normalization. Folder and property rules may still tighten, since the judge checks changed values against the next rules without relying on the previous content passing. `templateAxis` reads the property type with `Object.hasOwn`.
11
+ - **`looseningChanges` closes three gaps.** A fixed value and an allowed list imply each other only when the field's type is single-valued (`singleValued` in `judge.ts`); for a list type or an unregistered field they compare as different kinds. A template newly given an apply folder that equals, holds, or sits inside a sealed scoped template's folder is `apply-folder-overlap`. `unsafePatternChanges` names sealed pattern rules that `patternRefusal` now refuses as `pattern-unsafe`; the `nonLoosening` interview refuses them, and the full-authority interview asks for only those rules again and keeps the rest. `contractDoctor` reports them as `unsafePatterns` and points recovery at `oms setup`. Lookups use `Object.hasOwn`, and template `narrowedRules` are built on a null-prototype object, so a field named `constructor` or `__proto__` is compared as data.
12
+
13
+ ## [0.17.0] - 2026-09-25
14
+
15
+ - **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.
16
+ - **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.
17
+ - 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)
18
+ - **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.
19
+
7
20
  ## [0.16.0] - 2026-09-23
8
21
  - 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
22
 
package/CHANGELOG-mcp.md CHANGED
@@ -4,6 +4,18 @@ MCP server tools and resources belong here.
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.18.0] - 2026-09-25
8
+
9
+ - The five MCP tools are unchanged. Agent-driven setup is a tool-less skill over the CLI, not an MCP operation, so no tool can publish, edit, or read the contract.
10
+ - `doctor` `validate` output carries the contract doctor's `unsafePatterns` (`{field, kind}` only, no values). The `note-write.ts` header now notes that a crash between `link()` and removing the temp name leaves a second hard link to the new note, which nothing sweeps.
11
+
12
+ ## [0.17.0] - 2026-09-25
13
+
14
+ - **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.
15
+ - **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`.
16
+ - **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.
17
+ - 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)
18
+
7
19
  ## [0.16.0] - 2026-09-23
8
20
  - 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
21
  - 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,16 @@ Per-host adapter and installer changes belong here.
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.18.0] - 2026-09-25
8
+
9
+ - Claude, Codex, Hermes, and Gajae-Code register the new `setup` skill, so each host installs seven shared skills. Host discovery and installation now report the `setup` skill as installed.
10
+
11
+ ## [0.17.0] - 2026-09-25
12
+
13
+ - **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.
14
+ - **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.
15
+ - **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`.
16
+
7
17
  ## [0.16.0] - 2026-09-23
8
18
 
9
19
  - 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,15 @@ This aggregate changelog contains changes that span multiple layers.
10
10
 
11
11
  ## [Unreleased]
12
12
 
13
+ ## [0.18.0] - 2026-09-25
14
+
15
+ - **An agent can seal the vault contract by asking you each setup question.** The new tool-less `setup` skill runs `oms setup --questions`, asks the owner every question one at a time, and seals with `oms setup --answers <file|->`. That path seals a first contract or a reseal that only adds or tightens; a reseal that would loosen is refused with `{field, kind}` only and left to `oms setup` in the owner's own terminal, which keeps full authority. The public surface is seven skills, five MCP tools, and fourteen CLI families. See ADR-007 §3.
16
+ - **An agent reseal can no longer loosen the contract in the gaps a review found.** A fixed value and an allowed list stand in for each other only for a single-valued property, so a list property's `allowed` cannot turn into a looser `fixed`. A newly scoped template whose apply folder overlaps a sealed scoped template is `apply-folder-overlap`. A sealed pattern that today's seal screen refuses (such as one over the length cap sealed by 0.17.0) is `pattern-unsafe`: `--answers` refuses it, `oms contract doctor` reports it as `unsafePatterns` with `{field, kind}` only, and the terminal `oms setup` asks for just that rule again. A sealed template may not change at all through `--answers`, not even to become stricter: the judge enforces a template only where the previous content passed it, so a stricter template would stop checking notes that fail it. Such a change is `template-tightened` and belongs to the owner's terminal `oms setup`. ADR-007 records the residual risks of a pty wrapper and of a fresh first seal after the vault or `.oms/settings.json` is moved, deleted, or re-IDed.
17
+
18
+ ## [0.17.0] - 2026-09-25
19
+
20
+ - **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.
21
+
13
22
  ## [0.16.0] - 2026-09-23
14
23
  - **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
24
 
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`이면 실행을 거부한다. 에이전트는 `setup` 스킬로만 봉인한다: `oms setup --questions`로 질문을 받아 소유자에게 하나씩 묻고, `oms setup --answers <file|->`로 첫 봉인이나 더 엄격한 재봉인만 한다. 계약을 느슨하게 하는 재봉인은 거부되고 소유자의 터미널 몫이다. 언제든 다시 실행해 재봉인할 수 있다.
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, 7개 스킬, 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
+ 7개 스킬(`distill`, `doctor`, `link`, `search`, `setup`, `status`, `write`)은 호스트 workflow다. `distill`과 `setup`은 도구가 없다. `setup`은 소유자에게 setup 질문을 하나씩 묻고 첫 봉인이나 더 엄격한 재봉인만 한다.
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. The interactive interview refuses to run without a terminal or under `OMS_NON_INTERACTIVE=1`. An agent seals only through the `setup` skill: `oms setup --questions` prints the questions, the agent asks the owner each one, and `oms setup --answers <file|->` seals a first or stricter contract. A reseal that loosens is refused there and left to the owner's terminal. 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 seven 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 seven skills (`distill`, `doctor`, `link`, `search`, `setup`, `status`, `write`) are host workflows. `distill` and `setup` are tool-less; `setup` asks the owner each setup question and seals a first or stricter contract.
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