Skip to content

fix(core): tune ProtoScan Science after real-file dogfooding (EDET) - #4

Merged
oxxo merged 1 commit into
masterfrom
fix/protoscan-science-tuning
Jun 2, 2026
Merged

fix(core): tune ProtoScan Science after real-file dogfooding (EDET)#4
oxxo merged 1 commit into
masterfrom
fix/protoscan-science-tuning

Conversation

@oxxo

@oxxo oxxo commented Jun 2, 2026

Copy link
Copy Markdown
Owner

Summary

Follow-up to #3. Five correctness/UX fixes surfaced by dogfooding the engine on a real Section-organised Figma prototype (EDET) — issues that synthetic fixtures could not reveal.

Fixes

  • SECTION recursion (metrics/walk.ts): forEachScreen now recurses into SECTION nodes like the graph builder. Section-nested screens were invisible to the metrics → EDET score coverage 50% → 100% (all 8 dimensions now populated).
  • Skip archived/backup frames (metrics/walk.ts): ARCHIVADO/BACKUP frames no longer pollute the score or emit findings (the nav/spatial checks already downgrade them). Removed false-positive contrast noise.
  • Balance proportional split (metrics/balance.ts): each element's visual weight is distributed proportionally across the centerline instead of all-or-nothing by center — a full-bleed background no longer reads as 100% one-sided (EDET balance 9 → 63). na when a screen has < 3 weighted leaves.
  • Grouped top fixes (scoring/score.ts topFixGroups): aggregates failing metrics by dimension with the global points recovered if fully addressed — meaningful on large files where per-node impact is ~0.1. Terminal/HTML/MCP updated.
  • Cap dual-emit (scanner.ts): metric failures dual-emitted as Issues are capped at 25/category. A per-node scan yields thousands (EDET 12,564 → 224 issues); full totals remain in the score + topFixGroups.

Verification

Real run on EDET (PDShpnJG1i8wGIf4ErIiRL): 70/100, 100% coverage, all 8 dimensions; HTML report ~186KB (was multi-MB). 88 tests passing (+5 regression tests: section recursion, archived skip, balance proportional/na, topFixGroups). tsc --noEmit strict clean across core/cli/mcp.

🤖 Generated with Claude Code

Five fixes surfaced by scanning a real Section-organised prototype (EDET):

- metrics: forEachScreen now recurses SECTION nodes (mirrors the graph
  builder). Section-nested screens were invisible to metrics → score
  coverage on EDET went 50% -> 100%.
- metrics: skip archived/backup frames (ARCHIVADO/BACKUP) so they do not
  pollute the score or emit findings (the nav/spatial checks already
  downgrade them).
- balance: distribute each element's weight PROPORTIONALLY across the
  centerline instead of all-or-nothing by center, so a full-bleed background
  no longer reads as 100% one-sided (EDET balance 9 -> 63); mark na when a
  screen has < 3 weighted leaves.
- scoring: topFixGroups() aggregates failing metrics by dimension with the
  global points recovered if fully addressed (meaningful on large files where
  per-node impact is ~0.1). Terminal/HTML/MCP show grouped fixes.
- scanner: cap dual-emitted metric issues at 25/category. A deterministic
  per-node scan yields thousands of failures (EDET 12,564 -> 224 issues),
  which made reports unusable; full totals remain in the score + topFixGroups.

Verified on EDET (PDShpnJG1i8wGIf4ErIiRL): 70/100, 100% coverage, all 8
dimensions, HTML report ~186KB. 88 tests passing (+5), tsc strict clean
across core/cli/mcp.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@oxxo
oxxo merged commit d255c50 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