@lexq/cli 0.1.57 → 0.1.58

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/dist/index.js CHANGED
@@ -2129,7 +2129,8 @@ function registerAnalyticsCommands(program) {
2129
2129
  "after",
2130
2130
  dedent8`
2131
2131
 
2132
- Shows progress, match rate, metric comparison (if baseline set), and per-rule stats.
2132
+ Shows progress, match rate, metric comparison and its change distribution (if a
2133
+ baseline is set), and per-rule stats.
2133
2134
 
2134
2135
  Example:
2135
2136
  $ lexq analytics simulation status --id <simId> --format table
@@ -2172,6 +2173,21 @@ function registerAnalyticsCommands(program) {
2172
2173
  console.log(
2173
2174
  `Change: ${data.metricSummary.deltaPercentage > 0 ? "+" : ""}${data.metricSummary.deltaPercentage.toFixed(1)}%`
2174
2175
  );
2176
+ const dist = data.metricSummary.distribution;
2177
+ if (dist) {
2178
+ console.log(`
2179
+ \u2500\u2500 Distribution \u2500\u2500`);
2180
+ console.log(`Changed: ${dist.changedRecords}`);
2181
+ console.log(`Increased: ${dist.increasedRecords}`);
2182
+ console.log(`Decreased: ${dist.decreasedRecords}`);
2183
+ console.log(
2184
+ `Largest +: ${dist.largestIncrease === null ? "\u2013" : `${signPrefix(dist.largestIncrease)}${String(dist.largestIncrease)}`}`
2185
+ );
2186
+ console.log(
2187
+ `Largest -: ${dist.largestDecrease === null ? "\u2013" : String(dist.largestDecrease)}`
2188
+ );
2189
+ console.log(`Measured: ${dist.measuredRecords}`);
2190
+ }
2175
2191
  }
2176
2192
  if (data.policyImpact?.comparison) {
2177
2193
  const diff = data.policyImpact.comparison.difference;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lexq/cli",
3
- "version": "0.1.57",
3
+ "version": "0.1.58",
4
4
  "description": "LexQ CLI — manage policies, simulate rules, and deploy from the terminal. Built for humans and AI agents.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -328,7 +328,15 @@ lexq analytics simulation export --id <simulationId> --as csv --output results.c
328
328
  "baselineValue": 5000000,
329
329
  "simulatedValue": 4500000,
330
330
  "delta": -500000,
331
- "deltaPercentage": -10.0
331
+ "deltaPercentage": -10.0,
332
+ "distribution": {
333
+ "changedRecords": 8700,
334
+ "increasedRecords": 400,
335
+ "decreasedRecords": 8300,
336
+ "largestIncrease": 1500,
337
+ "largestDecrease": -2000,
338
+ "measuredRecords": 8300
339
+ }
332
340
  },
333
341
  "policyImpact": {
334
342
  "policyVersionId": "...",