Skip to content

v1.91.251.0 feat(design-lint): bundled free design lint (bin/gstack-design-lint + lib/design-lint/), hallmark sloplint port - #3459

Merged
capy-ai[bot] merged 56 commits into
mainfrom
feat/design-lint
Oct 26, 2026
Merged

capy-ai[bot] merged 56 commits into
mainfrom
feat/design-lint

Conversation

@garrytan

@garrytan garrytan commented Oct 26, 2026 •

Copy link
Copy Markdown
Owner
{
  "schema_version": 1,
  "pr": 3459,
  "head": "f16be82fd32372f3540199eea4fd1e48321560c4",
  "version": "1.91.229.0",
  "base": "main",
  "gate": {
    "design-lint": {
      "pass": 510,
      "fail": 0,
      "skip": 2
    },
    "typecheck": {
      "pass": 1,
      "fail": 0,
      "skip": 0
    },
    "remote-free-tier": {
      "pass": 9747,
      "fail": 0,
      "skip": 0
    }
  },
  "session_kind": "unattended",
  "pregate": "requires-remote cleared @e85d9ecd2ecc (1 checks, current for f16be82fd323)",
  "requires_remote": [
    "free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/40341654447",
    "windows-free-tests.yml/windows-free-shard: https://github.com/garrytan/gstack/actions/runs/40341659792",
    "pregate.json/remote_gate: remote-gate tree=e85d9ecd2ecc tests=9747"
  ],
  "issues": {
    "fixes": [],
    "refs": [],
    "flakes": []
  }
}

What changed

A free, deterministic design lint ships with gstack: bin/gstack-design-lint <file-or-dir ...> [--render] [--url] [--scope page|component] [--job <job>] [--json] [--rules]. It reads HTML, CSS and component files (Tailwind class strings included), links pages to their stylesheets, resolves CSS variables, converts colours to OKLCH, and prints one line per finding:

LINT: <blocks|ask|polish|waived> <rule-id> <file>:<line> <evidence> | fix: <fix>
LINT_SUMMARY: blocks=N ask=N waived=N polish=N render=<ran|skipped: reason>

Exit 2 on blocks, 1 on an unanswered ask, 0 otherwise. 130 rule ids (49 blocks, 60 ask, 21 polish; 126 ported rows plus the lint's own waiver, house-style, render and internal-error) from Nutlope/hallmark's sloplint and sloplint-render (MIT; NOTICE.md and licenses/MIT-hallmark.txt), rewritten in gstack's voice under lib/design-lint/, plus gstack-design-craft's copy and ship-floor tells under the same contract. docs/design-lint.md is the contract and lists every rule.

bin/gstack-design-lint on hallmark's slopped.html: 43 findings with evidence and a fix each, blocks=19 ask=21 polish=3; the clean fixture stays all-zero. Before this PR gstack had no deterministic design check.

bin/gstack-design-lint on hallmark's slopped.html: 43 findings with evidence and a fix each, blocks=19 ask=21 polish=3; the clean fixture stays all-zero. Before this PR gstack had no deterministic design check.

Before/after as text: bin/gstack-design-lint on hallmark's slopped.html: 43 findings with evidence and a fix each, blocks=19 ask=21 polish=3; the clean fixture stays all-zero. Before this PR gstack had no deterministic design check.
--- Before · before.txt · captured output
+++ After · after.txt · captured output
-$ git switch main   # base 5128ec146
 $ bun --no-env-file --config=/dev/null bin/gstack-design-lint test/fixtures/design-lint/slopped.html
+LINT: blocks bare-fr-track test/fixtures/design-lint/slopped.html:93 a bare 1fr track holds images on .gallery: the image's min-content width can push
+LINT: blocks caps-leading test/fixtures/design-lint/slopped.html:74 uppercase at line-height 0.94 on h2: the caps collide | fix: line-height 1.0 at le
+LINT: blocks display-head-unwrapped test/fixtures/design-lint/slopped.html:112 the display head holds "hyperproductivity-supercharged" with no overflo
+LINT: blocks double-sticky test/fixtures/design-lint/slopped.html:59 two elements stick at top: 0 (.nav and .section-head): the second slides under th
+LINT: blocks emoji-decoration test/fixtures/design-lint/slopped.html:126 an emoji icon "✨" in <div class="feature__icon"> | fix: one icon library, c
+LINT: blocks focus-ring-fade test/fixtures/design-lint/slopped.html:85 the focus ring transitions in on .cta:focus-visible | fix: remove the transitio
+LINT: blocks layout-transition test/fixtures/design-lint/slopped.html:79 transition: all on .card | fix: list the transitioned properties
+LINT: blocks layout-transition test/fixtures/design-lint/slopped.html:97 @keyframes grow animates width | fix: animate transform or opacity instead
+…
+LINT_SUMMARY: blocks=19 ask=21 waived=0 polish=3 render=skipped: not requested
-error: Module not found "bin/gstack-design-lint"
 
+$ bun --no-env-file --config=/dev/null bin/gstack-design-lint test/fixtures/design-lint/clean
+LINT_SUMMARY: blocks=0 ask=0 waived=0 polish=0 render=skipped: not requested
-# gstack had no mechanical design check besides gstack-design-craft's seventeen copy regexes.
 

With --render on the same page the browser tier adds low-contrast against the painted pixels, wide-container, cramped-padding, hero-balance, small-section-heads and thin-section (blocks=21 ask=26 polish=3 render=ran). The clean fixture reports blocks=0 ask=0 waived=0 polish=0 with and without --render.

Why

Phase 1 of plans/absorb-hallmark.md (GSTA-105), approved by Garry on 2026-10-26 ("Do it"). Until now the Slop Gate was prose the model judged itself, plus the opt-in impeccable engine most users never install. This PR is the tool alone: code, tests, fixtures and docs, 0 prompt bytes, $0 paid. /design-html and /design-review start calling it in Phase 2; bin/gstack-design-craft, lib/design-craft.ts and every design template are untouched here (GSTA-92 owns them).

Approvals

Date Asked Exact words Outcome Covers Still pending
2026-10-26 plans/absorb-hallmark.md: lint now (Phase 1, 0 prompt bytes); themes as mechanism only (dealer + log, no catalog or pictures); hero-first reviews deferred past the preamble hoist; Phase 2 pins raised to measured size only (design-html <= +400 B; design-review ~250 if #3433 does not carve it) “Do it” (Garry (via GStack Minder)) approved Phase 1 in GSTA-105: bin/gstack-design-lint + lib/design-lint/, code and tests only, no paid evals; Phases 2 and 3 in later threads none

Source: gstack-approvals record for feat/design-lint (display only; not an approval citation).

Summary

  • The lint (bin/gstack-design-lint, lib/design-lint/): a static tier (HTML/CSS/JSX/TSX/Vue/Svelte/Astro parsers, token and colour resolution, 15 rule families, waivers) and a render tier (--render/--url through gstack-render's engine pick: hero fold at 1280x800, word budget per window, pixel-confirmed contrast, focus rings, occlusion, horizontal scroll 320–1920, wrapping labels, thin sections, dead bands, SVG and photo walls). lib/aside-render.ts gains an optional viewport on the eval step and accepts http(s) targets.
  • Tiers and waivers: blocks (hallmark's Floor) is never waivable; ask (Reflex) is waivable on the record with <!-- gstack-lint-disable <rule-id>: <reason> --> (/* */ and // forms, impeccable-disable alias) when the reason is page-specific, 24+ characters, not boilerplate and not reused; polish (Finish) never blocks; blocking and waived are never summed; more than three waivers on a page is a house-style note for DESIGN.md. Three hallmark Floor rules sit at ask here (eyebrow above a heading, the 80-word screen, the dash) and overflow-x-unclipped too; a hallmark WARN on a Floor gate lands at ask as a suspected finding; gate 20 (the Hallmark stamp) is not ported.
  • Hardening over fourteen review passes and one adversarial pass: every scanner linear in the page (caps: 2 MB per file, 512 element depth, 64 CSS nesting levels, 8192-character selectors, a per-sheet selector expansion budget of 4× the sheet + 64 KB, limited text reads for short-label checks); comment-stripped markup dead for every rule; stylesheet hrefs bounded by the project root (package.json or .git, by path and realpath) and, outside any project, by the working directory; waivers scoped per sheet and per component with the branch chosen by the context's shape; unreadable, oversize or unparseable pages and sheets surfaced as internal-error instead of a silent pass; escape-aware CSS string skipping; render probes validated field by field with a tamper notice on a bad shape.
  • Tests, fixtures, docs: 17 test/design-lint*.test.ts files (parsers, the rule table against the docs, output lines and exit codes, every waiver refusal, one negative control and one planted positive per rule id, the render tier against the browse daemon, the recorded slop page, and eight cycle files pinning each review round's fixes red at the previous head); hallmark's fixtures under test/fixtures/design-lint/ plus a clean page; docs/design-lint.md; CHANGELOG, NOTICE and docs/PROJECT_STRUCTURE.md entries.

Test Coverage

All new code paths have test coverage: one negative control and one planted positive per rule id, plus a red-at-previous-head pin for every review-cycle fix (29 pins in test/design-lint-eighth-cycle.test.ts alone; the 4 adversarial fixes fail at b1c5dc0 and pass at this head).

  • Tests ran: design-lint 512 (bun test test/design-lint*.test.ts test/aside-render*.test.ts test/gstack-render-cli*.test.ts test/free-fixtures.test.ts test/bun-entry-isolation.test.ts test/spawnsync-timeout-tripwire.test.ts test/paid-free-boundary.test.ts test/test-pr-profile.test.ts test/module-size-ratchet.test.ts, 0 fail, 2 skip)
  • Tests ran: typecheck count unavailable (bun run typecheck && bun run typecheck:test: tsc clean; 819 known test diagnostics, none new)
  • Tests ran: remote free tier (Ubicloud, gstack-pregate --stage tests --remote) at this tree: see the receipt above (9743 tests, 0 failed at b1c5dc0; rerun at f16be82)
  • Free Tests and Windows Free Tests dispatched with gh workflow run --ref feat/design-lint at f16be82: see the READY report.

Pre-Landing Review

Fourteen /review passes (passes 1–10 over the whole diff, passes 11–14 narrow to the previous round's diff, per crew rule 23 applied at the cap) and one Claude adversarial pass, 1 CRITICAL or more in every full pass, all fixed and pinned; pass 14 was informational only (testing: no findings; security: coverage note; performance: a depth × length cost bounded by the caps; design: one docs sentence, since reworded). The review records bind tree 83d40b098f82 (head b1c5dc0); the four adversarial fixes and the docs edits below landed after that pass on GStack Minder's rule-23 instruction (fix only floor findings inside the diff, then READY), verified by the pinned tests and the focused set, not by a further review pass.

Gate edits: partial (gstack-gate-diff reported unmatched for every changed file: all new files, binary swatch.png unsupported). Gate edits read by hand, both kept:

  • ratchet test/fixtures/module-size-ratchet.json: kept — registers the 27 new lib/design-lint modules under the existing 800-line cap (largest html.ts at 799); no cap changed.
  • fixture-map test/helpers/free-fixtures-data.ts: kept — maps test/fixtures/design-lint/** to the 12 design-lint tests that read those fixtures.

Outside review: unavailable (Codex CLI not installed on the machine; codex_reviews unset), listed as missing coverage.

Adversarial pass (Claude, at b1c5dc0; fixtures reviewed in summary mode) and dispositions:

  • FIXED lib/design-lint/css.ts: an escaped quote (content: "\"") closed the string early and every later selector was read as a nested child; one escape-aware skipString now serves the block scanner, flatBody and the declaration split (content: "a;b}c" survives).
  • FIXED lib/design-lint/rules/motion.ts: content-hidden-at-rest (blocks) was skipped on a substring match against the @starting-style text, so one block silenced unrelated selectors; it now matches whole comma parts of the selectors the blocks declare.
  • FIXED lib/design-lint/rules/assets.ts: aria-hidden="false" counted as hidden decoration; only aria-hidden="true" does.
  • FIXED lib/design-lint/static.ts: outside any project a relative stylesheet href could read any .css on disk; it is now bounded by the working directory the lint runs in (the project root still wins inside a project; sibling-directory sheets under the working directory still attach).
  • NOTE (investigate, not fixed) lib/design-lint/render-probe.ts: a page script that defines a non-writable window.__gstackLint before the probe installs can feed the render tier a stub; API-level stubbing can never be fully excluded. Follow-up: an install-step descriptor check plus a per-run nonce.
  • NOTE (pre-existing root cause) lib/aside-render.ts resolveBrowseBin() falls back to Bun.which('browse'), which on Ubuntu is xdg-utils' xdg-open symlink when the daemon is not built; --render then reports blocks render … browse newtab failed instead of render=skipped. Fails closed; fix belongs with the engine pick, not this PR.
  • NOTE (performance) lib/design-lint/render.ts lineOf rescans the page per render finding (13.8 ms per call on a 2.1 MB page of 40k links; ~2 minutes CPU in the worst case). Follow-up: index tag positions once per page.
  • NOTE (performance, pass 14) lib/design-lint/html.ts limited reads: 500 nested elements around a 1.5 MB blanked comment cost 3.6 s (bounded ≈5 s by the 2 MB and 512-depth caps; a realistic page stays under 50 ms).
  • NOTE (minor) bin/gstack-design-lint: a run whose only inputs were skipped (over 2 MB) prints "no … files found" and exits 3 instead of the internal-error line; --json consumers never see the real reason.
  • NOTE (low) waiver comments inside a <script> string or visible prose are honoured; installScript() is 73 KB of one argv (57% of Linux's limit); glSetup/glOcclusion scroll a 10,000,000 px page for the full 120 s timeout before failing closed.

Shipped unfixed from earlier passes, all documented in docs/design-lint.md: measures() viewport order; the Tailwind half of literal-outside-tokens firing without a declared token block; copy.ts SPANNED mirroring design-craft's lazy scans (GSTA-92 owns design-craft); hiddenAtRest including an unclosed @starting-style tail; stripComments rerun per context; nested inline wrappers depth × length in check67Html/checkTemplatePunctuation/eyebrowHit; @media {} blocks under a long parent storing the parent by reference (4.8 s at 1.6 MB).

Flaky, logged per rule 16: the render contrast pixel test (1 fail of 485 at 0fb2330, passed 4/4 alone) and the eighth-cycle "thousands of distinct families…" timing test (2 of 3 whole-file runs at e6ed269 on the 4-core machine), which now declares a 60 s timeout and 10 s bounds.

Exploratory QA

Functional CLI surface, report-only (.gstack/qa-reports/ship-design-lint-20261026T074721Z/functional): captures 001–010 at df6cd72 (clean, slopped, waiver, --url ftp:// exit 3, --json, --render clean, --scope component, a root-relative href under the lint root with the sheet's waiver honoured, a regex metacharacter in aria-labelledby, --render slopped) are superseded; each was rerun as 011–020 on current inputs with byte-identical stdout and the same exit codes (0/2/1/3/0/0/2/2/2/2); verdict pass, no open contract. Not probed: a live http --url, components outside the fixtures, a sheet over 2 MB (unit tests only).

Design Review

Design Review (lite): 2 findings — 0 auto-fixed, 2 skipped (a docs sentence overstating the selector bound, since reworded in the audit; a coverage note). AI Slop: clean. Detector: not installed.

Eval Results

No prompt-related files changed — evals skipped.

Greptile Review

No Greptile comments.

Plan Completion

plans/absorb-hallmark.md Phase 1 (the lint: code, tests, fixtures, docs; 0 prompt bytes; $0 paid): complete. Phases 2 (/design-html and /design-review call the lint; the design-craft call swap) and 3 (the dealer) are later threads by the plan, not deferrals from this one.

Verification Results

Fixture contract at this head: clean 0/0/0/0; slopped.html blocks=19 ask=21 waived=0 polish=3 (blocks=21 ask=26 polish=3 with --render); eyebrow-pass 0/0/1/1; tailwind-pass 0/0/0/1; waiver 0/3/6/2; tailwind-fail 15/24/0/1; eyebrow-fail 4/11/0/2. Module-size ratchet 6 pass (html.ts 799/800). Pregate secrets scan: one WARN (pii.phone.e164 on SVG path numbers at test/design-lint-render.test.ts), not a secret. PR #3459 conflicts with main on CHANGELOG.md only (git merge-tree), left to the train per crew rules 14/19.

TODOS

No TODO items completed in this PR.

Documentation

Status: current — read-only re-audit docs-gsta105-2-1793025691 at f16be82 (base 5128ec1, branch feat/design-lint); no edits, no blockers; SESSION_KIND: spawned echoed; BANNED_TERMS: none. The first attempt (docs-gsta105-1793025119, at b1c5dc0 plus the unstaged fixes) returned updated with two doc edits, now committed: docs/design-lint.md names the 64-level CSS nesting cap and the working-directory href bound; docs/PROJECT_STRUCTURE.md names bin/gstack-design-lint, lib/design-lint/ and the Apache-2.0 and MIT (Elaya, hallmark) notices with all three license files.

Scope. 66 files across 60 commits: bin/gstack-design-lint, 27 lib/design-lint modules, lib/aside-render.ts, 17 tests, 13 fixtures, test/fixtures/module-size-ratchet.json, test/helpers/free-fixtures-data.ts, NOTICE.md, licenses/MIT-hallmark.txt, CHANGELOG.md, docs/design-lint.md (new, 391 lines) and docs/PROJECT_STRUCTURE.md. The CHANGELOG gate-integrity bullet was checked against git diff 5128ec146 HEAD --stat on the three gate files (ratchet +27 entries for exactly the 27 lib/design-lint/*.ts files, largest html.ts at 799 under the 800 cap; one FREE_FIXTURES line mapping test/fixtures/design-lint/** to the 12 tests that read it; aside-render gains only the eval-step viewport and the http(s) file target). docs/design-lint.md's href bound matches resolveRef/projectRoot (package.json or .git root by path and realpath, else the working directory; .css only) and its 64-level nesting cap matches MAX_NESTING; the 512-element depth, 8192-char selector, 4x+64 KB expansion, 2 MB file and 24-char waiver bounds, the aria-hidden="true" and @starting-style rows also match the code. docs/PROJECT_STRUCTURE.md's bin/, lib/, NOTICE and licenses/ lines match the tree.

Documentation health: README.md, ARCHITECTURE.md, CONTRIBUTING.md, AGENTS.md, CLAUDE.md current (no new skill, build command or contributor command; Phase 1 is a tool with no skill, per the CHANGELOG); CHANGELOG.md current (gate-integrity bullet verified against the diff); NOTICE.md current; docs/design-lint.md current; docs/PROJECT_STRUCTURE.md current; TODOS.md skipped (out of ship-owned scope).

Documentation coverage: bin/gstack-design-lint reference ✅ (docs/design-lint.md, PROJECT_STRUCTURE.md), how-to ✅ (Usage), tutorial ❌, explanation ✅ (tiers, waivers, what is not ported); gstack-lint-disable waivers reference ✅ how-to ✅ tutorial ❌ explanation ✅; lib/aside-render.ts eval viewport / http(s) file reference ✅ (CHANGELOG + source comments), how-to ❌, tutorial ❌, explanation ✅.

Debt: no tutorial for the lint and no README or AGENTS.md pointer to it; both belong to Phase 2 when /design-html and /design-review start calling it. The aside-render eval-viewport option has no how-to beyond the CHANGELOG. No diagram drift.

Test plan

  • bun run typecheck && bun run typecheck:test: tsc clean; 819 known diagnostics, none new (evidence lane typecheck, exit 0)
  • bun test test/design-lint*.test.ts test/aside-render*.test.ts test/gstack-render-cli*.test.ts test/free-fixtures.test.ts test/bun-entry-isolation.test.ts test/spawnsync-timeout-tripwire.test.ts test/paid-free-boundary.test.ts test/test-pr-profile.test.ts test/module-size-ratchet.test.ts: 512 ran, 0 fail (evidence lane design-lint, exit 0)
  • gstack-pregate --stage tests --remote --spend-cap 2 --timeout 2700 --allow-repo-commands: the free tier on one Ubicloud standard-16 (see the receipt)
  • gh workflow run free-tests.yml --ref feat/design-lint and windows-free-tests.yml at the final head (see the READY report)
  • for f in clean slopped.html eyebrow-pass tailwind-pass waiver tailwind-fail eyebrow-fail; do bin/gstack-design-lint test/fixtures/design-lint/$f | grep LINT_SUMMARY; done: counts as listed under Verification Results

🤖 Generated with Claude Code

garrytan and others added 19 commits October 26, 2026 05:31
…our, tokens, reporter, waivers, CLI)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…module-size ratchet entries

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
rules/color.ts: gates 2a 2b 7a 7b 22 23 29 48 65 74 (check2, check7, check22,
check23, check29Glow, check48, check65, check65Tailwind). rules/type.ts: gates
1 25 37 38i 38ii 38iii 55a 55b 64 67 (check1, check25, check37, check38a,
check38c, check55, check64, check67, check67Html). Thresholds and heuristics
are hallmark's; evidence and fixes are rewritten in gstack's voice; the stamp,
genre and posture guards are gone, so every check runs in its strict form.

The clean fixture carried two real tells hallmark's own sloplint also flags:
an oklch literal on .button:hover (48) and the cream paper + Fraunces + clay
accent look (65). The hover colour is now a token and the display face is
Literata.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Replaces the tailwind.ts stub with sloplint's utility reader (twParse,
twInfo, twGroup, variants, stops, sizes, tracking, families, shared
project tokens) and the tells it feeds, and fills rules/component.ts
with checkTailwind and checkComponentText: layout-transition,
bounce-easing, purple-blue-gradient, gradient-text, glow-wash,
literal-outside-tokens, hover-tells, wide-tracking, kicker-above-heading,
monospace-costume, framework-palette, vh-height, template-cards,
template-punctuation and emoji-decoration over class strings in HTML,
JSX, Vue, Svelte and Astro files and cn()/clsx()/cva() calls.
test/design-lint-tailwind.test.ts holds a negative control and a planted
tell per rule plus the tailwind-fail, tailwind-pass and clean fixtures.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…g rules page-only

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…loplint

Structure: template-cards, nested-cards, vh-height, raw-spacing, off-scale-spacing, overflow-x-unclipped (static half), bare-fr-track, display-head-unwrapped, radio-tab-jump, double-sticky, screen-word-budget (static half), and a conservative static half of wide-container. Motion: layout-transition, spacing-transition, hover-tells, bounce-easing, focus-ring-fade, tooltip-focus-delay, autorotate-no-pause, missing-focus-visible, missing-states, missing-reduced-motion, autoplay-unmuted, lazy-lcp, video-without-poster, input-state-shift, control-height (static half), content-hidden-at-rest. Every rule has a planted positive and a negative control; the clean fixture lede drops to eleven words so the hero-paragraph budget holds.
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…mponent family only

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…-only; lazy-lcp title

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…rom sloplint

Chrome (gates 19 42 46a 47 54 63 68 69 70 85): gate 19 split by tell onto
aphoristic-cadence, generic-hero-copy, generic-cta-copy, em-dash-overuse and
template-footer-line in rules/chrome-copy.ts (with the two-filled-buttons half
of F4 and the shared prose mask); the eyebrow in rules/chrome-eyebrow.ts; the
nav and footer shapes, invented proof, drawn chrome, placeholder services,
template punctuation, wireframe slots, repeated facts, the fake send and a
static version of the email-band close in rules/chrome.ts.

Assets (gates 30 33 40 41 49 76): emoji icons, mixed icon libraries, unlabelled
svg/canvas, contrast pairs and surface inks (suspected at ask in the static
tier), wrapping labels split into button-label-wraps and link-wraps, broken
images and stock hotlinks.

Finish (F1-F9 F15 F16 F21-F24): all polish except fake-avatar.

Tests cover every id with a negative control and a planted positive; the clean
fixture gains scrollbar-color so its committed palette themes every browser
surface.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…rose moves to html.ts; isTokenRule takes a Pick; ratchet watches every lint module

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…a skip link, main id and aria-current so the copy tier passes them too; waiver fixture gets a meta description

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…er port)

Ports hallmark's sloplint-render.mjs onto lib/aside-render: one tab per
page, the in-page probes installed once and run at each viewport, a second
pass with full-page screenshots only when a contrast claim needs the painted
pixels (a small PNG reader replaces canvas sampling). Gates 23, 25, 26a, 34,
40, 41, 44a-d, 49a/b, 58, 71, 72, 73, 75, 77-83, F17-F20, plus the page that
did not render. The stamp's posture, hero-shape, photo-shape and genre
guards are gone: the strict form applies. Focus rings are read by focusing
each control in turn (programmatic focus matches :focus-visible on the
daemon with no prior pointer input; a stylesheet scan is the fallback).

lib/aside-render: an eval step takes width/height like a screenshot step
(device metrics on Aside, viewport on browse, cleared after), and spec.file
may be an http(s) URL, opened as it is with nothing served.

The clean fixture gained border-box on its hero, a centred, taller hero
visual, a wrapping actions row, a statement-sized close head and a shorter
story paragraph: the browser showed the action below the 1280x800 fold, a
dead band under the hero, a 600px image spilling past a phone screen and a
thin close section.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…tchet; the clean hero sits at a fixed measure so text and visual stand together; CHANGELOG names the aside-render eval viewport

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@trunk-io

trunk-io Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

garrytan and others added 10 commits October 26, 2026 06:35
…e hallmark licence texts as free-only PR files, so the PR paid lane stays narrow and test/free-fixtures.test.ts passes

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…with the six-to-nine section count) and the hero action count; a free test over the recorded review slop page; usage, render glue, file walk, multi-page ownership and copy-tier tests; NOTICE and licences leave FREE_ONLY_PR_FILES so the paid-free boundary test stands

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…Only so --scope component drops them

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Waivers reach render findings; a blocking rule the lint only suspected is
waivable like any ask, a measured or absent Floor stays refused. A stylesheet
a page links from another directory belongs to that page and is not linted
again on its own; a stylesheet linted alone keeps its waivers. Root-relative
hrefs resolve against the lint root. Stylesheets are read and parsed once per
run. A rule family that throws reports internal-error at ask instead of a
silent pass; aria-labelledby and probe tag names are escaped before they
reach a RegExp; a probe result naming an unknown rule is a render finding,
not a crash; fix strings are one line. overused-font follows gstack's
catalog of display faces; one MONO_FACE list for every monospace check.
parseCss caps nesting depth; medianRgb uses histograms; glHide batches its
layout reads. Dead exports removed (isPage, openTags, over, ComponentTag,
PixelRect, the ids re-exports).

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…e scan, drop an unused parameter, clean up test tmpdirs

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Waivers settle once per page after both tiers, so a blocking rule only the
render tier suspects is waivable and one it measures is refused; a claim in a
stylesheet answers for that stylesheet on every page that links it (no
shared-word check), so a sheet shared by two pages is no longer waived on one
and refused on the other. Every printed field is one line with control
characters stripped; the waiver regex is linear and ends at a carriage
return; a root-relative href cannot climb out of the lint root. The ancestor
map closes optional end tags implicitly and pops to the matching open tag, so
unclosed <li> no longer makes it quadratic. The static tier reports outline:
none with no ring anywhere as missing-focus-visible at its line;
literal-outside-tokens needs a --color-* or --font-* token to exist; the
banned gradient includes indigo-to-violet; a new banned-font rule reads
gstack's BANNED_FONTS; MONO_FACE matches whole words; bold keywords and
tokens count as weight 700 for the contrast threshold. stylesFor reads only
the entries that can match; glOcclusion memoises the pinned walk; the
confirm screenshot is taken at 1x; a page that throws in the render tier is a
render finding and the CLI exits 3 on an internal error. Docs name the token
conventions and what the lint does not cover.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…in linear time, keep commented-out style and script dead

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…zontal-scroll when merging widths

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
garrytan and others added 24 commits October 26, 2026 09:26
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
The placeholder emoji scan reads the comment-blanked text, so markup inside <!-- --> is dead for every rule. A digit run, a long mono word and a run of scheme prefixes cost their length (FACT and UNSPLASH_URL only start at a token, twDataText bounds its text); a 2 MB sheet of 699k rules no longer blows the stack (rules are appended in loops); JsxScanner spends one failure budget across jsScan and el; the Tailwind had() lookup is a Set; accentedHeads indexes rules by class once; contexts drop their caches once their families have run; the parsed-token cache is bounded. treeOf gives a close tag its parent so a fact after an inline close is counted in its section. Waivers are keyed per rule for a page claim and per rule@sheet for a stylesheet claim, so two linked sheets each answer for their own findings. The render tier validates every page-supplied field (at.cls, ring colour and ratio, probe fg and threshold, PAGE_ERRORS entries, a malformed entry naming the render rule) and keeps its measured findings; lineOf answers from one line index. Rule judgement: a textarea's min-height is not control-height, attribute-selected inputs are read for input-state-shift, a glyph-only <i> is not an italic word, a bounce keyframe by name is bounce-easing, single-quoted inline styles are read, a project root is a package.json or .git. Housekeeping: Probes typed from PROBE_FNS, EYEBROW_* shared from chrome-eyebrow, WaiverClaim.raw and dead imports removed, evidence wording for tracked-only controls and black glass, emoji icon tiles capped like every other emoji path, unreadable files get their own fix text.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
test/design-lint-fifth-cycle.test.ts (21 tests) pins the comment-dead placeholder, the linear-time digit run, 699k-rule sheet, unclosed JSX and tracked-label pages, per-sheet waivers and the remaining state-matrix cells, every wrong-shaped render field, and the rule judgements; the fourth-cycle shell test asserts the observable effect, the RSS assertion is structural, time bounds are widened for shared CI shards, the stale empty block is gone, and the FREE_FIXTURES inventory names both cycle files. docs/design-lint.md states the project-root bound on relative hrefs and the three narrow readings (whole-page focus ring, unconditional 4px scale, scroll-container-blind double-sticky).

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
line-length computes its floor only for a measure between 28 and 45ch and
answers shortProse once per class; wide-tracking resolves inherited case
through a prefix index instead of a scan of every rule; the JSX scanner
fails every ancestor of an element that ran to the end of the file at once;
the hairline-under-shadow pair reads class tokens instead of a two-sided
regex. tooltip-focus-delay names the sheet that holds the :focus delay;
the placeholder emoji scan reads the comment-blanked body for every kind;
fake-send finds its line in a component's script text. A stylesheet href is
bounded by its real path too. The LINT line's separator is kept out of
page-supplied text. Waivers: a component claim answers for its own file,
weighed against its own text; the Waiver shape is a reason string; refusals
go through Reporter. Render: a later fail replaces a warn with the same
evidence, a non-string fix is dropped, the timeout is a constant. Rules:
a meta label in mono is a costume, a leading-dot length reads as a fraction,
a percentage leading collides like a unitless one, an italic word after an
icon is still read, an italic rule on the word is not a display system, en
dashes between digits are ranges, and the catalog's two hero lines are
generic-hero-copy. The Tailwind parse cache and its eviction are gone.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
test/design-lint-sixth-cycle.test.ts (18 tests; 13 red at 3f0c625) pins
the per-page work, the right-place findings, the rule judgements and the
waiver and render cells the state matrix named. The emoji-tile cap is
asserted exactly, the pixel-pass test says what it checks, the recorded slop
page now names its generic hero copy. docs/design-lint.md: the real-path
bound, the separator note, page and component claim scopes, hero-fold's
measured half, two more items the lint does not cover, the heading-pattern
exemption and the digit-range dash.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
A tag start the scanner finds no '>' for is spaced out of doc.src, so every
'[^>]*>' scan over a page (the lint's and the craft check's) costs the page
its length; render's line lookup reads the same text. The JSX scanner skips
a generic element's type arguments and closes every element under a close
tag that names an open ancestor, as a browser would; a closer naming nothing
open is text. The token table is read in one colour mode: the base block's
last declaration wins and a prefers-color-scheme or data-theme override only
fills tokens the base never declares; a custom property declared in any
scope is a token definition, not a literal; a token finding points at the
declaration that won. In a directory of components, under either scope,
each file's claims answer for that file alone with its own suspected rules.
The Tailwind dedupe keys files the way Reporter prints them. outline: none is
not a ring for input-state-shift; a form with a password or a sign-in button
is not an email band; one CONTROL_TRACK_MAX_EM (0.04) for both halves of
wide-tracking; one CONTRAST_SLACK; hairline-under-shadow splits layers with
splitTop; a missing linked stylesheet is warned about; TwItem.toks and the
controlHeight scope guard are gone; zero-chroma-neutrals is titled for what
it reads. aside-render sets the device override or viewport only when a
sized step's size changes and clears it before an un-sized step.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
test/design-lint-seventh-cycle.test.ts (13 tests) pins the stray-tag tail,
the shadow-layer split, the JSX generic and ancestor-closing cases, the
one-mode token table, the per-file component claims under both scopes with
their own suspected rules, the stylesheet beside components, the Reporter
file key, outline: none, the sign-in form, the shared tracking ceiling and
the missing-stylesheet warning. docs/design-lint.md: the token block and its
mode overrides, the stray-tag note, the component-directory claim scope,
the email-band exclusions, the missing-sheet warning and zero-chroma-neutrals
as a fourth narrow reading.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Waivers follow the context's shape, not the --scope flag: one html page keeps
page semantics under either scope (its claim reaches the sheet it links) and a
lone component beside an unlinked stylesheet answers for its own file only.
Every '<' that starts no tag is a stray spaced out of doc.src (a '<!' or '<?'
with a '>' ahead stays), an unclosed comment runs to the end of the file, the
three bare /<[^>]*>/ strips use stripTags, the copy tier drops open script,
style, template and nav tags nothing closes, component tags are paired once
per document, columnCount counts repeat() arithmetically, an unclosed
@starting-style block is read once, the import scan matches import shapes
only, the render locator refuses a non-letter tag and reads the class
attribute linearly, tickers are answered from the tree, a tooltip duration is
not a delay, class tokens are appended in a loop, the emoji dedupe is keyed by
the icon, the emoji classes spell U+FE0F and U+200D as escapes, the contrast
and focus viewports are named once, and the hero-fold title matches what the
probe measures.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
nestSelector stops expanding a comma list nested in a comma list past an
8 KB selector, resolveVars never substitutes a token over MAX_RESOLVED and
stops growing a value past it, a stylesheet or <style> block the lint could
not parse (or a linked sheet over the size cap) is an internal-error finding
through the Skipped list, which now carries a kind; stripTags takes a visible
character limit so the emoji and label reads do not pay for an element that
runs to the end of the file; assets.ts records every quoted emoji finding
and component.ts splices the one at its line; columnCount drops named lines
inside repeat(); doc.text is built from the stray-blanked source;
Reporter.report returns the finding; the 1280 probes read their viewport
from the page; openTags loses its unused limit; the CHANGELOG hero-fold note
matches what the probe measures.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
The fourth-cycle unclosed-run test states its own timeout: its per-fixture
bound is 8 s and the four fixtures together pass bun's 5 s default.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
css.ts selectorNames reads the tag and class names a selector list mentions
once, so nowrap coverage, wrapping coverage and the roman-em check answer per
element in constant time; shortProseOf reads elements by class from an index
built once per document; font-family-count keeps a Set of family keys; the
import scan gives the optional paren its own whitespace; a JSX expression that
runs to the end of the file fails every ancestor at once; the render locator
reads class and not data-class; tooltip-focus-delay reads the delay slot of
the transition shorthand, so 200ms is a duration like 0.2s.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
tooltip-focus-delay splits the transition value at top-level commas, so a
delay after cubic-bezier() or steps() is still read; nestSelector budgets one
substitution per '&' before expanding; stripTags with a limit stops reading
at the limit instead of after the next tag; accentedHeads reads each span's
text once and covers classes from one map; a JSX close tag with no '>' is
text, not a failure every ancestor rescans; selectorNames reads the tag that
opens an :is()/:where() list; a linked sheet that cannot be read is
unreadable, not unparseable; the space probes read their viewport from the
page; the internal-error title covers a page or stylesheet the lint could not
read.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
A nested rule under a parent longer than the selector cap falls back to the
parent's first part cut to 256 characters, the :is() wrapper is built only on
the expanding path, and every stored selector is cut at MAX_SELECTOR; the
limited stripTags counts visibility with the whitespace class its callers
collapse on and never cuts a surrogate pair; glWords slides its window by
innerHeight.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@github-actions github-actions Bot changed the title feat(design-lint): bundled free design lint (bin/gstack-design-lint + lib/design-lint/), hallmark sloplint port v1.91.251.0 feat(design-lint): bundled free design lint (bin/gstack-design-lint + lib/design-lint/), hallmark sloplint port Oct 26, 2026
@capy-ai
capy-ai Bot merged commit fa3a240 into main Oct 26, 2026
62 checks passed
garrytan added a commit that referenced this pull request Oct 26, 2026
…ded)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
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