feat: ProtoScan Science — deterministic usability metrics + 0-100 score - #3
Merged
Conversation
…00 score Tier-1 (MIT, REST-only) science metrics engine + aggregate usability score, surfaced across CLI, MCP, and the three reporters. - 8 metric analyzers (packages/core/src/metrics/): WCAG contrast (sRGB-linearized), Hick-Hyman + Miller, Fitts (intra-screen), typography, Flesch-Kincaid readability, Gestalt alignment, Von Restorff emphasis, visual balance. Each cites its framework and degrades to status:'na' when inputs are insufficient. - Metric model parallel to Issue; metricToIssue() dual-emits failures so the existing reporters render science findings unchanged. - Score (packages/core/src/scoring/): fixed 10-dimension catalog, pass/(pass+fail) per dimension, tier-filtered. Maturity bands are GATED (getBand -> undefined) until calibrated; only the 0-100 number ships. - Calibration pipeline (packages/core/scripts/calibrate/): percentile + good/bad separation -> bands.json (statistical, not ML training). - CLI flags --metrics/--score/--ergonomics; MCP score/metrics/ergonomics args with score-first output; JSON _meta schema 1.1. - 83 tests incl. value pins, edge cases (opacity, visible:false, non-solid fills, Hick N=0) and score determinism. tsc --noEmit clean (core/cli/mcp). Note: overlap.ts and mcp/index.ts also carry small pre-existing uncommitted changes (intersectionArea lifted to utils/geometry.ts; an MCP version fix) that could not be hunk-split without interactive staging. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…frames Lower findings on archived/backup frames (ARCHIVADO/BACKUP, bilingual) and onboarding screens lacking back-nav to low confidence instead of flagging them as actionable, cutting noise on real-world Figma files. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds ProtoScan Science: a Tier-1 (MIT, REST-only) deterministic metrics engine + an aggregate 0-100 usability score, surfaced across CLI, MCP, and the three reporters. Plus a separate commit hardening false-positive suppression on archived/onboarding frames.
ProtoScan Science (
9731686)status:'na'when inputs are insufficient.Metricmodel parallel toIssue;metricToIssue()dual-emits failures so the existing 3 reporters render science findings with no rewrite.scoring/): fixed 10-dimension catalog,pass/(pass+fail)per dimension, tier-filtered. Maturity bands are GATED (getBand → undefined) until calibrated — only the 0-100 number ships, no arbitrary Excellent/Weak labels.scripts/calibrate/): percentile + good/bad separation →bands.json(statistical, not ML training).--metrics/--score/--ergonomics; MCPscore/metrics/ergonomicsargs + score-first output; HTML score hero (ring + radar); JSON_metaschema 1.1.Fix: archived/onboarding false positives (
757ec5d)Downgrade findings on archived/backup (ARCHIVADO/BACKUP, bilingual) and onboarding frames lacking back-nav to low confidence, cutting noise on real files.
Verification
visible:false, non-solid fills, Hick N=0), score determinism.tsc --noEmitstrict clean across core/cli/mcp; all workspaces build.utils/color.ts) is fixed.Not in this PR
FIGMA_TOKEN) and real-file E2E🤖 Generated with Claude Code