openpencil/scripts/ab-corpus
Fini 31d45b79be chore(ab-corpus): add shape + per-category issue inspectors
Two complement scripts that ride alongside replay-detectors.ts:

- inspect-shape.ts: bucket every applied row's root by (width-bucket /
  height-bucket / aspect-ratio / child-count). Used 2026-05-10 to
  diagnose why detectEdgeSectionPadding scored 0 hits on a 220-row
  mobile subset — turned out 49% of mobile rows produce roots with a
  string-typed width ("fill_container" / "fit_content") because the
  element-tools path emits component fragments, not pages. The
  detector predicate `typeof width === 'number'` correctly skips them
  → 0 hits is the EVAL HARNESS coverage gap, not a detector bug.

- inspect-issue-category.ts: print every issue in a chosen category
  with row id + node id + reason. Generic version of inspect-contrast-
  hits.ts. 2026-05-10 used it to validate
  excessive-frame-effects (4/4 TP — blur 48 cards + OTP slot spread)
  and the two borderline mixed-sibling hits (header padding outlier,
  spacer cornerRadius outlier — known role-aware limitation, 0.2%
  noise rate, accepted).

Together with replay-detectors.ts these three give a fast empirical
loop for tuning a detector against real corpus output without burning
fresh API tokens.
2026-05-10 14:50:00 +08:00
..
__tests__ Merge origin/v0.8.0 into feat/rust-ification 2026-05-03 21:00:00 +08:00
clients Merge origin/v0.8.0 into feat/rust-ification 2026-05-03 21:00:00 +08:00
apply.ts Merge origin/v0.8.0 into feat/rust-ification 2026-05-03 21:00:00 +08:00
build-prompt.ts Merge origin/v0.8.0 into feat/rust-ification 2026-05-03 21:00:00 +08:00
inspect-contrast-hits.ts fix(ai): retune contrast thresholds to 2.5/2.0 — kill 35/41 false positives 2026-05-10 14:45:00 +08:00
inspect-issue-category.ts chore(ab-corpus): add shape + per-category issue inspectors 2026-05-10 14:50:00 +08:00
inspect-shape.ts chore(ab-corpus): add shape + per-category issue inspectors 2026-05-10 14:50:00 +08:00
measure-prompt-sizes.ts Merge origin/v0.8.0 into feat/rust-ification 2026-05-03 21:00:00 +08:00
real-model.ts Merge origin/v0.8.0 into feat/rust-ification 2026-05-03 21:00:00 +08:00
replay-detectors.ts fix(ai): retune contrast thresholds to 2.5/2.0 — kill 35/41 false positives 2026-05-10 14:45:00 +08:00
run.ts Merge origin/v0.8.0 into feat/rust-ification 2026-05-03 21:00:00 +08:00
stub-model.ts Merge origin/v0.8.0 into feat/rust-ification 2026-05-03 21:00:00 +08:00
write-report.ts Merge origin/v0.8.0 into feat/rust-ification 2026-05-03 21:00:00 +08:00