slopbrick 0.17.1 → 0.17.3

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.
@@ -4096,7 +4096,13 @@ var signalStrengthSchema = external_exports.record(
4096
4096
  verdict: external_exports.enum(VERDICTS),
4097
4097
  // defaultOff is opt-in per-rule. Absent = the rule follows
4098
4098
  // isDefaultOff(verdict). Present (true or false) = user override.
4099
- defaultOff: external_exports.boolean().optional()
4099
+ defaultOff: external_exports.boolean().optional(),
4100
+ // v0.17.3 (B5): mark rules whose signal is specific to AI
4101
+ // generation. Without this field, the composite scoring pipeline
4102
+ // can't distinguish "this rule fires on AI slop" from "this rule
4103
+ // fires on sloppy code in general" — and gives zero weight to
4104
+ // both. See packages/engine/src/composite-scoring.ts:136,164.
4105
+ aiSpecific: external_exports.boolean().optional()
4100
4106
  })
4101
4107
  );
4102
4108
 
@@ -4162,11 +4168,6 @@ function syntaxCandidates(filePath, source) {
4162
4168
  { syntax: "typescript", jsx: true },
4163
4169
  { syntax: "typescript", jsx: false, tsx: false }
4164
4170
  ];
4165
- case "mjs":
4166
- return [
4167
- { syntax: "ecmascript", jsx: true },
4168
- { syntax: "ecmascript", jsx: false }
4169
- ];
4170
4171
  default:
4171
4172
  return [
4172
4173
  { syntax: "typescript", jsx: false, tsx: true },
@@ -4077,7 +4077,13 @@ var signalStrengthSchema = external_exports.record(
4077
4077
  verdict: external_exports.enum(VERDICTS),
4078
4078
  // defaultOff is opt-in per-rule. Absent = the rule follows
4079
4079
  // isDefaultOff(verdict). Present (true or false) = user override.
4080
- defaultOff: external_exports.boolean().optional()
4080
+ defaultOff: external_exports.boolean().optional(),
4081
+ // v0.17.3 (B5): mark rules whose signal is specific to AI
4082
+ // generation. Without this field, the composite scoring pipeline
4083
+ // can't distinguish "this rule fires on AI slop" from "this rule
4084
+ // fires on sloppy code in general" — and gives zero weight to
4085
+ // both. See packages/engine/src/composite-scoring.ts:136,164.
4086
+ aiSpecific: external_exports.boolean().optional()
4081
4087
  })
4082
4088
  );
4083
4089
 
@@ -4143,11 +4149,6 @@ function syntaxCandidates(filePath, source) {
4143
4149
  { syntax: "typescript", jsx: true },
4144
4150
  { syntax: "typescript", jsx: false, tsx: false }
4145
4151
  ];
4146
- case "mjs":
4147
- return [
4148
- { syntax: "ecmascript", jsx: true },
4149
- { syntax: "ecmascript", jsx: false }
4150
- ];
4151
4152
  default:
4152
4153
  return [
4153
4154
  { syntax: "typescript", jsx: false, tsx: true },
package/dist/index.cjs CHANGED
@@ -34945,7 +34945,13 @@ var init_dist = __esm({
34945
34945
  verdict: external_exports.enum(VERDICTS),
34946
34946
  // defaultOff is opt-in per-rule. Absent = the rule follows
34947
34947
  // isDefaultOff(verdict). Present (true or false) = user override.
34948
- defaultOff: external_exports.boolean().optional()
34948
+ defaultOff: external_exports.boolean().optional(),
34949
+ // v0.17.3 (B5): mark rules whose signal is specific to AI
34950
+ // generation. Without this field, the composite scoring pipeline
34951
+ // can't distinguish "this rule fires on AI slop" from "this rule
34952
+ // fires on sloppy code in general" — and gives zero weight to
34953
+ // both. See packages/engine/src/composite-scoring.ts:136,164.
34954
+ aiSpecific: external_exports.boolean().optional()
34949
34955
  })
34950
34956
  );
34951
34957
  }
@@ -35133,11 +35139,6 @@ function syntaxCandidates(filePath, source) {
35133
35139
  { syntax: "typescript", jsx: true },
35134
35140
  { syntax: "typescript", jsx: false, tsx: false }
35135
35141
  ];
35136
- case "mjs":
35137
- return [
35138
- { syntax: "ecmascript", jsx: true },
35139
- { syntax: "ecmascript", jsx: false }
35140
- ];
35141
35142
  default:
35142
35143
  return [
35143
35144
  { syntax: "typescript", jsx: false, tsx: true },
@@ -45366,26 +45367,26 @@ function formatBriefReport(report) {
45366
45367
  lines.push(formatVerdict(report));
45367
45368
  lines.push("");
45368
45369
  const scoreLines = [
45369
- { name: "aiQuality", value: report.aiQuality },
45370
- { name: "engineeringHygiene", value: report.engineeringHygiene },
45371
- { name: "security", value: report.security },
45372
- { name: "repositoryHealth", value: report.repositoryHealth }
45370
+ { label: "AI Quality", field: "aiQuality", value: report.aiQuality },
45371
+ { label: "Engineering Hygiene", field: "engineeringHygiene", value: report.engineeringHygiene },
45372
+ { label: "Security", field: "security", value: report.security },
45373
+ { label: "Repository Health", field: "repositoryHealth", value: report.repositoryHealth }
45373
45374
  ];
45374
45375
  const deltaSuffix = formatDeltaSuffix(report);
45375
- scoreLines.forEach(({ name, value }, idx) => {
45376
+ scoreLines.forEach(({ label, field, value }, idx) => {
45376
45377
  const band = scoreBand(value);
45377
- const paddedName = name.padEnd(20, " ");
45378
+ const paddedLabel = label.padEnd(20, " ");
45378
45379
  const valueStr = value.toFixed(0).padStart(3, " ");
45379
45380
  const delta = idx === 0 ? deltaSuffix : "";
45380
45381
  lines.push(
45381
- ` ${paddedName} ${band.color(valueStr)} ${import_chalk.default.dim(band.label)}${delta}`
45382
+ ` ${paddedLabel} ${band.color(valueStr)} ${import_chalk.default.dim(band.label)} ${import_chalk.default.dim.italic(`(${field})`)}${delta}`
45382
45383
  );
45383
45384
  });
45384
45385
  const passed = report.aiQuality >= 70;
45385
45386
  lines.push("");
45386
45387
  lines.push(
45387
45388
  import_chalk.default.dim(
45388
- ` CI gate: aiQuality >= 70 -> ${passed ? import_chalk.default.green("pass") : import_chalk.default.red("fail")}`
45389
+ ` CI gate: AI Quality >= 70 -> ${passed ? import_chalk.default.green("pass") : import_chalk.default.red("fail")}`
45389
45390
  )
45390
45391
  );
45391
45392
  const suppressed = report.defaultOffSuppressedCount ?? 0;
package/dist/index.js CHANGED
@@ -34938,7 +34938,13 @@ var init_dist = __esm({
34938
34938
  verdict: external_exports.enum(VERDICTS),
34939
34939
  // defaultOff is opt-in per-rule. Absent = the rule follows
34940
34940
  // isDefaultOff(verdict). Present (true or false) = user override.
34941
- defaultOff: external_exports.boolean().optional()
34941
+ defaultOff: external_exports.boolean().optional(),
34942
+ // v0.17.3 (B5): mark rules whose signal is specific to AI
34943
+ // generation. Without this field, the composite scoring pipeline
34944
+ // can't distinguish "this rule fires on AI slop" from "this rule
34945
+ // fires on sloppy code in general" — and gives zero weight to
34946
+ // both. See packages/engine/src/composite-scoring.ts:136,164.
34947
+ aiSpecific: external_exports.boolean().optional()
34942
34948
  })
34943
34949
  );
34944
34950
  }
@@ -35135,11 +35141,6 @@ function syntaxCandidates(filePath, source) {
35135
35141
  { syntax: "typescript", jsx: true },
35136
35142
  { syntax: "typescript", jsx: false, tsx: false }
35137
35143
  ];
35138
- case "mjs":
35139
- return [
35140
- { syntax: "ecmascript", jsx: true },
35141
- { syntax: "ecmascript", jsx: false }
35142
- ];
35143
35144
  default:
35144
35145
  return [
35145
35146
  { syntax: "typescript", jsx: false, tsx: true },
@@ -45359,26 +45360,26 @@ function formatBriefReport(report) {
45359
45360
  lines.push(formatVerdict(report));
45360
45361
  lines.push("");
45361
45362
  const scoreLines = [
45362
- { name: "aiQuality", value: report.aiQuality },
45363
- { name: "engineeringHygiene", value: report.engineeringHygiene },
45364
- { name: "security", value: report.security },
45365
- { name: "repositoryHealth", value: report.repositoryHealth }
45363
+ { label: "AI Quality", field: "aiQuality", value: report.aiQuality },
45364
+ { label: "Engineering Hygiene", field: "engineeringHygiene", value: report.engineeringHygiene },
45365
+ { label: "Security", field: "security", value: report.security },
45366
+ { label: "Repository Health", field: "repositoryHealth", value: report.repositoryHealth }
45366
45367
  ];
45367
45368
  const deltaSuffix = formatDeltaSuffix(report);
45368
- scoreLines.forEach(({ name, value }, idx) => {
45369
+ scoreLines.forEach(({ label, field, value }, idx) => {
45369
45370
  const band = scoreBand(value);
45370
- const paddedName = name.padEnd(20, " ");
45371
+ const paddedLabel = label.padEnd(20, " ");
45371
45372
  const valueStr = value.toFixed(0).padStart(3, " ");
45372
45373
  const delta = idx === 0 ? deltaSuffix : "";
45373
45374
  lines.push(
45374
- ` ${paddedName} ${band.color(valueStr)} ${chalk.dim(band.label)}${delta}`
45375
+ ` ${paddedLabel} ${band.color(valueStr)} ${chalk.dim(band.label)} ${chalk.dim.italic(`(${field})`)}${delta}`
45375
45376
  );
45376
45377
  });
45377
45378
  const passed = report.aiQuality >= 70;
45378
45379
  lines.push("");
45379
45380
  lines.push(
45380
45381
  chalk.dim(
45381
- ` CI gate: aiQuality >= 70 -> ${passed ? chalk.green("pass") : chalk.red("fail")}`
45382
+ ` CI gate: AI Quality >= 70 -> ${passed ? chalk.green("pass") : chalk.red("fail")}`
45382
45383
  )
45383
45384
  );
45384
45385
  const suppressed = report.defaultOffSuppressedCount ?? 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "slopbrick",
3
- "version": "0.17.1",
3
+ "version": "0.17.3",
4
4
  "description": "Discovered, modeled, and governed repository structure. SlopBrick scans source code, classifies it against 95 rules in 15 categories, computes 4 scores (aiQuality, engineeringHygiene, security, repositoryHealth), and persists the structure for AI agents and CI.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -54,7 +54,7 @@
54
54
  "minimatch": "^9.0.5",
55
55
  "pgsql-parser": "^17.9.15"
56
56
  },
57
- "//_usebrick_note": "@usebrick/core and @usebrick/engine are private workspace packages. They are listed in devDependencies to keep pnpm-lock.yaml in sync; tsup.config.ts noExternal bundles them into dist/; the prepack-guard.mjs allowlist includes both. Neither ends up in the published tarball's runtime deps. See https://github.com/usebrick/platform/blob/main/docs/repository-structure.md",
57
+ "//_usebrick_note": "@usebrick/core and @usebrick/engine are private workspace packages. They are listed in devDependencies to keep pnpm-lock.yaml in sync; tsup.config.ts \u2192 noExternal bundles them into dist/; the prepack-guard.mjs allowlist includes both. Neither ends up in the published tarball's runtime deps. See https://github.com/usebrick/platform/blob/main/docs/repository-structure.md",
58
58
  "devDependencies": {
59
59
  "@types/node": "^20.14.0",
60
60
  "@usebrick/core": "workspace:*",
@@ -111,4 +111,4 @@
111
111
  "url": "https://github.com/usebrick/platform/issues"
112
112
  },
113
113
  "homepage": "https://github.com/usebrick/platform#readme"
114
- }
114
+ }