Skip to content

Examples pass their own hard gates: 61 failures → 0 - #60

Open
richm-spp wants to merge 12 commits into
Nutlope:mainfrom
richm-spp:fix/examples-pass-their-own-gates
Open

Examples pass their own hard gates: 61 failures → 0#60
richm-spp wants to merge 12 commits into
Nutlope:mainfrom
richm-spp:fix/examples-pass-their-own-gates

Conversation

@richm-spp

Copy link
Copy Markdown

Stacked on #59 — review the last 4 commits until that merges (the first 8 are #59's checker suite, which this depends on).

Running #59's gates.mjs over site/examples/ found 61 hard gate failures across 11 of the 18 example pages, all of whose CSS stamps claim gates: all-pass:

Gate Count Pages
38a — italic heading/display 48 bananastudio ×15, tally ×8, wayfare ×8, najm ×6, lumen ×5, hyperlane ×3, hum-07, press-01, carnival
55 — uppercase display with line-height < 1.0 8 carnival (0.82–0.92)
34 — root overflow-x: hidden (breaks sticky; gate prescribes clip) 2 carnival, cobalt
22 — sub-floor chroma neutrals 3 grid-01 (0.003/0.004 vs the 0.005 floor)

Every fix is the gate's own prescribed remedy, and the copy survives untouched: where the italic was an <em> inside a heading, the tag became <span class="accent"> with the CSS following it (gate 38a bans the markup, not just the computed style) — the rendered text of every modified page is byte-identical to the previous tree (verified by stripping tags and diffing).

Also in this PR, two gates.mjs correctness fixes found while doing the work: conditional token blocks ([data-theme=…], [data-paper=…]) only apply when the markup carries the attribute — previously a page that inlined its CSS self-triggered its own conditional selectors — and custom-prop resolution respects selector applicability.

The CI baseline introduced in #59 drops from 61 to 0 with a "never raise" comment, so regressions in the examples fail the build from here on.

tools/verify/worklist.mjs (included) emits the per-page findings as JSON — it's how the fix list above was generated, and it's reusable for future sweeps.

richm-spp and others added 12 commits August 11, 2026 23:51
The skill's runtime behaviour is 'read the index, load only the picks', so a
link that doesn't resolve is a failed file read mid-build. Nothing in the repo
checked this.

Reports 31 broken instances / 28 unique file->target pairs on the current tree,
all in docs/ and site/_tests/. The runtime graph inside skills/ is clean at
274/274, which --runtime asserts separately.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Derives the theme list and the gate list from the artifacts, then asserts the
prose agrees. Catches the class of drift that produced the gate 57 defect: grid
was added by PR Nutlope#57 and the gate enumerating the catalog was never updated, so
the gate silently stopped covering the case it exists for.

Finds 3 real disagreements on the current tree: README claims 57 gates twice
(the artifact has 58 - 1-57 plus sub-gate 38a), and gate 57's allowlist omits
grid.

Each assertion was falsified before being trusted: version drift, a 22nd theme
landing, and a gate deleted without renumbering all turn it red. An allowlist is
detected as a comma-separated run of 5+ theme names, so the example mentions in
gates 38a and 55 ('Studio / Garden / Sport') no longer false-positive.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Twelve of the 58 gates are pure pattern-matching over emitted CSS/HTML. This
runs them for real: a small dependency-free CSS parser (rules carry their
at-rule context, so a declaration inside @media (prefers-reduced-motion) is
distinguishable from one outside — several gates hinge on exactly that),
one-level var() resolution, and inline <style> extraction.

Hard tier fails the run; advisory tier (needs-judgment gates: prose measure,
off-scale spacing, token bypass, 1fr-with-image) reports without failing, and
--strict promotes it.

Against the 30 committed examples: 61 hard failures, 246 advisories across 18
pages — while the pages' own CSS stamps declare 'gates: all-pass'. The findings
are the gates' own letter: <em> inside h1/h2 (banned by discipline 6),
body { overflow-x: hidden } (gate 34 mandates clip), uppercase display at
line-height 0.82-0.92 (gate 55 floor is 1.0), paper tokens at chroma 0.003
(gate 22 minimum is 0.005). Self-scoring said pass; the machine disagrees.

Checker was falsified against its own false positives before being trusted:
black box-shadows are compositing not palette (gate 22 now skips shadow/mask
props and alpha'd values), display headlines are not prose (gate 25 excludes
heading selectors and is advisory), .masthead-meta is not in gate 38a's
enumeration (selector tightened to the gate's own list).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
links and counts gate hard (they will go green in the fix commits that follow).
gates runs as a regression baseline: the historical examples carry 61 known
hard failures, so the job fails only if that number grows. Ratchet the baseline
down as examples are fixed; never up.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Every relative link in docs/ was broken (wrong depth prefix), the verbs
fixtures were one level short of the repo root, two links also pointed at
study-examples.md in a directory it never lived in, and one link targeted the
never-committed refine verb fixture (unlinked; the prose contrast stands).

The runtime graph in skills/ needed nothing - it was already 274/274.
links.mjs: 31 broken -> 0.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Grid landed via PR Nutlope#57 and neither the README's gate count nor gate 57's own
catalog enumeration was updated - so the gate written to catch studied-DNA
drift could not fire for the newest theme, and the README undercounted by one
(1-57 plus sub-gate 38a).

Both now guarded by tools/verify/counts.mjs, which derives the real numbers
from the artifacts.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The minimal wordmark nav was addressed as both N1 and N1a across seven files
('N1 (N1a)' in the cookbook index), while the load rule maps a code to
components/<code>-<slug>.md - so the N1a spelling pointed at a file that does
not exist (n1a-*.md). Prose now converges on N1, matching
n1-wordmark-2-links.md on disk; N1b keeps its own file and code.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
python3 -m http.server is not available on a standard Windows install, and
Windows users are half the audience of a Claude Code / Cursor skill. npx serve
works wherever node does - which the skill already requires.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Found by the end-to-end brand build: the emitted page concatenates the brand
file including its [data-paper=dark] block, which a browser correctly ignores
on a light page - but gates.mjs built its custom-prop map last-write-wins
across ALL rules, so B1 read the dark values on a light page and failed a page
that renders correctly.

Rules now contribute custom props only when their selectors can match the
document (attribute selectors require the attribute in the HTML, class-scoped
selectors require the class). Verified three ways: the light page passes; the
same page with data-paper=dark flips to the dark values and correctly FAILS
(dark accent on a still-light newsprint paper - a real misconfiguration the
gate should catch); the 61-failure example baseline is unchanged.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
(cherry picked from commit 9b29a5f)
Eleven pages carried 61 hard slop-test violations while their stamps claimed
'gates: all-pass'. Fixed per each gate's own prescribed remedy, one page at a
time, each verified to 0 by tools/verify/gates.mjs:

- 38a (48x): heading/display italic removed. Where the italic was an <em>
  inside h1-h6, the tag became <span class="accent"> with the words
  byte-identical and the CSS selector following it, since gate 38a bans the
  markup itself, not just the computed style - emphasis now carried by accent
  colour/weight per discipline 6. Verified: rendered text content of every
  modified page is byte-identical to HEAD.
- 55 (8x, carnival): uppercase display line-heights raised from 0.82-0.92 into
  the 1.02-1.08 band, preserving the original tightness ordering.
- 34 (2x): body overflow-x hidden -> clip on html AND body.
- 22 (3x, grid-01): paper chroma nudged 0.003/0.004 -> 0.005/0.006, hue and
  lightness untouched.

Also adds tools/verify/worklist.mjs, the machine-readable per-page findings
emitter that drove the fix fan-out.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
(cherry picked from commit cb11c09)
The examples are clean; the baseline is now zero and the workflow comment says
it must never be raised.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
(cherry picked from commit 44f0c47)
A page that inlines its CSS contains its own selector text — e.g. the literal
string data-paper="dark" inside <style> — which counted as the document
carrying that attribute and activated conditional token blocks that don't
apply. Applicability now matches against the markup with <style> blocks
stripped.

(Extracted from a downstream commit; only the gates.mjs hunk is generic.)
@vercel

vercel Bot commented Aug 12, 2026

Copy link
Copy Markdown

@richm-spp is attempting to deploy a commit to the Together AI Team on Vercel.

A member of the Team first needs to authorize it.

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