@skill-harness/cli 0.22.3 → 0.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/report.grade.js +5 -3
- package/assets/report.template.html +4 -2
- package/dist/cli.js +4 -2
- package/package.json +3 -3
package/assets/report.grade.js
CHANGED
|
@@ -55,6 +55,7 @@ export function gradeColumn(col, shipBar, critical) {
|
|
|
55
55
|
let suspect = 0;
|
|
56
56
|
let errors = 0;
|
|
57
57
|
let notMeasured = 0;
|
|
58
|
+
let ungraded = 0;
|
|
58
59
|
|
|
59
60
|
for (const id of Object.keys(col.cells)) {
|
|
60
61
|
const cell = col.cells[id];
|
|
@@ -77,12 +78,13 @@ export function gradeColumn(col, shipBar, critical) {
|
|
|
77
78
|
passed++;
|
|
78
79
|
continue;
|
|
79
80
|
}
|
|
81
|
+
if (verdict === "UNGRADED") ungraded++;
|
|
80
82
|
if (critical.includes(id)) criticalFails++;
|
|
81
83
|
if (/^B/i.test(id)) bFails++;
|
|
82
84
|
}
|
|
83
85
|
|
|
84
86
|
if (col.partial === true) {
|
|
85
|
-
return { passed: 0, total: 0, pct: 0, letter: "-", ship: false, criticalFails, bFails, suspect, errors, notMeasured };
|
|
87
|
+
return { passed: 0, total: 0, pct: 0, letter: "-", ship: false, criticalFails, bFails, suspect, errors, notMeasured, ungraded };
|
|
86
88
|
}
|
|
87
89
|
|
|
88
90
|
const pct = total > 0 ? Math.round((passed * 100) / total) : 0;
|
|
@@ -98,7 +100,7 @@ export function gradeColumn(col, shipBar, critical) {
|
|
|
98
100
|
errors === 0 &&
|
|
99
101
|
notMeasured === 0;
|
|
100
102
|
|
|
101
|
-
return { passed, total, pct, letter, ship, criticalFails, bFails, suspect, errors, notMeasured };
|
|
103
|
+
return { passed, total, pct, letter, ship, criticalFails, bFails, suspect, errors, notMeasured, ungraded };
|
|
102
104
|
}
|
|
103
105
|
|
|
104
106
|
/**
|
|
@@ -114,7 +116,7 @@ export function gradeColumn(col, shipBar, critical) {
|
|
|
114
116
|
*/
|
|
115
117
|
export function liftClass(liftCell, greenCell) {
|
|
116
118
|
const conclusive = (verdict, suspect) =>
|
|
117
|
-
!suspect && verdict !== "ERROR" && verdict !== "NOT-MEASURED" && verdict !== "JUDGE-AMBIGUOUS";
|
|
119
|
+
!suspect && verdict !== "ERROR" && verdict !== "NOT-MEASURED" && verdict !== "JUDGE-AMBIGUOUS" && verdict !== "UNGRADED";
|
|
118
120
|
|
|
119
121
|
const redOk = conclusive(liftCell.red, liftCell.redSuspect);
|
|
120
122
|
const greenOk = conclusive(effective(greenCell), !!greenCell.suspect && !greenCell.override);
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
.cell.PASS { background: rgba(31,139,76,.22); }
|
|
26
26
|
.cell.FAIL { background: rgba(192,57,43,.24); }
|
|
27
27
|
.cell.ERROR { background: rgba(107,114,128,.22); }
|
|
28
|
+
.cell.UNGRADED { background: rgba(180,83,9,.18); }
|
|
28
29
|
.cell.NOT-MEASURED { background: rgba(180,83,9,.18); }
|
|
29
30
|
.cell.empty { color: var(--dim); cursor: default; font-weight: 400; }
|
|
30
31
|
.cell .ov { display: block; font-size: 11px; color: var(--over); font-weight: 600; }
|
|
@@ -229,6 +230,7 @@ function render() {
|
|
|
229
230
|
? `<span class='ov unsaved'>unsaved</span>`
|
|
230
231
|
: (cell.override ? `<span class='ov'>override</span>` : "");
|
|
231
232
|
const misfired = cell.clean != null && cell.clean < cell.reps ? ` · ${cell.reps - cell.clean} misfired` : "";
|
|
233
|
+
const ungraded = cell.ungraded_reps ? `<span class='reps'>${cell.ungraded_reps} UNGRADED rep${cell.ungraded_reps === 1 ? "" : "s"} (not judged FAIL)</span>` : "";
|
|
232
234
|
const reps = cell.reps ? `<span class='reps'>${cell.passes}/${cell.clean}${misfired}${cell.flakiness ? ` · flaky ${cell.flakiness.toFixed(2)}` : ""}</span>` : "";
|
|
233
235
|
const suspectBadge = cell.suspect && !cell.override ? `<span class='ov suspect'>suspect</span>` : "";
|
|
234
236
|
// Per-cell lift marker: only the two classes that mean the skill changed
|
|
@@ -255,7 +257,7 @@ function render() {
|
|
|
255
257
|
const objMark = obj
|
|
256
258
|
? `<span class='lm obj-${obj.status.toLowerCase()}' title='${escapeHtml(`objective ${obj.status}: ${obj.detail}`)}'>◉ ${escapeHtml(obj.status.toLowerCase())}</span>`
|
|
257
259
|
: "";
|
|
258
|
-
html += `<td class='cell ${v}${sel}' data-col='${col.index}' data-id='${scn.id}'>${v}${ov}${suspectBadge}${liftMark}${stabMark}${objMark}${reps}</td>`;
|
|
260
|
+
html += `<td class='cell ${v}${sel}' data-col='${col.index}' data-id='${scn.id}'>${v}${ov}${suspectBadge}${liftMark}${stabMark}${objMark}${reps}${ungraded}</td>`;
|
|
259
261
|
});
|
|
260
262
|
html += "</tr>";
|
|
261
263
|
}
|
|
@@ -389,7 +391,7 @@ function sparkline(runs) {
|
|
|
389
391
|
function renderTrends(data) {
|
|
390
392
|
const box = document.getElementById("trends");
|
|
391
393
|
if (!data.models.length) { box.innerHTML = `<div class="empty-state">No runs yet.</div>`; return; }
|
|
392
|
-
const glyph = { PASS: "✓", FAIL: "✗", ERROR: "!", "NOT-MEASURED": "∅" };
|
|
394
|
+
const glyph = { PASS: "✓", FAIL: "✗", ERROR: "!", UNGRADED: "?", "NOT-MEASURED": "∅" };
|
|
393
395
|
let html = "";
|
|
394
396
|
for (const m of data.models) {
|
|
395
397
|
const last = m.runs[m.runs.length - 1].grade;
|
package/dist/cli.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { readFileSync, existsSync, mkdirSync, writeFileSync, mkdtempSync, rmSync } from "node:fs";
|
|
3
3
|
import { basename, dirname, join, resolve } from "node:path";
|
|
4
4
|
import { tmpdir } from "node:os";
|
|
5
|
-
import { discover, resolveSkill, loadSpec, parseSpec, appendScenario, parseModelRef, runSkillModel, formatScorecard, readResults, regradeRun, lintSkill, failsGate, renderTemplateSpec, isTemplateSpec, renderDraftSpec, buildSuggestPrompt, parseSuggestDraft, rescoreRun, regateRun, specPathForRunDir, collectLift, collectStability, boundaryCells, stabilityNote, PATH_LEGEND, restampSkill, computeCoverage, formatCoverage, HARNESS_VERSION, defaultJudge, recordedJudgeOrDefault, assertJudgeAllowed, assertNotDowngraded, downgradeWarning, isScoredMode, resolveArm, isFreeOfflineCommand, } from "@skill-harness/core";
|
|
5
|
+
import { discover, resolveSkill, loadSpec, parseSpec, appendScenario, parseModelRef, runSkillModel, formatScorecard, readResults, regradeRun, lintSkill, failsGate, renderTemplateSpec, isTemplateSpec, renderDraftSpec, buildSuggestPrompt, parseSuggestDraft, rescoreRun, regateRun, specPathForRunDir, collectLift, collectReport, collectStability, boundaryCells, stabilityNote, PATH_LEGEND, restampSkill, computeCoverage, formatCoverage, HARNESS_VERSION, defaultJudge, recordedJudgeOrDefault, assertJudgeAllowed, assertNotDowngraded, downgradeWarning, isScoredMode, resolveArm, isFreeOfflineCommand, } from "@skill-harness/core";
|
|
6
6
|
import { getAdapter } from "@skill-harness/adapters";
|
|
7
7
|
import { serveReview } from "./serve.js";
|
|
8
8
|
const DEFAULT_MODEL = "fireworks:accounts/fireworks/models/deepseek-v4-pro";
|
|
@@ -138,7 +138,9 @@ async function cmdList(args) {
|
|
|
138
138
|
const seeded = spec.scenarios.filter((x) => x.mode === "seeded").length;
|
|
139
139
|
const seededNote = seeded ? `, ${seeded} seeded` : "";
|
|
140
140
|
const sourceNote = specs ? `; spec: --${s.specSource}` : "";
|
|
141
|
-
|
|
141
|
+
const ungraded = collectReport(dirname(dirname(s.specPath))).columns.reduce((total, column) => total + Object.values(column.cells).reduce((n, cell) => n + (cell.ungraded_reps ?? 0), 0), 0);
|
|
142
|
+
const ungradedNote = ungraded ? `; latest results: ${ungraded} UNGRADED rep${ungraded === 1 ? "" : "s"}` : "";
|
|
143
|
+
console.log(` ● ${s.name} (${spec.scenarios.length} scenarios${seededNote}${sourceNote}${ungradedNote})`);
|
|
142
144
|
}
|
|
143
145
|
catch (e) {
|
|
144
146
|
console.log(` ✗ ${s.name} INVALID: ${e instanceof Error ? e.message : e}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skill-harness/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.23.0",
|
|
4
4
|
"description": "skill-harness CLI — run, grade, review, and lint agent-skill scenarios on the pi harness",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"prepack": "node ../../scripts/release-pack.mjs --guard"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@skill-harness/core": "0.
|
|
48
|
-
"@skill-harness/adapters": "0.
|
|
47
|
+
"@skill-harness/core": "0.23.0",
|
|
48
|
+
"@skill-harness/adapters": "0.23.0"
|
|
49
49
|
}
|
|
50
50
|
}
|