feat(vision): Tier-2 AI screen evaluation (deepens score to core+vision)#6
Open
oxxo wants to merge 1 commit into
Open
feat(vision): Tier-2 AI screen evaluation (deepens score to core+vision)#6oxxo wants to merge 1 commit into
oxxo wants to merge 1 commit into
Conversation
…+vision
Adds the proprietary AI vision Tier-2: a vision model evaluates each screen and
emits graded Metric[] for 6 subjective dimensions (clutter, saliency, feedback,
consistency, affordance, guidance) that feed the 0-100 score and flip it to
`core+vision`. The free deterministic Tier-1 score is unchanged.
- core: 4 new Tier-2 dimensions across the 5 catalog sites (types, dimensions x3,
metric DIMENSION_ISSUE_META) + free-score invariant test (core-only score is
independent of Tier-2 catalog size).
- vision: provider abstraction (providers/: VisionProvider + OpenAIVisionProvider
+ Claude stub + selectProvider). Holistic prompt returns {findings, dimensions}
(temperature 0 + JSON mode). Per-dimension score 0-100 or null=na (model
abstains when it cannot judge a dim from one static screenshot). Defensive parse
(sanitizeVisionResponse) drops malformed items. analyze* return
VisionResult {issues, metrics, coverage}. COST_PER_SCREEN 0.005 -> 0.009.
- cli: --vision implies --score, --provider flag, wires additionalMetrics.
- mcp: vision arg (Pro-gated like simulate) + additionalMetrics + force score.
- server proxy (apps/web/api/vision.ts): holistic prompt + {findings,dimensions}
(additive — old clients read .findings; old servers degrade to metrics:[]).
- reporters: radar <3-dim fallback; "core deterministic vs vision AI-assessed
(may vary)" note in terminal + HTML.
100 tests (93 core + 7 vision), tsc strict clean across core/vision/cli/mcp.
EDET deterministic score byte-identical (70/100, 8 dims) — no free-tier regression.
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
The "analizá la pantalla con IA" Pro tier. A vision model evaluates each screen and emits graded
Metric[]for 6 subjective Tier-2 dimensions — clutter, saliency, feedback, consistency, affordance, guidance — that feed the 0-100 score and flip its tier tocore+vision, filling the previously-grey radar axes. The free deterministic Tier-1 score is unchanged.What it does
providers/:VisionProvider+OpenAIVisionProvider+ Claude stub +selectProvider) so GPT-4o ships now and Claude slots in later. Holistic prompt returns{findings, dimensions}with temperature 0 + JSON mode (low run-to-run variance). Each dimension scores 0-100 ornull= na when the model can't judge it from a single static screenshot (no hallucinated numbers). DefensivesanitizeVisionResponsedrops malformed items.analyzeVision/analyzeVisionProxyreturnVisionResult {issues, metrics, coverage}.--vision(implies--score),--provider, wiresadditionalMetrics.visionarg (Pro-gated likesimulate) +additionalMetrics+ forces score.apps/web/api/vision.ts): holistic prompt +{findings, dimensions}— additive/back-compat (old clients read.findings; old servers degrade tometrics: []).<3-dim fallback; "core = deterministic / vision = AI-assessed (may vary)" note (terminal + HTML).Audit
Plan adversarially audited; the genuine gaps (Adenda §A-§G) are folded in: non-determinism (temp 0 + clear labeling), per-dimension
na/abstention (judge-ability from one static frame), malformed-item validation, partial-data coverage, dual-emitsourcetag, server back-compat. (Most "CRITICAL" audit findings were the plan's own Phase A-D tasks — false positives from auditing a plan as code.)Verification
100 tests (93 core + 7 vision),
tsc --noEmitstrict clean across core/vision/cli/mcp. No free-tier regression (EDET deterministic 70/100 unchanged).Not yet runnable end-to-end: the real
--visionAI call needsOPENAI_API_KEY(BYOK) orPROTOSCAN_API_KEY+ the Vercel server redeployed (Fase D).@protoscan/visionstays proprietary (not published MIT).🤖 Generated with Claude Code