mk:benchmark
Maintainer-only canary suite that scores the MeowKit harness against a few ground-truth tasks and compares runs.
| Source | .claude/skills/benchmark/SKILL.md |
| Owner | testing |
| Runtime | claude-code |
| Risk | medium |
Maintainer-only
This skill measures this repository's own harness, so the published kit withholds it and the .claude/benchmarks/ corpus it reads. An installed project has no /mk:benchmark. The page describes the maintainer procedure.
mk:benchmark runs a small set of canary tasks through mk:autobuild, records a verdict, score, duration and cost per task, and compares runs. The dead-weight audit (references/dead-weight-audit-rules.md) uses the results to decide which harness components are load-bearing. Run it before a harness change to get a baseline and after it to see the delta.
When not to use it
It does not replace unit tests and is not for the performance of a production system. Skip it when the harness was run end to end by hand within the last hour (use that data), or when the budget cap would be reached before the suite finishes (it records a partial result and alerts).
Usage
/mk:benchmark run
/mk:benchmark run --full
/mk:benchmark compare 260408-1430 260408-1530| Command | Tasks | Cost cap |
|---|---|---|
run | Quick tier, 5 tasks in .claude/benchmarks/canary/quick/ | $5 |
run --full | Quick tier plus the heavy 06-small-app-build task | $30 |
compare <a> <b> | Per-task score and cost delta between two prior runs | None, reads saved results |
--full is opt-in because the heavy task starts mk:autobuild, which can run for hours. The run refuses without the flag.
What it does
scripts/run-canary.shwrites a manifest of pending tasks and a cost-ledger path, then prints instructions. A shell script cannot startmk:autobuildper task (each needs a fresh subagent context), so the invoking agent must follow the printed instructions and fill in each task result.- After each task the agent appends a cost receipt to the run's
.ledger.jsonland runsrun-canary.sh check-cap <ledger> <cap>. Exit code 2 means the cap was reached and the run stops.--budget Norbudget.capin.meowkit/config.yamloverrides the tier cap. scripts/compare-runs.shreads two run files and prints the delta table.
Outputs
| Artifact | Location |
|---|---|
| Run results | .claude/benchmarks/results/{run-id}.json |
| Trace event | event=benchmark_result in the trace log, tagged with benchmark, harness and model versions |
| Cost baseline | Appended to .meowkit/telemetry/cost-log.json as {run_id, date, tier, pass_rate, avg_score, total_cost_usd} |
| Git index audit | .claude/benchmarks/audits/{YYMMDD-HHMMSS}-audit.json |
Git index audit
scripts/git-index-audit.sh [repo] records a fingerprint of git's tracked state: file and directory counts, a SHA-256 of the sorted tracked paths and a SHA-256 of the sorted git ls-files -s output (which includes mode, blob hash and stage). With two arguments (<local> <remote>) it also reports local-only and remote-only counts and a recursive diff status. Audit files sit beside results/, not in it, and carry "type": "audit". MEOWKIT_AUDIT_OUT_DIR overrides the output directory.
Gotchas
- A passing canary does not mean the harness is correct. The tasks are simple and catch regressions, not every bug.
- Do not compare runs across model versions without saying so, because a model change confounds the delta.
- Investigate a FAIL by hand and rerun only after a code change.
- The audit needs the
--fullheavy task to catch problems that appear only in real product builds. - If a harness bug stops
mk:autobuildfrom starting, run single specs with/mk:cook <spec.md>and score them by hand (Rule 8 in the audit rules). - The cross-harness journey J10 is not automated. Run it by hand with
mewkit init --target <runtime>andmewkit validate --target <runtime>.