oh-my-knowledge 1.0.0-beta.7 → 1.0.0-beta.8

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 (421) hide show
  1. package/README.md +25 -210
  2. package/README.zh.md +26 -211
  3. package/dist/assets/agent-skills/omk/SKILL.md +1 -1
  4. package/dist/assets/agent-skills/omk/references/commands.md +4 -4
  5. package/dist/cli/commands/doctor.d.ts +0 -1
  6. package/dist/cli/commands/doctor.js +11 -125
  7. package/dist/cli/commands/eval/gold/compare.d.ts +4 -4
  8. package/dist/cli/commands/eval/gold/compare.js +4 -10
  9. package/dist/cli/commands/eval/index.d.ts +3 -0
  10. package/dist/cli/commands/eval/index.js +11 -16
  11. package/dist/cli/commands/evolve.d.ts +28 -31
  12. package/dist/cli/commands/evolve.js +85 -141
  13. package/dist/cli/commands/init.js +12 -13
  14. package/dist/cli/commands/install.js +56 -70
  15. package/dist/cli/commands/observe/inbox.d.ts +4 -2
  16. package/dist/cli/commands/observe/inbox.js +32 -106
  17. package/dist/cli/commands/observe/index.d.ts +0 -18
  18. package/dist/cli/commands/observe/index.js +37 -72
  19. package/dist/cli/commands/promote.js +5 -1
  20. package/dist/cli/commands/rollback.js +5 -1
  21. package/dist/cli/commands/sample.d.ts +21 -26
  22. package/dist/cli/commands/sample.js +90 -197
  23. package/dist/cli/commands/studio.d.ts +4 -2
  24. package/dist/cli/commands/studio.js +47 -15
  25. package/dist/cli/index.js +9 -6
  26. package/dist/cli/lib/cli-exit.d.ts +0 -2
  27. package/dist/cli/lib/cli-exit.js +0 -2
  28. package/dist/cli/lib/cmd-flags.d.ts +12 -232
  29. package/dist/cli/lib/cmd-flags.js +0 -44
  30. package/dist/cli/lib/core-report-service.d.ts +3 -0
  31. package/dist/cli/lib/core-report-service.js +54 -0
  32. package/dist/cli/lib/eval-output.d.ts +3 -0
  33. package/dist/cli/lib/eval-output.js +75 -0
  34. package/dist/cli/lib/i18n-dict/common.js +2 -2
  35. package/dist/cli/lib/i18n-dict/run.d.ts +1 -1
  36. package/dist/cli/lib/i18n-dict/run.js +34 -0
  37. package/dist/cli/lib/observation-window.d.ts +9 -0
  38. package/dist/cli/lib/observation-window.js +31 -0
  39. package/dist/cli/lib/resolve-skill-input.d.ts +4 -1
  40. package/dist/cli/lib/resolve-skill-input.js +3 -3
  41. package/dist/cli/lib/run-core-evaluation.d.ts +1 -0
  42. package/dist/cli/lib/run-core-evaluation.js +3 -27
  43. package/dist/cli/lib/runtime-defaults.js +10 -4
  44. package/dist/cli/lib/update-check.d.ts +5 -2
  45. package/dist/cli/lib/update-check.js +18 -15
  46. package/dist/cli/lib/update-fetch-worker.js +5 -5
  47. package/dist/cli/oclif/base-command.d.ts +1 -0
  48. package/dist/cli/oclif/base-command.js +13 -0
  49. package/dist/cli/oclif/help.js +2 -5
  50. package/dist/cli/oclif/parsers.d.ts +2 -0
  51. package/dist/cli/oclif/parsers.js +11 -0
  52. package/dist/cli/oclif/projection.d.ts +1 -4
  53. package/dist/cli/oclif/run.js +36 -8
  54. package/dist/dsh-plugin/index.js +4 -2
  55. package/dist/dsh-plugin/observe.js +1 -1
  56. package/dist/eval-runtime/adapters/command-executor.d.ts +50 -0
  57. package/dist/eval-runtime/adapters/command-executor.js +404 -0
  58. package/dist/eval-runtime/advanced.d.ts +2 -0
  59. package/dist/eval-runtime/advanced.js +1 -0
  60. package/dist/eval-runtime/conformance/executor.d.ts +6 -0
  61. package/dist/eval-runtime/conformance/executor.js +11 -1
  62. package/dist/eval-runtime/evaluate.d.ts +4 -2
  63. package/dist/eval-runtime/evaluate.js +3 -1
  64. package/dist/eval-runtime/evaluation/conformance.js +9 -0
  65. package/dist/eval-runtime/evaluation/contracts.d.ts +21 -3
  66. package/dist/eval-runtime/evaluation/errors.d.ts +17 -3
  67. package/dist/eval-runtime/evaluation/errors.js +7 -4
  68. package/dist/eval-runtime/evaluation/execute-stage.d.ts +9 -0
  69. package/dist/eval-runtime/evaluation/execute-stage.js +62 -0
  70. package/dist/eval-runtime/evaluation/prepare.d.ts +3 -0
  71. package/dist/eval-runtime/evaluation/prepare.js +14 -0
  72. package/dist/eval-runtime/evaluation/result-state.d.ts +15 -0
  73. package/dist/eval-runtime/evaluation/result-state.js +1 -0
  74. package/dist/eval-runtime/evaluation/reuse.d.ts +8 -1
  75. package/dist/eval-runtime/evaluation/reuse.js +57 -133
  76. package/dist/eval-runtime/evaluation/schemas.d.ts +50 -37
  77. package/dist/eval-runtime/evaluation/schemas.js +1 -1
  78. package/dist/eval-runtime/evaluation/stage-session.d.ts +55 -0
  79. package/dist/eval-runtime/evaluation/stage-session.js +228 -0
  80. package/dist/eval-runtime/executed-store.d.ts +48 -0
  81. package/dist/eval-runtime/executed-store.js +256 -0
  82. package/dist/eval-runtime/index.d.ts +4 -2
  83. package/dist/eval-runtime/index.js +2 -1
  84. package/dist/eval-runtime/runner.d.ts +1 -0
  85. package/dist/eval-runtime/runner.js +1 -0
  86. package/dist/eval-workflows/hosts/adapters/anthropic/protocol.d.ts +1 -1
  87. package/dist/eval-workflows/hosts/adapters/anthropic/protocol.js +1 -1
  88. package/dist/eval-workflows/hosts/adapters/codex/cli-protocol.d.ts +6 -0
  89. package/dist/eval-workflows/hosts/adapters/codex/cli-protocol.js +29 -0
  90. package/dist/eval-workflows/hosts/adapters/codex/cli.d.ts +1 -1
  91. package/dist/eval-workflows/hosts/adapters/codex/cli.js +19 -47
  92. package/dist/eval-workflows/hosts/adapters/codex/protocol-core.js +2 -2
  93. package/dist/eval-workflows/hosts/adapters/codex/reference-executor.d.ts +50 -0
  94. package/dist/eval-workflows/hosts/adapters/codex/reference-executor.js +358 -0
  95. package/dist/eval-workflows/hosts/adapters/codex/resources.d.ts +16 -5
  96. package/dist/eval-workflows/hosts/adapters/codex/resources.js +24 -8
  97. package/dist/eval-workflows/hosts/adapters/codex/sdk.d.ts +1 -1
  98. package/dist/eval-workflows/hosts/adapters/codex/sdk.js +1 -1
  99. package/dist/eval-workflows/hosts/adapters/codex/version.d.ts +11 -0
  100. package/dist/eval-workflows/hosts/adapters/codex/version.js +50 -0
  101. package/dist/eval-workflows/hosts/adapters/openai/protocol.d.ts +1 -1
  102. package/dist/eval-workflows/hosts/adapters/openai/protocol.js +1 -1
  103. package/dist/eval-workflows/hosts/adapters/shared/api-protocol-core.js +2 -1
  104. package/dist/eval-workflows/hosts/adapters/shared/classified-environment.js +10 -6
  105. package/dist/eval-workflows/hosts/adapters/shared/stateless-api-resources.js +2 -2
  106. package/dist/eval-workflows/hosts/composition/evolution-evaluation.d.ts +4 -0
  107. package/dist/eval-workflows/hosts/composition/evolution-evaluation.js +21 -0
  108. package/dist/eval-workflows/hosts/composition/judge-provider-identity.js +2 -0
  109. package/dist/eval-workflows/hosts/input-resolution/node-cli-evaluation-resolver.js +11 -0
  110. package/dist/eval-workflows/hosts/reference-executors.d.ts +11 -0
  111. package/dist/eval-workflows/hosts/reference-executors.js +10 -0
  112. package/dist/eval-workflows/inputs/append-samples.d.ts +15 -0
  113. package/dist/eval-workflows/inputs/append-samples.js +71 -0
  114. package/dist/eval-workflows/inputs/sample-document.d.ts +1 -1
  115. package/dist/eval-workflows/inputs/sample-document.js +1 -2
  116. package/dist/{knowledge-artifacts/authoring → eval-workflows/sample-generation}/generator.d.ts +6 -4
  117. package/dist/{knowledge-artifacts/authoring → eval-workflows/sample-generation}/generator.js +15 -11
  118. package/dist/eval-workflows/sample-generation/skill-samples.d.ts +62 -0
  119. package/dist/eval-workflows/sample-generation/skill-samples.js +144 -0
  120. package/dist/eval-workflows/sample-generation/trace-drafts.d.ts +31 -0
  121. package/dist/eval-workflows/sample-generation/trace-drafts.js +39 -0
  122. package/dist/executors/openai/codex/protocol.d.ts +2 -0
  123. package/dist/executors/openai/codex/protocol.js +9 -1
  124. package/dist/executors/script/index.js +2 -1
  125. package/dist/knowledge-artifacts/authoring/core-evolver.d.ts +1 -0
  126. package/dist/knowledge-artifacts/authoring/core-evolver.js +6 -0
  127. package/dist/knowledge-artifacts/authoring/scaffold.d.ts +8 -0
  128. package/dist/knowledge-artifacts/authoring/scaffold.js +109 -0
  129. package/dist/knowledge-artifacts/doctor/contracts.d.ts +2 -0
  130. package/dist/knowledge-artifacts/doctor/endpoint-rule.js +1 -1
  131. package/dist/knowledge-artifacts/doctor/fixer.d.ts +1 -0
  132. package/dist/knowledge-artifacts/doctor/fixer.js +43 -35
  133. package/dist/knowledge-artifacts/doctor/health/composer.js +4 -0
  134. package/dist/knowledge-artifacts/doctor/index.js +3 -0
  135. package/dist/knowledge-artifacts/doctor/persistence.d.ts +3 -0
  136. package/dist/knowledge-artifacts/doctor/persistence.js +126 -0
  137. package/dist/knowledge-artifacts/governance/evidence.d.ts +1 -0
  138. package/dist/knowledge-artifacts/governance/evidence.js +6 -4
  139. package/dist/{cli/lib/record-evolve-outcome.js → knowledge-artifacts/governance/evolve-outcome.js} +8 -9
  140. package/dist/knowledge-artifacts/governance/install.d.ts +29 -0
  141. package/dist/knowledge-artifacts/governance/install.js +63 -0
  142. package/dist/knowledge-artifacts/governance/observe-feedback.d.ts +13 -0
  143. package/dist/knowledge-artifacts/governance/observe-feedback.js +10 -0
  144. package/dist/knowledge-artifacts/governance/store.d.ts +6 -2
  145. package/dist/knowledge-artifacts/governance/store.js +16 -4
  146. package/dist/knowledge-artifacts/sources/deploy-artifact.d.ts +4 -0
  147. package/dist/knowledge-artifacts/sources/deploy-artifact.js +65 -0
  148. package/dist/knowledge-artifacts/sources/install-source.d.ts +2 -0
  149. package/dist/knowledge-artifacts/sources/install-source.js +24 -4
  150. package/dist/observability/contracts/experience-enums.d.ts +1 -1
  151. package/dist/observability/contracts/experience-evidence-schema.d.ts +5 -5
  152. package/dist/observability/conversation/catalog.js +1 -1
  153. package/dist/observability/conversation/knowledge-debugger.js +1 -1
  154. package/dist/observability/inbox/explicit-capture.js +1 -1
  155. package/dist/observability/inbox/index.d.ts +1 -2
  156. package/dist/observability/inbox/index.js +2 -43
  157. package/dist/observability/inbox/metric-semantics.d.ts +9 -0
  158. package/dist/observability/inbox/metric-semantics.js +158 -0
  159. package/dist/observability/inbox/report-filter.d.ts +2 -0
  160. package/dist/observability/inbox/report-filter.js +19 -0
  161. package/dist/observability/inbox/review-semantics.d.ts +27 -0
  162. package/dist/observability/inbox/review-semantics.js +52 -0
  163. package/dist/observability/inbox/severity-reason.d.ts +3 -0
  164. package/dist/observability/inbox/severity-reason.js +48 -0
  165. package/dist/observability/inbox/signal-semantics.d.ts +28 -0
  166. package/dist/observability/inbox/signal-semantics.js +113 -0
  167. package/dist/observability/inbox/skill-rollups.d.ts +59 -0
  168. package/dist/observability/inbox/skill-rollups.js +186 -0
  169. package/dist/observability/inbox/view-model.d.ts +8 -0
  170. package/dist/observability/inbox/view-model.js +4 -0
  171. package/dist/observability/skill-health/analyzer.d.ts +1 -0
  172. package/dist/observability/skill-health/analyzer.js +11 -0
  173. package/dist/observability/skill-health/persistence.d.ts +18 -0
  174. package/dist/observability/skill-health/persistence.js +43 -0
  175. package/dist/observability/soft-standards/llm-extractor.js +3 -0
  176. package/dist/observability/soft-standards/runtime-evidence.d.ts +4 -0
  177. package/dist/observability/soft-standards/runtime-evidence.js +57 -0
  178. package/dist/observability/soft-standards/types.d.ts +1 -0
  179. package/dist/shared/atomic-json.d.ts +2 -0
  180. package/dist/shared/atomic-json.js +12 -2
  181. package/dist/studio/application/conversation-activity.d.ts +5 -0
  182. package/dist/studio/application/conversation-activity.js +50 -0
  183. package/dist/studio/{core-runs/catalog.d.ts → application/core-run-catalog.d.ts} +1 -1
  184. package/dist/studio/{core-runs/catalog.js → application/core-run-catalog.js} +1 -1
  185. package/dist/studio/{core-runs/projection.d.ts → application/core-run-projection.d.ts} +3 -1
  186. package/dist/studio/{core-runs/projection.js → application/core-run-projection.js} +2 -1
  187. package/dist/studio/application/inline-markdown.d.ts +4 -0
  188. package/dist/studio/application/inline-markdown.js +99 -0
  189. package/dist/studio/application/knowledge-query.d.ts +24 -0
  190. package/dist/studio/application/knowledge-query.js +30 -0
  191. package/dist/studio/application/knowledge-reports.d.ts +22 -0
  192. package/dist/studio/application/knowledge-reports.js +279 -0
  193. package/dist/studio/application/replay/format.d.ts +9 -0
  194. package/dist/studio/application/replay/format.js +52 -0
  195. package/dist/studio/application/replay/layout.d.ts +15 -0
  196. package/dist/studio/application/replay/layout.js +171 -0
  197. package/dist/studio/application/replay/projection.d.ts +4 -0
  198. package/dist/studio/application/replay/projection.js +291 -0
  199. package/dist/studio/application/replay/routing.d.ts +20 -0
  200. package/dist/studio/application/replay/routing.js +333 -0
  201. package/dist/studio/application/replay/summary.d.ts +25 -0
  202. package/dist/studio/application/replay/summary.js +497 -0
  203. package/dist/studio/application/skill-health.d.ts +8 -0
  204. package/dist/studio/application/skill-health.js +86 -0
  205. package/dist/studio/application/skill-index.d.ts +17 -1
  206. package/dist/studio/application/skill-index.js +53 -28
  207. package/dist/studio/{presentation → application}/trajectory-evidence.d.ts +1 -5
  208. package/dist/studio/http/app-host.d.ts +7 -0
  209. package/dist/studio/http/app-host.js +1 -0
  210. package/dist/studio/http/chart-asset.d.ts +1 -0
  211. package/dist/studio/http/chart-asset.js +21 -0
  212. package/dist/studio/http/contracts.d.ts +11 -2
  213. package/dist/studio/http/errors.d.ts +11 -0
  214. package/dist/studio/http/errors.js +22 -0
  215. package/dist/studio/http/inbox-page.d.ts +11 -0
  216. package/dist/studio/http/inbox-page.js +9 -0
  217. package/dist/studio/http/knowledge-page.d.ts +23 -0
  218. package/dist/studio/http/knowledge-page.js +27 -0
  219. package/dist/studio/http/next-context.d.ts +22 -0
  220. package/dist/studio/http/next-context.js +36 -0
  221. package/dist/studio/http/next-server.d.ts +3 -0
  222. package/dist/studio/http/next-server.js +121 -0
  223. package/dist/studio/http/observe-page.d.ts +26 -0
  224. package/dist/studio/http/observe-page.js +36 -0
  225. package/dist/studio/http/report-server.d.ts +2 -1
  226. package/dist/studio/http/report-server.js +46 -12
  227. package/dist/studio/http/request-errors.d.ts +3 -1
  228. package/dist/studio/http/request-errors.js +11 -9
  229. package/dist/studio/http/request-handler.d.ts +1 -1
  230. package/dist/studio/http/request-handler.js +51 -47
  231. package/dist/studio/http/routes/conversations.d.ts +2 -2
  232. package/dist/studio/http/routes/conversations.js +180 -213
  233. package/dist/studio/{core-runs/route-handler.d.ts → http/routes/core-runs.d.ts} +4 -2
  234. package/dist/studio/{core-runs/route-handler.js → http/routes/core-runs.js} +3 -9
  235. package/dist/studio/http/routes/knowledge.d.ts +5 -4
  236. package/dist/studio/http/routes/knowledge.js +232 -765
  237. package/dist/studio/http/routes/observations.d.ts +4 -2
  238. package/dist/studio/http/routes/observations.js +168 -178
  239. package/dist/studio/http/routes/router.d.ts +19 -0
  240. package/dist/studio/http/routes/router.js +97 -0
  241. package/dist/studio/index.d.ts +5 -1
  242. package/dist/studio/index.js +5 -1
  243. package/dist/studio/presentation/conversation-renderer.d.ts +1 -14
  244. package/dist/studio/presentation/conversation-renderer.js +16 -75
  245. package/dist/studio/{core-runs/renderer.d.ts → presentation/core-run-renderer.d.ts} +2 -1
  246. package/dist/studio/{core-runs/renderer.js → presentation/core-run-renderer.js} +23 -9
  247. package/dist/studio/presentation/doctor-detail-renderer.d.ts +1 -7
  248. package/dist/studio/presentation/doctor-detail-renderer.js +1 -1
  249. package/dist/studio/presentation/inline-markdown.d.ts +0 -1
  250. package/dist/studio/presentation/inline-markdown.js +1 -99
  251. package/dist/studio/presentation/knowledge-debugger-renderer.d.ts +1 -1
  252. package/dist/studio/presentation/knowledge-debugger-renderer.js +10 -1013
  253. package/dist/studio/presentation/knowledge-reports-renderer.d.ts +5 -0
  254. package/dist/studio/presentation/knowledge-reports-renderer.js +196 -0
  255. package/dist/studio/presentation/layout.d.ts +7 -0
  256. package/dist/studio/presentation/layout.js +42 -23
  257. package/dist/studio/presentation/managed-history-renderer.js +6 -6
  258. package/dist/studio/presentation/observation-inbox/client-script.js +25 -15
  259. package/dist/studio/presentation/observation-inbox/experience-workspace-renderer.js +28 -26
  260. package/dist/studio/presentation/observation-inbox/metric-renderer.d.ts +2 -1
  261. package/dist/studio/presentation/observation-inbox/metric-renderer.js +5 -71
  262. package/dist/studio/presentation/observation-inbox/page-renderer.js +3 -3
  263. package/dist/studio/presentation/observation-inbox/process-workspace-renderer.d.ts +1 -28
  264. package/dist/studio/presentation/observation-inbox/process-workspace-renderer.js +17 -74
  265. package/dist/studio/presentation/observation-inbox/review-renderer.js +3 -2
  266. package/dist/studio/presentation/observation-inbox/reviewer-report.js +7 -5
  267. package/dist/studio/presentation/observation-inbox/signal-renderer.js +23 -63
  268. package/dist/studio/presentation/observation-inbox/skill-chain-renderer.js +15 -13
  269. package/dist/studio/presentation/observation-inbox/timeline.js +2 -1
  270. package/dist/studio/presentation/report-shell.d.ts +2 -34
  271. package/dist/studio/presentation/report-shell.js +8 -6
  272. package/dist/studio/presentation/skill-detail-renderer.d.ts +0 -9
  273. package/dist/studio/presentation/skill-detail-renderer.js +5 -34
  274. package/dist/studio/presentation/skill-health-renderer.js +2 -2
  275. package/dist/studio/presentation/skill-list-renderer.js +4 -4
  276. package/dist/studio/presentation/trajectory-live.js +17 -5
  277. package/dist/studio/presentation/trajectory-routing.d.ts +0 -59
  278. package/dist/studio/presentation/trajectory-routing.js +2 -334
  279. package/dist/studio/view-models/conversation-activity.d.ts +11 -0
  280. package/dist/studio/view-models/conversation-activity.js +1 -0
  281. package/dist/studio/{core-runs/contracts.d.ts → view-models/core-runs.d.ts} +2 -4
  282. package/dist/studio/view-models/core-runs.js +1 -0
  283. package/dist/studio/view-models/health-assessment.d.ts +8 -0
  284. package/dist/studio/view-models/health-assessment.js +1 -0
  285. package/dist/studio/view-models/inline-markdown.d.ts +17 -0
  286. package/dist/studio/view-models/inline-markdown.js +1 -0
  287. package/dist/studio/view-models/knowledge-reports.d.ts +59 -0
  288. package/dist/studio/view-models/knowledge-reports.js +1 -0
  289. package/dist/studio/view-models/replay.d.ts +85 -0
  290. package/dist/studio/view-models/replay.js +1 -0
  291. package/dist/studio/view-models/report-context.d.ts +33 -0
  292. package/dist/studio/view-models/report-context.js +1 -0
  293. package/dist/studio/view-models/trajectory-evidence.d.ts +5 -0
  294. package/dist/studio/view-models/trajectory-evidence.js +1 -0
  295. package/dist/studio/view-models/trajectory-routing.d.ts +40 -0
  296. package/dist/studio/view-models/trajectory-routing.js +1 -0
  297. package/dist/studio/web/.next/BUILD_ID +1 -0
  298. package/dist/studio/web/.next/app-path-routes-manifest.json +12 -0
  299. package/dist/studio/web/.next/build-manifest.json +20 -0
  300. package/dist/studio/web/.next/export-marker.json +6 -0
  301. package/dist/studio/web/.next/images-manifest.json +68 -0
  302. package/dist/studio/web/.next/next-minimal-server.js.nft.json +1 -0
  303. package/dist/studio/web/.next/next-server.js.nft.json +1 -0
  304. package/dist/studio/web/.next/package.json +1 -0
  305. package/dist/studio/web/.next/prerender-manifest.json +40 -0
  306. package/dist/studio/web/.next/react-loadable-manifest.json +1 -0
  307. package/dist/studio/web/.next/required-server-files.js +353 -0
  308. package/dist/studio/web/.next/required-server-files.json +353 -0
  309. package/dist/studio/web/.next/routes-manifest.json +115 -0
  310. package/dist/studio/web/.next/server/app/_global-error/page.js +31 -0
  311. package/dist/studio/web/.next/server/app/_global-error/page.js.nft.json +1 -0
  312. package/dist/studio/web/.next/server/app/_global-error/page_client-reference-manifest.js +1 -0
  313. package/dist/studio/web/.next/server/app/_global-error.html +1 -0
  314. package/dist/studio/web/.next/server/app/_global-error.meta +27 -0
  315. package/dist/studio/web/.next/server/app/_global-error.rsc +20 -0
  316. package/dist/studio/web/.next/server/app/_global-error.segments/_full.segment.rsc +20 -0
  317. package/dist/studio/web/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +24 -0
  318. package/dist/studio/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -0
  319. package/dist/studio/web/.next/server/app/_not-found/page.js +1 -0
  320. package/dist/studio/web/.next/server/app/_not-found/page.js.nft.json +1 -0
  321. package/dist/studio/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -0
  322. package/dist/studio/web/.next/server/app/knowledge/page.js +1 -0
  323. package/dist/studio/web/.next/server/app/knowledge/page.js.nft.json +1 -0
  324. package/dist/studio/web/.next/server/app/knowledge/page_client-reference-manifest.js +1 -0
  325. package/dist/studio/web/.next/server/app/knowledge/skills/[skillName]/page.js +1 -0
  326. package/dist/studio/web/.next/server/app/knowledge/skills/[skillName]/page.js.nft.json +1 -0
  327. package/dist/studio/web/.next/server/app/knowledge/skills/[skillName]/page_client-reference-manifest.js +1 -0
  328. package/dist/studio/web/.next/server/app/measure/[runId]/page.js +1 -0
  329. package/dist/studio/web/.next/server/app/measure/[runId]/page.js.nft.json +1 -0
  330. package/dist/studio/web/.next/server/app/measure/[runId]/page_client-reference-manifest.js +1 -0
  331. package/dist/studio/web/.next/server/app/measure/page.js +1 -0
  332. package/dist/studio/web/.next/server/app/measure/page.js.nft.json +1 -0
  333. package/dist/studio/web/.next/server/app/measure/page_client-reference-manifest.js +1 -0
  334. package/dist/studio/web/.next/server/app/observe/conversations/[threadId]/page.js +1 -0
  335. package/dist/studio/web/.next/server/app/observe/conversations/[threadId]/page.js.nft.json +1 -0
  336. package/dist/studio/web/.next/server/app/observe/conversations/[threadId]/page_client-reference-manifest.js +1 -0
  337. package/dist/studio/web/.next/server/app/observe/conversations/[threadId]/tasks/[turnId]/page.js +1 -0
  338. package/dist/studio/web/.next/server/app/observe/conversations/[threadId]/tasks/[turnId]/page.js.nft.json +1 -0
  339. package/dist/studio/web/.next/server/app/observe/conversations/[threadId]/tasks/[turnId]/page_client-reference-manifest.js +1 -0
  340. package/dist/studio/web/.next/server/app/observe/inbox/page.js +10 -0
  341. package/dist/studio/web/.next/server/app/observe/inbox/page.js.nft.json +1 -0
  342. package/dist/studio/web/.next/server/app/observe/inbox/page_client-reference-manifest.js +1 -0
  343. package/dist/studio/web/.next/server/app/observe/page.js +1 -0
  344. package/dist/studio/web/.next/server/app/observe/page.js.nft.json +1 -0
  345. package/dist/studio/web/.next/server/app/observe/page_client-reference-manifest.js +1 -0
  346. package/dist/studio/web/.next/server/app-paths-manifest.json +12 -0
  347. package/dist/studio/web/.next/server/chunks/106.js +168 -0
  348. package/dist/studio/web/.next/server/chunks/150.js +1 -0
  349. package/dist/studio/web/.next/server/chunks/304.js +1 -0
  350. package/dist/studio/web/.next/server/chunks/380.js +1 -0
  351. package/dist/studio/web/.next/server/chunks/564.js +24 -0
  352. package/dist/studio/web/.next/server/chunks/747.js +6 -0
  353. package/dist/studio/web/.next/server/chunks/772.js +8 -0
  354. package/dist/studio/web/.next/server/chunks/892.js +1 -0
  355. package/dist/studio/web/.next/server/chunks/944.js +478 -0
  356. package/dist/studio/web/.next/server/functions-config-manifest.json +4 -0
  357. package/dist/studio/web/.next/server/interception-route-rewrite-manifest.js +1 -0
  358. package/dist/studio/web/.next/server/middleware-build-manifest.js +1 -0
  359. package/dist/studio/web/.next/server/middleware-manifest.json +6 -0
  360. package/dist/studio/web/.next/server/middleware-react-loadable-manifest.js +1 -0
  361. package/dist/studio/web/.next/server/next-font-manifest.js +1 -0
  362. package/dist/studio/web/.next/server/next-font-manifest.json +1 -0
  363. package/dist/studio/web/.next/server/pages/500.html +1 -0
  364. package/dist/studio/web/.next/server/pages-manifest.json +3 -0
  365. package/dist/studio/web/.next/server/prefetch-hints.json +16 -0
  366. package/dist/studio/web/.next/server/server-reference-manifest.js +1 -0
  367. package/dist/studio/web/.next/server/server-reference-manifest.json +1 -0
  368. package/dist/studio/web/.next/server/webpack-runtime.js +1 -0
  369. package/dist/studio/web/.next/static/chunks/0937d497-4bac4f7c73c04ac9.js +1 -0
  370. package/dist/studio/web/.next/static/chunks/111-d4b1e0d6247794ae.js +57 -0
  371. package/dist/studio/web/.next/static/chunks/230-7633e724f4432c34.js +9 -0
  372. package/dist/studio/web/.next/static/chunks/250-ca16280838cdcfb2.js +1 -0
  373. package/dist/studio/web/.next/static/chunks/318-168841393bdaa8dd.js +1 -0
  374. package/dist/studio/web/.next/static/chunks/321-518bc727ce5b7333.js +1 -0
  375. package/dist/studio/web/.next/static/chunks/613-caa316c474dc3d66.js +1 -0
  376. package/dist/studio/web/.next/static/chunks/658-b29b1018111cdce8.js +66 -0
  377. package/dist/studio/web/.next/static/chunks/75-765230248b2aa7c3.js +10 -0
  378. package/dist/studio/web/.next/static/chunks/79-8fde571ae151dc77.js +168 -0
  379. package/dist/studio/web/.next/static/chunks/794-7f0ee86c0dc20482.js +1 -0
  380. package/dist/studio/web/.next/static/chunks/805-72d1d862ddb0aaf7.js +13 -0
  381. package/dist/studio/web/.next/static/chunks/810-bc57185c5bbe49f0.js +8 -0
  382. package/dist/studio/web/.next/static/chunks/858-0ff0c6a27bd5ed08.js +52 -0
  383. package/dist/studio/web/.next/static/chunks/868-2f9d5e42b712e805.js +6 -0
  384. package/dist/studio/web/.next/static/chunks/913-3b71b0d79bab222a.js +4 -0
  385. package/dist/studio/web/.next/static/chunks/app/_global-error/page-29993d7ce06ded15.js +1 -0
  386. package/dist/studio/web/.next/static/chunks/app/_not-found/page-29993d7ce06ded15.js +1 -0
  387. package/dist/studio/web/.next/static/chunks/app/error-54c470c75b81c772.js +1 -0
  388. package/dist/studio/web/.next/static/chunks/app/knowledge/page-4a23fe29d9a452d6.js +1 -0
  389. package/dist/studio/web/.next/static/chunks/app/knowledge/skills/[skillName]/page-4a23fe29d9a452d6.js +1 -0
  390. package/dist/studio/web/.next/static/chunks/app/layout-c8c1ba3381b66bea.js +1 -0
  391. package/dist/studio/web/.next/static/chunks/app/loading-d10eee48a75f2b12.js +1 -0
  392. package/dist/studio/web/.next/static/chunks/app/measure/[runId]/page-efd2fe3cf9a1fcc4.js +1 -0
  393. package/dist/studio/web/.next/static/chunks/app/measure/page-7c1a2923758fc2bb.js +1 -0
  394. package/dist/studio/web/.next/static/chunks/app/not-found-18281623b9a3c198.js +1 -0
  395. package/dist/studio/web/.next/static/chunks/app/observe/conversations/[threadId]/page-83d2777a89f631e7.js +1 -0
  396. package/dist/studio/web/.next/static/chunks/app/observe/conversations/[threadId]/tasks/[turnId]/page-d5900e1c74c0dce6.js +1 -0
  397. package/dist/studio/web/.next/static/chunks/app/observe/inbox/page-c159d5573caddac1.js +1 -0
  398. package/dist/studio/web/.next/static/chunks/app/observe/page-f5be9a9b66d7697e.js +1 -0
  399. package/dist/studio/web/.next/static/chunks/framework-a728c95a64c9352d.js +1 -0
  400. package/dist/studio/web/.next/static/chunks/main-12dcc6d4dacdbcea.js +5 -0
  401. package/dist/studio/web/.next/static/chunks/main-app-2cb213cabc9d7ea8.js +1 -0
  402. package/dist/studio/web/.next/static/chunks/next/dist/client/components/builtin/app-error-29993d7ce06ded15.js +1 -0
  403. package/dist/studio/web/.next/static/chunks/next/dist/client/components/builtin/forbidden-29993d7ce06ded15.js +1 -0
  404. package/dist/studio/web/.next/static/chunks/next/dist/client/components/builtin/global-error-916165c397dfccfe.js +1 -0
  405. package/dist/studio/web/.next/static/chunks/next/dist/client/components/builtin/unauthorized-29993d7ce06ded15.js +1 -0
  406. package/dist/studio/web/.next/static/chunks/polyfills-42372ed130431b0a.js +1 -0
  407. package/dist/studio/web/.next/static/chunks/webpack-2895e3ce1a584f68.js +1 -0
  408. package/dist/studio/web/.next/static/cnCcATSim0kBaeNDgIhxj/_buildManifest.js +1 -0
  409. package/dist/studio/web/.next/static/cnCcATSim0kBaeNDgIhxj/_ssgManifest.js +1 -0
  410. package/dist/studio/web/.next/static/css/763e4c18d841d615.css +1 -0
  411. package/dist/studio/web/.next/trace +3 -0
  412. package/dist/studio/web/.next/trace-build +1 -0
  413. package/dist/studio/web/next.config.mjs +14 -0
  414. package/package.json +25 -7
  415. package/dist/cli/lib/shared.d.ts +0 -4
  416. package/dist/cli/lib/shared.js +0 -10
  417. package/dist/studio/core-runs/contracts.js +0 -2
  418. package/dist/studio/core-runs/index.d.ts +0 -5
  419. package/dist/studio/core-runs/index.js +0 -5
  420. /package/dist/{cli/lib/record-evolve-outcome.d.ts → knowledge-artifacts/governance/evolve-outcome.d.ts} +0 -0
  421. /package/dist/studio/{presentation → application}/trajectory-evidence.js +0 -0
package/README.md CHANGED
@@ -8,249 +8,64 @@
8
8
 
9
9
  **English** | [简体中文](./README.zh.md)
10
10
 
11
- **Observe. Measure. Know.**
11
+ **Observe. Measure. Know.** Make knowledge changes in your AI application evidence-backed.
12
12
 
13
- **OMK makes every knowledge change in your AI application evidence-backed.**
13
+ OMK helps authors of prompts, RAG systems, skills, and agents compare versions, inspect evidence, and find knowledge gaps in real tasks. A controlled comparison keeps the **same model and evaluation samples, changing only the knowledge artifact**.
14
14
 
15
- Observe real-world performance, measure version differences, and determine whether the change is effective and the version is ready to ship.
15
+ Version 1.0 is still **in Beta iteration**; APIs and storage contracts may change. Read the [migration guide](docs/guides/v1-preview-migration.md) before upgrading an older installation.
16
16
 
17
- **Same model. Same evaluation samples. Only the knowledge artifact changes.**
17
+ ![OMK: from controlled evaluation to real-world feedback](./docs/public/omk-knowledge-flow-en-animated.gif)
18
18
 
19
- **DeepSeek Harness users:** install OMK as a native bundle, reuse the current profile for controlled evaluations, and open persisted DSH task trajectories in Studio. [Set up the DSH host plugin →](docs/reference/executors.md#deepseek-harness-prefer-the-host-plugin)
19
+ ## Start with your goal
20
20
 
21
- ![omk knowledge artifact evaluation flow: doctor / eval / observe / sample / evolve loop](./docs/public/omk-knowledge-flow-en-animated.gif)
22
-
23
- 📖 **Full documentation: [oh-my-knowledge.pages.dev](https://oh-my-knowledge.pages.dev)** (searchable, English / 简体中文)
24
-
25
- ## What knowledge means in OMK
26
-
27
- **Entities are the things knowledge describes; knowledge expresses their states, relationships, or actions in a specific context.**
28
-
29
- **How knowledge is expressed:**
30
-
31
- > **Time scope + scenario + conditions + entity A + relation or action + entity B (if any)**
32
-
33
- See [How OMK understands knowledge](docs/explanation/knowledge.md) for entity roles, shared relationships, and the distinction between knowledge and its carriers. Entity-based retrieval remains a design direction.
34
-
35
- ## What OMK helps you know
36
-
37
- | Decision | Command | Evidence you get |
38
- |---|---|---|
39
- | Is this artifact coherent enough to evaluate? | `omk doctor` | structure, dependencies, safety, and measurability checks |
40
- | Is v2 actually better than v1? | `omk eval` | one-line verdict, confidence interval, failed samples, cost |
41
- | Why did it pass or fail? | `omk studio` | report view with scores, diagnostics, and examples |
42
- | Should this version become the accepted one? | `omk promote` / `omk evolve` | evidence-gated accept or generate a better candidate |
43
- | What happened during one real AI task? | `omk observe` / Studio Task Trajectory | a trace-backed view of the request, visible Knowledge, tool calls, results, response, and user correction |
44
- | What did real usage expose? | `omk observe` / `omk sample --from-traces` | production gaps drafted for review; reviewed drafts can become eval samples |
21
+ | Goal | Entry point |
22
+ |---|---|
23
+ | Compare two skills and inspect the verdict, interval, and failed cases | [CLI quickstart](docs/quickstart-skill-eval.md) |
24
+ | Add scoring and version comparisons to a Node.js service | [Service integration guide](docs/guides/eval-runtime.md), including an example without model credentials |
25
+ | Inspect one task or find problems in historical logs | [Observation and task trajectories](docs/guides/observe-production.md) |
45
26
 
46
27
  ## Quick start
47
28
 
48
- Already have a Node.js service, retriever, or Agent? Start with [Use OMK in your service](docs/guides/eval-runtime.md): run an example without model credentials, choose a scorer, connect your service, and read the results. The command-line quickstart follows below.
29
+ You need Node.js >=22 and an authenticated model runtime; see [Requirements](#requirements). Install the Beta and preview your first comparison:
49
30
 
50
31
  ```bash
51
- npm i -g oh-my-knowledge
52
- omk init demo && cd demo
32
+ npm i -g oh-my-knowledge@next
33
+ omk init demo
34
+ cd demo
53
35
  omk eval --control code-review-v1 --treatment code-review-v2 --dry-run
54
- omk eval --control code-review-v1 --treatment code-review-v2
55
36
  ```
56
37
 
57
- Runs out of the box — no edits needed first. `omk init` scaffolds two skill variants and three sample cases; `--dry-run` previews the sealed task plan and estimated calls; `omk eval` runs the controlled A/B and opens the authenticated Core run in Studio. Once it runs, swap in your own skills and cases. To start directly with the first-party 20-case pack, replace the first command with `omk init demo --samples 20`.
58
-
59
- Prerequisite: configure one authenticated model runtime (Codex CLI, Claude Code, or an API executor; see [Requirements](#requirements)). Inside a Codex task in the ChatGPT desktop app, omk automatically selects `codex`, reads the model from `~/.codex/config.toml`, and uses the same Codex model as the default judge. Claude is not required.
60
-
61
- To make Codex the default in regular terminals, add the preference to your shell profile (for example `~/.zshrc`):
38
+ After checking the plan and estimated calls, run the evaluation (this calls the model):
62
39
 
63
40
  ```bash
64
- export OMK_EXECUTOR=codex
65
- # Optional: export OMK_MODEL="your-codex-model"
66
- ```
67
-
68
- Without `OMK_MODEL`, omk reads the model from `~/.codex/config.toml`. You can still pass `--executor codex --model <codex-model>` per command. Pass `--judge-models` or set `OMK_JUDGE_MODELS` only when you want a different judge.
69
-
70
- > The default 3-case pack is a low-cost workflow check, so `UNDERPOWERED` is expected. `--samples 20` selects a first-party, difficulty-stratified starter pack that meets omk's default heuristic evidence floor; it is not an a priori power calculation. Its provenance is `llm-generated`: use it to learn the statistical workflow, then review and replace it with real domain cases before making a release decision.
71
-
72
- > The CLI notifies you when a newer version is available (at most once per 20h); set `OMK_SKIP_UPDATE_CHECK=1` to silence it permanently.
73
-
74
- Walkthrough: [5-minute quickstart guide](docs/quickstart-skill-eval.md) (recommended for first-time users; includes demo → own skill → verdict actions). More runnable examples (Skill Map, offline executor, agent runtime, RAG, Observe) live in the repo's [example gallery](examples/README.md).
75
-
76
- Deeper: [who omk is for](docs/explanation/who-omk-is-for.md) · [CLI reference](docs/reference/cli.md) · [how it works](docs/explanation/architecture.md) · [eval sample format](docs/reference/eval-sample-format.md) · [executors](docs/reference/executors.md) · [artifact layout](docs/reference/artifact-layout.md)
77
-
78
- ## Inspect one Codex task
79
-
80
- If you only want to see what happened behind one Codex conversation, you do not need to run `observe ingest` first:
81
-
82
- ```bash
83
- omk studio
41
+ omk eval --control code-review-v1 --treatment code-review-v2
84
42
  ```
85
43
 
86
- Studio opens the local Codex conversation overview at `http://127.0.0.1:7799` by default. Select a conversation, then a task, to open **Task Trajectory**. Its four lanes — **Conversation, Actions, Results, and Knowledge** — show the request, AI responses, tool calls, tool returns, and observable context, with drill-downs into normalized events and raw logs.
87
-
88
- Running tasks are prioritized and update live. While **Following**, the trajectory advances smoothly as events arrive; after you inspect an earlier point, Studio keeps your position and offers **View updates**. Old logs without a terminal event are marked **End status not recorded** instead of remaining live forever.
89
-
90
- Task Trajectory only reconstructs facts observable in the log. It does not reveal or infer hidden reasoning. See [Observe production traces](docs/guides/observe-production.md#inspect-one-task) for the full model.
91
-
92
- ## The OMK loop
44
+ The scaffold contains two skills and three cases. This small default set checks the workflow; `UNDERPOWERED` is expected. Starter cases are marked `llm-generated`. Even the full pack created with `omk init demo-full --samples 20` only meets the default heuristic evidence floor, not an a priori power plan or a release-evidence requirement. Review and replace starter cases with real domain cases before relying on the results.
93
45
 
94
- OMK is for authors and maintainers of LLM knowledge artifacts who need a release decision, not for passive end-users of a skill. The main loop is deliberately controlled:
95
-
96
- ```text
97
- change a prompt / RAG / skill / agent artifact
98
- → run omk doctor before evaluation
99
- → run omk eval with the same model and the same samples
100
- → read the report / Studio evidence
101
- → promote a proven version or evolve a candidate
102
- → observe real usage and draft gap-derived samples for review
103
- ```
104
-
105
- The first value is the pre-ship `doctor → eval` decision. The long-term value is the closed loop: `observe` surfaces production gaps, `sample --from-traces` drafts regression samples for human review, and reviewed drafts can become fixed eval samples that make the next `eval` harder to game.
46
+ The [full walkthrough](docs/quickstart-skill-eval.md) covers runtime selection, your own skills, and interpreting results. The [example gallery](examples/README.md) offers more runnable scenarios.
106
47
 
107
48
  ## Use inside AI Coding Agents
108
49
 
109
- Install the official omk Agent Skill to let your coding agent run omk workflows from natural language:
110
-
111
50
  ```bash
112
51
  omk install omk-agent-skill
113
52
  ```
114
53
 
115
- By default, omk installs only into detected local targets it explicitly supports: Codex/AGENTS when `~/.codex` or `~/.agents` exists, and Claude Code when `~/.claude` exists. Use `--to all` to force every target omk currently knows, or `--dest` for a custom skill root.
54
+ Then ask your coding agent: “Use omk to compare these two skills.” See the [quickstart](docs/quickstart-skill-eval.md#use-inside-an-agent) for installation targets and usage. DeepSeek Harness users can use the [host plugin](docs/reference/executors.md#deepseek-harness-prefer-the-host-plugin) to reuse their current profile.
116
55
 
117
- ### Use inside Claude Code
118
-
119
- When the `omk` skill is available in Claude Code, you can invoke it directly:
120
-
121
- ```bash
122
- /omk eval # evaluate the artifact(s) in the current project
123
- /omk evolve # auto-iterate to improve a skill
124
- /omk sample # generate or fill test cases
125
- ```
56
+ The [MCP integration](docs/guides/mcp-integration.md) accepts user-authorized knowledge feedback. It records partial evidence submitted at its tool boundary; it does not automatically monitor complete conversations.
126
57
 
127
- These slash commands are natural-language entry points — the agent reads the conversation context to figure out which skill to operate on. You can also just say "compare v1 vs v2 for me" or "improve this artifact" and omk picks the right command.
128
-
129
- ### Use inside Codex
130
-
131
- Codex does not support Claude Code style `/omk ...` slash commands. Ask the agent to run the `omk` CLI directly. Inside a Codex task, omk automatically selects the Codex runtime and locally configured model:
132
-
133
- ```bash
134
- omk eval
135
- omk evolve skills/my-skill.md # one-shot: doctor → (auto-generate samples if missing) → self-iterate
136
- omk sample skills/my-skill.md
137
- ```
138
-
139
- You can also describe the goal in natural language, such as "compare v1 vs v2" or "generate test cases for this skill".
140
-
141
- `eval`, `doctor`, `sample`, `evolve`, and the LLM-enhanced observe review share the same runtime resolution. Once Codex is selected, the default judge reuses the evaluated Codex model instead of falling back to `claude:haiku`.
142
-
143
- > `omk evolve` is a one-shot loop: it runs the doctor gate first, auto-generates eval samples when the target skill has none, then self-iterates. For a brand-new skill, just run `omk evolve skills/foo.md`.
144
-
145
- ## Why this tool
146
-
147
- Knowledge engineering creates a versioning problem: every prompt, RAG recipe, skill, agent, or workflow can change behavior without changing application code. When someone asks "can we ship v2, and why?", a prettier answer or a higher anecdotal success rate is not enough.
148
-
149
- omk treats the knowledge artifact as the variable under test: **same model, same evaluation samples, only the artifact changes.** That makes the comparison explainable, repeatable, and suitable for CI or release review.
150
-
151
- ## Why omk over alternatives
152
-
153
- | | omk | promptfoo | DeepEval | LangSmith |
154
- |--|--|--|--|--|
155
- | Bootstrap CI | ✓ default | ✗ | ✗ | ✗ |
156
- | Krippendorff α (judge ↔ human) | ✓ with gold set | ✗ | ✗ | ✗ |
157
- | Length-debias judge prompt | ✓ default | ✗ | ✗ | ✗ |
158
- | Fail-closed evidence coverage | ✓ | ✗ | ✗ | ✗ |
159
- | Three-layer scoring isolation | ✓ | ✗ | partial | ✗ |
160
- | Per-variant skill isolation (construct validity) | ✓ default | ✗ | ✗ | ✗ |
161
- | Native Agent Skill | ✓ | ✗ | ✗ | ✗ |
162
- | Hosted SaaS dashboard | ✗ | ✗ | ✓ | ✓ |
163
-
164
- omk's moat is a **default-on safety net**: Bootstrap CI and length-debias are normal measurement behavior, missing evidence fails closed, and explicit Gold comparison provides judge ↔ human alpha calibration. Need a hosted SaaS dashboard? Choose LangSmith. Want quick local prompt iteration without statistics? Choose promptfoo. **Shipping to production and someone will ask "why should I trust this number?" Choose omk.**
165
-
166
- RAG-specific evals: see RAGAS (separate niche, complementary to omk). Full comparison with 7 tools across 25+ dimensions: [docs/reference/comparison.md](docs/reference/comparison.md).
167
-
168
- ## Features
169
-
170
- | Feature | What it does |
171
- |---|---|
172
- | **Core release decision** | Six conclusions + stable reason codes + exit-code routing; Studio projects the same authenticated Decision |
173
- | **Five-layer evidence graph** | Assertion / LLM / Judge / Dimension / Composite stay distinct, with coverage, cost, status, and lineage kept orthogonal |
174
- | **Multi-executor** | Claude CLI / Claude SDK / Codex CLI / Codex SDK / DeepSeek Harness / OpenAI / Anthropic API / any custom command |
175
- | **30+ assertion types** | substring, regex, JSON Schema, ROUGE/BLEU/Levenshtein similarity, agent tool-call assertions, semantic similarity, custom JS |
176
- | **Statistical rigor** | Bootstrap comparison families, length-debias, fail-closed evidence coverage, and explicit Gold agreement calibration. [Details →](docs/explanation/statistical-rigor.md) |
177
- | **RAG metrics** | `faithfulness` / `answer_relevancy` / `context_recall` — anti-hallucination + answer relevance + context coverage |
178
- | **LLM health audit** | `omk doctor` grades 7 builtin dimensions; repeats the audit (`--repeat`) and merges findings by k/n consensus |
179
- | **Production observability** | normalize Codex, Claude Code, OpenClaw, and markdown logs into source-neutral Trace IR; measure per-skill outcomes / latency / token use / knowledge-gap signals |
180
- | **Active MCP knowledge feedback (experimental)** | an MCP client actively calls a tool to write user-authorized knowledge feedback into Observation Inbox; it does not monitor conversations, and every record is marked `coverage: partial` |
181
- | **Knowledge-gap detection** | severity-weighted signals quantify risk exposure instead of claiming completeness |
182
- | **Construct-validity isolation** | `--strict-baseline` (default ON) cuts three contamination channels so baseline doesn't silently see the skill it's being compared against |
183
- | **Git & remote sources** | install / eval from a local git ref or a remote git URL (`--git-url`); directory-skills run in a content-addressed **isolated copy** so `references/` assets are real measured input, not just `SKILL.md` |
184
- | **Evidence-gated management** | `omk install` registers a managed record; `omk eval` auto-writes evidence bound by content fingerprint, moving a skill `installed → measurable`; `omk list` surfaces each managed skill's status (installed / measurable / promoted / stale); `omk promote` accepts a version once its evidence passes the gate (default PROGRESS only); `omk rollback` revokes that acceptance, returning the skill to `measurable`. [spec →](docs/specs/evidence-gated-management.md) |
185
- | **Sample design science** | sample schema with `capability` / `difficulty` / `construct` / `provenance` metadata (HF Dataset Cards style); studio surfaces coverage breakdown plus `rubric_clarity_low` / `capability_thin` flags. [docs/specs/sample-design-spec.md](docs/specs/sample-design-spec.md) |
186
- | **Multi-judge ensemble** | `--judge-models claude:opus,openai-api:gpt-4o` cross-vendor scoring + agreement metrics |
187
- | **Multi-run variance** | `--repeat N` publishes independent Core runs and an Evaluation Series variance analysis |
188
- | **MCP URL fetching** | pull content from private-doc URLs via an MCP server (SSO-protected knowledge bases, etc.) |
189
- | **Auto analysis** | detects low-discrimination assertions, flat scores, all-pass / all-fail, expensive samples |
190
- | **Traceability** | reports carry CLI version, Node version, artifact version fingerprint, judge prompt hash |
191
- | **EN / ZH views** | bilingual local Studio views selected through the report URL |
192
-
193
- ### Run inside an existing DeepSeek Harness
194
-
195
- Install OMK as a DSH bundle to reuse the profile's model, credentials, tools, and sandbox:
196
-
197
- ```bash
198
- dsh plugin --profile web add oh-my-knowledge
199
- dsh --profile web
200
- ```
201
-
202
- Inside DSH:
203
-
204
- - `/omk eval eval.yaml` runs every sample in an isolated DSH session while OMK owns the report and statistics;
205
- - `/omk observe` lists recent terminal sessions;
206
- - `/omk observe <session-id>` reads a consistent snapshot and returns its Studio Task Trajectory URL.
207
-
208
- Observe uses the profile's `sessionPersistence` directly, so users do not export or locate JSONL / SQLite files. The first version is offline-only and does not live-follow a session that is still being written. See the [executor guide](docs/reference/executors.md#deepseek-harness-prefer-the-host-plugin) and [observe guide](docs/guides/observe-production.md#inspect-a-task-inside-deepseek-harness).
209
-
210
- ### Connect an MCP client (experimental)
211
-
212
- > **Positioning: OMK MCP is an active knowledge-feedback interface, not a conversation monitor.** OMK MCP alone cannot automatically monitor or subscribe to complete conversations in Codex, ChatGPT, or another client. OMK receives a record only after the client, model, or component actively calls `save_observation` with authorized content. An Agent Skill may automatically recognize a potential feedback moment, but saving it still requires user confirmation and an explicit MCP tool call.
213
-
214
- `omk-mcp` is a client-neutral stdio MCP server. Codex and other local MCP clients can start it directly; a private host can compose the exported Streamable HTTP adapter. The client calls `save_observation` only after the user explicitly asks to record feedback, appends the feedback and optional evidence under `.omk/observe/inbox/captures/`, and can render an inline MCP Apps review card for a human verdict and regression-sample draft.
215
-
216
- In Codex, explicitly invoke the OMK Skill to submit the current knowledge feedback:
217
-
218
- ```text
219
- $omk feedback
220
- ```
221
-
222
- The explicit invocation itself confirms the save. The agent selects the most recent clear issue from the visible conversation and calls `save_observation` with `confirmedByUser: true`; it asks first when the candidate is ambiguous. This shortcut is not a CLI command, and it does not automatically review the observation, draft a sample, or write to a gold set.
223
-
224
- ```bash
225
- omk-mcp
226
- ```
58
+ ## Use the evidence
227
59
 
228
- Every record carries `coverageStatus: partial`: OMK observes its tool boundary, submitted feedback, and optional evidence, but not the full conversation, other tool calls, or hidden reasoning. Continuous monitoring requires a host that is authorized to access an event stream and actively forwards those events; that is a host-integration capability, not an OMK MCP capability. Conversation IDs, turn IDs, and idempotency keys are hashed rather than persisted verbatim. For a private-host Streamable HTTP integration, see [Compose the OMK MCP integration](docs/guides/mcp-integration.md).
60
+ `doctor` checks the artifact, `eval` compares versions, and `studio` presents results and raw evidence. When evidence meets the gate, `promote` can accept a version; `evolve` can generate a candidate. Gaps found by `observe` can become draft cases for review before the next evaluation.
229
61
 
230
- ### Local storage
62
+ Conclusions depend on the cases, scoring criteria, and execution environment. Observation signals are not causal conclusions, and generated cases are not an independent release-validation set. See [statistical rigor](docs/explanation/statistical-rigor.md) and the [three-stage workflow](docs/explanation/three-stage-workflow.md) for the method and limits.
231
63
 
232
- Project data uses the domain-oriented `.omk/` v2 layout: durable evidence lives under `eval/`, `doctor/`, and `observe/`; governance records live under `governance/`; backups remain recoverable; and only rebuildable work belongs in `state/`. Machine tools, tunnels, caches, and materialized copies stay under `~/.oh-my-knowledge/state/`, never in a project. This release neither reads nor migrates the earlier storage layout.
64
+ Project evidence lives under `.omk/`; machine-level state lives under `~/.oh-my-knowledge/`. The current version neither reads nor migrates the old storage layout. Back up before upgrading and follow the [migration guide](docs/guides/v1-preview-migration.md) to establish new evidence.
233
65
 
234
66
  ## Documentation
235
67
 
236
- The full docs are published at **[oh-my-knowledge.pages.dev](https://oh-my-knowledge.pages.dev)** — searchable, with an English / 简体中文 switcher. Key pages:
237
-
238
- - **[How it works](docs/explanation/architecture.md)** — input compilation, sealed Core execution, analysis, persistence, and Studio projections
239
- - **[Eval sample format](docs/reference/eval-sample-format.md)** — sample schema, scoring formulas, 30+ assertion types, custom JS assertions
240
- - **[CLI reference](docs/reference/cli.md)** — all top-level commands with bash examples and flag tables
241
- - **[Migrate to the 1.0 preview](docs/guides/v1-preview-migration.md)** — install channel, storage reset, sample protocol, CLI automation, and embedded API changes since 0.54
242
- - **[Evaluation Core cutover](docs/guides/eval-core-cutover.md)** — `BREAKING-SCHEMA` storage, resume, Studio, Gold, managed-evidence, and evolve migration
243
- - **[Embed OMK in a service](docs/guides/eval-runtime.md)** — choose a scorer, connect a Node.js service, and interpret scores and failures
244
- - **[Storage layout v2](docs/specs/storage-layout-spec.md)** — project/global domains, compatibility boundary, and Git policy
245
- - **[Executors](docs/reference/executors.md)** & **[artifact layout](docs/reference/artifact-layout.md)** — built-in / custom executors; how `variant` resolves to an artifact + runtime context
246
- - **[How-to guides](docs/guides/agent-eval.md)** — [evaluate an agent](docs/guides/agent-eval.md) (project runtime context) and [use non-Claude models](docs/guides/non-claude-models.md) (GLM / Qwen / DeepSeek / Moonshot / Ollama)
247
- - **[Observe & inspect task trajectories](docs/guides/observe-production.md)** — browse local Codex conversations, drill into one task, and follow its observable execution live
248
- - **[Quickstart](docs/quickstart-skill-eval.md)** — first-time five-minute walkthrough
249
- - **[Example gallery](https://github.com/lizhiyao/oh-my-knowledge/tree/main/examples)** — a set of runnable examples in the repo, arranged simplest-to-richest
250
- - **[Sample design spec](docs/specs/sample-design-spec.md)** — capability / construct / provenance metadata; industry-gap mapping
251
- - **[Statistical rigor](docs/explanation/statistical-rigor.md)** — why Bootstrap CI / Gold agreement / length-debias / evidence coverage matter
252
- - **[Comparison with 7 tools](docs/reference/comparison.md)** — 25+ dimensions across promptfoo / DeepEval / RAGAS / OpenAI Evals / LangSmith / lm-eval-harness / inspect-ai
253
- - **[Evidence-gated management](docs/specs/evidence-gated-management.md)** — managed records, lifecycle states (installed / measurable / promoted / stale), install → eval → measurable → promote → rollback
68
+ [Documentation index](docs/README.md) · [Online docs](https://oh-my-knowledge.pages.dev) · [CLI reference](docs/reference/cli.md) · [Sample format](docs/reference/eval-sample-format.md) · [Executors](docs/reference/executors.md) · [How OMK understands knowledge](docs/explanation/knowledge.md)
254
69
 
255
70
  ## Environment variables
256
71
 
package/README.zh.md CHANGED
@@ -8,249 +8,64 @@
8
8
 
9
9
  [English](./README.md) | **简体中文**
10
10
 
11
- **Observe. Measure. Know.**
11
+ **Observe. Measure. Know.** 让 AI 应用的知识改动有据可依。
12
12
 
13
- **OMK,让 AI 应用的知识改动有据可依。**
13
+ OMK 帮助 prompt、RAG、skill 和 agent 的作者比较版本、检查证据,并从真实任务中发现知识缺口。受控比较遵循:**相同模型,相同评测用例,只改变知识载体。**
14
14
 
15
- 观测真实表现,量出版本差异,判断改动是否有效、版本能否发布。
15
+ 当前 1.0 仍处于 **Beta 迭代期**,接口与存储契约可能继续变化。从旧版本升级前,请先阅读[迁移指南](docs/zh/guides/v1-preview-migration.md)。
16
16
 
17
- **相同模型,相同评测用例,只改变知识载体。**
17
+ ![OMK:从受控评测到真实使用反馈](./docs/public/omk-knowledge-flow-animated.gif)
18
18
 
19
- **DeepSeek Harness 用户:** OMK 可作为原生 bundle 安装,复用当前 profile 做受控评测,并在 Studio 打开已持久化的 DSH 任务轨迹。[接入 DSH 宿主插件 →](docs/zh/reference/executors.md#deepseek-harness优先使用宿主插件)
19
+ ## 从你的目标开始
20
20
 
21
- ![omk 知识载体评测流程:doctor / eval / observe / sample / evolve 闭环](./docs/public/omk-knowledge-flow-animated.gif)
22
-
23
- 📖 **完整文档:[oh-my-knowledge.pages.dev/zh](https://oh-my-knowledge.pages.dev/zh/)**(可搜索,可切换英文)
24
-
25
- ## OMK 中的知识是什么
26
-
27
- **实体是知识所描述的事物;知识表达实体在特定上下文中的状态、关系或行为。**
28
-
29
- **知识的表达形式:**
30
-
31
- > **时间范围+场景+条件+实体 A+关系或行为+实体 B(如有)**
32
-
33
- 实体角色、多实体关联及知识与载体的区别,见[OMK 如何理解知识](docs/zh/explanation/knowledge.md)。实体关联检索仍是设计方向。
34
-
35
- ## OMK 让你知道什么
36
-
37
- | 决策问题 | 命令 | 你会得到的证据 |
38
- |------|------|------|
39
- | 这份知识载体是否清楚到值得评测? | `omk doctor` | 结构、依赖、安全性、可测性检查 |
40
- | v2 是否真的优于 v1? | `omk eval` | 一行 verdict、置信区间、失败样本、成本 |
41
- | 它为什么通过或失败? | `omk studio` | 分数、诊断、样本证据的报告视图 |
42
- | 这个版本是否应成为接受版本? | `omk promote` / `omk evolve` | 基于证据接受,或生成更好的候选版 |
43
- | 一次真实 AI 任务中发生了什么? | `omk observe` / Studio 任务轨迹 | 请求、可见知识、工具调用与结果、回答和用户纠正的可核验轨迹 |
44
- | 真实使用暴露了哪些知识缺口? | `omk observe` / `omk sample --from-traces` | 将线上缺口生成待复核草稿,复核后再沉淀为评测样本 |
21
+ | 想做什么 | 入口 |
22
+ |---|---|
23
+ | 比较两版 skill,获得判定、置信区间与失败用例 | [命令行快速上手](docs/zh/quickstart-skill-eval.md) |
24
+ | 在 Node.js 服务中接入评分与版本对比 | [服务接入指南](docs/zh/guides/eval-runtime.md),含无需模型凭证的示例 |
25
+ | 看清一次任务,或从历史日志发现问题 | [观测与任务轨迹](docs/zh/guides/observe-production.md) |
45
26
 
46
27
  ## 快速开始
47
28
 
48
- 已有 Node.js 服务、检索系统或 Agent,希望接入评分与版本对比?从[在服务中使用 OMK](docs/zh/guides/eval-runtime.md)开始:先运行无需模型凭证的示例,再选择评分方法、接入自己的服务并解读结果。下面是命令行上手流程。
29
+ 需要 Node.js >=22 和一个已认证的模型 runtime,详见[系统要求](#系统要求)。安装 Beta 并预览第一次比较:
49
30
 
50
31
  ```bash
51
- npm i -g oh-my-knowledge
52
- omk init demo && cd demo
32
+ npm i -g oh-my-knowledge@next
33
+ omk init demo
34
+ cd demo
53
35
  omk eval --control code-review-v1 --treatment code-review-v2 --dry-run
54
- omk eval --control code-review-v1 --treatment code-review-v2
55
36
  ```
56
37
 
57
- 开箱即跑:`omk init` 脚手架好两版 skill 和三条评测用例,不用先改任何文件;`--dry-run` 预览 sealed task plan 与预估调用次数;`omk eval` 跑控制变量 A/B,并在 Studio 打开经过认证的 Core run。跑通后再把 skill 和用例换成你自己的。希望首次就使用官方 20 条完整起步集时,把第一条命令换成 `omk init demo --samples 20`。
58
-
59
- 前置:准备一个已认证的模型 runtime(Codex CLI、Claude Code 或 API 执行器,见[系统要求](#系统要求))。在 ChatGPT desktop 的 Codex 任务里,omk 会自动使用 `codex`,从 `~/.codex/config.toml` 读取模型,并默认用同一个 Codex 模型担任评委,不依赖 Claude。
60
-
61
- 普通终端想固定使用 Codex,可以把偏好加入 shell 配置,例如 `~/.zshrc`:
62
-
63
- ```bash
64
- export OMK_EXECUTOR=codex
65
- # 可选:export OMK_MODEL="你的 Codex 模型"
66
- ```
67
-
68
- 不设置 `OMK_MODEL` 时,omk 会读取 `~/.codex/config.toml` 的模型。也可以继续逐次显式传 `--executor codex --model <codex-model>`。自定义评委时再传 `--judge-models` 或设置 `OMK_JUDGE_MODELS`。
69
-
70
- > 默认 3 条用例是低成本流程检查,出现「数据不足(UNDERPOWERED)」符合预期。`--samples 20` 会选择经过难度分层的官方起步用例集,达到 omk 默认的启发式证据下限,但这不是先验功效计算。其来源明确标记为 `llm-generated`:它适合学习统计流程,发布判断前仍应人工复核并替换为真实领域用例。
71
-
72
- > 命令行有新版本时会自动提示(每 20 小时最多一次);想永久关闭该提醒,设环境变量 `OMK_SKIP_UPDATE_CHECK=1` 即可。
73
-
74
- 手把手教程:[5 分钟快速上手](docs/zh/quickstart-skill-eval.md)(推荐第一次跑评测的用户,覆盖 demo → 自己的 skill → verdict 动作)。更多可跑示例(Skill Map、离线执行器、agent runtime、RAG、Observe)见仓库的[示例画廊](examples/README.zh.md)。
75
-
76
- 深入:[为谁、解决什么](docs/zh/explanation/who-omk-is-for.md) · [CLI 参考](docs/zh/reference/cli.md) · [工作原理](docs/zh/explanation/architecture.md) · [评测用例格式](docs/zh/reference/eval-sample-format.md) · [执行器](docs/zh/reference/executors.md) · [知识载体布局](docs/zh/reference/artifact-layout.md)
77
-
78
- ## 先看清一次 Codex 任务
79
-
80
- 只想知道一次 Codex 对话背后发生了什么,不需要先运行 `observe ingest`:
38
+ 检查计划和预估调用次数后,执行评测(会调用模型):
81
39
 
82
40
  ```bash
83
- omk studio
84
- ```
85
-
86
- Studio 默认在 `http://127.0.0.1:7799` 打开本机 Codex 对话总览。先选择一段对话,再选择其中一次任务,即可进入「任务轨迹」:按**对话、执行、结果、知识**四条泳道查看请求、AI 回答、工具调用、工具返回和可见上下文,并可下钻到规范化事件与原始日志。
87
-
88
- 进行中的任务会优先显示并实时更新。保持「跟随中」时,轨迹会随新事件平滑前进;手动查看历史位置后,页面保留当前位置并提示「查看更新」。旧日志如果没有记录结束事件,会标记为「未记录结束状态」,不会一直冒充进行中。
89
-
90
- 任务轨迹只还原日志中可观测的事实,不展示或推断隐藏思维。完整说明见[观测与任务轨迹](docs/zh/guides/observe-production.md#查看一次任务)。
91
-
92
- ## OMK 的闭环
93
-
94
- OMK 主要给 LLM 知识载体的作者 / 维护者用,帮他们做发布判断;它不是给被动安装 skill 的普通使用者用的。主流程刻意保持受控:
95
-
96
- ```text
97
- 改了一份 prompt / RAG / skill / agent 知识载体
98
- → 先跑 omk doctor
99
- → 用相同模型、相同评测用例跑 omk eval
100
- → 看 report / Studio 里的证据
101
- → 证据足够则 promote,证据不足则 evolve 候选版
102
- → observe 真实使用,把缺口生成待复核评测草稿
41
+ omk eval --control code-review-v1 --treatment code-review-v2
103
42
  ```
104
43
 
105
- 第一价值是发布前的 `doctor → eval` 判断。长期价值是闭环:`observe` 暴露真实使用里的知识缺口,`sample --from-traces` 先生成待人工复核的评测用例草稿,复核后的草稿再沉淀为固定评测样本,下一次 `eval` 就更难被偶然样本骗过。
44
+ 脚手架包含两版 skill 和三条用例。默认小样本用于检查流程,出现 `UNDERPOWERED` 符合预期。官方起步用例标记为 `llm-generated`;即使用 `omk init demo-full --samples 20` 创建完整起步集,也只是达到默认启发式证据下限,不等于完成功效规划或具备发布证据。实际使用前应人工复核并替换为真实领域用例。
106
45
 
107
- ## 在 AI Coding Agent 中使用
46
+ [完整教程](docs/zh/quickstart-skill-eval.md)介绍模型选择、换成自己的 skill 和结果解读;[示例画廊](examples/README.zh.md)提供更多可运行场景。
108
47
 
109
- 安装 omk 官方 Agent Skill 后,可以直接用自然语言让 coding agent 跑 omk 工作流:
48
+ ## 在 Agent 中使用
110
49
 
111
50
  ```bash
112
51
  omk install omk-agent-skill
113
52
  ```
114
53
 
115
- 默认只会安装到本机已检测到、且 omk 明确支持的目标:检测到 `~/.codex` 或 `~/.agents` 时写入 Codex/AGENTS,检测到 `~/.claude` 时写入 Claude Code。要强制写入当前 omk 已知的全部目标,用 `--to all`;要指定自定义 skill 根目录,用 `--dest`。
116
-
117
- ### 在 Claude Code 中使用
118
-
119
- 当 `omk` skill 已在 Claude Code 中可用时,可以直接这样调用:
120
-
121
- ```bash
122
- /omk eval # 评测当前项目的知识载体
123
- /omk evolve # 多轮自动迭代改进 skill
124
- /omk sample # 生成或补齐评测用例
125
- ```
54
+ 安装后,可以对 coding agent 说:“用 omk 比较这两版 skill。”安装目标与使用方法见[快速上手](docs/zh/quickstart-skill-eval.md#在-agent-中使用)。DeepSeek Harness 用户可直接使用[宿主插件](docs/zh/reference/executors.md#deepseek-harness优先使用宿主插件),复用当前 profile。
126
55
 
127
- 这些 slash command 是自然语言入口 —— agent 会从对话上下文里推断要操作哪个 skill。也可以直接说「帮我评测 v1 和 v2 的差异」、「改进一下这个知识载体」,omk 会自动理解意图并调用对应命令。
56
+ [MCP 集成](docs/zh/guides/mcp-integration.md)提供用户授权的主动知识反馈入口。它仅记录提交到工具边界的部分证据,不自动监听完整对话。
128
57
 
129
- ### 在 Codex 中使用
130
-
131
- Codex 默认不支持 `/omk ...` 这种 Claude Code 风格的 slash command。直接让 agent 执行 `omk` CLI 即可;在 Codex 任务里,omk 会自动选择 Codex runtime 和本机配置的模型:
132
-
133
- ```bash
134
- omk eval
135
- omk evolve skills/my-skill.md # 一键:体检 →(无用例则自动生成)→ 自迭代
136
- omk sample skills/my-skill.md
137
- ```
138
-
139
- 也可以直接用自然语言描述目标,例如「比较 v1 和 v2 的评测差异」、「为这个 skill 生成评测用例」。
140
-
141
- `eval`、`doctor`、`sample`、`evolve` 和 observe 的 LLM 增强复盘共用同一套 runtime 解析。Codex 被选中后,默认评委沿用被测 Codex 模型,不会回落到 `claude:haiku`。
142
-
143
- > `omk evolve` 是一键闭环:默认先跑 doctor 体检,目标 skill 没有评测用例时会自动生成一批,再进入多轮自迭代。全新 skill 直接 `omk evolve skills/foo.md` 即可。
144
-
145
- ## 为什么需要这个工具
146
-
147
- 知识工程带来的是一个版本治理问题:prompt、RAG 配方、skill、agent、workflow 都会改变模型行为,但这些改动未必体现在应用代码里。当有人追问「v2 能不能发、为什么」时,回答更顺眼、体感更好,远远不够。
148
-
149
- omk 把知识载体当作被测变量:**相同模型、相同评测用例,只改变知识载体。** 这样得到的对比才可解释、可复跑,也适合进入 CI 或发布评审。
150
-
151
- ## 为什么选 omk
152
-
153
- | | omk | promptfoo | DeepEval | LangSmith |
154
- |--|--|--|--|--|
155
- | Bootstrap 置信区间 | ✓ 默认 | ✗ | ✗ | ✗ |
156
- | Krippendorff α(评委 ↔ 人工) | ✓ 加 gold 即开 | ✗ | ✗ | ✗ |
157
- | 长度去偏的评委 prompt | ✓ 默认 | ✗ | ✗ | ✗ |
158
- | 缺失证据失败关闭 | ✓ | ✗ | ✗ | ✗ |
159
- | 三层独立评分 | ✓ | ✗ | 部分 | ✗ |
160
- | 用例隔离(construct validity) | ✓ 默认 | ✗ | ✗ | ✗ |
161
- | 原生 Agent Skill | ✓ | ✗ | ✗ | ✗ |
162
- | 托管 SaaS 看板 | ✗ | ✗ | ✓ | ✓ |
163
-
164
- omk 的护城河是 **default-on 安全网**:Bootstrap CI 与长度去偏属于正常测量行为,缺失证据失败关闭,显式 Gold comparison 提供评委 ↔ 人工 alpha 校准。需要 SaaS 看板?选 LangSmith。要快速 prompt 迭代不要统计层?选 promptfoo。**要发到生产且会被问「为什么应该相信这个数字」?选 omk。**
165
-
166
- RAG 专项评测请看 RAGAS(独立 niche,跟 omk 互补)。完整对比(7 个工具 × 25+ 维度): [docs/zh/reference/comparison.md](docs/zh/reference/comparison.md)
167
-
168
- ## 特性
169
-
170
- | 特性 | 说明 |
171
- |------|------|
172
- | **Core 发布决定** | 六种判定 + 稳定 reason code + exit code 路由;Studio 投影同一份经过认证的 Decision |
173
- | **五层 evidence graph** | Assertion / LLM / Judge / Dimension / Composite 保持独立,coverage、成本、状态与 lineage 与分数正交 |
174
- | **多执行器** | 支持 Claude CLI / Claude SDK / Codex CLI / Codex SDK / DeepSeek Harness / OpenAI / Anthropic API 及自定义命令 |
175
- | **30+ 种断言** | 包含子串、正则、JSON Schema、ROUGE/BLEU/Levenshtein 相似度、Agent 工具调用、语义相似度、自定义函数等 |
176
- | **统计严谨性** | Bootstrap comparison family、长度去偏、缺失证据失败关闭与显式 Gold agreement 校准。[详情 →](docs/zh/explanation/statistical-rigor.md) |
177
- | **RAG metrics** | `faithfulness` / `answer_relevancy` / `context_recall` 三 metric — 反幻觉 + 切题度 + context 覆盖 |
178
- | **LLM 健康度审计** | `omk doctor` 给 7 个内置维度独立打分;重复采样(`--repeat`)+ k/n 共识归并 |
179
- | **线上 session 观测** | 将 Codex、Claude Code、OpenClaw 与 markdown 日志统一为 source-neutral Trace IR,测量各 skill 的执行结果、耗时、token 使用和知识缺口信号 |
180
- | **MCP 主动知识反馈(实验性)** | 由 MCP 客户端主动调用工具,把用户明确授权的 knowledge 反馈写入 Observation Inbox;不监听对话,并固定标记 `coverage: partial` |
181
- | **知识缺口识别** | 严重度加权的信号量化风险敞口,不宣称完备性 |
182
- | **用例隔离 (construct validity)** | `--strict-baseline`(默认开)三堵 baseline 拿到被测 skill 的污染路径 |
183
- | **Git / 远端源** | install / eval 支持本地 git ref 或远端 git URL(`--git-url`);目录-skill 在内容寻址**隔离副本**里执行,`references/` 资产是真实测量输入,不只是 `SKILL.md` |
184
- | **证据门控管理** | `omk install` 登记受管记录;`omk eval` 按内容指纹自动写入证据,把 skill 从 `installed` 推到 `measurable`;`omk list` 查看各受管 skill 的状态(installed / measurable / promoted / stale);`omk promote` 在证据过门禁(默认仅 PROGRESS)后把该版本接受为当前版本;`omk rollback` 撤销这次接受,让 skill 回到 `measurable`。[规范 →](docs/zh/specs/evidence-gated-management.md) |
185
- | **用例设计科学性** | Sample schema 加 `capability` / `difficulty` / `construct` / `provenance` 元数据字段(HF Dataset Cards 风),studio 输出 coverage 分桶 + `rubric_clarity_low` / `capability_thin` issue。[docs/zh/specs/sample-design-spec.md](docs/zh/specs/sample-design-spec.md) |
186
- | **多评委 ensemble** | `--judge-models claude:opus,openai-api:gpt-4o` 跨厂商评分 + agreement 度量 |
187
- | **多轮方差分析** | `--repeat N` 发布相互独立的 Core run 与 Evaluation Series 方差分析 |
188
- | **MCP URL 获取** | 通过 MCP Server 获取私有文档 URL 内容(SSO 保护的知识库等) |
189
- | **自动分析** | 检测低区分度断言、均匀分数、全通过/全失败、高成本用例 |
190
- | **可追溯性** | 报告含 CLI 版本、Node 版本、知识载体版本指纹、judge prompt hash |
191
- | **中英视图** | 通过报告 URL 选择中英文的本地 Studio 视图 |
192
-
193
- ### 在已有 DeepSeek Harness 中运行
194
-
195
- OMK 可以作为 DSH bundle 安装到现有 profile,直接复用其模型、凭证、工具与 sandbox:
196
-
197
- ```bash
198
- dsh plugin --profile web add oh-my-knowledge
199
- dsh --profile web
200
- ```
201
-
202
- 进入 DSH 后:
203
-
204
- - `/omk eval eval.yaml`:每条用例使用独立 DSH session,报告仍由 OMK 生成;
205
- - `/omk observe`:列出最近已结束的 session;
206
- - `/omk observe <session-id>`:只读摄取一致快照,并返回 Studio 任务轨迹链接。
207
-
208
- observe 直接使用 profile 的 `sessionPersistence`,无需导出或定位 JSONL/SQLite 文件;首版不实时跟随正在写入的 session。详见[执行器文档](docs/zh/reference/executors.md#deepseek-harness优先使用宿主插件)与[观测指南](docs/zh/guides/observe-production.md#在-deepseek-harness-中查看任务轨迹)。
209
-
210
- ### 连接 MCP 客户端(实验性)
211
-
212
- > **定位:OMK MCP 是主动知识反馈接口,不是对话监听器。** 仅靠 OMK MCP 无法自动监听或订阅 Codex、ChatGPT 等客户端的完整对话。只有客户端、模型或 component 主动调用 `save_observation` 并提交授权内容后,OMK 才能收到并保存这条反馈。Agent Skill 可以自动识别潜在反馈时机,但识别结果仍须经过用户确认和一次显式 MCP 工具调用。
213
-
214
- `omk-mcp` 提供与客户端无关的 stdio MCP Server。Codex 等本地 MCP 客户端可直接启动它,私有宿主也可组合导出的 Streamable HTTP adapter。客户端只在用户明确要求记录时调用 `save_observation`,把反馈和可选证据追加到 `.omk/observe/inbox/captures/`,并可渲染对话内 MCP Apps 复核卡片,供人工确认问题和生成 regression sample 草稿。
215
-
216
- 在 Codex 中可以显式调用 OMK Skill 快捷提交当前知识反馈:
217
-
218
- ```text
219
- $omk feedback
220
- ```
221
-
222
- 这次显式调用本身视为保存确认。Agent 会从当前可见对话中选择最近一个明确问题,以 `confirmedByUser: true` 调用 `save_observation`;候选不明确时会先追问。该快捷入口不是 CLI 命令,也不会自动复核、生成 sample 或写入 gold set。
223
-
224
- ```bash
225
- omk-mcp
226
- ```
58
+ ## 如何使用证据
227
59
 
228
- 每条记录都固定携带 `coverageStatus: partial`:已观测的是 OMK 工具边界、用户提交的反馈及可选证据;未观测的是完整对话、其他工具调用和隐藏推理。需要持续监听时,必须由有权访问事件流的宿主系统主动转交事件,这属于宿主集成能力,不属于 OMK MCP 自身能力。对话 ID、turn ID 与幂等键只用于生成哈希,不会原样落盘。私有宿主的 Streamable HTTP 组合方式见[组合 OMK MCP 集成](docs/zh/guides/mcp-integration.md)。
60
+ `doctor` 检查知识载体,`eval` 做受控比较,`studio` 展示结果与原始证据。证据满足条件后可以 `promote` 接受版本,或用 `evolve` 生成候选;`observe` 暴露的缺口可转成待复核用例,再进入下一轮评测。
229
61
 
230
- ### 本地存储
62
+ 结论受用例、评分准则和执行环境约束。观测信号不等于因果结论,生成的样本也不能直接充当独立发布验证集。原理与限制见[统计严谨性](docs/zh/explanation/statistical-rigor.md)和[三阶段工作流](docs/zh/explanation/three-stage-workflow.md)。
231
63
 
232
- 项目数据采用领域化的 `.omk/` v2 布局:持久证据进入 `eval/`、`doctor/`、`observe/`,治理记录进入 `governance/`,备份保持可恢复,只有可重建工作进入 `state/`。机器工具、隧道、缓存和物化副本只能进入 `~/.oh-my-knowledge/state/`,不得写进项目。本期不读取、也不迁移旧存储布局。
64
+ 项目证据保存在 `.omk/`,机器级状态位于 `~/.oh-my-knowledge/`。当前版本不读取或迁移旧存储布局;升级前备份,按[迁移指南](docs/zh/guides/v1-preview-migration.md)重新建立证据。
233
65
 
234
66
  ## 文档
235
67
 
236
- 完整文档已发布到 **[oh-my-knowledge.pages.dev/zh](https://oh-my-knowledge.pages.dev/zh/)** —— 可搜索,可切换英文。重点页面:
237
-
238
- - **[工作原理](docs/zh/explanation/architecture.md)** —— 输入编译、sealed Core 执行、分析、持久化与 Studio projection
239
- - **[评测用例格式](docs/zh/reference/eval-sample-format.md)** —— sample schema、评分公式、30+ 断言类型、自定义 JS 断言
240
- - **[CLI 参考](docs/zh/reference/cli.md)** —— 顶层命令的 bash 示例和 flag 表
241
- - **[迁移到 1.0 预览版](docs/zh/guides/v1-preview-migration.md)** —— 从 `0.54` 升级时的安装渠道、存储重建、用例协议、CLI 自动化与嵌入式 API 变化
242
- - **[Evaluation Core 生产切换](docs/zh/guides/eval-core-cutover.md)** —— `BREAKING-SCHEMA` 存储、resume、Studio、Gold、受管证据与 evolve 迁移
243
- - **[在服务中嵌入 OMK](docs/zh/guides/eval-runtime.md)** —— 选择评分方法、接入 Node.js 服务、解读分数与失败原因
244
- - **[存储布局 v2](docs/zh/specs/storage-layout-spec.md)** —— 项目/全局领域、迁移兼容与 Git 策略
245
- - **[执行器](docs/zh/reference/executors.md)** & **[知识载体布局](docs/zh/reference/artifact-layout.md)** —— 内置 / 自定义执行器;variant 如何解析为 artifact + runtime context
246
- - **[操作指南](docs/zh/guides/agent-eval.md)** —— [评测 agent](docs/zh/guides/agent-eval.md)(项目 runtime context)与[使用非 Claude 模型](docs/zh/guides/non-claude-models.md)(GLM / 通义 / DeepSeek / Moonshot / Ollama)
247
- - **[观测与任务轨迹](docs/zh/guides/observe-production.md)** —— 浏览本机 Codex 对话,下钻一次任务,并实时跟随可观测执行过程
248
- - **[快速上手](docs/zh/quickstart-skill-eval.md)** —— 第一次跑评测的 5 分钟教程
249
- - **[示例画廊](https://github.com/lizhiyao/oh-my-knowledge/tree/main/examples)** —— 仓库里一组可直接跑的示例,按由简到全排成上手路径
250
- - **[用例设计规范](docs/zh/specs/sample-design-spec.md)** —— capability / construct / provenance 元数据;行业 gap 映射
251
- - **[统计严谨性](docs/zh/explanation/statistical-rigor.md)** —— 为什么 Bootstrap CI / Gold agreement / 长度去偏 / evidence coverage 重要
252
- - **[7 工具对比](docs/zh/reference/comparison.md)** —— promptfoo / DeepEval / RAGAS / OpenAI Evals / LangSmith / lm-eval-harness / inspect-ai 等 25+ 维度横评
253
- - **[证据门控管理](docs/zh/specs/evidence-gated-management.md)** —— 受管记录、生命周期状态(installed / measurable / promoted / stale)、install → eval → measurable → promote → rollback
68
+ [完整文档与导航](docs/zh/README.md) · [在线文档](https://oh-my-knowledge.pages.dev/zh/) · [CLI 参考](docs/zh/reference/cli.md) · [用例格式](docs/zh/reference/eval-sample-format.md) · [执行器](docs/zh/reference/executors.md) · [OMK 如何理解知识](docs/zh/explanation/knowledge.md)
254
69
 
255
70
  ## 环境变量
256
71
 
@@ -26,7 +26,7 @@ argument-hint: "<doctor|eval|evolve|init|install|list|observe|promote|rollback|s
26
26
  除 `$omk feedback` 快捷入口外,运行 `which omk` 检查是否已安装。如果未安装,告诉用户:
27
27
 
28
28
  ```
29
- npm i oh-my-knowledge -g
29
+ npm i -g oh-my-knowledge@next
30
30
  ```
31
31
 
32
32
  omk CLI 顶层命令包括:`init` / `install` / `list` / `promote` / `rollback` / `doctor` / `eval` / `observe` / `evolve` / `sample` / `studio`。没有 `bench` / `improve` / `gen-samples` 这些旧子命令名 —— 如果你在历史 SKILL / 文档里看到了,那是 v0.30 命令树重构之前的写法。