oh-my-second-brain 0.2.0 → 0.3.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 (464) hide show
  1. package/.claude-plugin/marketplace.json +41 -0
  2. package/{adapters/claude-code/.claude-plugin → .claude-plugin}/plugin.json +7 -8
  3. package/{adapters/codex/.codex-plugin → .codex-plugin}/plugin.json +4 -4
  4. package/ACKNOWLEDGMENTS.md +154 -0
  5. package/CHANGELOG-assets.md +19 -0
  6. package/CHANGELOG-cli.md +15 -0
  7. package/CHANGELOG-kernel.md +25 -0
  8. package/CHANGELOG-mcp.md +26 -0
  9. package/CHANGELOG-vendors.md +22 -0
  10. package/CHANGELOG.md +24 -7
  11. package/README.ko.md +2 -2
  12. package/README.md +16 -16
  13. package/{adapters/claude-code → assets/claude}/CLAUDE.md +4 -4
  14. package/{adapters → assets}/codex/AGENTS.md +3 -3
  15. package/{adapters → assets}/codex/rules/oms.md +5 -5
  16. package/{adapters → assets}/hermes/README.md +1 -1
  17. package/{adapters → assets}/hermes/SOUL.md +3 -3
  18. package/{adapters/hermes/manifest.json → assets/hermes-manifest.json} +3 -4
  19. package/assets/skills/distill/SKILL.md +20 -0
  20. package/assets/skills/doctor/SKILL.md +23 -0
  21. package/assets/skills/link/SKILL.md +24 -0
  22. package/assets/skills/search/SKILL.md +25 -0
  23. package/assets/skills/status/SKILL.md +22 -0
  24. package/assets/skills/write/SKILL.md +30 -0
  25. package/core/ontology/schemas/README.md +20 -14
  26. package/dist/assets/shared-skills.d.ts +4 -0
  27. package/dist/assets/shared-skills.js +8 -0
  28. package/dist/assets/shared-skills.js.map +1 -0
  29. package/dist/cli/args.d.ts +1 -1
  30. package/dist/cli/args.js +1 -1
  31. package/dist/cli/args.js.map +1 -1
  32. package/dist/cli/audit.js +3 -3
  33. package/dist/cli/audit.js.map +1 -1
  34. package/dist/cli/claude-install-plan.js +2 -2
  35. package/dist/cli/claude-install-plan.js.map +1 -1
  36. package/dist/cli/doctor-lint.js +8 -8
  37. package/dist/cli/doctor-lint.js.map +1 -1
  38. package/dist/cli/global-writeback.js +1 -1
  39. package/dist/cli/global-writeback.js.map +1 -1
  40. package/dist/cli/host-commands.d.ts +1 -1
  41. package/dist/cli/host-commands.js +22 -4
  42. package/dist/cli/host-commands.js.map +1 -1
  43. package/dist/cli/link-command.d.ts +1 -1
  44. package/dist/cli/link-command.js +2 -2
  45. package/dist/cli/link-command.js.map +1 -1
  46. package/dist/cli/linkify.js +16 -71
  47. package/dist/cli/linkify.js.map +1 -1
  48. package/dist/cli/oms.js +20 -9
  49. package/dist/cli/oms.js.map +1 -1
  50. package/dist/cli/semantic-args.d.ts +1 -1
  51. package/dist/cli/semantic-http.js +3 -3
  52. package/dist/cli/semantic-http.js.map +1 -1
  53. package/dist/cli/semantic-usage.js +1 -1
  54. package/dist/cli/semantic-usage.js.map +1 -1
  55. package/dist/cli/semantic.js +1 -6
  56. package/dist/cli/semantic.js.map +1 -1
  57. package/dist/cli/setup-command.d.ts +1 -0
  58. package/dist/cli/setup-command.js +42 -147
  59. package/dist/cli/setup-command.js.map +1 -1
  60. package/dist/cli/update-notice.d.ts +1 -1
  61. package/dist/cli/update-notice.js +2 -2
  62. package/dist/cli/update-notice.js.map +1 -1
  63. package/dist/cli/usage.d.ts +1 -1
  64. package/dist/cli/usage.js +2 -2
  65. package/dist/cli/usage.js.map +1 -1
  66. package/dist/{capture → kernel/capture}/safe.d.ts +11 -1
  67. package/dist/{capture → kernel/capture}/safe.js +3 -3
  68. package/dist/kernel/capture/safe.js.map +1 -0
  69. package/dist/kernel/conventions/frontmatter.js.map +1 -0
  70. package/dist/kernel/conventions/lint.js.map +1 -0
  71. package/dist/kernel/conventions/report.js.map +1 -0
  72. package/dist/{conventions → kernel/conventions}/validate.d.ts +1 -1
  73. package/dist/kernel/conventions/validate.js.map +1 -0
  74. package/dist/kernel/conventions/vault-walk.js.map +1 -0
  75. package/dist/{conventions → kernel/conventions}/write-contract.d.ts +1 -1
  76. package/dist/kernel/conventions/write-contract.js.map +1 -0
  77. package/dist/kernel/conventions/write-protocol.js.map +1 -0
  78. package/dist/kernel/doctor/service.d.ts +71 -0
  79. package/dist/kernel/doctor/service.js +70 -0
  80. package/dist/kernel/doctor/service.js.map +1 -0
  81. package/dist/{engine → kernel/engine}/assemble.d.ts +24 -0
  82. package/dist/{engine → kernel/engine}/assemble.js +142 -4
  83. package/dist/kernel/engine/assemble.js.map +1 -0
  84. package/dist/{engine → kernel/engine}/conventions/vault-lint.d.ts +1 -1
  85. package/dist/{engine → kernel/engine}/conventions/vault-lint.js +1 -1
  86. package/dist/kernel/engine/conventions/vault-lint.js.map +1 -0
  87. package/dist/kernel/engine/embed/chunker.js.map +1 -0
  88. package/dist/kernel/engine/embed/deferred.js.map +1 -0
  89. package/dist/{engine → kernel/engine}/embed/hash-stub.test-helper.d.ts +1 -1
  90. package/dist/{engine → kernel/engine}/embed/hash-stub.test-helper.js +1 -1
  91. package/dist/kernel/engine/embed/hash-stub.test-helper.js.map +1 -0
  92. package/dist/kernel/engine/embed/identity.js.map +1 -0
  93. package/dist/kernel/engine/embed/provider.js.map +1 -0
  94. package/dist/{engine → kernel/engine}/embed/store.d.ts +8 -0
  95. package/dist/{engine → kernel/engine}/embed/store.js +212 -8
  96. package/dist/kernel/engine/embed/store.js.map +1 -0
  97. package/dist/{engine → kernel/engine}/embed/sync.d.ts +3 -1
  98. package/dist/{engine → kernel/engine}/embed/sync.js +5 -3
  99. package/dist/kernel/engine/embed/sync.js.map +1 -0
  100. package/dist/kernel/engine/graph/builder.js.map +1 -0
  101. package/dist/kernel/engine/graph/explore.js.map +1 -0
  102. package/dist/kernel/engine/graph/node.js.map +1 -0
  103. package/dist/kernel/engine/graph/resolver.js.map +1 -0
  104. package/dist/kernel/engine/graph/traverse.js.map +1 -0
  105. package/dist/kernel/engine/linkify/apply.js.map +1 -0
  106. package/dist/kernel/engine/linkify/josa.js.map +1 -0
  107. package/dist/kernel/engine/linkify/mask.js.map +1 -0
  108. package/dist/kernel/engine/linkify/suggest.js.map +1 -0
  109. package/dist/kernel/engine/linkify/types.js.map +1 -0
  110. package/dist/{engine → kernel/engine}/mcp/facade.d.ts +7 -1
  111. package/dist/{engine → kernel/engine}/mcp/facade.js +32 -11
  112. package/dist/kernel/engine/mcp/facade.js.map +1 -0
  113. package/dist/kernel/engine/mcp/op-mappers.js.map +1 -0
  114. package/dist/kernel/engine/mcp/query-mapper.js.map +1 -0
  115. package/dist/{engine → kernel/engine}/mcp/types.d.ts +5 -0
  116. package/dist/kernel/engine/mcp/types.js.map +1 -0
  117. package/dist/{engine → kernel/engine}/retrieval/dispatcher.d.ts +1 -1
  118. package/dist/{engine → kernel/engine}/retrieval/dispatcher.js +8 -6
  119. package/dist/kernel/engine/retrieval/dispatcher.js.map +1 -0
  120. package/dist/{engine → kernel/engine}/retrieval/index.d.ts +2 -0
  121. package/dist/{engine → kernel/engine}/retrieval/index.js +5 -2
  122. package/dist/kernel/engine/retrieval/index.js.map +1 -0
  123. package/dist/kernel/engine/retrieval/reranker.js.map +1 -0
  124. package/dist/kernel/engine/retrieval/rrf.js.map +1 -0
  125. package/dist/kernel/engine/tracer.js.map +1 -0
  126. package/dist/{engine → kernel/engine}/types.d.ts +4 -4
  127. package/dist/kernel/engine/types.js.map +1 -0
  128. package/dist/{graph → kernel/graph}/cache.d.ts +1 -1
  129. package/dist/{graph → kernel/graph}/cache.js +1 -1
  130. package/dist/kernel/graph/cache.js.map +1 -0
  131. package/dist/kernel/graph/explore.js.map +1 -0
  132. package/dist/{harness → kernel/harness}/surface-registry.d.ts +0 -1
  133. package/dist/kernel/harness/surface-registry.js +170 -0
  134. package/dist/kernel/harness/surface-registry.js.map +1 -0
  135. package/dist/{harness → kernel/harness}/validation.js +67 -4
  136. package/dist/kernel/harness/validation.js.map +1 -0
  137. package/dist/{index.d.ts → kernel/index.d.ts} +5 -6
  138. package/dist/kernel/index.js +12 -0
  139. package/dist/kernel/index.js.map +1 -0
  140. package/dist/{install → kernel/install}/adapter-source.d.ts +10 -1
  141. package/dist/kernel/install/adapter-source.js +76 -0
  142. package/dist/kernel/install/adapter-source.js.map +1 -0
  143. package/dist/kernel/install/common.js.map +1 -0
  144. package/dist/{install → kernel/install}/hosts.d.ts +3 -3
  145. package/dist/{install → kernel/install}/hosts.js +3 -22
  146. package/dist/kernel/install/hosts.js.map +1 -0
  147. package/dist/{core/ontology → kernel/install}/types.js.map +1 -1
  148. package/dist/{link → kernel/link}/convention-note.js +2 -2
  149. package/dist/kernel/link/convention-note.js.map +1 -0
  150. package/dist/kernel/link/global-config.js.map +1 -0
  151. package/dist/kernel/link/link.js.map +1 -0
  152. package/dist/kernel/link/workflow.d.ts +55 -0
  153. package/dist/kernel/link/workflow.js +107 -0
  154. package/dist/kernel/link/workflow.js.map +1 -0
  155. package/dist/{ontology → kernel/ontology}/active.d.ts +1 -1
  156. package/dist/{ontology → kernel/ontology}/active.js +2 -2
  157. package/dist/kernel/ontology/active.js.map +1 -0
  158. package/dist/kernel/ontology/loader.js.map +1 -0
  159. package/dist/kernel/ontology/resolver.js.map +1 -0
  160. package/dist/{install → kernel/ontology}/types.js.map +1 -1
  161. package/dist/kernel/plugin/index.d.ts +1 -0
  162. package/dist/kernel/plugin/index.js +2 -0
  163. package/dist/kernel/plugin/index.js.map +1 -0
  164. package/dist/{core → kernel}/runtime/assets.d.ts +2 -4
  165. package/dist/{core → kernel}/runtime/assets.js +1 -3
  166. package/dist/kernel/runtime/assets.js.map +1 -0
  167. package/dist/kernel/search/morning-test-fixtures.js.map +1 -0
  168. package/dist/{retrieve → kernel/search}/morning.d.ts +0 -1
  169. package/dist/kernel/search/morning.js.map +1 -0
  170. package/dist/kernel/search/semantic-contract.js.map +1 -0
  171. package/dist/kernel/searchbackend/engine-search-backend.d.ts +28 -0
  172. package/dist/kernel/searchbackend/engine-search-backend.js +67 -0
  173. package/dist/kernel/searchbackend/engine-search-backend.js.map +1 -0
  174. package/dist/kernel/searchbackend/index.d.ts +2 -0
  175. package/dist/kernel/searchbackend/index.js +2 -0
  176. package/dist/kernel/searchbackend/index.js.map +1 -0
  177. package/dist/kernel/searchbackend/search-backend.d.ts +47 -0
  178. package/dist/kernel/searchbackend/search-backend.js +49 -0
  179. package/dist/kernel/searchbackend/search-backend.js.map +1 -0
  180. package/dist/{mcp → kernel/semantic}/semantic-engine.d.ts +3 -2
  181. package/dist/{mcp → kernel/semantic}/semantic-engine.js +5 -5
  182. package/dist/kernel/semantic/semantic-engine.js.map +1 -0
  183. package/dist/{mcp → kernel/semantic}/semantic-retrieve-args.d.ts +2 -2
  184. package/dist/{mcp → kernel/semantic}/semantic-retrieve-args.js +0 -8
  185. package/dist/kernel/semantic/semantic-retrieve-args.js.map +1 -0
  186. package/dist/{mcp → kernel/semantic}/semantic-retrieve-schema.d.ts +0 -24
  187. package/dist/{mcp → kernel/semantic}/semantic-retrieve-schema.js +0 -8
  188. package/dist/kernel/semantic/semantic-retrieve-schema.js.map +1 -0
  189. package/dist/{mcp → kernel/semantic}/semantic-retrieve.js +5 -9
  190. package/dist/kernel/semantic/semantic-retrieve.js.map +1 -0
  191. package/dist/kernel/semantic/semantic-schemas.js.map +1 -0
  192. package/dist/{mcp → kernel/semantic}/semantic-tool-schemas.js +0 -28
  193. package/dist/kernel/semantic/semantic-tool-schemas.js.map +1 -0
  194. package/dist/{setup → kernel/setup}/axis.d.ts +1 -1
  195. package/dist/{setup → kernel/setup}/axis.js +1 -1
  196. package/dist/kernel/setup/axis.js.map +1 -0
  197. package/dist/{cli/setup-documents.d.ts → kernel/setup/documents.d.ts} +1 -1
  198. package/dist/{cli/setup-documents.js → kernel/setup/documents.js} +15 -49
  199. package/dist/kernel/setup/documents.js.map +1 -0
  200. package/dist/kernel/setup/service.d.ts +44 -0
  201. package/dist/kernel/setup/service.js +97 -0
  202. package/dist/kernel/setup/service.js.map +1 -0
  203. package/dist/kernel/update/update.js.map +1 -0
  204. package/dist/mcp/engine-morning-backend.d.ts +4 -4
  205. package/dist/mcp/engine-morning-backend.js +4 -18
  206. package/dist/mcp/engine-morning-backend.js.map +1 -1
  207. package/dist/mcp/link-tools.d.ts +9 -56
  208. package/dist/mcp/link-tools.js +5 -129
  209. package/dist/mcp/link-tools.js.map +1 -1
  210. package/dist/mcp/server.d.ts +9 -2
  211. package/dist/mcp/server.js +326 -327
  212. package/dist/mcp/server.js.map +1 -1
  213. package/dist/mcp/update-notice.d.ts +1 -1
  214. package/dist/mcp/update-notice.js +1 -1
  215. package/dist/mcp/update-notice.js.map +1 -1
  216. package/dist/{install → vendors/claude}/claude-hooks.d.ts +1 -1
  217. package/dist/{install → vendors/claude}/claude-hooks.js +1 -1
  218. package/dist/vendors/claude/claude-hooks.js.map +1 -0
  219. package/dist/{install → vendors/claude}/claude-marketplace.d.ts +3 -3
  220. package/dist/{install → vendors/claude}/claude-marketplace.js +6 -9
  221. package/dist/vendors/claude/claude-marketplace.js.map +1 -0
  222. package/dist/{install → vendors/claude}/claude.d.ts +2 -2
  223. package/dist/{install → vendors/claude}/claude.js +2 -2
  224. package/dist/vendors/claude/claude.js.map +1 -0
  225. package/dist/{hook → vendors/claude/hook}/post-tool-use.js +5 -5
  226. package/dist/vendors/claude/hook/post-tool-use.js.map +1 -0
  227. package/dist/vendors/claude/hook/pre-tool-use.js.map +1 -0
  228. package/dist/vendors/claude/hook/stdin.js.map +1 -0
  229. package/dist/vendors/codex/codex.d.ts +10 -0
  230. package/dist/{install → vendors/codex}/codex.js +19 -37
  231. package/dist/vendors/codex/codex.js.map +1 -0
  232. package/dist/{install → vendors/hermes}/hermes.d.ts +2 -2
  233. package/dist/{install → vendors/hermes}/hermes.js +15 -7
  234. package/dist/vendors/hermes/hermes.js.map +1 -0
  235. package/docs/adapters.md +15 -0
  236. package/docs/install.md +10 -11
  237. package/package.json +21 -9
  238. package/adapters/README.md +0 -99
  239. package/adapters/claude-code/skills/compile/SKILL.md +0 -27
  240. package/adapters/claude-code/skills/define/SKILL.md +0 -51
  241. package/adapters/claude-code/skills/distill/SKILL.md +0 -28
  242. package/adapters/claude-code/skills/doctor/SKILL.md +0 -58
  243. package/adapters/claude-code/skills/link/SKILL.md +0 -87
  244. package/adapters/claude-code/skills/retrieve/SKILL.md +0 -99
  245. package/adapters/claude-code/skills/setup/SKILL.md +0 -78
  246. package/adapters/claude-code/skills/uninstall/SKILL.md +0 -34
  247. package/adapters/claude-code/skills/update/SKILL.md +0 -45
  248. package/adapters/claude-code/skills/vault-decision-record/SKILL.md +0 -52
  249. package/adapters/claude-code/skills/vault-lint/SKILL.md +0 -47
  250. package/adapters/claude-code/skills/vault-scaffold/SKILL.md +0 -47
  251. package/adapters/claude-code/skills/wiki/SKILL.md +0 -82
  252. package/adapters/claude-code/skills/write/SKILL.md +0 -16
  253. package/adapters/codex/skills/oms-compile/SKILL.md +0 -16
  254. package/adapters/codex/skills/oms-distill/SKILL.md +0 -14
  255. package/adapters/codex/skills/oms-doctor/SKILL.md +0 -14
  256. package/adapters/codex/skills/oms-install/SKILL.md +0 -19
  257. package/adapters/codex/skills/oms-link/SKILL.md +0 -35
  258. package/adapters/codex/skills/oms-retrieve/SKILL.md +0 -32
  259. package/adapters/codex/skills/oms-setup/SKILL.md +0 -34
  260. package/adapters/codex/skills/oms-uninstall/SKILL.md +0 -20
  261. package/adapters/codex/skills/oms-update/SKILL.md +0 -22
  262. package/adapters/codex/skills/oms-vault-lint/SKILL.md +0 -19
  263. package/adapters/codex/skills/oms-wiki/SKILL.md +0 -39
  264. package/adapters/codex/skills/oms-write/SKILL.md +0 -10
  265. package/adapters/hermes/skills/compile/SKILL.md +0 -13
  266. package/adapters/hermes/skills/distill/SKILL.md +0 -10
  267. package/adapters/hermes/skills/doctor/SKILL.md +0 -14
  268. package/adapters/hermes/skills/install/SKILL.md +0 -19
  269. package/adapters/hermes/skills/link/SKILL.md +0 -18
  270. package/adapters/hermes/skills/retrieve/SKILL.md +0 -32
  271. package/adapters/hermes/skills/setup/SKILL.md +0 -37
  272. package/adapters/hermes/skills/uninstall/SKILL.md +0 -20
  273. package/adapters/hermes/skills/update/SKILL.md +0 -22
  274. package/adapters/hermes/skills/wiki/SKILL.md +0 -14
  275. package/adapters/hermes/skills/write/SKILL.md +0 -10
  276. package/core/agents/librarian.md +0 -44
  277. package/core/agents/retriever.md +0 -62
  278. package/core/skills/compile/CHANGELOG.md +0 -24
  279. package/core/skills/compile/SKILL.md +0 -57
  280. package/core/skills/define/SKILL.md +0 -59
  281. package/core/skills/distill/CHANGELOG.md +0 -39
  282. package/core/skills/distill/SKILL.md +0 -62
  283. package/core/skills/doctor/SKILL.md +0 -49
  284. package/core/skills/link/SKILL.md +0 -130
  285. package/core/skills/retrieve/SKILL.md +0 -78
  286. package/core/skills/setup/CHANGELOG.md +0 -49
  287. package/core/skills/setup/SKILL.md +0 -246
  288. package/core/skills/uninstall/SKILL.md +0 -34
  289. package/core/skills/vault-decision-record/CHANGELOG.md +0 -24
  290. package/core/skills/vault-decision-record/SKILL.md +0 -93
  291. package/core/skills/vault-lint/CHANGELOG.md +0 -35
  292. package/core/skills/vault-lint/SKILL.md +0 -58
  293. package/core/skills/vault-scaffold/CHANGELOG.md +0 -21
  294. package/core/skills/vault-scaffold/SKILL.md +0 -72
  295. package/core/skills/wiki/CHANGELOG.md +0 -23
  296. package/core/skills/wiki/SKILL.md +0 -159
  297. package/core/skills/write/SKILL.md +0 -15
  298. package/dist/capture/safe.js.map +0 -1
  299. package/dist/cli/setup-documents.js.map +0 -1
  300. package/dist/conventions/frontmatter.js.map +0 -1
  301. package/dist/conventions/lint.js.map +0 -1
  302. package/dist/conventions/report.js.map +0 -1
  303. package/dist/conventions/validate.js.map +0 -1
  304. package/dist/conventions/vault-walk.js.map +0 -1
  305. package/dist/conventions/write-contract.js.map +0 -1
  306. package/dist/conventions/write-protocol.js.map +0 -1
  307. package/dist/core/ontology/loader.js.map +0 -1
  308. package/dist/core/ontology/resolver.js.map +0 -1
  309. package/dist/core/runtime/assets.js.map +0 -1
  310. package/dist/engine/assemble.js.map +0 -1
  311. package/dist/engine/conventions/vault-lint.js.map +0 -1
  312. package/dist/engine/embed/chunker.js.map +0 -1
  313. package/dist/engine/embed/deferred.js.map +0 -1
  314. package/dist/engine/embed/hash-stub.test-helper.js.map +0 -1
  315. package/dist/engine/embed/identity.js.map +0 -1
  316. package/dist/engine/embed/provider.js.map +0 -1
  317. package/dist/engine/embed/store.js.map +0 -1
  318. package/dist/engine/embed/sync.js.map +0 -1
  319. package/dist/engine/graph/builder.js.map +0 -1
  320. package/dist/engine/graph/explore.js.map +0 -1
  321. package/dist/engine/graph/node.js.map +0 -1
  322. package/dist/engine/graph/resolver.js.map +0 -1
  323. package/dist/engine/graph/traverse.js.map +0 -1
  324. package/dist/engine/linkify/apply.js.map +0 -1
  325. package/dist/engine/linkify/josa.js.map +0 -1
  326. package/dist/engine/linkify/mask.js.map +0 -1
  327. package/dist/engine/linkify/suggest.js.map +0 -1
  328. package/dist/engine/linkify/types.js.map +0 -1
  329. package/dist/engine/mcp/facade.js.map +0 -1
  330. package/dist/engine/mcp/op-mappers.js.map +0 -1
  331. package/dist/engine/mcp/query-mapper.js.map +0 -1
  332. package/dist/engine/mcp/types.js.map +0 -1
  333. package/dist/engine/retrieval/dispatcher.js.map +0 -1
  334. package/dist/engine/retrieval/index.js.map +0 -1
  335. package/dist/engine/retrieval/reranker.js.map +0 -1
  336. package/dist/engine/retrieval/rrf.js.map +0 -1
  337. package/dist/engine/tracer.js.map +0 -1
  338. package/dist/engine/types.js.map +0 -1
  339. package/dist/graph/cache.js.map +0 -1
  340. package/dist/graph/explore.js.map +0 -1
  341. package/dist/harness/surface-registry.js +0 -397
  342. package/dist/harness/surface-registry.js.map +0 -1
  343. package/dist/harness/validation.js.map +0 -1
  344. package/dist/hook/post-tool-use.js.map +0 -1
  345. package/dist/hook/pre-tool-use.js.map +0 -1
  346. package/dist/hook/stdin.js.map +0 -1
  347. package/dist/index.js +0 -13
  348. package/dist/index.js.map +0 -1
  349. package/dist/install/adapter-source.js +0 -45
  350. package/dist/install/adapter-source.js.map +0 -1
  351. package/dist/install/claude-hooks.js.map +0 -1
  352. package/dist/install/claude-marketplace.js.map +0 -1
  353. package/dist/install/claude.js.map +0 -1
  354. package/dist/install/codex.d.ts +0 -24
  355. package/dist/install/codex.js.map +0 -1
  356. package/dist/install/common.js.map +0 -1
  357. package/dist/install/hermes.js.map +0 -1
  358. package/dist/install/hosts.js.map +0 -1
  359. package/dist/link/convention-note.js.map +0 -1
  360. package/dist/link/global-config.js.map +0 -1
  361. package/dist/link/link.js.map +0 -1
  362. package/dist/mcp/semantic-engine.js.map +0 -1
  363. package/dist/mcp/semantic-retrieve-args.js.map +0 -1
  364. package/dist/mcp/semantic-retrieve-schema.js.map +0 -1
  365. package/dist/mcp/semantic-retrieve.js.map +0 -1
  366. package/dist/mcp/semantic-schemas.js.map +0 -1
  367. package/dist/mcp/semantic-tool-schemas.js.map +0 -1
  368. package/dist/ontology/active.js.map +0 -1
  369. package/dist/retrieve/morning-test-fixtures.js.map +0 -1
  370. package/dist/retrieve/morning.js.map +0 -1
  371. package/dist/retrieve/semantic-contract.js.map +0 -1
  372. package/dist/setup/axis.js.map +0 -1
  373. package/dist/update/update.js.map +0 -1
  374. package/docs/release.md +0 -188
  375. /package/{adapters/codex/.mcp.json → .mcp.codex.json} +0 -0
  376. /package/{adapters/claude-code/.mcp.json → .mcp.json} +0 -0
  377. /package/{adapters/claude-code → assets/claude}/hooks/oms-guard.mjs +0 -0
  378. /package/{adapters/claude-code → assets/claude}/hooks/oms-post-guard.mjs +0 -0
  379. /package/dist/{conventions → kernel/conventions}/frontmatter.d.ts +0 -0
  380. /package/dist/{conventions → kernel/conventions}/frontmatter.js +0 -0
  381. /package/dist/{conventions → kernel/conventions}/lint.d.ts +0 -0
  382. /package/dist/{conventions → kernel/conventions}/lint.js +0 -0
  383. /package/dist/{conventions → kernel/conventions}/report.d.ts +0 -0
  384. /package/dist/{conventions → kernel/conventions}/report.js +0 -0
  385. /package/dist/{conventions → kernel/conventions}/validate.js +0 -0
  386. /package/dist/{conventions → kernel/conventions}/vault-walk.d.ts +0 -0
  387. /package/dist/{conventions → kernel/conventions}/vault-walk.js +0 -0
  388. /package/dist/{conventions → kernel/conventions}/write-contract.js +0 -0
  389. /package/dist/{conventions → kernel/conventions}/write-protocol.d.ts +0 -0
  390. /package/dist/{conventions → kernel/conventions}/write-protocol.js +0 -0
  391. /package/dist/{engine → kernel/engine}/embed/chunker.d.ts +0 -0
  392. /package/dist/{engine → kernel/engine}/embed/chunker.js +0 -0
  393. /package/dist/{engine → kernel/engine}/embed/deferred.d.ts +0 -0
  394. /package/dist/{engine → kernel/engine}/embed/deferred.js +0 -0
  395. /package/dist/{engine → kernel/engine}/embed/identity.d.ts +0 -0
  396. /package/dist/{engine → kernel/engine}/embed/identity.js +0 -0
  397. /package/dist/{engine → kernel/engine}/embed/provider.d.ts +0 -0
  398. /package/dist/{engine → kernel/engine}/embed/provider.js +0 -0
  399. /package/dist/{engine → kernel/engine}/graph/builder.d.ts +0 -0
  400. /package/dist/{engine → kernel/engine}/graph/builder.js +0 -0
  401. /package/dist/{engine → kernel/engine}/graph/explore.d.ts +0 -0
  402. /package/dist/{engine → kernel/engine}/graph/explore.js +0 -0
  403. /package/dist/{engine → kernel/engine}/graph/node.d.ts +0 -0
  404. /package/dist/{engine → kernel/engine}/graph/node.js +0 -0
  405. /package/dist/{engine → kernel/engine}/graph/resolver.d.ts +0 -0
  406. /package/dist/{engine → kernel/engine}/graph/resolver.js +0 -0
  407. /package/dist/{engine → kernel/engine}/graph/traverse.d.ts +0 -0
  408. /package/dist/{engine → kernel/engine}/graph/traverse.js +0 -0
  409. /package/dist/{engine → kernel/engine}/linkify/apply.d.ts +0 -0
  410. /package/dist/{engine → kernel/engine}/linkify/apply.js +0 -0
  411. /package/dist/{engine → kernel/engine}/linkify/josa.d.ts +0 -0
  412. /package/dist/{engine → kernel/engine}/linkify/josa.js +0 -0
  413. /package/dist/{engine → kernel/engine}/linkify/mask.d.ts +0 -0
  414. /package/dist/{engine → kernel/engine}/linkify/mask.js +0 -0
  415. /package/dist/{engine → kernel/engine}/linkify/suggest.d.ts +0 -0
  416. /package/dist/{engine → kernel/engine}/linkify/suggest.js +0 -0
  417. /package/dist/{engine → kernel/engine}/linkify/types.d.ts +0 -0
  418. /package/dist/{engine → kernel/engine}/linkify/types.js +0 -0
  419. /package/dist/{engine → kernel/engine}/mcp/op-mappers.d.ts +0 -0
  420. /package/dist/{engine → kernel/engine}/mcp/op-mappers.js +0 -0
  421. /package/dist/{engine → kernel/engine}/mcp/query-mapper.d.ts +0 -0
  422. /package/dist/{engine → kernel/engine}/mcp/query-mapper.js +0 -0
  423. /package/dist/{engine → kernel/engine}/mcp/types.js +0 -0
  424. /package/dist/{engine → kernel/engine}/retrieval/reranker.d.ts +0 -0
  425. /package/dist/{engine → kernel/engine}/retrieval/reranker.js +0 -0
  426. /package/dist/{engine → kernel/engine}/retrieval/rrf.d.ts +0 -0
  427. /package/dist/{engine → kernel/engine}/retrieval/rrf.js +0 -0
  428. /package/dist/{engine → kernel/engine}/tracer.d.ts +0 -0
  429. /package/dist/{engine → kernel/engine}/tracer.js +0 -0
  430. /package/dist/{engine → kernel/engine}/types.js +0 -0
  431. /package/dist/{graph → kernel/graph}/explore.d.ts +0 -0
  432. /package/dist/{graph → kernel/graph}/explore.js +0 -0
  433. /package/dist/{harness → kernel/harness}/validation.d.ts +0 -0
  434. /package/dist/{install → kernel/install}/common.d.ts +0 -0
  435. /package/dist/{install → kernel/install}/common.js +0 -0
  436. /package/dist/{install → kernel/install}/types.d.ts +0 -0
  437. /package/dist/{core/ontology → kernel/install}/types.js +0 -0
  438. /package/dist/{link → kernel/link}/convention-note.d.ts +0 -0
  439. /package/dist/{link → kernel/link}/global-config.d.ts +0 -0
  440. /package/dist/{link → kernel/link}/global-config.js +0 -0
  441. /package/dist/{link → kernel/link}/link.d.ts +0 -0
  442. /package/dist/{link → kernel/link}/link.js +0 -0
  443. /package/dist/{core → kernel}/ontology/loader.d.ts +0 -0
  444. /package/dist/{core → kernel}/ontology/loader.js +0 -0
  445. /package/dist/{core → kernel}/ontology/resolver.d.ts +0 -0
  446. /package/dist/{core → kernel}/ontology/resolver.js +0 -0
  447. /package/dist/{core → kernel}/ontology/types.d.ts +0 -0
  448. /package/dist/{install → kernel/ontology}/types.js +0 -0
  449. /package/dist/{retrieve → kernel/search}/morning-test-fixtures.d.ts +0 -0
  450. /package/dist/{retrieve → kernel/search}/morning-test-fixtures.js +0 -0
  451. /package/dist/{retrieve → kernel/search}/morning.js +0 -0
  452. /package/dist/{retrieve → kernel/search}/semantic-contract.d.ts +0 -0
  453. /package/dist/{retrieve → kernel/search}/semantic-contract.js +0 -0
  454. /package/dist/{mcp → kernel/semantic}/semantic-retrieve.d.ts +0 -0
  455. /package/dist/{mcp → kernel/semantic}/semantic-schemas.d.ts +0 -0
  456. /package/dist/{mcp → kernel/semantic}/semantic-schemas.js +0 -0
  457. /package/dist/{mcp → kernel/semantic}/semantic-tool-schemas.d.ts +0 -0
  458. /package/dist/{update → kernel/update}/update.d.ts +0 -0
  459. /package/dist/{update → kernel/update}/update.js +0 -0
  460. /package/dist/{hook → vendors/claude/hook}/post-tool-use.d.ts +0 -0
  461. /package/dist/{hook → vendors/claude/hook}/pre-tool-use.d.ts +0 -0
  462. /package/dist/{hook → vendors/claude/hook}/pre-tool-use.js +0 -0
  463. /package/dist/{hook → vendors/claude/hook}/stdin.d.ts +0 -0
  464. /package/dist/{hook → vendors/claude/hook}/stdin.js +0 -0
@@ -1,19 +0,0 @@
1
- ---
2
- name: install
3
- description: Install Oh My Second Brain Codex/Hermes/Claude host adapters and MCP registration.
4
- ---
5
-
6
- # oms-install
7
-
8
- Use for host lifecycle installation.
9
-
10
- ```bash
11
- oms install --runtime <auto|all|claude|codex|hermes> --vault <vault> --yes
12
- ```
13
-
14
- For Codex, this installs:
15
-
16
- - `~/.codex/rules/oms.md`
17
- - `~/.codex/skills/oms-*`
18
- - `~/.codex/plugins/oms`
19
- - managed `[mcp_servers.oms]` in `~/.codex/config.toml`
@@ -1,18 +0,0 @@
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.
@@ -1,32 +0,0 @@
1
- ---
2
- name: retrieve
3
- description: Retrieve vault knowledge axis-first using folders, frontmatter, wikilinks, and declared lenses.
4
- ---
5
-
6
- # oms-retrieve
7
-
8
- Use `oms_retrieve_context` first for natural-language retrieval. It combines live
9
- frontmatter/folder/wikilink graph context with optional OMS native semantic
10
- lexical/SQLite-vector/HYDE candidates and does not require a warm graph cache. Pass declared
11
- concept/folder/property/value/wikilink axes when the user's intent gives them.
12
-
13
- Use `semanticScope: "global"` for broad vault-wide semantic search. Use
14
- `semanticScope: "graph"` (**gph mode**) when semantic candidates must stay inside
15
- the selected OMS graph candidates.
16
-
17
- Pass typed sub-queries via `semanticSearches` to combine search strategies in one call:
18
- `type: "lex"` for BM25 keyword search, `type: "vec"` for SQLite-vector semantic
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.
24
- Use read-only `oms_get_document` or `oms_multi_get_documents` to rehydrate selected
25
- docids, paths, globs, or line ranges. Use `oms_semantic_query`,
26
- `oms_semantic_status`, `oms_semantic_collections`, or `oms_semantic_contexts` for
27
- qmd-compatible follow-ups on the native OMS index.
28
-
29
- Use `oms_retrieve_by_axis` only for legacy axis-first cache retrieval. Use
30
- `oms_lazy_load_note` only after selecting candidate notes.
31
-
32
- Return lens-shaped fields where possible; do not dump full note bodies unless the user asks or the retrieval task needs body evidence.
@@ -1,37 +0,0 @@
1
- ---
2
- name: setup
3
- description: Adopt an Obsidian markdown vault into the Oh My Second Brain convention and optionally install host MCP integration.
4
- ---
5
-
6
- # oms-setup
7
-
8
- Use when the user wants to initialize Oh My Second Brain for a vault.
9
-
10
- Run:
11
-
12
- ```bash
13
- oms setup --vault <vault>
14
- ```
15
-
16
- For a non-interactive first pass:
17
-
18
- ```bash
19
- oms setup --vault <vault> --yes
20
- ```
21
-
22
- To interview each folder axis and merge observed note frontmatter into concept schemas:
23
-
24
- ```bash
25
- oms setup --vault <vault> --suggest-fields
26
- ```
27
-
28
- Then, when host registration is desired:
29
-
30
- ```bash
31
- oms install --runtime hermes --vault <vault> --yes
32
- ```
33
-
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,20 +0,0 @@
1
- ---
2
- name: uninstall
3
- description: Remove Oh My Second Brain host adapter files and MCP registration without deleting vault notes or vault ontology.
4
- ---
5
-
6
- # oms-uninstall
7
-
8
- Preview first:
9
-
10
- ```bash
11
- oms uninstall --runtime all --dry-run
12
- ```
13
-
14
- Remove host registrations:
15
-
16
- ```bash
17
- oms uninstall --runtime all --yes
18
- ```
19
-
20
- Never delete vault notes or `vault/.oms/` as part of host uninstall.
@@ -1,22 +0,0 @@
1
- ---
2
- name: update
3
- description: Update Oh My Second Brain and refresh installed host adapter registrations.
4
- ---
5
-
6
- # oms-update
7
-
8
- Use when the user wants to update Oh My Second Brain after it has already been installed.
9
-
10
- Preview first:
11
-
12
- ```bash
13
- oms update --dry-run --runtime all --vault <vault>
14
- ```
15
-
16
- Perform the update:
17
-
18
- ```bash
19
- oms update --yes --runtime all --vault <vault>
20
- ```
21
-
22
- `oms update` checks npm for the latest `oh-my-second-brain` release, installs `oh-my-second-brain@latest` only when `--yes` is present, then reconciles host adapter/MCP registrations through the same install path. Without `--yes`, it prints the planned commands and does not mutate package or host config.
@@ -1,14 +0,0 @@
1
- ---
2
- name: wiki
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
- ---
5
-
6
- # oms-wiki
7
-
8
- Thin pointer to `core/skills/wiki`. Requires `OMS_VAULT`.
9
-
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
-
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/`.
@@ -1,10 +0,0 @@
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`.
@@ -1,44 +0,0 @@
1
- ---
2
- name: librarian
3
- description: Places incoming knowledge correctly in the vault, filling frontmatter per the declared concept.
4
- ---
5
-
6
- # Agent Persona: Librarian
7
-
8
- The librarian places knowledge into the vault with precision.
9
- Every note lands in the right folder, carries the right frontmatter, and respects the declared convention.
10
-
11
- ## Governing principle
12
-
13
- > "A note without declared intent is noise. A note with correct frontmatter is a first-class citizen."
14
-
15
- The librarian never improvises a folder or invents a field.
16
- It reads the convention first, then acts.
17
-
18
- ## Responsibilities
19
-
20
- 1. **Concept identification** — match incoming knowledge to a declared concept (`literature`, `inbox`, etc.) by comparing content and purpose against each concept's `intent`.
21
- 2. **Folder resolution** — look up the correct target folder from `vault/.oms/taxonomy.yaml` based on the matched concept.
22
- 3. **Frontmatter construction** — fill every `required: true` field; fill known optional fields; leave undeclared fields untouched.
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. **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.
26
-
27
- ## Decision rules
28
-
29
- | Situation | Action |
30
- |-----------|--------|
31
- | Concept is ambiguous | Default to `inbox` and note ambiguity in a `status: needs-review` field |
32
- | Required field value is unknown | Use a sentinel `"UNKNOWN"` string and flag it; never omit the key |
33
- | Folder does not exist in taxonomy | Capture to `inbox/`; surface the missing taxonomy entry to the user |
34
- | User provides extra context fields | Preserve them (`additionalProperties: preserve`) |
35
-
36
- ## Interaction style
37
-
38
- - Ask only for information that is truly missing for required fields.
39
- - Propose the target folder and concept before writing — let the user confirm once.
40
- - After writing, show the frontmatter block so the user can see what was committed.
41
-
42
- ## Skill
43
-
44
- Invoke via the `write` skill: `core/skills/write/SKILL.md`.
@@ -1,62 +0,0 @@
1
- ---
2
- name: retriever
3
- description: Surfaces the right knowledge fields from the vault for a declared retrieval purpose using lenses.
4
- ---
5
-
6
- # Agent Persona: Retriever
7
-
8
- The retriever surfaces knowledge through the vault's declared lenses (인출).
9
- It never dumps raw notes — it filters to the fields that matter for the stated purpose.
10
-
11
- ## Governing principle
12
-
13
- > "Retrieval is not search. It is projection: show exactly the fields this purpose requires, nothing more."
14
-
15
- The retriever reads lens declarations first, then scans notes,
16
- then returns only the lens-selected fields.
17
-
18
- ## Responsibilities
19
-
20
- 1. **Purpose identification** — clarify the user's retrieval goal (synthesize, audit, plan, review, etc.).
21
- 2. **Lens matching** — find the declared lens on the relevant concept whose `intent` best matches the purpose.
22
- 3. **Field projection** — for each matching note, return only the fields listed in the lens; discard the rest.
23
- 4. **Grouping** — present results grouped by concept/folder for orientation.
24
- 5. **Citation** — always include `source-url` (or equivalent) when the concept carries it, even if the lens does not explicitly list it.
25
-
26
- ## Lens resolution algorithm
27
-
28
- ```
29
- 1. Parse user purpose → keyword(s)
30
- 2. For each concept in vault/.oms/concepts/*.yaml:
31
- for each lens in concept.lenses:
32
- score = semantic_overlap(purpose, lens.intent)
33
- 3. Select lens with highest score
34
- 4. Collect all notes in concept's folder
35
- 5. Project each note's frontmatter to lens.fields
36
- 6. Return projected results
37
- ```
38
-
39
- In v0, step 2 is agent judgment (no runtime engine). The retriever reads the YAML manually.
40
-
41
- ## Output format
42
-
43
- ```markdown
44
- ## [Concept: literature] — Lens: synthesis
45
-
46
- | title | thesis | source-url |
47
- |-------|--------|------------|
48
- | Attention Is All You Need | Self-attention replaces recurrence | https://arxiv.org/abs/1706.03762 |
49
- ```
50
-
51
- ## Decision rules
52
-
53
- | Situation | Action |
54
- |-----------|--------|
55
- | No matching lens | Fall back to all `required: true` fields |
56
- | Note missing a lens field | Show `—` for that cell; do not skip the note |
57
- | Multiple concepts match purpose | Return results from all matching concepts, grouped |
58
- | No notes in concept folder | Report "0 notes found under `<folder>/`" |
59
-
60
- ## Skill
61
-
62
- Invoke via the `retrieve` skill: `core/skills/retrieve/SKILL.md`.
@@ -1,24 +0,0 @@
1
- # compile — CHANGELOG
2
-
3
- ## 0.1.0 — 2026-06-13
4
-
5
- Initial release (M2 compile engine).
6
-
7
- ### Attribution
8
-
9
- - **SHA-incremental pattern (Steps 2-4)**: bstack `terminology` skill — self-authored, no external restriction.
10
- - **2-step Chain-of-Thought (analysis → synthesis)**: nashsu/llm_wiki — GPL-3.0, IDEA-ONLY. No verbatim code. Algorithm description absorbed and reimplemented from scratch. See `src/engine/compile/ACKNOWLEDGMENTS.partial.md`.
11
- - **2-phase separation (extract-without-writing → generate)**: atomicstrata — license TBD, CONCEPT-ONLY. No verbatim code.
12
- - **Cascade return (write → affected_backlinks)**: lucasastorian/llmwiki — terminology absorbed, concept-only.
13
- - **Provenance grading**: self-authored (bstack second-brain design).
14
-
15
- ### Files
16
-
17
- - `src/engine/compile/types.ts` — local compile types
18
- - `src/engine/compile/sha-cache.ts` — SHA-256 fingerprint + disk cache
19
- - `src/engine/compile/provenance.ts` — grade resolution + synthesis weighting
20
- - `src/engine/compile/cot.ts` — nashsu 2-step CoT (GPL idea-only reimplementation)
21
- - `src/engine/compile/phases.ts` — atomicstrata 2-phase separation (concept-only)
22
- - `src/engine/compile/cascade.ts` — lucasastorian cascade backlink return
23
- - `src/engine/compile/worker.ts` — stateless compile worker (entry point)
24
- - `src/engine/compile/*.test.ts` — co-located vitest suites
@@ -1,57 +0,0 @@
1
- ---
2
- name: compile
3
- version: 0.1.0
4
- description: Agent-guided concept compile — synthesize a concept wiki page from source materials with incremental skip, two-phase write separation, cascade backlinks, and provenance-weighted context.
5
- trigger: /compile
6
- tags: [compile, wiki, synthesis, sha, incremental, second-brain, oms]
7
- ---
8
-
9
- ## compile
10
-
11
- Synthesize a concept page from source materials. There is no `oms compile` CLI
12
- and no TypeScript compile worker — follow this recipe as the agent.
13
-
14
- ### When to use
15
-
16
- Use `compile` when you need to synthesize a concept wiki page from one or more
17
- source materials. Skip rewrite when the material fingerprint is unchanged.
18
-
19
- ### Inputs
20
-
21
- - `concept` — human-readable concept name (used in prompts)
22
- - `materials` — list of `{ path, text, grade }` items (grade from folder→grade map)
23
- - backlinks — wiki pages that already link to this concept (empty if unknown)
24
- - `conceptId` — stable cache key (vault-relative path recommended)
25
-
26
- Gather materials with MCP `oms_retrieve_context` or `oms_get_document`.
27
-
28
- ### Output
29
-
30
- - `body` — synthesized Markdown with `[[wikilinks]]` (empty when skipped)
31
- - `sha` — SHA-256 fingerprint of the input materials
32
- - `provenance` — grades of contributing materials
33
- - `affected_backlinks` — vault paths of wiki pages that link to this concept
34
-
35
- ### Recipe
36
-
37
- 1. **Phase A** — load and grade all source materials (pure read, no vault mutation).
38
- 2. Fingerprint the materials. If `{dotLlmwiki}/sha-cache.json` already has the
39
- same SHA for `conceptId`, skip the rest.
40
- 3. **Phase B** — write the synthesized body to the `processed/` tier only.
41
- 4. Pass `affected_backlinks` to the wiki skill so those pages can be marked stale.
42
-
43
- ### Phase constraints
44
-
45
- - Phase A and Phase B never overlap in one execution context.
46
- - Phase B writes to `processed/` ONLY — never to `wiki/` directly.
47
- - Promotion from `processed/` to `wiki/` is the wiki skill's responsibility.
48
-
49
- ### Provenance weighting
50
-
51
- Materials are sorted authored > curated > external-raw in synthesis context.
52
- Authored materials are labelled `[AUTHORED — preserve individual voice]` in the prompt.
53
-
54
- ### SHA cache
55
-
56
- Cache location: `{dotLlmwiki}/sha-cache.json` (never synced, never committed).
57
- Delete `sha-cache.json` to force full recompile of all concepts.
@@ -1,59 +0,0 @@
1
- ---
2
- name: define
3
- description: Grow the vault convention by adding or editing a metadata field on a concept.
4
- ---
5
-
6
- # Skill: define
7
-
8
- Extend your Oh My Second Brain convention field-by-field.
9
- Each frontmatter key is a **unit of convention**: it carries a declared `intent`,
10
- type, and optional rules (`required`, `normalize`, `immutable`).
11
-
12
- ## Entry point
13
-
14
- ```bash
15
- oms define
16
- ```
17
-
18
- This is the intended user-facing command (roadmap: interactive runtime not built yet).
19
- In v0, `setup` and `doctor` are the REAL CLI commands today.
20
- Use `define` as **agent-guided convention editing** until the interactive runtime ships.
21
-
22
- ## What this skill does (agent-guided, v0)
23
-
24
- 1. Ask the user: which **concept** are they extending? (e.g. `literature`, `inbox`)
25
- 2. Ask: what is the new **field name**? (snake-case, e.g. `thesis`)
26
- 3. Ask: what is this field's **intent** — why does this knowledge live here?
27
- 4. Ask: **type** (`string` | `string[]` | `date` | `url` | `boolean`), **required** (yes/no).
28
- 5. Optionally ask: `normalize` (e.g. `lowercase`), `immutable` (lock after creation).
29
- 6. Open `vault/.oms/concepts/<concept>.yaml` and append the new field entry.
30
- 7. Run `oms doctor` to validate existing notes against the updated schema (exits 0).
31
-
32
- ## Convention YAML shape (one field entry)
33
-
34
- ```yaml
35
- fields:
36
- - name: thesis
37
- type: string
38
- required: false
39
- intent: "The central claim this source makes"
40
- ```
41
-
42
- ## Growing lenses
43
-
44
- After adding a field, consider whether it belongs in an existing lens (`synthesis`, `audit`)
45
- or warrants a new lens. Edit the `lenses:` block in the same concept YAML.
46
-
47
- ## Where the convention lives
48
-
49
- All convention data is **user-owned** at `vault/.oms/`:
50
- ```
51
- vault/.oms/
52
- concepts/
53
- literature.yaml
54
- inbox.yaml
55
- taxonomy.yaml
56
- ```
57
-
58
- Oh My Second Brain ships defaults (from `core/ontology/`); `oms setup` copies them into the vault.
59
- The user then edits them at will — Oh My Second Brain only enforces, never overwrites.
@@ -1,39 +0,0 @@
1
- # Distill Skill — Changelog & Attribution
2
-
3
- ## [0.1.0] — 2026-06-13
4
-
5
- ### Added
6
- - `src/engine/distill/types.ts` — local distill types (CleanRoomSpec, DistillTarget,
7
- AnalyzerResult, DistillPattern, DistillRisk, DistillAttribution). Isolated from
8
- shared `src/engine/types.ts` per parallel-build safety rule.
9
- - `src/engine/distill/clean-room.ts` — pure function `prepareCleanRoom()` returning
10
- a CleanRoomSpec; `snapshotSha()` and `detectMutation()` for mutation-detection.
11
- - `src/engine/distill/analyzer.ts` — `AnalyzerProvider` seam (mirrors M1
12
- EmbeddingProvider injection pattern); `createStubAnalyzerProvider()` deterministic
13
- stub; `runAnalysis()` orchestration with schema validation.
14
- - `src/engine/distill/report.ts` — `generateReport()` producing exactly 3 sections:
15
- §1 Patterns (ranked by absorb_confidence), §2 Risks, §3 Attribution.
16
- - Co-located tests: `clean-room.test.ts`, `analyzer.test.ts`, `report.test.ts`,
17
- `smoke.test.ts` — 85 tests, all green.
18
- - `core/skills/distill/SKILL.md` — /skillify structure, 5-key frontmatter.
19
- - `src/engine/distill/ACKNOWLEDGMENTS.partial.md` — partial attribution fragment.
20
-
21
- ### Absorbed patterns (recorded for ACKNOWLEDGMENTS.md)
22
-
23
- | Pattern | Source | License | Notes |
24
- |---------|--------|---------|-------|
25
- | Provider injection seam (AnalyzerProvider mirrors EmbeddingProvider) | M1 embed module — self-authored (oh-my-secondbrain) | — | Internal ref; no external restriction |
26
- | Clean-room as pure data structure (spec-only, caller spawns) | Plan design — self-authored | — | R6 isolation principle |
27
- | SHA-256 mutation detector | Node.js crypto — standard library | Node.js | Standard API; no absorption needed |
28
- | Known-pattern signatures in stub | docs/research/embedding-pipeline-patterns-mining.md | — | Self-authored absorption ledger |
29
- | Known-pattern signatures in stub | docs/research/graphify-graph-implementation-mining.md | — | Self-authored absorption ledger |
30
-
31
- ### Design rationale
32
- - **Standalone** (R16): distill is not a router leaf. It does not import from
33
- `src/engine/compile/` or `src/engine/wiki/`. It works on any target.
34
- - **Vault-agnostic**: OMS_VAULT env not required. No hardcoded paths.
35
- - **Stateless** (R2): no daemon, no watcher, no persistent process.
36
- - **Provider injection**: mirrors M1 EmbeddingProvider pattern so real LLM
37
- clients can be injected in production without changing the orchestration layer.
38
- - **Mutation detector**: verifies R2/R6 — main system state must be unchanged
39
- before and after every distill run.
@@ -1,62 +0,0 @@
1
- ---
2
- name: distill
3
- version: 0.1.0
4
- description: >
5
- Standalone meta-absorption skill. Analyzes any target (repo, document, skill,
6
- concept) in a clean-room context and produces a structured absorption report
7
- with patterns, risks, and attribution. Vault-agnostic — OMS_VAULT not required.
8
- trigger: /distill
9
- tags:
10
- - absorption
11
- - red-team
12
- - clean-room
13
- - analysis
14
- - standalone
15
- ---
16
-
17
- # Distill
18
-
19
- Run adversarial absorption analysis on a target and produce a structured report.
20
- There is no TypeScript distill engine — follow this recipe as the agent.
21
-
22
- ## Usage
23
-
24
- ```
25
- /distill <target-path-or-text>
26
- ```
27
-
28
- ## Steps
29
-
30
- 1. Load the target as inert read-only text. The target is NEVER executed — it
31
- is treated as data only.
32
- 2. Snapshot a content hash of the working tree (or target file) before analysis.
33
- 3. Run red-team adversarial analysis. Use a real model for production; keep
34
- the pass read-only.
35
- 4. Generate the absorption report. The report has exactly 3 sections:
36
- §1 Patterns, §2 Risks, §3 Attribution.
37
- 5. Verify the hash after analysis equals the hash before. Stop if anything
38
- was mutated — distill must be fully stateless.
39
- 6. Return the report string. Write it only if the caller explicitly requests it.
40
- No vault write, no code mutation happens inside distill.
41
-
42
- ## Target types
43
-
44
- - **Repo mining doc** — load `docs/research/*-mining.md` as inert text.
45
- - **Flat document** — any markdown, text, or code file loaded as a string.
46
- - **Live repo** — read files from disk as text; do not execute them.
47
-
48
- ## Output
49
-
50
- The report is the only output. It contains:
51
-
52
- - **§1 Patterns** — ranked by absorb_confidence (highest first), with file:line citations.
53
- - **§2 Risks** — ranked by severity (critical → high → medium → low).
54
- - **§3 Attribution** — repo, URL, and license note for `ACKNOWLEDGMENTS.md`.
55
-
56
- ## Constraints
57
-
58
- - Standalone: does not depend on compile or wiki.
59
- - Vault-agnostic: `OMS_VAULT` environment variable is NOT required.
60
- - Stateless: no daemon, no watcher, no `setInterval`.
61
- - Clean-room: target content is inert text — never executed.
62
- - No vault write occurs inside distill — the caller decides what to do with the report.
@@ -1,49 +0,0 @@
1
- ---
2
- name: doctor
3
- description: Validate vault notes against the Oh My Second Brain convention and report violations (REAL today).
4
- ---
5
-
6
- # Skill: doctor
7
-
8
- Check every note in your vault against its declared concept schema.
9
- This skill is **REAL in v0** — the CLI command is fully implemented.
10
-
11
- ## Shell-out
12
-
13
- ```bash
14
- oms doctor [--vault <path>]
15
- ```
16
-
17
- - `--vault <path>` — path to your Obsidian vault root (default: current directory).
18
- - Always **exits 0** in v0 (non-blocking; `onViolation: warn`).
19
-
20
- ## What the command does
21
-
22
- 1. Loads `vault/.oms/` and `vault/.oms/taxonomy.yaml`.
23
- 2. Walks every `.md` note in the vault.
24
- 3. For each note, resolves its **concept** from the taxonomy folder binding.
25
- 4. Calls `validateFrontmatter(frontmatter, concept)` and collects `Violation[]`.
26
- 5. Prints a per-note summary of violations (field, rule, message).
27
- 6. Prints total counts: notes checked, violations found.
28
- 7. Exits 0 regardless of violation count (v0 is advisory only).
29
-
30
- ## Violation rules
31
-
32
- | Rule | Description |
33
- |------|-------------|
34
- | `required` | A field declared `required: true` is missing from the note's frontmatter |
35
- | `type` | The field value does not match the declared type |
36
- | `immutable` | Field changed after initial set — **suppressed in v0** (no baseline available) |
37
-
38
- Undeclared frontmatter fields are **never** reported as violations
39
- (`additionalProperties: preserve`).
40
-
41
- ## Recommended usage
42
-
43
- Run `oms doctor` after:
44
- - Any `oms setup` run
45
- - Adding a new field via `oms define`
46
- - Bulk-editing notes
47
-
48
- Integrate into CI by adding `npx oms doctor --vault ./vault` to your workflow.
49
- It will never fail the build in v0.