oh-my-second-brain 0.1.8 → 0.1.9

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 (412) hide show
  1. package/README.ko.md +127 -0
  2. package/README.md +128 -0
  3. package/adapters/README.md +8 -8
  4. package/adapters/claude-code/.claude-plugin/plugin.json +3 -2
  5. package/adapters/claude-code/.mcp.json +8 -0
  6. package/adapters/claude-code/CLAUDE.md +5 -6
  7. package/adapters/claude-code/skills/compile/SKILL.md +10 -35
  8. package/adapters/claude-code/skills/distill/SKILL.md +6 -26
  9. package/adapters/claude-code/skills/retrieve/SKILL.md +4 -7
  10. package/adapters/claude-code/skills/setup/SKILL.md +5 -6
  11. package/adapters/claude-code/skills/uninstall/SKILL.md +1 -1
  12. package/adapters/claude-code/skills/wiki/SKILL.md +49 -24
  13. package/adapters/claude-code/skills/write/SKILL.md +16 -0
  14. package/adapters/codex/.codex-plugin/plugin.json +1 -1
  15. package/adapters/codex/AGENTS.md +2 -2
  16. package/adapters/codex/rules/oms.md +1 -1
  17. package/adapters/codex/skills/oms-compile/SKILL.md +7 -9
  18. package/adapters/codex/skills/oms-distill/SKILL.md +4 -9
  19. package/adapters/codex/skills/oms-retrieve/SKILL.md +5 -6
  20. package/adapters/codex/skills/oms-wiki/SKILL.md +28 -8
  21. package/adapters/codex/skills/oms-write/SKILL.md +10 -0
  22. package/adapters/hermes/README.md +1 -1
  23. package/adapters/hermes/SOUL.md +2 -3
  24. package/adapters/hermes/manifest.json +1 -1
  25. package/adapters/hermes/skills/compile/SKILL.md +5 -7
  26. package/adapters/hermes/skills/distill/SKILL.md +1 -3
  27. package/adapters/hermes/skills/retrieve/SKILL.md +5 -6
  28. package/adapters/hermes/skills/setup/SKILL.md +5 -2
  29. package/adapters/hermes/skills/wiki/SKILL.md +4 -2
  30. package/adapters/hermes/skills/write/SKILL.md +10 -0
  31. package/core/AGENTS.md +4 -2
  32. package/core/agents/librarian.md +3 -2
  33. package/core/skills/compile/SKILL.md +19 -18
  34. package/core/skills/distill/SKILL.md +13 -24
  35. package/core/skills/retrieve/SKILL.md +0 -1
  36. package/core/skills/setup/SKILL.md +12 -14
  37. package/core/skills/vault-lint/SKILL.md +1 -1
  38. package/core/skills/wiki/SKILL.md +109 -30
  39. package/core/skills/write/SKILL.md +15 -0
  40. package/dist/capture/safe.d.ts +31 -1
  41. package/dist/capture/safe.js +304 -67
  42. package/dist/capture/safe.js.map +1 -1
  43. package/dist/cli/args.d.ts +27 -0
  44. package/dist/cli/args.js +150 -0
  45. package/dist/cli/args.js.map +1 -0
  46. package/dist/cli/audit.d.ts +6 -0
  47. package/dist/cli/audit.js +93 -0
  48. package/dist/cli/audit.js.map +1 -0
  49. package/dist/cli/claude-install-plan.d.ts +10 -0
  50. package/dist/cli/claude-install-plan.js +26 -0
  51. package/dist/cli/claude-install-plan.js.map +1 -0
  52. package/dist/cli/doctor-lint.d.ts +11 -0
  53. package/dist/cli/doctor-lint.js +86 -0
  54. package/dist/cli/doctor-lint.js.map +1 -0
  55. package/dist/cli/link-command.d.ts +9 -0
  56. package/dist/cli/link-command.js +47 -0
  57. package/dist/cli/link-command.js.map +1 -0
  58. package/dist/cli/oms.d.ts +7 -32
  59. package/dist/cli/oms.js +61 -650
  60. package/dist/cli/oms.js.map +1 -1
  61. package/dist/cli/semantic-args.d.ts +1 -2
  62. package/dist/cli/semantic-args.js +4 -7
  63. package/dist/cli/semantic-args.js.map +1 -1
  64. package/dist/cli/semantic-http.d.ts +0 -3
  65. package/dist/cli/semantic-http.js +40 -45
  66. package/dist/cli/semantic-http.js.map +1 -1
  67. package/dist/cli/semantic-usage.js +10 -9
  68. package/dist/cli/semantic-usage.js.map +1 -1
  69. package/dist/cli/semantic.js +99 -137
  70. package/dist/cli/semantic.js.map +1 -1
  71. package/dist/cli/setup-command.d.ts +11 -0
  72. package/dist/cli/setup-command.js +196 -0
  73. package/dist/cli/setup-command.js.map +1 -0
  74. package/dist/cli/setup-documents.d.ts +15 -0
  75. package/dist/cli/setup-documents.js +149 -0
  76. package/dist/cli/setup-documents.js.map +1 -0
  77. package/dist/cli/update-notice.d.ts +10 -0
  78. package/dist/cli/update-notice.js +42 -0
  79. package/dist/cli/update-notice.js.map +1 -0
  80. package/dist/cli/usage.d.ts +4 -0
  81. package/dist/cli/usage.js +92 -0
  82. package/dist/cli/usage.js.map +1 -0
  83. package/dist/conventions/lint.js +12 -33
  84. package/dist/conventions/lint.js.map +1 -1
  85. package/dist/conventions/report.d.ts +62 -0
  86. package/dist/conventions/report.js +217 -0
  87. package/dist/conventions/report.js.map +1 -0
  88. package/dist/conventions/validate.d.ts +1 -1
  89. package/dist/conventions/vault-walk.d.ts +38 -0
  90. package/dist/conventions/vault-walk.js +80 -0
  91. package/dist/conventions/vault-walk.js.map +1 -0
  92. package/dist/conventions/write-contract.d.ts +27 -0
  93. package/dist/conventions/write-contract.js +91 -0
  94. package/dist/conventions/write-contract.js.map +1 -0
  95. package/dist/core/ontology/loader.d.ts +2 -0
  96. package/dist/{ontology → core/ontology}/loader.js +11 -20
  97. package/dist/core/ontology/loader.js.map +1 -0
  98. package/dist/core/ontology/resolver.d.ts +2 -0
  99. package/dist/{ontology → core/ontology}/resolver.js +1 -15
  100. package/dist/core/ontology/resolver.js.map +1 -0
  101. package/dist/core/ontology/types.d.ts +47 -0
  102. package/dist/core/ontology/types.js +2 -0
  103. package/dist/core/ontology/types.js.map +1 -0
  104. package/dist/core/runtime/assets.d.ts +14 -0
  105. package/dist/core/runtime/assets.js +39 -0
  106. package/dist/core/runtime/assets.js.map +1 -0
  107. package/dist/engine/assemble.d.ts +28 -72
  108. package/dist/engine/assemble.js +77 -61
  109. package/dist/engine/assemble.js.map +1 -1
  110. package/dist/engine/conventions/vault-lint.d.ts +30 -2
  111. package/dist/engine/conventions/vault-lint.js +93 -97
  112. package/dist/engine/conventions/vault-lint.js.map +1 -1
  113. package/dist/engine/embed/deferred.d.ts +3 -4
  114. package/dist/engine/embed/deferred.js +10 -7
  115. package/dist/engine/embed/deferred.js.map +1 -1
  116. package/dist/engine/embed/identity.d.ts +11 -0
  117. package/dist/engine/embed/identity.js +15 -0
  118. package/dist/engine/embed/identity.js.map +1 -0
  119. package/dist/engine/embed/provider.d.ts +12 -13
  120. package/dist/engine/embed/provider.js +30 -27
  121. package/dist/engine/embed/provider.js.map +1 -1
  122. package/dist/engine/embed/store.d.ts +48 -27
  123. package/dist/engine/embed/store.js +281 -98
  124. package/dist/engine/embed/store.js.map +1 -1
  125. package/dist/engine/embed/sync.d.ts +17 -47
  126. package/dist/engine/embed/sync.js +233 -69
  127. package/dist/engine/embed/sync.js.map +1 -1
  128. package/dist/engine/graph/builder.d.ts +1 -1
  129. package/dist/engine/graph/builder.js +1 -1
  130. package/dist/engine/graph/explore.d.ts +2 -2
  131. package/dist/engine/graph/explore.js +0 -0
  132. package/dist/engine/mcp/facade.d.ts +12 -18
  133. package/dist/engine/mcp/facade.js +30 -80
  134. package/dist/engine/mcp/facade.js.map +1 -1
  135. package/dist/engine/mcp/op-mappers.d.ts +3 -9
  136. package/dist/engine/mcp/op-mappers.js +2 -30
  137. package/dist/engine/mcp/op-mappers.js.map +1 -1
  138. package/dist/engine/mcp/types.d.ts +5 -29
  139. package/dist/engine/tracer.js +6 -2
  140. package/dist/engine/tracer.js.map +1 -1
  141. package/dist/engine/types.d.ts +8 -3
  142. package/dist/graph/cache.d.ts +1 -11
  143. package/dist/graph/cache.js +1 -44
  144. package/dist/graph/cache.js.map +1 -1
  145. package/dist/graph/explore.js +88 -137
  146. package/dist/graph/explore.js.map +1 -1
  147. package/dist/harness/surface-registry.d.ts +55 -0
  148. package/dist/harness/surface-registry.js +370 -0
  149. package/dist/harness/surface-registry.js.map +1 -0
  150. package/dist/harness/validation.d.ts +9 -0
  151. package/dist/harness/validation.js +172 -0
  152. package/dist/harness/validation.js.map +1 -0
  153. package/dist/hook/post-tool-use.js +2 -2
  154. package/dist/hook/post-tool-use.js.map +1 -1
  155. package/dist/index.d.ts +7 -5
  156. package/dist/index.js +7 -5
  157. package/dist/index.js.map +1 -1
  158. package/dist/install/adapter-source.d.ts +14 -0
  159. package/dist/install/adapter-source.js +45 -0
  160. package/dist/install/adapter-source.js.map +1 -0
  161. package/dist/install/claude-hooks.d.ts +13 -0
  162. package/dist/install/claude-hooks.js +411 -0
  163. package/dist/install/claude-hooks.js.map +1 -0
  164. package/dist/install/claude.d.ts +4 -0
  165. package/dist/install/claude.js +209 -0
  166. package/dist/install/claude.js.map +1 -0
  167. package/dist/install/codex.d.ts +9 -0
  168. package/dist/install/codex.js +178 -0
  169. package/dist/install/codex.js.map +1 -0
  170. package/dist/install/common.d.ts +25 -0
  171. package/dist/install/common.js +115 -0
  172. package/dist/install/common.js.map +1 -0
  173. package/dist/install/hermes.d.ts +4 -0
  174. package/dist/install/hermes.js +78 -0
  175. package/dist/install/hermes.js.map +1 -0
  176. package/dist/install/hosts.d.ts +6 -56
  177. package/dist/install/hosts.js +43 -604
  178. package/dist/install/hosts.js.map +1 -1
  179. package/dist/install/types.d.ts +34 -0
  180. package/dist/install/types.js +2 -0
  181. package/dist/install/types.js.map +1 -0
  182. package/dist/link/convention-note.d.ts +10 -0
  183. package/dist/link/convention-note.js +59 -0
  184. package/dist/link/convention-note.js.map +1 -0
  185. package/dist/link/link.d.ts +98 -0
  186. package/dist/link/link.js +255 -0
  187. package/dist/link/link.js.map +1 -0
  188. package/dist/mcp/engine-morning-backend.d.ts +12 -17
  189. package/dist/mcp/engine-morning-backend.js +25 -131
  190. package/dist/mcp/engine-morning-backend.js.map +1 -1
  191. package/dist/mcp/semantic-engine.d.ts +32 -0
  192. package/dist/mcp/semantic-engine.js +52 -0
  193. package/dist/mcp/semantic-engine.js.map +1 -0
  194. package/dist/mcp/semantic-retrieve-args.d.ts +1 -5
  195. package/dist/mcp/semantic-retrieve-args.js +1 -26
  196. package/dist/mcp/semantic-retrieve-args.js.map +1 -1
  197. package/dist/mcp/semantic-retrieve-schema.d.ts +0 -14
  198. package/dist/mcp/semantic-retrieve-schema.js +0 -5
  199. package/dist/mcp/semantic-retrieve-schema.js.map +1 -1
  200. package/dist/mcp/semantic-retrieve.d.ts +12 -18
  201. package/dist/mcp/semantic-retrieve.js +40 -71
  202. package/dist/mcp/semantic-retrieve.js.map +1 -1
  203. package/dist/mcp/semantic-tool-schemas.js +7 -24
  204. package/dist/mcp/semantic-tool-schemas.js.map +1 -1
  205. package/dist/mcp/server.js +126 -163
  206. package/dist/mcp/server.js.map +1 -1
  207. package/dist/ontology/active.d.ts +7 -0
  208. package/dist/ontology/active.js +41 -0
  209. package/dist/ontology/active.js.map +1 -0
  210. package/dist/retrieve/morning.d.ts +10 -18
  211. package/dist/retrieve/morning.js +2 -26
  212. package/dist/retrieve/morning.js.map +1 -1
  213. package/dist/retrieve/semantic-contract.d.ts +10 -0
  214. package/dist/retrieve/semantic-contract.js +2 -0
  215. package/dist/retrieve/semantic-contract.js.map +1 -0
  216. package/dist/setup/axis.d.ts +22 -3
  217. package/dist/setup/axis.js +82 -35
  218. package/dist/setup/axis.js.map +1 -1
  219. package/docs/install.md +6 -6
  220. package/package.json +8 -2
  221. package/scripts/install.sh +1 -1
  222. package/adapters/claude-code/skills/capture/SKILL.md +0 -50
  223. package/adapters/codex/skills/oms-capture/SKILL.md +0 -16
  224. package/adapters/hermes/skills/capture/SKILL.md +0 -16
  225. package/core/skills/capture/SKILL.md +0 -50
  226. package/dist/adapt/HostAdapter.d.ts +0 -21
  227. package/dist/adapt/HostAdapter.js +0 -10
  228. package/dist/adapt/HostAdapter.js.map +0 -1
  229. package/dist/adapt/claudeCode.d.ts +0 -9
  230. package/dist/adapt/claudeCode.js +0 -15
  231. package/dist/adapt/claudeCode.js.map +0 -1
  232. package/dist/adapt/codex.d.ts +0 -9
  233. package/dist/adapt/codex.js +0 -15
  234. package/dist/adapt/codex.js.map +0 -1
  235. package/dist/adapt/hermes.d.ts +0 -9
  236. package/dist/adapt/hermes.js +0 -15
  237. package/dist/adapt/hermes.js.map +0 -1
  238. package/dist/cli/semantic-metadata-commands.d.ts +0 -3
  239. package/dist/cli/semantic-metadata-commands.js +0 -115
  240. package/dist/cli/semantic-metadata-commands.js.map +0 -1
  241. package/dist/engine/compile/cascade.d.ts +0 -35
  242. package/dist/engine/compile/cascade.js +0 -59
  243. package/dist/engine/compile/cascade.js.map +0 -1
  244. package/dist/engine/compile/cot.d.ts +0 -30
  245. package/dist/engine/compile/cot.js +0 -153
  246. package/dist/engine/compile/cot.js.map +0 -1
  247. package/dist/engine/compile/phases.d.ts +0 -47
  248. package/dist/engine/compile/phases.js +0 -101
  249. package/dist/engine/compile/phases.js.map +0 -1
  250. package/dist/engine/compile/provenance.d.ts +0 -45
  251. package/dist/engine/compile/provenance.js +0 -103
  252. package/dist/engine/compile/provenance.js.map +0 -1
  253. package/dist/engine/compile/sha-cache.d.ts +0 -42
  254. package/dist/engine/compile/sha-cache.js +0 -86
  255. package/dist/engine/compile/sha-cache.js.map +0 -1
  256. package/dist/engine/compile/types.d.ts +0 -71
  257. package/dist/engine/compile/types.js +0 -9
  258. package/dist/engine/compile/types.js.map +0 -1
  259. package/dist/engine/compile/worker.d.ts +0 -47
  260. package/dist/engine/compile/worker.js +0 -75
  261. package/dist/engine/compile/worker.js.map +0 -1
  262. package/dist/engine/distill/analyzer.d.ts +0 -51
  263. package/dist/engine/distill/analyzer.js +0 -279
  264. package/dist/engine/distill/analyzer.js.map +0 -1
  265. package/dist/engine/distill/clean-room.d.ts +0 -46
  266. package/dist/engine/distill/clean-room.js +0 -131
  267. package/dist/engine/distill/clean-room.js.map +0 -1
  268. package/dist/engine/distill/report.d.ts +0 -23
  269. package/dist/engine/distill/report.js +0 -107
  270. package/dist/engine/distill/report.js.map +0 -1
  271. package/dist/engine/distill/types.d.ts +0 -89
  272. package/dist/engine/distill/types.js +0 -9
  273. package/dist/engine/distill/types.js.map +0 -1
  274. package/dist/engine/embed/pull.d.ts +0 -51
  275. package/dist/engine/embed/pull.js +0 -90
  276. package/dist/engine/embed/pull.js.map +0 -1
  277. package/dist/engine/graph/community.d.ts +0 -38
  278. package/dist/engine/graph/community.js +0 -122
  279. package/dist/engine/graph/community.js.map +0 -1
  280. package/dist/engine/index.d.ts +0 -5
  281. package/dist/engine/index.js +0 -2
  282. package/dist/engine/index.js.map +0 -1
  283. package/dist/engine/mcp/index.d.ts +0 -15
  284. package/dist/engine/mcp/index.js +0 -19
  285. package/dist/engine/mcp/index.js.map +0 -1
  286. package/dist/engine/mcp/retrieve-mapper.d.ts +0 -38
  287. package/dist/engine/mcp/retrieve-mapper.js +0 -96
  288. package/dist/engine/mcp/retrieve-mapper.js.map +0 -1
  289. package/dist/engine/setup/ambiguity.d.ts +0 -39
  290. package/dist/engine/setup/ambiguity.js +0 -50
  291. package/dist/engine/setup/ambiguity.js.map +0 -1
  292. package/dist/engine/setup/types.d.ts +0 -71
  293. package/dist/engine/setup/types.js +0 -22
  294. package/dist/engine/setup/types.js.map +0 -1
  295. package/dist/engine/setup/writer.d.ts +0 -32
  296. package/dist/engine/setup/writer.js +0 -77
  297. package/dist/engine/setup/writer.js.map +0 -1
  298. package/dist/engine/wiki/collection.d.ts +0 -91
  299. package/dist/engine/wiki/collection.js +0 -188
  300. package/dist/engine/wiki/collection.js.map +0 -1
  301. package/dist/engine/wiki/ledger.d.ts +0 -59
  302. package/dist/engine/wiki/ledger.js +0 -130
  303. package/dist/engine/wiki/ledger.js.map +0 -1
  304. package/dist/engine/wiki/lint.d.ts +0 -38
  305. package/dist/engine/wiki/lint.js +0 -186
  306. package/dist/engine/wiki/lint.js.map +0 -1
  307. package/dist/engine/wiki/navigation.d.ts +0 -40
  308. package/dist/engine/wiki/navigation.js +0 -83
  309. package/dist/engine/wiki/navigation.js.map +0 -1
  310. package/dist/engine/wiki/types.d.ts +0 -54
  311. package/dist/engine/wiki/types.js +0 -7
  312. package/dist/engine/wiki/types.js.map +0 -1
  313. package/dist/ontology/loader.d.ts +0 -13
  314. package/dist/ontology/loader.js.map +0 -1
  315. package/dist/ontology/resolver.d.ts +0 -13
  316. package/dist/ontology/resolver.js.map +0 -1
  317. package/dist/ontology/types.d.ts +0 -72
  318. package/dist/ontology/types.js +0 -12
  319. package/dist/ontology/types.js.map +0 -1
  320. package/dist/retrieve/embedding-sync.d.ts +0 -3
  321. package/dist/retrieve/embedding-sync.js +0 -21
  322. package/dist/retrieve/embedding-sync.js.map +0 -1
  323. package/dist/runtime/assets.d.ts +0 -7
  324. package/dist/runtime/assets.js +0 -13
  325. package/dist/runtime/assets.js.map +0 -1
  326. package/dist/search/semantic-collections.d.ts +0 -32
  327. package/dist/search/semantic-collections.js +0 -68
  328. package/dist/search/semantic-collections.js.map +0 -1
  329. package/dist/search/semantic-contexts.d.ts +0 -21
  330. package/dist/search/semantic-contexts.js +0 -28
  331. package/dist/search/semantic-contexts.js.map +0 -1
  332. package/dist/search/semantic-diagnostics.d.ts +0 -16
  333. package/dist/search/semantic-diagnostics.js +0 -110
  334. package/dist/search/semantic-diagnostics.js.map +0 -1
  335. package/dist/search/semantic-documents.d.ts +0 -3
  336. package/dist/search/semantic-documents.js +0 -150
  337. package/dist/search/semantic-documents.js.map +0 -1
  338. package/dist/search/semantic-embedding-hash.d.ts +0 -3
  339. package/dist/search/semantic-embedding-hash.js +0 -30
  340. package/dist/search/semantic-embedding-hash.js.map +0 -1
  341. package/dist/search/semantic-embedding-provider.d.ts +0 -9
  342. package/dist/search/semantic-embedding-provider.js +0 -58
  343. package/dist/search/semantic-embedding-provider.js.map +0 -1
  344. package/dist/search/semantic-index-build.d.ts +0 -13
  345. package/dist/search/semantic-index-build.js +0 -101
  346. package/dist/search/semantic-index-build.js.map +0 -1
  347. package/dist/search/semantic-index-core.d.ts +0 -21
  348. package/dist/search/semantic-index-core.js +0 -106
  349. package/dist/search/semantic-index-core.js.map +0 -1
  350. package/dist/search/semantic-index-io.d.ts +0 -19
  351. package/dist/search/semantic-index-io.js +0 -214
  352. package/dist/search/semantic-index-io.js.map +0 -1
  353. package/dist/search/semantic-index-types.d.ts +0 -50
  354. package/dist/search/semantic-index-types.js +0 -2
  355. package/dist/search/semantic-index-types.js.map +0 -1
  356. package/dist/search/semantic-index.d.ts +0 -4
  357. package/dist/search/semantic-index.js +0 -4
  358. package/dist/search/semantic-index.js.map +0 -1
  359. package/dist/search/semantic-listing.d.ts +0 -12
  360. package/dist/search/semantic-listing.js +0 -64
  361. package/dist/search/semantic-listing.js.map +0 -1
  362. package/dist/search/semantic-maintenance-shared.d.ts +0 -15
  363. package/dist/search/semantic-maintenance-shared.js +0 -43
  364. package/dist/search/semantic-maintenance-shared.js.map +0 -1
  365. package/dist/search/semantic-maintenance-types.d.ts +0 -103
  366. package/dist/search/semantic-maintenance-types.js +0 -2
  367. package/dist/search/semantic-maintenance-types.js.map +0 -1
  368. package/dist/search/semantic-maintenance.d.ts +0 -4
  369. package/dist/search/semantic-maintenance.js +0 -5
  370. package/dist/search/semantic-maintenance.js.map +0 -1
  371. package/dist/search/semantic-provider-types.d.ts +0 -34
  372. package/dist/search/semantic-provider-types.js +0 -2
  373. package/dist/search/semantic-provider-types.js.map +0 -1
  374. package/dist/search/semantic-query-types.d.ts +0 -83
  375. package/dist/search/semantic-query-types.js +0 -2
  376. package/dist/search/semantic-query-types.js.map +0 -1
  377. package/dist/search/semantic-query.d.ts +0 -2
  378. package/dist/search/semantic-query.js +0 -188
  379. package/dist/search/semantic-query.js.map +0 -1
  380. package/dist/search/semantic-sqlite-db.d.ts +0 -18
  381. package/dist/search/semantic-sqlite-db.js +0 -87
  382. package/dist/search/semantic-sqlite-db.js.map +0 -1
  383. package/dist/search/semantic-sqlite-query.d.ts +0 -2
  384. package/dist/search/semantic-sqlite-query.js +0 -128
  385. package/dist/search/semantic-sqlite-query.js.map +0 -1
  386. package/dist/search/semantic-sqlite-read.d.ts +0 -5
  387. package/dist/search/semantic-sqlite-read.js +0 -104
  388. package/dist/search/semantic-sqlite-read.js.map +0 -1
  389. package/dist/search/semantic-sqlite-write.d.ts +0 -7
  390. package/dist/search/semantic-sqlite-write.js +0 -66
  391. package/dist/search/semantic-sqlite-write.js.map +0 -1
  392. package/dist/search/semantic-store.d.ts +0 -15
  393. package/dist/search/semantic-store.js +0 -17
  394. package/dist/search/semantic-store.js.map +0 -1
  395. package/dist/search/semantic-sync-types.d.ts +0 -47
  396. package/dist/search/semantic-sync-types.js +0 -2
  397. package/dist/search/semantic-sync-types.js.map +0 -1
  398. package/dist/search/semantic-sync.d.ts +0 -13
  399. package/dist/search/semantic-sync.js +0 -131
  400. package/dist/search/semantic-sync.js.map +0 -1
  401. package/dist/search/semantic-test-fixtures.d.ts +0 -1
  402. package/dist/search/semantic-test-fixtures.js +0 -38
  403. package/dist/search/semantic-test-fixtures.js.map +0 -1
  404. package/dist/search/semantic-token.d.ts +0 -25
  405. package/dist/search/semantic-token.js +0 -114
  406. package/dist/search/semantic-token.js.map +0 -1
  407. package/dist/search/semantic-types.d.ts +0 -5
  408. package/dist/search/semantic-types.js +0 -2
  409. package/dist/search/semantic-types.js.map +0 -1
  410. package/dist/search/semantic.d.ts +0 -6
  411. package/dist/search/semantic.js +0 -6
  412. package/dist/search/semantic.js.map +0 -1
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.1.9",
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.
@@ -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).