oh-my-second-brain 0.1.8 → 0.2.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 (466) hide show
  1. package/CHANGELOG.md +89 -0
  2. package/README.ko.md +127 -0
  3. package/README.md +128 -0
  4. package/adapters/README.md +8 -8
  5. package/adapters/claude-code/.claude-plugin/plugin.json +3 -2
  6. package/adapters/claude-code/.mcp.json +8 -0
  7. package/adapters/claude-code/CLAUDE.md +5 -6
  8. package/adapters/claude-code/skills/compile/SKILL.md +10 -35
  9. package/adapters/claude-code/skills/distill/SKILL.md +6 -26
  10. package/adapters/claude-code/skills/link/SKILL.md +87 -0
  11. package/adapters/claude-code/skills/retrieve/SKILL.md +4 -7
  12. package/adapters/claude-code/skills/setup/SKILL.md +5 -6
  13. package/adapters/claude-code/skills/uninstall/SKILL.md +1 -1
  14. package/adapters/claude-code/skills/wiki/SKILL.md +49 -24
  15. package/adapters/claude-code/skills/write/SKILL.md +16 -0
  16. package/adapters/codex/.codex-plugin/plugin.json +1 -1
  17. package/adapters/codex/AGENTS.md +2 -2
  18. package/adapters/codex/rules/oms.md +1 -1
  19. package/adapters/codex/skills/oms-compile/SKILL.md +7 -9
  20. package/adapters/codex/skills/oms-distill/SKILL.md +4 -9
  21. package/adapters/codex/skills/oms-link/SKILL.md +35 -0
  22. package/adapters/codex/skills/oms-retrieve/SKILL.md +5 -6
  23. package/adapters/codex/skills/oms-wiki/SKILL.md +28 -8
  24. package/adapters/codex/skills/oms-write/SKILL.md +10 -0
  25. package/adapters/hermes/README.md +3 -1
  26. package/adapters/hermes/SOUL.md +2 -3
  27. package/adapters/hermes/manifest.json +1 -1
  28. package/adapters/hermes/skills/compile/SKILL.md +5 -7
  29. package/adapters/hermes/skills/distill/SKILL.md +1 -3
  30. package/adapters/hermes/skills/link/SKILL.md +18 -0
  31. package/adapters/hermes/skills/retrieve/SKILL.md +5 -6
  32. package/adapters/hermes/skills/setup/SKILL.md +5 -2
  33. package/adapters/hermes/skills/wiki/SKILL.md +4 -2
  34. package/adapters/hermes/skills/write/SKILL.md +10 -0
  35. package/core/AGENTS.md +4 -2
  36. package/core/agents/librarian.md +3 -2
  37. package/core/ontology/concepts/term.yaml +12 -0
  38. package/core/ontology/taxonomy.yaml +3 -0
  39. package/core/skills/compile/SKILL.md +19 -18
  40. package/core/skills/distill/SKILL.md +13 -24
  41. package/core/skills/link/SKILL.md +130 -0
  42. package/core/skills/retrieve/SKILL.md +0 -1
  43. package/core/skills/setup/SKILL.md +12 -14
  44. package/core/skills/vault-lint/SKILL.md +1 -1
  45. package/core/skills/wiki/SKILL.md +109 -30
  46. package/core/skills/write/SKILL.md +15 -0
  47. package/dist/capture/safe.d.ts +61 -1
  48. package/dist/capture/safe.js +489 -66
  49. package/dist/capture/safe.js.map +1 -1
  50. package/dist/cli/args.d.ts +29 -0
  51. package/dist/cli/args.js +156 -0
  52. package/dist/cli/args.js.map +1 -0
  53. package/dist/cli/audit.d.ts +6 -0
  54. package/dist/cli/audit.js +93 -0
  55. package/dist/cli/audit.js.map +1 -0
  56. package/dist/cli/claude-install-plan.d.ts +10 -0
  57. package/dist/cli/claude-install-plan.js +26 -0
  58. package/dist/cli/claude-install-plan.js.map +1 -0
  59. package/dist/cli/doctor-lint.d.ts +11 -0
  60. package/dist/cli/doctor-lint.js +86 -0
  61. package/dist/cli/doctor-lint.js.map +1 -0
  62. package/dist/cli/global-writeback.d.ts +31 -0
  63. package/dist/cli/global-writeback.js +73 -0
  64. package/dist/cli/global-writeback.js.map +1 -0
  65. package/dist/cli/host-commands.d.ts +30 -0
  66. package/dist/cli/host-commands.js +89 -0
  67. package/dist/cli/host-commands.js.map +1 -0
  68. package/dist/cli/link-command.d.ts +9 -0
  69. package/dist/cli/link-command.js +47 -0
  70. package/dist/cli/link-command.js.map +1 -0
  71. package/dist/cli/linkify.d.ts +23 -0
  72. package/dist/cli/linkify.js +118 -0
  73. package/dist/cli/linkify.js.map +1 -0
  74. package/dist/cli/oms.d.ts +8 -32
  75. package/dist/cli/oms.js +100 -703
  76. package/dist/cli/oms.js.map +1 -1
  77. package/dist/cli/semantic-args.d.ts +1 -2
  78. package/dist/cli/semantic-args.js +4 -7
  79. package/dist/cli/semantic-args.js.map +1 -1
  80. package/dist/cli/semantic-http.d.ts +0 -3
  81. package/dist/cli/semantic-http.js +40 -45
  82. package/dist/cli/semantic-http.js.map +1 -1
  83. package/dist/cli/semantic-usage.js +10 -9
  84. package/dist/cli/semantic-usage.js.map +1 -1
  85. package/dist/cli/semantic.js +99 -137
  86. package/dist/cli/semantic.js.map +1 -1
  87. package/dist/cli/setup-command.d.ts +11 -0
  88. package/dist/cli/setup-command.js +196 -0
  89. package/dist/cli/setup-command.js.map +1 -0
  90. package/dist/cli/setup-documents.d.ts +15 -0
  91. package/dist/cli/setup-documents.js +149 -0
  92. package/dist/cli/setup-documents.js.map +1 -0
  93. package/dist/cli/update-notice.d.ts +10 -0
  94. package/dist/cli/update-notice.js +42 -0
  95. package/dist/cli/update-notice.js.map +1 -0
  96. package/dist/cli/usage.d.ts +4 -0
  97. package/dist/cli/usage.js +102 -0
  98. package/dist/cli/usage.js.map +1 -0
  99. package/dist/conventions/lint.js +12 -33
  100. package/dist/conventions/lint.js.map +1 -1
  101. package/dist/conventions/report.d.ts +62 -0
  102. package/dist/conventions/report.js +217 -0
  103. package/dist/conventions/report.js.map +1 -0
  104. package/dist/conventions/validate.d.ts +1 -1
  105. package/dist/conventions/vault-walk.d.ts +38 -0
  106. package/dist/conventions/vault-walk.js +80 -0
  107. package/dist/conventions/vault-walk.js.map +1 -0
  108. package/dist/conventions/write-contract.d.ts +27 -0
  109. package/dist/conventions/write-contract.js +91 -0
  110. package/dist/conventions/write-contract.js.map +1 -0
  111. package/dist/conventions/write-protocol.d.ts +39 -0
  112. package/dist/conventions/write-protocol.js +44 -0
  113. package/dist/conventions/write-protocol.js.map +1 -0
  114. package/dist/core/ontology/loader.d.ts +2 -0
  115. package/dist/{ontology → core/ontology}/loader.js +11 -20
  116. package/dist/core/ontology/loader.js.map +1 -0
  117. package/dist/core/ontology/resolver.d.ts +2 -0
  118. package/dist/{ontology → core/ontology}/resolver.js +1 -15
  119. package/dist/core/ontology/resolver.js.map +1 -0
  120. package/dist/core/ontology/types.d.ts +47 -0
  121. package/dist/core/ontology/types.js +2 -0
  122. package/dist/core/ontology/types.js.map +1 -0
  123. package/dist/core/runtime/assets.d.ts +20 -0
  124. package/dist/core/runtime/assets.js +66 -0
  125. package/dist/core/runtime/assets.js.map +1 -0
  126. package/dist/engine/assemble.d.ts +28 -72
  127. package/dist/engine/assemble.js +77 -61
  128. package/dist/engine/assemble.js.map +1 -1
  129. package/dist/engine/conventions/vault-lint.d.ts +30 -2
  130. package/dist/engine/conventions/vault-lint.js +93 -97
  131. package/dist/engine/conventions/vault-lint.js.map +1 -1
  132. package/dist/engine/embed/deferred.d.ts +3 -4
  133. package/dist/engine/embed/deferred.js +10 -7
  134. package/dist/engine/embed/deferred.js.map +1 -1
  135. package/dist/engine/embed/identity.d.ts +11 -0
  136. package/dist/engine/embed/identity.js +15 -0
  137. package/dist/engine/embed/identity.js.map +1 -0
  138. package/dist/engine/embed/provider.d.ts +12 -13
  139. package/dist/engine/embed/provider.js +30 -27
  140. package/dist/engine/embed/provider.js.map +1 -1
  141. package/dist/engine/embed/store.d.ts +48 -27
  142. package/dist/engine/embed/store.js +281 -98
  143. package/dist/engine/embed/store.js.map +1 -1
  144. package/dist/engine/embed/sync.d.ts +17 -47
  145. package/dist/engine/embed/sync.js +233 -69
  146. package/dist/engine/embed/sync.js.map +1 -1
  147. package/dist/engine/graph/builder.d.ts +1 -1
  148. package/dist/engine/graph/builder.js +1 -1
  149. package/dist/engine/graph/explore.d.ts +2 -2
  150. package/dist/engine/graph/explore.js +0 -0
  151. package/dist/engine/graph/resolver.d.ts +17 -0
  152. package/dist/engine/graph/resolver.js +46 -11
  153. package/dist/engine/graph/resolver.js.map +1 -1
  154. package/dist/engine/linkify/apply.d.ts +56 -0
  155. package/dist/engine/linkify/apply.js +65 -0
  156. package/dist/engine/linkify/apply.js.map +1 -0
  157. package/dist/engine/linkify/josa.d.ts +58 -0
  158. package/dist/engine/linkify/josa.js +133 -0
  159. package/dist/engine/linkify/josa.js.map +1 -0
  160. package/dist/engine/linkify/mask.d.ts +29 -0
  161. package/dist/engine/linkify/mask.js +173 -0
  162. package/dist/engine/linkify/mask.js.map +1 -0
  163. package/dist/engine/linkify/suggest.d.ts +52 -0
  164. package/dist/engine/linkify/suggest.js +181 -0
  165. package/dist/engine/linkify/suggest.js.map +1 -0
  166. package/dist/engine/linkify/types.d.ts +68 -0
  167. package/dist/engine/linkify/types.js +12 -0
  168. package/dist/engine/linkify/types.js.map +1 -0
  169. package/dist/engine/mcp/facade.d.ts +12 -18
  170. package/dist/engine/mcp/facade.js +30 -80
  171. package/dist/engine/mcp/facade.js.map +1 -1
  172. package/dist/engine/mcp/op-mappers.d.ts +3 -9
  173. package/dist/engine/mcp/op-mappers.js +2 -30
  174. package/dist/engine/mcp/op-mappers.js.map +1 -1
  175. package/dist/engine/mcp/types.d.ts +5 -29
  176. package/dist/engine/tracer.js +6 -2
  177. package/dist/engine/tracer.js.map +1 -1
  178. package/dist/engine/types.d.ts +8 -3
  179. package/dist/graph/cache.d.ts +1 -11
  180. package/dist/graph/cache.js +1 -44
  181. package/dist/graph/cache.js.map +1 -1
  182. package/dist/graph/explore.js +88 -137
  183. package/dist/graph/explore.js.map +1 -1
  184. package/dist/harness/surface-registry.d.ts +56 -0
  185. package/dist/harness/surface-registry.js +397 -0
  186. package/dist/harness/surface-registry.js.map +1 -0
  187. package/dist/harness/validation.d.ts +9 -0
  188. package/dist/harness/validation.js +201 -0
  189. package/dist/harness/validation.js.map +1 -0
  190. package/dist/hook/post-tool-use.js +2 -2
  191. package/dist/hook/post-tool-use.js.map +1 -1
  192. package/dist/index.d.ts +7 -5
  193. package/dist/index.js +7 -5
  194. package/dist/index.js.map +1 -1
  195. package/dist/install/adapter-source.d.ts +14 -0
  196. package/dist/install/adapter-source.js +45 -0
  197. package/dist/install/adapter-source.js.map +1 -0
  198. package/dist/install/claude-hooks.d.ts +13 -0
  199. package/dist/install/claude-hooks.js +411 -0
  200. package/dist/install/claude-hooks.js.map +1 -0
  201. package/dist/install/claude-marketplace.d.ts +44 -0
  202. package/dist/install/claude-marketplace.js +89 -0
  203. package/dist/install/claude-marketplace.js.map +1 -0
  204. package/dist/install/claude.d.ts +4 -0
  205. package/dist/install/claude.js +216 -0
  206. package/dist/install/claude.js.map +1 -0
  207. package/dist/install/codex.d.ts +24 -0
  208. package/dist/install/codex.js +193 -0
  209. package/dist/install/codex.js.map +1 -0
  210. package/dist/install/common.d.ts +34 -0
  211. package/dist/install/common.js +122 -0
  212. package/dist/install/common.js.map +1 -0
  213. package/dist/install/hermes.d.ts +4 -0
  214. package/dist/install/hermes.js +78 -0
  215. package/dist/install/hermes.js.map +1 -0
  216. package/dist/install/hosts.d.ts +6 -56
  217. package/dist/install/hosts.js +65 -610
  218. package/dist/install/hosts.js.map +1 -1
  219. package/dist/install/types.d.ts +34 -0
  220. package/dist/install/types.js +2 -0
  221. package/dist/install/types.js.map +1 -0
  222. package/dist/link/convention-note.d.ts +10 -0
  223. package/dist/link/convention-note.js +59 -0
  224. package/dist/link/convention-note.js.map +1 -0
  225. package/dist/link/global-config.d.ts +22 -0
  226. package/dist/link/global-config.js +69 -0
  227. package/dist/link/global-config.js.map +1 -0
  228. package/dist/link/link.d.ts +101 -0
  229. package/dist/link/link.js +265 -0
  230. package/dist/link/link.js.map +1 -0
  231. package/dist/mcp/engine-morning-backend.d.ts +12 -17
  232. package/dist/mcp/engine-morning-backend.js +25 -131
  233. package/dist/mcp/engine-morning-backend.js.map +1 -1
  234. package/dist/mcp/link-tools.d.ts +81 -0
  235. package/dist/mcp/link-tools.js +157 -0
  236. package/dist/mcp/link-tools.js.map +1 -0
  237. package/dist/mcp/semantic-engine.d.ts +32 -0
  238. package/dist/mcp/semantic-engine.js +52 -0
  239. package/dist/mcp/semantic-engine.js.map +1 -0
  240. package/dist/mcp/semantic-retrieve-args.d.ts +1 -5
  241. package/dist/mcp/semantic-retrieve-args.js +1 -26
  242. package/dist/mcp/semantic-retrieve-args.js.map +1 -1
  243. package/dist/mcp/semantic-retrieve-schema.d.ts +0 -14
  244. package/dist/mcp/semantic-retrieve-schema.js +0 -5
  245. package/dist/mcp/semantic-retrieve-schema.js.map +1 -1
  246. package/dist/mcp/semantic-retrieve.d.ts +12 -18
  247. package/dist/mcp/semantic-retrieve.js +40 -71
  248. package/dist/mcp/semantic-retrieve.js.map +1 -1
  249. package/dist/mcp/semantic-tool-schemas.js +7 -24
  250. package/dist/mcp/semantic-tool-schemas.js.map +1 -1
  251. package/dist/mcp/server.d.ts +7 -0
  252. package/dist/mcp/server.js +224 -162
  253. package/dist/mcp/server.js.map +1 -1
  254. package/dist/mcp/update-notice.d.ts +51 -0
  255. package/dist/mcp/update-notice.js +196 -0
  256. package/dist/mcp/update-notice.js.map +1 -0
  257. package/dist/ontology/active.d.ts +7 -0
  258. package/dist/ontology/active.js +41 -0
  259. package/dist/ontology/active.js.map +1 -0
  260. package/dist/retrieve/morning.d.ts +10 -18
  261. package/dist/retrieve/morning.js +2 -26
  262. package/dist/retrieve/morning.js.map +1 -1
  263. package/dist/retrieve/semantic-contract.d.ts +10 -0
  264. package/dist/retrieve/semantic-contract.js +2 -0
  265. package/dist/retrieve/semantic-contract.js.map +1 -0
  266. package/dist/setup/axis.d.ts +22 -3
  267. package/dist/setup/axis.js +82 -35
  268. package/dist/setup/axis.js.map +1 -1
  269. package/dist/update/update.d.ts +12 -0
  270. package/dist/update/update.js +2 -2
  271. package/dist/update/update.js.map +1 -1
  272. package/docs/install.md +43 -7
  273. package/docs/release.md +109 -17
  274. package/package.json +11 -3
  275. package/scripts/install.sh +1 -1
  276. package/adapters/claude-code/skills/capture/SKILL.md +0 -50
  277. package/adapters/codex/skills/oms-capture/SKILL.md +0 -16
  278. package/adapters/hermes/skills/capture/SKILL.md +0 -16
  279. package/core/skills/capture/SKILL.md +0 -50
  280. package/dist/adapt/HostAdapter.d.ts +0 -21
  281. package/dist/adapt/HostAdapter.js +0 -10
  282. package/dist/adapt/HostAdapter.js.map +0 -1
  283. package/dist/adapt/claudeCode.d.ts +0 -9
  284. package/dist/adapt/claudeCode.js +0 -15
  285. package/dist/adapt/claudeCode.js.map +0 -1
  286. package/dist/adapt/codex.d.ts +0 -9
  287. package/dist/adapt/codex.js +0 -15
  288. package/dist/adapt/codex.js.map +0 -1
  289. package/dist/adapt/hermes.d.ts +0 -9
  290. package/dist/adapt/hermes.js +0 -15
  291. package/dist/adapt/hermes.js.map +0 -1
  292. package/dist/cli/semantic-metadata-commands.d.ts +0 -3
  293. package/dist/cli/semantic-metadata-commands.js +0 -115
  294. package/dist/cli/semantic-metadata-commands.js.map +0 -1
  295. package/dist/engine/compile/cascade.d.ts +0 -35
  296. package/dist/engine/compile/cascade.js +0 -59
  297. package/dist/engine/compile/cascade.js.map +0 -1
  298. package/dist/engine/compile/cot.d.ts +0 -30
  299. package/dist/engine/compile/cot.js +0 -153
  300. package/dist/engine/compile/cot.js.map +0 -1
  301. package/dist/engine/compile/phases.d.ts +0 -47
  302. package/dist/engine/compile/phases.js +0 -101
  303. package/dist/engine/compile/phases.js.map +0 -1
  304. package/dist/engine/compile/provenance.d.ts +0 -45
  305. package/dist/engine/compile/provenance.js +0 -103
  306. package/dist/engine/compile/provenance.js.map +0 -1
  307. package/dist/engine/compile/sha-cache.d.ts +0 -42
  308. package/dist/engine/compile/sha-cache.js +0 -86
  309. package/dist/engine/compile/sha-cache.js.map +0 -1
  310. package/dist/engine/compile/types.d.ts +0 -71
  311. package/dist/engine/compile/types.js +0 -9
  312. package/dist/engine/compile/types.js.map +0 -1
  313. package/dist/engine/compile/worker.d.ts +0 -47
  314. package/dist/engine/compile/worker.js +0 -75
  315. package/dist/engine/compile/worker.js.map +0 -1
  316. package/dist/engine/distill/analyzer.d.ts +0 -51
  317. package/dist/engine/distill/analyzer.js +0 -279
  318. package/dist/engine/distill/analyzer.js.map +0 -1
  319. package/dist/engine/distill/clean-room.d.ts +0 -46
  320. package/dist/engine/distill/clean-room.js +0 -131
  321. package/dist/engine/distill/clean-room.js.map +0 -1
  322. package/dist/engine/distill/report.d.ts +0 -23
  323. package/dist/engine/distill/report.js +0 -107
  324. package/dist/engine/distill/report.js.map +0 -1
  325. package/dist/engine/distill/types.d.ts +0 -89
  326. package/dist/engine/distill/types.js +0 -9
  327. package/dist/engine/distill/types.js.map +0 -1
  328. package/dist/engine/embed/pull.d.ts +0 -51
  329. package/dist/engine/embed/pull.js +0 -90
  330. package/dist/engine/embed/pull.js.map +0 -1
  331. package/dist/engine/graph/community.d.ts +0 -38
  332. package/dist/engine/graph/community.js +0 -122
  333. package/dist/engine/graph/community.js.map +0 -1
  334. package/dist/engine/index.d.ts +0 -5
  335. package/dist/engine/index.js +0 -2
  336. package/dist/engine/index.js.map +0 -1
  337. package/dist/engine/mcp/index.d.ts +0 -15
  338. package/dist/engine/mcp/index.js +0 -19
  339. package/dist/engine/mcp/index.js.map +0 -1
  340. package/dist/engine/mcp/retrieve-mapper.d.ts +0 -38
  341. package/dist/engine/mcp/retrieve-mapper.js +0 -96
  342. package/dist/engine/mcp/retrieve-mapper.js.map +0 -1
  343. package/dist/engine/setup/ambiguity.d.ts +0 -39
  344. package/dist/engine/setup/ambiguity.js +0 -50
  345. package/dist/engine/setup/ambiguity.js.map +0 -1
  346. package/dist/engine/setup/types.d.ts +0 -71
  347. package/dist/engine/setup/types.js +0 -22
  348. package/dist/engine/setup/types.js.map +0 -1
  349. package/dist/engine/setup/writer.d.ts +0 -32
  350. package/dist/engine/setup/writer.js +0 -77
  351. package/dist/engine/setup/writer.js.map +0 -1
  352. package/dist/engine/wiki/collection.d.ts +0 -91
  353. package/dist/engine/wiki/collection.js +0 -188
  354. package/dist/engine/wiki/collection.js.map +0 -1
  355. package/dist/engine/wiki/ledger.d.ts +0 -59
  356. package/dist/engine/wiki/ledger.js +0 -130
  357. package/dist/engine/wiki/ledger.js.map +0 -1
  358. package/dist/engine/wiki/lint.d.ts +0 -38
  359. package/dist/engine/wiki/lint.js +0 -186
  360. package/dist/engine/wiki/lint.js.map +0 -1
  361. package/dist/engine/wiki/navigation.d.ts +0 -40
  362. package/dist/engine/wiki/navigation.js +0 -83
  363. package/dist/engine/wiki/navigation.js.map +0 -1
  364. package/dist/engine/wiki/types.d.ts +0 -54
  365. package/dist/engine/wiki/types.js +0 -7
  366. package/dist/engine/wiki/types.js.map +0 -1
  367. package/dist/ontology/loader.d.ts +0 -13
  368. package/dist/ontology/loader.js.map +0 -1
  369. package/dist/ontology/resolver.d.ts +0 -13
  370. package/dist/ontology/resolver.js.map +0 -1
  371. package/dist/ontology/types.d.ts +0 -72
  372. package/dist/ontology/types.js +0 -12
  373. package/dist/ontology/types.js.map +0 -1
  374. package/dist/retrieve/embedding-sync.d.ts +0 -3
  375. package/dist/retrieve/embedding-sync.js +0 -21
  376. package/dist/retrieve/embedding-sync.js.map +0 -1
  377. package/dist/runtime/assets.d.ts +0 -7
  378. package/dist/runtime/assets.js +0 -13
  379. package/dist/runtime/assets.js.map +0 -1
  380. package/dist/search/semantic-collections.d.ts +0 -32
  381. package/dist/search/semantic-collections.js +0 -68
  382. package/dist/search/semantic-collections.js.map +0 -1
  383. package/dist/search/semantic-contexts.d.ts +0 -21
  384. package/dist/search/semantic-contexts.js +0 -28
  385. package/dist/search/semantic-contexts.js.map +0 -1
  386. package/dist/search/semantic-diagnostics.d.ts +0 -16
  387. package/dist/search/semantic-diagnostics.js +0 -110
  388. package/dist/search/semantic-diagnostics.js.map +0 -1
  389. package/dist/search/semantic-documents.d.ts +0 -3
  390. package/dist/search/semantic-documents.js +0 -150
  391. package/dist/search/semantic-documents.js.map +0 -1
  392. package/dist/search/semantic-embedding-hash.d.ts +0 -3
  393. package/dist/search/semantic-embedding-hash.js +0 -30
  394. package/dist/search/semantic-embedding-hash.js.map +0 -1
  395. package/dist/search/semantic-embedding-provider.d.ts +0 -9
  396. package/dist/search/semantic-embedding-provider.js +0 -58
  397. package/dist/search/semantic-embedding-provider.js.map +0 -1
  398. package/dist/search/semantic-index-build.d.ts +0 -13
  399. package/dist/search/semantic-index-build.js +0 -101
  400. package/dist/search/semantic-index-build.js.map +0 -1
  401. package/dist/search/semantic-index-core.d.ts +0 -21
  402. package/dist/search/semantic-index-core.js +0 -106
  403. package/dist/search/semantic-index-core.js.map +0 -1
  404. package/dist/search/semantic-index-io.d.ts +0 -19
  405. package/dist/search/semantic-index-io.js +0 -214
  406. package/dist/search/semantic-index-io.js.map +0 -1
  407. package/dist/search/semantic-index-types.d.ts +0 -50
  408. package/dist/search/semantic-index-types.js +0 -2
  409. package/dist/search/semantic-index-types.js.map +0 -1
  410. package/dist/search/semantic-index.d.ts +0 -4
  411. package/dist/search/semantic-index.js +0 -4
  412. package/dist/search/semantic-index.js.map +0 -1
  413. package/dist/search/semantic-listing.d.ts +0 -12
  414. package/dist/search/semantic-listing.js +0 -64
  415. package/dist/search/semantic-listing.js.map +0 -1
  416. package/dist/search/semantic-maintenance-shared.d.ts +0 -15
  417. package/dist/search/semantic-maintenance-shared.js +0 -43
  418. package/dist/search/semantic-maintenance-shared.js.map +0 -1
  419. package/dist/search/semantic-maintenance-types.d.ts +0 -103
  420. package/dist/search/semantic-maintenance-types.js +0 -2
  421. package/dist/search/semantic-maintenance-types.js.map +0 -1
  422. package/dist/search/semantic-maintenance.d.ts +0 -4
  423. package/dist/search/semantic-maintenance.js +0 -5
  424. package/dist/search/semantic-maintenance.js.map +0 -1
  425. package/dist/search/semantic-provider-types.d.ts +0 -34
  426. package/dist/search/semantic-provider-types.js +0 -2
  427. package/dist/search/semantic-provider-types.js.map +0 -1
  428. package/dist/search/semantic-query-types.d.ts +0 -83
  429. package/dist/search/semantic-query-types.js +0 -2
  430. package/dist/search/semantic-query-types.js.map +0 -1
  431. package/dist/search/semantic-query.d.ts +0 -2
  432. package/dist/search/semantic-query.js +0 -188
  433. package/dist/search/semantic-query.js.map +0 -1
  434. package/dist/search/semantic-sqlite-db.d.ts +0 -18
  435. package/dist/search/semantic-sqlite-db.js +0 -87
  436. package/dist/search/semantic-sqlite-db.js.map +0 -1
  437. package/dist/search/semantic-sqlite-query.d.ts +0 -2
  438. package/dist/search/semantic-sqlite-query.js +0 -128
  439. package/dist/search/semantic-sqlite-query.js.map +0 -1
  440. package/dist/search/semantic-sqlite-read.d.ts +0 -5
  441. package/dist/search/semantic-sqlite-read.js +0 -104
  442. package/dist/search/semantic-sqlite-read.js.map +0 -1
  443. package/dist/search/semantic-sqlite-write.d.ts +0 -7
  444. package/dist/search/semantic-sqlite-write.js +0 -66
  445. package/dist/search/semantic-sqlite-write.js.map +0 -1
  446. package/dist/search/semantic-store.d.ts +0 -15
  447. package/dist/search/semantic-store.js +0 -17
  448. package/dist/search/semantic-store.js.map +0 -1
  449. package/dist/search/semantic-sync-types.d.ts +0 -47
  450. package/dist/search/semantic-sync-types.js +0 -2
  451. package/dist/search/semantic-sync-types.js.map +0 -1
  452. package/dist/search/semantic-sync.d.ts +0 -13
  453. package/dist/search/semantic-sync.js +0 -131
  454. package/dist/search/semantic-sync.js.map +0 -1
  455. package/dist/search/semantic-test-fixtures.d.ts +0 -1
  456. package/dist/search/semantic-test-fixtures.js +0 -38
  457. package/dist/search/semantic-test-fixtures.js.map +0 -1
  458. package/dist/search/semantic-token.d.ts +0 -25
  459. package/dist/search/semantic-token.js +0 -114
  460. package/dist/search/semantic-token.js.map +0 -1
  461. package/dist/search/semantic-types.d.ts +0 -5
  462. package/dist/search/semantic-types.js +0 -2
  463. package/dist/search/semantic-types.js.map +0 -1
  464. package/dist/search/semantic.d.ts +0 -6
  465. package/dist/search/semantic.js +0 -6
  466. package/dist/search/semantic.js.map +0 -1
package/CHANGELOG.md ADDED
@@ -0,0 +1,89 @@
1
+ # Changelog
2
+
3
+ ## [Unreleased]
4
+
5
+ ## [0.2.0] - 2026-08-19
6
+
7
+ ### Added
8
+ - The npm package now ships `CHANGELOG.md`, so release notes are available offline and in version control.
9
+ - Releases are published by CI from `oms-v*` tags with npm provenance and an auto-generated GitHub Release whose notes come from the CHANGELOG.
10
+ - Maintainers release with a single command: `npm run release -- <X.Y.Z>` rolls the `[Unreleased]` section into a versioned entry, bumps all version carriers (package.json, plugin manifests), commits, tags, and pushes atomically.
11
+
12
+ #### Note linking
13
+
14
+ - `term` is now a first-class concept in the core ontology, bound to a `terms/` folder. A term note is the one place you define a piece of vocabulary, and its new `aliases` frontmatter field lists every other way you write that word.
15
+ - Two MCP tools turn those terms into links. `oms_link_suggest` is read-only: it ranks the spans in a note that could point at a term note and hands back a hash of the content it looked at. `oms_link_apply` writes, but only the candidates you accepted, and only while that hash still matches, so a note you edited in the meantime is never overwritten by a stale suggestion.
16
+ - `oms linkify [--folder <f>] [--apply] [--yes]` does the same job in bulk over notes you already have. It reports and changes nothing by default; mutation needs both `--apply` and `--yes`.
17
+ - Matching understands Korean josa, so `아타락시아를` links as `[[ataraxia|아타락시아]]를` instead of being skipped for not matching the bare term.
18
+ - A note-linking skill ships to Claude, Codex, and Hermes, so each host knows the suggest-review-apply loop without you explaining it every session.
19
+
20
+ #### Updates and install
21
+
22
+ - A root `.claude-plugin/marketplace.json` makes OMS discoverable through Claude Code's native plugin marketplace. Claude installs now go through `claude plugin marketplace add` plus `claude plugin install oms@oms`, and fall back to the local plugin path when the marketplace flow can't complete, so offline and dev checkouts still work.
23
+ - The MCP server tells you when a newer version exists. It reads a 24-hour cache at boot and appends one line to its `instructions`; the registry lookup happens in a bounded background refresh, never on the startup path. `OMS_UPDATE_NOTICE=0` turns it off.
24
+ - A test and a CI release-tag guard now check that `marketplace.json` and `package.json` agree on the version, so a release can't ship a marketplace manifest pointing at the wrong build.
25
+
26
+ ### Changed
27
+
28
+ - Wikilinks resolve through frontmatter `aliases`. `[[some-alias]]` used to resolve to nothing; it now finds the note that claims that alias, which means alias links count as real graph edges during retrieval.
29
+ - Installing several hosts at once no longer stops at the first failure. Each runtime is isolated, so a broken Codex config can't cost you your Claude and Hermes install.
30
+ - Hermes config writes are an upsert instead of a full overwrite: your comments and key ordering in `~/.hermes/config.yaml` survive an install or update.
31
+ - Claude's third-party marketplace auto-update stays off unless you turn it on. Install prints how to enable `extraKnownMarketplaces.<name>.autoUpdate` in `~/.claude/settings.json` rather than flipping it for you; the `claude` CLI owns that setting.
32
+
33
+ ### Fixed
34
+
35
+ - The MCP server reports its real package version instead of a hardcoded `0.0.0`, so host-side version checks and bug reports show what you're actually running.
36
+
37
+ ## [0.1.9] - 2026-08-14
38
+
39
+ ### Added
40
+ - MCP `write` is now the single vault write window, with `mode: create | append | update`, returning `ask`, `inbox`, `written`, or `rejected` so the agent always knows what happened to a note (#52).
41
+ - A contract gate validates required fields, types, enums, and routing law before anything touches the vault. Extra keys survive the round trip (`additionalProperties: preserve`).
42
+ - Thin write skills for each host: `/oms-write` on Claude, `$oms-write` on Codex, and `write` on Hermes.
43
+
44
+ ### Changed
45
+ - **Breaking:** capture skills are gone (`/oms-capture`, `$oms-capture`, Hermes `capture`), along with the MCP aliases `oms_capture_prepare` and `oms_capture_commit`. After upgrading, reinstall the host adapters with `oms update --yes` or `oms install --runtime <host> --vault <path> --yes`.
46
+
47
+ ### Fixed
48
+ - Transitive production advisories cleared through same-major overrides for `hono`, `@hono/node-server`, `body-parser`, `fast-uri`, `ip-address`, `nanoid`, and `tar`. No new runtime dependencies were added.
49
+
50
+ ## [0.1.8] - 2026-06-17
51
+
52
+ ### Fixed
53
+ - Upstage Solar embeddings work again: the model id `solar-embedding-1-passage` didn't exist, so every embedding call returned HTTP 400. It's now `embedding-passage` (4096d).
54
+ - `embed()` guards its inputs. Empty input becomes a zero vector, and input over 4000 tokens is shrunk and retried, so one oversized or empty chunk no longer fails a whole vault sync.
55
+ - Transitive high-severity advisory in `hono` (pulled in by `@modelcontextprotocol/sdk`) resolved via `overrides: hono ^4.12.25`.
56
+
57
+ ### Changed
58
+ - Claude Code, Codex, and Hermes adapter manifests are synced to 0.1.8.
59
+
60
+ ## [0.1.7] - 2026-06-05
61
+
62
+ > No GitHub Release was published for the `oms-v0.1.7` tag. This section is reconstructed from the commits between `oms-v0.1.6` and `oms-v0.1.7`.
63
+
64
+ ### Added
65
+ - Live graph retrieval plus fail-soft qmd fusion, so retrieval keeps working when the optional qmd side is unavailable.
66
+ - MCP retrieval context surfaced to hosts.
67
+
68
+ ### Changed
69
+ - The npm package root is the runtime asset root: built releases resolve `core/` and `adapters/` from the package root, matching the source layout.
70
+ - `oh-my-second-brain` becomes the canonical repository, npm package, and installed command, with `oms` kept as a compatibility alias for existing MCP, skill, and vault `.oms` surfaces.
71
+ - Install docs point at 0.1.7 so the one-line and npm install examples resolve to the published version.
72
+ - The release workflow no longer requires an `NPM_TOKEN` preflight, allowing npm trusted publishing over OIDC while still using `NODE_AUTH_TOKEN` when the secret exists.
73
+
74
+ ### Fixed
75
+ - Frontmatter diagnostics are tolerant: malformed frontmatter no longer blocks retrieve or build paths.
76
+
77
+ ## [0.1.6] - 2026-06-02
78
+
79
+ ### Changed
80
+ - The project is published to npm as `oh-my-second-brain`, while `oms` stays the CLI, MCP, skill, and repo slug.
81
+ - The installer defaults to the published npm package instead of `npx` against GitHub release URLs.
82
+ - Host MCP registration now points at the installed `oms mcp --vault ...` command.
83
+
84
+ ## [0.1.5] - 2026-06-02
85
+
86
+ ### Changed
87
+ - Oh My Second Brain is the project and display name; `oms` remains the short technical slug for the package, CLI, MCP server, skills, and release assets.
88
+ - Human-facing docs, adapter manifests, host shims, skills, CLI output, MCP tool titles, and installer text all use the Oh My Second Brain name.
89
+ - Release package URLs point at `oms-v0.1.5` / `oms-0.1.5.tgz`.
package/README.ko.md ADDED
@@ -0,0 +1,127 @@
1
+ # Oh My Second Brain
2
+
3
+ > Obsidian 및 일반 마크다운 지식 볼트를 위한, 호스트에 종속되지 않고 사용자가 소유하는 컨벤션 레이어.
4
+
5
+ [English](./README.md) · **한국어**
6
+
7
+ [![npm](https://img.shields.io/npm/v/oh-my-second-brain)](https://www.npmjs.com/package/oh-my-second-brain)
8
+ ![license](https://img.shields.io/npm/l/oh-my-second-brain)
9
+
10
+ Oh My Second Brain(`oms`)은 기존 Obsidian/마크다운 볼트를 에이전트가 읽을 수 있는 지식 베이스로 만든다. 볼트가 가진 고유한 폴더/프론트매터 컨벤션을 로드하고, 그에 맞게 노트를 검증하고, 로컬 링크 그래프를 만들고, 이 모든 것을 단일 MCP 서버를 통해 AI 코딩 호스트(Claude Code, Codex, Hermes)에 노출한다. 특정 호스트에 종속되지 않으며 노트를 다른 곳으로 옮기지도 않는다.
11
+
12
+ **컨벤션 우선, 사용자 소유**가 원칙이다. 볼트는 그대로 일반 마크다운으로 남고, 온톨로지는 사용자가 통제하는 커밋된 `.oms/` 폴더에 살며, 어떤 것도 독점 저장소 뒤에 숨지 않는다.
13
+
14
+ ## 동작 방식
15
+
16
+ ```
17
+ core (한 번만 작성) adapters (호스트마다 하나)
18
+ 온톨로지 로딩 claude-code .claude-plugin + CLAUDE.md /sigil
19
+ 컨벤션 검증 + codex .codex-plugin + AGENTS.md $sigil
20
+ 그래프 + 시맨틱 런타임 hermes manifest.json + SOUL.md (MCP/tools)
21
+ MCP 서버 (capture/retrieve/validate)
22
+ ```
23
+
24
+ - **core**는 호스트에 독립적이다: 온톨로지, 검증, 그래프/시맨틱 엔진, MCP 서버.
25
+ - 각 **adapter**는 호스트 하나의 구조적 차이(매니페스트 스키마, 컨벤션 파일, 호출 sigil)만 흡수한다. 호스트를 추가한다는 건 core를 건드리는 게 아니라 adapter 디렉터리 하나를 더하는 일이다.
26
+ - 호스트 간 연결 메커니즘은 모든 호스트가 함께 쓰는 단일 **MCP 서버**(`oms mcp`)다.
27
+
28
+ ## 요구 사항
29
+
30
+ - Node.js 20 이상
31
+ - `PATH`에 `npm`
32
+ - Obsidian 볼트 또는 마크다운 노트 폴더
33
+ - (선택) 호스트 CLI: `claude`, `codex`, `hermes`
34
+ - (선택) [시맨틱 검색](#시맨틱-검색-선택)용 임베딩 백엔드
35
+
36
+ ## 설치
37
+
38
+ 원라인 설치(게시된 npm 패키지 사용):
39
+
40
+ ```bash
41
+ curl -fsSL https://raw.githubusercontent.com/GoBeromsu/oh-my-second-brain/main/scripts/install.sh | bash
42
+ ```
43
+
44
+ 호스트를 선택하고 볼트를 지정:
45
+
46
+ ```bash
47
+ curl -fsSL https://raw.githubusercontent.com/GoBeromsu/oh-my-second-brain/main/scripts/install.sh | bash -s -- --runtime all --vault /path/to/vault
48
+ ```
49
+
50
+ 또는 npm으로:
51
+
52
+ ```bash
53
+ npm install -g oh-my-second-brain
54
+ oms install --runtime all --vault /path/to/vault --dry-run # 미리보기
55
+ oms install --runtime all --vault /path/to/vault --yes # 적용
56
+ ```
57
+
58
+ 전체 가이드: [docs/install.md](./docs/install.md).
59
+
60
+ ## 호스트
61
+
62
+ | 호스트 | 매니페스트 | 컨벤션 파일 | Sigil | 상태 |
63
+ |------|----------|-----------|-------|--------|
64
+ | **claude-code** | `.claude-plugin/plugin.json` | `CLAUDE.md` | `/` | 설치 가능 |
65
+ | **codex** | `.codex-plugin/plugin.json` | `AGENTS.md` | `$` | 네이티브 스킬 + MCP |
66
+ | **hermes** | `manifest.json` | `SOUL.md` | (MCP/tools) | 네이티브 스킬 + MCP |
67
+
68
+ `oms install`은 호스트 네이티브 규칙/스킬과 관리형 `oms` MCP 등록을 작성하며, `oms uninstall`로 되돌릴 수 있다. 호스트별 상세: [adapters/README.md](./adapters/README.md).
69
+
70
+ ## CLI
71
+
72
+ ```
73
+ oms setup 기존 볼트를 컨벤션으로 채택 (.oms/taxonomy.yaml 작성, 노트는 수정하지 않음)
74
+ oms install 호스트 어댑터 + MCP 등록 설치
75
+ oms uninstall 호스트 어댑터 + MCP 등록 제거
76
+ oms update 패키지 업데이트 확인/적용 후 어댑터 재조정
77
+ oms doctor 온톨로지 기준 노트 검증 (broken-link + orphan 탐지)
78
+ oms semantic 네이티브 마크다운 시맨틱 인덱스 / 검색 / 조회
79
+ oms mcp stdio MCP 서버 시작
80
+ oms hook 볼트 가드 훅 (Claude Code pre/post tool-use)
81
+ ```
82
+
83
+ `oh-my-second-brain`이 정식 명령이고, `oms`는 짧은 별칭이다.
84
+
85
+ ## MCP 도구
86
+
87
+ `oms mcp`는 상태, 읽기, 검색, 검증, 게이트된 write 도구를 노출한다:
88
+
89
+ `oms_graph_status` · `oms_graph_build` · `oms_list_concepts` · `oms_retrieve_context` · `oms_retrieve_by_axis` · `oms_sync_embeddings` · `oms_semantic_query` · `oms_get_document` · `oms_multi_get_documents` · `oms_lazy_load_note` · `oms_validate_contract` · `write`
90
+
91
+ `write`는 경로 안전성, 볼트 격리, 커널이 소유한 컨셉 계약으로 게이트된다.
92
+
93
+ ## 볼트 구조 (`.oms/`)
94
+
95
+ `oms setup`은 볼트를 커밋된 `.oms/` 폴더로 채택하며, 두 개의 레이어를 둔다(ADR-006):
96
+
97
+ - **Contract (기계 검증)** — `taxonomy.yaml`(폴더 → intent → concept)와 `concepts/*.yaml`(노트 타입별 프론트매터 선언). `vault-lint`와 `oms_validate_contract`가 강제한다.
98
+ - **Governance (사람 의도)** — `governance/`의 ADR과 규칙. 기계가 파싱하지 않는다.
99
+ - `.oms/cache/`(파생 그래프/임베딩 아티팩트)는 gitignore된다.
100
+
101
+ `setup`은 `.oms/taxonomy.yaml`을 작성하고 기존 `.oms/concepts/`를 보존하며, 노트는 절대 수정하지 않는다.
102
+
103
+ ## 시맨틱 검색 (선택)
104
+
105
+ 시맨틱 검색에는 실제 임베딩 모델이 필요하다 — 프로덕션 경로에 가짜/해시 폴백은 없다(ADR-007). 로컬 GGUF 모델(`OMS_MODEL_PATH`) **또는** 임베딩 API 키(`UPSTAGE_API_KEY`) 중 하나를 설정한 뒤 동기화·질의한다:
106
+
107
+ ```bash
108
+ oms semantic sync --vault /path/to/vault --collection vault
109
+ oms semantic query "무엇을 찾아야 하나?" --vault /path/to/vault
110
+ ```
111
+
112
+ 모델을 설정하지 않아도 그래프 기반 검색과 컨벤션 검증은 그대로 동작한다.
113
+
114
+ ## 개발
115
+
116
+ ```bash
117
+ npm install
118
+ npm run build
119
+ npm test
120
+ npm run release:check # lint + build + test + audit + pack + artifact-smoke + plugin 검증
121
+ ```
122
+
123
+ 릴리스 절차: [docs/release.md](./docs/release.md).
124
+
125
+ ## 라이선스
126
+
127
+ MIT. 상위 출처 크레딧은 [ACKNOWLEDGMENTS.md](./ACKNOWLEDGMENTS.md) 참고.
package/README.md ADDED
@@ -0,0 +1,128 @@
1
+ # Oh My Second Brain
2
+
3
+ > A host-agnostic, user-owned convention layer for Obsidian and plain-markdown knowledge vaults.
4
+
5
+ **English** · [한국어](./README.ko.md)
6
+
7
+ [![npm](https://img.shields.io/npm/v/oh-my-second-brain)](https://www.npmjs.com/package/oh-my-second-brain)
8
+ ![license](https://img.shields.io/npm/l/oh-my-second-brain)
9
+
10
+ Oh My Second Brain (`oms`) turns an existing Obsidian/markdown vault into an agent-readable knowledge base. It loads your vault's own folder/frontmatter conventions, validates notes against them, builds a local link graph, and exposes all of it to AI coding hosts (Claude Code, Codex, Hermes) through a single MCP server — without locking you into any one host or moving your notes.
11
+
12
+ It is **convention-first and user-owned**: your vault stays plain markdown, the ontology lives in a committed `.oms/` folder you control, and nothing is hidden behind a proprietary store.
13
+
14
+ ## How it works
15
+
16
+ ```
17
+ core (written once) adapters (one per host)
18
+ ontology loading claude-code .claude-plugin + CLAUDE.md /sigil
19
+ convention validation + codex .codex-plugin + AGENTS.md $sigil
20
+ graph + semantic runtime hermes manifest.json + SOUL.md (MCP/tools)
21
+ MCP server (capture/retrieve/validate)
22
+ ```
23
+
24
+ - **core** is host-agnostic: ontology, validation, the graph/semantic engine, and the MCP server.
25
+ - each **adapter** absorbs exactly one host's structural differences (manifest schema, convention file, invocation sigil) — adding a host means adding an adapter directory, not touching core.
26
+ - the cross-host mechanism is one **MCP server** (`oms mcp`) that every host talks to.
27
+
28
+ ## Requirements
29
+
30
+ - Node.js 20+
31
+ - `npm` on `PATH`
32
+ - An Obsidian vault, or any folder of markdown notes
33
+ - Optional host CLIs: `claude`, `codex`, `hermes`
34
+ - Optional embedding backend for [semantic search](#semantic-search-optional)
35
+
36
+ ## Install
37
+
38
+ One-line (uses the published npm package):
39
+
40
+ ```bash
41
+ curl -fsSL https://raw.githubusercontent.com/GoBeromsu/oh-my-second-brain/main/scripts/install.sh | bash
42
+ ```
43
+
44
+ Pick hosts and point at a vault:
45
+
46
+ ```bash
47
+ curl -fsSL https://raw.githubusercontent.com/GoBeromsu/oh-my-second-brain/main/scripts/install.sh | bash -s -- --runtime all --vault /path/to/vault
48
+ ```
49
+
50
+ Or via npm:
51
+
52
+ ```bash
53
+ npm install -g oh-my-second-brain
54
+ oms install --runtime all --vault /path/to/vault --dry-run # preview
55
+ oms install --runtime all --vault /path/to/vault --yes # apply
56
+ ```
57
+
58
+ Full guide: [docs/install.md](./docs/install.md).
59
+
60
+ ## Hosts
61
+
62
+ | Host | Manifest | Convention file | Sigil | Status |
63
+ |------|----------|-----------------|-------|--------|
64
+ | **claude-code** | `.claude-plugin/plugin.json` | `CLAUDE.md` | `/` | installable |
65
+ | **codex** | `.codex-plugin/plugin.json` | `AGENTS.md` | `$` | native skills + MCP |
66
+ | **hermes** | `manifest.json` | `SOUL.md` | (MCP/tools) | native skills + MCP |
67
+
68
+ `oms install` writes the host-native rules/skills and a managed `oms` MCP registration, and is reversible with `oms uninstall`. Per-host details: [adapters/README.md](./adapters/README.md).
69
+
70
+ ## CLI
71
+
72
+ ```
73
+ oms setup Adopt an existing vault into the convention (writes .oms/taxonomy.yaml; never edits notes)
74
+ oms install Install host adapters + MCP registration
75
+ oms uninstall Remove host adapters + MCP registration
76
+ oms update Check/apply a package update, then reconcile adapters
77
+ oms doctor Validate note frontmatter against the ontology (aggregated by field & concept)
78
+ oms lint Check vault link health: broken [[wikilinks]] + orphan notes
79
+ oms semantic Native markdown semantic index / search / get
80
+ oms mcp Start the stdio MCP server
81
+ oms hook Vault guard hooks (Claude Code pre/post tool-use)
82
+ ```
83
+
84
+ `oh-my-second-brain` is the canonical command; `oms` is the short alias.
85
+
86
+ ## MCP tools
87
+
88
+ `oms mcp` exposes status, read, retrieve, validation, and gated write tools, including:
89
+
90
+ `oms_graph_status` · `oms_graph_build` · `oms_list_concepts` · `oms_retrieve_context` · `oms_retrieve_by_axis` · `oms_sync_embeddings` · `oms_semantic_query` · `oms_get_document` · `oms_multi_get_documents` · `oms_lazy_load_note` · `oms_validate_contract` · `write`
91
+
92
+ `write` is gated by path-safety, vault-confinement, and the kernel-owned concept contract.
93
+
94
+ ## Vault layout (`.oms/`)
95
+
96
+ `oms setup` adopts your vault into a committed `.oms/` folder with two layers (ADR-006):
97
+
98
+ - **Contract (machine-validated)** — `taxonomy.yaml` (folder → intent → concept) and `concepts/*.yaml` (per-note-type frontmatter declarations). Enforced by `vault-lint` and `oms_validate_contract`.
99
+ - **Governance (human intent)** — `governance/` ADRs and rules; never machine-parsed.
100
+ - `.oms/cache/` (derived graph/embedding artifacts) is gitignored.
101
+
102
+ `setup` writes `.oms/taxonomy.yaml`, preserves existing `.oms/concepts/`, and never modifies your notes.
103
+
104
+ ## Semantic search (optional)
105
+
106
+ Semantic retrieval requires a real embedding model — there is no fake/hash fallback (ADR-007). Configure embeddings explicitly with `OMS_EMBEDDING_PROVIDER` + `OMS_EMBEDDING_MODEL` (`gguf` with a local GGUF model path, or `upstage` with a model id and `UPSTAGE_API_KEY`), then sync and query:
107
+
108
+ ```bash
109
+ oms semantic sync --vault /path/to/vault --collection vault
110
+ oms semantic query "what should I retrieve?" --vault /path/to/vault
111
+ ```
112
+
113
+ Without a configured model, graph-based retrieval and convention validation still work.
114
+
115
+ ## Development
116
+
117
+ ```bash
118
+ npm install
119
+ npm run build
120
+ npm test
121
+ npm run release:check # lint + build + test + audit + pack + artifact-smoke + plugin validate
122
+ ```
123
+
124
+ Release process: [docs/release.md](./docs/release.md).
125
+
126
+ ## License
127
+
128
+ MIT. See [ACKNOWLEDGMENTS.md](./ACKNOWLEDGMENTS.md) for upstream credits.
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Principle
4
4
 
5
- Oh My Second Brain's **core** (ontology loading, convention validation, graph/search runtime targets, and MCP server once implemented) is written once.
5
+ Oh My Second Brain's **core** (ontology loading, convention validation, graph/search runtime targets, and MCP server) is written once.
6
6
  Each **adapter** absorbs exactly one host's structural differences — manifest schema,
7
7
  hook format, invocation sigil, and convention-file name — so adding a new host
8
8
  means adding one new adapter directory, not touching core.
@@ -51,13 +51,13 @@ Release contract: the npm tarball must include `adapters/claude-code/` because `
51
51
  - Each path must contain a `SKILL.md`.
52
52
  - **Convention file**: `CLAUDE.md` — append `adapters/claude-code/CLAUDE.md` to your project's `CLAUDE.md`.
53
53
  - **Sigil**: `/` (e.g. `/oms-setup`).
54
- - **Hooks**: none in v0 (hook format is `hooks/hooks.json` multi-script array roadmap).
54
+ - **Hooks**: `oms install --runtime claude` can upsert OMS guard entries in `~/.claude/settings.json` while preserving existing non-OMS hooks.
55
55
  - **Install**: `claude plugin install path/to/adapters/claude-code` or point Claude Code at the adapter directory.
56
56
 
57
57
  ### codex (native skills + MCP install v0)
58
58
 
59
59
  - **Manifest**: `.codex-plugin/plugin.json`
60
- - Schema differs from claude-code: codex uses a unified `codex-native-hook.mjs` instead of `hooks.json`.
60
+ - Schema differs from claude-code: codex declares its skill directory and MCP server manifest directly.
61
61
  - Skills are invoked with `$` sigil instead of `/`.
62
62
  - **Convention file**: `AGENTS.md` — append `adapters/codex/AGENTS.md` to your project's `AGENTS.md`.
63
63
  - **Status**: v0 native install. `oms install --runtime codex` installs `~/.codex/rules/oms.md`, namespaced `~/.codex/skills/oms-*`, a managed `[mcp_servers.oms]` block in `~/.codex/config.toml`, and a copy of the adapter under `~/.codex/plugins/oms`.
@@ -75,17 +75,17 @@ Release contract: the npm tarball must include `adapters/claude-code/` because `
75
75
  ## MCP Backbone
76
76
 
77
77
  The cross-host mechanism is an **MCP server** (`src/mcp/server.ts`) that exposes
78
- contract validation, retrieve, graph/status, and gated capture tools.
78
+ contract validation, retrieve, graph/status, and gated write tools.
79
79
 
80
80
  All three hosts natively support MCP (`.mcp.json` for claude-code and codex; "any MCP server" for Hermes).
81
81
  In the current repository, `src/mcp/server.ts` starts a real stdio MCP server via `oms mcp`.
82
82
 
83
- The MCP server currently exposes status/read/cache/retrieve/capture tools:
83
+ The MCP server currently exposes status/read/cache/retrieve/write tools:
84
84
  `oms_graph_status`, `oms_graph_build`, `oms_list_concepts`,
85
85
  `oms_retrieve_context`, `oms_sync_embeddings`, `oms_get_document`, `oms_multi_get_documents`,
86
86
  `oms_retrieve_by_axis`, `oms_lazy_load_note`,
87
- `oms_validate_contract`, `oms_capture_prepare`, and `oms_capture_commit`.
88
- Capture commit is gated by path-safety, vault-confinement, and contract validation. The CLI (`oms setup`, `oms install`, `oms uninstall`, `oms doctor`) remains the real surface for lifecycle commands.
87
+ `oms_validate_contract`, and `write`.
88
+ `write` is gated by path-safety, vault-confinement, and contract validation. The CLI (`oms setup`, `oms install`, `oms uninstall`, `oms doctor`) remains the real surface for lifecycle commands.
89
89
 
90
90
  ---
91
91
 
@@ -94,6 +94,6 @@ Capture commit is gated by path-safety, vault-confinement, and contract validati
94
94
  1. Create `adapters/<host>/`.
95
95
  2. Write the host-specific manifest in the correct subdirectory and schema.
96
96
  3. Write the convention-file shim (`CLAUDE.md` / `AGENTS.md` / `SOUL.md` / whatever the host uses).
97
- 4. Write skill wrappers that shell out to `oms <verb>` (for lifecycle) or call the MCP server (for capture/retrieve).
97
+ 4. Write skill wrappers that shell out to `oms <verb>` (for lifecycle) or call the MCP server (for write/retrieve).
98
98
  5. Document the host's structural differences in this table.
99
99
  6. Do **not** modify `core/` or add host-specific logic to shared code.
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "oms",
3
- "version": "0.1.8",
3
+ "version": "0.2.0",
4
4
  "description": "Oh My Second Brain convention layer for Obsidian vaults — capture, retrieve, and validate knowledge under a declared semantic convention.",
5
5
  "author": {
6
6
  "name": "gobeumsu"
7
7
  },
8
8
  "license": "MIT",
9
+ "mcpServers": "./.mcp.json",
9
10
  "keywords": [
10
11
  "obsidian",
11
12
  "knowledge-base",
@@ -17,7 +18,7 @@
17
18
  "./skills/setup/",
18
19
  "./skills/doctor/",
19
20
  "./skills/define/",
20
- "./skills/capture/",
21
+ "./skills/write/",
21
22
  "./skills/retrieve/",
22
23
  "./skills/uninstall/",
23
24
  "./skills/update/"
@@ -0,0 +1,8 @@
1
+ {
2
+ "mcpServers": {
3
+ "oms": {
4
+ "command": "oms",
5
+ "args": ["mcp"]
6
+ }
7
+ }
8
+ }
@@ -12,15 +12,14 @@ All knowledge capture and retrieval must follow the declared semantic convention
12
12
  - Read `.oms/taxonomy.yaml` to understand which folders hold which concepts.
13
13
  - Read `.oms/concepts/*.yaml` to understand field requirements and lenses.
14
14
 
15
- **When capturing new knowledge:**
16
- - Use the `/oms-capture` skill or follow the librarian persona (`core/agents/librarian.md`).
17
- - Every note must carry the required frontmatter fields for its concept.
18
- - Place notes in the folder declared in the taxonomy — do not invent new folders without updating `.oms/taxonomy.yaml`.
15
+ **When writing vault notes:**
16
+ - Use the `/oms-write` skill. Call MCP `write`. Do not use host Write/Edit for vault `.md` files.
17
+ - The kernel fills and checks frontmatter from `.oms`. `ask` or `rejected` means fix and call `write` again.
19
18
 
20
19
  **When retrieving knowledge:**
21
20
  - Use the `/oms-retrieve` skill or follow the retriever persona (`core/agents/retriever.md`).
22
21
  - Apply the concept's declared lens for the retrieval purpose (synthesis, audit, etc.).
23
22
  - Return only the fields the lens specifies — do not dump full frontmatter.
24
23
 
25
- **Convention violations are warnings, not errors (v0).**
26
- `oms doctor` always exits 0. Fix violations incrementally.
24
+ **Doctor is advisory. Write is not.**
25
+ `oms doctor` always exits 0. MCP `write` rejects contract violations.
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  name: oms-compile
3
- description: Stateless per-concept compile worker synthesizes a concept wiki page from source materials with SHA-incremental skip, provenance weighting, and cascade backlinks.
3
+ description: Agent-guided concept compile — synthesize a concept wiki page from source materials with incremental skip, provenance weighting, and cascade backlinks.
4
4
  ---
5
5
 
6
6
  # Skill: oms-compile (Claude Code)
7
7
 
8
- Synthesize a concept wiki page from source materials using the OMS compile engine.
8
+ Synthesize a concept wiki page from source materials.
9
9
 
10
10
  ## Invocation
11
11
 
@@ -15,38 +15,13 @@ Synthesize a concept wiki page from source materials using the OMS compile engin
15
15
 
16
16
  ## What this skill does
17
17
 
18
- Conceptually shells out to:
18
+ Thin pointer to `core/skills/compile`. There is no `oms compile` CLI.
19
19
 
20
- ```bash
21
- oms compile <concept>
22
- ```
23
-
24
- Thin pointer to `core/skills/compile`. The engine runs Phase A (load + grade
25
- materials, pure read) then Phase B (write body to `processed/` tier). Promotion
26
- from `processed/` to `wiki/` is the M3 collection owner's responsibility.
27
-
28
- ## Agent-guided steps (v0)
29
-
30
- 1. Identify the **concept** name and locate its source materials.
31
- 2. Run **Phase A** — load and grade all materials; resolve backlinks from the compile graph.
32
- 3. Call `compile(opts)` with materials, graph, llm, and `dotLlmwiki` cache path.
33
- 4. Check `wasSkipped(result)` — if the material SHA is unchanged, skip downstream.
34
- 5. Run **Phase B** — write `result.body` to the `processed/` tier only.
35
- 6. Pass `result.affected_backlinks` to the wiki collection owner (M3) to mark stale pages.
36
-
37
- ## Provenance order
38
-
39
- Authored > curated > external-raw. Authored materials carry a
40
- `[AUTHORED — preserve individual voice]` label in the LLM prompt.
41
-
42
- ## Runtime
43
-
44
- No MCP tool is required for compile itself — it is a pure TypeScript call.
45
- Use `oms_retrieve_context` or `oms_get_document` to gather source materials
46
- before invoking compile. Delete `{dotLlmwiki}/sha-cache.json` to force a
47
- full recompile of all concepts.
48
-
49
- ## NOTES
20
+ 1. **Phase A** — load and grade materials; resolve backlinks (pure read).
21
+ 2. Skip rewrite if the material SHA is unchanged.
22
+ 3. **Phase B** — write the body to `processed/` only.
23
+ 4. Pass affected backlinks to the wiki skill so those pages can be marked stale.
50
24
 
51
- Wiki mirror deferred the `wiki` skill is built by a parallel milestone (M3)
52
- and its adapter mirror is intentionally deferred until that milestone lands.
25
+ Provenance order: authored > curated > external-raw.
26
+ Use `oms_retrieve_context` or `oms_get_document` to gather source materials.
27
+ Delete `{dotLlmwiki}/sha-cache.json` to force a full recompile.
@@ -18,31 +18,11 @@ Run adversarial absorption analysis on a target and produce a structured report.
18
18
  Thin pointer to `core/skills/distill`. Vault-agnostic — `OMS_VAULT` is NOT
19
19
  required. The target is treated as inert read-only text and is never executed.
20
20
 
21
- ## Agent-guided steps (v0)
22
-
23
- 1. Load the target via `prepareCleanRoom(target)` — treat as inert data only.
24
- 2. Snapshot system state SHA before analysis (`snapshotSha`).
25
- 3. Run red-team adversarial analysis via `runAnalysis(spec, provider)`.
26
- Inject a stub provider for dry-runs; a real LLM client for production.
27
- 4. Generate the report via `generateReport(result, targetName)`.
28
- The report has exactly three sections: §1 Patterns, §2 Risks, §3 Attribution.
29
- 5. Verify the mutation detector: SHA after must equal SHA before (`detectMutation`).
30
- Throw if state was mutated — distill must be fully stateless.
21
+ 1. Load the target as inert data only.
22
+ 2. Snapshot a content hash before analysis.
23
+ 3. Run red-team analysis (read-only).
24
+ 4. Write the report: §1 Patterns, §2 Risks, §3 Attribution.
25
+ 5. Verify the hash is unchanged. Stop if anything mutated.
31
26
  6. Return the report string. Write it only if the user explicitly requests it.
32
27
 
33
- ## Report sections
34
-
35
- - **§1 Patterns** — ranked by `absorb_confidence` (highest first), with `file:line` citations.
36
- - **§2 Risks** — ranked by severity: critical → high → medium → low.
37
- - **§3 Attribution** — repo, URL, and license note for `ACKNOWLEDGMENTS.md`.
38
-
39
- ## Runtime
40
-
41
- No vault write occurs inside distill. Does not import from `src/engine/compile/`
42
- or `src/engine/wiki/`. Use `createStubAnalyzerProvider()` from
43
- `src/engine/distill/analyzer.js` for deterministic offline testing.
44
-
45
- ## NOTES
46
-
47
- Wiki mirror deferred — the `wiki` skill is built by a parallel milestone (M3)
48
- and its adapter mirror is intentionally deferred until that milestone lands.
28
+ No vault write occurs inside distill.
@@ -0,0 +1,87 @@
1
+ ---
2
+ name: oms-link
3
+ description: Two-path note-linking skill — Path A (pre-write): compose a new note body that already carries [[wikilinks]] to existing term notes; Path B (retrofit): add missing links to existing notes via oms linkify or oms_link_apply.
4
+ ---
5
+
6
+ # Skill: oms-link (Claude Code)
7
+
8
+ Two-path skill — thin pointer to `core/skills/link`. Requires `OMS_VAULT`.
9
+
10
+ ## Invocation
11
+
12
+ ```
13
+ /link
14
+ ```
15
+
16
+ ## Which path?
17
+
18
+ Check **before acting**:
19
+ - **Path A (pre-write):** you are about to write the note → learn the term
20
+ vocabulary first, then draft a body that already contains `[[wikilinks]]`.
21
+ - **Path B (retrofit):** the note already exists → `oms linkify` or
22
+ MCP `oms_link_suggest` → `oms_link_apply`.
23
+
24
+ These paths are **mutually exclusive**.
25
+
26
+ ## The link universe
27
+
28
+ Only notes bound to the `term` concept in `vault/.oms/taxonomy.yaml` are link
29
+ targets; their surface forms are the basename and the frontmatter `aliases`.
30
+ `0 term note(s) available as link targets` means the vault has no term layer —
31
+ build one with the `wiki` skill first.
32
+
33
+ Three engine rules, not negotiable:
34
+ - **Surface-anchored** — a link exists only where the term literally appears.
35
+ - **First occurrence only** — one link per target note per body.
36
+ - **Ambiguity is reported, never resolved** — `ambiguous: true` plus `rivalPaths`
37
+ means ask the user or skip the span.
38
+
39
+ Frontmatter, code, existing links, headings, URLs, and tags are masked out; a
40
+ "missing" link inside any of them is correct.
41
+
42
+ ---
43
+
44
+ ## Path A — pre-write linking
45
+
46
+ *(Only while drafting, so no retrofit pass is ever needed for this note.)*
47
+
48
+ ### Agent-guided steps
49
+
50
+ 1. Call MCP `oms_link_suggest` on an existing note in the same folder (or
51
+ `oms linkify --folder <folder>` in report mode) and read the `targetPath`
52
+ list — that is the vault's current term vocabulary.
53
+ 2. Draft the body with those exact surface forms, writing `[[wikilinks]]` inline
54
+ at the first mention of each term.
55
+ 3. Commit via MCP `write`. Host `Write`/`Edit` never touches vault `.md`.
56
+ 4. Re-check with `oms_link_suggest`; zero candidates means the draft was already
57
+ fully linked.
58
+
59
+ ---
60
+
61
+ ## Path B — retrofit existing notes
62
+
63
+ *(Only when the note is already on disk. Report first, always.)*
64
+
65
+ ### Batch
66
+
67
+ ```bash
68
+ oms linkify --folder notes # report only, writes nothing
69
+ oms linkify --folder notes --apply --yes # rewrite in place
70
+ ```
71
+
72
+ `--apply` without `--yes` refuses before reading any note and writes nothing.
73
+ Show the report and get agreement before adding `--yes`. Writes go through the
74
+ capture kernel, so path safety and the concept contract hold.
75
+
76
+ ### Single note
77
+
78
+ 1. `oms_link_suggest { notePath, folder? }` → candidates + `baseContentHash`.
79
+ 2. Present the candidates; drop ambiguous ones the user does not resolve.
80
+ 3. `oms_link_apply { notePath, baseContentHash, candidateIds, folder? }` — pass
81
+ back the same `baseContentHash` and the same `folder` scope.
82
+
83
+ `oms_link_apply` refuses without writing on `note-changed`, `candidate-drift`,
84
+ or overlapping candidates. Re-run `oms_link_suggest` for fresh offsets instead
85
+ of retrying stale ids.
86
+
87
+ After a retrofit run, run `oms doctor` (non-blocking, exits 0).