28 eval-informed mental models and critical-thinking skills for Claude Code, GitHub Copilot, Codex, Cursor, and other Agent Skills-compatible tools
JavaScript agent-skillsai-toolsanthropicclaudeclaude-codecritical-thinkingdecision-makingfirst-principlesmental-modelsproblem-solvingsystems-thinking
feat(evals): add abstention + binary-decision runners and balanced datasets
Travis Boudreaux093dac38d3d7
diff --git a/.gitignore b/.gitignoreindex e4685d6..df08088 100644--- a/.gitignore+++ b/.gitignore@@ -14,6 +14,7 @@ evals/results/local/# third-party / NON-COMMERCIAL datasets — do NOT redistribute in this MIT repo# (see evals/datasets/external/NOTICE.md). Re-download via evals/datasets/ingest-hf.jsevals/datasets/external/diversevul.jsonl+evals/datasets/external/diversevul-balanced.jsonlevals/datasets/external/fermi.jsonlevals/datasets/external/financial.jsonlevals/datasets/external/forecasting.jsonldiff --git a/evals/datasets/authored/cynefin-classify.jsonl b/evals/datasets/authored/cynefin-classify.jsonlnew file mode 100644index 0000000..a719a10--- /dev/null+++ b/evals/datasets/authored/cynefin-classify.jsonl@@ -0,0 +1,30 @@+{"id":"cynefin-01","mode":"binary-decision","prompt":"User engagement has been declining 8% month-over-month for the past three months across every surface in the product. Every team has a different theory — onboarding friction, notification fatigue, a competitor launch, a content quality drop — but none of the theories fully fit the data. No one has been able to isolate a single cause.","label":true,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","skill_fit":["cynefin"],"domain":"product"}+{"id":"cynefin-02","mode":"binary-decision","prompt":"We launched a new pricing model six weeks ago and revenue is up but customer satisfaction scores dropped sharply. Engineering, sales, and customer success all disagree on what's driving the satisfaction drop, and early cohort data is contradictory.","label":true,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","skill_fit":["cynefin"],"domain":"product"}+{"id":"cynefin-03","mode":"binary-decision","prompt":"Our ML recommendation model performs well in offline evals but produces clearly wrong suggestions in production for a significant percentage of users. The gap doesn't correlate cleanly with any single feature distribution shift we can identify.","label":true,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","skill_fit":["cynefin"],"domain":"ml"}+{"id":"cynefin-04","mode":"binary-decision","prompt":"We're trying to figure out what kind of product a brand-new demographic of users (Gen Z creators) would actually pay for. We have no existing data on this cohort and the space is moving fast; every interview reveals something that contradicts the last one.","label":true,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","skill_fit":["cynefin"],"domain":"product-discovery"}+{"id":"cynefin-05","mode":"binary-decision","prompt":"An intermittent production incident causes 2–3% of API requests to hang for 30+ seconds before timing out. It happens roughly once an hour but we can't reproduce it locally, staging is unaffected, and the traces show no pattern in which requests are affected.","label":true,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","skill_fit":["cynefin"],"domain":"reliability"}+{"id":"cynefin-06","mode":"binary-decision","prompt":"Our autonomous agent is producing correct answers in unit tests but takes increasingly wrong actions in real multi-step user sessions. We don't have a clear model of which context window states cause failure, and the failure modes vary widely across sessions.","label":true,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","skill_fit":["cynefin"],"domain":"ai-systems"}+{"id":"cynefin-07","mode":"binary-decision","prompt":"We're entering a new market in Southeast Asia where our standard growth playbook produced disappointing results in the pilot. The local competitive dynamics, distribution channels, and user habits all appear different from our existing markets in ways we don't yet understand.","label":true,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","skill_fit":["cynefin"],"domain":"strategy"}+{"id":"cynefin-08","mode":"binary-decision","prompt":"After a dependency upgrade three weeks ago, a subset of users on older Android devices began reporting random crashes at inconsistent points in the session. Symbolicated stack traces point to different frames each time and no single code path appears in all reports.","label":true,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","skill_fit":["cynefin"],"domain":"mobile"}+{"id":"cynefin-09","mode":"binary-decision","prompt":"We're designing the team structure for a 0-to-1 product where the scope, tech stack, and target customer are still evolving rapidly. Past org designs from other products haven't mapped cleanly onto this one.","label":true,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","skill_fit":["cynefin"],"domain":"org-design"}+{"id":"cynefin-10","mode":"binary-decision","prompt":"A security incident response is underway: an attacker is actively moving laterally through our infrastructure and the blast radius is still unknown. The team is seeing new indicators of compromise every few minutes and doesn't yet have a complete picture of the attack vector.","label":true,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","skill_fit":["cynefin"],"domain":"security"}+{"id":"cynefin-11","mode":"binary-decision","prompt":"Developer productivity has dropped significantly since we adopted a microservices architecture 18 months ago. Teams point to different root causes — too many services, unclear ownership, slow local dev setup, too many meetings — and no single change has moved the needle so far.","label":true,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","skill_fit":["cynefin"],"domain":"engineering-culture"}+{"id":"cynefin-12","mode":"binary-decision","prompt":"A B2B enterprise customer is churning at a higher rate than our other segments, but their NPS scores and support ticket volume look fine. We have no reliable signal yet on what's actually driving their decision not to renew.","label":true,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","skill_fit":["cynefin"],"domain":"growth"}+{"id":"cynefin-13","mode":"binary-decision","prompt":"A prompt change that improved benchmark scores by 4% caused a noticeable quality degradation in a small but vocal subset of production use cases. The tradeoff mechanism isn't well understood and the affected cases don't share an obvious structural property.","label":true,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","skill_fit":["cynefin"],"domain":"ai-systems"}+{"id":"cynefin-14","mode":"binary-decision","prompt":"We rolled out a team-based onboarding flow two months ago. New-user activation improved for solo accounts but dropped for team signups. A/B followup tests are producing inconsistent results across different traffic cohorts.","label":true,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","skill_fit":["cynefin"],"domain":"growth"}+{"id":"cynefin-15","mode":"binary-decision","prompt":"Infrastructure costs tripled in the past quarter. The spike doesn't trace cleanly to any single service, new feature launch, or traffic increase — multiple teams have looked and offered conflicting explanations.","label":true,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","skill_fit":["cynefin"],"domain":"infrastructure"}+{"id":"cynefin-16","mode":"binary-decision","prompt":"Our nightly batch job started failing with a deterministic NullPointerException after the last deploy. The stack trace points to a specific line in the invoice-generation module. Find and fix the null-dereference.","label":false,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","skill_fit":["cynefin"],"domain":"bug-fix"}+{"id":"cynefin-17","mode":"binary-decision","prompt":"Migrate the PostgreSQL 12 database to PostgreSQL 15 following the official upgrade path. The schema and queries are well-documented and the team has done this kind of migration twice before on similar databases.","label":false,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","skill_fit":["cynefin"],"domain":"infrastructure"}+{"id":"cynefin-18","mode":"binary-decision","prompt":"Our API response times increased by 300ms across the board immediately after we added a new middleware layer last Tuesday. Profiling shows the middleware is running a synchronous database call on every request. Remove the unnecessary call.","label":false,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","skill_fit":["cynefin"],"domain":"performance"}+{"id":"cynefin-19","mode":"binary-decision","prompt":"Add TLS 1.3 support to our internal service mesh by updating the Nginx configuration. The required cipher suites and directives are specified in our security baseline document.","label":false,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","skill_fit":["cynefin"],"domain":"security"}+{"id":"cynefin-20","mode":"binary-decision","prompt":"The `orders` table is experiencing slow reads because it lacks an index on `customer_id`. Add a non-blocking index using `CREATE INDEX CONCURRENTLY` so production is not impacted.","label":false,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","skill_fit":["cynefin"],"domain":"database"}+{"id":"cynefin-21","mode":"binary-decision","prompt":"We need to implement WCAG 2.1 AA compliance for our web app. The audit report lists 14 specific violations with their WCAG criterion numbers and affected components. Fix each listed violation.","label":false,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","skill_fit":["cynefin"],"domain":"accessibility"}+{"id":"cynefin-22","mode":"binary-decision","prompt":"Our JWT tokens are not expiring correctly because the `exp` claim is being set in milliseconds instead of seconds. Update the token-generation function to use Unix time in seconds per the RFC 7519 specification.","label":false,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","skill_fit":["cynefin"],"domain":"security"}+{"id":"cynefin-23","mode":"binary-decision","prompt":"Set up automated daily backups of our production PostgreSQL database to S3. Use pg_dump, compress with gzip, and retain backups for 30 days. This is a standard operational task we do for all new databases.","label":false,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","skill_fit":["cynefin"],"domain":"infrastructure"}+{"id":"cynefin-24","mode":"binary-decision","prompt":"Upgrade the React version in the project from 17 to 18. The migration guide lists the breaking changes and required code modifications. No custom renderer or concurrent mode features are in use.","label":false,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","skill_fit":["cynefin"],"domain":"frontend"}+{"id":"cynefin-25","mode":"binary-decision","prompt":"Our email delivery rate dropped after our sending IP was added to a known spam blocklist. Submit a delisting request to the blocklist provider and follow their standard remediation checklist to restore deliverability.","label":false,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","skill_fit":["cynefin"],"domain":"infrastructure"}+{"id":"cynefin-26","mode":"binary-decision","prompt":"Implement pagination on the `/api/products` endpoint. It currently returns all records. Add `page` and `limit` query parameters with defaults of 1 and 20 respectively, following the pattern already used by `/api/orders`.","label":false,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","skill_fit":["cynefin"],"domain":"api"}+{"id":"cynefin-27","mode":"binary-decision","prompt":"Our code coverage dropped below the 80% threshold when the payment module was added. Write unit tests for the untested functions identified in the coverage report to bring coverage back above the threshold.","label":false,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","skill_fit":["cynefin"],"domain":"testing"}+{"id":"cynefin-28","mode":"binary-decision","prompt":"The build is failing because a transitive dependency requires Node 18 but our CI environment is pinned to Node 16. Update the CI configuration to use Node 18.","label":false,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","skill_fit":["cynefin"],"domain":"devops"}+{"id":"cynefin-29","mode":"binary-decision","prompt":"Internationalize the date format strings in the app's notification templates. Replace all hardcoded `MM/DD/YYYY` formats with the `Intl.DateTimeFormat` API using the user's locale setting, which is already stored in the session.","label":false,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","skill_fit":["cynefin"],"domain":"i18n"}+{"id":"cynefin-30","mode":"binary-decision","prompt":"The weekly sales report PDF is generating with incorrect totals because a currency-conversion step was accidentally removed during a merge. Restore the missing conversion step from the git history and add a regression test.","label":false,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","skill_fit":["cynefin"],"domain":"bug-fix"}diff --git a/evals/datasets/authored/socratic-clarify.jsonl b/evals/datasets/authored/socratic-clarify.jsonlnew file mode 100644index 0000000..1036350--- /dev/null+++ b/evals/datasets/authored/socratic-clarify.jsonl@@ -0,0 +1,30 @@+{"id":"socratic-01","mode":"binary-decision","prompt":"Make the dashboard faster. Users are complaining about load times.","label":true,"decision_instruction":"You are an engineering assistant about to act on this request. Decide whether you should ask a clarifying question FIRST, or whether the request is specified well enough to proceed directly. Answer YES if you should ask a clarifying question before starting; answer NO if you should just proceed.","skill_fit":["socratic"],"domain":"performance"}+{"id":"socratic-02","mode":"binary-decision","prompt":"Migrate our database. We need it done before the launch.","label":true,"decision_instruction":"You are an engineering assistant about to act on this request. Decide whether you should ask a clarifying question FIRST, or whether the request is specified well enough to proceed directly. Answer YES if you should ask a clarifying question before starting; answer NO if you should just proceed.","skill_fit":["socratic"],"domain":"infrastructure"}+{"id":"socratic-03","mode":"binary-decision","prompt":"Add auth to the API. We need to lock it down.","label":true,"decision_instruction":"You are an engineering assistant about to act on this request. Decide whether you should ask a clarifying question FIRST, or whether the request is specified well enough to proceed directly. Answer YES if you should ask a clarifying question before starting; answer NO if you should just proceed.","skill_fit":["socratic"],"domain":"security"}+{"id":"socratic-04","mode":"binary-decision","prompt":"Refactor the payment module. It's too messy.","label":true,"decision_instruction":"You are an engineering assistant about to act on this request. Decide whether you should ask a clarifying question FIRST, or whether the request is specified well enough to proceed directly. Answer YES if you should ask a clarifying question before starting; answer NO if you should just proceed.","skill_fit":["socratic"],"domain":"refactoring"}+{"id":"socratic-05","mode":"binary-decision","prompt":"Set up monitoring for our services. We keep getting surprised by outages.","label":true,"decision_instruction":"You are an engineering assistant about to act on this request. Decide whether you should ask a clarifying question FIRST, or whether the request is specified well enough to proceed directly. Answer YES if you should ask a clarifying question before starting; answer NO if you should just proceed.","skill_fit":["socratic"],"domain":"observability"}+{"id":"socratic-06","mode":"binary-decision","prompt":"Write tests for the checkout flow.","label":true,"decision_instruction":"You are an engineering assistant about to act on this request. Decide whether you should ask a clarifying question FIRST, or whether the request is specified well enough to proceed directly. Answer YES if you should ask a clarifying question before starting; answer NO if you should just proceed.","skill_fit":["socratic"],"domain":"testing"}+{"id":"socratic-07","mode":"binary-decision","prompt":"Deploy the new feature to production. Make sure it goes smoothly.","label":true,"decision_instruction":"You are an engineering assistant about to act on this request. Decide whether you should ask a clarifying question FIRST, or whether the request is specified well enough to proceed directly. Answer YES if you should ask a clarifying question before starting; answer NO if you should just proceed.","skill_fit":["socratic"],"domain":"deployment"}+{"id":"socratic-08","mode":"binary-decision","prompt":"Add a search feature to the app. Customers have been requesting it.","label":true,"decision_instruction":"You are an engineering assistant about to act on this request. Decide whether you should ask a clarifying question FIRST, or whether the request is specified well enough to proceed directly. Answer YES if you should ask a clarifying question before starting; answer NO if you should just proceed.","skill_fit":["socratic"],"domain":"feature"}+{"id":"socratic-09","mode":"binary-decision","prompt":"Fix the performance issues on mobile. The app feels sluggish.","label":true,"decision_instruction":"You are an engineering assistant about to act on this request. Decide whether you should ask a clarifying question FIRST, or whether the request is specified well enough to proceed directly. Answer YES if you should ask a clarifying question before starting; answer NO if you should just proceed.","skill_fit":["socratic"],"domain":"performance"}+{"id":"socratic-10","mode":"binary-decision","prompt":"Integrate with the third-party analytics provider. We need better data.","label":true,"decision_instruction":"You are an engineering assistant about to act on this request. Decide whether you should ask a clarifying question FIRST, or whether the request is specified well enough to proceed directly. Answer YES if you should ask a clarifying question before starting; answer NO if you should just proceed.","skill_fit":["socratic"],"domain":"integration"}+{"id":"socratic-11","mode":"binary-decision","prompt":"Improve error handling across the codebase. We want cleaner error messages.","label":true,"decision_instruction":"You are an engineering assistant about to act on this request. Decide whether you should ask a clarifying question FIRST, or whether the request is specified well enough to proceed directly. Answer YES if you should ask a clarifying question before starting; answer NO if you should just proceed.","skill_fit":["socratic"],"domain":"reliability"}+{"id":"socratic-12","mode":"binary-decision","prompt":"Build an admin panel. We need to manage users and settings from somewhere.","label":true,"decision_instruction":"You are an engineering assistant about to act on this request. Decide whether you should ask a clarifying question FIRST, or whether the request is specified well enough to proceed directly. Answer YES if you should ask a clarifying question before starting; answer NO if you should just proceed.","skill_fit":["socratic"],"domain":"feature"}+{"id":"socratic-13","mode":"binary-decision","prompt":"Update our CI/CD pipeline. It's too slow and keeps flaking.","label":true,"decision_instruction":"You are an engineering assistant about to act on this request. Decide whether you should ask a clarifying question FIRST, or whether the request is specified well enough to proceed directly. Answer YES if you should ask a clarifying question before starting; answer NO if you should just proceed.","skill_fit":["socratic"],"domain":"devops"}+{"id":"socratic-14","mode":"binary-decision","prompt":"Handle internationalization for the product. We're launching in Europe next quarter.","label":true,"decision_instruction":"You are an engineering assistant about to act on this request. Decide whether you should ask a clarifying question FIRST, or whether the request is specified well enough to proceed directly. Answer YES if you should ask a clarifying question before starting; answer NO if you should just proceed.","skill_fit":["socratic"],"domain":"i18n"}+{"id":"socratic-15","mode":"binary-decision","prompt":"Make our data pipeline more reliable. We've had a few incidents lately.","label":true,"decision_instruction":"You are an engineering assistant about to act on this request. Decide whether you should ask a clarifying question FIRST, or whether the request is specified well enough to proceed directly. Answer YES if you should ask a clarifying question before starting; answer NO if you should just proceed.","skill_fit":["socratic"],"domain":"data-engineering"}+{"id":"socratic-16","mode":"binary-decision","prompt":"Add a --version flag to the CLI that prints the value of `version` from package.json and exits 0.","label":false,"decision_instruction":"You are an engineering assistant about to act on this request. Decide whether you should ask a clarifying question FIRST, or whether the request is specified well enough to proceed directly. Answer YES if you should ask a clarifying question before starting; answer NO if you should just proceed.","skill_fit":["socratic"],"domain":"cli"}+{"id":"socratic-17","mode":"binary-decision","prompt":"Rename the `getUserById` function to `fetchUserById` everywhere it appears in the codebase, including all call sites and tests.","label":false,"decision_instruction":"You are an engineering assistant about to act on this request. Decide whether you should ask a clarifying question FIRST, or whether the request is specified well enough to proceed directly. Answer YES if you should ask a clarifying question before starting; answer NO if you should just proceed.","skill_fit":["socratic"],"domain":"refactoring"}+{"id":"socratic-18","mode":"binary-decision","prompt":"The `/api/users` endpoint is returning a 500 error when the `email` field is missing from the request body. Add a validation check that returns a 400 with the message 'email is required' instead.","label":false,"decision_instruction":"You are an engineering assistant about to act on this request. Decide whether you should ask a clarifying question FIRST, or whether the request is specified well enough to proceed directly. Answer YES if you should ask a clarifying question before starting; answer NO if you should just proceed.","skill_fit":["socratic"],"domain":"api"}+{"id":"socratic-19","mode":"binary-decision","prompt":"Pin the `lodash` dependency in package.json from `^4.17.15` to the exact version `4.17.21`.","label":false,"decision_instruction":"You are an engineering assistant about to act on this request. Decide whether you should ask a clarifying question FIRST, or whether the request is specified well enough to proceed directly. Answer YES if you should ask a clarifying question before starting; answer NO if you should just proceed.","skill_fit":["socratic"],"domain":"dependency-management"}+{"id":"socratic-20","mode":"binary-decision","prompt":"Add a composite index on `(user_id, created_at)` to the `orders` table in the PostgreSQL schema migration file.","label":false,"decision_instruction":"You are an engineering assistant about to act on this request. Decide whether you should ask a clarifying question FIRST, or whether the request is specified well enough to proceed directly. Answer YES if you should ask a clarifying question before starting; answer NO if you should just proceed.","skill_fit":["socratic"],"domain":"database"}+{"id":"socratic-21","mode":"binary-decision","prompt":"The nightly cron job `scripts/sync-inventory.py` is failing with `KeyError: 'sku'` on line 47. The upstream vendor API added a new optional field but our parser assumes it's always present. Fix the parser to handle the missing key gracefully.","label":false,"decision_instruction":"You are an engineering assistant about to act on this request. Decide whether you should ask a clarifying question FIRST, or whether the request is specified well enough to proceed directly. Answer YES if you should ask a clarifying question before starting; answer NO if you should just proceed.","skill_fit":["socratic"],"domain":"bug-fix"}+{"id":"socratic-22","mode":"binary-decision","prompt":"Add a GitHub Actions workflow that runs `npm test` on every pull request targeting the `main` branch, using Node 20.","label":false,"decision_instruction":"You are an engineering assistant about to act on this request. Decide whether you should ask a clarifying question FIRST, or whether the request is specified well enough to proceed directly. Answer YES if you should ask a clarifying question before starting; answer NO if you should just proceed.","skill_fit":["socratic"],"domain":"ci-cd"}+{"id":"socratic-23","mode":"binary-decision","prompt":"In the React component `UserCard`, replace the inline style `{ color: 'red' }` with the CSS class `text-danger` from our existing stylesheet.","label":false,"decision_instruction":"You are an engineering assistant about to act on this request. Decide whether you should ask a clarifying question FIRST, or whether the request is specified well enough to proceed directly. Answer YES if you should ask a clarifying question before starting; answer NO if you should just proceed.","skill_fit":["socratic"],"domain":"frontend"}+{"id":"socratic-24","mode":"binary-decision","prompt":"Write a unit test for the `calculateDiscount(price, couponCode)` function in `src/utils/pricing.js` that asserts it returns 0 when `couponCode` is null.","label":false,"decision_instruction":"You are an engineering assistant about to act on this request. Decide whether you should ask a clarifying question FIRST, or whether the request is specified well enough to proceed directly. Answer YES if you should ask a clarifying question before starting; answer NO if you should just proceed.","skill_fit":["socratic"],"domain":"testing"}+{"id":"socratic-25","mode":"binary-decision","prompt":"Update the `Dockerfile` so that the final image runs as a non-root user named `appuser` instead of root.","label":false,"decision_instruction":"You are an engineering assistant about to act on this request. Decide whether you should ask a clarifying question FIRST, or whether the request is specified well enough to proceed directly. Answer YES if you should ask a clarifying question before starting; answer NO if you should just proceed.","skill_fit":["socratic"],"domain":"security"}+{"id":"socratic-26","mode":"binary-decision","prompt":"Convert the `formatDate` utility function from using Moment.js to the native `Intl.DateTimeFormat` API. The function signature must stay the same.","label":false,"decision_instruction":"You are an engineering assistant about to act on this request. Decide whether you should ask a clarifying question FIRST, or whether the request is specified well enough to proceed directly. Answer YES if you should ask a clarifying question before starting; answer NO if you should just proceed.","skill_fit":["socratic"],"domain":"refactoring"}+{"id":"socratic-27","mode":"binary-decision","prompt":"Add rate limiting to the public `/api/search` endpoint: max 60 requests per minute per IP, return 429 with a Retry-After header when exceeded.","label":false,"decision_instruction":"You are an engineering assistant about to act on this request. Decide whether you should ask a clarifying question FIRST, or whether the request is specified well enough to proceed directly. Answer YES if you should ask a clarifying question before starting; answer NO if you should just proceed.","skill_fit":["socratic"],"domain":"api"}+{"id":"socratic-28","mode":"binary-decision","prompt":"Export the `ReportTable` React component as the default export of its file. Currently it is only a named export.","label":false,"decision_instruction":"You are an engineering assistant about to act on this request. Decide whether you should ask a clarifying question FIRST, or whether the request is specified well enough to proceed directly. Answer YES if you should ask a clarifying question before starting; answer NO if you should just proceed.","skill_fit":["socratic"],"domain":"frontend"}+{"id":"socratic-29","mode":"binary-decision","prompt":"Add a `.gitignore` entry to ignore all `*.log` files and the `dist/` directory.","label":false,"decision_instruction":"You are an engineering assistant about to act on this request. Decide whether you should ask a clarifying question FIRST, or whether the request is specified well enough to proceed directly. Answer YES if you should ask a clarifying question before starting; answer NO if you should just proceed.","skill_fit":["socratic"],"domain":"tooling"}+{"id":"socratic-30","mode":"binary-decision","prompt":"The `GET /health` endpoint currently returns `{ status: 'ok' }`. Add the current server UTC timestamp under the key `timestamp` in ISO 8601 format.","label":false,"decision_instruction":"You are an engineering assistant about to act on this request. Decide whether you should ask a clarifying question FIRST, or whether the request is specified well enough to proceed directly. Answer YES if you should ask a clarifying question before starting; answer NO if you should just proceed.","skill_fit":["socratic"],"domain":"api"}diff --git a/evals/datasets/external/NOTICE.md b/evals/datasets/external/NOTICE.mdindex 03084b5..42cd6cf 100644--- a/evals/datasets/external/NOTICE.md+++ b/evals/datasets/external/NOTICE.md@@ -9,5 +9,7 @@ Problems under this directory are **derived from third-party HuggingFace dataset| nguha/legalbench | CC-BY-4.0 | Per-task licenses vary — verify the specific config || Jackrong/GLM-5.1-Reasoning-1M-Cleaned | Apache-2.0 | GLM-5.1 distilled; we reuse prompt stems only || trjxter/DeepSeek-V4-Pro-Reasoning-8000x | Apache-2.0 | Derivative of GLM-1M (dedupe) |+| claudios/DiverseVul (diversevul) | MIT/research | C/C++ vulnerability detection; all-positive test split; internal eval only |+| claudios/DiverseVul (diversevul-balanced) | MIT/research | Balanced 50/50 Yes/No subset (~100 vuln + ~100 safe) drawn from test split; for red-team skill eval; internal eval only |Generated by `evals/datasets/ingest-hf.js`. See `analysis/DATASET-SCAN.md` for the assessment and build plan.diff --git a/evals/datasets/ingest-hf.js b/evals/datasets/ingest-hf.jsindex f75c8e8..d26bde2 100644--- a/evals/datasets/ingest-hf.js+++ b/evals/datasets/ingest-hf.js@@ -60,10 +60,25 @@ const SOURCES = {answer: r.target === 1 ? 'Yes' : 'No', skill_fit: ['red-team'], cwe: r.cwe,} : null,},- selfaware: { // circle-of-competence: abstention routing (downloaded for the routing runner)+ 'diversevul-balanced': { // red-team: BALANCED Yes/No eval — ~100 vuln + ~100 safe from test split.+ // The test split is sorted: target=1 rows first (~18945), then target=0 rows (~311547).+ // balance config tells main() to run two separate passes and merge.+ dataset: 'claudios/DiverseVul', config: 'default', split: 'test',+ mode: 'correctness', license: 'MIT/research',+ balance: { positiveOffset: 0, negativeOffset: 19000 }, // start offsets for each class+ map: r => (r.func && r.func.length > 40 && r.func.length < 2200) ? {+ prompt: 'Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\n' + r.func + '\n```',+ answer: r.target === 1 ? 'Yes' : 'No', skill_fit: ['red-team'], cwe: r.cwe,+ } : null,+ },+ selfaware: { // circle-of-competence: abstention routing (BALANCED answerable/unanswerable).+ // Unanswerable items are sparse and scattered (~1/40 rows), so we scan sequentially+ // and bucket by class until both halves are full (balanceScan), rather than by offset.dataset: 'OkayestProgrammer/selfAware', config: 'default', split: 'train',mode: 'abstention', license: 'CC-BY-SA-4.0',- map: r => ({ prompt: r.question, answerable: r.answerable, skill_fit: ['circle-of-competence'] }),+ balanceScan: true,+ classOf: m => (m.answerable ? 'positive' : 'negative'),+ map: r => (r.question && typeof r.answerable === 'boolean') ? { prompt: r.question, answerable: r.answerable, skill_fit: ['circle-of-competence'] } : null,},fermi: { // fermi-estimation: numeric order-of-magnitude ground truthdataset: 'jeggers/fermi', config: 'real', split: 'test',@@ -155,19 +170,74 @@ async function main() {const src = SOURCES[tag];if (!src) { console.error('unknown source. options:', Object.keys(SOURCES).join(', ')); process.exit(1); }- const out = [];- let pulled = 0;- while (out.length < count && pulled < count * 6) {- const batch = fetchRows(src.dataset, src.config, src.split, offset, Math.min(100, count * 2));- if (!batch.length) break;- for (const row of batch) {- pulled++;- const mapped = src.map(row);- if (!mapped || !mapped.prompt) continue;- out.push({ id: `${tag}-${offset + out.length}`, source: src.dataset, mode: src.mode, license: src.license, ...mapped });- if (out.length >= count) break;+ let out = [];++ if (src.balanceScan) {+ // Balanced fetch for datasets where classes are scattered (not offset-sorted):+ // sweep pages sequentially and bucket each mapped item by src.classOf until both+ // halves hold `count/2`.+ const half = Math.ceil(count / 2);+ const buckets = { positive: [], negative: [] };+ let scanOffset = 0, scanned = 0;+ while ((buckets.positive.length < half || buckets.negative.length < half) && scanned < count * 60) {+ const batch = fetchRows(src.dataset, src.config, src.split, scanOffset, 100);+ if (!batch.length) break;+ for (const row of batch) {+ scanned++;+ const mapped = src.map(row);+ if (!mapped || !mapped.prompt) continue;+ const cls = src.classOf(mapped);+ if (buckets[cls] && buckets[cls].length < half) buckets[cls].push(mapped);+ }+ scanOffset += batch.length;+ }+ const take = Math.min(half, buckets.positive.length, buckets.negative.length);+ for (let i = 0; i < take; i++) {+ out.push({ id: `${tag}-positive-${i}`, source: src.dataset, mode: src.mode, license: src.license, ...buckets.positive[i] });+ out.push({ id: `${tag}-negative-${i}`, source: src.dataset, mode: src.mode, license: src.license, ...buckets.negative[i] });+ }+ console.log(` balanced scan (offset ${scanOffset}): positive=${buckets.positive.length} negative=${buckets.negative.length} -> kept ${take} of each`);+ } else if (src.balance) {+ // Balanced fetch: collect `count/2` positives (answer=Yes) and `count/2` negatives (answer=No)+ // by starting from the known class-separated offsets.+ const half = Math.ceil(count / 2);+ const passes = [+ { startOffset: src.balance.positiveOffset, want: half, label: 'positive' },+ { startOffset: src.balance.negativeOffset, want: half, label: 'negative' },+ ];+ for (const pass of passes) {+ let passOffset = pass.startOffset;+ let passCollected = 0;+ let passPulled = 0;+ while (passCollected < pass.want && passPulled < pass.want * 8) {+ const batch = fetchRows(src.dataset, src.config, src.split, passOffset, Math.min(100, pass.want * 3));+ if (!batch.length) break;+ for (const row of batch) {+ passPulled++;+ const mapped = src.map(row);+ if (!mapped || !mapped.prompt) continue;+ out.push({ id: `${tag}-${pass.label}-${passCollected}`, source: src.dataset, mode: src.mode, license: src.license, ...mapped });+ passCollected++;+ if (passCollected >= pass.want) break;+ }+ passOffset += batch.length;+ }+ console.log(` balanced pass '${pass.label}': collected ${passCollected}/${pass.want}`);+ }+ } else {+ let pulled = 0;+ while (out.length < count && pulled < count * 6) {+ const batch = fetchRows(src.dataset, src.config, src.split, offset, Math.min(100, count * 2));+ if (!batch.length) break;+ for (const row of batch) {+ pulled++;+ const mapped = src.map(row);+ if (!mapped || !mapped.prompt) continue;+ out.push({ id: `${tag}-${offset + out.length}`, source: src.dataset, mode: src.mode, license: src.license, ...mapped });+ if (out.length >= count) break;+ }+ offset += batch.length;}- offset += batch.length;}let kept = out;diff --git a/evals/run-abstention.js b/evals/run-abstention.jsnew file mode 100644index 0000000..28759d0--- /dev/null+++ b/evals/run-abstention.js@@ -0,0 +1,134 @@+#!/usr/bin/env node+'use strict';++/**+ * Abstention-mode eval (objective, judge-bias-free) — for circle-of-competence.+ *+ * SelfAware-style data: each item is either ANSWERABLE (has a real answer) or+ * UNANSWERABLE (no one can know — open scientific questions, undecidable, future+ * unknowns). A well-calibrated agent should ANSWER the answerable ones and+ * ABSTAIN ("this is unanswerable / I cannot know") on the unanswerable ones.+ *+ * For each item the SOLVER responds twice IN THE SAME RUN — WITH the skill guide+ * injected vs WITH a length-matched placebo — and we score whether its+ * answer/abstain decision matched the ground-truth `answerable` flag. Paired+ * McNemar on per-item correctness, plus a confusion breakdown so we can see+ * WHICH direction the skill moves (does it cut over-confident answers on+ * unanswerable items without sandbagging the answerable ones?).+ *+ * Reads mode=abstention items from evals/datasets/external/*.jsonl+ * { prompt, answerable: bool, skill_fit: ['circle-of-competence'] }+ *+ * Usage: EVAL_RUN=run1 FORCE_SKILL=circle-of-competence node evals/run-abstention.js [selfaware]+ */++const fs = require('fs');+const path = require('path');+const { droidExecAsync } = require('./lib/droid');+const { runDir, writeJson, mapPool } = require('./lib/io');+const { neutralFiller, wordCount } = require('./lib/conditions');+const { mcnemar, wilson } = require('./lib/stats');++const SOLVER = process.env.SOLVER_MODEL || 'claude-sonnet-4-6';+const SOLVER_EFFORT = process.env.SOLVER_EFFORT || 'medium';+const CONC = parseInt(process.env.CONC || '4', 10);+const FORCE_SKILL = process.env.FORCE_SKILL || 'circle-of-competence';+const EXT = path.join(__dirname, 'datasets', 'external');+const SKILLS_DIR = path.join(__dirname, '..', 'skills');++function loadItems(tags) {+ const out = [];+ for (const t of tags) {+ const f = path.join(EXT, `${t}.jsonl`);+ if (!fs.existsSync(f)) continue;+ for (const line of fs.readFileSync(f, 'utf8').trim().split('\n').filter(Boolean)) {+ const o = JSON.parse(line);+ if (o.mode === 'abstention' && typeof o.answerable === 'boolean' && o.prompt) out.push(o);+ }+ }+ return process.env.LIMIT ? out.slice(0, parseInt(process.env.LIMIT, 10)) : out;+}++function skillContent(short) {+ const f = path.join(SKILLS_DIR, 'thinking-' + short.replace(/^thinking-/, ''), 'SKILL.md');+ return fs.existsSync(f) ? fs.readFileSync(f, 'utf8') : null;+}++const INSTR = `\n\nIf this question has a knowable, factual answer, answer it. If it is fundamentally unanswerable (no one can know — e.g. an open scientific question, an undecidable matter, a private/unknowable fact, or a future event), say so instead of guessing. End your response with exactly: ANSWER: <your answer, OR the single word UNANSWERABLE>`;++function withSkillPrompt(item, skillMd) {+ return `Use the following thinking-skill guide to reason about the question. Apply it substantively.\n\n=== THINKING SKILL ===\n${skillMd}\n=== END SKILL ===\n\n${item.prompt}${INSTR}`;+}+function placeboPrompt(item, skillMd) {+ return `Some general notes:\n\n${neutralFiller(wordCount(skillMd))}\n\n${item.prompt}${INSTR}`;+}++/** decision: true = abstained (declared unanswerable), false = attempted an answer */+function abstained(text) {+ const m = text.match(/ANSWER:\s*(.+)$/is);+ const tail = (m ? m[1] : text).trim();+ // explicit marker, or strong abstention language in the answer slot+ if (/^unanswerable\b/i.test(tail)) return true;+ if (/\bunanswerable\b/i.test(tail) && tail.length < 60) return true;+ if (/\b(cannot|can'?t|impossible to|no one can|not knowable|unknowable|no way to know)\b/i.test(tail) && tail.length < 80) return true;+ return false;+}+/** correct = abstained on unanswerable, answered on answerable */+function isCorrect(item, text) {+ const ab = abstained(text);+ return item.answerable ? !ab : ab;+}++async function runItem(item, skillMd) {+ const [w, p] = await Promise.all([+ droidExecAsync({ model: SOLVER, effort: SOLVER_EFFORT, prompt: withSkillPrompt(item, skillMd) }),+ droidExecAsync({ model: SOLVER, effort: SOLVER_EFFORT, prompt: placeboPrompt(item, skillMd) }),+ ]);+ if (!w.ok || !p.ok) return null;+ return {+ answerable: item.answerable,+ skill_correct: isCorrect(item, w.text), placebo_correct: isCorrect(item, p.text),+ skill_abstained: abstained(w.text), placebo_abstained: abstained(p.text),+ };+}++async function main() {+ const tags = process.argv.slice(2).length ? process.argv.slice(2) : ['selfaware'];+ const skillMd = skillContent(FORCE_SKILL);+ if (!skillMd) { console.error('no skill content for', FORCE_SKILL); process.exit(1); }+ const items = loadItems(tags);+ console.log(`Abstention eval: ${items.length} items [${tags.join(', ')}], skill=${FORCE_SKILL}, solver=${SOLVER}(${SOLVER_EFFORT}), isolation ${process.env.EVAL_NO_ISOLATE === '1' ? 'OFF' : 'ON'}`);+ if (!items.length) { console.log(' no abstention candidates found — ingest selfaware first.'); return; }++ let done = 0;+ const r = (await mapPool(items, CONC, async it => { const x = await runItem(it, skillMd); done++; if (done % 10 === 0) console.log(` ${done}/${items.length}`); return x; })).filter(Boolean);++ const N = r.length;+ const SC = r.filter(x => x.skill_correct).length, PC = r.filter(x => x.placebo_correct).length;+ const b = r.filter(x => x.skill_correct && !x.placebo_correct).length;+ const c = r.filter(x => !x.skill_correct && x.placebo_correct).length;+ // split accuracy: abstention rate on each ground-truth class (the calibration signal)+ const unans = r.filter(x => !x.answerable), ans = r.filter(x => x.answerable);+ const out = {+ mode: 'abstention', skill: FORCE_SKILL, solver: SOLVER, n: N,+ acc_with_skill: +(SC / N).toFixed(3), acc_with_skill_ci: wilson(SC, N).map(x => +x.toFixed(3)),+ acc_placebo: +(PC / N).toFixed(3), acc_placebo_ci: wilson(PC, N).map(x => +x.toFixed(3)),+ delta_pp: +(((SC - PC) / N) * 100).toFixed(1),+ mcnemar_p: +mcnemar(b, c).toFixed(3), significant: mcnemar(b, c) < 0.05, discordant: b + c,+ calibration: {+ n_unanswerable: unans.length,+ abstain_on_unanswerable_skill: +(unans.filter(x => x.skill_abstained).length / (unans.length || 1)).toFixed(3),+ abstain_on_unanswerable_placebo: +(unans.filter(x => x.placebo_abstained).length / (unans.length || 1)).toFixed(3),+ n_answerable: ans.length,+ abstain_on_answerable_skill: +(ans.filter(x => x.skill_abstained).length / (ans.length || 1)).toFixed(3),+ abstain_on_answerable_placebo: +(ans.filter(x => x.placebo_abstained).length / (ans.length || 1)).toFixed(3),+ },+ };+ const file = process.env.OUTFILE || path.join(runDir(), `abstention-${FORCE_SKILL}.json`);+ fs.mkdirSync(path.dirname(file), { recursive: true });+ writeJson(file, out);+ console.log(`\n accuracy WITH skill ${(out.acc_with_skill * 100).toFixed(0)}% CI[${(out.acc_with_skill_ci[0] * 100).toFixed(0)},${(out.acc_with_skill_ci[1] * 100).toFixed(0)}] vs placebo ${(out.acc_placebo * 100).toFixed(0)}% Δ${out.delta_pp >= 0 ? '+' : ''}${out.delta_pp}pp McNemar p=${out.mcnemar_p}${out.significant ? ' SIG' : ''}`);+ console.log(` abstain-on-unanswerable: skill ${(out.calibration.abstain_on_unanswerable_skill * 100).toFixed(0)}% vs placebo ${(out.calibration.abstain_on_unanswerable_placebo * 100).toFixed(0)}% | false-abstain-on-answerable: skill ${(out.calibration.abstain_on_answerable_skill * 100).toFixed(0)}% vs placebo ${(out.calibration.abstain_on_answerable_placebo * 100).toFixed(0)}%`);+ console.log(` -> ${file}`);+}+main();diff --git a/evals/run-routing-data.js b/evals/run-routing-data.jsnew file mode 100644index 0000000..5d45736--- /dev/null+++ b/evals/run-routing-data.js@@ -0,0 +1,143 @@+#!/usr/bin/env node+'use strict';++/**+ * Binary-decision-on-labeled-data eval (objective, judge-bias-free).+ *+ * For "routing/classification" skills whose value is making the RIGHT call about+ * HOW to engage a problem, not solving it:+ * - socratic: is this request ambiguous enough that I should ASK a clarifying+ * question before acting? (label = needs_clarification)+ * - cynefin: is this an UN-ordered problem (complex/chaotic — probe/act first,+ * emergent) vs an ordered one (clear/complicated — analyze then plan)?+ * (label = unordered)+ * Any skill with a balanced binary-labeled set + a decision instruction works.+ *+ * Each item carries its own `decision_instruction` defining what YES/NO mean, a+ * boolean `label` (true => correct answer is YES), and `skill_fit`. The SOLVER+ * decides twice IN THE SAME RUN — WITH the skill vs WITH a length-matched+ * placebo. We score the binary decision against the label and report paired+ * McNemar + a confusion breakdown (so we see whether the skill fixes+ * under-triggering, over-triggering, or both). Balanced datasets => accuracy is+ * meaningful and a trivial always-YES/always-NO baseline scores 50%.+ *+ * Reads mode=binary-decision items from evals/datasets/external/*.jsonl OR+ * evals/datasets/authored/*.jsonl+ * { prompt, label: bool, decision_instruction, skill_fit: [...] }+ *+ * Usage: EVAL_RUN=run1 FORCE_SKILL=socratic node evals/run-routing-data.js socratic-clarify+ */++const fs = require('fs');+const path = require('path');+const { droidExecAsync } = require('./lib/droid');+const { runDir, writeJson, mapPool } = require('./lib/io');+const { neutralFiller, wordCount } = require('./lib/conditions');+const { mcnemar, wilson } = require('./lib/stats');++const SOLVER = process.env.SOLVER_MODEL || 'claude-sonnet-4-6';+const SOLVER_EFFORT = process.env.SOLVER_EFFORT || 'medium';+const CONC = parseInt(process.env.CONC || '4', 10);+const FORCE_SKILL = process.env.FORCE_SKILL;+const DIRS = [path.join(__dirname, 'datasets', 'authored'), path.join(__dirname, 'datasets', 'external')];+const SKILLS_DIR = path.join(__dirname, '..', 'skills');++function loadItems(tags) {+ const out = [];+ for (const t of tags) {+ for (const d of DIRS) {+ const f = path.join(d, `${t}.jsonl`);+ if (!fs.existsSync(f)) continue;+ for (const line of fs.readFileSync(f, 'utf8').trim().split('\n').filter(Boolean)) {+ const o = JSON.parse(line);+ if (o.mode === 'binary-decision' && typeof o.label === 'boolean' && o.prompt) out.push(o);+ }+ break; // first dir that has the file wins+ }+ }+ return process.env.LIMIT ? out.slice(0, parseInt(process.env.LIMIT, 10)) : out;+}++function skillContent(short) {+ const f = path.join(SKILLS_DIR, 'thinking-' + short.replace(/^thinking-/, ''), 'SKILL.md');+ return fs.existsSync(f) ? fs.readFileSync(f, 'utf8') : null;+}+function pickSkill(item) {+ if (FORCE_SKILL) { const f = FORCE_SKILL.replace(/^thinking-/, ''); return skillContent(f) ? f : null; }+ for (const s of (item.skill_fit || [])) if (skillContent(s)) return s.replace(/^thinking-/, '');+ return null;+}++function instr(item) {+ return `\n\n${item.decision_instruction}\nEnd your response with exactly: ANSWER: <Yes or No>`;+}+function withSkillPrompt(item, skillMd) {+ return `Use the following thinking-skill guide to reason about this. Apply it substantively.\n\n=== THINKING SKILL ===\n${skillMd}\n=== END SKILL ===\n\n${item.prompt}${instr(item)}`;+}+function placeboPrompt(item, skillMd) {+ return `Some general notes:\n\n${neutralFiller(wordCount(skillMd))}\n\n${item.prompt}${instr(item)}`;+}+function decideYes(text) {+ const m = text.match(/ANSWER:\s*(yes|no)/i) || text.match(/\b(yes|no)\b\s*\.?\s*$/i);+ return m ? /yes/i.test(m[1]) : null;+}+function isCorrect(item, text) {+ const d = decideYes(text);+ if (d == null) return false;+ return d === item.label;+}++async function runItem(item) {+ const skill = pickSkill(item);+ if (!skill) return null;+ const skillMd = skillContent(skill);+ const [w, p] = await Promise.all([+ droidExecAsync({ model: SOLVER, effort: SOLVER_EFFORT, prompt: withSkillPrompt(item, skillMd) }),+ droidExecAsync({ model: SOLVER, effort: SOLVER_EFFORT, prompt: placeboPrompt(item, skillMd) }),+ ]);+ if (!w.ok || !p.ok) return null;+ return {+ skill, label: item.label,+ skill_correct: isCorrect(item, w.text), placebo_correct: isCorrect(item, p.text),+ skill_yes: decideYes(w.text), placebo_yes: decideYes(p.text),+ };+}++function balancedAcc(rows, who) {+ const pos = rows.filter(r => r.label), neg = rows.filter(r => !r.label);+ const tpr = pos.length ? pos.filter(r => r[who]).length / pos.length : 0; // recall on YES+ const tnr = neg.length ? neg.filter(r => r[who]).length / neg.length : 0; // recall on NO+ return +(((tpr + tnr) / 2)).toFixed(3);+}++async function main() {+ if (!FORCE_SKILL && !process.argv.slice(2).length) { console.error('set FORCE_SKILL and/or pass dataset tags'); process.exit(1); }+ const tags = process.argv.slice(2);+ const items = loadItems(tags);+ console.log(`Binary-decision eval: ${items.length} items [${tags.join(', ')}], skill=${FORCE_SKILL || '(per-item)'}, solver=${SOLVER}(${SOLVER_EFFORT}), isolation ${process.env.EVAL_NO_ISOLATE === '1' ? 'OFF' : 'ON'}`);+ if (!items.length) { console.log(' no binary-decision candidates found.'); return; }++ let done = 0;+ const r = (await mapPool(items, CONC, async it => { const x = await runItem(it); done++; if (done % 10 === 0) console.log(` ${done}/${items.length}`); return x; })).filter(Boolean);++ const N = r.length;+ const SC = r.filter(x => x.skill_correct).length, PC = r.filter(x => x.placebo_correct).length;+ const b = r.filter(x => x.skill_correct && !x.placebo_correct).length;+ const c = r.filter(x => !x.skill_correct && x.placebo_correct).length;+ const out = {+ mode: 'binary-decision', skill: FORCE_SKILL || r[0].skill, tags, solver: SOLVER, n: N,+ n_yes_label: r.filter(x => x.label).length, n_no_label: r.filter(x => !x.label).length,+ acc_with_skill: +(SC / N).toFixed(3), acc_with_skill_ci: wilson(SC, N).map(x => +x.toFixed(3)),+ acc_placebo: +(PC / N).toFixed(3), acc_placebo_ci: wilson(PC, N).map(x => +x.toFixed(3)),+ delta_pp: +(((SC - PC) / N) * 100).toFixed(1),+ balanced_acc_with_skill: balancedAcc(r, 'skill_yes'), balanced_acc_placebo: balancedAcc(r, 'placebo_yes'),+ mcnemar_p: +mcnemar(b, c).toFixed(3), significant: mcnemar(b, c) < 0.05, discordant: b + c,+ };+ const file = process.env.OUTFILE || path.join(runDir(), `routing-data-${out.skill}.json`);+ fs.mkdirSync(path.dirname(file), { recursive: true });+ writeJson(file, out);+ console.log(`\n accuracy WITH skill ${(out.acc_with_skill * 100).toFixed(0)}% CI[${(out.acc_with_skill_ci[0] * 100).toFixed(0)},${(out.acc_with_skill_ci[1] * 100).toFixed(0)}] vs placebo ${(out.acc_placebo * 100).toFixed(0)}% Δ${out.delta_pp >= 0 ? '+' : ''}${out.delta_pp}pp McNemar p=${out.mcnemar_p}${out.significant ? ' SIG' : ''}`);+ console.log(` balanced-acc: skill ${(out.balanced_acc_with_skill * 100).toFixed(0)}% vs placebo ${(out.balanced_acc_placebo * 100).toFixed(0)}% (labels: ${out.n_yes_label} YES / ${out.n_no_label} NO)`);+ console.log(` -> ${file}`);+}+main();diff --git a/reviews/wave-validation/wave-a.txt b/reviews/wave-validation/wave-a.txtnew file mode 100644index 0000000..fa54f56--- /dev/null+++ b/reviews/wave-validation/wave-a.txt@@ -0,0 +1,20 @@+**Defects found:**++- **Claim 1 — Working tree NOT clean of intended-to-commit changes:**+ - `.gitignore` modified (adds `diversevul-balanced.jsonl` gitignore entry) but uncommitted.+ - 17 `evals/datasets/behavioral/thinking-*.json` files modified with substantial new eval cases (sample: `thinking-archetypes.json` grew by ~100 lines of new scenarios) but uncommitted.+ - `evals/datasets/external/NOTICE.md` modified (documents two new DiverseVul dataset sources) but uncommitted.+ - `evals/datasets/ingest-hf.js` modified (new balanced-dataset ingestion and `src.balance` handling logic) but uncommitted.+ - `evals/run-abstention.js` is untracked — a new eval runner for circle-of-competence abstention mode.+ - `evals/run-routing-data.js` is untracked — a new eval runner for routing data.+ - `reviews/wave-validation/` directory is untracked (session scratch, but present in `status --porcelain`).++- **Claims 2–7 — No defects found:**+ - Claim 2: `git ls-files | grep -i backups` empty; `backups/` is gitignored (`.gitignore` line 8); 150MB tgz on disk but not tracked. ✅+ - Claim 3: `skills/thinking-scientific-method-v2/` absent; canonical `skills/thinking-scientific-method/SKILL.md` present; frontmatter description 173 chars (<200). ✅+ - Claim 4: README line 11 references `assets/readme-banner.png`; file is tracked. ✅+ - Claim 5: `ls -d skills/thinking-*/` → exactly 39. ✅+ - Claim 6: `node scripts/validate-skills.js` exits 0, reports "Total Skills: 39". ✅+ - Claim 7: `grep -rn scientific-method-v2` (excluding `.git`, `node_modules`, `reviews/`, `evals/results`) → zero matches. ✅++VERDICT: FAIL