openpencil/scripts
Fini 20dbbf227a feat(ai): detect stacked horizontal padding (page-vs-section gutter)
14th pre-validation detector + a preventive skill rule.

User-reported 2026-05-10 "Bistro" mobile food app shipped with root
padding [0,16,0,16] AND a "Today's Specials" section padding [0,24].
Effective gutter = 40px on a 375px page → only 295px of usable
content width. Reads as "too much padding" / pinched.

Two pieces:

1. layout.md AESTHETIC HYGIENE block now teaches "page gutter goes
   on ONE layer, not both" — pick root horizontal padding OR
   per-section horizontal padding, not both. Default convention:
   root carries the gutter, sections set vertical-only padding.
   Hero / banner / image-bleed sections then sit edge-to-edge by
   simply NOT adding horizontal padding (root's gutter shows
   through). Preventive teaching at prompt time.

2. detectStackedHorizontalPadding (info-only, detect-only). Walks
   every mobile-shaped root (width 320–480 + tall + multi-child),
   compares root horizontal padding against each direct child's
   horizontal padding; flags the section as the offender when both
   are > 0. Page-shape filter mirrors detectEdgeSectionPadding so
   the legitimate component-internal padding stacking pattern
   (chip → badge → icon, etc.) doesn't trip it. Severity is INFO
   because a section may legitimately want a deeper inset for
   visual emphasis — let the user/agent decide via audit panel.

Side-quest: scripts/ab-corpus/check-stacked-padding.ts ships with
this commit so the next stacked-padding-style detector calibration
can survey corpus frequency without rebuilding the harness.
2026-05-10 15:15:00 +08:00
..
ab-corpus feat(ai): detect stacked horizontal padding (page-vs-section gutter) 2026-05-10 15:15:00 +08:00
bundle-skill.ts V0.7.1 (#102) 2026-04-13 21:30:23 +08:00
ensure-agent-native.cjs fix(ci): always source-build agent-native and bundle to napi/ root 2026-04-26 19:20:48 +08:00
measure-v0-hex-coverage.ts Merge origin/v0.8.0 into feat/rust-ification 2026-05-03 21:00:00 +08:00
patch-srvx-bun.ts V0.7.3 (#111) 2026-04-15 22:19:12 +08:00
publish-beta.sh V0.7.0 (#95) 2026-04-11 23:25:13 +08:00
smoke-v1-pipeline.ts Merge feat/rust-ification into v0.8.0 (Step 0 Rust workspace bootstrap) 2026-05-04 21:00:00 +08:00
unpublish.sh V0.7.0 (#95) 2026-04-11 23:25:13 +08:00