diff --git a/data/calibration-evidence.json b/data/calibration-evidence.json index fe51488c..fc21e74b 100644 --- a/data/calibration-evidence.json +++ b/data/calibration-evidence.json @@ -1 +1,443 @@ -[] +[ + { + "ruleId": "missing-component", + "type": "overscored", + "actualDifficulty": "easy", + "fixture": "simple-ds-4333-9262", + "timestamp": "2026-03-26T00:23:55.813Z" + }, + { + "ruleId": "no-auto-layout", + "type": "underscored", + "actualDifficulty": "hard", + "fixture": "material3-52949-27916", + "timestamp": "2026-03-26T00:47:29.368Z" + }, + { + "ruleId": "magic-number-spacing", + "type": "overscored", + "actualDifficulty": "easy", + "fixture": "material3-52949-27916", + "timestamp": "2026-03-26T00:47:29.368Z" + }, + { + "ruleId": "raw-font", + "type": "overscored", + "actualDifficulty": "easy", + "fixture": "material3-52949-27916", + "timestamp": "2026-03-26T00:47:29.368Z" + }, + { + "ruleId": "missing-component", + "type": "overscored", + "actualDifficulty": "easy", + "fixture": "material3-52949-27916", + "timestamp": "2026-03-26T00:47:29.368Z" + }, + { + "ruleId": "variant-structure-mismatch", + "type": "overscored", + "actualDifficulty": "easy", + "fixture": "material3-52949-27916", + "timestamp": "2026-03-26T00:47:29.368Z" + }, + { + "ruleId": "no-auto-layout", + "type": "overscored", + "actualDifficulty": "easy", + "fixture": "simple-ds-562-9518", + "timestamp": "2026-03-26T00:50:06.823Z" + }, + { + "ruleId": "missing-component", + "type": "overscored", + "actualDifficulty": "easy", + "fixture": "simple-ds-562-9518", + "timestamp": "2026-03-26T00:50:06.823Z" + }, + { + "ruleId": "detached-instance", + "type": "overscored", + "actualDifficulty": "easy", + "fixture": "simple-ds-562-9518", + "timestamp": "2026-03-26T00:50:06.823Z" + }, + { + "ruleId": "text-truncation-unhandled", + "type": "overscored", + "actualDifficulty": "easy", + "fixture": "simple-ds-562-9518", + "timestamp": "2026-03-26T00:50:06.823Z" + }, + { + "ruleId": "wrap-behavior-unknown", + "type": "underscored", + "actualDifficulty": "moderate", + "fixture": "simple-ds-562-9518", + "timestamp": "2026-03-26T00:50:06.823Z" + }, + { + "ruleId": "no-auto-layout", + "type": "overscored", + "actualDifficulty": "easy", + "fixture": "simple-ds-175-9106", + "timestamp": "2026-03-26T00:58:41.395Z" + }, + { + "ruleId": "missing-component", + "type": "overscored", + "actualDifficulty": "easy", + "fixture": "simple-ds-175-9106", + "timestamp": "2026-03-26T00:58:41.395Z" + }, + { + "ruleId": "detached-instance", + "type": "overscored", + "actualDifficulty": "easy", + "fixture": "simple-ds-175-9106", + "timestamp": "2026-03-26T00:58:41.395Z" + }, + { + "ruleId": "text-truncation-unhandled", + "type": "overscored", + "actualDifficulty": "easy", + "fixture": "simple-ds-175-9106", + "timestamp": "2026-03-26T00:58:41.395Z" + }, + { + "ruleId": "no-auto-layout", + "type": "overscored", + "actualDifficulty": "moderate", + "fixture": "material3-56615-82356", + "timestamp": "2026-03-26T01:03:19.643Z" + }, + { + "ruleId": "absolute-position-in-auto-layout", + "type": "overscored", + "actualDifficulty": "easy", + "fixture": "material3-56615-82356", + "timestamp": "2026-03-26T01:03:19.643Z" + }, + { + "ruleId": "fixed-size-in-auto-layout", + "type": "overscored", + "actualDifficulty": "easy", + "fixture": "material3-56615-82356", + "timestamp": "2026-03-26T01:03:19.643Z" + }, + { + "ruleId": "missing-size-constraint", + "type": "overscored", + "actualDifficulty": "easy", + "fixture": "material3-56615-82356", + "timestamp": "2026-03-26T01:03:19.643Z" + }, + { + "ruleId": "missing-responsive-behavior", + "type": "overscored", + "actualDifficulty": "easy", + "fixture": "material3-56615-82356", + "timestamp": "2026-03-26T01:03:19.643Z" + }, + { + "ruleId": "deep-nesting", + "type": "overscored", + "actualDifficulty": "easy", + "fixture": "material3-56615-82356", + "timestamp": "2026-03-26T01:03:19.643Z" + }, + { + "ruleId": "raw-font", + "type": "overscored", + "actualDifficulty": "easy", + "fixture": "material3-56615-82356", + "timestamp": "2026-03-26T01:03:19.643Z" + }, + { + "ruleId": "magic-number-spacing", + "type": "overscored", + "actualDifficulty": "easy", + "fixture": "material3-56615-82356", + "timestamp": "2026-03-26T01:03:19.643Z" + }, + { + "ruleId": "missing-component", + "type": "overscored", + "actualDifficulty": "easy", + "fixture": "material3-56615-82356", + "timestamp": "2026-03-26T01:03:19.643Z" + }, + { + "ruleId": "detached-instance", + "type": "overscored", + "actualDifficulty": "easy", + "fixture": "material3-56615-82356", + "timestamp": "2026-03-26T01:03:19.643Z" + }, + { + "ruleId": "variant-structure-mismatch", + "type": "overscored", + "actualDifficulty": "easy", + "fixture": "material3-56615-82356", + "timestamp": "2026-03-26T01:03:19.643Z" + }, + { + "ruleId": "text-truncation-unhandled", + "type": "overscored", + "actualDifficulty": "easy", + "fixture": "material3-56615-82356", + "timestamp": "2026-03-26T01:03:19.643Z" + }, + { + "ruleId": "overflow-behavior-unknown", + "type": "underscored", + "actualDifficulty": "moderate", + "fixture": "material3-56615-82356", + "timestamp": "2026-03-26T01:03:19.643Z" + }, + { + "ruleId": "no-auto-layout", + "type": "overscored", + "actualDifficulty": "easy", + "fixture": "material3-51954-18254", + "timestamp": "2026-03-26T01:06:26.978Z" + }, + { + "ruleId": "absolute-position-in-auto-layout", + "type": "overscored", + "actualDifficulty": "moderate", + "fixture": "material3-51954-18254", + "timestamp": "2026-03-26T01:06:26.978Z" + }, + { + "ruleId": "fixed-size-in-auto-layout", + "type": "overscored", + "actualDifficulty": "easy", + "fixture": "material3-51954-18254", + "timestamp": "2026-03-26T01:06:26.978Z" + }, + { + "ruleId": "missing-size-constraint", + "type": "overscored", + "actualDifficulty": "easy", + "fixture": "material3-51954-18254", + "timestamp": "2026-03-26T01:06:26.978Z" + }, + { + "ruleId": "missing-responsive-behavior", + "type": "overscored", + "actualDifficulty": "easy", + "fixture": "material3-51954-18254", + "timestamp": "2026-03-26T01:06:26.978Z" + }, + { + "ruleId": "group-usage", + "type": "overscored", + "actualDifficulty": "easy", + "fixture": "material3-51954-18254", + "timestamp": "2026-03-26T01:06:26.978Z" + }, + { + "ruleId": "deep-nesting", + "type": "overscored", + "actualDifficulty": "easy", + "fixture": "material3-51954-18254", + "timestamp": "2026-03-26T01:06:26.978Z" + }, + { + "ruleId": "z-index-dependent-layout", + "type": "overscored", + "actualDifficulty": "easy", + "fixture": "material3-51954-18254", + "timestamp": "2026-03-26T01:06:26.978Z" + }, + { + "ruleId": "raw-font", + "type": "overscored", + "actualDifficulty": "easy", + "fixture": "material3-51954-18254", + "timestamp": "2026-03-26T01:06:26.978Z" + }, + { + "ruleId": "magic-number-spacing", + "type": "overscored", + "actualDifficulty": "easy", + "fixture": "material3-51954-18254", + "timestamp": "2026-03-26T01:06:26.978Z" + }, + { + "ruleId": "missing-component", + "type": "overscored", + "actualDifficulty": "easy", + "fixture": "material3-51954-18254", + "timestamp": "2026-03-26T01:06:26.978Z" + }, + { + "ruleId": "detached-instance", + "type": "overscored", + "actualDifficulty": "easy", + "fixture": "material3-51954-18254", + "timestamp": "2026-03-26T01:06:26.978Z" + }, + { + "ruleId": "variant-structure-mismatch", + "type": "overscored", + "actualDifficulty": "easy", + "fixture": "material3-51954-18254", + "timestamp": "2026-03-26T01:06:26.978Z" + }, + { + "ruleId": "text-truncation-unhandled", + "type": "overscored", + "actualDifficulty": "easy", + "fixture": "material3-51954-18254", + "timestamp": "2026-03-26T01:06:26.978Z" + }, + { + "ruleId": "missing-size-constraint", + "type": "overscored", + "actualDifficulty": "easy", + "fixture": "simple-ds-175-8591", + "timestamp": "2026-03-26T01:07:12.089Z" + }, + { + "ruleId": "detached-instance", + "type": "overscored", + "actualDifficulty": "easy", + "fixture": "simple-ds-175-8591", + "timestamp": "2026-03-26T01:07:12.089Z" + }, + { + "ruleId": "missing-component", + "type": "overscored", + "actualDifficulty": "easy", + "fixture": "simple-ds-175-8591", + "timestamp": "2026-03-26T01:07:12.089Z" + }, + { + "ruleId": "fixed-size-in-auto-layout", + "type": "overscored", + "actualDifficulty": "easy", + "fixture": "simple-ds-175-8591", + "timestamp": "2026-03-26T01:07:12.089Z" + }, + { + "ruleId": "no-auto-layout", + "type": "overscored", + "actualDifficulty": "easy", + "fixture": "simple-ds-175-8591", + "timestamp": "2026-03-26T01:07:12.089Z" + }, + { + "ruleId": "deep-nesting", + "type": "overscored", + "actualDifficulty": "easy", + "fixture": "simple-ds-175-8591", + "timestamp": "2026-03-26T01:07:12.089Z" + }, + { + "ruleId": "no-auto-layout", + "type": "overscored", + "actualDifficulty": "moderate", + "fixture": "material3-56615-45927", + "timestamp": "2026-03-26T01:10:42.533Z" + }, + { + "ruleId": "missing-responsive-behavior", + "type": "overscored", + "actualDifficulty": "easy", + "fixture": "material3-56615-45927", + "timestamp": "2026-03-26T01:10:42.533Z" + }, + { + "ruleId": "group-usage", + "type": "overscored", + "actualDifficulty": "easy", + "fixture": "material3-56615-45927", + "timestamp": "2026-03-26T01:10:42.533Z" + }, + { + "ruleId": "z-index-dependent-layout", + "type": "underscored", + "actualDifficulty": "hard", + "fixture": "material3-56615-45927", + "timestamp": "2026-03-26T01:10:42.533Z" + }, + { + "ruleId": "missing-size-constraint", + "type": "overscored", + "actualDifficulty": "easy", + "fixture": "material3-56615-45927", + "timestamp": "2026-03-26T01:10:42.533Z" + }, + { + "ruleId": "missing-component", + "type": "overscored", + "actualDifficulty": "easy", + "fixture": "material3-56615-45927", + "timestamp": "2026-03-26T01:10:42.533Z" + }, + { + "ruleId": "deep-nesting", + "type": "overscored", + "actualDifficulty": "easy", + "fixture": "material3-56615-45927", + "timestamp": "2026-03-26T01:10:42.533Z" + }, + { + "ruleId": "detached-instance", + "type": "overscored", + "actualDifficulty": "easy", + "fixture": "material3-56615-45927", + "timestamp": "2026-03-26T01:10:42.533Z" + }, + { + "ruleId": "fixed-size-in-auto-layout", + "type": "overscored", + "actualDifficulty": "easy", + "fixture": "material3-56615-45927", + "timestamp": "2026-03-26T01:10:42.533Z" + }, + { + "ruleId": "raw-font", + "type": "overscored", + "actualDifficulty": "moderate", + "fixture": "material3-56615-45927", + "timestamp": "2026-03-26T01:10:42.533Z" + }, + { + "ruleId": "text-truncation-unhandled", + "type": "overscored", + "actualDifficulty": "easy", + "fixture": "material3-56615-45927", + "timestamp": "2026-03-26T01:10:42.533Z" + }, + { + "ruleId": "no-auto-layout", + "type": "overscored", + "actualDifficulty": "easy", + "fixture": "simple-ds-175-7790", + "timestamp": "2026-03-26T01:11:14.093Z" + }, + { + "ruleId": "missing-component", + "type": "overscored", + "actualDifficulty": "easy", + "fixture": "simple-ds-175-7790", + "timestamp": "2026-03-26T01:11:14.093Z" + }, + { + "ruleId": "detached-instance", + "type": "overscored", + "actualDifficulty": "easy", + "fixture": "simple-ds-175-7790", + "timestamp": "2026-03-26T01:11:14.093Z" + }, + { + "ruleId": "fixed-size-in-auto-layout", + "type": "overscored", + "actualDifficulty": "easy", + "fixture": "simple-ds-175-7790", + "timestamp": "2026-03-26T01:11:14.093Z" + } +] diff --git a/data/discovery-evidence.json b/data/discovery-evidence.json index 9edb0dc6..47d912e8 100644 --- a/data/discovery-evidence.json +++ b/data/discovery-evidence.json @@ -1,4 +1,26 @@ { "schemaVersion": 1, - "entries": [] + "entries": [ + { + "description": "The design tree marks image frames with 'background-image: [IMAGE]' but provides no actual image data. The Figma screenshot shows gray placeholders with a small image icon. Reproducing the exact placeholder appearance (including the centered image-not-loaded icon) required guesswork. This is inherent to static fixture-based conversion without asset access.", + "category": "unknown", + "fixture": "simple-ds-175-7790", + "timestamp": "2026-03-26T01:11:14.093Z", + "source": "evaluation" + }, + { + "description": "Inter font rendering between Figma and the browser produces subtle anti-aliasing differences. Text baselines and glyph shapes differ slightly, contributing to ~1% of the pixel mismatch. This is an environment limitation, not a design structure issue.", + "category": "unknown", + "fixture": "simple-ds-175-7790", + "timestamp": "2026-03-26T01:11:14.093Z", + "source": "evaluation" + }, + { + "description": "Without explicit root/section height constraints in the design tree, the total page height required setting explicit heights on the header (99px), main content (870px), and footer (468px) to match the Figma layout exactly. The design tree provides dimensions in the node declarations but doesn't enforce them as CSS constraints, requiring manual height pinning.", + "category": "unknown", + "fixture": "simple-ds-175-7790", + "timestamp": "2026-03-26T01:11:14.093Z", + "source": "evaluation" + } + ] } diff --git a/src/core/rules/rule-config.ts b/src/core/rules/rule-config.ts index d05eacbf..a60aaa27 100644 --- a/src/core/rules/rule-config.ts +++ b/src/core/rules/rule-config.ts @@ -10,29 +10,29 @@ export const RULE_CONFIGS: Record = { // ============================================ "no-auto-layout": { severity: "blocking", - score: -7, + score: -10, depthWeight: 1.5, enabled: true, }, "absolute-position-in-auto-layout": { severity: "blocking", - score: -10, + score: -7, depthWeight: 1.3, enabled: true, }, "fixed-size-in-auto-layout": { severity: "risk", - score: -5, + score: -3, enabled: true, }, "missing-size-constraint": { severity: "risk", - score: -5, + score: -3, enabled: true, }, "missing-responsive-behavior": { severity: "risk", - score: -4, + score: -3, depthWeight: 1.5, enabled: true, }, @@ -74,8 +74,8 @@ export const RULE_CONFIGS: Record = { enabled: true, }, "raw-font": { - severity: "blocking", - score: -8, + severity: "risk", + score: -4, enabled: true, }, "inconsistent-spacing": { @@ -88,7 +88,7 @@ export const RULE_CONFIGS: Record = { }, "magic-number-spacing": { severity: "risk", - score: -4, + score: -3, enabled: true, options: { gridBase: 4,