graff — a fast agentic coding harness in Zig: multi-provider, MCP, workflows, DGM evolution loop, TS/Python SDKs
Python
docs(adr): default RLM vs --old is 136s / 105k in vs 161s / 203k
Cursor Agent87dea10a4ec2
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 92646ba4..d9c4e3df 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -19,6 +19,11 @@ current is part of cutting a release.clobber `--old` / `--rlm`.- The spec stays folded behind `load_tool_schemas`. `--schema` / the64-cell tool-catalog kernel do not grow a new tool.+- Measured default-RLM vs `--old` on grok-4.6 SuperGrok (one `rlm`+ suite rep): both 5/5, $0.0000 / $0.0000 (flat-rate). Persist+ `bind-reuse` 99.6s / 135k in → 39.2s / 25.3k in. Suite totals+ 161s / 203k in → 136s / 105k in. Scatter wall is a wash this rep+ (#619's 86.8s → 23.7s did not reproduce). See ADR 0022.## v0.0.274 (2026-08-23)diff --git a/docs/adr/0022-rlm-is-opt-in-speculative-ptc.md b/docs/adr/0022-rlm-is-opt-in-speculative-ptc.mdindex 7747855e..78725e68 100644--- a/docs/adr/0022-rlm-is-opt-in-speculative-ptc.md+++ b/docs/adr/0022-rlm-is-opt-in-speculative-ptc.md@@ -106,14 +106,54 @@ regression* without a catalog tax. Per-task swings are one-rep variance.**652s / 816k in / 9.4M RSS**. `map-conflict` was the only clear`--rlm` win (84s → 52s). Same pass rate, no memory win, no wall winon this suite — `--old` stays as the structured-only escape. Default- flipped anyway because scatter (`needle-files` 62.8s → 5.6s) and Prime- persist (`bind-reuse` 97.5s → 41.4s) are the loops that matter, and- core/swe did not regress.-- Prime persist (`bind-reuse`): grok-4.6 one rep. `--rlm` **41.4s /- 6 calls / 30.9k in** and the model actually did `s = read_file(...)`- then a second script `print(s)`. Native **97.5s / 12 calls / 145k- in** — it spent a turn discovering `rlm` is off, then wrote- `found.txt` the long way. `subagent()` was not exercised live.+ flipped anyway because persist (`bind-reuse`) is the spend win, #619+ scatter showed a wall win that is one-rep fragile, and core/swe did+ not regress.++## Default vs `--old` (this branch, 2026-08-25)++Live `graff-evals/run.py --suite rlm --harness graff-dev-old,graff-dev+--model grok-4.6` (one rep, SuperGrok OAuth, `run-20260825-043814.jsonl`).+`graff-dev` is default RLM; `graff-dev-old` is `--old`. The `[usage]`+footer printed `$0.0000 · N subscription call(s), flat-rate (not in $)`+both ways — token/call counts are the cost axis on a plan seat.++| harness | pass | wall | in | out | calls | $ |+|---|---:|---:|---:|---:|---:|---:|+| `--old` | 5/5 | 161.0s | 203276 | 4186 | 26 | $0.0000 |+| default rlm | 5/5 | 135.7s | 105414 | 1669 | 22 | $0.0000 |+| **delta** | wash | **−25.3s (−16%)** | **−97862 (−48%)** | **−2517 (−60%)** | −4 | wash |++| task | `--old` s | default s | `--old` in/out | default in/out |+|---|---:|---:|---:|---:|+| multi-read | 38.25 | 40.49 | 23212 / 337 | 23887 / 357 |+| scatter-sum | 10.24 | 9.93 | 18318 / 379 | 18800 / 389 |+| fanout-merge | 6.12 | 39.33 | 13303 / 157 | 23590 / 297 |+| needle-files | 6.82 | 6.70 | 13475 / 197 | 13836 / 211 |+| bind-reuse | 99.58 | 39.21 | 134968 / 3116 | 25301 / 415 |++**Saved:** persist `bind-reuse` — 99.6s / 135k in / 11 calls → 39.2s /+25.3k in / 5 calls (−61% wall, −81% input). The model did+`s = read_file(...)` then `print(s)`. `--old` spent a turn discovering+`rlm` is off, then wrote `found.txt` the long way. Confirms #619+(97.5s / 145k → 41.4s / 30.9k).++**Wash:** the four scatter tasks this rep. `--old` `needle-files` was+already 6.8s (no 62.8s hang), so #619's 86.8s → 23.7s did not+reproduce. Default `fanout-merge` wrote a correct `merged.cfg` then+hung until the runner killed it (`timed_out`, still pass) — one-rep+noise, not a catalog tax. Scatter-only totals: 61.4s / 68.3k in vs+96.5s / 80.1k in.++**$:** SuperGrok is flat-rate. Do not read `$0.0000` as "free on a+metered key" — the 98k input / 2.5k output token cut *is* the spend+win if the same seats were `XAI_API_KEY`.++Core 12/12 dead heat (~86s, +304 in) and SWE 4/6 (~624s vs 652s,+822k vs 816k in) were not re-run; cite #619. `subagent()` has no live+eval task; unit pins landed on this branch (`maybeAppend` keeps+`subagent`, `feedLive` launches two independent `subagent()` calls,+persist does not break `execSubagent`, `emitArgText` stays rlm-only).Graff's `--rlm` is a Zig subset of [Prime Agent's RLM programmingmodel](https://github.com/PrimeIntellect-ai/prime-agent/blob/main/packages/coding-agent/docs/rlm.md),diff --git a/docs/releases/v0.0.276.md b/docs/releases/v0.0.276.mdindex af88add5..be91dd2b 100644--- a/docs/releases/v0.0.276.md+++ b/docs/releases/v0.0.276.md@@ -13,3 +13,10 @@ are the only Prime-shaped pieces, still in Zig.`--schema` and the 64-cell tool-catalog kernel do not list `rlm` as anew always-on tool — it still folds behind `load_tool_schemas`.++Measured 2026-08-25 on grok-4.6 SuperGrok (`graff-dev-old` vs default+`graff-dev`, one `rlm` suite rep, ADR 0022): both **5/5**, **$0.0000**+both ways (subscription, not in $). Persist `bind-reuse` **99.6s /+135k in → 39.2s / 25.3k in**. Suite **161s / 203k in → 136s / 105k+in**. Scatter wall was a wash this rep; the #619 86.8s → 23.7s win+was one-rep `needle-files` variance.diff --git a/graff-evals/run.py b/graff-evals/run.pyindex 708ec3fd..6aefd8f5 100755--- a/graff-evals/run.py+++ b/graff-evals/run.py@@ -123,6 +123,12 @@ def parse_answer_and_usage(harness, stdout, stderr):if m:usage = {"calls": int(m.group(1)), "in": int(m.group(2)),"cached": int(m.group(3)), "out": int(m.group(4))}+ cost_m = re.search(r"\$([0-9.]+)", stderr)+ if cost_m:+ usage["cost_usd"] = float(cost_m.group(1))+ sub_m = re.search(r"(\d+) subscription call\(s\)", stderr)+ if sub_m:+ usage["sub_calls"] = int(sub_m.group(1))return answer, usage@@ -270,6 +276,7 @@ def _bucket(records):b = by.setdefault(r["harness"], {"n": 0, "ok": 0, "wall": 0.0, "first": 0.0, "first_n": 0,"tin": 0, "tout": 0, "calls": 0, "rss": 0, "cpu": 0.0,+ "usd": 0.0, "usd_n": 0,})b["n"] += 1b["ok"] += bool(r.get("outcome_ok"))@@ -280,6 +287,9 @@ def _bucket(records):b["tin"] += r.get("tok_in") or 0b["tout"] += r.get("tok_out") or 0b["calls"] += r.get("tok_calls") or 0+ if r.get("tok_cost_usd") is not None:+ b["usd"] += r["tok_cost_usd"]+ b["usd_n"] += 1b["rss"] = max(b["rss"], r.get("rss_peak_kb") or 0)cpu = r.get("cpu_sample_s")if not cpu:@@ -290,11 +300,12 @@ def _bucket(records):def _print_table(title, by):print(f"\n{title}")- print(f"{'harness':<16} {'pass':>7} {'wall':>8} {'first':>7} {'rss':>8} {'cpu':>7} {'in_tok':>9} {'out_tok':>8} {'calls':>6}")+ print(f"{'harness':<16} {'pass':>7} {'wall':>8} {'first':>7} {'rss':>8} {'cpu':>7} {'in_tok':>9} {'out_tok':>8} {'calls':>6} {'usd':>8}")for h, b in by.items():first = (b["first"] / b["first_n"]) if b["first_n"] else 0.0+ usd = f"${b['usd']:.4f}" if b["usd_n"] else "—"print(f"{h:<16} {b['ok']}/{b['n']:<5} {b['wall']:>7.1f}s {first:>6.1f}s "- f"{_fmt_mib(b['rss']):>8} {b['cpu']:>6.1f}s {b['tin']:>9} {b['tout']:>8} {b['calls']:>6}")+ f"{_fmt_mib(b['rss']):>8} {b['cpu']:>6.1f}s {b['tin']:>9} {b['tout']:>8} {b['calls']:>6} {usd:>8}")def summarize(records):