oh-my-knowledge 0.26.0 → 0.28.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/README.md +105 -346
- package/README.zh.md +142 -375
- package/dist/src/analysis/report-diagnostics.d.ts +2 -2
- package/dist/src/analysis/report-diagnostics.js +2 -2
- package/dist/src/analysis/sample-diagnostics.d.ts +3 -3
- package/dist/src/analysis/sample-diagnostics.js +3 -3
- package/dist/src/authoring/generator.d.ts.map +1 -1
- package/dist/src/authoring/generator.js +9 -8
- package/dist/src/authoring/generator.js.map +1 -1
- package/dist/src/cli/cli-exit.d.ts +15 -0
- package/dist/src/cli/cli-exit.d.ts.map +1 -0
- package/dist/src/cli/cli-exit.js +19 -0
- package/dist/src/cli/cli-exit.js.map +1 -0
- package/dist/src/cli/commands/_shared.d.ts +12 -0
- package/dist/src/cli/commands/_shared.d.ts.map +1 -0
- package/dist/src/cli/commands/_shared.js +26 -0
- package/dist/src/cli/commands/_shared.js.map +1 -0
- package/dist/src/cli/commands/doctor.d.ts +2 -0
- package/dist/src/cli/commands/doctor.d.ts.map +1 -0
- package/dist/src/cli/commands/doctor.js +174 -0
- package/dist/src/cli/commands/doctor.js.map +1 -0
- package/dist/src/cli/commands/eval-gold.d.ts +2 -0
- package/dist/src/cli/commands/eval-gold.d.ts.map +1 -0
- package/dist/src/cli/commands/eval-gold.js +137 -0
- package/dist/src/cli/commands/eval-gold.js.map +1 -0
- package/dist/src/cli/commands/eval-runner.d.ts +2 -0
- package/dist/src/cli/commands/eval-runner.d.ts.map +1 -0
- package/dist/src/cli/commands/eval-runner.js +299 -0
- package/dist/src/cli/commands/eval-runner.js.map +1 -0
- package/dist/src/cli/commands/eval.d.ts +2 -0
- package/dist/src/cli/commands/eval.d.ts.map +1 -0
- package/dist/src/cli/commands/eval.js +11 -0
- package/dist/src/cli/commands/eval.js.map +1 -0
- package/dist/src/cli/commands/evolve.d.ts +2 -0
- package/dist/src/cli/commands/evolve.d.ts.map +1 -0
- package/dist/src/cli/commands/evolve.js +115 -0
- package/dist/src/cli/commands/evolve.js.map +1 -0
- package/dist/src/cli/commands/init.d.ts +2 -0
- package/dist/src/cli/commands/init.d.ts.map +1 -0
- package/dist/src/cli/commands/init.js +110 -0
- package/dist/src/cli/commands/init.js.map +1 -0
- package/dist/src/cli/commands/observe.d.ts +2 -0
- package/dist/src/cli/commands/observe.d.ts.map +1 -0
- package/dist/src/cli/commands/observe.js +77 -0
- package/dist/src/cli/commands/observe.js.map +1 -0
- package/dist/src/cli/commands/registry.d.ts +11 -0
- package/dist/src/cli/commands/registry.d.ts.map +1 -0
- package/dist/src/cli/commands/registry.js +24 -0
- package/dist/src/cli/commands/registry.js.map +1 -0
- package/dist/src/cli/commands/sample.d.ts +2 -0
- package/dist/src/cli/commands/sample.d.ts.map +1 -0
- package/dist/src/cli/commands/sample.js +121 -0
- package/dist/src/cli/commands/sample.js.map +1 -0
- package/dist/src/cli/commands/studio.d.ts +2 -0
- package/dist/src/cli/commands/studio.d.ts.map +1 -0
- package/dist/src/cli/commands/studio.js +76 -0
- package/dist/src/cli/commands/studio.js.map +1 -0
- package/dist/src/cli/i18n-dict.d.ts +2 -4
- package/dist/src/cli/i18n-dict.d.ts.map +1 -1
- package/dist/src/cli/i18n-dict.js +461 -675
- package/dist/src/cli/i18n-dict.js.map +1 -1
- package/dist/src/cli/index.js +43 -1516
- package/dist/src/cli/index.js.map +1 -1
- package/dist/src/cli/parse-run-config.d.ts +3 -4
- package/dist/src/cli/parse-run-config.d.ts.map +1 -1
- package/dist/src/cli/parse-run-config.js +5 -5
- package/dist/src/cli/parse-run-config.js.map +1 -1
- package/dist/src/cli/parse-strict.d.ts +0 -13
- package/dist/src/cli/parse-strict.d.ts.map +1 -1
- package/dist/src/cli/parse-strict.js +2 -1
- package/dist/src/cli/parse-strict.js.map +1 -1
- package/dist/src/doctor/health/builtin-dimensions.d.ts +11 -0
- package/dist/src/doctor/health/builtin-dimensions.d.ts.map +1 -0
- package/dist/src/doctor/health/builtin-dimensions.js +94 -0
- package/dist/src/doctor/health/builtin-dimensions.js.map +1 -0
- package/dist/src/doctor/health/composer.d.ts +19 -0
- package/dist/src/doctor/health/composer.d.ts.map +1 -0
- package/dist/src/doctor/health/composer.js +289 -0
- package/dist/src/doctor/health/composer.js.map +1 -0
- package/dist/src/doctor/health/dimension-registry.d.ts +13 -0
- package/dist/src/doctor/health/dimension-registry.d.ts.map +1 -0
- package/dist/src/doctor/health/dimension-registry.js +28 -0
- package/dist/src/doctor/health/dimension-registry.js.map +1 -0
- package/dist/src/doctor/health/dimension-spec.d.ts +46 -0
- package/dist/src/doctor/health/dimension-spec.d.ts.map +1 -0
- package/dist/src/doctor/health/dimension-spec.js +12 -0
- package/dist/src/doctor/health/dimension-spec.js.map +1 -0
- package/dist/src/doctor/health/parser.d.ts +27 -0
- package/dist/src/doctor/health/parser.d.ts.map +1 -0
- package/dist/src/doctor/health/parser.js +190 -0
- package/dist/src/doctor/health/parser.js.map +1 -0
- package/dist/src/doctor/health/prompt-builder.d.ts +22 -0
- package/dist/src/doctor/health/prompt-builder.d.ts.map +1 -0
- package/dist/src/doctor/health/prompt-builder.js +162 -0
- package/dist/src/doctor/health/prompt-builder.js.map +1 -0
- package/dist/src/doctor/health/register.d.ts +13 -0
- package/dist/src/doctor/health/register.d.ts.map +1 -0
- package/dist/src/doctor/health/register.js +20 -0
- package/dist/src/doctor/health/register.js.map +1 -0
- package/dist/src/doctor/html-renderer.d.ts +20 -0
- package/dist/src/doctor/html-renderer.d.ts.map +1 -0
- package/dist/src/doctor/html-renderer.js +366 -0
- package/dist/src/doctor/html-renderer.js.map +1 -0
- package/dist/src/doctor/index.d.ts +1 -1
- package/dist/src/doctor/index.d.ts.map +1 -1
- package/dist/src/doctor/index.js +57 -8
- package/dist/src/doctor/index.js.map +1 -1
- package/dist/src/doctor/preflight.d.ts +2 -2
- package/dist/src/doctor/preflight.js +2 -2
- package/dist/src/doctor/renderer.d.ts +4 -0
- package/dist/src/doctor/renderer.d.ts.map +1 -1
- package/dist/src/doctor/renderer.js +72 -18
- package/dist/src/doctor/renderer.js.map +1 -1
- package/dist/src/doctor/rules.d.ts +6 -5
- package/dist/src/doctor/rules.d.ts.map +1 -1
- package/dist/src/doctor/rules.js +4 -3
- package/dist/src/doctor/rules.js.map +1 -1
- package/dist/src/eval-core/fact-checker.js +1 -1
- package/dist/src/eval-core/fact-checker.js.map +1 -1
- package/dist/src/eval-core/layer-gates.d.ts +1 -1
- package/dist/src/eval-core/layer-gates.js +1 -1
- package/dist/src/eval-core/verdict.d.ts +4 -4
- package/dist/src/eval-core/verdict.d.ts.map +1 -1
- package/dist/src/eval-core/verdict.js +2 -2
- package/dist/src/eval-workflows/batch-evaluation-workflow.d.ts +15 -2
- package/dist/src/eval-workflows/batch-evaluation-workflow.d.ts.map +1 -1
- package/dist/src/eval-workflows/batch-evaluation-workflow.js +13 -2
- package/dist/src/eval-workflows/batch-evaluation-workflow.js.map +1 -1
- package/dist/src/eval-workflows/evaluation-pipeline.d.ts +6 -3
- package/dist/src/eval-workflows/evaluation-pipeline.d.ts.map +1 -1
- package/dist/src/eval-workflows/evaluation-pipeline.js +10 -9
- package/dist/src/eval-workflows/evaluation-pipeline.js.map +1 -1
- package/dist/src/eval-workflows/run-evaluation.d.ts +1 -1
- package/dist/src/eval-workflows/run-evaluation.d.ts.map +1 -1
- package/dist/src/eval-workflows/run-evaluation.js +13 -6
- package/dist/src/eval-workflows/run-evaluation.js.map +1 -1
- package/dist/src/executors/script.d.ts.map +1 -1
- package/dist/src/executors/script.js +16 -3
- package/dist/src/executors/script.js.map +1 -1
- package/dist/src/grading/debias-validate.d.ts +2 -2
- package/dist/src/grading/debias-validate.js +2 -2
- package/dist/src/grading/gold-cli.d.ts +2 -5
- package/dist/src/grading/gold-cli.d.ts.map +1 -1
- package/dist/src/grading/gold-cli.js +4 -8
- package/dist/src/grading/gold-cli.js.map +1 -1
- package/dist/src/grading/judge.d.ts +1 -1
- package/dist/src/renderer/html-renderer.js +1 -1
- package/dist/src/renderer/layout.js +5 -5
- package/dist/src/renderer/layout.js.map +1 -1
- package/dist/src/renderer/skill-health-renderer.d.ts +1 -1
- package/dist/src/renderer/skill-health-renderer.js +1 -1
- package/dist/src/renderer/summary.js +8 -8
- package/dist/src/server/report-server.d.ts.map +1 -1
- package/dist/src/server/report-server.js +8 -7
- package/dist/src/server/report-server.js.map +1 -1
- package/dist/src/types/doctor.d.ts +44 -6
- package/dist/src/types/doctor.d.ts.map +1 -1
- package/dist/src/types/doctor.js +3 -0
- package/dist/src/types/doctor.js.map +1 -1
- package/dist/src/types/eval.d.ts +1 -1
- package/dist/src/types/report.d.ts +2 -2
- package/dist/src/types/report.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/src/cli/coverage-renderer.d.ts +0 -15
- package/dist/src/cli/coverage-renderer.d.ts.map +0 -1
- package/dist/src/cli/coverage-renderer.js +0 -74
- package/dist/src/cli/coverage-renderer.js.map +0 -1
package/README.md
CHANGED
|
@@ -22,12 +22,12 @@ omk answers with objective data, not gut feeling.
|
|
|
22
22
|
|
|
23
23
|
```bash
|
|
24
24
|
npm i oh-my-knowledge -g
|
|
25
|
-
omk
|
|
25
|
+
omk init my-eval && cd my-eval
|
|
26
26
|
# edit skills/code-review-v1/SKILL.md and skills/code-review-v2/SKILL.md with your two versions
|
|
27
|
-
omk
|
|
27
|
+
omk eval --control code-review-v1 --treatment code-review-v2 # → HTML report with verdict in 5 minutes
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
-
Deeper: [use inside Claude Code / Codex](#use-inside-ai-coding-agents) · [`omk
|
|
30
|
+
Deeper: [use inside Claude Code / Codex](#use-inside-ai-coding-agents) · [`omk eval` flags](#omk-eval) · [artifact directory layout](#artifact-directory-layout) · [`--lang` / `OMK_LANG`](#environment-variables)
|
|
31
31
|
|
|
32
32
|
## Use inside AI Coding Agents
|
|
33
33
|
|
|
@@ -37,20 +37,20 @@ When the `omk` skill is available in Claude Code, you can invoke it directly lik
|
|
|
37
37
|
|
|
38
38
|
```bash
|
|
39
39
|
/omk eval # evaluate the artifact(s) in the current project
|
|
40
|
-
/omk evolve # auto-iterate to improve
|
|
41
|
-
/omk
|
|
40
|
+
/omk evolve # auto-iterate to improve a skill
|
|
41
|
+
/omk sample # generate or fill test cases
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
-
You can also just say "compare v1 vs v2 for me" or "improve this artifact" and omk picks the right command.
|
|
44
|
+
These slash commands are natural-language entry points — the agent reads the conversation context to figure out which skill to operate on, so you usually don't pass the path explicitly. (See the Codex section below for the literal `omk evolve <skill>` CLI form.) You can also just say "compare v1 vs v2 for me" or "improve this artifact" and omk picks the right command.
|
|
45
45
|
|
|
46
46
|
### Use inside Codex
|
|
47
47
|
|
|
48
48
|
Codex does not support Claude Code style `/omk ...` slash commands by default. In Codex, the usual pattern is to ask the agent to run the `omk` CLI directly, for example:
|
|
49
49
|
|
|
50
50
|
```bash
|
|
51
|
-
omk
|
|
52
|
-
omk
|
|
53
|
-
omk
|
|
51
|
+
omk eval
|
|
52
|
+
omk evolve skills/my-skill.md
|
|
53
|
+
omk sample skills/my-skill.md
|
|
54
54
|
```
|
|
55
55
|
|
|
56
56
|
You can also describe the goal in natural language, such as "compare v1 vs v2" or "generate test cases for this skill".
|
|
@@ -61,13 +61,13 @@ Teams doing knowledge engineering produce lots of knowledge artifacts (skills to
|
|
|
61
61
|
|
|
62
62
|
## Key features
|
|
63
63
|
|
|
64
|
-
- **
|
|
65
|
-
- **Controlled-variable offline
|
|
64
|
+
- **LLM health audit** — `omk doctor` runs a single LLM session that emits a multi-dimension report; 7 builtin dimensions (trigger & boundary / doc clarity / instruction precision / dependency / tool conventions / security & compliance / example completeness) each get a *healthy / sub-healthy / unhealthy / N-A* grade plus findings and suggestions; dimensions are extensible, and `--html` produces a visual report. Pass `--static-only` for an offline mode (CI nodes without an LLM, debugging without network) that runs the static checks only (readability / metadata / dependencies / samples contract). `omk eval` still runs static readability / metadata / dependency gates internally to protect eval quality (separation of roles: doctor = audit, eval = evaluate)
|
|
65
|
+
- **Controlled-variable offline eval** — fix the model and samples, vary only the artifact; works with Claude Code skills, CLAUDE.md prompts, RAG knowledge bases, or any markdown-based instruction
|
|
66
66
|
- **Six-dimension scoring** — separate signals for Fact / Behavior / LLM-judge / Cost / Efficiency / Stability, so a regression in one axis isn't hidden by gains in another
|
|
67
67
|
- **Production session observability** — parse Claude Code session JSONL traces, measure per-skill failure rate, latency, token cost, and knowledge-gap signals on real user sessions
|
|
68
68
|
- **Knowledge-gap detection** — severity-weighted signals (explicit markers / failed searches / hedging language / repeated failures) quantify risk exposure instead of claiming completeness
|
|
69
|
-
- **Pre-merge CI gate** — `omk
|
|
70
|
-
- **One-line ship/no-ship verdict** — `omk
|
|
69
|
+
- **Pre-merge CI gate** — `omk eval` enforces three-layer all-pass (fact + behavior + llm-judge) semantics, catching single-layer regressions a composite score would hide
|
|
70
|
+
- **One-line ship/no-ship verdict** — `omk eval` aggregates bootstrap CI / three-layer ci-gate / saturation / human α into a six-tier verdict (PROGRESS / CAUTIOUS / REGRESS / NOISE / UNDERPOWERED / SOLO) plus an action recommendation; the exit code reflects whether to ship
|
|
71
71
|
|
|
72
72
|
## Why omk over alternatives
|
|
73
73
|
|
|
@@ -90,17 +90,15 @@ RAG-specific evals: see RAGAS (separate niche, complementary to omk). Full compa
|
|
|
90
90
|
|
|
91
91
|
| Feature | What it does |
|
|
92
92
|
|---|---|
|
|
93
|
-
| **One-line verdict** | `omk
|
|
93
|
+
| **One-line verdict** | `omk eval` six-tier verdict + ship recommendation + exit-code routing; HTML pill shares the same rules |
|
|
94
94
|
| **Six-dim evaluation** | Fact / Behavior / LLM-judge / Cost / Efficiency / Stability shown independently |
|
|
95
95
|
| **Multi-executor** | Claude CLI / Claude SDK / Codex CLI / Codex SDK / OpenAI / Gemini / any custom command |
|
|
96
96
|
| **21+ assertion types** | substring, regex, JSON Schema, ROUGE/BLEU/Levenshtein similarity, agent tool-call assertions, semantic similarity, custom JS, and more |
|
|
97
97
|
| **Statistical rigor** | Bootstrap CI / Krippendorff α / length-debias / saturation curve — all on by default. [Details →](docs/statistical-rigor.md) |
|
|
98
|
-
| **Sample diagnostics** | `omk bench diagnose <id>` — 7 issue kinds (low discrimination / duplicates / ambiguous rubric / cost outliers / etc.) + 0-100 healthScore |
|
|
99
|
-
| **Failure clustering** | `omk bench failures <id>` — single LLM call clusters failed samples and emits per-cluster fixes |
|
|
100
98
|
| **RAG metrics** | `faithfulness` / `answer_relevancy` / `context_recall` — anti-hallucination + answer relevance + context coverage; auto-inherits length-debias |
|
|
101
99
|
| **Hard budget caps** | `--budget-usd / --budget-per-sample-usd / --budget-per-sample-ms` — abort on total-cost overrun, flag per-sample overruns; partial report persisted |
|
|
102
100
|
| **Construct-validity isolation** | `--strict-baseline` (default ON) cuts three contamination channels so baseline doesn't silently see the skill it's being compared against: (1) SDK skill auto-discovery, (2) subagent Skill tool, (3) cwd file-system access via the `skills/<name>/` symlink that's normally there for the treatment variant. eval.yaml `allowedSkills` for per-variant whitelists |
|
|
103
|
-
| **Sample design science** | Sample schema with `capability` / `difficulty` / `construct` / `provenance` metadata fields (HF Dataset Cards style)
|
|
101
|
+
| **Sample design science** | Sample schema with `capability` / `difficulty` / `construct` / `provenance` metadata fields (HF Dataset Cards style); studio surfaces coverage breakdown plus `rubric_clarity_low` / `capability_thin` flags. `omk sample` auto-stamps provenance on generated cases. See [docs/sample-design-spec.md](docs/sample-design-spec.md) for the 8 industry-gap mapping |
|
|
104
102
|
| **Multi-judge ensemble** | `--judge-models claude:opus,openai:gpt-4o` cross-vendor scoring + agreement metrics |
|
|
105
103
|
| **MCP URL fetching** | pull content from private-doc URLs via an MCP server (SSO-protected knowledge bases, etc.) |
|
|
106
104
|
| **Blind A/B** | `--blind` hides variant names; HTML report has a reveal button |
|
|
@@ -359,351 +357,112 @@ Reports display results across six independent dimensions. The three scoring lay
|
|
|
359
357
|
|
|
360
358
|
## CLI reference
|
|
361
359
|
|
|
362
|
-
|
|
360
|
+
omk exposes a workflow CLI for knowledge artifacts. Seven top-level commands cover the full loop: `init` (scaffold) · `doctor` (static check) · `eval` (offline A/B) · `observe` (online trace) · `evolve` (auto-iterate a skill) · `sample` (generate or fill test cases) · `studio` (local web UI for reports & analysis).
|
|
363
361
|
|
|
364
|
-
|
|
365
|
-
omk bench run [options]
|
|
366
|
-
|
|
367
|
-
options:
|
|
368
|
-
--samples <path> sample file (default: eval-samples.json, also detects .yaml/.yml)
|
|
369
|
-
--skill-dir <path> artifact dir (default: skills)
|
|
370
|
-
--control <expr> control-group variant expression (experiment role = control)
|
|
371
|
-
--treatment <v1,v2> treatment-group variant expressions, comma-separated
|
|
372
|
-
at least one of --control / --treatment is required
|
|
373
|
-
(unless you use --config or --batch)
|
|
374
|
-
special values: baseline (empty artifact), git:name (git HEAD),
|
|
375
|
-
git:ref:name (specific commit), path with "/" (read file directly)
|
|
376
|
-
--config <path> YAML/JSON config file (evaluation-as-code); declares
|
|
377
|
-
samples + variants + model + executor in one file; CLI
|
|
378
|
-
flags override config fields when both are provided
|
|
379
|
-
--model <name> task execution model (default: sonnet)
|
|
380
|
-
--judge-models <list> judge config; 1 entry = single judge (default
|
|
381
|
-
claude:haiku), ≥ 2 entries = ensemble. Format:
|
|
382
|
-
`executor:model[,executor:model]`
|
|
383
|
-
--output-dir <path> output dir (default: ~/.oh-my-knowledge/reports/)
|
|
384
|
-
--no-judge skip the LLM judge
|
|
385
|
-
--no-cache disable result cache (on by default; identical inputs reuse)
|
|
386
|
-
--dry-run preview only
|
|
387
|
-
--blind blind mode
|
|
388
|
-
--concurrency <n> parallel tasks (default: 1)
|
|
389
|
-
--timeout <sec> per-task executor timeout (default: 120)
|
|
390
|
-
--repeat <n> repeat N times for variance analysis (default: 1)
|
|
391
|
-
--executor <name> executor (default: claude); supports custom commands
|
|
392
|
-
--skip-connectivity skip the LLM connectivity check (doctor still runs;
|
|
393
|
-
doctor is mandatory and has no skip flag).
|
|
394
|
-
Auto-applied on --resume (the original run already
|
|
395
|
-
verified connectivity).
|
|
396
|
-
--mcp-config <path> MCP config for fetching private-doc URLs via MCP Server
|
|
397
|
-
(default: .mcp.json in cwd)
|
|
398
|
-
--no-serve don't auto-start the report server after the run
|
|
399
|
-
--verbose print per-sample details (duration, tokens, output preview)
|
|
400
|
-
--batch batch mode: evaluate each artifact independently vs baseline
|
|
401
|
-
requires {name}.eval-samples.json paired with each artifact
|
|
402
|
-
--judge-repeat <n> run the LLM judge N times per (sample × dimension) and report stddev
|
|
403
|
-
--bootstrap enable distribution-free CIs: bootstrap CI per variant +
|
|
404
|
-
pairwise diff CI (CI containing 0 = not significant)
|
|
405
|
-
--bootstrap-samples N bootstrap resample count (default 1000)
|
|
406
|
-
--gold-dir <path> after the run, compare scores against the gold dataset
|
|
407
|
-
(Krippendorff α / κ / Pearson). Result is written to
|
|
408
|
-
report.meta.humanAgreement and shown in the HTML report
|
|
409
|
-
--no-debias-length revert to legacy v2-cot judge prompt (no "length is not
|
|
410
|
-
a quality signal" paragraph) — for byte-compat with
|
|
411
|
-
legacy reports whose hash predates v3-cot-length
|
|
412
|
-
--budget-usd <num> total cost cap (USD); on overrun the run aborts and
|
|
413
|
-
a partial report is persisted (`report.meta.budgetExhausted = true`)
|
|
414
|
-
--budget-per-sample-usd <num> per-sample cost cap; offending samples fail individually,
|
|
415
|
-
the run continues
|
|
416
|
-
--budget-per-sample-ms <num> per-sample latency cap (ms); same semantics as cost cap
|
|
417
|
-
```
|
|
418
|
-
|
|
419
|
-
**eval.yaml budget**: declare `budget: { totalUSD?, perSampleUSD?, perSampleMs? }` (all optional, must be ≥ 0). CLI flags of the same name override the config values.
|
|
420
|
-
|
|
421
|
-
**eval.yaml experiment-design fields**: the same flags above can be set in `eval.yaml` for reproducible experiment configuration (CLI > eval.yaml > default):
|
|
422
|
-
|
|
423
|
-
```yaml
|
|
424
|
-
samples: ./eval-samples.yaml
|
|
425
|
-
model: sonnet
|
|
426
|
-
repeat: 5 # multi-run variance, ≥ 1
|
|
427
|
-
judgeRepeat: 3 # per (sample × dim) judge self-consistency, ≥ 1
|
|
428
|
-
bootstrap: true # distribution-free CI per variant
|
|
429
|
-
bootstrapSamples: 2000 # default 1000, ≥ 100
|
|
430
|
-
goldDir: ./gold # post-run α / κ / Pearson against human anchor
|
|
431
|
-
lengthDebias: true # default; set false to reproduce pre-v0.21 hash
|
|
432
|
-
strictBaseline: true # default; set false to disable skill isolation
|
|
433
|
-
noJudge: false # default; set true to skip LLM judge entirely
|
|
434
|
-
judgeModels: # 1 entry = single judge; ≥ 2 = ensemble
|
|
435
|
-
- { executor: claude, model: opus }
|
|
436
|
-
- { executor: openai-api, model: gpt-4o }
|
|
437
|
-
variants:
|
|
438
|
-
- { name: baseline, role: control, artifact: baseline }
|
|
439
|
-
- { name: my-skill, role: treatment, artifact: ./skills/my-skill.md }
|
|
440
|
-
```
|
|
441
|
-
|
|
442
|
-
**Field entry points**: `bench run` reads every field above. `bench gate` goes through `parseRunConfig` and picks up the shared subset (`variants` / `executor` / `model` / `judgeModels` — both single-judge and ensemble — / `noJudge` / `noCache` / `blind` / `strictBaseline` / `budget` / `mcpConfig` / `variantAllowedSkills`); the experiment-design fields handled by `handleRun` (`repeat` / `judgeRepeat` / `bootstrap` / `bootstrapSamples` / `goldDir` / `lengthDebias`) are intentionally not read by `gate` and can be extended later. Other subcommands (`evolve` / `verdict` / `diff` / `analyze` / …) do not read `eval.yaml`.
|
|
443
|
-
|
|
444
|
-
**Difference from `cost_max` / `latency_max` assertions**: assertions are **per-sample scoring rules** (exceeding the cap fails that one assertion, the run continues); budget caps are **workflow-level hard limits** (`totalUSD` overrun aborts the run and persists a partial report; per-sample overruns fail the offending sample but the run continues). Assertions answer "is quality acceptable?"; budgets answer "are cost/time within the envelope?".
|
|
445
|
-
|
|
446
|
-
### `omk bench run --batch` (batch mode)
|
|
447
|
-
|
|
448
|
-
When `skills/` contains several **independent** artifacts, use `--batch` to evaluate each one against baseline and produce a BatchEvaluationReport with child EvaluationReports.
|
|
449
|
-
|
|
450
|
-
```
|
|
451
|
-
skills/
|
|
452
|
-
├── asset.md ← artifact file
|
|
453
|
-
├── asset.eval-samples.json ← paired samples
|
|
454
|
-
├── home.md
|
|
455
|
-
├── home.eval-samples.json
|
|
456
|
-
└── product/ ← directory format also supported
|
|
457
|
-
├── SKILL.md
|
|
458
|
-
└── eval-samples.json
|
|
459
|
-
```
|
|
460
|
-
|
|
461
|
-
Pairing rules:
|
|
462
|
-
|
|
463
|
-
- `{name}.md` → looks for `{name}.eval-samples.json` in the same dir
|
|
464
|
-
- `{name}/SKILL.md` → looks for `{name}/eval-samples.json`
|
|
465
|
-
- artifacts without paired samples are skipped with a warning
|
|
466
|
-
|
|
467
|
-
```bash
|
|
468
|
-
omk bench run --batch
|
|
469
|
-
omk bench run --batch --dry-run
|
|
470
|
-
```
|
|
471
|
-
|
|
472
|
-
### `omk bench gen-samples` (generate test cases)
|
|
473
|
-
|
|
474
|
-
Reads an artifact's content and uses an LLM to auto-generate eval-samples. Review and edit them before running eval.
|
|
362
|
+
### `omk init`
|
|
475
363
|
|
|
476
364
|
```bash
|
|
477
|
-
|
|
478
|
-
omk bench gen-samples skills/my-skill.md
|
|
479
|
-
|
|
480
|
-
# batch-generate for every artifact under skills/ that lacks samples
|
|
481
|
-
omk bench gen-samples --batch
|
|
482
|
-
|
|
483
|
-
# specify sample count
|
|
484
|
-
omk bench gen-samples skills/my-skill.md --count 10
|
|
365
|
+
omk init [dir]
|
|
485
366
|
```
|
|
486
367
|
|
|
487
|
-
|
|
368
|
+
Scaffolds an evaluation project with two starter skill variants and an `eval-samples.json` file.
|
|
488
369
|
|
|
489
|
-
|
|
490
|
-
--batch batch-generate for every artifact missing samples
|
|
491
|
-
--count <n> samples per artifact (default: 5)
|
|
492
|
-
--model <name> model used for generation (default: sonnet)
|
|
493
|
-
--skill-dir <path> artifact dir (default: skills), used with --batch
|
|
494
|
-
```
|
|
495
|
-
|
|
496
|
-
### `omk bench evolve` (self-iterating improvement)
|
|
497
|
-
|
|
498
|
-
Lets the AI iterate an artifact automatically: evaluate → analyze weak spots → LLM rewrites → evaluate again → keep if the score went up, drop otherwise → repeat.
|
|
370
|
+
### `omk doctor`
|
|
499
371
|
|
|
500
372
|
```bash
|
|
501
|
-
#
|
|
502
|
-
omk
|
|
503
|
-
|
|
504
|
-
#
|
|
505
|
-
omk
|
|
373
|
+
omk doctor # audit current dir / ./skills
|
|
374
|
+
omk doctor skills/v1.md # audit one skill file
|
|
375
|
+
omk doctor skills/ --html report.html # produce a visual HTML report
|
|
376
|
+
omk doctor skills/ --json > r.json # JSON for CI / external tools
|
|
377
|
+
omk doctor --gate; echo $? # silent gate; exit 1 on fatal failures, warnings do not block
|
|
378
|
+
omk doctor --static-only # offline mode: static checks only, no LLM call
|
|
506
379
|
```
|
|
507
380
|
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
```
|
|
511
|
-
--rounds <n> max iteration rounds (default: 5)
|
|
512
|
-
--target <score> stop early when the score reaches this threshold
|
|
513
|
-
--samples <path> sample file (default: eval-samples.json)
|
|
514
|
-
--improve-model <name> model used for rewrites (default: sonnet)
|
|
515
|
-
```
|
|
381
|
+
LLM health audit: a single LLM session emits per-dimension grades, findings, and suggestions for the 7 builtin dimensions; the HTML report sorts dimensions fail→warn→pass→skipped with errors first within each dim. Dimensions are extensible — call `registerHealthDimension` in your own code and the new section is folded into the same LLM call's prompt and report (order = registration order).
|
|
516
382
|
|
|
517
|
-
|
|
383
|
+
Static-only mode (`--static-only`): for CI nodes without claude / codex installed, or local debugging without network — runs the four static rules (readability / metadata / dependencies / samples contract) with zero LLM calls and zero cost. Output goes through the same `DoctorReport` shape and combines with `--json` / `--gate` / `--html`.
|
|
518
384
|
|
|
519
|
-
|
|
385
|
+
`omk eval` still runs its own static readability / metadata / dependency / samples-contract gates internally to protect eval quality; that path is separate from this user-facing `omk doctor` command and the two roles do not overlap.
|
|
520
386
|
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
The gate is **three-layer all-pass**: `avgFactScore >= threshold AND avgBehaviorScore >= threshold AND avgJudgeScore >= threshold`. Any layer below threshold is FAIL, and the output shows which layer broke. This stops cases like `fact 4.5→2.5 but judge 3→5` from passing via composite averaging — if one layer regresses, the gate catches it.
|
|
524
|
-
|
|
525
|
-
```bash
|
|
526
|
-
omk bench gate [options]
|
|
527
|
-
--threshold <number> per-layer minimum score (default: 3.5); applied
|
|
528
|
-
independently to fact / behavior / judge
|
|
529
|
-
```
|
|
530
|
-
|
|
531
|
-
### `omk doctor` (pre-evaluation health check)
|
|
532
|
-
|
|
533
|
-
Pure static / zero-LLM checks — analogous to lint + typecheck in the SE toolchain. Runs as a mandatory gate before `bench run` / `bench gate` so a typo'd YAML or missing dependency aborts with an actionable error instead of producing a garbage-in verdict. Also runnable standalone for local iteration or CI.
|
|
387
|
+
### `omk eval`
|
|
534
388
|
|
|
535
389
|
```bash
|
|
536
|
-
omk
|
|
537
|
-
omk
|
|
538
|
-
omk
|
|
539
|
-
omk
|
|
390
|
+
omk eval --control baseline --treatment my-skill # single-skill necessity test (baseline = reserved "no skill" variant)
|
|
391
|
+
omk eval --control code-review-v1 --treatment code-review-v2 # multi-variant A/B
|
|
392
|
+
omk eval --config eval.yaml
|
|
393
|
+
omk eval --batch
|
|
394
|
+
omk eval gold compare <report-id> --gold-dir gold-dataset
|
|
540
395
|
```
|
|
541
396
|
|
|
542
|
-
|
|
397
|
+
Runs the offline evaluation, applies the verdict gate, persists the report, and returns a ship/no-ship exit code. Bootstrap CI is enabled by default on this workflow.
|
|
543
398
|
|
|
544
|
-
|
|
545
|
-
- **skill metadata** — front-matter (if present) is valid YAML; directory-skills have `SKILL.md`
|
|
546
|
-
- **dependencies present** — referenced CLI tools, files, env vars all available (reuses `preflightDependencies`)
|
|
547
|
-
- **samples ↔ skill contract** — when samples are provided, validate they're non-empty and have prompt fields (warn-level)
|
|
548
|
-
|
|
549
|
-
Executor / judge connectivity is verified by a separate evaluation preflight phase, not by doctor — clean boundary: doctor is static, eval is dynamic. `bench run` / `bench gate` abort with `exit 1` and stderr `doctor failed:` prefix when doctor fails. **Doctor is mandatory and not skippable** (static checks have no cost reason to skip); LLM connectivity is separately controllable via `--skip-connectivity` (auto-skipped on `--resume`).
|
|
550
|
-
|
|
551
|
-
### `omk bench report`
|
|
552
|
-
|
|
553
|
-
Start the report server to browse historical reports, submit feedback, and delete reports.
|
|
554
|
-
|
|
555
|
-
```bash
|
|
556
|
-
omk bench report [options]
|
|
557
|
-
--port <number> server port (default: 7799)
|
|
558
|
-
```
|
|
399
|
+
Common options:
|
|
559
400
|
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
α thresholds follow Krippendorff (2011): ≥ 0.80 strong agreement; [0.67, 0.80) acceptable; < 0.40 large divergence — investigate rubric / prompt.
|
|
585
|
-
|
|
586
|
-
Full demo: [examples/gold-dataset/](examples/gold-dataset/)
|
|
587
|
-
|
|
588
|
-
### `omk bench debias-validate length` (judge length-bias check)
|
|
589
|
-
|
|
590
|
-
Re-judges every (sample × variant) of an existing report with the OPPOSITE length-debias setting (v3-cot-length ↔ v2-cot) and bootstraps the CI on the score difference. A significant shift = the judge is sensitive to the length-debias instruction (indirect evidence of length bias).
|
|
591
|
-
|
|
592
|
-
```bash
|
|
593
|
-
omk bench debias-validate length <reportId> [options]
|
|
594
|
-
--variant <name> check a single variant only
|
|
595
|
-
--judge-models <executor:model> override the report's judge (single-judge only)
|
|
596
|
-
--bootstrap-samples N bootstrap iterations (default 1000)
|
|
597
|
-
--seed N deterministic seed
|
|
598
|
-
```
|
|
599
|
-
|
|
600
|
-
Verdict bucket: none / weak / medium (|0.2-0.5|) / strong (≥ 0.5). Re-judge cost roughly doubles vs the original judge pass.
|
|
601
|
-
|
|
602
|
-
### `omk bench saturation` (saturation curve)
|
|
603
|
-
|
|
604
|
-
Answers "have I run enough samples?". Reads the saturation trace from an existing report (no re-run). Verdicts only emit when the original run used `--repeat ≥ 5`; below that, the curve is plotted but no verdict is computed.
|
|
605
|
-
|
|
606
|
-
```bash
|
|
607
|
-
omk bench saturation <reportId> [options]
|
|
608
|
-
--variant <name> single-variant view
|
|
609
|
-
--method <m> slope | bootstrap-ci-width (default) | plateau-height
|
|
610
|
-
--threshold <num> method-specific cutoff (defaults match the method)
|
|
611
|
-
--window <num> consecutive windows that must satisfy the threshold (default 3)
|
|
612
|
-
```
|
|
613
|
-
|
|
614
|
-
The HTML report inlines an SVG curve (cumulative N on X, mean ± 95% CI shading on Y, one curve per variant) automatically.
|
|
615
|
-
|
|
616
|
-
### `omk bench verdict` (one-line ship/no-ship verdict)
|
|
617
|
-
|
|
618
|
-
Aggregates bootstrap CI / three-layer ci-gate / saturation / human α into one of six verdicts: **PROGRESS** (significant improvement, all three layers pass → exit 0), **CAUTIOUS** (real gain but with a warning — broken gate / trivially small / control regressed → exit 1), **REGRESS** (significant negative shift → exit 1), **NOISE** (CI spans 0, undecidable → exit 1), **UNDERPOWERED** (sample size too small → exit 1), **SOLO** (single variant; exit 0 only if its own three-layer gate passes).
|
|
619
|
-
|
|
620
|
-
```bash
|
|
621
|
-
omk bench verdict <reportId> [options]
|
|
622
|
-
--threshold <num> three-layer gate threshold (default 3.5, matches `omk bench gate`)
|
|
623
|
-
--trivial-diff <num> "practically tiny" cutoff (default 0.1)
|
|
624
|
-
--verbose expand per-pair detail
|
|
401
|
+
```text
|
|
402
|
+
--samples <path> sample file (default: eval-samples.json, also detects .yaml/.yml)
|
|
403
|
+
--skill-dir <path> artifact dir (default: skills)
|
|
404
|
+
--control <expr> control variant expression
|
|
405
|
+
--treatment <v1,v2> treatment variants, comma-separated
|
|
406
|
+
--config <path> YAML/JSON evaluation config
|
|
407
|
+
--model <name> task execution model (default: sonnet)
|
|
408
|
+
--judge-models <list> judge config, e.g. claude:haiku or claude:opus,openai:gpt-4o
|
|
409
|
+
--executor <name> claude / claude-sdk / codex / codex-sdk / openai-api / gemini / custom
|
|
410
|
+
--no-judge skip LLM judge
|
|
411
|
+
--dry-run preview only
|
|
412
|
+
--blind blind A/B mode
|
|
413
|
+
--concurrency <n> parallel tasks
|
|
414
|
+
--timeout <sec> per-task timeout
|
|
415
|
+
--repeat <n> repeat N times for variance analysis
|
|
416
|
+
--batch evaluate each artifact independently vs baseline
|
|
417
|
+
--bootstrap-samples N bootstrap resample count (default 1000)
|
|
418
|
+
--threshold <number> verdict layer-gate threshold (default 3.5)
|
|
419
|
+
--trivial-diff <num> practically tiny diff cutoff (default 0.1)
|
|
420
|
+
--report-only produce the report and print verdict, but always exit 0
|
|
421
|
+
--no-gate alias for --report-only
|
|
422
|
+
--skip-connectivity skip model connectivity check (internal static gates still run)
|
|
423
|
+
--no-serve do not auto-start the report server after evaluation
|
|
625
424
|
```
|
|
626
425
|
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
### `omk bench diagnose` (sample quality diagnostics)
|
|
630
|
-
|
|
631
|
-
Answers "is the conclusion polluted by bad samples?". Diagnoses 7 sample-quality issues: `flat_scores` (low discrimination), `all_pass` (too easy), `all_fail` (broken — error severity), `near_duplicate` (prompt ROUGE-1 ≥ threshold), `ambiguous_rubric` (high judge stddev across `--judge-repeat ≥ 2`), `cost_outlier` (≥ k× median), `latency_outlier` (≥ k× median), `error_prone` (executor failure).
|
|
426
|
+
### `omk observe`
|
|
632
427
|
|
|
633
428
|
```bash
|
|
634
|
-
omk
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
--latency-k <num> latency-outlier multiplier vs median (default 3)
|
|
640
|
-
--flat <num> flat_scores spread threshold (default 0.5)
|
|
429
|
+
omk observe ~/.claude/projects/-Users-you-Documents-my-project
|
|
430
|
+
omk observe ~/.claude/projects/my-project --last 7d
|
|
431
|
+
omk observe ~/.claude/projects/my-project --from 2026-04-01T00:00:00Z --to 2026-04-15T23:59:59Z
|
|
432
|
+
omk observe ~/.claude/projects/my-project --skills audit,polish
|
|
433
|
+
omk observe ~/.claude/projects/my-project --kb /path/to/project
|
|
641
434
|
```
|
|
642
435
|
|
|
643
|
-
|
|
436
|
+
Turns real Claude Code session traces into skill-health reports: knowledge usage, gap signals, execution stability, tokens, and latency. This is production observation, not production scoring.
|
|
644
437
|
|
|
645
|
-
### `omk
|
|
646
|
-
|
|
647
|
-
When 14 of 50 samples failed, reading them one by one is slow. This command sends failed samples to a single LLM call, clusters them into ≤ N groups, and emits per-cluster root cause + fix. "Failed" = `compositeScore < threshold` OR `ok = false`.
|
|
438
|
+
### `omk evolve`
|
|
648
439
|
|
|
649
440
|
```bash
|
|
650
|
-
omk
|
|
651
|
-
|
|
652
|
-
--max-clusters <n> maximum clusters (default 5)
|
|
653
|
-
--threshold <num> failure score threshold (default 3)
|
|
654
|
-
--max-feed <n> max failures fed to LLM (default 50; takes the worst)
|
|
441
|
+
omk evolve <skill> # multi-round auto-iteration on a skill
|
|
442
|
+
omk evolve skills/foo.md --rounds 10 --target 4.5
|
|
655
443
|
```
|
|
656
444
|
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
### `omk bench diff` (report comparison — single / dual mode)
|
|
660
|
-
|
|
661
|
-
**Single-arg mode** (within-report sample-level): `omk bench diff <reportId>` — within one report, drill down per-sample comparing `variants[0]` against `variants[1]` (or `--variant <name>`).
|
|
445
|
+
Auto-iterates a skill through repeated eval → judge → rewrite loops until it hits `--target` or exhausts `--rounds`. Cost scales with `rounds × samples × variants`; a typical run takes minutes to tens of minutes. Original skill files are versioned under `skills/evolve/*.r0.md`.
|
|
662
446
|
|
|
663
|
-
|
|
447
|
+
### `omk sample`
|
|
664
448
|
|
|
665
449
|
```bash
|
|
666
|
-
omk
|
|
667
|
-
omk
|
|
450
|
+
omk sample <skill> # generate or fill eval-samples test cases for one skill
|
|
451
|
+
omk sample --batch # generate for skills missing eval-samples
|
|
668
452
|
```
|
|
669
453
|
|
|
670
|
-
|
|
454
|
+
One-shot generation. Auto-stamps `provenance` on generated cases. Generated assertions use English, numbers, or code tokens so they compare cleanly across bilingual outputs.
|
|
671
455
|
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
`omk bench run` is **offline evaluation** (fixed controls, repeatable, scored). Production is different — no control group, no ground truth, no repetition, so scoring isn't valid there. `omk analyze` turns existing Claude Code session traces into **skill-health reports** (coverage, gap signals, execution stability, tokens/latency per skill). It gives you clues about **which skill is worth re-evaluating offline**, not a production score.
|
|
456
|
+
### `omk studio`
|
|
675
457
|
|
|
676
458
|
```bash
|
|
677
|
-
|
|
678
|
-
omk
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
omk analyze ~/.claude/projects/my-project --last 7d
|
|
682
|
-
|
|
683
|
-
# absolute time window
|
|
684
|
-
omk analyze ~/.claude/projects/my-project --from 2026-04-01T00:00:00Z --to 2026-04-15T23:59:59Z
|
|
685
|
-
|
|
686
|
-
# whitelist specific skills
|
|
687
|
-
omk analyze ~/.claude/projects/my-project --skills audit,polish
|
|
688
|
-
|
|
689
|
-
# override the inferred knowledge-base root
|
|
690
|
-
omk analyze ~/.claude/projects/my-project --kb /path/to/project
|
|
459
|
+
omk studio
|
|
460
|
+
omk studio --port 7799
|
|
461
|
+
omk studio --reports-dir ~/.oh-my-knowledge/reports
|
|
462
|
+
omk studio --no-open
|
|
691
463
|
```
|
|
692
464
|
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
**What you get per skill:**
|
|
696
|
-
|
|
697
|
-
- **Knowledge usage** — which KB files this skill actually read (coverage %)
|
|
698
|
-
- **Knowledge gaps** — four weighted signals (failed search / model-flagged gap / hedging / repeated miss); hedging goes through an LLM-assisted classifier to filter out business-possibility hedging vs genuine knowledge uncertainty
|
|
699
|
-
- **Execution stability** — tool-failure rate; a skill with > 20% failures gets a warning that its gap signals may be environmental noise rather than real knowledge gaps
|
|
700
|
-
- **Usage cost** — billable tokens (input+output) separate from cached tokens, total duration
|
|
701
|
-
|
|
702
|
-
**What this is NOT:**
|
|
703
|
-
|
|
704
|
-
- Not a general APM (request/response/latency tracing is Langfuse / Datadog territory)
|
|
705
|
-
- Not streaming / alerting (batch only — run on a cron if you want periodic snapshots)
|
|
706
|
-
- Not a production score (no control group, no ground truth — use `omk bench run` for scoring)
|
|
465
|
+
Starts the local knowledge workbench for browsing reports and observation analyses. Verdict, sample diffs, regressions, saturation curves, and per-sample drill-downs all live in the studio UI — there is no CLI export / analysis subcommand. For CI gates, use `omk eval`'s exit code (0 on `PROGRESS`, non-zero otherwise) or `jq` over the report JSON.
|
|
707
466
|
|
|
708
467
|
## Executors
|
|
709
468
|
|
|
@@ -721,15 +480,15 @@ The command writes `~/.oh-my-knowledge/analyses/<timestamp>-skill-health.json`.
|
|
|
721
480
|
|
|
722
481
|
API-direct executors support custom base URLs via env: `ANTHROPIC_BASE_URL`, `OPENAI_BASE_URL`.
|
|
723
482
|
|
|
724
|
-
Codex construct-validity notes: (1) `codex` uses the `codex` binary on `PATH`; `codex-sdk` uses the bundled `@openai/codex` binary resolved by `@openai/codex-sdk`. Reports persist per-variant `meta.executorRuntimes`, `meta.executorRuntime`, and per-judge `meta.judgeModels[].runtime` fingerprints (binary or SDK version + capability snapshot), and
|
|
483
|
+
Codex construct-validity notes: (1) `codex` uses the `codex` binary on `PATH`; `codex-sdk` uses the bundled `@openai/codex` binary resolved by `@openai/codex-sdk`. Reports persist per-variant `meta.executorRuntimes`, `meta.executorRuntime`, and per-judge `meta.judgeModels[].runtime` fingerprints (binary or SDK version + capability snapshot), and strict comparability checks warn when runtime fingerprints cannot be audited. If runtime fingerprints differ, treat results as an executor-runtime comparison, not only prompt/template behavior. (2) Both executors isolate user-level config: `codex` passes `--ephemeral` + `--ignore-user-config`; `codex-sdk` redirects `$CODEX_HOME` to a per-process tmp dir (auth.json symlinked through). User-level `~/.codex/config.toml` does not leak into eval runs in either case.
|
|
725
484
|
|
|
726
485
|
### Custom executor
|
|
727
486
|
|
|
728
487
|
Any shell command can serve as an executor, communicating via stdin/stdout JSON:
|
|
729
488
|
|
|
730
489
|
```bash
|
|
731
|
-
omk
|
|
732
|
-
omk
|
|
490
|
+
omk eval --executor "python my_provider.py"
|
|
491
|
+
omk eval --executor "./my-executor.sh"
|
|
733
492
|
```
|
|
734
493
|
|
|
735
494
|
**Protocol:**
|
|
@@ -770,28 +529,28 @@ When both `--control` and `--treatment` are omitted, use `--config eval.yaml` or
|
|
|
770
529
|
|
|
771
530
|
```bash
|
|
772
531
|
# explicit: one control, one or more treatments
|
|
773
|
-
omk
|
|
774
|
-
omk
|
|
532
|
+
omk eval --control v1 --treatment v2
|
|
533
|
+
omk eval --control baseline --treatment v1,v2,v3
|
|
775
534
|
|
|
776
535
|
# compare empty artifact vs explicit artifact
|
|
777
|
-
omk
|
|
536
|
+
omk eval --control baseline --treatment my-skill
|
|
778
537
|
|
|
779
538
|
# observe project-level runtime context in isolation (use a self-describing label)
|
|
780
|
-
omk
|
|
539
|
+
omk eval --control baseline --treatment project-env@/path/to/target-project
|
|
781
540
|
|
|
782
541
|
# compare "project-level runtime context" vs "explicit artifact injection"
|
|
783
|
-
omk
|
|
542
|
+
omk eval \
|
|
784
543
|
--control project-env@/path/to/target-project \
|
|
785
544
|
--treatment /path/to/target-project/.claude/skills/prd/SKILL.md@/path/to/target-project
|
|
786
545
|
|
|
787
546
|
# before vs after (old version read from git history)
|
|
788
|
-
omk
|
|
547
|
+
omk eval --control git:my-skill --treatment my-skill
|
|
789
548
|
|
|
790
549
|
# direct file paths
|
|
791
|
-
omk
|
|
550
|
+
omk eval --control ./old-skill.md --treatment ./new-skill.md
|
|
792
551
|
|
|
793
552
|
# config-file driven (evaluation-as-code)
|
|
794
|
-
omk
|
|
553
|
+
omk eval --config eval.yaml
|
|
795
554
|
```
|
|
796
555
|
|
|
797
556
|
**Prerequisites:**
|
|
@@ -822,7 +581,7 @@ In OMK, `agent` is not a catch-all term and neither is `skill`. A cleaner phrasi
|
|
|
822
581
|
#### Recommended executor
|
|
823
582
|
|
|
824
583
|
```bash
|
|
825
|
-
omk
|
|
584
|
+
omk eval --executor claude-sdk
|
|
826
585
|
```
|
|
827
586
|
|
|
828
587
|
#### Agent-related assertions
|
|
@@ -842,7 +601,7 @@ omk bench run --executor claude-sdk
|
|
|
842
601
|
No system prompt and no knowledge-carrying project dir. Requires at least one treatment to compare against:
|
|
843
602
|
|
|
844
603
|
```bash
|
|
845
|
-
omk
|
|
604
|
+
omk eval \
|
|
846
605
|
--executor claude-sdk \
|
|
847
606
|
--control baseline \
|
|
848
607
|
--treatment my-skill
|
|
@@ -853,7 +612,7 @@ omk bench run \
|
|
|
853
612
|
No system prompt, but runs inside a project dir. This is **not** a strict "bare baseline" — it is "empty artifact + project-level runtime context".
|
|
854
613
|
|
|
855
614
|
```bash
|
|
856
|
-
omk
|
|
615
|
+
omk eval \
|
|
857
616
|
--executor claude-sdk \
|
|
858
617
|
--control baseline \
|
|
859
618
|
--treatment project-env@/path/to/target-project
|
|
@@ -864,7 +623,7 @@ omk bench run \
|
|
|
864
623
|
Inject an external `SKILL.md` as the artifact while also keeping the project dir. Good for contrasting "project-level runtime context" vs "explicit single-artifact injection".
|
|
865
624
|
|
|
866
625
|
```bash
|
|
867
|
-
omk
|
|
626
|
+
omk eval \
|
|
868
627
|
--executor claude-sdk \
|
|
869
628
|
--control project-env@/path/to/target-project \
|
|
870
629
|
--treatment /path/to/target-project/.claude/skills/prd/SKILL.md@/path/to/target-project
|
|
@@ -875,7 +634,7 @@ omk bench run \
|
|
|
875
634
|
For PRD / complex business-knowledge scenarios, start with:
|
|
876
635
|
|
|
877
636
|
```bash
|
|
878
|
-
omk
|
|
637
|
+
omk eval \
|
|
879
638
|
--executor claude-sdk \
|
|
880
639
|
--samples skills/evaluate-review/eval-samples.yaml \
|
|
881
640
|
--control baseline \
|
|
@@ -885,7 +644,7 @@ omk bench run \
|
|
|
885
644
|
If you want to prove whether "the knowledge sitting inside the project directory" is effective on its own, add a second treatment:
|
|
886
645
|
|
|
887
646
|
```bash
|
|
888
|
-
omk
|
|
647
|
+
omk eval \
|
|
889
648
|
--executor claude-sdk \
|
|
890
649
|
--samples skills/evaluate-review/eval-samples.yaml \
|
|
891
650
|
--control baseline \
|
|
@@ -906,32 +665,32 @@ omk bench run \
|
|
|
906
665
|
# GLM (Zhipu)
|
|
907
666
|
export OPENAI_API_KEY="your Zhipu API key"
|
|
908
667
|
export OPENAI_BASE_URL="https://open.bigmodel.cn/api/paas/v4"
|
|
909
|
-
omk
|
|
668
|
+
omk eval --executor openai-api --model glm-4-plus \
|
|
910
669
|
--judge-models openai-api:glm-4-plus --no-cache
|
|
911
670
|
|
|
912
671
|
# Qwen (Alibaba)
|
|
913
672
|
export OPENAI_API_KEY="your Qwen API key"
|
|
914
673
|
export OPENAI_BASE_URL="https://dashscope.aliyuncs.com/compatible-mode/v1"
|
|
915
|
-
omk
|
|
674
|
+
omk eval --executor openai-api --model qwen-plus \
|
|
916
675
|
--judge-models openai-api:qwen-plus
|
|
917
676
|
|
|
918
677
|
# DeepSeek
|
|
919
678
|
export OPENAI_API_KEY="your DeepSeek API key"
|
|
920
679
|
export OPENAI_BASE_URL="https://api.deepseek.com"
|
|
921
|
-
omk
|
|
680
|
+
omk eval --executor openai-api --model deepseek-chat \
|
|
922
681
|
--judge-models openai-api:deepseek-chat
|
|
923
682
|
|
|
924
683
|
# Moonshot (Kimi)
|
|
925
684
|
export OPENAI_API_KEY="your Moonshot API key"
|
|
926
685
|
export OPENAI_BASE_URL="https://api.moonshot.cn/v1"
|
|
927
|
-
omk
|
|
686
|
+
omk eval --executor openai-api --model moonshot-v1-8k \
|
|
928
687
|
--judge-models openai-api:moonshot-v1-8k
|
|
929
688
|
```
|
|
930
689
|
|
|
931
690
|
**Ollama local model:**
|
|
932
691
|
|
|
933
692
|
```bash
|
|
934
|
-
omk
|
|
693
|
+
omk eval --executor "python examples/custom-executor/ollama-executor.py" \
|
|
935
694
|
--model llama3 --no-judge
|
|
936
695
|
```
|
|
937
696
|
|
|
@@ -947,7 +706,7 @@ omk bench run --executor "python examples/custom-executor/ollama-executor.py" \
|
|
|
947
706
|
| Variable | Description |
|
|
948
707
|
|---|---|
|
|
949
708
|
| `CCV_PROXY_URL` | proxy requests through cc-viewer for live eval-traffic visualization |
|
|
950
|
-
| `
|
|
709
|
+
| `OMK_REPORT_PORT` | report server port (default: 7799) |
|
|
951
710
|
|
|
952
711
|
## Requirements
|
|
953
712
|
|
|
@@ -966,7 +725,7 @@ This tool is designed for **local trusted environments** (dev machines, CI pipel
|
|
|
966
725
|
|
|
967
726
|
**Recommendations:**
|
|
968
727
|
|
|
969
|
-
- Do not expose
|
|
728
|
+
- Do not expose the local report server on the public internet (no auth)
|
|
970
729
|
- Don't use third-party eval-samples you haven't vetted
|
|
971
730
|
- Custom assertions have a 30-second timeout but no sandbox isolation
|
|
972
731
|
|