From dffedebd82d5d43344a164b3c3a74b8d32bb6896 Mon Sep 17 00:00:00 2001 From: Nikolay Petrov Date: Sat, 28 Nov 2026 20:40:10 -0800 Subject: [PATCH 1/8] docs: measured findings on invocation, verifiers and path stability Add what the skill-evaluation experiments measured to the two guides: - evaluating-treatments: report invocation and split done-right by invoked / not invoked; pointer placement (CLAUDE.md vs README); trigger-heavy descriptions; Stop-hook gates, and checking the hook fired before crediting it. - run-consistency: the harness result is not a verdict (use a verifier for --outcomes); path distances at n = 6 are noisy and the paraphrase effect did not replicate on real tasks. Numbers are haiku-4-5 on one toy task and two real tasks, directional. Signed-off-by: Nikolay Petrov --- dokimi/docs/evaluating-treatments.md | 51 ++++++++++++++++++++++++++++ dokimi/docs/run-consistency.md | 21 ++++++++++++ 2 files changed, 72 insertions(+) diff --git a/dokimi/docs/evaluating-treatments.md b/dokimi/docs/evaluating-treatments.md index fa9875066f..48405d70c0 100644 --- a/dokimi/docs/evaluating-treatments.md +++ b/dokimi/docs/evaluating-treatments.md @@ -702,6 +702,57 @@ The same rules hold for skills, MCP tools and plain function tools. [Tool preference](tool-preference.md)). Use the proxy to find and rank changes, then confirm the ones you ship on the real harness with a pinned listing budget. +### Measure invocation before the effect + +In these runs a skill helped only when the agent loaded it. Report how often it was invoked, and +split the outcome by invoked and not invoked: the arm mean hides the split. "Done +right" means the verifier passed and the task's required steps were kept (in the +toy task: the check ran, the changelog entry was written, nothing was committed). +In the toy skill-selection series with haiku-4-5, all 11 runs that invoked the skill +were done right, and none of the 25 that did not invoke it were. On two real tasks +the split was 5 of 9 against 0 of 9 (Fisher p = 0.03). A skill removes uncertainty +about the procedure; what it leaves is whether it gets selected. In the toy repeat +series haiku invoked the skill in 0 to 3 of 6 runs per arm, and sonnet in 6 of 6 runs, +so the gap showed up with haiku only. + +Where the pointer lives decides whether it is seen. A one-line pointer to the skill +in the repo's `CLAUDE.md`, which the harness loads at the start of every session, +took invocation from 2 of 12 to 12 of 12 (toy task, p = 0.0001). The same line in +`README.md` had no effect, but that test was nearly empty: the agents opened +`README.md` in at most 1 of 12 runs and never reached the line. A file the harness +loads at session start is in context every time; a document the agent has to choose +to open may not be opened at all. Check the trace for the read before counting a +pointer as a treatment. + +The wording of the skill's description matters too. A trigger-heavy description +("MUST use for ANY change, bug fix, or edit in this repo") raised invocation from 2 +of 12 to 7 of 12 (p = 0.087), and done right by the same count (p = 0.096). That is +directional at this size. + +A gate does not depend on invocation. A Stop hook that blocks the stop until the +repo's procedure is met gave haiku 5 of 6 done right in the repeat series, against +0 of 6 with a script-only skill (permutation p = 0.015); across the three toy series +14 of 18 hook runs were done right. On the rename task the hook was done right in 5 +of 12 runs, against 0 of 12 with no guidance (p = 0.037), but not clearly better than +the prose skill (5 of 12 against 2 of 12, p = 0.36). So on real tasks the hook's +advantage over no guidance was shown only on the rename task, and its advantage over +a prose skill was not shown on rename either. + +Before you credit a gate, check that it fired. A hook that passes leaves no trace, +so a blocked stop is the only evidence: count the `Stop hook feedback` and +`stop hook error` lines in the transcripts (a blocked stop shows as a failed +`Hook:Stop` step in `trace consistency`, see +[run-consistency.md](run-consistency.md)) and compare them with the runs that failed +the procedure. Write hook commands with `"$CLAUDE_PROJECT_DIR"` in the path. A +relative path works only while the agent stays in the repo root: in one arm of the +degrade task the hook failed silently (exit 127, not blocking) in 4 of 6 runs after +the agent changed directory. The degrade hook arm is therefore untested, and no +done-right rate is reported for it. + +All of this is haiku-4-5 on one toy task and two real tasks, with 6 runs per toy +cell and at most 12 per real cell. The comparisons are not corrected for multiple +tests. Treat the numbers as directional. + ## Comparing cells across runs One treatment measured over several models is many artifacts, one per cell. Two tools read diff --git a/dokimi/docs/run-consistency.md b/dokimi/docs/run-consistency.md index 892a3a206b..d557db0549 100644 --- a/dokimi/docs/run-consistency.md +++ b/dokimi/docs/run-consistency.md @@ -69,6 +69,17 @@ timed out or was cut off) counts as failed without `--outcomes`, so it cannot dr out of the pass rate; the table shows `runs` and `judged`. A key may spell the trace's path any way that resolves to the same file: as given on the command line, as an absolute path, or through a symlink or `..`. A file name or stem that two traces share (`base/1.jsonl`, `skill/1.jsonl`) is refused: key those by full path. Two keys that spell one trace's path with different verdicts are refused. +The harness result is not a verdict. In the toy series the harness reported +`success` in all 96 runs, yet only 40 of 96 were done right, so a result-only score +could not tell the arms apart. In the real tasks 25 of the 33 runs that failed the +procedure still claimed it passed. Agents also report a check as passed after +running a weaker one: in the haiku toy series, 10 of 36 non-hook answers said the +tests passed after `pytest` alone, never the repo's `make check`. In the haiku +fault series, after a transient pytest failure, 5 of the 18 runs without a hook +switched to ad-hoc `python -c` checks and reported success, and none of the 24 runs +(all arms) said the test run had failed. Write the verdict +with a script that runs the repo's checks itself, and pass it with `--outcomes`. + ## Strategies A task with two valid routes would read as unstable if every pair of runs were @@ -171,6 +182,16 @@ removed: the tool choice (`mix_jsd`), the order (`order_distance`), the targets (`action_distance`), the failure handling (`last_ok`, failed calls) or the final check (`after_last`). +Read path distances from small samples with care. At 6 runs per cell the bootstrap +95% interval on `order_distance` is about ±0.1 to ±0.2 (repeat haiku with a script +skill: 0.18, interval 0.06 to 0.29), so two cells that differ by less than that do +not show a difference in path stability. Paraphrasing the prompt raised the order +distance on the toy task (haiku: 0.18 to 0.40 in the repeat series, 0.53 to 0.62 +paraphrased; p = 0.0002), but on the two real tasks it did not replicate (−0.04, +p = 0.18). Path stability did not predict correctness either: in one toy cell the +lowest order distance (0.18) came with 0 of 6 done right. For a rate of 0 of 6 or +6 of 6, report a Wilson interval: 0 of 6 means under about 40%. + Background: *Towards a Science of AI Agent Reliability* (arXiv:2602.16666) for the outcome / trajectory-distribution / trajectory-sequence / resource split; *Consistency as a Testable Property* From 22e3f84c59de24ea2d2d438968da03cad2b8d995 Mon Sep 17 00:00:00 2001 From: Nikolay Petrov Date: Sat, 28 Nov 2026 20:58:25 -0800 Subject: [PATCH 2/8] docs: estimate path-distance contrasts directly Thread: PRRT_kwDOVBg7g869LCA1 Signed-off-by: Nikolay Petrov --- dokimi/docs/run-consistency.md | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/dokimi/docs/run-consistency.md b/dokimi/docs/run-consistency.md index d557db0549..822174281d 100644 --- a/dokimi/docs/run-consistency.md +++ b/dokimi/docs/run-consistency.md @@ -182,15 +182,20 @@ removed: the tool choice (`mix_jsd`), the order (`order_distance`), the targets (`action_distance`), the failure handling (`last_ok`, failed calls) or the final check (`after_last`). -Read path distances from small samples with care. At 6 runs per cell the bootstrap -95% interval on `order_distance` is about ±0.1 to ±0.2 (repeat haiku with a script -skill: 0.18, interval 0.06 to 0.29), so two cells that differ by less than that do -not show a difference in path stability. Paraphrasing the prompt raised the order -distance on the toy task (haiku: 0.18 to 0.40 in the repeat series, 0.53 to 0.62 -paraphrased; p = 0.0002), but on the two real tasks it did not replicate (−0.04, -p = 0.18). Path stability did not predict correctness either: in one toy cell the -lowest order distance (0.18) came with 0 of 6 done right. For a rate of 0 of 6 or -6 of 6, report a Wilson interval: 0 of 6 means under about 40%. +Path distances can be noisy in small samples. In the toy repeat series, the +haiku cell with a script skill had an `order_distance` of 0.18 and a bootstrap +95% interval of 0.06 to 0.29 over six runs. To compare cells, estimate their +difference in `order_distance` with an interval or a test that follows the +experimental design. Each run contributes to several distances, so resample +whole runs for independent cells and resample matched run pairs together for a +paired design. Recompute each cell's distance and their difference in each draw. + +Paraphrasing the prompt raised the order distance on the toy task (haiku: 0.18 +to 0.40 in the repeat series, 0.53 to 0.62 paraphrased, p = 0.0002). The effect +did not replicate on the two real tasks (−0.04, p = 0.18). The toy cell with the +lowest order distance (0.18) had 0 of 6 runs done right. For small pass-rate +samples, report a Wilson interval. The 95% intervals for 0 of 6 and 6 of 6 are +0% to 39% and 61% to 100%, respectively. Background: *Towards a Science of AI Agent Reliability* (arXiv:2602.16666) for the outcome / trajectory-distribution / From 77b7c68421371d8ae46eee45c3d86753491e3787 Mon Sep 17 00:00:00 2001 From: Nikolay Petrov Date: Sat, 28 Nov 2026 22:05:44 -0800 Subject: [PATCH 3/8] docs: report the fixed degrade hook rerun and pooled real-task hook results The degrade-task hook arm is now valid: hook 5/6 vs none 0/7 (p = 0.005), vs prose 3/6 (p = 0.55). Pooled over both real tasks, hook 10/18 vs none 0/19 (p < 0.001) and vs prose 5/18 (p = 0.18). The hook beats no guidance on both tasks; a hook vs prose skill difference is not shown. Replaces the untested-arm note with the detection point: dokimi reads stop-hook errors (#1405), and a relative hook path fails silently. Signed-off-by: Nikolay Petrov --- dokimi/docs/evaluating-treatments.md | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/dokimi/docs/evaluating-treatments.md b/dokimi/docs/evaluating-treatments.md index 48405d70c0..725f52ce4d 100644 --- a/dokimi/docs/evaluating-treatments.md +++ b/dokimi/docs/evaluating-treatments.md @@ -733,21 +733,23 @@ A gate does not depend on invocation. A Stop hook that blocks the stop until the repo's procedure is met gave haiku 5 of 6 done right in the repeat series, against 0 of 6 with a script-only skill (permutation p = 0.015); across the three toy series 14 of 18 hook runs were done right. On the rename task the hook was done right in 5 -of 12 runs, against 0 of 12 with no guidance (p = 0.037), but not clearly better than -the prose skill (5 of 12 against 2 of 12, p = 0.36). So on real tasks the hook's -advantage over no guidance was shown only on the rename task, and its advantage over -a prose skill was not shown on rename either. +of 12 runs, against 0 of 12 with no guidance (p = 0.037). On the degrade task it was +5 of 6 against 0 of 7 (p = 0.005). Pooled over both tasks, 10 of 18 against 0 of 19 +(p < 0.001). Against the prose skill the hook was not clearly better: rename 5 of 12 +against 2 of 12 (p = 0.36), degrade 5 of 6 against 3 of 6 (p = 0.55), pooled 10 of 18 +against 5 of 18 (p = 0.18). So the hook beats no guidance on both real tasks, and a +prose skill vs the hook is not shown either way. Before you credit a gate, check that it fired. A hook that passes leaves no trace, so a blocked stop is the only evidence: count the `Stop hook feedback` and `stop hook error` lines in the transcripts (a blocked stop shows as a failed `Hook:Stop` step in `trace consistency`, see -[run-consistency.md](run-consistency.md)) and compare them with the runs that failed -the procedure. Write hook commands with `"$CLAUDE_PROJECT_DIR"` in the path. A -relative path works only while the agent stays in the repo root: in one arm of the -degrade task the hook failed silently (exit 127, not blocking) in 4 of 6 runs after -the agent changed directory. The degrade hook arm is therefore untested, and no -done-right rate is reported for it. +[run-consistency.md](run-consistency.md)). dokimi reads stop-hook errors as well +(PR #1405). Write hook commands with `"$CLAUDE_PROJECT_DIR"` in the path: a relative +path works only while the agent stays in the repo root. In the first degrade run a +relative path failed silently (exit 127, not blocking) in 4 of 6 runs after the agent +changed directory, so a check on the transcript is needed before a hook result is +credited. All of this is haiku-4-5 on one toy task and two real tasks, with 6 runs per toy cell and at most 12 per real cell. The comparisons are not corrected for multiple From f4cdcfcaade0291846607810788ad3ddea1b9bde Mon Sep 17 00:00:00 2001 From: Nikolay Petrov Date: Sat, 28 Nov 2026 22:43:33 -0800 Subject: [PATCH 4/8] docs: clarify how to verify Stop-hook errors Thread: PRRT_kwDOVBg7g869Li0E Signed-off-by: Nikolay Petrov --- dokimi/docs/evaluating-treatments.md | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/dokimi/docs/evaluating-treatments.md b/dokimi/docs/evaluating-treatments.md index 725f52ce4d..11f7718da5 100644 --- a/dokimi/docs/evaluating-treatments.md +++ b/dokimi/docs/evaluating-treatments.md @@ -740,16 +740,14 @@ against 2 of 12 (p = 0.36), degrade 5 of 6 against 3 of 6 (p = 0.55), pooled 10 against 5 of 18 (p = 0.18). So the hook beats no guidance on both real tasks, and a prose skill vs the hook is not shown either way. -Before you credit a gate, check that it fired. A hook that passes leaves no trace, -so a blocked stop is the only evidence: count the `Stop hook feedback` and -`stop hook error` lines in the transcripts (a blocked stop shows as a failed -`Hook:Stop` step in `trace consistency`, see -[run-consistency.md](run-consistency.md)). dokimi reads stop-hook errors as well -(PR #1405). Write hook commands with `"$CLAUDE_PROJECT_DIR"` in the path: a relative -path works only while the agent stays in the repo root. In the first degrade run a -relative path failed silently (exit 127, not blocking) in 4 of 6 runs after the agent -changed directory, so a check on the transcript is needed before a hook result is -credited. +Before you credit a gate, check that it fired. A hook that passes leaves no trace. +`trace consistency` records `Stop hook feedback` as a failed `Hook:Stop` step +([run-consistency.md](run-consistency.md)). Inspect the raw transcript for +standalone `stop-hook-error` notifications and check whether the command ran or +blocked the stop. Write hook commands with `"$CLAUDE_PROJECT_DIR"` in the path so +they work after the agent changes directory. In the first degrade run a relative +path failed silently (exit 127, not blocking) in 4 of 6 runs after the agent +changed directory. All of this is haiku-4-5 on one toy task and two real tasks, with 6 runs per toy cell and at most 12 per real cell. The comparisons are not corrected for multiple From 9a5bcf9c1c38bc7701692d638926abb221ad40b2 Mon Sep 17 00:00:00 2001 From: Nikolay Petrov Date: Tue, 1 Dec 2026 07:59:00 -0800 Subject: [PATCH 5/8] Correct the rename comparison p-value Thread: PRRT_kwDOVBg7g86-G2OF Signed-off-by: Nikolay Petrov --- dokimi/docs/evaluating-treatments.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dokimi/docs/evaluating-treatments.md b/dokimi/docs/evaluating-treatments.md index cf71fe1f0e..2dc6cb670d 100644 --- a/dokimi/docs/evaluating-treatments.md +++ b/dokimi/docs/evaluating-treatments.md @@ -739,7 +739,7 @@ repo's procedure is met gave haiku 5 of 6 done right in the repeat series, again of 12 runs, against 0 of 12 with no guidance (p = 0.037). On the degrade task it was 5 of 6 against 0 of 7 (p = 0.005). Pooled over both tasks, 10 of 18 against 0 of 19 (p < 0.001). Against the prose skill the hook was not clearly better: rename 5 of 12 -against 2 of 12 (p = 0.36), degrade 5 of 6 against 3 of 6 (p = 0.55), pooled 10 of 18 +against 2 of 12 (p = 0.37), degrade 5 of 6 against 3 of 6 (p = 0.55), pooled 10 of 18 against 5 of 18 (p = 0.18). So the hook beats no guidance on both real tasks, and a prose skill vs the hook is not shown either way. From 982fae838d3430bf4242bb9a6e4e66b7b660b060 Mon Sep 17 00:00:00 2001 From: Nikolay Petrov Date: Tue, 1 Dec 2026 07:59:00 -0800 Subject: [PATCH 6/8] Describe standalone Stop-hook errors Thread: PRRT_kwDOVBg7g86-G2Oe Thread: IC_kwDOVBg7g88AAAABs3UqIA Signed-off-by: Nikolay Petrov --- dokimi/docs/evaluating-treatments.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/dokimi/docs/evaluating-treatments.md b/dokimi/docs/evaluating-treatments.md index 2dc6cb670d..19bea06957 100644 --- a/dokimi/docs/evaluating-treatments.md +++ b/dokimi/docs/evaluating-treatments.md @@ -745,9 +745,8 @@ prose skill vs the hook is not shown either way. Before you credit a gate, check that it fired. A hook that passes leaves no trace. `trace consistency` records `Stop hook feedback` as a failed `Hook:Stop` step -([run-consistency.md](run-consistency.md)). Inspect the raw transcript for -standalone `stop-hook-error` notifications and check whether the command ran or -blocked the stop. Write hook commands with `"$CLAUDE_PROJECT_DIR"` in the path so +([run-consistency.md](run-consistency.md)). A standalone `stop-hook-error` notification appears as a failed +`Hook:Stop-error` step. Use the step kind to distinguish a hook error from a blocked stop. Write hook commands with `"$CLAUDE_PROJECT_DIR"` in the path so they work after the agent changes directory. In the first degrade run a relative path failed silently (exit 127, not blocking) in 4 of 6 runs after the agent changed directory. From fb1ac7ba88a1f8d36f9bbb82ff40443601370ceb Mon Sep 17 00:00:00 2001 From: Nikolay Petrov Date: Tue, 1 Dec 2026 07:59:00 -0800 Subject: [PATCH 7/8] Identify the fixed-path degrade rerun Thread: PRRT_kwDOVBg7g86-G2O1 Thread: PRR_kwDOVBg7g88AAAABbZXZrw Signed-off-by: Nikolay Petrov --- dokimi/docs/evaluating-treatments.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dokimi/docs/evaluating-treatments.md b/dokimi/docs/evaluating-treatments.md index 19bea06957..cd74144f64 100644 --- a/dokimi/docs/evaluating-treatments.md +++ b/dokimi/docs/evaluating-treatments.md @@ -736,8 +736,8 @@ A gate does not depend on invocation. A Stop hook that blocks the stop until the repo's procedure is met gave haiku 5 of 6 done right in the repeat series, against 0 of 6 with a script-only skill (permutation p = 0.015); across the three toy series 14 of 18 hook runs were done right. On the rename task the hook was done right in 5 -of 12 runs, against 0 of 12 with no guidance (p = 0.037). On the degrade task it was -5 of 6 against 0 of 7 (p = 0.005). Pooled over both tasks, 10 of 18 against 0 of 19 +of 12 runs, against 0 of 12 with no guidance (p = 0.037). In the degrade rerun with the hook path fixed, it was +5 of 6 against 0 of 7 (p = 0.005). Pooling the rename runs with that rerun gives 10 of 18 against 0 of 19 (p < 0.001). Against the prose skill the hook was not clearly better: rename 5 of 12 against 2 of 12 (p = 0.37), degrade 5 of 6 against 3 of 6 (p = 0.55), pooled 10 of 18 against 5 of 18 (p = 0.18). So the hook beats no guidance on both real tasks, and a From 6fae62d3411332aa10b9c70164f3c29b9399b89e Mon Sep 17 00:00:00 2001 From: Nikolay Petrov Date: Tue, 1 Dec 2026 10:58:25 -0800 Subject: [PATCH 8/8] Identify the agent as the source of the pass claim PRRT_kwDOVBg7g86-K44r Signed-off-by: Nikolay Petrov --- dokimi/docs/run-consistency.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dokimi/docs/run-consistency.md b/dokimi/docs/run-consistency.md index afb260ea48..cf8a441c80 100644 --- a/dokimi/docs/run-consistency.md +++ b/dokimi/docs/run-consistency.md @@ -81,8 +81,8 @@ is refused: key those by full path. Two keys that spell one trace's path with di The harness result is not a verdict. In the toy series the harness reported `success` in all 96 runs, yet only 40 of 96 were done right, so a result-only score -could not tell the arms apart. In the real tasks 25 of the 33 runs that failed the -procedure still claimed it passed. Agents also report a check as passed after +could not tell the arms apart. On the real tasks, the verifier recorded 33 runs that failed +the procedure. In 25 of those runs, the agent reported that the procedure passed. Agents also report a check as passed after running a weaker one: in the haiku toy series, 10 of 36 non-hook answers said the tests passed after `pytest` alone, never the repo's `make check`. In the haiku fault series, after a transient pytest failure, 5 of the 18 runs without a hook