@skill-harness/cli 0.3.1 → 0.3.2

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.
@@ -127,3 +127,24 @@ export function liftSummary(col) {
127
127
  out.delta = out.greenPassed - out.redPassed;
128
128
  return out;
129
129
  }
130
+
131
+ /**
132
+ * The lift badge for a column with nothing to show in the number: `{text, title}`,
133
+ * or null when the column should carry no badge at all.
134
+ *
135
+ * A *missing* baseline and an *unusable* one are different facts. Nothing is
136
+ * comparable when every shared scenario ran identically in both modes, or when the
137
+ * two sides aggregated differently (red at 1 rep vs green at 3) — a red baseline
138
+ * exists, and "no red baseline" would send the author off to re-run the one thing
139
+ * they already have. The server's headline already states which it is and what to
140
+ * re-run, so it becomes the tooltip verbatim.
141
+ */
142
+ export function liftNoneBadge(col) {
143
+ if (col.lift) {
144
+ return { text: "lift not comparable", title: col.liftHeadline || "nothing in the red baseline could be compared" };
145
+ }
146
+ if (col.mode === "green") {
147
+ return { text: "no red baseline", title: "run the same scenarios with --mode red to get a baseline" };
148
+ }
149
+ return null;
150
+ }
@@ -182,9 +182,11 @@ function render() {
182
182
  `<div class='lift ${cls}' title='vs red baseline ${escapeHtml(col.lift.redTimestamp)} — ${ls.kept} passed without the skill too'>${body}${inc}${part}</div></th>`;
183
183
  return;
184
184
  }
185
- if (col.mode === "green") {
186
- // "not measured" is a different claim from "measured no effect" — say which.
187
- liftHtml = `<div class='lift none' title='run the same scenarios with --mode red to get a baseline'>no red baseline</div>`;
185
+ // "not measured" is a different claim from "measured no effect" — and an
186
+ // unusable baseline is a third (see liftNoneBadge).
187
+ const none = liftNoneBadge(col);
188
+ if (none) {
189
+ liftHtml = `<div class='lift none' title='${escapeHtml(none.title)}'>${escapeHtml(none.text)}</div>`;
188
190
  }
189
191
  html += `<th><div>${escapeHtml(col.label)}</div><div class='grade'>${gradeHtml}</div>${liftHtml}</th>`;
190
192
  });
package/dist/cli.js CHANGED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skill-harness/cli",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
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": "rm -rf ./assets && mkdir -p ./assets && cp ../../assets/report.* ./assets/ && cp ../../LICENSE ./LICENSE"
45
45
  },
46
46
  "dependencies": {
47
- "@skill-harness/core": "0.3.1",
48
- "@skill-harness/adapters": "0.3.1"
47
+ "@skill-harness/core": "0.3.2",
48
+ "@skill-harness/adapters": "0.3.2"
49
49
  }
50
50
  }