Skip to Main Content

Spectra

Built at Meta Global AI Developer Hackathon · Oct 26, 2026 · Remote

Spectra — Demo video

Spectra ("Don't trust 'done.' Measure it.") is an open-source, dual-instrument optical visual referee for AI coding agents, featuring a Swiss-industrial Field Monitor Workbench (https://spectra-lyart.vercel.app), a 5-command CLI, and a 4-tool stdio MCP server for Muse Code, Claude Code, and Cursor. THE PROBLEM: When AI coding agents build or modify frontend UI, they rely on Playwright DOM hit-tests (`document.elementFromPoint`) or single-shot VLM screenshot checks to verify their work. Both systematically lie on partial occlusions: if a sticky cart drawer slices off the bottom 10% of a "Complete Checkout" button, its center pixel `(1080, 625)` remains uncovered so the DOM hit-test returns a false PASS—and raw VLMs hallucinate "fully visible" up to 61.1% of the time. HOW SPECTRA SOLVES IT: Instead of trusting the DOM or a single uncalibrated model guess, Spectra captures an 8-frame settling video (`8f @ 4FPS, 1280×720`) and measures actual pixel visibility using two independent instruments calibrated to a measured 3-sigma noise floor (`3σ = 1.35%`, `σ = 0.45%`): 1. Instrument A (Meta SAM 3.1 Optical Segmentation): Uses `sam-3.1` + `@meta-sam/parser` for Zero-BBox Frame-0 target discovery and tracks the visible pixel mask ratio `R_SAM = min(1, Area(t_k) / Area(t_0))`. 2. Instrument B (Deterministic Pixel Matcher): Computes Euclidean RGB tolerance (`tol=5.0`) + zero-mean Normalized Cross-Correlation (`rNcc`) against the baseline template. 3. Fail-Closed Referee & Autonomous Repair: Both instruments must agree within a calibrated delta bound (`δ = 4.10%`). When pixel loss exceeds `3σ` (`1.35%`), Spectra rejects the build, feeds exact pixel-loss coordinates to `meta-models/muse-spark-open-1026` on Baseten to synthesize a minimal CSS repair patch, re-renders Pass #2, and optically verifies `0.00%` visibility loss. EMPIRICAL BENCHMARK RESULTS (21 Canonical v1 Clips + 45-Clip Sweep): - Playwright DOM Center Hit-Test: 94.4% False-Pass Rate (1/18 occlusions caught) - Muse Spark 1.3 (Single-Shot VLM Judge): 61.1% False-Pass Rate (7/18 caught) - Muse Spark Open 1026 (Open-Weight VLM Judge): 44.4% False-Pass Rate (10/18 caught) - Spectra Dual-Instrument Referee: 0.0% False-Pass Rate (18/18 caught, 1.11% Mean Absolute Error, ~480ms cached replay)

Team