hassan-mohiddin/freeflow / .deprecated/skill-tooling-pre-rewrite/skills/evaluate-skill
evaluate-skill
VerifiedUse when evaluating, comparing, or making readiness claims about agent-skill behavior.
scripts/lib/decision.mjs
View on GitHubfunction assertionMap(assertions) {
const map = new Map();
for (const assertion of assertions) {
if (!assertion || typeof assertion.id !== "string") throw new Error("Every assertion result needs an ID");
if (!new Set(["pass", "fail", "inconclusive"]).has(assertion.verdict))
throw new Error(`Invalid assertion verdict for ${assertion.id}: ${assertion.verdict}`);
if (map.has(assertion.id)) throw new Error(`Duplicate assertion ID: ${assertion.id}`);
map.set(assertion.id, assertion.verdict);
}
return map;
}
export function decideSingle(assertions) {
const verdicts = [...assertionMap(assertions).values()];
const caseVerdict = verdicts.includes("fail") ? "fail" : verdicts.includes("inconclusive") ? "inconclusive" : "pass";
return Object.freeze({ evaluation_kind: "single", case_verdict: caseVerdict });
}
export function decideComparison(referenceAssertions, candidateAssertions) {
const reference = assertionMap(referenceAssertions);
const candidate = assertionMap(candidateAssertions);
const referenceIds = [...reference.keys()].sort();
const candidateIds = [...candidate.keys()].sort();
if (JSON.stringify(referenceIds) !== JSON.stringify(candidateIds))
throw new Error("Comparison assertion IDs must match exactly");
const pairs = referenceIds.map((id) => {
const from = reference.get(id);
const to = candidate.get(id);
let change = "unchanged";
if (from === "inconclusive" || to === "inconclusive") change = "unresolved";
else if (from === "fail" && to === "pass") change = "improved";
else if (from === "pass" && to === "fail") change = "regressed";
return Object.freeze({ id, reference: from, candidate: to, change });
});
const changes = new Set(pairs.map((pair) => pair.change));
const comparisonVerdict =
changes.has("unresolved") || (changes.has("improved") && changes.has("regressed"))
? "inconclusive"
: changes.has("regressed")
? "regressed"
: changes.has("improved")
? "improved"
: "same";
return Object.freeze({
evaluation_kind: "comparison",
comparison_verdict: comparisonVerdict,
pairs: Object.freeze(pairs),
});
}
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: 471k | 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 |