Skip to content
المشاريع

حول

CLI text optimizer built on GEPA. Uses Agentic Coding CLI's as mutator and observer -- no api keys required

الذكاء الاصطناعي وتعلّم الآلة

كيف تُقاس هذه الأرقام

النمو المقاس للنجوم

خلال 24 ساعة
٠
خلال 7 أيام
٠
خلال 15 يومًا
٠
خلال شهر
٠

تغيّر صافي النجوم خلال فترات متداخلة، وليس مجموعًا يوميًا. تبقى القياسات المفقودة فارغة. النجوم تقيس الاهتمام لا جودة البرمجيات.

README.md

الأصل

Hone

Hone is an experimental engine for improving code against a fixed, measurable objective. You give it a task with a baseline, an evaluator and a budget; a model-backed optimizer proposes changes in a sandbox, and separate trusted code measures each candidate against the baseline and keeps only what actually scores better. The point of the split is that the thing writing the code never gets to grade its own work. I built it to find out how far that loop goes on real performance and quality problems, and whether an optimizer that improves itself on one set of tasks gets better at tasks it has never seen.

It is research code. It runs, it has a large test suite, and it has produced a few honest results, listed below. It is not a packaged tool yet.

This repository is the engine only. The tasks it runs live in twaldin/hone-capsules.

A capsule, concretely

A task is packaged as a capsule. Here is one of the small ones, calibration-varint-decode:

capsules/calibration-varint-decode/
  capsule.config.json      objective, image, evaluator command, budget, sandbox limits
  manifest.json            content-addressed identity of everything below
  baseline/
    solution.py            the only file the optimizer may change
    eval.py, worker.py     the evaluator and its worker protocol (protected)
    challenge.json         the public contract (protected)
  assets/train/            cases the optimizer can see
  assets/validation/       cases only the trusted evaluator sees
  diagnostics/
    naive/ improved/ broken/ shortcut/   reference solutions used to check the evaluator
    ordering-report.json   proof the evaluator ranks them in the expected order

The objective in its config reads: "Reduce trusted parent-measured latency for decoding frozen unsigned LEB128 byte streams while preserving the exact sequence of 32-bit values. Only solution.py is mutable." The budget is 12M tokens, $25, three hours of wall clock and 200 evaluator calls, and the evaluator runs in a pinned container with 512 MiB and one CPU.

Before a capsule is admitted, its evaluator has to rank four reference solutions correctly: a naive one, an improved one, a broken one that must fail, and a shortcut that games the visible cases and must not win. That ordering check is what keeps the evaluator from rewarding overfitting. The tools that scaffold a capsule and run that check are in capsule-kit/.

How a run works

  1. Admission. The trusted CLI checks the capsule's hashes, protected paths, image and ordering report, and seals the run configuration.
  2. Proposal. The optimizer (optimizer/) asks a model-backed coding worker to edit the mutable files inside a sandbox.
  3. Measurement. The broker (trusted/broker/) runs the evaluator in the pinned image, enforces the budget and records every evaluation in a durable journal. The optimizer's own claims about its work carry no weight.
  4. Selection and delivery. Only candidates that beat the incumbent on the trusted measurement are kept. You inspect the best candidate and its diff, then deliver it to a repository explicitly; delivery is off by default.

On top of single runs there are campaigns, which measure changes to the optimizer itself across a frozen set of capsules, and a recursive mode where an outer optimizer edits the inner optimizer and the result is scored on the inner optimizer's performance across a panel of tasks. See Architecture and Methodology.

Results so far

Only results with retained evidence are listed. Each one is narrow.

Leduc poker solver, fixed compute: a small real win, after one honest failure. A capsule scored a standard-library port of a Leduc hold'em CFR+ solver (from the MIT-licensed davidvayn/pokersolver) by exact exploitability, with quality q = 1 / (1 + exploitability). The rule, fixed before measuring: a candidate only counts if it does not buy its improvement with extra compute.

  • The first fixed-compute campaign found a candidate that raised validation q from 0.8453 to 0.8599, but it ran at 1.0543× the baseline's time against a 1.05× limit. It was rejected and the holdout was never opened.
  • A second campaign found a change that keeps the same number of CFR+ sweeps and only reweights the average policy at low iteration counts (iteration → iteration³ below 100 iterations). It ran at 0.9677× the baseline's pooled runtime (every replicate at most 1.014× against a 1.02× limit, so this is parity, not a speedup). Validation q went from 0.8453 to 0.8599 (+0.0146), and the sealed holdout, opened once after selection, went from 0.7733 to 0.7899 (+0.0166).

The fixed-compute solver is in hone-capsules/capsules/leduc-cfr-exploitability/artifacts/fixed-compute-best/ under its upstream MIT notice. The neighbouring best/ directory holds an earlier candidate that bought its gain with extra sweeps and doesn't meet the fixed-compute rule. The capsule itself, its sealed cases and the per-case evidence stay private.

The original Python Hone: a prompt that transferred to held-out bugs. Before this rewrite, Hone evolved a system prompt for Claude Haiku 4.5 fixing real open-source bugs. On 20 training bugs the solve rate went from about 55% to 92%. On 9 held-out bugs it had never seen, run three times each, it went from 65% to 85%. About half of the training lift transferred. Write-up.

Recursive optimizer campaigns: they ran, and they did not establish transfer. In August 2026 I calibrated the inner loop (80 cells over four calibration capsules; an inner budget of 4 episodes was enough) and ran several recursive campaigns on a 21-capsule cohort. They exercised the whole machinery, including pauses, resumes and failure accounting, but the promotion decisions in the main campaign were all scored on training cases, so they say nothing about generalization. A later retrospective check on one development task (trade-up profit) found that about 93% of an in-sample gain held on 20 never-scored cases; on another (FLT text input) the measurement could not resolve the effect. There is no result yet showing that a self-improved optimizer does better on unseen tasks.

Quickstart

You need Node 20+ and pnpm 10.

git clone https://github.com/twaldin/hone.git
cd hone
pnpm install --frozen-lockfile
pnpm typecheck
pnpm test
node trusted/cli/bin/hone.js --help

That checks the engine without running an optimization, and it needs nothing from the capsules repository. A real run additionally needs Docker on a Linux host, the capsule's exact pinned image, an OpenAI-compatible model endpoint set through HONE_UPSTREAM_BASE_URL (with its bearer in a mode-600 file named by HONE_UPSTREAM_API_KEY_FILE, or in HONE_UPSTREAM_API_KEY), and a checkout of hone-capsules next to this one. Its README covers the clone; some capsules embed a Git object store, so follow its steps rather than a plain git clone. Then:

export HONE_CAPSULES_ROOT=../hone-capsules/capsules   # or pass --capsules-root on each command
node trusted/cli/bin/hone.js run ../hone-capsules/capsules/<name> --headless
node trusted/cli/bin/hone.js best
node trusted/cli/bin/hone.js diff --stat

Without either setting, Hone looks for capsules in ./capsules under the directory you run it from. Getting started has the details.

Development optimizer pilot

The authorized seed-0 development pilot completed all six searches: 18,250 calls and $50.533065-equivalent. No method's equal-weight two-task 95% interval excludes zero. The report separates stochastic same-artifact re-scores from artifact changes and records censored promotion attempts. Predeclaration 10 authorized seeds 1 and 2 after the Hone/plain selection-reuse fix. That attempt stopped after two consecutive zero-call infrastructure failures, with two cells complete and eight unstarted. Its primary method aggregates are unavailable. Seed 0 is not pooled with it for Hone or plain. Final-test evaluation and seeds beyond 2 remain out of scope.

Addendum 1 authorized the remaining ten cells on lane-local omp 18.16.0. Infrastructure rerun 1 aborted on an ENOSPC journal write: five searches completed, HoVer/seed-1/plain has a damaged prefix, and seed 2 was unstarted. All five completed cells have zero selection re-scores. The offline diagnosis checked 10,236 scores and found one mismatch, MBPP/plain task 720, outside the damaged cell; the original worker-failure subtype was not retained. Historical figures stay as recorded and separate.

Predeclaration 11, amended before execution, authorizes a fresh twelve-cell infrastructure rerun after tests, admission, CI and exact-head cross-family review. Trusted candidate exceptions, wrong output and candidate timeouts remain wrong answers, score 0. Genuine worker death, Docker failure, invalid frames and outer timeout without a trusted verdict remain unscored infrastructure. Only intentional negative probes may count a receipted infrastructure result as an unscored rejection. The campaign stops before a projected total above 35,000 calls or free disk below 100 GB. Search policies, other gates and per-cell caps stay unchanged. Official GEPA and its adapter are not edited. Final-test evaluation, seeds beyond 2 and merge remain out of scope.

Infrastructure rerun 2 under predeclaration 11 attempted all twelve cells: eleven completed at declared caps and MBPP/seed-2/GEPA retained an unscored worker-exit failure. The dispatcher ended normally. Recorded totals are 30,285 calls and $91.251903 reported cost-equivalent, with one unknown-usage call and unknown internal failed-attempt usage. All Hone/plain cells have zero selection re-scores; unchanged MBPP/seed-1/GEPA has one. Hone's primary delta is +9.28 points [0.00, 25.75], plain's is +2.50 [0.00, 6.94], and GEPA's is unavailable. Neither available primary interval excludes zero. Tables and archive-only replay keep seed 0 separate. No superiority claim or merge.

The initial admission stop and its NOT_READY review remain historical evidence. The amended runtime isolates candidate execution from its supervisor and uses explicit taskset -c 6 for admission and measured units. All 339 native pilot tests passed, including the full retained MBPP control/noise replay and wrong-answer zeros for rows 640/847. A real sandbox smoke confirmed candidate exceptions and timeouts score 0, while abrupt worker death and missing frames remain unscored. Search still requires passing admission, green CI and exact-head READY.

The worker-exit review stop found that an escaped descendant could hold the pipe after a worker exited, causing the supervisor to replace its real exit outcome with timeout/score 0. The authorized correction preserves the exited worker's captured bytes and real exit status under the existing policy. Earlier proof bundles remain unchanged; fresh admission, CI and exact-head cross-family READY gate the twelve-cell run.

The queued-frame review stop records completed valid frames left unread at the deadline. The authorized I/O correction preserves completed inner and outer invocation outcomes with bounded, genuinely nonblocking reads and real exit status. A trusted timeout requires observing the owned worker alive at expiry, rather than inferring it from a later SIGKILL status. Further findings in this same class are fixed within the authorization. Earlier evidence remains unchanged. Fresh admission, green CI and exact-head cross-family READY still precede the twelve-cell run.

Correction 8a fixed native gzip request observation after an infrastructure abort. The unchanged contract 8 counts terminal provider refusals as zero-score responses, never retries them, and stops on refused-versus-answered request hashes. The final controls-7b attempt completed all 16 pairs without restart. IFBench failed its frozen noise gate: envelope 0.117281 exceeds contrast 0.020833. The selected panel is MBPP + HoVer, with no further substitution. Earlier evidence remains unchanged. At that admission handoff, no matrix or merge was authorized.

pilot/ compares Hone's paired, noise-calibrated policy, pinned official GEPA, and a plain agent loop. The admitted development-only tasks are bounded MBPP agent programs and HoVer; IFBench's failed measurement remains public evidence, not an admitted task. The runner uses one subscription route, an account allowlist, usage throttling, and matched reported-plus-estimated charged budgets. Final-test labels stay sealed. The pre-search run plan records the two-task projections; the completed seed-0 measurements are linked above.

The pilot is an admission experiment, not an optimizer-quality claim. Charged totals distinguish provider-reported usage from conservative refusal estimates. Internal failed-attempt tokens remain a disclosed undercount; complete attempt and failed-call receipts are required before a full comparison. See the pilot contract and commands.

The first two epochs exposed MBPP contract defects. Predeclaration 3 separated candidate execution from trusted grading, and all 300 MBPP adversarial checks passed. IFBench then failed its control ranking. Predeclaration 4 fixes external P controls and the IFBench headroom rule before new model calls. Correction 4a fixes transport placement and infrastructure-error scoring, requiring MBPP re-admission without changing its cohort or gates. The pilot guide records the commands.

Contract 4 admission stopped without searches. AIME's 16-pair noise envelope was 0.07616286, above its 0.075 positive-control contrast. MBPP and IFBench passed. The $10 search cap and selection sets were not changed. The final admission handoff retains the results, usage and zero-call replay evidence. No optimizer comparison is claimed.

Predeclaration 5, committed before new pilot calls, withdraws AIME without changing its failed evidence. It admits the previously named HoVer reserve once with the same 40-row controls and 16-pair noise gate. If HoVer fails, the panel is MBPP + IFBench only, labelled a two-task development pilot. There are no further substitutions. At that point, the larger pilot remained unauthorized pending review of the three method smokes.

HoVer passed its frozen ranking and noise gates: improved 0.600, naive 0.325, envelope 0.178765 below contrast 0.275. All three seed-0 MBPP smokes completed after the security rebase and execution re-seal. The runner reported a three-task panel, but the later verified IFBench partition defect invalidates that admission. Measured results retain phase costs and accounting limits; all methods retained the same seed artifact, so no optimizer advantage is established. Neither matrix was authorized then.

Status and limitations

  • Running a capsule from a fresh clone is not smooth yet. Production runs require an admission receipt and the pinned image, and there is no public command that builds both for you.
  • Most results above came from one machine and one model route. Nothing here has been independently reproduced.
  • Terminal tasks are not runnable from the public repos. Eleven capsules form the final test set for the recursive experiment. Their directories in hone-capsules hold source references (manifest.reference.json) so you can read the contract, but their inputs and answers are private so they stay a real test.
  • Some tasks come from private projects. The trade-up, Monoagent and Floyd capsules are derived tasks released under MIT; the original applications are not. See PUBLICATION.md in hone-capsules.
  • The recursive experiment is unfinished. Cross-task transfer has not been measured, and the evidence publisher is not built.

Documentation

Guide Read it for
Getting started Dependencies, checks, pointing Hone at capsules and what a real run needs.
CLI Run, inspect, deliver, calibrate and campaign commands.
Architecture The trust boundary between optimizer and evaluator, and the state Hone keeps.
Capsules Task packages, admission, capsule-kit and terminal source references.
Durable runs Pauses, resumes, source migration, image re-pins and closures.
Methodology Experiment levels and what each one can show.
Recursive experiment status What the recursive campaigns did and what is still missing.
Results What a published result has to include.
Development optimizer pilot Tasks, protected evaluation, subscription accounting, controls, smoke, and the gated pilot handoff.

License

MIT, see LICENSE. Capsules, including third-party code with its own licenses, are in hone-capsules.

استكشف مشاريع مشابهة ومرتبطة

جارٍ التحميل…