A build pipeline that keeps a lesson only when an eval holds it up
Hansei is the Toyota practice of reflecting on a mistake before improving. We named our Claude Code plugin after it because reflection is its main job. hansei plans and builds software the way a small startup would, on a budget, and after each run it patches its own playbook. The part we care about most is the condition on that patch: it lands only behind an eval.
The pipeline has three steps. Plan runs an intake, parallel research, six lenses (product, market, engineering, legal, go to market and budget), one red team, and a decision to go or stop. Build works in waves, with a verifier that runs every command a report claims to have run, and a ledger. Retro closes every run. It records the tokens spent and what a later step caught that an earlier step owned, and it writes zero to three lessons.
The retro is where a self improving setup can go wrong. Writing down a lesson is cheap, and a model will always find one. If every lesson goes into the playbook, the playbook grows and nobody can say which rule earns its place. So in hansei each lesson has to become a hook, an eval case or a checklist line, and it has to pass an eval gate to land. Each lesson has to name its test or eval, and one that names none is refused once it is seven days old.
On 6 October 2026 we ran the evals before and after three lessons landed. A build case that checks how the pipeline triages a report scored 8 of 12 over three runs before its lesson, and 9 of 12 over three runs after. The retro case went from 1 of 2 to 2 of 2. One plan case scored 2 of 3 after its lesson. Each graded line on Sonnet cost between $0.1124 and $0.2929. These are small moves on small samples. Three runs is not much, and we do not read more into them than that.
We also keep scores as they were recorded. Eval scores are never scored again, and every eval run appends its receipt. Two bad lines stay in the file as history. One is a 0 of 3 that came from the official runner refusing a linked folder. The other is a 1 of 4 caused by a bug in our own test runner, which graded the text before the skill was even called. Deleting them would make the record cleaner and less true.
Then the larger question: does the plugin help at all? We ran an ablation with scoreboard, our tool for measuring plugins. It used six realistic tasks, three runs per task per arm, and Claude Opus 5 at low effort, for 18 runs with the plugin on and 18 with it off. Both arms passed 18 of 18.
Cost averaged $0.6404 with the plugin and $0.6492 without. Turns averaged 7.9 and 7.6. Wall time averaged 231.9 seconds with the plugin and 92.9 seconds without. The 90% interval on that gap runs from 37.6 seconds faster to 438 seconds slower.
The report's own line is "no verdict (k=3)". A verdict needs at least five runs per arm. On these six tasks at three runs, the ablation shows no measured gain or loss from the plugin. There is a second limit as well. The plugin's hooks were skipped in every run of both arms. So the test did not exercise part of what it was meant to test.
We publish this because it is where things stand. A pipeline that keeps only the lessons an eval backs should be judged the same way. So far the eval on the whole plugin has neither backed it nor counted against it. The report also says what would settle it: five or more runs per arm, with the hooks running.
The easy way to fool yourself with agents is to let them grade their own work in prose. A retro that says "this went well" costs nothing to write. hansei asks for a number with a run behind it instead, and it keeps that number even when the number says nothing yet.