Add poka-yoke skill: make misuse unrepresentable rather than warned against - #2792
Conversation
…gainst
Mistake-proofing, applied to code. The skill pushes toward devices that make
a wrong action impossible or self-announcing, rather than instructions asking
someone to avoid it, and refuses to accept a comment or a convention as a fix.
The gap it addresses. Given a design, models readily list what to fix and
rarely state what the fix makes impossible. Measured across 591 blind-graded
runs and six model families, responses named the foreclosed set 42% of the
time unprompted and 81% with this skill applied. Assertions were written
before the runs and graded blind to configuration.
Stated with its limits, because they matter: every run was the first turn of
a fresh session, so this measures the ceiling rather than what survives a
long working session; the comparison was against no methodology rather than a
different one, so it does not establish that this particular method caused
the gain; and the skill costs something measurable, making responses somewhat
worse at spotting the specific defect already on the page while better at
changing the shape that allowed it. All of that is in the skill body rather
than omitted.
Bundled, all self-contained, no network access and no dependencies:
scripts/detect_hazards.py standard-library scanner, 42 pattern rules
across 20 hazard shapes, five languages
references/hazard-catalog.md the taxonomy with device per shape
references/lang-*.md Python, TypeScript, Go and Rust patterns
Verified with npm run skill:validate and npm run build. Raw benchmark runs,
the harness and the assertion checklists are public at
https://github.com/rainmanjam/poka-yoke
🔍 Vally Lint Results✅ All checks passed
Summary
Full linter output |
codespell failed the PR: it reads HasTable as a misspelling of hashtable. The identifier is a legitimate generic parameter on a typestate builder, QueryBuilder<HasTable, HasWhere>, so this is a false positive, but it is our file breaking their gate and the fix costs nothing. HasFrom is also the better name: the flag tracks whether .from() has been called, not whether a table exists. Renamed in the upstream repository too, so the two copies do not diverge on day one. Verified the whole bundle is codespell-clean locally.
🔒 PR Risk Scan ResultsScanned 6 changed file(s).
|
…verification (#16) The README claimed models name what a design forecloses 42% of the time unprompted and 81% with the skills, "across 80 graded verdicts". Recomputed from the stored gradings, over the six models the summary describes, it is 45% -> 80% across 132 verdicts. An exhaustive search over every subset of scenarios finds no combination producing 42% -> 81%. The gradings have not moved since 3eb21d4 (2026-08-23) and the figure was published after, so this was never a case of data drifting out from under a number. It survived because the test that verifies the trade table skipped that row, with a comment saying it was "covered by its own aggregate elsewhere". There was no elsewhere. The single most-quoted number in the project was the one figure exempt from the device that checks the others, and it is the same sentence now sitting in the OpenAI bundle and in github/awesome-copilot#2792. Also: - The average hid where the effect lives. Asked squarely to design an interface models already do this 77% of the time; the skills add eleven points. The gains are in the scenarios where nobody asked for a design review: build-endpoint 14% -> 79%, build-agent-feature 33% -> 83%, build-form 29% -> 64%. The per-scenario table is published alongside the mean. - preregister_arms.py now hashes what a run can reach (markdown, python, shell) rather than only markdown, so the treatment arm's bundled scripts can no longer change under a green check — a blind spot that ran one way, in favour of the arm being tested. Packaging is excluded deliberately: manifests carry the version and would fail the lock on every release for a reason unrelated to the treatment. - --check now refuses arms that are registered but not runnable. with_defensive has 2 of 10 routes and with_placebo 5, and the lock was green. A sweep would have routed half its scenarios to a missing sub-skill and reported the absence of instructions as a control. - by_model carries runs, min_cell_n and median_cell_n. The most-read table gave a reader no way to tell a row built from single-run cells from one built from seven-run cells. - The narrowing warning is now a refusal. CLAUDE.md says it "went unread three times in one session" because output gets piped through tail. It happened a fourth time during this review: a bare --aggregate-only zeroed every published pass rate and the warning scrolled past above the tail window. A notice you can pipe away is not a device. - Aggregation pairs on the arms that have runs. CONFIGS grew from two to four when the control arms were written, and `all(... for c in CONFIGS)` then made `paired` empty for every model. Nobody re-aggregated between the expansion and now, so the first re-aggregation silently emptied every row. - A router scenario. Ten specialists had scenarios; the entry point had none, and its claim that the method works on a runbook or a checklist had never been tested. The subject is deliberately not software. Claude-Session: https://claude.ai/code/session_01VW5SAyUSPxJnpLijYSYums
The submitted numbers (42% -> 81%) could not be reproduced from the upstream gradings. Recomputed over the six models the sentence describes: 45% -> 80% across 132 verdicts. Adds the per-scenario breakdown, which is the more useful claim: the gains are in tasks where nobody asked for a design review.
|
Correcting a figure in this submission before it is reviewed, rather than after. The evidence paragraph claimed 42% → 81%. Auditing the upstream benchmark this morning, I It survived because the upstream test that verifies the other published figures skipped that I have also added the per-scenario breakdown, which is the more useful claim: the average was One other thing worth flagging, since it was in this file as submitted. The line No other changes. Apologies for the churn. |
|
🟡 Contributor Reputation Check: MEDIUM risk
Maintainers: please review this contributor before merging. |
What this adds
skills/poka-yoke/— mistake-proofing applied to code. The skill pushes toward devices that make a wrong action impossible or self-announcing, rather than instructions asking someone to avoid it, and it refuses to accept a comment or a convention as a fix.The gap it addresses
Your contributing guide asks submissions not to duplicate existing model strengths without meaningful uplift, so here is the specific behaviour and its measurement.
Given a design, models readily list what to fix. They rarely state what the fix makes impossible, which is the difference between advice you agree with and a constraint you can rely on. Across 591 blind-graded runs and six model families, responses named the foreclosed set 42% of the time unprompted and 81% with this skill applied. Assertions were written before the runs; the grader never saw which configuration produced a response.
And its limits, which are in the skill body rather than omitted:
Bundled assets
All self-contained, no network access, no dependencies, 76 KB total.
scripts/detect_hazards.pyreferences/hazard-catalog.mdreferences/lang-*.mdChecks
npm run skill:validate→✅ poka-yoke is valid(all 413 skills pass)npm run build→ README tables regenerated, included in this PRSource
MIT. Raw benchmark runs, the harness, the grader prompts and the assertion checklists are public at https://github.com/rainmanjam/poka-yoke.