-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchecks.json
More file actions
4181 lines (4181 loc) · 256 KB
/
Copy pathchecks.json
File metadata and controls
4181 lines (4181 loc) · 256 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"version": 2,
"generated": "2026-07-04",
"note": "Legacy deterministic craft/prose detectors are candidate extractors only: matches route to Impeccable or Unslop and do not fail Artifacture. Artifacture owns mechanics, evidence, and artifact semantics. Stage counts: {\"static-text\":70,\"static-dom\":69,\"llm-pass\":30,\"browser\":37,\"transcript\":2}",
"checks": [
{
"family": "F1_slop_global",
"id": "forbidden-body-font",
"title": "Forbidden AI-slop font as primary --font-body",
"profiles": [
"page",
"slides",
"magazine",
"video-comp"
],
"stage": "static-text",
"severity": "error",
"applies_when": "CSS declares a `--font-body` custom property or a `body`/`html { font-family }` rule.",
"spec": "Parse `--font-body: <stack>;` and any `body`/`html { font-family: <stack> }`. Extract the FIRST (primary) family in the stack, strip quotes. Fail if it case-insensitively equals Inter, Roboto, Arial, or Helvetica, OR if the whole stack is only generic keywords (system-ui / sans-serif / serif) with no named webfont preceding them. Only the primary entry counts — these names as trailing fallbacks pass. Named aesthetics (Mono-Industrial/Nothing) already use their own allowed primaries, so this fires only when a banned family sits in the primary slot.",
"fixture_violation": "Page whose `--font-body: 'Inter', sans-serif;` puts Inter in the primary slot.",
"fp_guards": "Ignore Inter/Roboto/Arial/Helvetica when they appear only as later fallbacks in the stack, in a non-body role (--font-mono, headings), or inside <code>/prose discussing fonts.",
"impl_hint": "/--font-body\\s*:\\s*([^;]+)/i then split(',')[0].replace(/['\"]/g,'').trim()",
"source_rules": [
"forbidden-primary-body-fonts",
"font-forbidden-body-fonts"
]
},
{
"family": "F1_slop_global",
"id": "forbidden-accent-colors",
"title": "Forbidden Tailwind-default violet/neon accent hexes",
"profiles": [
"page",
"slides",
"magazine",
"poster",
"video-comp"
],
"stage": "static-text",
"severity": "error",
"applies_when": "Any <style> block or inline style= attribute present.",
"spec": "Case-insensitively scan <style> blocks and inline `style=\"\"` attributes (NOT text nodes/code) for hex 8b5cf6, 7c3aed, a78bfa (indigo/violet), d946ef (fuchsia), 06b6d4, f472b6 (cyan/pink neon) — with or without leading #, plus their rgb()/rgba() equivalents. Any match = fail.",
"fixture_violation": "Page CSS with `--accent: #8b5cf6;`.",
"fp_guards": "Scope strictly to style contexts, not prose/code that documents the hex; Mermaid themeVariables colours are covered separately by the mermaid family.",
"impl_hint": "/#?(8b5cf6|7c3aed|a78bfa|d946ef|06b6d4|f472b6)\\b/i restricted to <style>…</style> and style=\"…\" spans",
"source_rules": [
"forbidden-accent-colors"
]
},
{
"family": "F1_slop_global",
"id": "forbidden-gradient-text-headings",
"title": "Gradient-clipped text on headings",
"profiles": [
"page",
"slides",
"magazine",
"poster",
"video-comp"
],
"stage": "static-text",
"severity": "error",
"applies_when": "CSS contains `background-clip: text` or `-webkit-background-clip: text`.",
"spec": "Find CSS rules that combine a `linear-gradient(`/`-webkit-linear-gradient(` background with `background-clip: text` (or `-webkit-background-clip: text`) and transparent/clipped text fill, on a heading-ish selector (h1–h4, .title, .headline, .hero-title, .display, .kicker). Any such rule = fail.",
"fixture_violation": "`h1{background:linear-gradient(...);-webkit-background-clip:text;color:transparent}`.",
"fp_guards": "Very specific combo; low FP. SVG/diagram title gradients are owned by the diagrams family (no-gradient-text-titles).",
"impl_hint": "Match rule blocks containing both /background(-image)?\\s*:\\s*[^;]*gradient/ and /-?(webkit-)?background-clip\\s*:\\s*text/",
"source_rules": [
"forbidden-gradient-text-headings",
"no-gradient-text-titles"
]
},
{
"family": "F1_slop_global",
"id": "forbidden-glow-pulse-animations",
"title": "Glow/pulse keyframes and infinite motion on static content",
"profiles": [
"page",
"slides",
"magazine"
],
"stage": "static-text",
"severity": "error",
"applies_when": "CSS contains `@keyframes` or an `animation`/`animation-iteration-count` declaration.",
"spec": "Fail if either: (a) a `@keyframes NAME{}` whose NAME matches /glow|pulse|breathe|shimmer/i AND whose body animates `box-shadow` or oscillates `opacity`/`filter`; or (b) any `animation:` shorthand / `animation-iteration-count: infinite` applied to a selector that is NOT a progress/loading/spinner element.",
"fixture_violation": "`@keyframes glow{0%{box-shadow:0 0 4px}50%{box-shadow:0 0 24px}}` applied via `animation:glow 2s infinite` to a `.card`.",
"fp_guards": "Exempt `.progress`/`.loading`/`.spinner`/[role=progressbar]; require infinite iteration or a glow/pulse-named box-shadow/opacity keyframe — do not flag one-shot user-triggered transitions. Mono-Industrial zero-onload-motion is owned by the mono family.",
"impl_hint": "Regex @keyframes bodies for box-shadow/opacity; regex /animation[^;]*infinite/ and check selector against progress allowlist.",
"source_rules": [
"forbidden-glow-pulse-animations"
]
},
{
"family": "F1_slop_global",
"id": "no-emoji-in-ui-chrome",
"title": "Emoji in section headers, status indicators, or table cells",
"profiles": [
"page",
"slides",
"magazine",
"poster",
"video-comp"
],
"stage": "static-dom",
"severity": "error",
"applies_when": "Document has any heading, `.status*` indicator, or `<td>`.",
"spec": "Query own text content of section headings (h1–h6, .section-label, .section-header, .kicker), status indicators (.status, .status--*, .status-dot*), and table cells (`td`). Fail if any contains an emoji codepoint (U+1F300–1FAFF, U+2600–27BF, U+2B00–2BFF, U+1F000–1F0FF, U+FE0F, and ✅❌⚠️). Icons must be inline SVG or CSS shapes, not emoji glyphs.",
"fixture_violation": "`<h2>🚀 Architecture</h2>` (or a `<td>✅</td>` status cell).",
"fp_guards": "Inspect each element's own text nodes only; styled <span>/inline-SVG status dots with no glyph pass; emoji inside <code>/<pre> shown as literal content is exempt.",
"impl_hint": "Emoji Unicode-range regex over el.textContent for the three selector groups.",
"source_rules": [
"no-emoji-section-headers",
"table-status-no-emoji",
"no-emoji-in-status-indicators"
]
},
{
"family": "F1_slop_global",
"id": "no-three-dot-window-chrome",
"title": "macOS traffic-light dots on code blocks",
"profiles": [
"page",
"slides",
"magazine"
],
"stage": "static-dom",
"severity": "error",
"applies_when": "Page has a code-block header (`.code-block` header / `.code-file__head` / header preceding a `<pre>`) containing >=3 round sibling elements.",
"spec": "In a code-block header, detect exactly 3 small circular sibling elements (border-radius:50% or ~equal width/height <=16px) whose declared background-colours approximate the traffic-light triple (red ~#ff5f56, yellow ~#ffbd2e, green ~#27c93f, within tolerance). A red/yellow/green triple atop a code block = fail; use a filename/language label header instead.",
"fixture_violation": "Code-block header with three 12px spans coloured #ff5f56 / #ffbd2e / #27c93f.",
"fp_guards": "Must sit specifically on a code-block header, not a status legend; require the red/yellow/green colour signature, not any three dots.",
"source_rules": [
"no-three-dot-window-chrome"
]
},
{
"family": "F1_slop_global",
"id": "no-placeholder-leak",
"title": "Unresolved template placeholders / generic stand-ins",
"profiles": [
"page",
"slides",
"magazine",
"poster",
"video-comp"
],
"stage": "static-text",
"severity": "error",
"applies_when": "Always.",
"spec": "Regex the final HTML for `{{[A-Za-z0-9_]+}}` and `{{NN}}` tokens, standalone `TODO`/`FIXME`, `Lorem ipsum`, and generic placeholder names `\\bModule [A-Z]\\b` / `\\bComponent [A-Z]\\b`. Any match outside a <code>/<pre> block that is demonstrably documenting template syntax = fail.",
"fixture_violation": "Body contains `{{skill_dir}}` or an h2 literally titled 'Module A'.",
"fp_guards": "Allow matches inside <code>/<pre> demonstrating template syntax; require the token to read as an unresolved placeholder (inside {{ }} or a Module/Component [A-Z] card title), not legitimate prose that mentions the word TODO.",
"source_rules": [
"no-placeholder-leak",
"no-leftover-placeholder-tokens"
]
},
{
"family": "F1_slop_global",
"id": "self-contained-html-file",
"title": "No external local asset references",
"profiles": [
"page",
"slides",
"magazine"
],
"stage": "static-text",
"severity": "error",
"applies_when": "Always (document has src=/href= attributes).",
"spec": "Scan all `src=`/`href=` attribute values; fail if any resolves to a relative/local filesystem path (does not start with http://, https://, data:, blob:, #, mailto:, tel:). CDN links (https) and data:/blob: URIs are allowed; the artifact must be one portable file.",
"fixture_violation": "`<img src=\"./assets/logo.png\">` or `<link href=\"styles.css\" rel=\"stylesheet\">`.",
"fp_guards": "Exclude in-page anchors (#…), mailto:, tel:; allow https/data/blob.",
"source_rules": [
"self-contained-html-file",
"file-shape-self-contained-html"
]
},
{
"family": "F1_slop_global",
"id": "file-structure-head-contract",
"title": "Doctype / charset / viewport / title present",
"profiles": [
"page",
"slides",
"magazine"
],
"stage": "static-dom",
"severity": "error",
"applies_when": "Artifact is a standalone HTML file (page/slides/magazine).",
"spec": "Per SKILL.md File Structure, assert the raw file starts with `<!DOCTYPE html>` (case-insensitive) and the parsed DOM contains `<meta charset>`, `<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">`, and a non-empty `<title>`. Any missing piece = fail.",
"fixture_violation": "Page missing the `<meta name=\"viewport\">` tag (or an empty/absent `<title>`).",
"fp_guards": "None significant; poster (TSX→PNG) and video-comp compositions are excluded — they have their own root/canvas contracts.",
"source_rules": [
"self-contained-html-file"
]
},
{
"family": "F1_slop_global",
"id": "theme-both-light-dark",
"title": "Both light and dark palettes defined",
"profiles": [
"page",
"slides",
"magazine"
],
"stage": "static-text",
"severity": "error",
"applies_when": "`:root` defines color-like custom properties (--bg/--surface/--text/--border/--accent/etc.).",
"spec": "Parse <style>. Collect color custom properties in the top-level `:root{}`. Require a dark override block — `@media (prefers-color-scheme: dark){:root{…}}` OR `:root[data-theme=\"dark\"]{…}` — that redefines at least the core semantic set present in light (bg/surface/text/border/accent, case-insensitive substring). Fail if color custom props exist but no dark override block, or the dark block omits the core set.",
"fixture_violation": "`:root{--bg:#fff;--text:#111;--accent:#c33}` with no dark-mode block anywhere in the file.",
"fp_guards": "Skip pure-grayscale utility pages with zero color custom props; poster is single-theme by design and excluded.",
"source_rules": [
"theme-both-light-dark",
"every-aesthetic-defines-both-modes"
]
},
{
"family": "F1_slop_global",
"id": "no-default-link-color",
"title": "Links must not use UA-default color",
"profiles": [
"page",
"slides",
"magazine"
],
"stage": "static-text",
"severity": "warn",
"applies_when": "Document has >=1 `<a href>` (excluding #, mailto:, tel:).",
"spec": "If the document contains real links, assert the CSS has an `a`/`a:link`/`.prose a` rule setting `color` to a non-initial value (ideally `var(--accent)`). Fail if links exist but no link-color override rule is present, since UA-default link blue looks unstyled and has poor contrast on dark backgrounds.",
"fixture_violation": "Page with body links and no `a{color:…}` rule (renders default blue).",
"fp_guards": "Skip entirely when the document has zero <a> tags; any color rule targeting links passes.",
"source_rules": [
"no-default-link-color"
]
},
{
"family": "F1_slop_global",
"id": "css-class-node-collision",
"title": "Page-level .node class collides with Mermaid",
"profiles": [
"page",
"slides",
"magazine"
],
"stage": "static-text",
"severity": "error",
"applies_when": "Page uses Mermaid (`class=\"mermaid\"` / `.mermaid` / `mermaid.initialize`).",
"spec": "Scan CSS selectors for a bare `.node` class token not nested under `.mermaid`, and scan HTML for an element whose class list contains the exact token `node`. Either = fail — Mermaid uses `.node` internally on SVG <g> elements, so page-level `.node` rules leak into diagrams; use `.ve-card` instead.",
"fixture_violation": "A Mermaid page with a page-level `.node:hover{transform:translateY(-2px)}` rule.",
"fp_guards": "Exact token boundary only — do not match `.node-list`/`.node-a`; `.mermaid .node` scoped rules are allowed; only enforce when Mermaid is present on the page.",
"impl_hint": "/(^|[\\s,{])\\.node(?![-\\w])/ (excluding /^\\.mermaid\\s+\\.node/) and class=\"([^\"]*\\s)?node(\\s[^\"]*)?\"",
"source_rules": [
"no-node-class-name",
"mermaid-no-page-level-node-class"
]
},
{
"family": "F1_slop_global",
"id": "code-block-whitespace-preserved",
"title": "Code/tree blocks preserve whitespace",
"profiles": [
"page",
"slides",
"magazine"
],
"stage": "static-text",
"severity": "error",
"applies_when": "Page has a `<pre>`, `.code-block`, `.code-file__body`, or `.dir-tree`.",
"spec": "For CSS rules targeting block code containers (`pre`, `pre code`, `.code-block`, `.code-file__body`, `.dir-tree`), assert `white-space` is pre / pre-wrap / pre-line (never normal). Directory-tree / box-drawing containers (`.dir-tree`, or text containing ├└│─) must specifically be `pre` — pre-wrap soft-wraps and breaks connector alignment. Missing declaration or `normal` = fail.",
"fixture_violation": "A `.code-block` with no white-space declaration (defaults to normal, code runs together).",
"fp_guards": "Inline `<code>` inside running prose is exempt (normal is correct); scope to block-level code containers only.",
"source_rules": [
"code-block-pre-wrap-required",
"code-block-whitespace-preserved",
"dir-tree-whitespace-pre-required"
]
},
{
"family": "F1_slop_global",
"id": "code-block-length-constrained",
"title": "Long code needs collapse or max-height",
"profiles": [
"page"
],
"stage": "static-dom",
"severity": "warn",
"applies_when": "Page has a `<pre><code>` block over ~100 lines or that would render taller than ~500px.",
"spec": "For `<pre><code>` blocks NOT inside `<details>`: (a) if newline-delimited line count > 100 → warn (avoid dumping full files; use outlines/collapsible/snippets); (b) if the block would render taller than ~500px, require `max-height` set and `overflow-y: auto|scroll`. Either unmet = warn.",
"fixture_violation": "A 150-line `<pre><code>` not wrapped in <details> and with no max-height/overflow.",
"fp_guards": "Exempt code inside `<details>`; short snippets exempt; slides/magazine paginate and are out of scope (scroll rule).",
"source_rules": [
"no-full-file-dump",
"code-block-height-constraint"
]
},
{
"family": "F1_slop_global",
"id": "real-table-for-tabular-data",
"title": "Tabular data must use a real <table>",
"profiles": [
"page",
"slides",
"magazine"
],
"stage": "llm-pass",
"severity": "warn",
"applies_when": "Mechanical prefilter matches: a div-based structure with >=3 sibling row-like divs each holding >=3 cell-like children with consistent per-column classes (>=4 rows or >=3 cols).",
"spec": "For each prefiltered div-grid region, feed the LLM that region's HTML plus a screenshot crop. Rubric question: 'Does this div-grid present row/column tabular data (comparison / audit / status matrix) that should be a semantic <table>, rather than a card grid / KPI row / feature grid?' A YES = warn (rebuild as <table>/<thead>/<tbody>).",
"fixture_violation": "A 4-row x 3-col comparison built from `<div class=row><div class=cell>` instead of a `<table>`.",
"fp_guards": "Card grids, KPI rows, and feature grids with varying per-card content are legitimately not tables and must pass — the LLM makes this call, not the prefilter.",
"source_rules": [
"real-table-element-required",
"use-real-table-for-tabular-data"
]
},
{
"family": "F1_slop_global",
"id": "prose-readability-minimums",
"title": "Prose font-size / line-height / measure floors",
"profiles": [
"page"
],
"stage": "browser",
"severity": "warn",
"applies_when": "Page has a `.prose` reading-first region.",
"spec": "Extend the 16px font-size / ≥1.5 line-height / ≤~75–85ch measure floors from `.prose p` to ALL running body prose (any multi-line <p>/list item that is not a caption/label/eyebrow/mono/code/table-cell), on page AND magazine profiles. Keep captions/labels/metadata/axis-labels exempt. Slides remain covered by min-slide-body-text-16px; poster/video-comp fixed canvases stay exempt (fixed-size type is intentional there).",
"fixture_violation": "`.prose p{font-size:13px;line-height:1.2}` in a prose article.",
"fp_guards": "Only `.prose` body copy; headings, labels, captions, and code are exempt; measure uses a tolerance band to avoid nagging borderline cases.",
"source_rules": [
"prose-min-body-font-size",
"prose-min-line-height",
"prose-max-measure-75ch"
],
"spec_modification_note": "The typeset tells (ai-sub-16px-body-text, ai-unbounded-line-length, ai-default-tight-line-height) are ~80% covered by prose-readability-minimums but only inside a .prose container. Widening the selector to all running prose (still excluding secondary roles) folds those three tells in without a new check, and the profile guard keeps fixed-canvas posters/videos out."
},
{
"family": "F1_slop_global",
"id": "prose-accent-overuse",
"title": "Pull-quote / drop-cap restraint",
"profiles": [
"page"
],
"stage": "static-dom",
"severity": "warn",
"applies_when": "Page uses a pull-quote (`.pullquote`/`.pull-quote`/`blockquote.pull`) or drop-cap (`.lead--dropcap`/`::first-letter`) pattern.",
"spec": "Count pull-quote elements per rendered page — warn if > 2. Count drop-cap usages — warn if applied to more than the single lead paragraph (> 1 section). Either exceeded = warn.",
"fixture_violation": "A page with 3 `.pullquote` elements.",
"fp_guards": "One drop cap on the article lead is correct; <=2 pull quotes is fine; scope the pull-quote count per rendered page/slide, not across a whole multi-slide deck.",
"source_rules": [
"pull-quote-one-per-page",
"pullquote-max-two-per-article",
"prose-dropcap-not-every-section"
]
},
{
"family": "F1_slop_global",
"id": "no-console-errors",
"title": "No console errors or failed asset loads on load",
"profiles": [
"page",
"slides",
"magazine",
"video-comp"
],
"stage": "browser",
"severity": "error",
"applies_when": "Always (renderable HTML artifact).",
"spec": "Load the page headlessly in both light and dark schemes; collect console messages of type 'error' plus failed network requests (non-2xx on linked resources). Fail on any error-level console message or non-2xx asset load, except a documented allowlist. Retry transient CDN 404s once before failing.",
"fixture_violation": "Page with a top-level `throw new Error()` on load, or a script that logs a Mermaid parse error.",
"fp_guards": "Retry once for CDN flakiness (Google Fonts/jsDelivr rate limits); allow documented expected warnings; only 'error' level counts.",
"source_rules": [
"no-console-errors",
"console-clean-on-load"
]
},
{
"family": "F1_slop_global",
"id": "hierarchy-squint-test",
"title": "Visual hierarchy survives the squint test",
"profiles": [
"page",
"slides",
"magazine"
],
"stage": "llm-pass",
"severity": "warn",
"applies_when": "Always (page/slides/magazine renders).",
"spec": "Capture a full-page screenshot at 1440x900 (light), programmatically blur/downscale it. Rubric question (fed only the blurred image plus the page's declared content type): 'In this blurred view, is there a clear dominant focal region with quieter subordinate regions, or does the page read as uniformly flat with no visual hierarchy?' FLAT = warn.",
"fixture_violation": "A page where every section uses identical type size, weight, and spacing (deliberately flat).",
"fp_guards": "Dense reference / audit / data-table pages may legitimately be flatter — judge against the page's own stated content type, not a hero bar. Mono-specific three-layer rules are owned by the mono family.",
"source_rules": [
"hierarchy-visible-squint-test"
]
},
{
"family": "F1_slop_global",
"id": "unslop-prose-phrases",
"title": "AI-slop telltale phrases in prose",
"profiles": [
"page",
"slides",
"magazine"
],
"stage": "static-text",
"severity": "warn",
"applies_when": "Page has prose text nodes (paragraphs / leads / callouts / card descriptions / slide body copy).",
"spec": "Replace the small inline literal list with the curated high-precision phrase set now owned by the new F9 check `copy-slop-phrases` (see phrase_check). Keep unslop-prose-phrases responsible ONLY for the frequency heuristic it uniquely does — flag high-frequency 'however'/'moreover' (>1 per 300 words) — and delegate all fixed-phrase literals to copy-slop-phrases so the two checks do not double-fire on the same text. Same excluded-prose filter (no code/labels/table-headers/Mermaid/[BRACKET]).",
"fixture_violation": "A body paragraph containing 'It's important to note that...'.",
"fp_guards": "Exclude Space Mono ALL-CAPS labels, table headers, code, Mermaid node labels, and bracketed system messages so terse technical labels don't trigger.",
"source_rules": [
"unslop-copy-before-html"
],
"spec_modification_note": "The tell corpus expands the phrase list far beyond v1's six literals. Rather than grow two overlapping literal lists, consolidate all fixed phrases in copy-slop-phrases and let unslop-prose-phrases retain only its distinct frequency check, preventing duplicate warns on one paragraph."
},
{
"family": "F1_slop_global",
"id": "unslop-prose-style",
"title": "AI-slop stylistic rhythm beyond fixed phrases",
"profiles": [
"page",
"slides",
"magazine"
],
"stage": "llm-pass",
"severity": "warn",
"applies_when": "Page has prose (same excluded-filter set as unslop-prose-phrases).",
"spec": "delegate: unslop:cleanup-report. Supply excluded-filtered prose only and use Unslop's installed report-only audit; Artifacture does not reproduce the prose rubric.",
"fixture_violation": "Prose with a forced three-item list plus hollow transition rhythm that no fixed phrase catches.",
"fp_guards": "Terse technical labels/captions excluded; judge only sustained prose, not one-line UI copy.",
"source_rules": [
"unslop-copy-before-html",
"prose-role-unslop-required"
]
},
{
"family": "F1_slop_global",
"id": "reduced-motion-media-query",
"title": "prefers-reduced-motion block when animating",
"profiles": [
"page",
"slides",
"magazine"
],
"stage": "static-text",
"severity": "warn",
"applies_when": "The <style> contains a `@keyframes` or an `animation:`/`transition:` with a non-zero duration.",
"spec": "If the stylesheet defines any animation/transition with duration > 0, assert it also contains an `@media (prefers-reduced-motion: reduce){…}` block that collapses animation/transition durations to near-zero for the animated elements or `*`. Missing = warn.",
"fixture_violation": "A page with a fade-in `@keyframes` / `transition:all .4s` and no prefers-reduced-motion block.",
"fp_guards": "Static non-animated pages have nothing to guard and are exempt; video-comp is excluded (GSAP/Hyperframes drive motion externally).",
"source_rules": [
"reduced-motion-media-query-present",
"slide-reduced-motion-support"
]
},
{
"family": "F2_responsive",
"id": "page-overflow-clip-contract",
"title": "Page-level overflow-x clip contract on html/body",
"profiles": [
"page"
],
"stage": "static-text",
"severity": "error",
"applies_when": "Page profile only; skip when the artifact is fixed-canvas (root/body has fixed px width+height matching a slide/poster/magazine-deck canvas, a data-layout=slide|magazine|poster marker, or the document declares no @media(max-width) query at all).",
"spec": "In the concatenated <style> text, locate the rule(s) targeting html and body (combined `html,body` or separate). Require ALL: `overflow-x:hidden` AND `overflow-x:clip` both declared, with the clip declaration appearing AFTER hidden in source order (progressive enhancement); `max-width:100%`; `margin:0`; `padding:0` covering html/body. Additionally assert NO rule targeting html|body|:root sets `overflow-x:scroll` (regex `(?:html|body|:root)[^{]*\\{[^}]*overflow-x:\\s*scroll` anywhere ⇒ violation). Browser corroboration (when a DOM is available): getComputedStyle(document.body).overflowX and getComputedStyle(document.documentElement).overflowX must each resolve to 'clip' or 'hidden', never 'scroll' or 'visible'. Fail if any required clause is missing or the scroll negative matches.",
"fixture_violation": "Page whose `html,body` block declares only `overflow-x:hidden` (no following `overflow-x:clip`); a second fixture sets `overflow-x:scroll` on body.",
"source_rules": [
"body-overflow-clip-with-hidden-fallback",
"no-overflow-x-scroll-on-body",
"responsive-page-overflow-contract-applied"
],
"impl_hint": "Match html/body block, then assert index of /overflow-x:\\s*clip/ > index of /overflow-x:\\s*hidden/; separate negative regex for scroll on html|body|:root.",
"fp_guards": "Accept clip+hidden split across separate html{} and body{} rules; accept a covering universal rule for margin/padding. Do not require the exact whitespace of the doc's code block."
},
{
"family": "F2_responsive",
"id": "box-sizing-border-box-global",
"title": "Universal box-sizing:border-box reset present",
"profiles": [
"page"
],
"stage": "static-text",
"severity": "error",
"applies_when": "Page profile, non-fixed-canvas (same profile guard as page-overflow-clip-contract).",
"spec": "Regex the concatenated <style> for a universal border-box reset: a selector group covering `*` (optionally with `*::before,*::after`) whose declaration block contains `box-sizing:\\s*border-box`. Also accept the inherit idiom (`html{box-sizing:border-box}` plus `*,*::before,*::after{box-sizing:inherit}`) or an equivalent reset-library rule. Fail only if no universal border-box coverage exists anywhere.",
"fixture_violation": "Page whose <style> contains no box-sizing declaration on `*` (or any universal selector).",
"source_rules": [
"box-sizing-border-box-global"
],
"fp_guards": "Do not hard-require the exact three-selector string; any rule achieving universal border-box coverage counts."
},
{
"family": "F2_responsive",
"id": "body-overflow-wrap",
"title": "Body wraps long tokens (overflow-wrap/word-break)",
"profiles": [
"page"
],
"stage": "static-text",
"severity": "warn",
"applies_when": "Page profile, non-fixed-canvas.",
"spec": "Regex for a `body` rule containing `overflow-wrap:\\s*(anywhere|break-word)` or `word-break:\\s*break-word`. Warn if absent. Advisory only — the authoritative failure for long-token overflow is the measured body-overflow gate; equivalent per-element `word-break` on long-token elements also satisfies intent.",
"fixture_violation": "Page with a `body{...}` rule that sets no overflow-wrap/word-break and no per-element wrapping.",
"source_rules": [
"overflow-wrap-anywhere-body",
"body-overflow-wrap-break-word"
],
"fp_guards": "Downgraded to warn (not error) because the real ship-blocker is measured overflow; targeted word-break:break-all on the specific long-token element is an acceptable alternative."
},
{
"family": "F2_responsive",
"id": "minmax0-not-bare-1fr",
"title": "Grid tracks beside fixed-px children use minmax(0,1fr) not bare 1fr",
"profiles": [
"page"
],
"stage": "static-text",
"severity": "error",
"applies_when": "Page profile; only when a grid-template-columns declaration pairs a bare 1fr with a fixed-px track.",
"spec": "Scan <style> grid-template-columns declarations for a bare `1fr` track directly adjacent to a fixed-px track and NOT wrapped in minmax(): match `grid-template-columns:\\s*[^;]*\\b\\d+px\\s+1fr\\b` or `\\b1fr\\s+\\d+px\\b` within a declaration where that `1fr` is not the tail of a `minmax(` call. Any match is a violation (documented #1 root cause of horizontal overflow).",
"fixture_violation": "A non-mobile rule with `grid-template-columns: 260px 1fr;`.",
"source_rules": [
"minmax0-not-bare-1fr-for-wide-track",
"grid-minmax-zero-for-wide-tracks"
],
"fp_guards": "Ignore `1fr` inside `minmax(0, 1fr)` and inside `repeat(auto-fit, minmax(...))`; only flag when a fixed-px track shares the same declaration."
},
{
"family": "F2_responsive",
"id": "mobile-breakpoint-standard",
"title": "Mobile breakpoints limited to sanctioned values",
"profiles": [
"page"
],
"stage": "static-text",
"severity": "warn",
"applies_when": "Page profile with at least one `@media (max-width: Npx)` query.",
"spec": "Extract every `@media` `max-width:\\s*(\\d+)px` value. Allowed standard set {768, 820}; sanctioned exceptions {640 (Nothing grid-lines), 1000 (responsive-nav.md TOC sidebar→bar collapse)}. Warn on any other max-width value.",
"fixture_violation": "Page whose only breakpoint is `@media (max-width: 900px)`.",
"source_rules": [
"mobile-breakpoint-standard",
"standard-breakpoint-values"
],
"fp_guards": "Whitelist the sanctioned aesthetic/nav exceptions; do not flag min-width companion queries or non-width media features."
},
{
"family": "F2_responsive",
"id": "pipeline-mobile-nowrap",
"title": ".pipeline keeps flex-wrap:nowrap at mobile breakpoint",
"profiles": [
"page"
],
"stage": "static-text",
"severity": "warn",
"applies_when": "Page contains an element with class `pipeline`.",
"spec": "Inside a mobile `@media (max-width:...)` block, the `.pipeline` rule must declare `flex-wrap:\\s*nowrap`. Warn if .pipeline exists on the page but the mobile rule is missing or sets flex-wrap:wrap.",
"fixture_violation": "Page with a `.pipeline` element and a mobile media block that sets `.pipeline{flex-wrap:wrap}`.",
"source_rules": [
"pipeline-nowrap-on-mobile"
]
},
{
"family": "F2_responsive",
"id": "kpi-row-autofit-minmax",
"title": ".kpi-row uses auto-fit minmax floor at mobile",
"profiles": [
"page"
],
"stage": "static-text",
"severity": "warn",
"applies_when": "Page contains an element with class `kpi-row`.",
"spec": "Inside the mobile media query, `.kpi-row` should set `grid-template-columns: repeat(auto-fit, minmax(<N>px, 1fr))` (N tolerant). Warn if .kpi-row is present but reduces to a fixed column count at mobile instead of an auto-fit minmax floor.",
"fixture_violation": "`.kpi-row` with `grid-template-columns: repeat(4,1fr)` and no auto-fit override at mobile.",
"source_rules": [
"kpi-row-autofit-minmax"
],
"fp_guards": "Exact 140px floor is not required; any auto-fit minmax floor satisfies intent (that is why this is warn)."
},
{
"family": "F2_responsive",
"id": "no-horizontal-body-overflow",
"title": "Body never scrolls horizontally (390 + 1440, both schemes)",
"profiles": [
"page"
],
"stage": "browser",
"severity": "error",
"applies_when": "Page profile only; skip fixed-canvas artifacts (slide/magazine deck, poster, video-comp) detected via fixed canvas size / data-layout marker / absence of any @media(max-width).",
"spec": "Load the page and, at BOTH viewports 390x844 and 1440x900, in BOTH prefers-color-scheme light and dark, assert `document.documentElement.scrollWidth - window.innerWidth <= 1` AND `document.body.scrollWidth - window.innerWidth <= 1`. Fail if the 1px tolerance is exceeded at any viewport/scheme combination. (1px tolerance replaces the doc's strict === to absorb browser sub-pixel rounding.)",
"fixture_violation": "Page containing a 900px-wide fixed-width element (or wide <table>) with no scroll-x wrapper, so body scrollWidth exceeds 390 at mobile.",
"source_rules": [
"no-horizontal-body-scroll",
"no-horizontal-scroll-mobile",
"no-horizontal-body-overflow",
"no-horizontal-scroll-body",
"web-diagram-browser-verify"
],
"impl_hint": "page.evaluate(()=>({doc:document.documentElement.scrollWidth,view:window.innerWidth,body:document.body.scrollWidth}))"
},
{
"family": "F2_responsive",
"id": "overflow-source-census",
"title": "No visibly-overflowing element (attribute the overflow source)",
"profiles": [
"page"
],
"stage": "browser",
"severity": "error",
"applies_when": "Page profile, non-fixed-canvas. Runs alongside the body gate to attribute the culprit.",
"spec": "At 390x844 (and 1440x900) in both schemes, evaluate `[...document.querySelectorAll('body *')].filter(el => el.clientWidth>0 && el.scrollWidth > el.clientWidth + 1 && getComputedStyle(el).overflowX === 'visible')`. The list must be empty; report {tag, className, scrollWidth, clientWidth} for each offender so the fix (add .scroll-x / min-width:0 / max-width:100%) can be targeted. Non-empty ⇒ fail.",
"fixture_violation": "An element wider than its parent styled `overflow-x:visible` with no scroll wrapper (e.g. a fixed-width inner div inside a narrower column).",
"source_rules": [
"no-overflowing-elements-visible"
],
"fp_guards": "clientWidth>0 excludes display:none/zero-size nodes; overflowX==='visible' filter excludes intentional .scroll-x/auto scrollers."
},
{
"family": "F2_responsive",
"id": "grid-flex-child-min-width-0",
"title": "Grid/flex children can shrink (min-width:0) when they overflow",
"profiles": [
"page"
],
"stage": "browser",
"severity": "error",
"applies_when": "Page contains a container whose class matches /(^|\\s)(grid|flex)(\\s|$)/ or /-grid|-row/.",
"spec": "At 390x844, for each direct child of such a container, if child.scrollWidth > child.clientWidth + 1 (child is overflowing its own box) AND getComputedStyle(child).minWidth resolves to a non-zero value (i.e. min-width:auto), flag as a shrink-refusing child. Gate strictly on measured child overflow to avoid failing grids whose children are naturally narrow.",
"fixture_violation": "A `.grid` with `grid-template-columns:minmax(auto,1fr) 1fr` whose child holds a long unbroken token and computes min-width:auto, overflowing at 390.",
"source_rules": [
"grid-flex-children-min-width-0",
"grid-flex-child-shrinkable",
"overflow-prevention-grid-flex-children"
],
"fp_guards": "Do not flag on class presence alone; only when the child actually overflows and lacks min-width:0 (per family charter: cross-check measured overflow before hard-failing)."
},
{
"family": "F2_responsive",
"id": "fixed-grid-collapses-single-column",
"title": "Fixed multi-column grids collapse to one column at mobile",
"profiles": [
"page"
],
"stage": "browser",
"severity": "error",
"applies_when": "Page contains an element matching arch-grid|comparison|diff-panels|dir-compare or [class$=\"-grid\"], OR a hero using the desktop `minmax(0,1fr) <px>` two-track pattern. Exclude .kpi-row.",
"spec": "At 390x844 (representing <=768px), for each such element assert getComputedStyle(el).gridTemplateColumns resolves to a SINGLE track (value is a single length/none, no internal space between track sizes). Covers both fixed-column named grids and the 2-column magazine hero. Skip .kpi-row (auto-fit exception).",
"fixture_violation": "`.arch-grid{grid-template-columns:1fr 1fr}` with no mobile override, still two tracks at 390.",
"source_rules": [
"fixed-grid-collapses-to-single-column",
"two-col-hero-collapses-at-breakpoint",
"responsive-below-768-hierarchy-survives"
],
"fp_guards": "Exclude .kpi-row; only apply the hero clause when the desktop CSS actually shows the `minmax(0,1fr) <px>` two-track signature."
},
{
"family": "F2_responsive",
"id": "wide-content-scroll-x-wrapper",
"title": "Wide content scrolls inside its own container, not the page",
"profiles": [
"page"
],
"stage": "browser",
"severity": "error",
"applies_when": "Page contains a <table>, .pipeline, .dir-tree, an inline diagram <svg>, or a .code-block.",
"spec": "At 390x844, for each candidate wide element (table, .pipeline, .dir-tree pre, inline diagram svg, .code-block) that actually overflows (el.scrollWidth > el.clientWidth + 1), verify the element itself OR an ancestor within 3 levels has computed overflow-x in {auto, scroll} (i.e. a scroll container such as .scroll-x/.table-wrap/.mermaid-wrap or inline overflow-x:auto). If it overflows and no scroll container is found ⇒ violation. This subsumes the ~640px SVG threshold using measured overflow rather than the raw viewBox number.",
"fixture_violation": "A ~1000px-wide <table> placed directly in body with no .scroll-x / .table-wrap wrapper.",
"source_rules": [
"scroll-x-wrapper-required-for-wide-content",
"svg-diagram-640px-scroll-x-threshold",
"wrap-wide-content-in-scroll-x",
"wide-content-scroll-wrapper"
],
"fp_guards": "Gate every flag on measured overflow, never on tag/class presence; content that fits at 390 needs no wrapper. An SVG with width:100%;height:auto that scales down is not flagged."
},
{
"family": "F2_responsive",
"id": "dir-tree-connectors-no-wrap",
"title": "Directory-tree connectors never wrap; they scroll",
"profiles": [
"page"
],
"stage": "browser",
"severity": "error",
"applies_when": "Page has a .dir-tree element, or a <pre> whose text contains box-drawing characters (├ └ │).",
"spec": "For each such <pre>, assert getComputedStyle(el).whiteSpace is 'pre' or 'nowrap' (NOT 'pre-wrap' or 'normal') AND the element or an ancestor within 3 levels has overflow-x auto/scroll. Violation if wrapping is permitted (pre-wrap/normal) OR no horizontal scroll container exists.",
"fixture_violation": "`.dir-tree pre{white-space:pre-wrap}` so the ├── connectors line-wrap and lose alignment.",
"source_rules": [
"dir-tree-connectors-no-wrap",
"dir-tree-whitespace-pre-required"
],
"fp_guards": "Scope to .dir-tree or box-drawing-char pres only; ordinary code <pre> may legitimately use pre-wrap."
},
{
"family": "F2_responsive",
"id": "text-clip-candidates",
"title": "Detect text clipped by overflow clip/hidden (mechanical)",
"profiles": [
"page"
],
"stage": "browser",
"severity": "warn",
"applies_when": "Page profile, non-fixed-canvas.",
"spec": "At 390x844 (both schemes) collect elements where getComputedStyle overflowX or overflowY is 'clip'/'hidden' AND (scrollWidth>clientWidth+1 OR scrollHeight>clientHeight+1) AND the element has non-empty direct text content, EXCLUDING elements whose computed `-webkit-line-clamp` is not 'none' or `text-overflow` is 'ellipsis'. Emit the candidate list for the paired llm-pass. Non-empty ⇒ warn (visual confirmation decides the ship-blocker).",
"fixture_violation": "A heading inside a fixed-width box with overflow:hidden that chops characters, with no ellipsis/line-clamp.",
"source_rules": [
"no-text-clipped-by-overflow-clip",
"text-not-clipped-or-truncated"
],
"fp_guards": "Exclude intentional -webkit-line-clamp and text-overflow:ellipsis truncation from candidates."
},
{
"family": "F2_responsive",
"id": "text-visibly-clipped",
"title": "LLM: real text is visibly cut off by a container",
"profiles": [
"page"
],
"stage": "llm-pass",
"severity": "error",
"applies_when": "Runs when text-clip-candidates produced a non-empty list (consumes that list + 390px screenshots).",
"spec": "Rubric question, answerable from the 390x844 light+dark screenshots plus the text-clip candidate element list: 'Is any real content text visibly cut off by a container edge — characters chopped or a sentence truncated WITHOUT an intentional ellipsis?' Yes ⇒ fail. No page-wide context needed.",
"fixture_violation": "N/A (LLM pass) — exercised by feeding a screenshot where a heading is chopped mid-word by an overflow:hidden box.",
"source_rules": [
"no-text-clipped-by-overflow-clip",
"text-not-clipped-or-truncated"
]
},
{
"family": "F2_responsive",
"id": "content-behind-fixed-ui-candidates",
"title": "Detect content overlapped by fixed-position chrome (mechanical)",
"profiles": [
"page"
],
"stage": "browser",
"severity": "warn",
"applies_when": "Page contains at least one position:fixed element (e.g. the theme toggle).",
"spec": "At 390x844 (both schemes), for each position:fixed element with a non-transparent computed background, compute its bounding rect and find interactive/text elements (a, button, h1-h4, p, td, .sec-head) whose rects geometrically intersect it and paint beneath it. Emit overlap candidates for the paired llm-pass. Non-empty ⇒ warn.",
"fixture_violation": "A fixed theme toggle docked top-right whose rect overlaps an <h1> at 390 width.",
"source_rules": [
"no-content-behind-fixed-ui"
],
"fp_guards": "Require non-transparent background on the fixed element; overlap with pure padding/empty area is not a candidate."
},
{
"family": "F2_responsive",
"id": "fixed-ui-obscures-content",
"title": "LLM: fixed chrome actually obscures readable/clickable content",
"profiles": [
"page"
],
"stage": "llm-pass",
"severity": "error",
"applies_when": "Runs when content-behind-fixed-ui-candidates is non-empty (consumes overlaps + 390px screenshots).",
"spec": "Rubric question from the 390x844 screenshots + overlap candidate list: 'Does fixed-position chrome (theme toggle, nav, counter) actually hide readable text or block a clickable target at mobile width?' Yes ⇒ fail.",
"fixture_violation": "N/A (LLM pass) — exercised by a screenshot where the theme toggle sits on top of the page title.",
"source_rules": [
"no-content-behind-fixed-ui"
]
},
{
"family": "F2_responsive",
"id": "no-scroll-x-on-prose",
"title": ".scroll-x not misapplied to prose / hero text",
"profiles": [
"page"
],
"stage": "static-dom",
"severity": "warn",
"applies_when": "Page profile, non-fixed-canvas.",
"spec": "Assert no <p> element and no hero text-bearing element carries class `scroll-x`; assert card-grid containers are not themselves wrapped in `.scroll-x` (they should reflow to one column). A `.scroll-x` wrapper around a wide diagram that happens to live inside the hero is allowed — scope to text-bearing prose nodes, not any .hero descendant.",
"fixture_violation": "`<p class=\"scroll-x\">` on a prose paragraph.",
"source_rules": [
"no-scroll-x-on-prose-cards-hero-nav"
]
},
{
"family": "F2_responsive",
"id": "toc-nav-structure",
"title": "TOC nav structural + min-width:0 contract",
"profiles": [
"page"
],
"stage": "static-dom",
"severity": "error",
"applies_when": "Page has both a `.wrap` element and a `nav.toc`.",
"spec": "Assert .wrap.firstElementChild is nav.toc (tag nav, classList includes 'toc'); assert all section content lives inside a `.main` child of .wrap (every .sec-head is a descendant of .main, none are direct children of .wrap); and assert the stylesheet contains a `.main{...min-width:0...}` declaration. Fail if the toc is not first, content leaks outside .main, or .main lacks min-width:0.",
"fixture_violation": "`.wrap` whose first child is `.main` with the `nav.toc` second, or a `.main` rule missing `min-width:0`.",
"source_rules": [
"toc-first-child-of-wrap",
"content-inside-main-wrapper",
"main-min-width-zero"
],
"fp_guards": "Out of scope for pages that do not use the .wrap+.toc+.main nav pattern."
},
{
"family": "F2_responsive",
"id": "toc-anchors-resolve",
"title": "TOC links resolve 1:1 to section ids",
"profiles": [
"page"
],
"stage": "static-dom",
"severity": "error",
"applies_when": "Page has a `nav.toc`.",
"spec": "Assert every `.sec-head` element has a non-empty id; every `.toc a[href^=\"#\"]` (excluding a '#'/'#top' back-to-top link) resolves via document.getElementById to an existing element; and the count of section .toc links equals the count of .sec-head elements.",
"fixture_violation": "A TOC link `href=\"#s3\"` with no element carrying `id=\"s3\"`.",
"source_rules": [
"section-headings-have-sequential-ids",
"toc-links-resolve-to-existing-ids"
],
"fp_guards": "Exclude utility links (back-to-top) from the 1:1 count."
},
{
"family": "F2_responsive",
"id": "skip-toc-under-four-sections",
"title": "TOC omitted for pages with <4 sections",
"profiles": [
"page"
],
"stage": "static-dom",
"severity": "warn",
"applies_when": "Page has a `nav.toc`.",
"spec": "Count .sec-head elements (or section .toc links). Warn if fewer than 4 — a near-empty TOC adds clutter.",
"fixture_violation": "Page with a `.toc` and only 2 `.sec-head` sections.",
"source_rules": [
"skip-toc-under-four-sections"
],
"fp_guards": "Warn (not error): a page with few top-level sections but many subsections may still justify a TOC."
},
{
"family": "F2_responsive",
"id": "pretext-fonts-ready-before-measure",
"title": "pretext label measurement waits for fonts.ready",
"profiles": [
"page",
"slides",
"magazine",
"poster",
"video-comp"
],
"stage": "static-text",
"severity": "warn",
"applies_when": "Source contains a `prepareWithSegments(` call (pretext label-measurement library in use).",
"spec": "For each `prepareWithSegments(` call, require an awaited `document.fonts.ready` or `document.fonts.load(` earlier in the same script scope (before the call). Warn on any prepareWithSegments with no preceding fonts-ready await — measuring against fallback fonts yields wrong widths that drift every downstream box calc.",
"fixture_violation": "A script calling `prepareWithSegments(...)` with no `await document.fonts.ready`/`document.fonts.load` beforehand.",
"source_rules": [
"pretext-prepare-after-fonts-ready"
],
"fp_guards": "Not applicable to the vast majority of pages that never reference pretext/prepareWithSegments."
},
{
"family": "F3_diagrams",
"id": "diagram-no-hardcoded-hex",
"title": "SVG diagram fills/strokes use semantic tokens, not hardcoded hex",
"profiles": [
"page",
"slides",
"magazine",
"poster",
"video-comp"
],
"stage": "static-text",
"severity": "error",
"applies_when": "Document contains an inline <svg> authored by the skill (heuristic: an <svg> whose element attributes reference var(--...) tokens, or that declares data-diagram-role).",
"spec": "Regex diagram-body elements for hex color literals (#[0-9a-fA-F]{3,8}) and rgb()/rgba() literals appearing inside fill=, stroke=, or style= attributes. Exclude the :root/@media token-definition blocks and url(#...) references. Flag any literal color on a body element.",
"impl_hint": "/(?:fill|stroke)\\s*=\\s*\"(#[0-9a-fA-F]{3,8}|rgba?\\()/ and same inside style=\"...\"; skip nodes inside <style>/:root.",
"fp_guards": "Allowlist the Nothing dot-grid radial-gradient color when those aesthetics are declared; ignore url(#id) marker/gradient references.",
"fixture_violation": "A diagram <rect fill=\"#b5523a\"> (accent hardcoded) instead of fill=\"var(--accent)\", with no Nothing aesthetic declared.",
"source_rules": [
"token-reference-not-hardcoded-hex"
]
},
{
"family": "F3_diagrams",
"id": "diagram-forbidden-fx",
"title": "No shadows, gradient-text, emoji, animated shadows, vertical arrow text, or 16px radius in diagrams",
"profiles": [
"page",
"slides",
"magazine",
"poster",
"video-comp"
],
"stage": "static-text",
"severity": "error",
"applies_when": "Document contains an inline skill-authored <svg> diagram.",
"spec": "Regex-scan diagram markup and flag any of: (a) box-shadow or SVG feDropShadow on nodes; (b) background-clip:text / -webkit-background-clip:text co-occurring with a linear-gradient on a title/heading; (c) pictographic emoji codepoints inside <text> content; (d) box-shadow or filter:blur combined with animation/transition/@keyframes (animated shadow); (e) writing-mode:vertical on arrow-associated <text>; (f) Tailwind class rounded-2xl or an rx/ry/border-radius of exactly 16.",
"fp_guards": "Exempt the flowchart oval rx=20 and Nothing's documented dot-grid radial-gradient; the emoji scan targets pictographic ranges only (allow →, ↑, ↓, math arrows); static hairline strokes are fine.",
"fixture_violation": "A node <rect style=\"box-shadow:0 2px 8px rgba(0,0,0,.2)\"> in a diagram.",
"source_rules": [
"no-box-shadow-on-nodes",
"no-gradient-text-titles",
"no-emoji-no-animated-shadows",
"no-vertical-writing-mode-on-arrows",
"no-rounded-2xl"
]
},
{
"family": "F3_diagrams",
"id": "diagram-jetbrains-mono-forbidden",
"title": "JetBrains Mono absent from diagrams (except declared IDE-inspired aesthetics)",
"profiles": [
"page",
"slides",
"magazine",
"poster",
"video-comp"
],
"stage": "static-text",
"severity": "error",
"applies_when": "Inline skill-authored <svg> diagram present AND the active aesthetic is NOT an IDE-inspired one whose canonical palette specifies JetBrains Mono.",
"spec": "Regex for \"JetBrains Mono\" in any font-family declaration (inline style, @font-face, or Google Fonts href) within diagram markup. Flag presence.",
"fp_guards": "Aesthetic-scoped exception (decision b): when the page declares an IDE-inspired aesthetic (Dracula/Nord/Catppuccin/Solarized/Gruvbox/One Dark/Rose Pine) whose published palette maps --font-mono to JetBrains Mono, the font is permitted.",
"fixture_violation": "A default Editorial-Diagram sets --font-mono:\"JetBrains Mono\" with no IDE-inspired aesthetic declared.",
"source_rules": [
"jetbrains-mono-forbidden-in-diagram"
]
},
{
"family": "F3_diagrams",
"id": "diagram-4px-grid",
"title": "Diagram geometry divisible by 4 (radii and strokes exempt)",
"profiles": [
"page",
"slides",
"magazine",
"poster",
"video-comp"
],
"stage": "static-text",
"severity": "error",
"applies_when": "Inline skill-authored <svg> diagram present.",
"spec": "Parse numeric values of x, y, cx, cy, width, height, font-size, and gap/spacing across diagram SVG; assert each value % 4 === 0. Report every offending element+attribute+value.",
"impl_hint": "Skip attributes: stroke-width, stroke-dasharray, all *-opacity, rx, ry; skip the 22x22 dot-pattern width/height and its r=0.9 dot.",
"fp_guards": "Per decision (a): corner radii rx/ry are EXEMPT from the 4px rule (they carry per-shape semantic values 6/8/20 validated by diagram-shape-semantics); stroke-width, dasharray, opacity, and the 22x22 / r=0.9 dot pattern are exempt.",
"fixture_violation": "<rect x=\"13\" y=\"40\" width=\"100\" height=\"40\"> where x=13 is not divisible by 4.",
"source_rules": [
"grid-4px-divisibility"
]
},
{
"family": "F3_diagrams",
"id": "diagram-typography-mono-scope",
"title": "Node names/titles use body sans, monospace reserved for technical labels",
"profiles": [
"page",
"slides",
"magazine",
"poster",
"video-comp"
],
"stage": "static-dom",
"severity": "error",
"applies_when": "Inline diagram with node-name/title/description text identifiable (data-diagram-role tagging present) AND aesthetic is NOT Monochrome-Terminal. Warn-level heuristic fallback when tagging absent.",
"spec": "For every <text> classified as a node name/title/description, resolve font-family and assert it is var(--font-body), not var(--font-mono). Additionally flag if var(--font-mono) is the majority face across body-classified text. Technical labels (ports/types/URLs/arrow labels/eyebrow kickers) may be mono.",
"fp_guards": "Monochrome-Terminal aesthetic explicitly permits mono as body font — skip there. Requires role tagging to distinguish node names from technical labels; degrade to warn when absent.",
"fixture_violation": "A node title <text data-diagram-role=\"node-name\" font-family=\"var(--font-mono)\">Auth Service</text>.",
"source_rules": [
"node-names-sans-not-mono",
"mono-reserved-for-technical-content"
]
},
{
"family": "F3_diagrams",
"id": "diagram-host-token-inheritance",
"title": "Embedded diagram inherits host tokens, does not redefine :root",
"profiles": [
"page",
"slides",
"magazine"
],
"stage": "static-dom",
"severity": "warn",
"applies_when": "A diagram <svg>/<style> lives inside a document that already declares a :root token block (--paper/--ink) earlier in the cascade.",
"spec": "Flag duplicate :root declarations of the diagram color-token names (--paper/--ink/etc.) within a single document — an embedded diagram must inherit host tokens rather than redeclaring them.",
"fixture_violation": "Page :root defines --paper/--ink; an embedded diagram's <style> redeclares :root{--paper:#fff;...}.",
"source_rules": [
"host-page-token-inheritance"
]
},
{
"family": "F3_diagrams",
"id": "diagram-z-order-arrows-before-nodes",
"title": "Arrows painted before nodes so nodes sit on top",
"profiles": [
"page",
"slides",
"magazine",
"poster",
"video-comp"
],
"stage": "static-dom",
"severity": "error",
"applies_when": "Arrows and nodes are distinguishable via data-diagram-role or separate <g> groups.",
"spec": "Assert the arrows group's document index precedes the nodes group; or, per connected component, assert every arrow-classified element's document index precedes the node elements it connects.",
"fp_guards": "Requires role tagging or a group convention to classify; fall back to group-level ordering assertion when only <g> grouping exists.",
"fixture_violation": "The <g data-diagram-role=\"nodes\"> element appears before <g data-diagram-role=\"arrows\"> in document order.",
"source_rules": [
"z-order-arrows-before-nodes"