@blundergoat/goat-flow
Version:
AI coding agent harness and local dashboard for Claude Code, OpenAI Codex, Google Antigravity, and GitHub Copilot - setup audits, guardrails, structured skills, deny hooks, and persistent learning loops.
49 lines • 1.49 kB
JavaScript
const METRIC_LABELS = {
"trigger-clarity": "Trigger Clarity",
"workflow-completeness": "Workflow Completeness",
"gate-quality": "Gate Quality",
"evidence-testability": "Evidence & Testability",
"cold-start": "Cold-Start Executability",
"token-cost": "Token / Load Cost",
"tool-deps": "Tool Dependency Handling",
"write-risk": "Write Risk",
"skill-reference-fit": "Skill vs Reference Fit",
};
/**
* Convert subtype-capped scores into the severity bands shown in the dashboard.
*/
function metricSeverity(score, maxScore) {
if (maxScore === 0)
return "n/a";
const pct = score / maxScore;
if (pct >= 0.75)
return "ok";
if (pct >= 0.4)
return "warn";
return "fail";
}
export function finalizeMetric(input, metric, score, detail, signals) {
const maxScore = input.config.subtypes[input.subtype].profile[metric];
if (maxScore === 0) {
return {
metric,
label: METRIC_LABELS[metric],
score: 0,
maxScore,
severity: "n/a",
detail: `n/a for subtype=${input.subtype}`,
signals,
};
}
const cappedScore = Math.max(0, Math.min(score, maxScore));
return {
metric,
label: METRIC_LABELS[metric],
score: cappedScore,
maxScore,
severity: metricSeverity(cappedScore, maxScore),
detail,
signals,
};
}
//# sourceMappingURL=skill-quality-types.js.map