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
@@ -38,14 +38,12 @@ Pass `semanticSearches` to issue typed sub-queries in a single call:
38
38
  | `lex` | BM25 keyword search (exact terms, fast) |
39
39
  | `vec` | SQLite-vector semantic search (meaning-based) |
40
40
  | `hyde` | Hypothetical-document expansion before search |
41
- | `graph` | Semantic candidates confined to graph neighbors |
42
41
 
43
42
  ```
44
43
  semanticSearches: [
45
44
  { type: "lex", query: "transformer attention" },
46
45
  { type: "vec", query: "self-attention replaces recurrence" },
47
- { type: "hyde", query: "a paper about attention mechanisms" },
48
- { type: "graph", query: "related concepts in my notes" }
46
+ { type: "hyde", query: "a paper about attention mechanisms" }
49
47
  ]
50
48
  ```
51
49
 
@@ -62,11 +60,10 @@ to the set already selected by the OMS graph traversal.
62
60
  5. Choose semantic scope: `semanticScope: "global"` for broad vault-wide search;
63
61
  `semanticScope: "graph"` (gph mode) when candidates must stay inside the
64
62
  selected graph neighbors. Pass typed sub-queries via `semanticSearches`
65
- using `lex`, `vec`, `hyde`, or `graph` types as appropriate.
63
+ using `lex`, `vec`, or `hyde` types as appropriate.
66
64
  Pass `semanticMode`, `semanticIntent`, `semanticLex`, `semanticVec`,
67
65
  `semanticHyde`, and `semanticMinScore` for additional control.
68
- Use `semanticStorage: "qmd-sqlite"` for the default qmd-compatible SQLite
69
- store; set `embeddingSyncBeforeSearch: true` only when the native semantic
66
+ Set `embeddingSyncBeforeSearch: true` only when the native semantic
70
67
  index must be refreshed before retrieval.
71
68
  6. Use `oms_sync_embeddings` for explicit update/embed sync.
72
69
  7. Use `oms_semantic_query`, `oms_semantic_status`, `oms_semantic_collections`,
@@ -94,7 +91,7 @@ Purpose: "Synthesize my transformer papers"
94
91
  ## Runtime
95
92
 
96
93
  Use MCP `oms_retrieve_context` for live graph/semantic retrieval. Pass typed
97
- sub-queries via `semanticSearches` (types: `lex`, `vec`, `hyde`, `graph`).
94
+ sub-queries via `semanticSearches` (types: `lex`, `vec`, `hyde`).
98
95
  Use `semanticScope: "graph"` (gph mode) to confine semantic candidates to
99
96
  graph neighbors. Use MCP `oms_sync_embeddings` for native semantic-index sync.
100
97
  Use MCP `oms_get_document` or `oms_multi_get_documents` for document rehydration.
@@ -38,7 +38,7 @@ The CLI will:
38
38
  | `--vault <path>` | Path to your Obsidian vault root (default: current directory) |
39
39
  | `--yes` | Non-interactive: accept all defaults, no prompts |
40
40
  | `--suggest-fields` | Merge observed note frontmatter fields into concept schemas without mutating notes. |
41
- | `--install-claude` | Legacy setup-only dry-run that prints Claude Code plugin install and MCP registration commands. |
41
+ | `--install-claude` | Legacy setup-only dry-run that prints the Claude Code plugin install command and plugin-owned MCP asset. |
42
42
  | `install --runtime <name>` | Install host adapter/MCP registration for `auto`, `all`, `claude`, `codex`, or `hermes`. |
43
43
  | `install --dry-run` | Preview host writes without mutating config. |
44
44
  | `install --execute` | Allow external host CLIs such as `claude plugin install` to run when available. |
@@ -71,9 +71,8 @@ Run `/oms-doctor` to validate your existing notes against the convention.
71
71
 
72
72
  ## Roadmap
73
73
 
74
- Setup plus `oms install`/`oms uninstall` host lifecycle commands are real and release-gated by unpacked npm tarball smoke tests. The MCP command starts
75
- the status/read/cache/retrieve/capture runtime (`oms_graph_status`, `oms_graph_build`,
74
+ Setup plus `oms install`/`oms uninstall` host lifecycle commands are real and release-gated by unpacked npm tarball smoke tests. The plugin-owned MCP asset starts
75
+ the status/read/cache/retrieve/write runtime (`oms_graph_status`, `oms_graph_build`,
76
76
  `oms_list_concepts`, `oms_retrieve_context`, `oms_retrieve_by_axis`,
77
- `oms_lazy_load_note`, `oms_validate_contract`, `oms_capture_prepare`,
78
- `oms_capture_commit`).
79
- Capture commit is gated by path-safety and contract validation.
77
+ `oms_lazy_load_note`, `oms_validate_contract`, `write`).
78
+ `write` is gated by path-safety and the kernel-owned contract.
@@ -31,4 +31,4 @@ oms uninstall --runtime all --dry-run
31
31
  oms uninstall --runtime all --yes
32
32
  ```
33
33
 
34
- Use `--execute` only when you want Oh My Second Brain to call external host CLIs such as `claude mcp remove oms` or `claude plugin uninstall oms`.
34
+ Use `--execute` only when you want Oh My Second Brain to call external host CLIs such as the scoped `claude mcp remove oms --scope local|project|user` commands or `claude plugin uninstall oms`.
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  name: oms-wiki
3
- description: Promote compiled concepts from processed/ into the wiki/ query surface, maintain the 5-state staleness ledger, regenerate navigation surfaces (index.md + log.md), and run 2-tier lint over the wiki collection.
3
+ description: Two-path wiki skill — Path A: promote compiled concepts from processed/ into the wiki/ query surface; Path B (human authoring): build interlinked terminology notes in vault taxonomy folders via write.
4
4
  ---
5
5
 
6
6
  # Skill: oms-wiki (Claude Code)
7
7
 
8
- Promote compiled concepts into the wiki query surface and keep the staleness ledger, navigation surfaces, and lint clean.
8
+ Two-path skill — thin pointer to `core/skills/wiki`. Requires `OMS_VAULT`.
9
9
 
10
10
  ## Invocation
11
11
 
@@ -13,23 +13,31 @@ Promote compiled concepts into the wiki query surface and keep the staleness led
13
13
  /wiki
14
14
  ```
15
15
 
16
- ## What this skill does
16
+ ## Which path?
17
17
 
18
- Thin pointer to `core/skills/wiki`. Requires `OMS_VAULT`. Operates on the
19
- `wiki/` query surface only — never writes to `processed/` or `src/`.
18
+ Check **before acting**:
19
+ - **Path A:** you have compiled `processed/<concept>.md` output → promote into `wiki/`.
20
+ - **Path B (human authoring):** you have only a topic + terms, no compile output → use MCP `write`, writes to vault taxonomy folders.
20
21
 
21
- ## Agent-guided steps (v0)
22
+ These paths are **mutually exclusive**.
22
23
 
23
- 1. Verify `processed/<concept>.md` exists (Phase-B compile output from M2).
24
+ ---
25
+
26
+ ## Path A — promotion
27
+
28
+ *(Only when `processed/<concept>.md` exists.)*
29
+
30
+ ### Agent-guided steps
31
+
32
+ 1. Verify `processed/<concept>.md` exists.
24
33
  2. Load the staleness ledger from `.llmwiki/staleness.json`.
25
- 3. Run `runCollection()` — promotes `processed/→wiki/`, updates the ledger,
26
- flips cascade backlinks, and detects stubs and orphans.
27
- 4. Regenerate `wiki/index.md` (global catalog) and append an entry to `wiki/log.md`
28
- via `regenerateIndex()` and `appendLog()`.
29
- 5. Run `runLint()` — apply auto-fixes (index consistency, broken `[[wikilinks]]`,
30
- See-Also sections) and report findings (conflicts, orphans, outdated refs) to stdout.
34
+ 3. Promote `processed/→wiki/`, update the ledger, flip cascade backlinks,
35
+ and detect stubs and orphans.
36
+ 4. Regenerate `wiki/index.md` and append an entry to `wiki/log.md`.
37
+ 5. Lint — auto-fix index consistency, broken `[[wikilinks]]`, and See-Also
38
+ sections; report conflicts, orphans, and outdated refs.
31
39
 
32
- ## Staleness states
40
+ ### Staleness states
33
41
 
34
42
  | State | Meaning |
35
43
  |-------|---------|
@@ -41,17 +49,34 @@ Thin pointer to `core/skills/wiki`. Requires `OMS_VAULT`. Operates on the
41
49
 
42
50
  Full-rebuild escape hatch: delete `.llmwiki/staleness.json` — every page resets to DIRTY.
43
51
 
44
- ## Runtime
52
+ `processed/` is internal — NEVER synced to the Obsidian vault.
53
+ A wiki run never triggers compile; compile never writes `wiki/` directly.
54
+
55
+ ---
56
+
57
+ ## Path B — Human authoring
58
+
59
+ *(Only when no compiled `processed/` output exists.)*
60
+
61
+ Build a hub/MOC note plus one standalone note per coined term, cross-linked with
62
+ `[[wikilinks]]` and committed via MCP `write`.
63
+ Writes to vault taxonomy folders — **never to `wiki/`**.
64
+
65
+ ### Admission gate
45
66
 
46
- Implemented in `src/engine/wiki/`: `collection.ts` (`runCollection()`),
47
- `ledger.ts` (`loadLedger()` / `saveLedger()` / `resetLedger()`),
48
- `navigation.ts` (`regenerateIndex()` / `appendLog()`), `lint.ts` (`runLint()`),
49
- `types.ts`.
67
+ Apply before any MCP `write` call:
68
+ - **Coined/proper term** (only ever means one specific technical thing) → standalone note.
69
+ - **General noun** (meaning shifts by domain) → `## Term` section inside the hub note.
50
70
 
51
- `promoteToWiki()` in `collection.ts` is the sole entry point into `wiki/`.
71
+ K8s example: `Pod`, `Service`, `Deployment`, `Ingress` → hub sections;
72
+ `ReplicaSet`, `StatefulSet`, `DaemonSet`, `CronJob` → standalone notes.
52
73
 
53
- ## NOTES
74
+ ### Agent-guided steps
54
75
 
55
- `processed/` is engine-internal and is NEVER synced to the Obsidian vault —
56
- only `wiki/` crosses the sync boundary. A wiki run never triggers compile;
57
- compile never writes `wiki/` directly.
76
+ 1. Ask for the **topic** and **term list**.
77
+ 2. Resolve the **target concept/folder** from `vault/.oms/taxonomy.yaml`.
78
+ 3. Apply the admission gate to every term.
79
+ 4. **Deduplicate**: MCP `write` `mode: "create"` per coined term; if the note already exists, reuse the `[[wikilink]]`.
80
+ 5. Draft coined-term notes (definition + `## See Also` back-link to hub). Commit terms first.
81
+ 6. Draft hub/MOC note (general-noun `## Term` sections + `## See Also` coined-term links). Commit hub last.
82
+ 7. Run `oms doctor` (non-blocking, exits 0).
@@ -0,0 +1,16 @@
1
+ ---
2
+ name: oms-write
3
+ description: Write a vault note through the Oh My Second Brain kernel contract.
4
+ ---
5
+
6
+ # Skill: oms-write (Claude Code)
7
+
8
+ ## Invocation
9
+
10
+ ```
11
+ /oms-write
12
+ ```
13
+
14
+ Call MCP `write`. Do not use host Write/Edit for vault `.md` files.
15
+
16
+ `mode` is `create`, `append`, or `update`. The kernel owns `.oms` and returns `ask`, `inbox`, `written`, or `rejected`.
@@ -1,6 +1,6 @@
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 \u2014 Codex native rules, skills, and MCP adapter.",
5
5
  "_note": "oms install writes Codex MCP config, installs ~/.codex/rules/oms.md, and installs ~/.codex/skills/oms-*.",
6
6
  "skills": "./skills/",
@@ -10,7 +10,7 @@ This vault is governed by Oh My Second Brain conventions stored in `.oms/`.
10
10
  - Run `oms doctor` to validate notes against the convention (exits 0, non-blocking).
11
11
  - Read `.oms/taxonomy.yaml` and `.oms/concepts/*.yaml` for folder and field declarations.
12
12
 
13
- **Capture:** Use `$oms-capture` skill or follow the librarian persona.
13
+ **Write:** Use `$oms-write`. Call MCP `write`. Do not use host Write/Edit for vault `.md` files.
14
14
  **Retrieve:** Use `$oms-retrieve` skill or follow the retriever persona with declared lenses.
15
15
 
16
- > **v0 native install:** `oms install --runtime codex` installs Codex rules, `$oms-*` skills, and a managed Codex MCP config. Use Oh My Second Brain MCP tools for capture/retrieve and CLI commands for lifecycle.
16
+ > **v0 native install:** `oms install --runtime codex` installs Codex rules, `$oms-*` skills, and a managed Codex MCP config. Use Oh My Second Brain MCP tools for write/retrieve and CLI commands for lifecycle.
@@ -14,7 +14,7 @@ Oh My Second Brain is a convention harness, not a content generator. The user ow
14
14
  | install host integration | `$oms-install` or `oms install --runtime codex --vault <path> --yes` |
15
15
  | uninstall host integration | `$oms-uninstall` or `oms uninstall --runtime codex --yes` |
16
16
  | validate notes | `$oms-doctor` or `oms doctor --vault <path>` |
17
- | capture knowledge | use MCP `oms_capture_prepare` then `oms_capture_commit` |
17
+ | write a vault note | use `$oms-write` / MCP `write` (`create`, `append`, or `update`) |
18
18
  | retrieve knowledge | use MCP `oms_retrieve_context`, then `oms_lazy_load_note` only when needed |
19
19
 
20
20
  ## Safety
@@ -1,18 +1,16 @@
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
  # oms-compile
7
7
 
8
- Thin pointer to `core/skills/compile`. Runs two strict phases:
8
+ Thin pointer to `core/skills/compile`. There is no `oms compile` CLI. Two phases:
9
9
 
10
- 1. **Phase A** — load and grade source materials (pure read, no vault mutation). Resolve backlinks from the compile graph.
11
- 2. **Phase B** — write synthesized `body` to `processed/` tier only; never to `wiki/` directly.
10
+ 1. **Phase A** — load and grade source materials (pure read). Resolve backlinks.
11
+ 2. **Phase B** — write synthesized `body` to `processed/` only; never to `wiki/`.
12
12
 
13
- Check `wasSkipped(result)` before Phase B — skip if material SHA is unchanged.
14
- Pass `result.affected_backlinks` to the M3 wiki collection owner to mark stale pages.
13
+ Skip Phase B if the material SHA is unchanged.
14
+ Pass affected backlinks to the wiki skill to mark stale pages.
15
15
  Provenance order: authored > curated > external-raw.
16
- Delete `{dotLlmwiki}/sha-cache.json` to force a full recompile of all concepts.
17
-
18
- NOTE: Wiki mirror deferred — depends on M3.
16
+ Delete `{dotLlmwiki}/sha-cache.json` to force a full recompile.
@@ -7,13 +7,8 @@ description: Standalone meta-absorption skill — analyzes any target in a clean
7
7
 
8
8
  Thin pointer to `core/skills/distill`. Vault-agnostic — `OMS_VAULT` not required.
9
9
 
10
- Rules:
11
-
12
- 1. Load target via `prepareCleanRoom(target)` — inert read-only text only; never execute it.
13
- 2. Snapshot SHA before analysis. Run `runAnalysis(spec, provider)`.
14
- 3. Generate report via `generateReport(result, targetName)`: §1 Patterns, §2 Risks, §3 Attribution.
15
- 4. Verify mutation detector: SHA after must equal SHA before. Throw if mutated.
10
+ 1. Load the target as inert read-only text; never execute it.
11
+ 2. Snapshot a content hash before analysis. Run a read-only red-team pass.
12
+ 3. Write the report: §1 Patterns, §2 Risks, §3 Attribution.
13
+ 4. Verify the hash is unchanged. Stop if anything mutated.
16
14
  5. Return the report string. No vault write occurs inside distill.
17
- 6. Use `createStubAnalyzerProvider()` for offline/test runs.
18
-
19
- NOTE: Wiki mirror deferred — depends on M3.
@@ -0,0 +1,35 @@
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
+ # oms-link
7
+
8
+ Thin pointer to `core/skills/link`. Requires `OMS_VAULT`.
9
+
10
+ Determine which path applies before acting. These paths are **mutually exclusive**.
11
+
12
+ Link targets are ONLY notes bound to the `term` concept in `vault/.oms/taxonomy.yaml`; their surface forms are the basename and the frontmatter `aliases`. Three engine rules hold in both paths: a link exists only where the term literally appears (surface-anchored, never invented by retrieval); first occurrence per target note only; ambiguity (`ambiguous: true` + `rivalPaths`) is reported and never auto-resolved — ask the user or skip the span. Frontmatter, code, existing links, headings, URLs, and tags are masked out, so a "missing" link inside any of them is correct.
13
+
14
+ ## Path A — pre-write linking
15
+
16
+ *(Use while drafting, so the note lands already linked and needs no retrofit.)*
17
+
18
+ 1. Call MCP `oms_link_suggest` on an existing note in the same folder (or run `oms linkify --folder <folder>` in report mode) and read the `targetPath` list — that is the vault's current term vocabulary.
19
+ 2. Draft the body with those exact surface forms, writing `[[wikilinks]]` inline at the first mention of each term.
20
+ 3. Commit via MCP `write`. Host file edits never touch vault `.md`.
21
+ 4. Re-check with `oms_link_suggest`: zero candidates means the draft was already fully linked.
22
+
23
+ NOTE: `0 term note(s) available as link targets` means the vault has no term layer yet — build one with the `oms-wiki` skill first.
24
+
25
+ ## Path B — retrofit existing notes
26
+
27
+ *(Use when the note is already on disk. Report first, always.)*
28
+
29
+ 1. `oms linkify --folder <folder>` — report only, writes nothing.
30
+ 2. Show the report and get agreement before mutating anything.
31
+ 3. Whole folder → `oms linkify --folder <folder> --apply --yes`. `--apply` without `--yes` refuses before reading any note and writes nothing.
32
+ 4. Per-note acceptance → `oms_link_suggest { notePath, folder? }` returns candidates plus `baseContentHash`; drop unresolved ambiguous ones; then `oms_link_apply { notePath, baseContentHash, candidateIds, folder? }` with the SAME `baseContentHash` and the SAME `folder` scope.
33
+ 5. Run `oms doctor` after a retrofit run (non-blocking, exits 0).
34
+
35
+ NOTE: `oms_link_apply` refuses without writing on `note-changed`, `candidate-drift`, or overlapping candidates. Re-run `oms_link_suggest` for fresh offsets instead of retrying stale ids. Every write — CLI or MCP — goes through the capture kernel, so path safety and the concept contract hold.
@@ -16,12 +16,11 @@ the selected OMS graph candidates.
16
16
 
17
17
  Pass typed sub-queries via `semanticSearches` to combine search strategies in one call:
18
18
  `type: "lex"` for BM25 keyword search, `type: "vec"` for SQLite-vector semantic
19
- search, `type: "hyde"` for hypothetical-document expansion, and `type: "graph"` for
20
- semantic candidates confined to graph neighbors. Pass `semanticMode`, `semanticIntent`,
21
- `semanticLex`, `semanticVec`, `semanticHyde`, and `semanticMinScore` for additional
22
- typed or thresholded control. Pass `semanticStorage: "qmd-sqlite"` for the default
23
- qmd-compatible SQLite store, and `embeddingSyncBeforeSearch: true` when the native
24
- semantic index must be refreshed before retrieval, or call `oms_sync_embeddings` explicitly.
19
+ search, and `type: "hyde"` for hypothetical-document expansion. Pass `semanticMode`,
20
+ `semanticIntent`, `semanticLex`, `semanticVec`, `semanticHyde`, and
21
+ `semanticMinScore` for additional typed or thresholded control. Pass
22
+ `embeddingSyncBeforeSearch: true` when the native semantic index must be refreshed
23
+ before retrieval, or call `oms_sync_embeddings` explicitly.
25
24
  Use read-only `oms_get_document` or `oms_multi_get_documents` to rehydrate selected
26
25
  docids, paths, globs, or line ranges. Use `oms_semantic_query`,
27
26
  `oms_semantic_status`, `oms_semantic_collections`, or `oms_semantic_contexts` for
@@ -1,19 +1,39 @@
1
1
  ---
2
2
  name: oms-wiki
3
- description: Promote compiled concepts from processed/ into the wiki/ query surface, maintain the 5-state staleness ledger, regenerate navigation surfaces (index.md + log.md), and run 2-tier lint over the wiki collection.
3
+ description: Two-path wiki skill — Path A: promote compiled concepts from processed/ into the wiki/ query surface; Path B (human authoring): build interlinked terminology notes in vault taxonomy folders via write.
4
4
  ---
5
5
 
6
6
  # oms-wiki
7
7
 
8
8
  Thin pointer to `core/skills/wiki`. Requires `OMS_VAULT`.
9
9
 
10
- Rules:
10
+ Determine which path applies before acting. These paths are **mutually exclusive**.
11
11
 
12
- 1. Verify `processed/<concept>.md` exists (Phase-B compile output from M2).
12
+ ## Path A — promotion
13
+
14
+ *(Use only when `processed/<concept>.md` already exists.)*
15
+
16
+ 1. Verify `processed/<concept>.md` exists.
13
17
  2. Load staleness ledger from `.llmwiki/staleness.json`.
14
- 3. Run `runCollection()`: promotes `processed/→wiki/`, updates ledger, flips cascade backlinks, detects stubs and orphans.
15
- 4. Regenerate `wiki/index.md` and append to `wiki/log.md` via `regenerateIndex()` and `appendLog()`.
16
- 5. Run `runLint()`: auto-fix (index consistency, broken links, See-Also) and report-only (conflicts, orphans, outdated refs).
17
- 6. `promoteToWiki()` in `collection.ts` is the sole entry point into `wiki/`. Never write `processed/` from this skill.
18
+ 3. Promote `processed/→wiki/`, update ledger, flip cascade backlinks, detect stubs and orphans.
19
+ 4. Regenerate `wiki/index.md` and append to `wiki/log.md`.
20
+ 5. Lint: auto-fix (index consistency, broken links, See-Also) and report-only (conflicts, orphans, outdated refs).
21
+
22
+ NOTE: `processed/` is internal — never synced to the Obsidian vault. Only `wiki/` crosses the sync boundary.
23
+
24
+ ## Path B — Human authoring
25
+
26
+ *(Use when you have only a topic + terms and no compiled `processed/` output.)*
27
+
28
+ 1. Ask the user for a **topic** and **term list** (or extract terms from freeform source text).
29
+ 2. Resolve the **target concept/folder** from `vault/.oms/taxonomy.yaml`.
30
+ 3. Apply the **admission gate** to every term:
31
+ - Coined/proper term (only ever means one specific technical thing) → standalone note.
32
+ - General noun (meaning shifts by domain) → `## Term` section inside the hub note only.
33
+ - K8s example: `Pod`, `Service`, `Deployment`, `Ingress` → hub sections; `ReplicaSet`, `StatefulSet`, `DaemonSet`, `CronJob` → standalone notes.
34
+ 4. **Deduplicate**: call MCP `write` with `mode: "create"` for each coined term; if the note already exists, reuse the `[[wikilink]]`.
35
+ 5. Draft coined-term notes: frontmatter from the concept's required fields + definition + `## See Also` back-link to the hub. Commit terms first via MCP `write`.
36
+ 6. Draft hub/MOC note: general-noun `## Term` sections + `## See Also` listing all coined-term `[[wikilinks]]`. Commit hub last via MCP `write`.
37
+ 7. Run `oms doctor` after all notes are committed (non-blocking, exits 0).
18
38
 
19
- NOTE: `processed/` is engine-internal — never synced to the Obsidian vault. Only `wiki/` crosses the sync boundary.
39
+ NOTE: Path B writes to vault taxonomy folders — **never to `wiki/`**.
@@ -0,0 +1,10 @@
1
+ ---
2
+ name: oms-write
3
+ description: Write a vault note through the Oh My Second Brain kernel contract.
4
+ ---
5
+
6
+ # oms-write
7
+
8
+ Call MCP `write`. Do not use host Write/Edit for vault `.md` files.
9
+
10
+ `mode` is `create`, `append`, or `update`. The kernel owns `.oms` and returns `ask`, `inbox`, `written`, or `rejected`.
@@ -5,4 +5,6 @@ Installed by `oms install --runtime hermes` into:
5
5
  - `~/.hermes/skills/knowledge-management/oms/`
6
6
  - `~/.hermes/config.yaml` as `mcp_servers.oms`
7
7
 
8
- The skill bundle mirrors Oh My Second Brain's capture/retrieve/setup/doctor lifecycle and uses the Oh My Second Brain MCP server for runtime operations.
8
+ The skill bundle mirrors Oh My Second Brain's write/retrieve/setup/doctor lifecycle and uses the Oh My Second Brain MCP server for runtime operations.
9
+
10
+ Unlike Claude Code (`claude plugin install`), Hermes exposes no native marketplace or plugin-update command, so this adapter stays OMS-managed: `oms update` reconciles it by re-running the same install path. `mcp_servers.oms` is edited surgically, leaving the rest of `~/.hermes/config.yaml` — including comments and key ordering — untouched.
@@ -11,9 +11,8 @@ This vault is governed by Oh My Second Brain conventions stored in `.oms/`.
11
11
  - Read `.oms/taxonomy.yaml` for folder-to-concept bindings.
12
12
  - Read `.oms/concepts/*.yaml` for field declarations and lenses.
13
13
 
14
- **Capture:** Follow the librarian persona — resolve concept, resolve folder from taxonomy,
15
- construct required frontmatter, write note, then run `oms doctor`.
14
+ **Write:** Use the `write` skill. Call MCP `write`. Do not use host Write/Edit for vault `.md` files.
16
15
 
17
16
  **Retrieve:** Follow the retriever persona — identify purpose, match lens, project lens fields only.
18
17
 
19
- > **v0 native install:** `oms install --runtime hermes` installs a Hermes skill bundle and registers Oh My Second Brain MCP in `~/.hermes/config.yaml`. Use Oh My Second Brain MCP tools for capture/retrieve and CLI commands for lifecycle.
18
+ > **v0 native install:** `oms install --runtime hermes` installs a Hermes skill bundle and registers Oh My Second Brain MCP in `~/.hermes/config.yaml`. Use Oh My Second Brain MCP tools for write/retrieve and CLI commands for lifecycle.
@@ -1,6 +1,6 @@
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 \u2014 Hermes skill bundle and MCP adapter.",
5
5
  "_note": "oms install writes ~/.hermes/config.yaml mcp_servers.oms and installs skills under ~/.hermes/skills/knowledge-management/oms/.",
6
6
  "skills": "./skills/"
@@ -1,15 +1,13 @@
1
1
  ---
2
2
  name: 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
  # oms-compile
7
7
 
8
- Thin pointer to `core/skills/compile`. Runs two strict phases:
8
+ Thin pointer to `core/skills/compile`. There is no `oms compile` CLI.
9
9
 
10
- Phase A — load and grade source materials (pure read, no vault mutation). Resolve backlinks from the compile graph.
11
- Phase B — write synthesized body to `processed/` tier only; never to `wiki/` directly.
10
+ Phase A — load and grade source materials (pure read). Resolve backlinks.
11
+ Phase B — write synthesized body to `processed/` only; never to `wiki/`.
12
12
 
13
- Check `wasSkipped(result)` before Phase B — skip if material SHA is unchanged. Pass `result.affected_backlinks` to the M3 wiki collection owner to mark stale pages. Provenance order: authored > curated > external-raw. Delete `{dotLlmwiki}/sha-cache.json` to force a full recompile.
14
-
15
- NOTE: Wiki mirror deferred — depends on M3.
13
+ Skip Phase B if the material SHA is unchanged. Pass affected backlinks to the wiki skill. Provenance order: authored > curated > external-raw. Delete `{dotLlmwiki}/sha-cache.json` to force a full recompile.
@@ -7,6 +7,4 @@ description: Standalone meta-absorption skill — analyzes any target in a clean
7
7
 
8
8
  Thin pointer to `core/skills/distill`. Vault-agnostic — `OMS_VAULT` not required.
9
9
 
10
- Load target via `prepareCleanRoom(target)` — inert text only, never execute. Snapshot SHA, run `runAnalysis(spec, provider)`, generate report via `generateReport(result, targetName)`. Report has exactly three sections: §1 Patterns, §2 Risks, §3 Attribution. Verify mutation detector after: SHA must be unchanged. Return the report string — no vault write occurs inside distill. Use `createStubAnalyzerProvider()` for offline/test runs.
11
-
12
- NOTE: Wiki mirror deferred — depends on M3.
10
+ Load the target as inert text only, never execute. Snapshot a content hash, run a read-only red-team pass, then write §1 Patterns, §2 Risks, §3 Attribution. Verify the hash is unchanged. Return the report string — no vault write occurs inside distill.
@@ -0,0 +1,18 @@
1
+ ---
2
+ name: 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
+ # oms-link
7
+
8
+ Thin pointer to `core/skills/link`. Requires `OMS_VAULT`.
9
+
10
+ Link targets are ONLY notes bound to the `term` concept in `vault/.oms/taxonomy.yaml`; their surface forms are the basename and the frontmatter `aliases`. Three engine rules hold in both paths: a link exists only where the term literally appears (surface-anchored — retrieval never invents one); first occurrence per target note only; ambiguity (`ambiguous: true` + `rivalPaths`) is reported, never auto-resolved — ask the user or skip the span. Frontmatter, code, existing links, headings, URLs, and tags are masked out, so a "missing" link inside any of them is correct.
11
+
12
+ **Path A (pre-write) — use while drafting the note:** Call MCP `oms_link_suggest` on an existing note in the same folder (or run `oms linkify --folder <folder>` in report mode) and read the `targetPath` list — that is the vault's current term vocabulary. Draft the body with those exact surface forms, writing `[[wikilinks]]` inline at the first mention of each term, then commit via MCP `write` (host file edits never touch vault `.md`). Re-check with `oms_link_suggest`: zero candidates means the draft was already fully linked.
13
+
14
+ NOTE: `0 term note(s) available as link targets` means the vault has no term layer yet — build one with the `wiki` skill first.
15
+
16
+ **Path B (retrofit) — use when the note already exists:** Run `oms linkify --folder <folder>` first; it reports only and writes nothing. Show the report and get agreement before mutating. For a whole folder use `oms linkify --folder <folder> --apply --yes` — `--apply` without `--yes` refuses before reading any note and writes nothing. For per-note acceptance call `oms_link_suggest { notePath, folder? }` for candidates plus `baseContentHash`, drop unresolved ambiguous ones, then `oms_link_apply { notePath, baseContentHash, candidateIds, folder? }` with the SAME `baseContentHash` and the SAME `folder` scope. Run `oms doctor` afterwards (non-blocking, exits 0).
17
+
18
+ NOTE: `oms_link_apply` refuses without writing on `note-changed`, `candidate-drift`, or overlapping candidates. Re-run `oms_link_suggest` for fresh offsets instead of retrying stale ids. Every write — CLI or MCP — goes through the capture kernel, so path safety and the concept contract hold. The two paths are mutually exclusive.
@@ -16,12 +16,11 @@ the selected OMS graph candidates.
16
16
 
17
17
  Pass typed sub-queries via `semanticSearches` to combine search strategies in one call:
18
18
  `type: "lex"` for BM25 keyword search, `type: "vec"` for SQLite-vector semantic
19
- search, `type: "hyde"` for hypothetical-document expansion, and `type: "graph"` for
20
- semantic candidates confined to graph neighbors. Pass `semanticMode`, `semanticIntent`,
21
- `semanticLex`, `semanticVec`, `semanticHyde`, and `semanticMinScore` for additional
22
- typed or thresholded control. Pass `semanticStorage: "qmd-sqlite"` for the default
23
- qmd-compatible SQLite store, and `embeddingSyncBeforeSearch: true` when the native
24
- semantic index must be refreshed before retrieval, or call `oms_sync_embeddings` explicitly.
19
+ search, and `type: "hyde"` for hypothetical-document expansion. Pass `semanticMode`,
20
+ `semanticIntent`, `semanticLex`, `semanticVec`, `semanticHyde`, and
21
+ `semanticMinScore` for additional typed or thresholded control. Pass
22
+ `embeddingSyncBeforeSearch: true` when the native semantic index must be refreshed
23
+ before retrieval, or call `oms_sync_embeddings` explicitly.
25
24
  Use read-only `oms_get_document` or `oms_multi_get_documents` to rehydrate selected
26
25
  docids, paths, globs, or line ranges. Use `oms_semantic_query`,
27
26
  `oms_semantic_status`, `oms_semantic_collections`, or `oms_semantic_contexts` for
@@ -28,7 +28,10 @@ oms setup --vault <vault> --suggest-fields
28
28
  Then, when host registration is desired:
29
29
 
30
30
  ```bash
31
- oms install --runtime codex --vault <vault> --yes
31
+ oms install --runtime hermes --vault <vault> --yes
32
32
  ```
33
33
 
34
- Setup interviews folder intent, concept binding, optional observed fields, and retrieval lenses. It rejects lenses that reference unknown fields. Do not modify vault notes during setup. Oh My Second Brain writes only `vault/.oms/taxonomy.yaml` and `vault/.oms/concepts/`, preserving existing concept files while adding missing defaults or selected observed fields.
34
+ Setup interviews folder intent, concept binding, optional observed fields, and retrieval lenses.
35
+ It rejects lenses that reference unknown fields. Do not modify vault notes during setup.
36
+ Oh My Second Brain writes only `vault/.oms/taxonomy.yaml` and `vault/.oms/concepts/`,
37
+ preserving existing concept files while adding missing defaults or selected observed fields.
@@ -1,12 +1,14 @@
1
1
  ---
2
2
  name: wiki
3
- description: Promote compiled concepts from processed/ into the wiki/ query surface, maintain the 5-state staleness ledger, regenerate navigation surfaces (index.md + log.md), and run 2-tier lint over the wiki collection.
3
+ description: Two-path wiki skill — Path A: promote compiled concepts from processed/ into the wiki/ query surface; Path B (human authoring): build interlinked terminology notes in vault taxonomy folders via write.
4
4
  ---
5
5
 
6
6
  # oms-wiki
7
7
 
8
8
  Thin pointer to `core/skills/wiki`. Requires `OMS_VAULT`.
9
9
 
10
- Verify `processed/<concept>.md` exists (Phase-B compile output from M2), load staleness ledger from `.llmwiki/staleness.json`, run `runCollection()` to promote `processed/→wiki/`, update the ledger, flip cascade backlinks, detect stubs and orphans. Regenerate `wiki/index.md` and append to `wiki/log.md` via `regenerateIndex()` and `appendLog()`. Run `runLint()` — auto-fix index consistency, broken `[[wikilinks]]`, and See-Also sections; report conflicts, orphans, and outdated refs to stdout. `promoteToWiki()` in `collection.ts` is the sole entry point into `wiki/`. Only `wiki/` crosses the Obsidian sync boundary; `processed/` is engine-internal.
10
+ **Path A — use when `processed/<concept>.md` exists:** Verify the file exists, load `.llmwiki/staleness.json`, promote `processed/→wiki/`, update the ledger, flip cascade backlinks, detect stubs and orphans. Regenerate `wiki/index.md` and append to `wiki/log.md`. Lint — auto-fix index consistency, broken `[[wikilinks]]`, and See-Also sections; report conflicts, orphans, and outdated refs. Only `wiki/` crosses the Obsidian sync boundary; `processed/` is internal.
11
11
 
12
12
  NOTE: Delete `.llmwiki/staleness.json` to force a full rebuild — every page resets to DIRTY.
13
+
14
+ **Path B (human authoring) — use when you have only a topic + terms, no compile output:** Ask for topic and term list. Resolve the target folder from `vault/.oms/taxonomy.yaml`. Apply the admission gate: coined/proper terms (only ever mean one specific technical thing) → standalone note; general nouns (meaning shifts by domain) → `## Term` section inside the hub note only. K8s example: `Pod`, `Service`, `Deployment`, `Ingress` → hub sections; `ReplicaSet`, `StatefulSet`, `DaemonSet`, `CronJob` → standalone notes. Deduplicate via MCP `write` (`mode: "create"`) — if the note already exists, reuse the `[[wikilink]]`. Commit coined-term notes first (definition + `## See Also` back-link to hub), then commit the hub/MOC note (general-noun sections + `## See Also` links). Run `oms doctor` (non-blocking, exits 0). Writes to vault taxonomy folders — never to `wiki/`.
@@ -0,0 +1,10 @@
1
+ ---
2
+ name: write
3
+ description: Write a vault note through the Oh My Second Brain kernel contract.
4
+ ---
5
+
6
+ # write
7
+
8
+ Call MCP `write`. Do not use host Write/Edit for vault `.md` files.
9
+
10
+ `mode` is `create`, `append`, or `update`. The kernel owns `.oms` and returns `ask`, `inbox`, `written`, or `rejected`.
package/core/AGENTS.md CHANGED
@@ -46,6 +46,7 @@ A **field** is one frontmatter key — the smallest unit of convention. Each fie
46
46
  | `intent` | Semantic purpose: *what this field is FOR.* |
47
47
  | `normalize` | Optional: `kebab`, `lower`, or `trim` — applied at validation. |
48
48
  | `immutable` | Advisory: once written, should not change (v0: no-op, forward-compat). |
49
+ | `enum` | Optional closed vocabulary for string fields; values outside it are lint violations. |
49
50
 
50
51
  Users grow their convention field-by-field. There is no mandatory field list.
51
52
 
@@ -77,7 +78,7 @@ folders:
77
78
  concept: inbox
78
79
  ```
79
80
 
80
- A folder may bind to one concept, multiple concepts (list), or `null` (not yet assigned).
81
+ A folder may bind to one concept, multiple concepts (list), or `null` (not yet assigned). A folder binding may set `agentWritable: true`; paired with `routingLawStrict: true`, notes in that folder must carry `created_by`. Top-level `exclude` entries are vault-relative globs skipped by audit/lint scans.
81
82
 
82
83
  ---
83
84
 
@@ -105,6 +106,7 @@ Oh My Second Brain enforces what the user declared; it does not touch anything e
105
106
  ## Quick Reference for Host Agents
106
107
 
107
108
  - To understand a note: look up its folder in the taxonomy → read the `concept.intent`.
108
- - To validate frontmatter: load the concept's `fields`; check `required` + `type`.
109
+ - To validate frontmatter: load the concept's `fields`; check `required`, `type`, and any `enum`.
109
110
  - To retrieve knowledge: apply the relevant `lens` to surface the fields that matter.
111
+ - To audit a vault: honor taxonomy `exclude` globs and routing-law flags.
110
112
  - When in doubt, preserve: `additionalProperties: preserve` means unknown keys are safe.
@@ -21,7 +21,8 @@ It reads the convention first, then acts.
21
21
  2. **Folder resolution** — look up the correct target folder from `vault/.oms/taxonomy.yaml` based on the matched concept.
22
22
  3. **Frontmatter construction** — fill every `required: true` field; fill known optional fields; leave undeclared fields untouched.
23
23
  4. **Note creation** — write the file at the resolved path; use the concept's naming convention (default: `YYYY-MM-DD-<slug>.md`).
24
- 5. **Post-capture validation** — run `npx oh-my-second-brain doctor` (non-blocking) to confirm the new note is clean.
24
+ 5. **Write through the kernel** — call MCP `write`. Do not use host Write/Edit for vault `.md` files.
25
+ 6. **Post-write validation** — run `npx oh-my-second-brain doctor` (non-blocking) to confirm the new note is clean.
25
26
 
26
27
  ## Decision rules
27
28
 
@@ -40,4 +41,4 @@ It reads the convention first, then acts.
40
41
 
41
42
  ## Skill
42
43
 
43
- Invoke via the `capture` skill: `core/skills/capture/SKILL.md`.
44
+ Invoke via the `write` skill: `core/skills/write/SKILL.md`.
@@ -0,0 +1,12 @@
1
+ concept: term
2
+ intent: "A named unit of vocabulary the vault defines once and links to everywhere else."
3
+ folder: terms
4
+ fields:
5
+ - name: title
6
+ type: string
7
+ required: true
8
+ intent: "The canonical name of the term; the wikilink target other notes point at."
9
+ - name: aliases
10
+ type: list
11
+ required: false
12
+ intent: "Alternative surface forms and synonyms that should link back to this term."
@@ -9,3 +9,6 @@ folders:
9
9
  inbox:
10
10
  intent: "Raw unprocessed captures awaiting triage; nothing required yet."
11
11
  concept: inbox
12
+ terms:
13
+ intent: "Defined vocabulary the vault links to from other notes."
14
+ concept: term