oh-my-second-brain 0.1.8 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +89 -0
- package/README.ko.md +127 -0
- package/README.md +128 -0
- package/adapters/README.md +8 -8
- package/adapters/claude-code/.claude-plugin/plugin.json +3 -2
- package/adapters/claude-code/.mcp.json +8 -0
- package/adapters/claude-code/CLAUDE.md +5 -6
- package/adapters/claude-code/skills/compile/SKILL.md +10 -35
- package/adapters/claude-code/skills/distill/SKILL.md +6 -26
- package/adapters/claude-code/skills/link/SKILL.md +87 -0
- package/adapters/claude-code/skills/retrieve/SKILL.md +4 -7
- package/adapters/claude-code/skills/setup/SKILL.md +5 -6
- package/adapters/claude-code/skills/uninstall/SKILL.md +1 -1
- package/adapters/claude-code/skills/wiki/SKILL.md +49 -24
- package/adapters/claude-code/skills/write/SKILL.md +16 -0
- package/adapters/codex/.codex-plugin/plugin.json +1 -1
- package/adapters/codex/AGENTS.md +2 -2
- package/adapters/codex/rules/oms.md +1 -1
- package/adapters/codex/skills/oms-compile/SKILL.md +7 -9
- package/adapters/codex/skills/oms-distill/SKILL.md +4 -9
- package/adapters/codex/skills/oms-link/SKILL.md +35 -0
- package/adapters/codex/skills/oms-retrieve/SKILL.md +5 -6
- package/adapters/codex/skills/oms-wiki/SKILL.md +28 -8
- package/adapters/codex/skills/oms-write/SKILL.md +10 -0
- package/adapters/hermes/README.md +3 -1
- package/adapters/hermes/SOUL.md +2 -3
- package/adapters/hermes/manifest.json +1 -1
- package/adapters/hermes/skills/compile/SKILL.md +5 -7
- package/adapters/hermes/skills/distill/SKILL.md +1 -3
- package/adapters/hermes/skills/link/SKILL.md +18 -0
- package/adapters/hermes/skills/retrieve/SKILL.md +5 -6
- package/adapters/hermes/skills/setup/SKILL.md +5 -2
- package/adapters/hermes/skills/wiki/SKILL.md +4 -2
- package/adapters/hermes/skills/write/SKILL.md +10 -0
- package/core/AGENTS.md +4 -2
- package/core/agents/librarian.md +3 -2
- package/core/ontology/concepts/term.yaml +12 -0
- package/core/ontology/taxonomy.yaml +3 -0
- package/core/skills/compile/SKILL.md +19 -18
- package/core/skills/distill/SKILL.md +13 -24
- package/core/skills/link/SKILL.md +130 -0
- package/core/skills/retrieve/SKILL.md +0 -1
- package/core/skills/setup/SKILL.md +12 -14
- package/core/skills/vault-lint/SKILL.md +1 -1
- package/core/skills/wiki/SKILL.md +109 -30
- package/core/skills/write/SKILL.md +15 -0
- package/dist/capture/safe.d.ts +61 -1
- package/dist/capture/safe.js +489 -66
- package/dist/capture/safe.js.map +1 -1
- package/dist/cli/args.d.ts +29 -0
- package/dist/cli/args.js +156 -0
- package/dist/cli/args.js.map +1 -0
- package/dist/cli/audit.d.ts +6 -0
- package/dist/cli/audit.js +93 -0
- package/dist/cli/audit.js.map +1 -0
- package/dist/cli/claude-install-plan.d.ts +10 -0
- package/dist/cli/claude-install-plan.js +26 -0
- package/dist/cli/claude-install-plan.js.map +1 -0
- package/dist/cli/doctor-lint.d.ts +11 -0
- package/dist/cli/doctor-lint.js +86 -0
- package/dist/cli/doctor-lint.js.map +1 -0
- package/dist/cli/global-writeback.d.ts +31 -0
- package/dist/cli/global-writeback.js +73 -0
- package/dist/cli/global-writeback.js.map +1 -0
- package/dist/cli/host-commands.d.ts +30 -0
- package/dist/cli/host-commands.js +89 -0
- package/dist/cli/host-commands.js.map +1 -0
- package/dist/cli/link-command.d.ts +9 -0
- package/dist/cli/link-command.js +47 -0
- package/dist/cli/link-command.js.map +1 -0
- package/dist/cli/linkify.d.ts +23 -0
- package/dist/cli/linkify.js +118 -0
- package/dist/cli/linkify.js.map +1 -0
- package/dist/cli/oms.d.ts +8 -32
- package/dist/cli/oms.js +100 -703
- package/dist/cli/oms.js.map +1 -1
- package/dist/cli/semantic-args.d.ts +1 -2
- package/dist/cli/semantic-args.js +4 -7
- package/dist/cli/semantic-args.js.map +1 -1
- package/dist/cli/semantic-http.d.ts +0 -3
- package/dist/cli/semantic-http.js +40 -45
- package/dist/cli/semantic-http.js.map +1 -1
- package/dist/cli/semantic-usage.js +10 -9
- package/dist/cli/semantic-usage.js.map +1 -1
- package/dist/cli/semantic.js +99 -137
- package/dist/cli/semantic.js.map +1 -1
- package/dist/cli/setup-command.d.ts +11 -0
- package/dist/cli/setup-command.js +196 -0
- package/dist/cli/setup-command.js.map +1 -0
- package/dist/cli/setup-documents.d.ts +15 -0
- package/dist/cli/setup-documents.js +149 -0
- package/dist/cli/setup-documents.js.map +1 -0
- package/dist/cli/update-notice.d.ts +10 -0
- package/dist/cli/update-notice.js +42 -0
- package/dist/cli/update-notice.js.map +1 -0
- package/dist/cli/usage.d.ts +4 -0
- package/dist/cli/usage.js +102 -0
- package/dist/cli/usage.js.map +1 -0
- package/dist/conventions/lint.js +12 -33
- package/dist/conventions/lint.js.map +1 -1
- package/dist/conventions/report.d.ts +62 -0
- package/dist/conventions/report.js +217 -0
- package/dist/conventions/report.js.map +1 -0
- package/dist/conventions/validate.d.ts +1 -1
- package/dist/conventions/vault-walk.d.ts +38 -0
- package/dist/conventions/vault-walk.js +80 -0
- package/dist/conventions/vault-walk.js.map +1 -0
- package/dist/conventions/write-contract.d.ts +27 -0
- package/dist/conventions/write-contract.js +91 -0
- package/dist/conventions/write-contract.js.map +1 -0
- package/dist/conventions/write-protocol.d.ts +39 -0
- package/dist/conventions/write-protocol.js +44 -0
- package/dist/conventions/write-protocol.js.map +1 -0
- package/dist/core/ontology/loader.d.ts +2 -0
- package/dist/{ontology → core/ontology}/loader.js +11 -20
- package/dist/core/ontology/loader.js.map +1 -0
- package/dist/core/ontology/resolver.d.ts +2 -0
- package/dist/{ontology → core/ontology}/resolver.js +1 -15
- package/dist/core/ontology/resolver.js.map +1 -0
- package/dist/core/ontology/types.d.ts +47 -0
- package/dist/core/ontology/types.js +2 -0
- package/dist/core/ontology/types.js.map +1 -0
- package/dist/core/runtime/assets.d.ts +20 -0
- package/dist/core/runtime/assets.js +66 -0
- package/dist/core/runtime/assets.js.map +1 -0
- package/dist/engine/assemble.d.ts +28 -72
- package/dist/engine/assemble.js +77 -61
- package/dist/engine/assemble.js.map +1 -1
- package/dist/engine/conventions/vault-lint.d.ts +30 -2
- package/dist/engine/conventions/vault-lint.js +93 -97
- package/dist/engine/conventions/vault-lint.js.map +1 -1
- package/dist/engine/embed/deferred.d.ts +3 -4
- package/dist/engine/embed/deferred.js +10 -7
- package/dist/engine/embed/deferred.js.map +1 -1
- package/dist/engine/embed/identity.d.ts +11 -0
- package/dist/engine/embed/identity.js +15 -0
- package/dist/engine/embed/identity.js.map +1 -0
- package/dist/engine/embed/provider.d.ts +12 -13
- package/dist/engine/embed/provider.js +30 -27
- package/dist/engine/embed/provider.js.map +1 -1
- package/dist/engine/embed/store.d.ts +48 -27
- package/dist/engine/embed/store.js +281 -98
- package/dist/engine/embed/store.js.map +1 -1
- package/dist/engine/embed/sync.d.ts +17 -47
- package/dist/engine/embed/sync.js +233 -69
- package/dist/engine/embed/sync.js.map +1 -1
- package/dist/engine/graph/builder.d.ts +1 -1
- package/dist/engine/graph/builder.js +1 -1
- package/dist/engine/graph/explore.d.ts +2 -2
- package/dist/engine/graph/explore.js +0 -0
- package/dist/engine/graph/resolver.d.ts +17 -0
- package/dist/engine/graph/resolver.js +46 -11
- package/dist/engine/graph/resolver.js.map +1 -1
- package/dist/engine/linkify/apply.d.ts +56 -0
- package/dist/engine/linkify/apply.js +65 -0
- package/dist/engine/linkify/apply.js.map +1 -0
- package/dist/engine/linkify/josa.d.ts +58 -0
- package/dist/engine/linkify/josa.js +133 -0
- package/dist/engine/linkify/josa.js.map +1 -0
- package/dist/engine/linkify/mask.d.ts +29 -0
- package/dist/engine/linkify/mask.js +173 -0
- package/dist/engine/linkify/mask.js.map +1 -0
- package/dist/engine/linkify/suggest.d.ts +52 -0
- package/dist/engine/linkify/suggest.js +181 -0
- package/dist/engine/linkify/suggest.js.map +1 -0
- package/dist/engine/linkify/types.d.ts +68 -0
- package/dist/engine/linkify/types.js +12 -0
- package/dist/engine/linkify/types.js.map +1 -0
- package/dist/engine/mcp/facade.d.ts +12 -18
- package/dist/engine/mcp/facade.js +30 -80
- package/dist/engine/mcp/facade.js.map +1 -1
- package/dist/engine/mcp/op-mappers.d.ts +3 -9
- package/dist/engine/mcp/op-mappers.js +2 -30
- package/dist/engine/mcp/op-mappers.js.map +1 -1
- package/dist/engine/mcp/types.d.ts +5 -29
- package/dist/engine/tracer.js +6 -2
- package/dist/engine/tracer.js.map +1 -1
- package/dist/engine/types.d.ts +8 -3
- package/dist/graph/cache.d.ts +1 -11
- package/dist/graph/cache.js +1 -44
- package/dist/graph/cache.js.map +1 -1
- package/dist/graph/explore.js +88 -137
- package/dist/graph/explore.js.map +1 -1
- package/dist/harness/surface-registry.d.ts +56 -0
- package/dist/harness/surface-registry.js +397 -0
- package/dist/harness/surface-registry.js.map +1 -0
- package/dist/harness/validation.d.ts +9 -0
- package/dist/harness/validation.js +201 -0
- package/dist/harness/validation.js.map +1 -0
- package/dist/hook/post-tool-use.js +2 -2
- package/dist/hook/post-tool-use.js.map +1 -1
- package/dist/index.d.ts +7 -5
- package/dist/index.js +7 -5
- package/dist/index.js.map +1 -1
- package/dist/install/adapter-source.d.ts +14 -0
- package/dist/install/adapter-source.js +45 -0
- package/dist/install/adapter-source.js.map +1 -0
- package/dist/install/claude-hooks.d.ts +13 -0
- package/dist/install/claude-hooks.js +411 -0
- package/dist/install/claude-hooks.js.map +1 -0
- package/dist/install/claude-marketplace.d.ts +44 -0
- package/dist/install/claude-marketplace.js +89 -0
- package/dist/install/claude-marketplace.js.map +1 -0
- package/dist/install/claude.d.ts +4 -0
- package/dist/install/claude.js +216 -0
- package/dist/install/claude.js.map +1 -0
- package/dist/install/codex.d.ts +24 -0
- package/dist/install/codex.js +193 -0
- package/dist/install/codex.js.map +1 -0
- package/dist/install/common.d.ts +34 -0
- package/dist/install/common.js +122 -0
- package/dist/install/common.js.map +1 -0
- package/dist/install/hermes.d.ts +4 -0
- package/dist/install/hermes.js +78 -0
- package/dist/install/hermes.js.map +1 -0
- package/dist/install/hosts.d.ts +6 -56
- package/dist/install/hosts.js +65 -610
- package/dist/install/hosts.js.map +1 -1
- package/dist/install/types.d.ts +34 -0
- package/dist/install/types.js +2 -0
- package/dist/install/types.js.map +1 -0
- package/dist/link/convention-note.d.ts +10 -0
- package/dist/link/convention-note.js +59 -0
- package/dist/link/convention-note.js.map +1 -0
- package/dist/link/global-config.d.ts +22 -0
- package/dist/link/global-config.js +69 -0
- package/dist/link/global-config.js.map +1 -0
- package/dist/link/link.d.ts +101 -0
- package/dist/link/link.js +265 -0
- package/dist/link/link.js.map +1 -0
- package/dist/mcp/engine-morning-backend.d.ts +12 -17
- package/dist/mcp/engine-morning-backend.js +25 -131
- package/dist/mcp/engine-morning-backend.js.map +1 -1
- package/dist/mcp/link-tools.d.ts +81 -0
- package/dist/mcp/link-tools.js +157 -0
- package/dist/mcp/link-tools.js.map +1 -0
- package/dist/mcp/semantic-engine.d.ts +32 -0
- package/dist/mcp/semantic-engine.js +52 -0
- package/dist/mcp/semantic-engine.js.map +1 -0
- package/dist/mcp/semantic-retrieve-args.d.ts +1 -5
- package/dist/mcp/semantic-retrieve-args.js +1 -26
- package/dist/mcp/semantic-retrieve-args.js.map +1 -1
- package/dist/mcp/semantic-retrieve-schema.d.ts +0 -14
- package/dist/mcp/semantic-retrieve-schema.js +0 -5
- package/dist/mcp/semantic-retrieve-schema.js.map +1 -1
- package/dist/mcp/semantic-retrieve.d.ts +12 -18
- package/dist/mcp/semantic-retrieve.js +40 -71
- package/dist/mcp/semantic-retrieve.js.map +1 -1
- package/dist/mcp/semantic-tool-schemas.js +7 -24
- package/dist/mcp/semantic-tool-schemas.js.map +1 -1
- package/dist/mcp/server.d.ts +7 -0
- package/dist/mcp/server.js +224 -162
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/update-notice.d.ts +51 -0
- package/dist/mcp/update-notice.js +196 -0
- package/dist/mcp/update-notice.js.map +1 -0
- package/dist/ontology/active.d.ts +7 -0
- package/dist/ontology/active.js +41 -0
- package/dist/ontology/active.js.map +1 -0
- package/dist/retrieve/morning.d.ts +10 -18
- package/dist/retrieve/morning.js +2 -26
- package/dist/retrieve/morning.js.map +1 -1
- package/dist/retrieve/semantic-contract.d.ts +10 -0
- package/dist/retrieve/semantic-contract.js +2 -0
- package/dist/retrieve/semantic-contract.js.map +1 -0
- package/dist/setup/axis.d.ts +22 -3
- package/dist/setup/axis.js +82 -35
- package/dist/setup/axis.js.map +1 -1
- package/dist/update/update.d.ts +12 -0
- package/dist/update/update.js +2 -2
- package/dist/update/update.js.map +1 -1
- package/docs/install.md +43 -7
- package/docs/release.md +109 -17
- package/package.json +11 -3
- package/scripts/install.sh +1 -1
- package/adapters/claude-code/skills/capture/SKILL.md +0 -50
- package/adapters/codex/skills/oms-capture/SKILL.md +0 -16
- package/adapters/hermes/skills/capture/SKILL.md +0 -16
- package/core/skills/capture/SKILL.md +0 -50
- package/dist/adapt/HostAdapter.d.ts +0 -21
- package/dist/adapt/HostAdapter.js +0 -10
- package/dist/adapt/HostAdapter.js.map +0 -1
- package/dist/adapt/claudeCode.d.ts +0 -9
- package/dist/adapt/claudeCode.js +0 -15
- package/dist/adapt/claudeCode.js.map +0 -1
- package/dist/adapt/codex.d.ts +0 -9
- package/dist/adapt/codex.js +0 -15
- package/dist/adapt/codex.js.map +0 -1
- package/dist/adapt/hermes.d.ts +0 -9
- package/dist/adapt/hermes.js +0 -15
- package/dist/adapt/hermes.js.map +0 -1
- package/dist/cli/semantic-metadata-commands.d.ts +0 -3
- package/dist/cli/semantic-metadata-commands.js +0 -115
- package/dist/cli/semantic-metadata-commands.js.map +0 -1
- package/dist/engine/compile/cascade.d.ts +0 -35
- package/dist/engine/compile/cascade.js +0 -59
- package/dist/engine/compile/cascade.js.map +0 -1
- package/dist/engine/compile/cot.d.ts +0 -30
- package/dist/engine/compile/cot.js +0 -153
- package/dist/engine/compile/cot.js.map +0 -1
- package/dist/engine/compile/phases.d.ts +0 -47
- package/dist/engine/compile/phases.js +0 -101
- package/dist/engine/compile/phases.js.map +0 -1
- package/dist/engine/compile/provenance.d.ts +0 -45
- package/dist/engine/compile/provenance.js +0 -103
- package/dist/engine/compile/provenance.js.map +0 -1
- package/dist/engine/compile/sha-cache.d.ts +0 -42
- package/dist/engine/compile/sha-cache.js +0 -86
- package/dist/engine/compile/sha-cache.js.map +0 -1
- package/dist/engine/compile/types.d.ts +0 -71
- package/dist/engine/compile/types.js +0 -9
- package/dist/engine/compile/types.js.map +0 -1
- package/dist/engine/compile/worker.d.ts +0 -47
- package/dist/engine/compile/worker.js +0 -75
- package/dist/engine/compile/worker.js.map +0 -1
- package/dist/engine/distill/analyzer.d.ts +0 -51
- package/dist/engine/distill/analyzer.js +0 -279
- package/dist/engine/distill/analyzer.js.map +0 -1
- package/dist/engine/distill/clean-room.d.ts +0 -46
- package/dist/engine/distill/clean-room.js +0 -131
- package/dist/engine/distill/clean-room.js.map +0 -1
- package/dist/engine/distill/report.d.ts +0 -23
- package/dist/engine/distill/report.js +0 -107
- package/dist/engine/distill/report.js.map +0 -1
- package/dist/engine/distill/types.d.ts +0 -89
- package/dist/engine/distill/types.js +0 -9
- package/dist/engine/distill/types.js.map +0 -1
- package/dist/engine/embed/pull.d.ts +0 -51
- package/dist/engine/embed/pull.js +0 -90
- package/dist/engine/embed/pull.js.map +0 -1
- package/dist/engine/graph/community.d.ts +0 -38
- package/dist/engine/graph/community.js +0 -122
- package/dist/engine/graph/community.js.map +0 -1
- package/dist/engine/index.d.ts +0 -5
- package/dist/engine/index.js +0 -2
- package/dist/engine/index.js.map +0 -1
- package/dist/engine/mcp/index.d.ts +0 -15
- package/dist/engine/mcp/index.js +0 -19
- package/dist/engine/mcp/index.js.map +0 -1
- package/dist/engine/mcp/retrieve-mapper.d.ts +0 -38
- package/dist/engine/mcp/retrieve-mapper.js +0 -96
- package/dist/engine/mcp/retrieve-mapper.js.map +0 -1
- package/dist/engine/setup/ambiguity.d.ts +0 -39
- package/dist/engine/setup/ambiguity.js +0 -50
- package/dist/engine/setup/ambiguity.js.map +0 -1
- package/dist/engine/setup/types.d.ts +0 -71
- package/dist/engine/setup/types.js +0 -22
- package/dist/engine/setup/types.js.map +0 -1
- package/dist/engine/setup/writer.d.ts +0 -32
- package/dist/engine/setup/writer.js +0 -77
- package/dist/engine/setup/writer.js.map +0 -1
- package/dist/engine/wiki/collection.d.ts +0 -91
- package/dist/engine/wiki/collection.js +0 -188
- package/dist/engine/wiki/collection.js.map +0 -1
- package/dist/engine/wiki/ledger.d.ts +0 -59
- package/dist/engine/wiki/ledger.js +0 -130
- package/dist/engine/wiki/ledger.js.map +0 -1
- package/dist/engine/wiki/lint.d.ts +0 -38
- package/dist/engine/wiki/lint.js +0 -186
- package/dist/engine/wiki/lint.js.map +0 -1
- package/dist/engine/wiki/navigation.d.ts +0 -40
- package/dist/engine/wiki/navigation.js +0 -83
- package/dist/engine/wiki/navigation.js.map +0 -1
- package/dist/engine/wiki/types.d.ts +0 -54
- package/dist/engine/wiki/types.js +0 -7
- package/dist/engine/wiki/types.js.map +0 -1
- package/dist/ontology/loader.d.ts +0 -13
- package/dist/ontology/loader.js.map +0 -1
- package/dist/ontology/resolver.d.ts +0 -13
- package/dist/ontology/resolver.js.map +0 -1
- package/dist/ontology/types.d.ts +0 -72
- package/dist/ontology/types.js +0 -12
- package/dist/ontology/types.js.map +0 -1
- package/dist/retrieve/embedding-sync.d.ts +0 -3
- package/dist/retrieve/embedding-sync.js +0 -21
- package/dist/retrieve/embedding-sync.js.map +0 -1
- package/dist/runtime/assets.d.ts +0 -7
- package/dist/runtime/assets.js +0 -13
- package/dist/runtime/assets.js.map +0 -1
- package/dist/search/semantic-collections.d.ts +0 -32
- package/dist/search/semantic-collections.js +0 -68
- package/dist/search/semantic-collections.js.map +0 -1
- package/dist/search/semantic-contexts.d.ts +0 -21
- package/dist/search/semantic-contexts.js +0 -28
- package/dist/search/semantic-contexts.js.map +0 -1
- package/dist/search/semantic-diagnostics.d.ts +0 -16
- package/dist/search/semantic-diagnostics.js +0 -110
- package/dist/search/semantic-diagnostics.js.map +0 -1
- package/dist/search/semantic-documents.d.ts +0 -3
- package/dist/search/semantic-documents.js +0 -150
- package/dist/search/semantic-documents.js.map +0 -1
- package/dist/search/semantic-embedding-hash.d.ts +0 -3
- package/dist/search/semantic-embedding-hash.js +0 -30
- package/dist/search/semantic-embedding-hash.js.map +0 -1
- package/dist/search/semantic-embedding-provider.d.ts +0 -9
- package/dist/search/semantic-embedding-provider.js +0 -58
- package/dist/search/semantic-embedding-provider.js.map +0 -1
- package/dist/search/semantic-index-build.d.ts +0 -13
- package/dist/search/semantic-index-build.js +0 -101
- package/dist/search/semantic-index-build.js.map +0 -1
- package/dist/search/semantic-index-core.d.ts +0 -21
- package/dist/search/semantic-index-core.js +0 -106
- package/dist/search/semantic-index-core.js.map +0 -1
- package/dist/search/semantic-index-io.d.ts +0 -19
- package/dist/search/semantic-index-io.js +0 -214
- package/dist/search/semantic-index-io.js.map +0 -1
- package/dist/search/semantic-index-types.d.ts +0 -50
- package/dist/search/semantic-index-types.js +0 -2
- package/dist/search/semantic-index-types.js.map +0 -1
- package/dist/search/semantic-index.d.ts +0 -4
- package/dist/search/semantic-index.js +0 -4
- package/dist/search/semantic-index.js.map +0 -1
- package/dist/search/semantic-listing.d.ts +0 -12
- package/dist/search/semantic-listing.js +0 -64
- package/dist/search/semantic-listing.js.map +0 -1
- package/dist/search/semantic-maintenance-shared.d.ts +0 -15
- package/dist/search/semantic-maintenance-shared.js +0 -43
- package/dist/search/semantic-maintenance-shared.js.map +0 -1
- package/dist/search/semantic-maintenance-types.d.ts +0 -103
- package/dist/search/semantic-maintenance-types.js +0 -2
- package/dist/search/semantic-maintenance-types.js.map +0 -1
- package/dist/search/semantic-maintenance.d.ts +0 -4
- package/dist/search/semantic-maintenance.js +0 -5
- package/dist/search/semantic-maintenance.js.map +0 -1
- package/dist/search/semantic-provider-types.d.ts +0 -34
- package/dist/search/semantic-provider-types.js +0 -2
- package/dist/search/semantic-provider-types.js.map +0 -1
- package/dist/search/semantic-query-types.d.ts +0 -83
- package/dist/search/semantic-query-types.js +0 -2
- package/dist/search/semantic-query-types.js.map +0 -1
- package/dist/search/semantic-query.d.ts +0 -2
- package/dist/search/semantic-query.js +0 -188
- package/dist/search/semantic-query.js.map +0 -1
- package/dist/search/semantic-sqlite-db.d.ts +0 -18
- package/dist/search/semantic-sqlite-db.js +0 -87
- package/dist/search/semantic-sqlite-db.js.map +0 -1
- package/dist/search/semantic-sqlite-query.d.ts +0 -2
- package/dist/search/semantic-sqlite-query.js +0 -128
- package/dist/search/semantic-sqlite-query.js.map +0 -1
- package/dist/search/semantic-sqlite-read.d.ts +0 -5
- package/dist/search/semantic-sqlite-read.js +0 -104
- package/dist/search/semantic-sqlite-read.js.map +0 -1
- package/dist/search/semantic-sqlite-write.d.ts +0 -7
- package/dist/search/semantic-sqlite-write.js +0 -66
- package/dist/search/semantic-sqlite-write.js.map +0 -1
- package/dist/search/semantic-store.d.ts +0 -15
- package/dist/search/semantic-store.js +0 -17
- package/dist/search/semantic-store.js.map +0 -1
- package/dist/search/semantic-sync-types.d.ts +0 -47
- package/dist/search/semantic-sync-types.js +0 -2
- package/dist/search/semantic-sync-types.js.map +0 -1
- package/dist/search/semantic-sync.d.ts +0 -13
- package/dist/search/semantic-sync.js +0 -131
- package/dist/search/semantic-sync.js.map +0 -1
- package/dist/search/semantic-test-fixtures.d.ts +0 -1
- package/dist/search/semantic-test-fixtures.js +0 -38
- package/dist/search/semantic-test-fixtures.js.map +0 -1
- package/dist/search/semantic-token.d.ts +0 -25
- package/dist/search/semantic-token.js +0 -114
- package/dist/search/semantic-token.js.map +0 -1
- package/dist/search/semantic-types.d.ts +0 -5
- package/dist/search/semantic-types.js +0 -2
- package/dist/search/semantic-types.js.map +0 -1
- package/dist/search/semantic.d.ts +0 -6
- package/dist/search/semantic.js +0 -6
- package/dist/search/semantic.js.map +0 -1
|
@@ -1,54 +1,55 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: compile
|
|
3
3
|
version: 0.1.0
|
|
4
|
-
description:
|
|
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
5
|
trigger: /compile
|
|
6
6
|
tags: [compile, wiki, synthesis, sha, incremental, second-brain, oms]
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
## compile
|
|
10
10
|
|
|
11
|
-
|
|
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.
|
|
12
13
|
|
|
13
14
|
### When to use
|
|
14
15
|
|
|
15
|
-
Use `compile` when you need to synthesize a concept wiki page from one or more
|
|
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.
|
|
16
18
|
|
|
17
19
|
### Inputs
|
|
18
20
|
|
|
19
|
-
- `concept` — human-readable concept name (used in
|
|
20
|
-
- `materials` — list of `{ path, text, grade }` items (grade
|
|
21
|
-
-
|
|
22
|
-
- `llm` — injected LLM provider (use `createDeterministicStub()` for offline/tests)
|
|
23
|
-
- `dotLlmwiki` — absolute path to `.llmwiki/` dotfolder (SHA cache location)
|
|
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
24
|
- `conceptId` — stable cache key (vault-relative path recommended)
|
|
25
25
|
|
|
26
|
+
Gather materials with MCP `oms_retrieve_context` or `oms_get_document`.
|
|
27
|
+
|
|
26
28
|
### Output
|
|
27
29
|
|
|
28
|
-
|
|
29
|
-
- `body` — synthesized Markdown with `[[wikilinks]]` (empty string when SHA unchanged / skipped)
|
|
30
|
+
- `body` — synthesized Markdown with `[[wikilinks]]` (empty when skipped)
|
|
30
31
|
- `sha` — SHA-256 fingerprint of the input materials
|
|
31
32
|
- `provenance` — grades of contributing materials
|
|
32
|
-
- `affected_backlinks` — vault paths of wiki pages that link to this concept
|
|
33
|
+
- `affected_backlinks` — vault paths of wiki pages that link to this concept
|
|
33
34
|
|
|
34
35
|
### Recipe
|
|
35
36
|
|
|
36
|
-
1.
|
|
37
|
-
2.
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
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.
|
|
41
42
|
|
|
42
43
|
### Phase constraints
|
|
43
44
|
|
|
44
45
|
- Phase A and Phase B never overlap in one execution context.
|
|
45
46
|
- Phase B writes to `processed/` ONLY — never to `wiki/` directly.
|
|
46
|
-
- Promotion from `processed/` to `wiki/` is the
|
|
47
|
+
- Promotion from `processed/` to `wiki/` is the wiki skill's responsibility.
|
|
47
48
|
|
|
48
49
|
### Provenance weighting
|
|
49
50
|
|
|
50
51
|
Materials are sorted authored > curated > external-raw in synthesis context.
|
|
51
|
-
Authored materials are labelled `[AUTHORED — preserve individual voice]` in the
|
|
52
|
+
Authored materials are labelled `[AUTHORED — preserve individual voice]` in the prompt.
|
|
52
53
|
|
|
53
54
|
### SHA cache
|
|
54
55
|
|
|
@@ -17,6 +17,7 @@ tags:
|
|
|
17
17
|
# Distill
|
|
18
18
|
|
|
19
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.
|
|
20
21
|
|
|
21
22
|
## Usage
|
|
22
23
|
|
|
@@ -26,15 +27,15 @@ Run adversarial absorption analysis on a target and produce a structured report.
|
|
|
26
27
|
|
|
27
28
|
## Steps
|
|
28
29
|
|
|
29
|
-
1. Load the target as inert read-only text
|
|
30
|
-
|
|
31
|
-
2. Snapshot
|
|
32
|
-
3. Run red-team adversarial analysis
|
|
33
|
-
|
|
34
|
-
4. Generate the absorption report
|
|
35
|
-
|
|
36
|
-
5. Verify
|
|
37
|
-
|
|
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.
|
|
38
39
|
6. Return the report string. Write it only if the caller explicitly requests it.
|
|
39
40
|
No vault write, no code mutation happens inside distill.
|
|
40
41
|
|
|
@@ -54,20 +55,8 @@ The report is the only output. It contains:
|
|
|
54
55
|
|
|
55
56
|
## Constraints
|
|
56
57
|
|
|
57
|
-
- Standalone: does not
|
|
58
|
+
- Standalone: does not depend on compile or wiki.
|
|
58
59
|
- Vault-agnostic: `OMS_VAULT` environment variable is NOT required.
|
|
59
|
-
- Stateless: no daemon, no watcher, no `setInterval
|
|
60
|
-
- Clean-room: target content is inert text — never executed
|
|
60
|
+
- Stateless: no daemon, no watcher, no `setInterval`.
|
|
61
|
+
- Clean-room: target content is inert text — never executed.
|
|
61
62
|
- No vault write occurs inside distill — the caller decides what to do with the report.
|
|
62
|
-
|
|
63
|
-
## Provider injection
|
|
64
|
-
|
|
65
|
-
Inject an `AnalyzerProvider` to control the LLM backend:
|
|
66
|
-
|
|
67
|
-
```typescript
|
|
68
|
-
import { createStubAnalyzerProvider } from "src/engine/distill/analyzer.js";
|
|
69
|
-
// Deterministic stub — no network; use in tests and dry-runs.
|
|
70
|
-
const provider = createStubAnalyzerProvider();
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
For production, wrap a real LLM client in the `AnalyzerProvider` interface.
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: link
|
|
3
|
+
version: 0.1.0
|
|
4
|
+
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 notes that already exist, via oms linkify or oms_link_apply.
|
|
5
|
+
trigger: /link
|
|
6
|
+
tags: [link, wikilink, linkify, term, backlink, second-brain, oms]
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## link
|
|
10
|
+
|
|
11
|
+
Keep the vault interlinked. There is no autolink daemon — follow this recipe as
|
|
12
|
+
the agent. Requires `OMS_VAULT` (or a resolved vault target).
|
|
13
|
+
|
|
14
|
+
## Which path?
|
|
15
|
+
|
|
16
|
+
Determine which path applies **before acting**:
|
|
17
|
+
|
|
18
|
+
| | Path A — pre-write | Path B — retrofit |
|
|
19
|
+
|---|---|---|
|
|
20
|
+
| **When to use** | You are about to write or rewrite a note | The note already exists on disk |
|
|
21
|
+
| **Entry point** | MCP `oms_link_suggest` on a sibling note, then MCP `write` | `oms linkify` (report) → `oms linkify --apply --yes`, or MCP `oms_link_suggest` → `oms_link_apply` |
|
|
22
|
+
| **Writes to** | The new note only | Existing notes in scope |
|
|
23
|
+
| **Prerequisite** | Term notes exist to link at | Term notes exist to link at |
|
|
24
|
+
|
|
25
|
+
These paths are **mutually exclusive and never combined in a single invocation.**
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## The link universe — term notes only
|
|
30
|
+
|
|
31
|
+
A link target is a note bound to the `term` concept in `vault/.oms/taxonomy.yaml`.
|
|
32
|
+
Notes bound to any other concept are never proposed as targets, in either path.
|
|
33
|
+
Surface forms of a target are its **basename** and its frontmatter **`aliases`**.
|
|
34
|
+
|
|
35
|
+
If a run reports `0 term note(s) available as link targets`, the vault has no
|
|
36
|
+
term layer yet — build one with the `wiki` skill (Path B) first. Linking is not
|
|
37
|
+
the tool that creates vocabulary; it is the tool that connects it.
|
|
38
|
+
|
|
39
|
+
## Three rules the engine enforces — do not fight them
|
|
40
|
+
|
|
41
|
+
1. **Surface-anchored.** A candidate exists only because the term's basename or
|
|
42
|
+
alias literally appears in the note. Retrieval never invents a link. Do not
|
|
43
|
+
hand-add a `[[link]]` to a note whose title does not appear in the text —
|
|
44
|
+
write the sentence that mentions it instead.
|
|
45
|
+
2. **First occurrence only.** One link per target note per body. A term linked
|
|
46
|
+
ten times is noise, not navigation.
|
|
47
|
+
3. **Ambiguity is reported, never auto-resolved.** When 2+ notes claim one span,
|
|
48
|
+
the candidate carries `ambiguous: true` and every `rivalPaths` entry. Ask the
|
|
49
|
+
user which note is meant, or skip the span. Never guess.
|
|
50
|
+
|
|
51
|
+
Protected regions are masked out before matching: frontmatter, fenced and inline
|
|
52
|
+
code, existing wikilinks and markdown links, image embeds, HTML, headings, URLs,
|
|
53
|
+
block ids, and tags. A "missing" link inside any of those is correct behavior.
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## Path A — pre-write linking
|
|
58
|
+
|
|
59
|
+
*(Use while drafting. The goal is that the body arrives on disk already linked,
|
|
60
|
+
so no retrofit pass is ever needed for this note.)*
|
|
61
|
+
|
|
62
|
+
### Agent-guided steps
|
|
63
|
+
|
|
64
|
+
1. Establish the vocabulary **before** drafting: call MCP `oms_link_suggest` on
|
|
65
|
+
an existing note in the same folder (or run `oms linkify --folder <folder>`
|
|
66
|
+
in report mode) and read the `targetPath` list. That list IS the vault's
|
|
67
|
+
current term vocabulary.
|
|
68
|
+
2. Draft the body using those exact surface forms, and write `[[wikilinks]]`
|
|
69
|
+
inline as you compose — first mention of each term only.
|
|
70
|
+
3. Commit through MCP `write`. Host `Write`/`Edit` never touches vault `.md`.
|
|
71
|
+
4. Re-check with `oms_link_suggest` on the committed note. Zero candidates means
|
|
72
|
+
the draft was already fully linked; remaining candidates are terms you missed.
|
|
73
|
+
|
|
74
|
+
### Example agent steps (Path A)
|
|
75
|
+
|
|
76
|
+
```
|
|
77
|
+
User: "Write a note about our retrieval pipeline."
|
|
78
|
+
|
|
79
|
+
1. oms_link_suggest { notePath: "notes/software-engineering/indexing.md" }
|
|
80
|
+
→ targets: notes/terms/embedding.md, notes/terms/reranker.md, notes/terms/chunk.md
|
|
81
|
+
2. Draft body mentioning embedding / reranker / chunk, each first mention
|
|
82
|
+
written as [[embedding]], [[reranker]], [[chunk]]
|
|
83
|
+
3. write { mode: "create", notePath: "notes/software-engineering/retrieval-pipeline.md", ... }
|
|
84
|
+
4. oms_link_suggest on the new note → 0 candidates ✓
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## Path B — retrofit existing notes
|
|
90
|
+
|
|
91
|
+
*(Use when the note is already on disk. Report first, always.)*
|
|
92
|
+
|
|
93
|
+
### Batch — `oms linkify` (whole vault or one folder)
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
oms linkify --folder notes # report only, writes nothing
|
|
97
|
+
oms linkify --folder notes --apply --yes # rewrite in place
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
`--apply` without `--yes` refuses before reading a single note and writes
|
|
101
|
+
nothing. Show the user the report and get agreement before adding `--yes`.
|
|
102
|
+
Every write still goes through the capture kernel, so path safety and the
|
|
103
|
+
concept contract hold exactly as they do for MCP `write`.
|
|
104
|
+
|
|
105
|
+
### Single note — `oms_link_suggest` → `oms_link_apply`
|
|
106
|
+
|
|
107
|
+
Use when the user wants to accept some candidates and reject others:
|
|
108
|
+
|
|
109
|
+
1. `oms_link_suggest { notePath, folder? }` → candidates + `baseContentHash`.
|
|
110
|
+
2. Present the candidates; drop ambiguous ones the user does not resolve.
|
|
111
|
+
3. `oms_link_apply { notePath, baseContentHash, candidateIds, folder? }` —
|
|
112
|
+
pass back the **same** `baseContentHash` and the **same** `folder` scope.
|
|
113
|
+
|
|
114
|
+
`oms_link_apply` refuses without writing when the note changed since the
|
|
115
|
+
suggest call (`note-changed`), when a candidate's text moved (`candidate-drift`),
|
|
116
|
+
or when accepted candidates overlap. A refusal is a correct outcome: re-run
|
|
117
|
+
`oms_link_suggest` for fresh offsets rather than retrying the stale ids.
|
|
118
|
+
|
|
119
|
+
### Example agent steps (Path B)
|
|
120
|
+
|
|
121
|
+
```
|
|
122
|
+
User: "Link up the notes I wrote last week."
|
|
123
|
+
|
|
124
|
+
1. oms linkify --folder notes ← report only
|
|
125
|
+
→ 14 candidate(s) across 9 note(s); 2 marked ambiguous
|
|
126
|
+
2. Show the report; ask which note the 2 ambiguous spans mean
|
|
127
|
+
3. Accepted whole folder → oms linkify --folder notes --apply --yes
|
|
128
|
+
Accepted per-note → oms_link_suggest → oms_link_apply with the chosen ids
|
|
129
|
+
4. Run `oms doctor` (non-blocking, exits 0)
|
|
130
|
+
```
|
|
@@ -51,7 +51,6 @@ For semantic retrieval, keep semantic-index and search controls on the OMS retri
|
|
|
51
51
|
- pass `semanticMode: "query" | "search" | "vsearch"` to choose hybrid, lexical, or vector search
|
|
52
52
|
- pass `semanticIntent`, `semanticLex`, `semanticVec`, `semanticHyde`, or `semanticSearches` for typed query documents
|
|
53
53
|
- pass `semanticMinScore`, `semanticAll`, `semanticFull`, `semanticLineNumbers`, or `semanticFullPath` when the retrieval task needs search flags
|
|
54
|
-
- pass `semanticStorage: "qmd-sqlite"` for the default qmd-compatible SQLite store, or `semanticStorage: "oms-native-json"` only for the legacy JSON fallback
|
|
55
54
|
- pass `embeddingSyncBeforeSearch: true` when the native semantic index must be fresh before retrieval
|
|
56
55
|
- use `oms_sync_embeddings` for an explicit semantic-index sync without doing a retrieval query
|
|
57
56
|
- use `oms_semantic_query`, `oms_semantic_status`, `oms_semantic_collections`, and `oms_semantic_contexts` for qmd-compatible semantic follow-ups on the native OMS index
|
|
@@ -157,11 +157,10 @@ Paths outside `agent_writable_zone` are read-only to all agents.
|
|
|
157
157
|
> Interview output is written ONLY to `vault/.oms/taxonomy.yaml`.
|
|
158
158
|
> Writing to `core/ontology/taxonomy.yaml` or any engine path is FORBIDDEN.
|
|
159
159
|
|
|
160
|
-
This guard is enforced by
|
|
160
|
+
This guard is enforced by `oms setup` (`src/cli/setup-command.ts`) and by this skill:
|
|
161
161
|
|
|
162
|
-
-
|
|
163
|
-
|
|
164
|
-
- Any attempt to write to the engine default throws before touching disk.
|
|
162
|
+
- The only write target is `{vaultRoot}/.oms/taxonomy.yaml`.
|
|
163
|
+
- Never write to `core/ontology/taxonomy.yaml` or any other engine path.
|
|
165
164
|
|
|
166
165
|
**Why this matters:** The engine default at `core/ontology/taxonomy.yaml` is the shared
|
|
167
166
|
fallback for every vault. Overwriting it would silently propagate one vault's assumptions
|
|
@@ -184,11 +183,10 @@ to all future users. Vault-local overrides preserve this separation permanently.
|
|
|
184
183
|
|
|
185
184
|
4. **Validate completeness** — confirm all 6 output keys are present and non-empty.
|
|
186
185
|
|
|
187
|
-
5. **Write** to `{vaultRoot}/.oms/taxonomy.yaml` ONLY
|
|
188
|
-
`
|
|
189
|
-
-
|
|
190
|
-
|
|
191
|
-
- Ensure `version: 1` (upgrade from v0 if needed).
|
|
186
|
+
5. **Write** to `{vaultRoot}/.oms/taxonomy.yaml` ONLY:
|
|
187
|
+
- Prefer `oms setup --vault <path>` for the non-interactive/default path.
|
|
188
|
+
- If writing during the interview, create `{vaultRoot}/.oms/` if needed, merge
|
|
189
|
+
with any existing file (do not clobber unrelated keys), and keep `version: 1`.
|
|
192
190
|
|
|
193
191
|
6. **Confirm** — print the written path and the resolved values. Never silently succeed.
|
|
194
192
|
|
|
@@ -239,10 +237,10 @@ Run the `doctor` skill to validate existing notes against the resolved conventio
|
|
|
239
237
|
oms doctor [--vault <path>]
|
|
240
238
|
```
|
|
241
239
|
|
|
242
|
-
## Executable
|
|
240
|
+
## Executable helper
|
|
243
241
|
|
|
244
|
-
|
|
242
|
+
Use the live CLI writer, not a parallel engine setup module:
|
|
245
243
|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
244
|
+
```bash
|
|
245
|
+
oms setup [--vault <path>] [--yes]
|
|
246
|
+
```
|
|
@@ -19,7 +19,7 @@ checker is safe to call at any time — it is read-only by default.
|
|
|
19
19
|
### Inputs
|
|
20
20
|
|
|
21
21
|
- `vaultRoot` — absolute path to the vault root directory
|
|
22
|
-
- `ontology` — loaded `Ontology` object (use `loadOntology(ontologyDir)` from `src/ontology/loader.ts`)
|
|
22
|
+
- `ontology` — loaded `Ontology` object (use `loadOntology(ontologyDir)` from `src/core/ontology/loader.ts`)
|
|
23
23
|
- `options.autofixEnabled` — optional human-gate flag (default `false`); set `true` ONLY after explicit user confirmation; currently a no-op reserved for future implementation
|
|
24
24
|
|
|
25
25
|
### Output
|
|
@@ -1,35 +1,55 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: wiki
|
|
3
3
|
version: 0.1.0
|
|
4
|
-
description:
|
|
4
|
+
description: Two-path wiki skill — Path A: promote compiled concepts from processed/ into the wiki/ query surface, maintain the staleness ledger, and lint; Path B (human authoring): build interlinked terminology notes directly in vault taxonomy folders via write.
|
|
5
5
|
trigger: /wiki
|
|
6
6
|
tags: [wiki, collection, staleness, navigation, lint, second-brain, oms]
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
## wiki
|
|
10
10
|
|
|
11
|
-
Manage the wiki collection
|
|
11
|
+
Manage the wiki collection and author interlinked vault notes. There is no
|
|
12
|
+
TypeScript wiki engine — follow this recipe as the agent.
|
|
12
13
|
|
|
13
|
-
##
|
|
14
|
+
## Which path?
|
|
14
15
|
|
|
15
|
-
|
|
16
|
+
Determine which path applies **before acting**:
|
|
17
|
+
|
|
18
|
+
| | Path A — promotion | Path B — Human authoring |
|
|
19
|
+
|---|---|---|
|
|
20
|
+
| **When to use** | You have compiled `processed/<concept>.md` output | You have only a topic + terms; no compile output exists |
|
|
21
|
+
| **Entry point** | Promote files, then update ledger + index | MCP `write` |
|
|
22
|
+
| **Writes to** | `wiki/` (query surface) | Vault taxonomy folders (`vault/.oms/taxonomy.yaml`) |
|
|
23
|
+
| **Prerequisite** | `processed/<concept>.md` must exist | None — user provides topic and term list |
|
|
24
|
+
|
|
25
|
+
These paths are **mutually exclusive and never combined in a single invocation.**
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Path A — promotion
|
|
30
|
+
|
|
31
|
+
*(Use only when `processed/<concept>.md` already exists.)*
|
|
32
|
+
|
|
33
|
+
### What this skill does
|
|
34
|
+
|
|
35
|
+
1. Verify the compile output exists in `processed/` for the target concept.
|
|
16
36
|
2. Check the staleness ledger (`.llmwiki/staleness.json`) for current state.
|
|
17
|
-
3.
|
|
37
|
+
3. Promote `processed/→wiki/`, update the ledger, flip cascade backlinks, detect stubs and orphans, and regenerate navigation surfaces.
|
|
18
38
|
4. Regenerate `wiki/index.md` (global catalog) and append an entry to `wiki/log.md`.
|
|
19
|
-
5.
|
|
39
|
+
5. Lint — apply auto-fixes (index consistency, broken links, See-Also) and report findings (conflicts, orphans, outdated refs).
|
|
20
40
|
|
|
21
|
-
|
|
41
|
+
### 3-phase hard separation
|
|
22
42
|
|
|
23
43
|
```
|
|
24
|
-
Research
|
|
44
|
+
Research → Compile (sequential) → Wiki (read-only query surface)
|
|
25
45
|
```
|
|
26
46
|
|
|
27
47
|
A wiki query never triggers compile. Compile never writes `wiki/` directly.
|
|
28
|
-
|
|
48
|
+
Promotion is the sole entry point into `wiki/`.
|
|
29
49
|
|
|
30
|
-
**Sync boundary:** `processed/` is internal compile state and is **NEVER synced to the Obsidian vault** — only `wiki/` crosses the Obsidian sync boundary.
|
|
50
|
+
**Sync boundary:** `processed/` is internal compile state and is **NEVER synced to the Obsidian vault** — only `wiki/` crosses the Obsidian sync boundary.
|
|
31
51
|
|
|
32
|
-
|
|
52
|
+
### Staleness states
|
|
33
53
|
|
|
34
54
|
| State | Meaning |
|
|
35
55
|
|-------|---------|
|
|
@@ -41,7 +61,7 @@ A wiki query never triggers compile. Compile never writes `wiki/` directly.
|
|
|
41
61
|
|
|
42
62
|
Full-rebuild escape hatch: delete `.llmwiki/staleness.json` — every page resets to DIRTY on the next collection run.
|
|
43
63
|
|
|
44
|
-
|
|
64
|
+
### Lint tiers
|
|
45
65
|
|
|
46
66
|
**Auto-fix** (runs automatically, mutates `wiki/` files):
|
|
47
67
|
- Index consistency — page in `wiki/` but absent from `index.md`
|
|
@@ -53,28 +73,87 @@ Full-rebuild escape hatch: delete `.llmwiki/staleness.json` — every page reset
|
|
|
53
73
|
- Orphan pages
|
|
54
74
|
- Outdated refs (DIRTY pages in the ledger)
|
|
55
75
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
Implemented in `src/engine/wiki/`:
|
|
59
|
-
|
|
60
|
-
- `collection.ts` — `runCollection()` orchestrates the full cycle
|
|
61
|
-
- `ledger.ts` — 5-state FSM, `loadLedger()` / `saveLedger()` / `resetLedger()`
|
|
62
|
-
- `navigation.ts` — `regenerateIndex()` + `appendLog()`
|
|
63
|
-
- `lint.ts` — `runLint()`
|
|
64
|
-
- `types.ts` — local type definitions
|
|
65
|
-
|
|
66
|
-
## Example agent steps
|
|
76
|
+
### Example agent steps (Path A)
|
|
67
77
|
|
|
68
78
|
```
|
|
69
79
|
User: "Promote the Alpha concept into the wiki after compile."
|
|
70
80
|
|
|
71
81
|
1. Verify processed/alpha.md exists (Phase-B compile output)
|
|
72
82
|
2. Load ledger from .llmwiki/staleness.json
|
|
73
|
-
3.
|
|
74
|
-
→
|
|
75
|
-
→
|
|
76
|
-
→
|
|
77
|
-
→
|
|
78
|
-
|
|
79
|
-
|
|
83
|
+
3. Copy processed/alpha.md → wiki/alpha.md
|
|
84
|
+
→ mark concepts/alpha.md CLEAN in ledger
|
|
85
|
+
→ flip CLEAN backlinks to DIRTY
|
|
86
|
+
→ detect stubs (dangling wikilinks) and orphans
|
|
87
|
+
→ regenerate wiki/index.md and append to wiki/log.md
|
|
88
|
+
4. Apply auto-fixes; print report-only findings
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## Path B — Human authoring
|
|
94
|
+
|
|
95
|
+
*(Use when you have only a topic + terms and no compiled `processed/` output.)*
|
|
96
|
+
|
|
97
|
+
Build an interlinked cluster of vault notes: one hub/MOC note plus one standalone note
|
|
98
|
+
per coined term, cross-linked with Obsidian `[[wikilinks]]` and committed through
|
|
99
|
+
MCP `write`. Writes to vault taxonomy folders declared
|
|
100
|
+
in `vault/.oms/taxonomy.yaml` — **never to `wiki/`**.
|
|
101
|
+
|
|
102
|
+
Implements [#43](https://github.com/GoBeromsu/oh-my-second-brain/issues/43).
|
|
103
|
+
|
|
104
|
+
### Admission gate — coined terms vs general nouns
|
|
105
|
+
|
|
106
|
+
Before creating any note, apply this test to every candidate term:
|
|
107
|
+
|
|
108
|
+
> **Does the word exist in ordinary language and shift meaning by domain?**
|
|
109
|
+
> → Explain it as a `## Term` section inside the hub note (the hub supplies the context).
|
|
110
|
+
>
|
|
111
|
+
> **Does it only ever mean one specific technical thing — a coined or proper term?**
|
|
112
|
+
> → Give it its own standalone terminology note.
|
|
113
|
+
|
|
114
|
+
**Kubernetes example:**
|
|
115
|
+
|
|
116
|
+
| Term | Classification | Placement |
|
|
117
|
+
|------|---------------|-----------|
|
|
118
|
+
| `Pod` | General noun (grouping in many domains) | Section in the Kubernetes hub note |
|
|
119
|
+
| `Service` | General noun (a service in many domains) | Section in the Kubernetes hub note |
|
|
120
|
+
| `Deployment` | General noun (deploying software anywhere) | Section in the Kubernetes hub note |
|
|
121
|
+
| `Ingress` | General noun (network ingress is domain-agnostic) | Section in the Kubernetes hub note |
|
|
122
|
+
| `ReplicaSet` | Coined Kubernetes term, no prior meaning | Standalone note → `[[ReplicaSet]]` |
|
|
123
|
+
| `StatefulSet` | Coined Kubernetes term, no prior meaning | Standalone note → `[[StatefulSet]]` |
|
|
124
|
+
| `DaemonSet` | Coined Kubernetes term, no prior meaning | Standalone note → `[[DaemonSet]]` |
|
|
125
|
+
| `CronJob` | Coined compound, specific k8s resource type | Standalone note → `[[CronJob]]` |
|
|
126
|
+
|
|
127
|
+
Apply this gate **before** calling MCP `write`. General-noun terms never become standalone notes.
|
|
128
|
+
|
|
129
|
+
### Agent-guided steps (Path B, v0)
|
|
130
|
+
|
|
131
|
+
1. Ask the user for the **topic** and **term list** (or extract terms from freeform source text).
|
|
132
|
+
2. Resolve the **target concept/folder** from `vault/.oms/taxonomy.yaml`.
|
|
133
|
+
3. Apply the **admission gate** to every term.
|
|
134
|
+
4. **Deduplicate**: call MCP `write` with `mode: "create"` per coined term; if status is `rejected` because the note exists, reuse the existing `[[wikilink]]`.
|
|
135
|
+
5. Draft one note per coined term — frontmatter from the concept's required fields + definition + `## See Also` back-link to the hub.
|
|
136
|
+
6. Draft the hub/MOC note — general-noun `## Term` sections + `## See Also` listing all coined-term `[[wikilinks]]`.
|
|
137
|
+
7. Commit terms first, hub last, via MCP `write`.
|
|
138
|
+
8. Run `oms doctor` (non-blocking, exits 0).
|
|
139
|
+
|
|
140
|
+
### Example agent steps (Path B)
|
|
141
|
+
|
|
142
|
+
```
|
|
143
|
+
User: "Build a Kubernetes wiki: Pod, Service, Deployment, Ingress, ReplicaSet, StatefulSet, DaemonSet, CronJob"
|
|
144
|
+
|
|
145
|
+
Admission gate:
|
|
146
|
+
Pod, Service, Deployment, Ingress → general nouns → hub sections
|
|
147
|
+
ReplicaSet, StatefulSet, DaemonSet, CronJob → coined terms → own notes
|
|
148
|
+
|
|
149
|
+
Dedup check: MCP write create per coined term → proceed when not already present
|
|
150
|
+
|
|
151
|
+
→ vault/notes/software-engineering/replicaset.md (coined, committed first)
|
|
152
|
+
→ vault/notes/software-engineering/statefulset.md (coined, committed first)
|
|
153
|
+
→ vault/notes/software-engineering/daemonset.md (coined, committed first)
|
|
154
|
+
→ vault/notes/software-engineering/cronjob.md (coined, committed first)
|
|
155
|
+
→ vault/notes/software-engineering/kubernetes.md (hub: Pod/Service/Deployment/Ingress as
|
|
156
|
+
sections; See Also: [[ReplicaSet]] etc.)
|
|
157
|
+
|
|
158
|
+
oms doctor ← verify (exits 0, non-blocking)
|
|
80
159
|
```
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: write
|
|
3
|
+
description: Write a vault note through the Oh My Second Brain kernel contract.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# write
|
|
7
|
+
|
|
8
|
+
Vault notes go through MCP `write` only. Do not use host Write/Edit for vault `.md` files.
|
|
9
|
+
|
|
10
|
+
`mode` is `create`, `append`, or `update`. The kernel owns `.oms` and returns one status:
|
|
11
|
+
|
|
12
|
+
- `ask` — fill the missing or invalid fields and call `write` again
|
|
13
|
+
- `inbox` — tell the user; do not invent a folder
|
|
14
|
+
- `written` — done
|
|
15
|
+
- `rejected` — fix `violations` or `reason` and call `write` again
|
package/dist/capture/safe.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type WriteContractViolation, type WriteFieldDescriptor } from "../conventions/write-contract.js";
|
|
2
|
+
import { type WriteRejection, type WriteReceipt, type WriteTargetSource } from "../conventions/write-protocol.js";
|
|
3
|
+
import type { Concept, Ontology } from "../core/ontology/types.js";
|
|
2
4
|
export type CapturePrepareAction = "ready" | "ask-missing-fields" | "route-to-inbox";
|
|
3
5
|
export type CaptureWriteMode = "create" | "append";
|
|
6
|
+
export type WriteMode = "create" | "append" | "update";
|
|
7
|
+
export type WriteStatus = "ask" | "inbox" | "written" | "rejected";
|
|
4
8
|
export interface CapturePrepareInput {
|
|
5
9
|
vault: string;
|
|
6
10
|
ontology: Ontology;
|
|
@@ -16,10 +20,17 @@ export interface CapturePlan {
|
|
|
16
20
|
notePath: string;
|
|
17
21
|
missingFields: string[];
|
|
18
22
|
frontmatter: Record<string, unknown>;
|
|
23
|
+
fields: WriteFieldDescriptor[];
|
|
24
|
+
violations: WriteContractViolation[];
|
|
19
25
|
reason?: string;
|
|
20
26
|
}
|
|
27
|
+
export interface WriteTarget {
|
|
28
|
+
vault: string;
|
|
29
|
+
source: WriteTargetSource;
|
|
30
|
+
}
|
|
21
31
|
export interface CaptureCommitInput {
|
|
22
32
|
vault: string;
|
|
33
|
+
source: WriteTargetSource;
|
|
23
34
|
ontology: Ontology;
|
|
24
35
|
notePath: string;
|
|
25
36
|
frontmatter: Record<string, unknown>;
|
|
@@ -31,6 +42,55 @@ export interface CaptureCommitResult {
|
|
|
31
42
|
mode: CaptureWriteMode;
|
|
32
43
|
notePath: string;
|
|
33
44
|
}
|
|
45
|
+
export interface WriteNoteInput {
|
|
46
|
+
target: WriteTarget;
|
|
47
|
+
ontology: Ontology;
|
|
48
|
+
mode: WriteMode;
|
|
49
|
+
dryRun: boolean;
|
|
50
|
+
concept?: string;
|
|
51
|
+
folder?: string;
|
|
52
|
+
filename?: string;
|
|
53
|
+
notePath?: string;
|
|
54
|
+
frontmatter?: Record<string, unknown>;
|
|
55
|
+
body?: string;
|
|
56
|
+
/**
|
|
57
|
+
* Test-only DI seam for the postcondition read-back. Defaults to reading the
|
|
58
|
+
* persisted file with node:fs/promises. Exists so tests can force a
|
|
59
|
+
* postcondition failure deterministically without mocking node:fs/promises.
|
|
60
|
+
*/
|
|
61
|
+
readBack?: (fullPath: string) => Promise<string>;
|
|
62
|
+
}
|
|
63
|
+
export interface WriteNoteResult {
|
|
64
|
+
status: WriteStatus;
|
|
65
|
+
mode: WriteMode;
|
|
66
|
+
notePath: string;
|
|
67
|
+
concept: string | null;
|
|
68
|
+
folder: string;
|
|
69
|
+
fields: WriteFieldDescriptor[];
|
|
70
|
+
frontmatter: Record<string, unknown>;
|
|
71
|
+
missingFields: string[];
|
|
72
|
+
violations: WriteContractViolation[];
|
|
73
|
+
reason?: string;
|
|
74
|
+
rejection?: WriteRejection;
|
|
75
|
+
receipt?: WriteReceipt;
|
|
76
|
+
}
|
|
34
77
|
export declare function safeVaultNotePath(vault: string, notePath: string): string;
|
|
35
78
|
export declare function prepareCapture(input: CapturePrepareInput): CapturePlan;
|
|
79
|
+
export interface StagedEvaluation {
|
|
80
|
+
ok: boolean;
|
|
81
|
+
violations: WriteContractViolation[];
|
|
82
|
+
frontmatter: Record<string, unknown>;
|
|
83
|
+
body: string;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Acceptance Criteria - staged evaluation (pre-persist).
|
|
87
|
+
*
|
|
88
|
+
* Parses the note content that is ABOUT to be written and re-runs the kernel
|
|
89
|
+
* write contract against the RENDERED frontmatter. This catches divergence
|
|
90
|
+
* between the caller-supplied frontmatter and what actually lands on disk
|
|
91
|
+
* (yaml round-trip artifacts such as `NaN` rendering as `.nan` and parsing
|
|
92
|
+
* back as `null`).
|
|
93
|
+
*/
|
|
94
|
+
export declare function evaluateStagedNote(stagedContent: string, concept: Concept, notePath: string, strictZones: ReadonlySet<string>): StagedEvaluation;
|
|
95
|
+
export declare function writeNote(input: WriteNoteInput): Promise<WriteNoteResult>;
|
|
36
96
|
export declare function commitCapture(input: CaptureCommitInput): Promise<CaptureCommitResult>;
|