Skip to content

feat: ProtoScan Science — deterministic usability metrics + 0-100 score - #3

Merged
oxxo merged 2 commits into
masterfrom
feat/protoscan-science
Jun 2, 2026
Merged

feat: ProtoScan Science — deterministic usability metrics + 0-100 score#3
oxxo merged 2 commits into
masterfrom
feat/protoscan-science

Conversation

@oxxo

@oxxo oxxo commented Jun 2, 2026

Copy link
Copy Markdown
Owner

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)

  • 8 metric analyzers grounded in peer-reviewed HCI frameworks: WCAG contrast (sRGB-linearized), Hick–Hyman + Miller, Fitts (intra-screen), typography, Flesch–Kincaid, 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 3 reporters render science findings with no rewrite.
  • Score (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.
  • Calibration pipeline (scripts/calibrate/): percentile + good/bad separation → bands.json (statistical, not ML training).
  • Surface: CLI --metrics/--score/--ergonomics; MCP score/metrics/ergonomics args + score-first output; HTML score hero (ring + radar); JSON _meta schema 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

  • 83/83 vitest passing — value pins, edge cases (opacity, visible:false, non-solid fills, Hick N=0), score determinism.
  • tsc --noEmit strict clean across core/cli/mcp; all workspaces build.
  • Adversarially audited (multi-agent review + verification); the one genuine defect found (a strict-TS error in utils/color.ts) is fixed.

Not in this PR

  • Distribution packaging (skill + plugin bundle — Fase C)
  • The calibration run (needs a corpus + FIGMA_TOKEN) and real-file E2E
  • Maturity bands stay hidden until calibrated (Fase B.5)

🤖 Generated with Claude Code

oxxo and others added 2 commits June 2, 2026 01:03
…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>
@oxxo oxxo closed this Jun 2, 2026
@oxxo oxxo reopened this Jun 2, 2026
@oxxo
oxxo merged commit d5ac7b3 into master Jun 2, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant