cskwork/supergoal-skill / skills/supergoal
supergoal
UnverifiedRoute objective-driven development, verification, planning, "teach/explain", codebase learning, and skill evaluation through the Supergoal workflow. Use when Supergoal is requested or an autonomous delivery workflow is needed.
templates/harness-eval-stats.mjs
View on GitHub#!/usr/bin/env node
import fs from "node:fs";
const path = process.argv[2];
if (process.argv[1] && process.argv[1].endsWith("harness-eval-stats.mjs") && !path) {
console.error("usage: node templates/harness-eval-stats.mjs <paired-results.json>");
process.exit(2);
}
function exactMcnemarP(baselineOnly, harnessOnly) {
const n = baselineOnly + harnessOnly;
if (n === 0) return 1;
const k = Math.min(baselineOnly, harnessOnly);
let term = Math.pow(0.5, n);
let sum = term;
for (let i = 0; i < k; i += 1) {
term *= (n - i) / (i + 1);
sum += term;
}
return Math.min(1, 2 * sum);
}
export function pairedBinaryStats(pairs) {
let baselineOnly = 0;
let harnessOnly = 0;
let matchedRemoved = 0;
for (const pair of pairs) {
const baseline = !!pair.baseline_pass;
const harness = !!pair.harness_pass;
if (baseline === harness) {
matchedRemoved += 1;
} else if (baseline) {
baselineOnly += 1;
} else {
harnessOnly += 1;
}
}
const p = exactMcnemarP(baselineOnly, harnessOnly);
return {
mcnemar: {
discordant_baseline_only: baselineOnly,
discordant_harness_only: harnessOnly,
p,
significant: p < 0.05,
},
snr_filter: {
matched_removed: matchedRemoved,
discordant_kept: baselineOnly + harnessOnly,
rule: "remove no-signal matched pass/pass and fail/fail pairs before McNemar",
},
};
}
if (path) {
let pairs;
try {
pairs = JSON.parse(fs.readFileSync(path, "utf8"));
} catch (error) {
console.error(`HARNESS-EVAL-STATS FAIL: cannot read paired results: ${error.message}`);
process.exit(2);
}
if (!Array.isArray(pairs)) {
console.error("HARNESS-EVAL-STATS FAIL: expected an array of paired results");
process.exit(2);
}
console.log(JSON.stringify(pairedBinaryStats(pairs), null, 2));
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |