@kevinrabun/judges 3.31.0 → 3.33.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.
Files changed (170) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/README.md +51 -33
  3. package/dist/api.d.ts +1 -1
  4. package/dist/api.d.ts.map +1 -1
  5. package/dist/api.js +1 -1
  6. package/dist/api.js.map +1 -1
  7. package/dist/cli.d.ts +1 -0
  8. package/dist/cli.d.ts.map +1 -1
  9. package/dist/cli.js +79 -6
  10. package/dist/cli.js.map +1 -1
  11. package/dist/commands/snapshot.d.ts +5 -0
  12. package/dist/commands/snapshot.d.ts.map +1 -1
  13. package/dist/commands/snapshot.js +121 -0
  14. package/dist/commands/snapshot.js.map +1 -1
  15. package/dist/evaluators/index.d.ts.map +1 -1
  16. package/dist/evaluators/index.js +26 -3
  17. package/dist/evaluators/index.js.map +1 -1
  18. package/dist/evaluators/over-engineering.d.ts +3 -0
  19. package/dist/evaluators/over-engineering.d.ts.map +1 -0
  20. package/dist/evaluators/over-engineering.js +161 -0
  21. package/dist/evaluators/over-engineering.js.map +1 -0
  22. package/dist/formatters/pdf.d.ts +13 -0
  23. package/dist/formatters/pdf.d.ts.map +1 -0
  24. package/dist/formatters/pdf.js +138 -0
  25. package/dist/formatters/pdf.js.map +1 -0
  26. package/dist/judges/accessibility.d.ts.map +1 -1
  27. package/dist/judges/accessibility.js +2 -0
  28. package/dist/judges/accessibility.js.map +1 -1
  29. package/dist/judges/agent-instructions.d.ts.map +1 -1
  30. package/dist/judges/agent-instructions.js +2 -0
  31. package/dist/judges/agent-instructions.js.map +1 -1
  32. package/dist/judges/ai-code-safety.d.ts.map +1 -1
  33. package/dist/judges/ai-code-safety.js +2 -0
  34. package/dist/judges/ai-code-safety.js.map +1 -1
  35. package/dist/judges/api-contract.d.ts.map +1 -1
  36. package/dist/judges/api-contract.js +3 -1
  37. package/dist/judges/api-contract.js.map +1 -1
  38. package/dist/judges/api-design.d.ts.map +1 -1
  39. package/dist/judges/api-design.js +2 -0
  40. package/dist/judges/api-design.js.map +1 -1
  41. package/dist/judges/authentication.d.ts.map +1 -1
  42. package/dist/judges/authentication.js +2 -0
  43. package/dist/judges/authentication.js.map +1 -1
  44. package/dist/judges/backwards-compatibility.d.ts.map +1 -1
  45. package/dist/judges/backwards-compatibility.js +2 -0
  46. package/dist/judges/backwards-compatibility.js.map +1 -1
  47. package/dist/judges/caching.d.ts.map +1 -1
  48. package/dist/judges/caching.js +2 -0
  49. package/dist/judges/caching.js.map +1 -1
  50. package/dist/judges/ci-cd.d.ts.map +1 -1
  51. package/dist/judges/ci-cd.js +2 -0
  52. package/dist/judges/ci-cd.js.map +1 -1
  53. package/dist/judges/cloud-readiness.d.ts.map +1 -1
  54. package/dist/judges/cloud-readiness.js +2 -0
  55. package/dist/judges/cloud-readiness.js.map +1 -1
  56. package/dist/judges/code-structure.d.ts.map +1 -1
  57. package/dist/judges/code-structure.js +2 -0
  58. package/dist/judges/code-structure.js.map +1 -1
  59. package/dist/judges/compliance.d.ts.map +1 -1
  60. package/dist/judges/compliance.js +2 -0
  61. package/dist/judges/compliance.js.map +1 -1
  62. package/dist/judges/concurrency.d.ts.map +1 -1
  63. package/dist/judges/concurrency.js +2 -0
  64. package/dist/judges/concurrency.js.map +1 -1
  65. package/dist/judges/configuration-management.d.ts.map +1 -1
  66. package/dist/judges/configuration-management.js +2 -0
  67. package/dist/judges/configuration-management.js.map +1 -1
  68. package/dist/judges/cost-effectiveness.d.ts.map +1 -1
  69. package/dist/judges/cost-effectiveness.js +2 -0
  70. package/dist/judges/cost-effectiveness.js.map +1 -1
  71. package/dist/judges/cybersecurity.d.ts.map +1 -1
  72. package/dist/judges/cybersecurity.js +2 -0
  73. package/dist/judges/cybersecurity.js.map +1 -1
  74. package/dist/judges/data-security.d.ts.map +1 -1
  75. package/dist/judges/data-security.js +2 -0
  76. package/dist/judges/data-security.js.map +1 -1
  77. package/dist/judges/data-sovereignty.d.ts.map +1 -1
  78. package/dist/judges/data-sovereignty.js +3 -1
  79. package/dist/judges/data-sovereignty.js.map +1 -1
  80. package/dist/judges/database.d.ts.map +1 -1
  81. package/dist/judges/database.js +2 -0
  82. package/dist/judges/database.js.map +1 -1
  83. package/dist/judges/dependency-health.d.ts.map +1 -1
  84. package/dist/judges/dependency-health.js +2 -0
  85. package/dist/judges/dependency-health.js.map +1 -1
  86. package/dist/judges/documentation.d.ts.map +1 -1
  87. package/dist/judges/documentation.js +2 -0
  88. package/dist/judges/documentation.js.map +1 -1
  89. package/dist/judges/error-handling.d.ts.map +1 -1
  90. package/dist/judges/error-handling.js +2 -0
  91. package/dist/judges/error-handling.js.map +1 -1
  92. package/dist/judges/ethics-bias.d.ts.map +1 -1
  93. package/dist/judges/ethics-bias.js +2 -0
  94. package/dist/judges/ethics-bias.js.map +1 -1
  95. package/dist/judges/false-positive-review.d.ts.map +1 -1
  96. package/dist/judges/false-positive-review.js +2 -0
  97. package/dist/judges/false-positive-review.js.map +1 -1
  98. package/dist/judges/framework-safety.d.ts.map +1 -1
  99. package/dist/judges/framework-safety.js +2 -0
  100. package/dist/judges/framework-safety.js.map +1 -1
  101. package/dist/judges/hallucination-detection.d.ts.map +1 -1
  102. package/dist/judges/hallucination-detection.js +2 -0
  103. package/dist/judges/hallucination-detection.js.map +1 -1
  104. package/dist/judges/iac-security.d.ts.map +1 -1
  105. package/dist/judges/iac-security.js +2 -0
  106. package/dist/judges/iac-security.js.map +1 -1
  107. package/dist/judges/index.d.ts.map +1 -1
  108. package/dist/judges/index.js +4 -0
  109. package/dist/judges/index.js.map +1 -1
  110. package/dist/judges/intent-alignment.d.ts.map +1 -1
  111. package/dist/judges/intent-alignment.js +2 -0
  112. package/dist/judges/intent-alignment.js.map +1 -1
  113. package/dist/judges/internationalization.d.ts.map +1 -1
  114. package/dist/judges/internationalization.js +2 -0
  115. package/dist/judges/internationalization.js.map +1 -1
  116. package/dist/judges/logging-privacy.d.ts.map +1 -1
  117. package/dist/judges/logging-privacy.js +2 -0
  118. package/dist/judges/logging-privacy.js.map +1 -1
  119. package/dist/judges/maintainability.d.ts.map +1 -1
  120. package/dist/judges/maintainability.js +2 -0
  121. package/dist/judges/maintainability.js.map +1 -1
  122. package/dist/judges/model-fingerprint.d.ts.map +1 -1
  123. package/dist/judges/model-fingerprint.js +3 -1
  124. package/dist/judges/model-fingerprint.js.map +1 -1
  125. package/dist/judges/multi-turn-coherence.d.ts.map +1 -1
  126. package/dist/judges/multi-turn-coherence.js +3 -1
  127. package/dist/judges/multi-turn-coherence.js.map +1 -1
  128. package/dist/judges/observability.d.ts.map +1 -1
  129. package/dist/judges/observability.js +2 -0
  130. package/dist/judges/observability.js.map +1 -1
  131. package/dist/judges/over-engineering.d.ts +3 -0
  132. package/dist/judges/over-engineering.d.ts.map +1 -0
  133. package/dist/judges/over-engineering.js +47 -0
  134. package/dist/judges/over-engineering.js.map +1 -0
  135. package/dist/judges/performance.d.ts.map +1 -1
  136. package/dist/judges/performance.js +2 -0
  137. package/dist/judges/performance.js.map +1 -1
  138. package/dist/judges/portability.d.ts.map +1 -1
  139. package/dist/judges/portability.js +2 -0
  140. package/dist/judges/portability.js.map +1 -1
  141. package/dist/judges/rate-limiting.d.ts.map +1 -1
  142. package/dist/judges/rate-limiting.js +2 -0
  143. package/dist/judges/rate-limiting.js.map +1 -1
  144. package/dist/judges/reliability.d.ts.map +1 -1
  145. package/dist/judges/reliability.js +2 -0
  146. package/dist/judges/reliability.js.map +1 -1
  147. package/dist/judges/scalability.d.ts.map +1 -1
  148. package/dist/judges/scalability.js +2 -0
  149. package/dist/judges/scalability.js.map +1 -1
  150. package/dist/judges/security.d.ts.map +1 -1
  151. package/dist/judges/security.js +2 -0
  152. package/dist/judges/security.js.map +1 -1
  153. package/dist/judges/software-practices.d.ts.map +1 -1
  154. package/dist/judges/software-practices.js +2 -0
  155. package/dist/judges/software-practices.js.map +1 -1
  156. package/dist/judges/testing.d.ts.map +1 -1
  157. package/dist/judges/testing.js +2 -0
  158. package/dist/judges/testing.js.map +1 -1
  159. package/dist/judges/ux.d.ts.map +1 -1
  160. package/dist/judges/ux.js +2 -0
  161. package/dist/judges/ux.js.map +1 -1
  162. package/dist/scoring.d.ts +5 -0
  163. package/dist/scoring.d.ts.map +1 -1
  164. package/dist/scoring.js +76 -0
  165. package/dist/scoring.js.map +1 -1
  166. package/dist/tools/prompts.js +1 -1
  167. package/dist/types.d.ts +20 -0
  168. package/dist/types.d.ts.map +1 -1
  169. package/package.json +3 -2
  170. package/server.json +3 -3
@@ -0,0 +1,3 @@
1
+ import type { Finding } from "../types.js";
2
+ export declare function analyzeOverEngineering(code: string, language: string): Finding[];
3
+ //# sourceMappingURL=over-engineering.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"over-engineering.d.ts","sourceRoot":"","sources":["../../src/evaluators/over-engineering.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAG3C,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,EAAE,CAuLhF"}
@@ -0,0 +1,161 @@
1
+ import { getLineNumbers } from "./shared.js";
2
+ export function analyzeOverEngineering(code, language) {
3
+ const findings = [];
4
+ let ruleNum = 1;
5
+ const prefix = "OVER";
6
+ const lines = code.split("\n");
7
+ const loc = lines.length;
8
+ // Skip test files — they legitimately use builders / helpers
9
+ const isTestFile = /\b(?:describe|it|test)\s*\(/i.test(code) || /\b(?:test|spec|__tests__)\b/i.test(language);
10
+ if (isTestFile)
11
+ return findings;
12
+ // ─── OVER-001: Single-implementation abstractions ──────────────────────────
13
+ // Detect abstract class / interface with only one implementation in the file
14
+ const abstractDecls = getLineNumbers(code, /(?:abstract\s+class|interface\s+)\w+/g);
15
+ const classDecls = getLineNumbers(code, /class\s+\w+\s+(?:extends|implements)\s+\w+/g);
16
+ // In a single file, if we see ≥ 3 abstract/interface declarations but few
17
+ // implementing classes, the abstractions are likely unnecessary.
18
+ if (abstractDecls.length >= 3 && classDecls.length <= abstractDecls.length) {
19
+ findings.push({
20
+ ruleId: `${prefix}-${String(ruleNum++).padStart(3, "0")}`,
21
+ severity: "medium",
22
+ title: "Multiple single-implementation abstractions",
23
+ description: `Found ${abstractDecls.length} abstract classes or interfaces with at most ${classDecls.length} implementing class(es) in the same file. Each abstraction adds cognitive overhead; prefer concrete implementations until a second consumer requires polymorphism.`,
24
+ lineNumbers: abstractDecls.slice(0, 5),
25
+ recommendation: "Remove abstractions that have only one implementation. Introduce interfaces when you have two or more consumers or when crossing module boundaries.",
26
+ reference: "YAGNI — You Aren't Gonna Need It",
27
+ suggestedFix: "Inline the interface into the concrete class. Extract an interface later when a second implementation is needed.",
28
+ confidence: 0.7,
29
+ });
30
+ }
31
+ // ─── OVER-002: Trivial wrappers around builtins ──────────────────────────
32
+ // Functions that simply delegate to a builtin with no added logic
33
+ const wrapperPatterns = /(?:function|const|export\s+(?:function|const))\s+\w*(?:wrapper|wrap|helper|util)\w*\s*(?:=\s*(?:\([^)]*\)\s*=>|function)|\()/gi;
34
+ const wrapperLines = getLineNumbers(code, wrapperPatterns);
35
+ // Also detect trivial fetch/fs/crypto wrappers (functions that return the builtin call directly)
36
+ const trivialDelegation = /(?:return\s+(?:fetch|fs\.\w+|crypto\.\w+|JSON\.(?:parse|stringify)|console\.\w+|Math\.\w+)\s*\()/g;
37
+ const trivialLines = getLineNumbers(code, trivialDelegation);
38
+ if (trivialLines.length >= 5) {
39
+ findings.push({
40
+ ruleId: `${prefix}-${String(ruleNum++).padStart(3, "0")}`,
41
+ severity: "high",
42
+ title: "Excessive trivial wrappers around standard APIs",
43
+ description: `Found ${trivialLines.length} functions that simply delegate to standard library calls (fetch, fs, JSON, crypto) with no added value (no retry, caching, logging, or error handling).`,
44
+ lineNumbers: trivialLines.slice(0, 5),
45
+ recommendation: "Call the standard API directly. Wrappers are justified only when they add cross-cutting concerns (retry, circuit-breaking, telemetry, caching).",
46
+ reference: "Rule of Three — refactoring guidance",
47
+ suggestedFix: "Remove the wrapper function and call the standard API at each call site.",
48
+ confidence: 0.7,
49
+ });
50
+ }
51
+ // ─── OVER-003: God interfaces (10+ methods) ──────────────────────────────
52
+ // Detect interfaces with many method signatures
53
+ const interfaceBlocks = code.matchAll(/(?:interface|abstract\s+class)\s+(\w+)[^{]*\{([^}]{200,})\}/gs);
54
+ const godInterfaces = [];
55
+ for (const m of interfaceBlocks) {
56
+ const body = m[2];
57
+ // Count method-like signatures: lines with parentheses (method signatures)
58
+ const methodCount = (body.match(/\w+\s*\([^)]*\)\s*[;:{]/g) || []).length;
59
+ if (methodCount >= 10) {
60
+ const idx = code.indexOf(m[0]);
61
+ const line = code.slice(0, idx).split("\n").length;
62
+ godInterfaces.push({ name: m[1], line, methodCount });
63
+ }
64
+ }
65
+ if (godInterfaces.length > 0) {
66
+ findings.push({
67
+ ruleId: `${prefix}-${String(ruleNum++).padStart(3, "0")}`,
68
+ severity: "medium",
69
+ title: "God interface detected",
70
+ description: `${godInterfaces.length} interface(s) with 10+ methods: ${godInterfaces
71
+ .map((g) => `${g.name} (${g.methodCount} methods)`)
72
+ .join(", ")}. Large interfaces violate the Interface Segregation Principle.`,
73
+ lineNumbers: godInterfaces.map((g) => g.line),
74
+ recommendation: "Split into smaller, focused interfaces that each serve a specific client. Consumers should not depend on methods they do not use.",
75
+ reference: "SOLID — Interface Segregation Principle (ISP)",
76
+ suggestedFix: "Extract related methods into separate interfaces (e.g., IReadable, IWritable).",
77
+ confidence: 0.75,
78
+ });
79
+ }
80
+ // ─── OVER-004: Builder/factory for simple objects ─────────────────────────
81
+ const builderPattern = /class\s+\w*Builder\w*\s*[{<]/g;
82
+ const factoryPattern = /class\s+\w*Factory\w*\s*[{<]/g;
83
+ const builderLines = getLineNumbers(code, builderPattern);
84
+ const factoryLines = getLineNumbers(code, factoryPattern);
85
+ // Check if the built object has few fields (≤ 3 setters in the builder)
86
+ if (builderLines.length > 0) {
87
+ const builderMatch = code.match(/class\s+\w*Builder\w*[^}]*\}/s);
88
+ if (builderMatch) {
89
+ const setterCount = (builderMatch[0].match(/\bset\w+\s*\(|with\w+\s*\(/g) || []).length;
90
+ if (setterCount <= 3) {
91
+ findings.push({
92
+ ruleId: `${prefix}-${String(ruleNum++).padStart(3, "0")}`,
93
+ severity: "low",
94
+ title: "Builder pattern for simple object",
95
+ description: `Builder class has only ${setterCount} setter(s). For objects with ≤ 3 fields, a constructor or object literal is simpler and more readable.`,
96
+ lineNumbers: builderLines,
97
+ recommendation: "Use a constructor, factory function, or object literal. Reserve the Builder pattern for objects with many optional fields (≥ 5).",
98
+ reference: "Effective Java, Item 2 — Consider a builder when faced with many constructor parameters",
99
+ suggestedFix: "Replace the Builder with a plain constructor: `new Foo({ field1, field2, field3 })`.",
100
+ confidence: 0.7,
101
+ });
102
+ }
103
+ }
104
+ }
105
+ // ─── OVER-005: Enterprise patterns in small code ──────────────────────────
106
+ if (loc < 500) {
107
+ const enterprisePatterns = [
108
+ {
109
+ pattern: /(?:@Injectable|@Inject|Container\.get|container\.resolve|ServiceLocator|Injector)/g,
110
+ name: "dependency injection container",
111
+ },
112
+ {
113
+ pattern: /(?:EventBus|EventEmitter|MessageBroker|PubSub|EventDispatcher)(?:\s*[({<])/g,
114
+ name: "event bus / message broker",
115
+ },
116
+ {
117
+ pattern: /(?:AbstractFactory|FactoryMethod|ServiceRegistry|PluginManager)(?:\s*[({<])/g,
118
+ name: "abstract factory / registry",
119
+ },
120
+ ];
121
+ const found = [];
122
+ for (const ep of enterprisePatterns) {
123
+ const epLines = getLineNumbers(code, ep.pattern);
124
+ if (epLines.length > 0) {
125
+ found.push({ name: ep.name, lines: epLines });
126
+ }
127
+ }
128
+ if (found.length >= 2) {
129
+ findings.push({
130
+ ruleId: `${prefix}-${String(ruleNum++).padStart(3, "0")}`,
131
+ severity: "medium",
132
+ title: "Enterprise patterns in small codebase",
133
+ description: `File has only ${loc} lines but uses ${found.length} enterprise-grade patterns: ${found
134
+ .map((f) => f.name)
135
+ .join(", ")}. This adds complexity disproportionate to the code's scope.`,
136
+ lineNumbers: found.flatMap((f) => f.lines).slice(0, 5),
137
+ recommendation: "For small services (< 500 LOC), prefer direct function calls, simple module imports, and constructor parameters. Introduce DI containers and event buses only when the codebase grows to warrant them.",
138
+ reference: "KISS Principle / Simple Design",
139
+ suggestedFix: "Replace the container with direct constructor injection or module-level imports.",
140
+ confidence: 0.65,
141
+ });
142
+ }
143
+ }
144
+ // ─── OVER-006: Excessive generic type parameters ──────────────────────────
145
+ const genericHeavy = getLineNumbers(code, /<\w+(?:\s+extends\s+\w+)?,\s*\w+(?:\s+extends\s+\w+)?,\s*\w+(?:\s+extends\s+\w+)?(?:,\s*\w+(?:\s+extends\s+\w+)?)*>/g);
146
+ if (genericHeavy.length >= 3) {
147
+ findings.push({
148
+ ruleId: `${prefix}-${String(ruleNum++).padStart(3, "0")}`,
149
+ severity: "medium",
150
+ title: "Excessive generic type parameters",
151
+ description: `Found ${genericHeavy.length} declaration(s) with 3+ generic type parameters. Deeply parameterised types are hard to read and often indicate over-generalisation.`,
152
+ lineNumbers: genericHeavy.slice(0, 5),
153
+ recommendation: "Reduce generic parameters by using concrete types where only one instantiation exists. Extract type aliases for complex generic combinations.",
154
+ reference: "TypeScript Handbook — Generics / Clean Code",
155
+ suggestedFix: "Replace unused generic parameters with concrete types.",
156
+ confidence: 0.6,
157
+ });
158
+ }
159
+ return findings;
160
+ }
161
+ //# sourceMappingURL=over-engineering.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"over-engineering.js","sourceRoot":"","sources":["../../src/evaluators/over-engineering.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C,MAAM,UAAU,sBAAsB,CAAC,IAAY,EAAE,QAAgB;IACnE,MAAM,QAAQ,GAAc,EAAE,CAAC;IAC/B,IAAI,OAAO,GAAG,CAAC,CAAC;IAChB,MAAM,MAAM,GAAG,MAAM,CAAC;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YACxD,YAAY,EAAE,wDAAwD;YACtE,UAAU,EAAE,GAAG;SAChB,CAAC,CAAC;IACL,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * PDF-Ready Report Formatter — Print-optimized HTML output.
3
+ *
4
+ * Generates a single-file HTML report optimized for "Print → Save as PDF":
5
+ * - Clean print layout with page breaks
6
+ * - No interactive elements (no JavaScript)
7
+ * - Fixed-width tables for consistent rendering
8
+ * - @media print styles for proper pagination
9
+ * - Executive summary on first page
10
+ */
11
+ import type { TribunalVerdict } from "../types.js";
12
+ export declare function verdictToPdfHtml(verdict: TribunalVerdict, filePath?: string): string;
13
+ //# sourceMappingURL=pdf.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pdf.d.ts","sourceRoot":"","sources":["../../src/formatters/pdf.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAW,MAAM,aAAa,CAAC;AA4C5D,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,eAAe,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CA0FpF"}
@@ -0,0 +1,138 @@
1
+ /**
2
+ * PDF-Ready Report Formatter — Print-optimized HTML output.
3
+ *
4
+ * Generates a single-file HTML report optimized for "Print → Save as PDF":
5
+ * - Clean print layout with page breaks
6
+ * - No interactive elements (no JavaScript)
7
+ * - Fixed-width tables for consistent rendering
8
+ * - @media print styles for proper pagination
9
+ * - Executive summary on first page
10
+ */
11
+ function esc(text) {
12
+ return text
13
+ .replace(/&/g, "&amp;")
14
+ .replace(/</g, "&lt;")
15
+ .replace(/>/g, "&gt;")
16
+ .replace(/"/g, "&quot;")
17
+ .replace(/'/g, "&#39;");
18
+ }
19
+ function severityColor(severity) {
20
+ switch (severity) {
21
+ case "critical":
22
+ return "#dc2626";
23
+ case "high":
24
+ return "#ea580c";
25
+ case "medium":
26
+ return "#ca8a04";
27
+ case "low":
28
+ return "#2563eb";
29
+ case "info":
30
+ return "#6b7280";
31
+ default:
32
+ return "#6b7280";
33
+ }
34
+ }
35
+ function renderFinding(f) {
36
+ const color = severityColor(f.severity);
37
+ return `<tr>
38
+ <td><span style="color:${color};font-weight:600">${esc(f.severity.toUpperCase())}</span></td>
39
+ <td><code>${esc(f.ruleId)}</code></td>
40
+ <td>${esc(f.title)}</td>
41
+ <td>${f.lineNumbers?.join(", ") ?? "—"}</td>
42
+ <td>${esc(f.confidenceTier ?? "—")}</td>
43
+ </tr>
44
+ <tr class="detail-row">
45
+ <td colspan="5">
46
+ <div class="detail">${esc(f.description)}${f.recommendation ? `<br><strong>Recommendation:</strong> ${esc(f.recommendation)}` : ""}</div>
47
+ </td>
48
+ </tr>`;
49
+ }
50
+ export function verdictToPdfHtml(verdict, filePath) {
51
+ const totalFindings = verdict.evaluations.reduce((s, e) => s + e.findings.length, 0);
52
+ const allFindings = verdict.evaluations.flatMap((e) => e.findings);
53
+ const severityCounts = {
54
+ critical: allFindings.filter((f) => f.severity === "critical").length,
55
+ high: allFindings.filter((f) => f.severity === "high").length,
56
+ medium: allFindings.filter((f) => f.severity === "medium").length,
57
+ low: allFindings.filter((f) => f.severity === "low").length,
58
+ info: allFindings.filter((f) => f.severity === "info").length,
59
+ };
60
+ const timestamp = new Date(verdict.timestamp).toLocaleString();
61
+ const fileLabel = filePath ? esc(filePath) : "stdin";
62
+ return `<!DOCTYPE html>
63
+ <html lang="en">
64
+ <head>
65
+ <meta charset="utf-8">
66
+ <title>Judges Panel Report — ${fileLabel}</title>
67
+ <style>
68
+ * { box-sizing: border-box; margin: 0; padding: 0; }
69
+ body { font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; color: #1a1a1a; line-height: 1.5; padding: 2rem; max-width: 210mm; margin: 0 auto; font-size: 10pt; }
70
+ h1 { font-size: 18pt; margin-bottom: 2pt; }
71
+ h2 { font-size: 13pt; margin: 1.5rem 0 0.5rem; border-bottom: 2px solid #e5e7eb; padding-bottom: 4pt; page-break-after: avoid; }
72
+ .meta { color: #6b7280; font-size: 9pt; margin-bottom: 1rem; }
73
+ .summary-table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; }
74
+ .summary-table td { padding: 8pt 12pt; text-align: center; border: 1px solid #e5e7eb; }
75
+ .summary-table .value { font-size: 18pt; font-weight: 700; display: block; }
76
+ .summary-table .label { font-size: 7pt; color: #6b7280; text-transform: uppercase; letter-spacing: 0.05em; }
77
+ table.findings { width: 100%; border-collapse: collapse; font-size: 9pt; margin-bottom: 1rem; }
78
+ table.findings th { background: #f3f4f6; border: 1px solid #d1d5db; padding: 4pt 6pt; text-align: left; font-size: 8pt; text-transform: uppercase; letter-spacing: 0.04em; }
79
+ table.findings td { border: 1px solid #e5e7eb; padding: 4pt 6pt; vertical-align: top; }
80
+ table.findings code { font-size: 8pt; background: #f3f4f6; padding: 1pt 3pt; border-radius: 2pt; }
81
+ .detail-row td { background: #fafbfc; }
82
+ .detail { font-size: 8.5pt; color: #374151; }
83
+ .judge-header { background: #f9fafb; padding: 6pt; border: 1px solid #e5e7eb; margin-bottom: -1px; }
84
+ .judge-header .name { font-weight: 600; }
85
+ .judge-header .score { float: right; font-weight: 700; }
86
+ footer { margin-top: 2rem; text-align: center; color: #9ca3af; font-size: 7pt; border-top: 1px solid #e5e7eb; padding-top: 8pt; }
87
+
88
+ @media print {
89
+ body { padding: 0; max-width: none; }
90
+ h2 { page-break-after: avoid; }
91
+ table.findings { page-break-inside: auto; }
92
+ table.findings tr { page-break-inside: avoid; }
93
+ .detail-row { page-break-inside: avoid; }
94
+ .judge-section { page-break-inside: avoid; }
95
+ footer { page-break-before: avoid; }
96
+ @page { margin: 15mm 12mm; size: A4; }
97
+ }
98
+ </style>
99
+ </head>
100
+ <body>
101
+ <h1>Judges Panel Report</h1>
102
+ <p class="meta">File: ${fileLabel} &middot; Generated: ${timestamp}</p>
103
+
104
+ <table class="summary-table">
105
+ <tr>
106
+ <td><span class="value" style="color:${verdict.overallVerdict === "pass" ? "#16a34a" : verdict.overallVerdict === "warning" ? "#ca8a04" : "#dc2626"}">${verdict.overallVerdict.toUpperCase()}</span><span class="label">Verdict</span></td>
107
+ <td><span class="value">${verdict.overallScore}</span><span class="label">Score / 100</span></td>
108
+ <td><span class="value">${totalFindings}</span><span class="label">Total Findings</span></td>
109
+ <td><span class="value">${verdict.evaluations.length}</span><span class="label">Judges</span></td>
110
+ </tr>
111
+ <tr>
112
+ <td><span class="value" style="color:${severityColor("critical")}">${severityCounts.critical}</span><span class="label">Critical</span></td>
113
+ <td><span class="value" style="color:${severityColor("high")}">${severityCounts.high}</span><span class="label">High</span></td>
114
+ <td><span class="value" style="color:${severityColor("medium")}">${severityCounts.medium}</span><span class="label">Medium</span></td>
115
+ <td><span class="value" style="color:${severityColor("low")}">${severityCounts.low}</span><span class="label">Low</span></td>
116
+ </tr>
117
+ </table>
118
+
119
+ ${verdict.evaluations
120
+ .filter((e) => e.findings.length > 0)
121
+ .map((e) => `<h2>${esc(e.judgeName)}</h2>
122
+ <div class="judge-header">
123
+ <span class="name">${esc(e.judgeId)}</span>
124
+ <span class="score">Score: ${e.score}/100 — ${e.verdict.toUpperCase()}</span>
125
+ </div>
126
+ <table class="findings">
127
+ <thead><tr><th style="width:70px">Severity</th><th style="width:100px">Rule</th><th>Title</th><th style="width:40px">Line</th><th style="width:70px">Confidence</th></tr></thead>
128
+ <tbody>${e.findings.map(renderFinding).join("\n")}</tbody>
129
+ </table>`)
130
+ .join("\n")}
131
+
132
+ ${totalFindings === 0 ? '<p style="color:#16a34a;text-align:center;margin:2rem 0;font-size:12pt">✓ No findings — all judges passed.</p>' : ""}
133
+
134
+ <footer>Generated by Judges Panel &middot; Open in browser and use File → Print → Save as PDF</footer>
135
+ </body>
136
+ </html>`;
137
+ }
138
+ //# sourceMappingURL=pdf.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pdf.js","sourceRoot":"","sources":["../../src/formatters/pdf.ts"],"names":[],"mappings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Aa,CAAC;AAEnD,eAAO,MAAM,kBAAkB,EAAE,eAiChC,CAAC"}
1
+ {"version":3,"file":"accessibility.d.ts","sourceRoot":"","sources":["../../src/judges/accessibility.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,eAAO,MAAM,kBAAkB,EAAE,eAmChC,CAAC"}
@@ -4,6 +4,8 @@ export const accessibilityJudge = {
4
4
  domain: "Accessibility (a11y)",
5
5
  description: "Evaluates code for WCAG compliance, ARIA attributes, keyboard navigation, screen reader support, color contrast, semantic HTML, and inclusive design patterns.",
6
6
  rulePrefix: "A11Y",
7
+ tableDescription: "WCAG compliance, screen reader support, keyboard navigation, ARIA",
8
+ promptDescription: "Deep accessibility/WCAG review",
7
9
  systemPrompt: `You are Judge Accessibility — a certified accessibility specialist (IAAP CPWA) with 15+ years building inclusive digital experiences, deep expertise in WCAG 2.2, WAI-ARIA, and assistive technology compatibility.
8
10
 
9
11
  YOUR EVALUATION CRITERIA:
@@ -1 +1 @@
1
- {"version":3,"file":"accessibility.js","sourceRoot":"","sources":["../../src/judges/accessibility.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,kBAAkB,GAAoB;IACjD,EAAE,EAAE,eAAe;IACnB,IAAI,EAAE,qBAAqB;IAC3B,MAAM,EAAE,sBAAsB;IAC9B,WAAW,EACT,gKAAgK;IAClK,UAAU,EAAE,MAAM;IAClB,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;8HAyB8G;CAC7H,CAAC"}
1
+ {"version":3,"file":"accessibility.js","sourceRoot":"","sources":["../../src/judges/accessibility.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,kBAAkB,GAAoB;IACjD,EAAE,EAAE,eAAe;IACnB,IAAI,EAAE,qBAAqB;IAC3B,MAAM,EAAE,sBAAsB;IAC9B,WAAW,EACT,gKAAgK;IAClK,UAAU,EAAE,MAAM;IAClB,gBAAgB,EAAE,mEAAmE;IACrF,iBAAiB,EAAE,gCAAgC;IACnD,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;8HAyB8G;CAC7H,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"agent-instructions.d.ts","sourceRoot":"","sources":["../../src/judges/agent-instructions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,eAAO,MAAM,sBAAsB,EAAE,eAiCpC,CAAC"}
1
+ {"version":3,"file":"agent-instructions.d.ts","sourceRoot":"","sources":["../../src/judges/agent-instructions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,eAAO,MAAM,sBAAsB,EAAE,eAmCpC,CAAC"}
@@ -4,6 +4,8 @@ export const agentInstructionsJudge = {
4
4
  domain: "Agent Instruction Markdown Quality & Safety",
5
5
  description: "Evaluates instruction markdown files for clarity, hierarchy, conflict risk, safety policy coverage, and operational guidance for AI coding agents.",
6
6
  rulePrefix: "AGENT",
7
+ tableDescription: "Instruction hierarchy, conflict detection, unsafe overrides, scope, validation, policy guidance",
8
+ promptDescription: "Deep review of agent instruction markdown quality and safety",
7
9
  systemPrompt: `You are Judge Agent Instructions — a specialist in AI agent governance, instruction hierarchy design, prompt safety, and operational reliability for coding assistants.
8
10
 
9
11
  YOUR EVALUATION CRITERIA:
@@ -1 +1 @@
1
- {"version":3,"file":"agent-instructions.js","sourceRoot":"","sources":["../../src/judges/agent-instructions.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,sBAAsB,GAAoB;IACrD,EAAE,EAAE,oBAAoB;IACxB,IAAI,EAAE,0BAA0B;IAChC,MAAM,EAAE,6CAA6C;IACrD,WAAW,EACT,oJAAoJ;IACtJ,UAAU,EAAE,OAAO;IACnB,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;gGAyBgF;CAC/F,CAAC"}
1
+ {"version":3,"file":"agent-instructions.js","sourceRoot":"","sources":["../../src/judges/agent-instructions.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,sBAAsB,GAAoB;IACrD,EAAE,EAAE,oBAAoB;IACxB,IAAI,EAAE,0BAA0B;IAChC,MAAM,EAAE,6CAA6C;IACrD,WAAW,EACT,oJAAoJ;IACtJ,UAAU,EAAE,OAAO;IACnB,gBAAgB,EAAE,iGAAiG;IACnH,iBAAiB,EAAE,8DAA8D;IACjF,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;gGAyBgF;CAC/F,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ai-code-safety.d.ts","sourceRoot":"","sources":["../../src/judges/ai-code-safety.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,eAAO,MAAM,iBAAiB,EAAE,eA4C/B,CAAC"}
1
+ {"version":3,"file":"ai-code-safety.d.ts","sourceRoot":"","sources":["../../src/judges/ai-code-safety.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,eAAO,MAAM,iBAAiB,EAAE,eAgD/B,CAAC"}
@@ -4,6 +4,8 @@ export const aiCodeSafetyJudge = {
4
4
  domain: "AI-Generated Code Quality & Security",
5
5
  description: "Evaluates code for risks specifically common in AI-generated code — prompt injection, unsanitised LLM output, hallucinated patterns, debug-mode defaults, missing input validation, overly broad permissions, and insecure-by-default configurations.",
6
6
  rulePrefix: "AICS",
7
+ tableDescription: "Prompt injection, insecure LLM output handling, debug defaults, missing validation, unsafe deserialization of AI responses",
8
+ promptDescription: "Deep review of AI-generated code risks: prompt injection, insecure LLM output handling, debug defaults, missing validation",
7
9
  systemPrompt: `You are Judge AI Code Safety — a specialist in identifying security, quality, and reliability issues that are disproportionately common in AI-generated code produced by large language models and coding assistants.
8
10
 
9
11
  YOUR EVALUATION CRITERIA:
@@ -1 +1 @@
1
- {"version":3,"file":"ai-code-safety.js","sourceRoot":"","sources":["../../src/judges/ai-code-safety.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,iBAAiB,GAAoB;IAChD,EAAE,EAAE,gBAAgB;IACpB,IAAI,EAAE,sBAAsB;IAC5B,MAAM,EAAE,sCAAsC;IAC9C,WAAW,EACT,uPAAuP;IACzP,UAAU,EAAE,MAAM;IAClB,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wHAoCwG;CACvH,CAAC"}
1
+ {"version":3,"file":"ai-code-safety.js","sourceRoot":"","sources":["../../src/judges/ai-code-safety.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,iBAAiB,GAAoB;IAChD,EAAE,EAAE,gBAAgB;IACpB,IAAI,EAAE,sBAAsB;IAC5B,MAAM,EAAE,sCAAsC;IAC9C,WAAW,EACT,uPAAuP;IACzP,UAAU,EAAE,MAAM;IAClB,gBAAgB,EACd,4HAA4H;IAC9H,iBAAiB,EACf,4HAA4H;IAC9H,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wHAoCwG;CACvH,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"api-contract.d.ts","sourceRoot":"","sources":["../../src/judges/api-contract.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,eAAO,MAAM,gBAAgB,EAAE,eA2B9B,CAAC"}
1
+ {"version":3,"file":"api-contract.d.ts","sourceRoot":"","sources":["../../src/judges/api-contract.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,eAAO,MAAM,gBAAgB,EAAE,eA6B9B,CAAC"}
@@ -1,10 +1,12 @@
1
1
  export const apiContractJudge = {
2
2
  id: "api-contract",
3
- name: "API Contract Conformance",
3
+ name: "Judge API Contract Conformance",
4
4
  description: "Evaluates API endpoint implementations for contract conformance: input validation, " +
5
5
  "proper status codes, error handling, rate limiting, versioning, and content-type management.",
6
6
  domain: "API Design & REST Best Practices",
7
7
  rulePrefix: "API",
8
+ tableDescription: "API endpoint input validation, REST conformance, request/response contract consistency",
9
+ promptDescription: "Deep review of API contract conformance, input validation, REST best practices",
8
10
  systemPrompt: `You are Judge API Contract Conformance — an expert in REST API design, HTTP semantics, and contract-first development.
9
11
 
10
12
  YOUR EVALUATION CRITERIA:
@@ -1 +1 @@
1
- {"version":3,"file":"api-contract.js","sourceRoot":"","sources":["../../src/judges/api-contract.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,gBAAgB,GAAoB;IAC/C,EAAE,EAAE,cAAc;IAClB,IAAI,EAAE,0BAA0B;IAChC,WAAW,EACT,qFAAqF;QACrF,8FAA8F;IAChG,MAAM,EAAE,kCAAkC;IAC1C,UAAU,EAAE,KAAK;IACjB,YAAY,EAAE;;;;;;;;;;;;;;;;;;sFAkBsE;CACrF,CAAC"}
1
+ {"version":3,"file":"api-contract.js","sourceRoot":"","sources":["../../src/judges/api-contract.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,gBAAgB,GAAoB;IAC/C,EAAE,EAAE,cAAc;IAClB,IAAI,EAAE,gCAAgC;IACtC,WAAW,EACT,qFAAqF;QACrF,8FAA8F;IAChG,MAAM,EAAE,kCAAkC;IAC1C,UAAU,EAAE,KAAK;IACjB,gBAAgB,EAAE,wFAAwF;IAC1G,iBAAiB,EAAE,gFAAgF;IACnG,YAAY,EAAE;;;;;;;;;;;;;;;;;;sFAkBsE;CACrF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"api-design.d.ts","sourceRoot":"","sources":["../../src/judges/api-design.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,eAAO,MAAM,cAAc,EAAE,eAmC5B,CAAC"}
1
+ {"version":3,"file":"api-design.d.ts","sourceRoot":"","sources":["../../src/judges/api-design.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,eAAO,MAAM,cAAc,EAAE,eAqC5B,CAAC"}
@@ -4,6 +4,8 @@ export const apiDesignJudge = {
4
4
  domain: "API Design & Contracts",
5
5
  description: "Evaluates API design for RESTful conventions, naming consistency, proper HTTP status codes, versioning, pagination, error contract consistency, and backward compatibility.",
6
6
  rulePrefix: "API",
7
+ tableDescription: "REST conventions, versioning, pagination, error responses",
8
+ promptDescription: "Deep API design review",
7
9
  systemPrompt: `You are Judge API Design — a senior API architect who has designed and governed public APIs used by millions of developers, with deep expertise in REST, GraphQL, gRPC, and API governance.
8
10
 
9
11
  YOUR EVALUATION CRITERIA:
@@ -1 +1 @@
1
- {"version":3,"file":"api-design.js","sourceRoot":"","sources":["../../src/judges/api-design.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,cAAc,GAAoB;IAC7C,EAAE,EAAE,YAAY;IAChB,IAAI,EAAE,kBAAkB;IACxB,MAAM,EAAE,wBAAwB;IAChC,WAAW,EACT,6KAA6K;IAC/K,UAAU,EAAE,KAAK;IACjB,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;gIA2BgH;CAC/H,CAAC"}
1
+ {"version":3,"file":"api-design.js","sourceRoot":"","sources":["../../src/judges/api-design.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,cAAc,GAAoB;IAC7C,EAAE,EAAE,YAAY;IAChB,IAAI,EAAE,kBAAkB;IACxB,MAAM,EAAE,wBAAwB;IAChC,WAAW,EACT,6KAA6K;IAC/K,UAAU,EAAE,KAAK;IACjB,gBAAgB,EAAE,2DAA2D;IAC7E,iBAAiB,EAAE,wBAAwB;IAC3C,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;gIA2BgH;CAC/H,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"authentication.d.ts","sourceRoot":"","sources":["../../src/judges/authentication.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,eAAO,MAAM,mBAAmB,EAAE,eAiCjC,CAAC"}
1
+ {"version":3,"file":"authentication.d.ts","sourceRoot":"","sources":["../../src/judges/authentication.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,eAAO,MAAM,mBAAmB,EAAE,eAmCjC,CAAC"}
@@ -4,6 +4,8 @@ export const authenticationJudge = {
4
4
  domain: "Authentication & Authorization",
5
5
  description: "Evaluates code for proper authentication mechanisms, authorization checks, session management, token handling, and access control patterns.",
6
6
  rulePrefix: "AUTH",
7
+ tableDescription: "Hardcoded creds, missing auth middleware, token in query params",
8
+ promptDescription: "Deep authentication & authorization review",
7
9
  systemPrompt: `You are Judge Authentication — an identity and access management specialist with deep expertise in OAuth 2.0, OIDC, RBAC, ABAC, and secure session management. You have conducted hundreds of security audits focused specifically on auth systems.
8
10
 
9
11
  YOUR EVALUATION CRITERIA:
@@ -1 +1 @@
1
- {"version":3,"file":"authentication.js","sourceRoot":"","sources":["../../src/judges/authentication.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,mBAAmB,GAAoB;IAClD,EAAE,EAAE,gBAAgB;IACpB,IAAI,EAAE,sBAAsB;IAC5B,MAAM,EAAE,gCAAgC;IACxC,WAAW,EACT,6IAA6I;IAC/I,UAAU,EAAE,MAAM;IAClB,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;sHAyBsG;CACrH,CAAC"}
1
+ {"version":3,"file":"authentication.js","sourceRoot":"","sources":["../../src/judges/authentication.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,mBAAmB,GAAoB;IAClD,EAAE,EAAE,gBAAgB;IACpB,IAAI,EAAE,sBAAsB;IAC5B,MAAM,EAAE,gCAAgC;IACxC,WAAW,EACT,6IAA6I;IAC/I,UAAU,EAAE,MAAM;IAClB,gBAAgB,EAAE,iEAAiE;IACnF,iBAAiB,EAAE,4CAA4C;IAC/D,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;sHAyBsG;CACrH,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"backwards-compatibility.d.ts","sourceRoot":"","sources":["../../src/judges/backwards-compatibility.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,eAAO,MAAM,2BAA2B,EAAE,eAiCzC,CAAC"}
1
+ {"version":3,"file":"backwards-compatibility.d.ts","sourceRoot":"","sources":["../../src/judges/backwards-compatibility.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,eAAO,MAAM,2BAA2B,EAAE,eAmCzC,CAAC"}
@@ -4,6 +4,8 @@ export const backwardsCompatibilityJudge = {
4
4
  domain: "Backwards Compatibility & Versioning",
5
5
  description: "Evaluates code for breaking changes, API versioning strategy, deprecation practices, and migration path planning that affect consumers and integrators.",
6
6
  rulePrefix: "COMPAT",
7
+ tableDescription: "API versioning, breaking changes, response consistency",
8
+ promptDescription: "Deep backwards compatibility review",
7
9
  systemPrompt: `You are Judge Backwards Compatibility — a platform API architect who has managed public APIs consumed by thousands of integrators. You have deep expertise in semantic versioning, API evolution, deprecation, and migration strategies.
8
10
 
9
11
  YOUR EVALUATION CRITERIA:
@@ -1 +1 @@
1
- {"version":3,"file":"backwards-compatibility.js","sourceRoot":"","sources":["../../src/judges/backwards-compatibility.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,2BAA2B,GAAoB;IAC1D,EAAE,EAAE,yBAAyB;IAC7B,IAAI,EAAE,+BAA+B;IACrC,MAAM,EAAE,sCAAsC;IAC9C,WAAW,EACT,yJAAyJ;IAC3J,UAAU,EAAE,QAAQ;IACpB,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;mIAyBmH;CAClI,CAAC"}
1
+ {"version":3,"file":"backwards-compatibility.js","sourceRoot":"","sources":["../../src/judges/backwards-compatibility.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,2BAA2B,GAAoB;IAC1D,EAAE,EAAE,yBAAyB;IAC7B,IAAI,EAAE,+BAA+B;IACrC,MAAM,EAAE,sCAAsC;IAC9C,WAAW,EACT,yJAAyJ;IAC3J,UAAU,EAAE,QAAQ;IACpB,gBAAgB,EAAE,wDAAwD;IAC1E,iBAAiB,EAAE,qCAAqC;IACxD,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;mIAyBmH;CAClI,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"caching.d.ts","sourceRoot":"","sources":["../../src/judges/caching.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,eAAO,MAAM,YAAY,EAAE,eAiC1B,CAAC"}
1
+ {"version":3,"file":"caching.d.ts","sourceRoot":"","sources":["../../src/judges/caching.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,eAAO,MAAM,YAAY,EAAE,eAmC1B,CAAC"}
@@ -4,6 +4,8 @@ export const cachingJudge = {
4
4
  domain: "Caching Strategy & Data Freshness",
5
5
  description: "Evaluates code for caching strategy, cache invalidation, TTL configuration, cache stampede prevention, and HTTP caching headers.",
6
6
  rulePrefix: "CACHE",
7
+ tableDescription: "Unbounded caches, missing TTL, no HTTP cache headers",
8
+ promptDescription: "Deep caching strategy review",
7
9
  systemPrompt: `You are Judge Caching — a performance architect specializing in caching strategies across application layers, CDNs, and distributed systems. You understand that "there are only two hard things in computer science: cache invalidation and naming things."
8
10
 
9
11
  YOUR EVALUATION CRITERIA:
@@ -1 +1 @@
1
- {"version":3,"file":"caching.js","sourceRoot":"","sources":["../../src/judges/caching.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,YAAY,GAAoB;IAC3C,EAAE,EAAE,SAAS;IACb,IAAI,EAAE,eAAe;IACrB,MAAM,EAAE,mCAAmC;IAC3C,WAAW,EACT,kIAAkI;IACpI,UAAU,EAAE,OAAO;IACnB,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;0HAyB0G;CACzH,CAAC"}
1
+ {"version":3,"file":"caching.js","sourceRoot":"","sources":["../../src/judges/caching.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,YAAY,GAAoB;IAC3C,EAAE,EAAE,SAAS;IACb,IAAI,EAAE,eAAe;IACrB,MAAM,EAAE,mCAAmC;IAC3C,WAAW,EACT,kIAAkI;IACpI,UAAU,EAAE,OAAO;IACnB,gBAAgB,EAAE,sDAAsD;IACxE,iBAAiB,EAAE,8BAA8B;IACjD,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;0HAyB0G;CACzH,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ci-cd.d.ts","sourceRoot":"","sources":["../../src/judges/ci-cd.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,eAAO,MAAM,SAAS,EAAE,eAiCvB,CAAC"}
1
+ {"version":3,"file":"ci-cd.d.ts","sourceRoot":"","sources":["../../src/judges/ci-cd.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,eAAO,MAAM,SAAS,EAAE,eAmCvB,CAAC"}
@@ -4,6 +4,8 @@ export const ciCdJudge = {
4
4
  domain: "CI/CD Pipeline & Deployment Safety",
5
5
  description: "Evaluates code for CI/CD readiness, build reproducibility, deployment safety, pipeline configuration, and release management practices.",
6
6
  rulePrefix: "CICD",
7
+ tableDescription: "Test infrastructure, lint config, Docker tags, build scripts",
8
+ promptDescription: "Deep CI/CD pipeline review",
7
9
  systemPrompt: `You are Judge CI/CD — a DevOps engineer and release manager who has built and maintained CI/CD pipelines for organizations shipping hundreds of deployments per day. You specialize in build reproducibility, deployment safety, and release automation.
8
10
 
9
11
  YOUR EVALUATION CRITERIA:
@@ -1 +1 @@
1
- {"version":3,"file":"ci-cd.js","sourceRoot":"","sources":["../../src/judges/ci-cd.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,SAAS,GAAoB;IACxC,EAAE,EAAE,OAAO;IACX,IAAI,EAAE,aAAa;IACnB,MAAM,EAAE,oCAAoC;IAC5C,WAAW,EACT,yIAAyI;IAC3I,UAAU,EAAE,MAAM;IAClB,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;sHAyBsG;CACrH,CAAC"}
1
+ {"version":3,"file":"ci-cd.js","sourceRoot":"","sources":["../../src/judges/ci-cd.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,SAAS,GAAoB;IACxC,EAAE,EAAE,OAAO;IACX,IAAI,EAAE,aAAa;IACnB,MAAM,EAAE,oCAAoC;IAC5C,WAAW,EACT,yIAAyI;IAC3I,UAAU,EAAE,MAAM;IAClB,gBAAgB,EAAE,8DAA8D;IAChF,iBAAiB,EAAE,4BAA4B;IAC/C,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;sHAyBsG;CACrH,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"cloud-readiness.d.ts","sourceRoot":"","sources":["../../src/judges/cloud-readiness.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,eAAO,MAAM,mBAAmB,EAAE,eAiCjC,CAAC"}
1
+ {"version":3,"file":"cloud-readiness.d.ts","sourceRoot":"","sources":["../../src/judges/cloud-readiness.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,eAAO,MAAM,mBAAmB,EAAE,eAmCjC,CAAC"}
@@ -4,6 +4,8 @@ export const cloudReadinessJudge = {
4
4
  domain: "Cloud-Native Architecture & DevOps",
5
5
  description: "Evaluates code for cloud-native patterns, 12-factor app compliance, containerization readiness, infrastructure as code, observability, and CI/CD maturity.",
6
6
  rulePrefix: "CLOUD",
7
+ tableDescription: "12-Factor compliance, containerization, graceful shutdown, IaC",
8
+ promptDescription: "Deep cloud readiness review",
7
9
  systemPrompt: `You are Judge Cloud Readiness — a cloud-native architect and DevOps practitioner certified across AWS, Azure, and GCP with deep expertise in platform engineering and SRE.
8
10
 
9
11
  YOUR EVALUATION CRITERIA:
@@ -1 +1 @@
1
- {"version":3,"file":"cloud-readiness.js","sourceRoot":"","sources":["../../src/judges/cloud-readiness.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,mBAAmB,GAAoB;IAClD,EAAE,EAAE,iBAAiB;IACrB,IAAI,EAAE,uBAAuB;IAC7B,MAAM,EAAE,oCAAoC;IAC5C,WAAW,EACT,4JAA4J;IAC9J,UAAU,EAAE,OAAO;IACnB,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;gIAyBgH;CAC/H,CAAC"}
1
+ {"version":3,"file":"cloud-readiness.js","sourceRoot":"","sources":["../../src/judges/cloud-readiness.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,mBAAmB,GAAoB;IAClD,EAAE,EAAE,iBAAiB;IACrB,IAAI,EAAE,uBAAuB;IAC7B,MAAM,EAAE,oCAAoC;IAC5C,WAAW,EACT,4JAA4J;IAC9J,UAAU,EAAE,OAAO;IACnB,gBAAgB,EAAE,gEAAgE;IAClF,iBAAiB,EAAE,6BAA6B;IAChD,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;gIAyBgH;CAC/H,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"code-structure.d.ts","sourceRoot":"","sources":["../../src/judges/code-structure.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,eAAO,MAAM,kBAAkB,EAAE,eA4ChC,CAAC"}
1
+ {"version":3,"file":"code-structure.d.ts","sourceRoot":"","sources":["../../src/judges/code-structure.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,eAAO,MAAM,kBAAkB,EAAE,eA8ChC,CAAC"}
@@ -4,6 +4,8 @@ export const codeStructureJudge = {
4
4
  domain: "Structural Analysis",
5
5
  description: "Uses AST parsing (TypeScript compiler for JS/TS, scope-tracking parser for Python/Rust/Go/Java/C#) to evaluate cyclomatic complexity, nesting depth, function length, parameter count, dead code, and type-safety — metrics that regex alone cannot reliably measure.",
6
6
  rulePrefix: "STRUCT",
7
+ tableDescription: "Cyclomatic complexity, nesting depth, function length, dead code, type safety",
8
+ promptDescription: "Deep AST-based structural analysis review",
7
9
  systemPrompt: `You are the Code Structure Judge. You use Abstract Syntax Tree (AST) analysis
8
10
  to evaluate code structure with precision that regex patterns cannot achieve.
9
11
 
@@ -1 +1 @@
1
- {"version":3,"file":"code-structure.js","sourceRoot":"","sources":["../../src/judges/code-structure.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,kBAAkB,GAAoB;IACjD,EAAE,EAAE,gBAAgB;IACpB,IAAI,EAAE,sBAAsB;IAC5B,MAAM,EAAE,qBAAqB;IAC7B,WAAW,EACT,uQAAuQ;IACzQ,UAAU,EAAE,QAAQ;IACpB,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kLAoCkK;CACjL,CAAC"}
1
+ {"version":3,"file":"code-structure.js","sourceRoot":"","sources":["../../src/judges/code-structure.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,kBAAkB,GAAoB;IACjD,EAAE,EAAE,gBAAgB;IACpB,IAAI,EAAE,sBAAsB;IAC5B,MAAM,EAAE,qBAAqB;IAC7B,WAAW,EACT,uQAAuQ;IACzQ,UAAU,EAAE,QAAQ;IACpB,gBAAgB,EAAE,+EAA+E;IACjG,iBAAiB,EAAE,2CAA2C;IAC9D,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kLAoCkK;CACjL,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"compliance.d.ts","sourceRoot":"","sources":["../../src/judges/compliance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,eAAO,MAAM,eAAe,EAAE,eAoC7B,CAAC"}
1
+ {"version":3,"file":"compliance.d.ts","sourceRoot":"","sources":["../../src/judges/compliance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,eAAO,MAAM,eAAe,EAAE,eAsC7B,CAAC"}