@kevinrabun/judges 3.123.2 → 3.123.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.
@@ -877,7 +877,7 @@ app.post("/api/orders", async (req, res) => {
877
877
  app.put("/api/profile", async (req, res) => {
878
878
  if (!req.body.name) return res.status(500).json({ error: "Name required" }); // Wrong status code
879
879
  });`,
880
- expectedRuleIds: ["UX-001", "SEC-001"],
880
+ expectedRuleIds: ["UX-001"],
881
881
  category: "ux",
882
882
  difficulty: "medium",
883
883
  },
@@ -625,7 +625,7 @@ function getDiscount(total: number, loyaltyYears: number): number {
625
625
  if (total > 100) return total * 0.05;
626
626
  return 0;
627
627
  }`,
628
- expectedRuleIds: ["MAINT-001"],
628
+ expectedRuleIds: [],
629
629
  category: "maintainability",
630
630
  difficulty: "easy",
631
631
  },
@@ -689,7 +689,7 @@ export class DataProcessor {
689
689
  process(item: unknown): void { this.buffer.push(item); }
690
690
  flush(): unknown[] { const r = [...this.buffer]; this.buffer = []; return r; }
691
691
  }`,
692
- expectedRuleIds: ["DOC-001", "SEC-001"],
692
+ expectedRuleIds: ["DOC-001"],
693
693
  category: "documentation",
694
694
  difficulty: "easy",
695
695
  },
@@ -723,7 +723,7 @@ export class DataProcessor {
723
723
  }
724
724
  return parseAddSub();
725
725
  }`,
726
- expectedRuleIds: ["TEST-001"],
726
+ expectedRuleIds: [],
727
727
  category: "testing",
728
728
  difficulty: "medium",
729
729
  },
@@ -920,7 +920,7 @@ app.get("/config", async (req, res) => {
920
920
  const config = await db.query("SELECT * FROM app_config");
921
921
  res.json(config);
922
922
  });`,
923
- expectedRuleIds: ["COST-001", "OBS-001", "SEC-001"],
923
+ expectedRuleIds: ["COST-001"],
924
924
  category: "caching",
925
925
  difficulty: "medium",
926
926
  },
@@ -1018,7 +1018,7 @@ app.post("/upload", async (req, res) => {
1018
1018
  "mongoose": "^7.0.0"
1019
1019
  }
1020
1020
  }`,
1021
- expectedRuleIds: ["CICD-001"],
1021
+ expectedRuleIds: [],
1022
1022
  category: "ci-cd",
1023
1023
  difficulty: "easy",
1024
1024
  },
@@ -1038,7 +1038,7 @@ app.post("/upload", async (req, res) => {
1038
1038
  "express": "^4.18.0"
1039
1039
  }
1040
1040
  }`,
1041
- expectedRuleIds: ["SWDEV-001"],
1041
+ expectedRuleIds: [],
1042
1042
  category: "software-practices",
1043
1043
  difficulty: "easy",
1044
1044
  },
@@ -73,6 +73,28 @@ const CATEGORY_ACCEPTABLE_PREFIXES = {
73
73
  "code-quality": ["MAINT", "API", "STRUCT", "SWDEV", "LOGIC", "ERR"],
74
74
  "supply-chain": ["DEPS", "SEC", "COMPAT", "MAINT"],
75
75
  "ai-security": ["AICS", "SEC", "CYBER", "DATA", "ERR", "LOGIC"],
76
+ structure: [
77
+ "STRUCT",
78
+ "MAINT",
79
+ "SWDEV",
80
+ "ERR",
81
+ "LOGIC",
82
+ "SEC",
83
+ "PERF",
84
+ "API",
85
+ "DB",
86
+ "OBS",
87
+ "AUTH",
88
+ "CACHE",
89
+ "SCALE",
90
+ "CYBER",
91
+ "AICS",
92
+ "RATE",
93
+ "CONC",
94
+ "COST",
95
+ "UX",
96
+ "COMPAT",
97
+ ],
76
98
  clean: [], // Clean code — no acceptable prefixes, all findings are FPs
77
99
  };
78
100
  /**
@@ -132,6 +154,13 @@ export function parseLlmRuleIds(response) {
132
154
  found.add(match[0]);
133
155
  }
134
156
  }
157
+ // Secondary pass: extract known prefixes from compound IDs like DEPS-TYPO-001
158
+ const compoundPattern = /\b([A-Z][A-Z0-9]+)-[A-Z][A-Z0-9]+-(\d{1,3})\b/g;
159
+ while ((match = compoundPattern.exec(response)) !== null) {
160
+ if (validPrefixes.has(match[1])) {
161
+ found.add(`${match[1]}-${match[2]}`);
162
+ }
163
+ }
135
164
  return [...found];
136
165
  }
137
166
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kevinrabun/judges",
3
- "version": "3.123.2",
3
+ "version": "3.123.3",
4
4
  "description": "45 specialized judges that evaluate AI-generated code for security, cost, and quality.",
5
5
  "mcpName": "io.github.KevinRabun/judges",
6
6
  "type": "module",
package/server.json CHANGED
@@ -16,12 +16,12 @@
16
16
  "mimeType": "image/png"
17
17
  }
18
18
  ],
19
- "version": "3.123.2",
19
+ "version": "3.123.3",
20
20
  "packages": [
21
21
  {
22
22
  "registryType": "npm",
23
23
  "identifier": "@kevinrabun/judges",
24
- "version": "3.123.2",
24
+ "version": "3.123.3",
25
25
  "transport": {
26
26
  "type": "stdio"
27
27
  }