impeccable 3.2.0 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -23,7 +23,7 @@ const __dirname = dirname(fileURLToPath(import.meta.url));
23
23
  const API_BASE = 'https://impeccable.style';
24
24
 
25
25
  // Provider folder names in project roots
26
- const PROVIDER_DIRS = ['.claude', '.cursor', '.gemini', '.agents', '.github', '.kiro', '.opencode', '.pi', '.qoder', '.trae', '.trae-cn', '.rovodev'];
26
+ const PROVIDER_DIRS = ['.claude', '.cursor', '.gemini', '.agents', '.github', '.grok', '.kiro', '.opencode', '.pi', '.qoder', '.trae', '.trae-cn', '.rovodev', '.vibe'];
27
27
  const PROVIDER_ALIASES = {
28
28
  agents: '.agents',
29
29
  claude: '.claude',
@@ -33,6 +33,9 @@ const PROVIDER_ALIASES = {
33
33
  cursor: '.cursor',
34
34
  gemini: '.gemini',
35
35
  github: '.github',
36
+ grok: '.grok',
37
+ 'grok-build': '.grok',
38
+ xai: '.grok',
36
39
  kiro: '.kiro',
37
40
  opencode: '.opencode',
38
41
  pi: '.pi',
@@ -41,6 +44,7 @@ const PROVIDER_ALIASES = {
41
44
  rovodev: '.rovodev',
42
45
  trae: '.trae',
43
46
  'trae-cn': '.trae-cn',
47
+ vibe: '.vibe',
44
48
  };
45
49
 
46
50
  const PROVIDER_DISPLAY = {
@@ -49,6 +53,7 @@ const PROVIDER_DISPLAY = {
49
53
  '.cursor': { name: 'Cursor', input: 'cursor' },
50
54
  '.gemini': { name: 'Gemini CLI', input: 'gemini' },
51
55
  '.github': { name: 'GitHub Copilot', input: 'github' },
56
+ '.grok': { name: 'Grok Build', input: 'grok' },
52
57
  '.kiro': { name: 'Kiro', input: 'kiro' },
53
58
  '.opencode': { name: 'OpenCode', input: 'opencode' },
54
59
  '.pi': { name: 'Project Indigo', input: 'pi' },
@@ -56,8 +61,16 @@ const PROVIDER_DISPLAY = {
56
61
  '.rovodev': { name: 'Rovo Dev', input: 'rovo-dev' },
57
62
  '.trae': { name: 'Trae', input: 'trae' },
58
63
  '.trae-cn': { name: 'Trae CN', input: 'trae-cn' },
64
+ '.vibe': { name: 'Mistral Vibe', input: 'vibe' },
65
+ };
66
+ const PROVIDER_INPUT_ORDER = ['claude', 'codex', 'cursor', 'gemini', 'github', 'grok', 'kiro', 'opencode', 'pi', 'qoder', 'trae', 'trae-cn', 'rovo-dev', 'vibe'];
67
+
68
+ // Providers whose GLOBAL (home) skills dir is not `<provider>/skills`.
69
+ // Pi discovers global skills from ~/.pi/agent/skills/; project scope
70
+ // stays .pi/skills/. See issue #327.
71
+ const HOME_SKILLS_DIR_OVERRIDES = {
72
+ '.pi': join('.pi', 'agent', 'skills'),
59
73
  };
60
- const PROVIDER_INPUT_ORDER = ['claude', 'codex', 'cursor', 'gemini', 'github', 'kiro', 'opencode', 'pi', 'qoder', 'trae', 'trae-cn', 'rovo-dev'];
61
74
 
62
75
  // When a project has no harness folder yet, infer the target from globally
63
76
  // installed harnesses (~/.claude, ~/.codex, ...). Codex reads skills from
@@ -67,10 +80,13 @@ const GLOBAL_HARNESS_HINTS = [
67
80
  { home: '.codex', provider: '.agents' },
68
81
  { home: '.cursor', provider: '.cursor' },
69
82
  { home: '.gemini', provider: '.gemini' },
83
+ { home: '.grok', provider: '.grok' },
70
84
  { home: '.kiro', provider: '.kiro' },
71
85
  { home: '.opencode', provider: '.opencode' },
86
+ { home: '.pi', provider: '.pi' },
72
87
  { home: '.qoder', provider: '.qoder' },
73
88
  { home: '.rovodev', provider: '.rovodev' },
89
+ { home: '.vibe', provider: '.vibe' },
74
90
  ];
75
91
 
76
92
  // Last-resort default when nothing is detected: Claude Code + the universal
@@ -109,8 +125,53 @@ const PROVIDER_HOOK_ARTIFACTS = {
109
125
  '.github': [
110
126
  { sourceProvider: '.github', rel: 'hooks/impeccable.json', destProvider: '.github' },
111
127
  ],
128
+ // Grok Build discovers project hooks from `.grok/hooks/*.json`. Team-shared
129
+ // by default (commit them if the whole team uses Grok); folder trust is still
130
+ // required via `/hooks-trust` or `--trust` before they run.
131
+ '.grok': [
132
+ { sourceProvider: '.grok', rel: 'hooks/impeccable.json', destProvider: '.grok' },
133
+ ],
112
134
  };
113
135
 
136
+ function userProviderSkillsDir(home, provider) {
137
+ if (HOME_SKILLS_DIR_OVERRIDES[provider]) return join(home, HOME_SKILLS_DIR_OVERRIDES[provider]);
138
+ return join(home, provider, 'skills');
139
+ }
140
+
141
+ // Compare via realpath: the project root comes from process.cwd() (symlinks
142
+ // resolved) while homedir() reflects $HOME verbatim, so a home dir reached
143
+ // through a symlink (e.g. /tmp -> /private/tmp) would fail a string compare.
144
+ function isHomeDir(root) {
145
+ if (root === homedir()) return true;
146
+ try {
147
+ return realpathSync(root) === realpathSync(homedir());
148
+ } catch {
149
+ return false;
150
+ }
151
+ }
152
+
153
+ // Every layout a provider's installed skills can live in under `root`.
154
+ // `scope` narrows the answer when the caller knows which install it is
155
+ // acting on: 'user' means the provider's global layout, 'project' means
156
+ // `<provider>/skills`. Without a scope (update/check, where installs of
157
+ // either kind may live under `root`) both layouts are candidates when
158
+ // `root` is the home dir, since an overridden provider (Pi) keeps its
159
+ // global skills elsewhere while a repo rooted at ~ still uses the project
160
+ // layout. Scoping matters for the same reason: a project-scope install in
161
+ // a home-rooted repo must not be conflated with an existing global one.
162
+ function providerSkillsDirCandidates(root, provider, scope) {
163
+ if (scope === 'user') return [userProviderSkillsDir(root, provider)];
164
+ const dirs = [join(root, provider, 'skills')];
165
+ if (scope !== 'project' && HOME_SKILLS_DIR_OVERRIDES[provider] && isHomeDir(root)) {
166
+ dirs.unshift(userProviderSkillsDir(root, provider));
167
+ }
168
+ return dirs;
169
+ }
170
+
171
+ function existingSkillsDirs(root, provider, scope) {
172
+ return providerSkillsDirCandidates(root, provider, scope).filter(existsSync);
173
+ }
174
+
114
175
  let pipedAnswers = null;
115
176
  class PromptAbortError extends Error {
116
177
  constructor() {
@@ -415,13 +476,15 @@ async function showHelp() {
415
476
  /**
416
477
  * Read the skills version from the impeccable SKILL.md frontmatter.
417
478
  */
418
- function getSkillsVersion(root) {
479
+ function getSkillsVersion(root, scope) {
419
480
  for (const d of PROVIDER_DIRS) {
420
- const skillMd = join(root, d, 'skills', 'impeccable', 'SKILL.md');
421
- if (!existsSync(skillMd)) continue;
422
- const content = readFileSync(skillMd, 'utf-8');
423
- const match = content.match(/^version:\s*(.+)$/m);
424
- if (match) return match[1].trim().replace(/^["']|["']$/g, '');
481
+ for (const skillsDir of providerSkillsDirCandidates(root, d, scope)) {
482
+ const skillMd = join(skillsDir, 'impeccable', 'SKILL.md');
483
+ if (!existsSync(skillMd)) continue;
484
+ const content = readFileSync(skillMd, 'utf-8');
485
+ const match = content.match(/^version:\s*(.+)$/m);
486
+ if (match) return match[1].trim().replace(/^["']|["']$/g, '');
487
+ }
425
488
  }
426
489
  return null;
427
490
  }
@@ -519,7 +582,7 @@ async function copyOrExtractLocalBundle(sourceValue) {
519
582
  */
520
583
  function normalizeForHash(content) {
521
584
  return content
522
- .replace(/\.(claude|cursor|agents|github|gemini|codex|kiro|opencode|pi|qoder|trae|trae-cn|rovodev)\/skills\//g, '.PROVIDER/skills/');
585
+ .replace(/\.(claude|cursor|agents|github|gemini|codex|grok|kiro|opencode|pi|qoder|trae|trae-cn|rovodev|vibe)\/skills\//g, '.PROVIDER/skills/');
523
586
  }
524
587
 
525
588
  function hashSkillFile(filePath) {
@@ -535,14 +598,17 @@ function hashSkillFile(filePath) {
535
598
  * per unique real path. The first provider that maps to a real path
536
599
  * wins (so the bundle uses that provider's build).
537
600
  */
538
- function deduplicateProviders(root, providers) {
601
+ function deduplicateProviders(root, providers, scope) {
539
602
  const seen = new Map(); // realPath -> { provider, localSkillsDir }
540
603
  for (const provider of providers) {
541
- const skillsDir = join(root, provider, 'skills');
542
- if (!existsSync(skillsDir)) continue;
543
- const real = realpathSync(skillsDir);
544
- if (!seen.has(real)) {
545
- seen.set(real, { provider, localSkillsDir: skillsDir });
604
+ // A provider can hold real installs in more than one layout (a home-rooted
605
+ // repo may carry both ~/.pi/agent/skills and ~/.pi/skills). Keep each as
606
+ // its own entry so update/check touch every tree, not just the first.
607
+ for (const skillsDir of existingSkillsDirs(root, provider, scope)) {
608
+ const real = realpathSync(skillsDir);
609
+ if (!seen.has(real)) {
610
+ seen.set(real, { provider, localSkillsDir: skillsDir });
611
+ }
546
612
  }
547
613
  }
548
614
  return [...seen.values()];
@@ -556,8 +622,8 @@ function deduplicateProviders(root, providers) {
556
622
  * SKILL.md, so script-only fixes and removed files are detected.
557
623
  * Returns true if every bundle skill matches the local copy.
558
624
  */
559
- function isUpToDate(root, providers, bundleDir) {
560
- const unique = deduplicateProviders(root, providers);
625
+ function isUpToDate(root, providers, bundleDir, scope) {
626
+ const unique = deduplicateProviders(root, providers, scope);
561
627
  if (unique.length === 0) return false;
562
628
 
563
629
  for (const { provider, localSkillsDir } of unique) {
@@ -621,20 +687,20 @@ async function check() {
621
687
  // ─── skills install ───────────────────────────────────────────────────────────
622
688
 
623
689
  // Check if impeccable skills are already present in any provider folder
624
- function isAlreadyInstalled(root) {
690
+ function isAlreadyInstalled(root, scope) {
625
691
  for (const d of PROVIDER_DIRS) {
626
- const skillsDir = join(root, d, 'skills');
627
- if (!existsSync(skillsDir)) continue;
628
- try {
629
- const entries = readdirSync(skillsDir);
630
- // Look for 'impeccable' skill (or prefixed variant, or legacy 'teach-impeccable')
631
- if (entries.some(e =>
632
- e === 'impeccable' || e.endsWith('-impeccable') ||
633
- e === 'teach-impeccable' || e.endsWith('-teach-impeccable')
634
- )) {
635
- return d;
636
- }
637
- } catch {}
692
+ for (const skillsDir of existingSkillsDirs(root, d, scope)) {
693
+ try {
694
+ const entries = readdirSync(skillsDir);
695
+ // Look for 'impeccable' skill (or prefixed variant, or legacy 'teach-impeccable')
696
+ if (entries.some(e =>
697
+ e === 'impeccable' || e.endsWith('-impeccable') ||
698
+ e === 'teach-impeccable' || e.endsWith('-teach-impeccable')
699
+ )) {
700
+ return d;
701
+ }
702
+ } catch {}
703
+ }
638
704
  }
639
705
  return null;
640
706
  }
@@ -678,26 +744,26 @@ function isRealSkillDir(skillsDir, name) {
678
744
  * by name -- never touches third-party skills that happen to start with `i-`.
679
745
  * Returns the number of skills migrated.
680
746
  */
681
- function migrateUnprefixImpeccable(root) {
747
+ function migrateUnprefixImpeccable(root, scope) {
682
748
  let migrated = 0;
683
749
  for (const d of PROVIDER_DIRS) {
684
- const skillsDir = join(root, d, 'skills');
685
- if (!existsSync(skillsDir)) continue;
686
- let entries;
687
- try { entries = readdirSync(skillsDir); } catch { continue; }
688
- for (const name of entries) {
689
- // A prefixed impeccable skill is `<prefix>impeccable`, not the canonical
690
- // `impeccable` and not an unrelated legacy skill name.
691
- if (name === 'impeccable' || name === 'teach-impeccable') continue;
692
- if (!name.endsWith('-impeccable')) continue;
693
- if (!isRealSkillDir(skillsDir, name)) continue;
694
-
695
- const dest = join(skillsDir, 'impeccable');
696
- try {
697
- rmSync(dest, { recursive: true, force: true });
698
- renameSync(join(skillsDir, name), dest);
699
- migrated++;
700
- } catch {}
750
+ for (const skillsDir of existingSkillsDirs(root, d, scope)) {
751
+ let entries;
752
+ try { entries = readdirSync(skillsDir); } catch { continue; }
753
+ for (const name of entries) {
754
+ // A prefixed impeccable skill is `<prefix>impeccable`, not the canonical
755
+ // `impeccable` and not an unrelated legacy skill name.
756
+ if (name === 'impeccable' || name === 'teach-impeccable') continue;
757
+ if (!name.endsWith('-impeccable')) continue;
758
+ if (!isRealSkillDir(skillsDir, name)) continue;
759
+
760
+ const dest = join(skillsDir, 'impeccable');
761
+ try {
762
+ rmSync(dest, { recursive: true, force: true });
763
+ renameSync(join(skillsDir, name), dest);
764
+ migrated++;
765
+ } catch {}
766
+ }
701
767
  }
702
768
  }
703
769
  return migrated;
@@ -774,7 +840,7 @@ function uniquePaths(paths) {
774
840
 
775
841
  function userSkillProbePaths(home, harnessDir, provider) {
776
842
  return uniquePaths([
777
- join(home, provider, 'skills'),
843
+ userProviderSkillsDir(home, provider),
778
844
  join(home, harnessDir, 'skills'),
779
845
  ]);
780
846
  }
@@ -804,7 +870,7 @@ function collectInstallDetections(root, home = homedir()) {
804
870
  scope: 'user',
805
871
  foundPath,
806
872
  installRoot: home,
807
- installPath: join(home, provider, 'skills'),
873
+ installPath: userProviderSkillsDir(home, provider),
808
874
  skillProbePaths,
809
875
  hasRealSkills: skillProbePaths.some(hasRealSkillEntries),
810
876
  reason: 'user harness folder',
@@ -1044,13 +1110,17 @@ function isInProjectProviderLink(localSkillsDir, root, provider) {
1044
1110
  * Copy each target provider's compiled skill variant from an extracted bundle
1045
1111
  * into the project. Writes real directories (copy, never symlink) so every
1046
1112
  * harness keeps the build that was compiled for it. Returns skills written.
1113
+ * `scope: 'user'` writes to the provider's global skills layout (see
1114
+ * HOME_SKILLS_DIR_OVERRIDES); anything else writes `<provider>/skills`.
1047
1115
  */
1048
- function copyProviderSkills(bundleDir, root, targets) {
1116
+ function copyProviderSkills(bundleDir, root, targets, { scope } = {}) {
1049
1117
  let written = 0;
1050
1118
  for (const provider of targets) {
1051
1119
  const srcDir = join(bundleDir, provider, 'skills');
1052
1120
  if (existsSync(srcDir)) {
1053
- const localSkillsDir = join(root, provider, 'skills');
1121
+ const localSkillsDir = scope === 'user'
1122
+ ? userProviderSkillsDir(root, provider)
1123
+ : join(root, provider, 'skills');
1054
1124
  // A previous `npx skills` install may have left this provider's skills dir
1055
1125
  // as a symlink to ANOTHER in-project provider's canonical copy. Drop only
1056
1126
  // that link so we write a real, provider-specific directory. A user's
@@ -1072,8 +1142,8 @@ function copyProviderSkills(bundleDir, root, targets) {
1072
1142
  return written;
1073
1143
  }
1074
1144
 
1075
- function refreshProviderSkills(bundleDir, root, providers) {
1076
- const unique = deduplicateProviders(root, providers);
1145
+ function refreshProviderSkills(bundleDir, root, providers, scope) {
1146
+ const unique = deduplicateProviders(root, providers, scope);
1077
1147
  let updated = 0;
1078
1148
  for (const { provider, localSkillsDir } of unique) {
1079
1149
  const srcDir = join(bundleDir, provider, 'skills');
@@ -1532,13 +1602,13 @@ async function install(flags) {
1532
1602
  }
1533
1603
 
1534
1604
  const { targets, installRoot, hookRoot, scope } = plan;
1535
- const existing = isAlreadyInstalled(installRoot);
1605
+ const existing = isAlreadyInstalled(installRoot, scope);
1536
1606
 
1537
1607
  if (existing && !force) {
1538
1608
  console.log(`Impeccable skills are already installed (found in ${existing}/).`);
1539
- const installedTargets = findInstalledProviders(installRoot);
1609
+ const installedTargets = findInstalledProviders(installRoot, scope);
1540
1610
  const selectedInstalledTargets = targets.filter(provider => installedTargets.includes(provider));
1541
- const linkedTargets = findLinkedProviders(installRoot, selectedInstalledTargets);
1611
+ const linkedTargets = findLinkedProviders(installRoot, selectedInstalledTargets, scope);
1542
1612
  const copyTargets = selectedInstalledTargets.filter(provider => !linkedTargets.includes(provider));
1543
1613
  const hookTargets = selectedInstalledTargets;
1544
1614
  const wantHooks = installHooks && await decideHookInstall(hookRoot, hookTargets, { yes });
@@ -1565,10 +1635,10 @@ async function install(flags) {
1565
1635
  }
1566
1636
  }
1567
1637
 
1568
- if (!updateCheckSkipped && copyTargets.length > 0 && !isUpToDate(installRoot, copyTargets, bundleDir)) {
1569
- migrateUnprefixImpeccable(installRoot);
1570
- updated = refreshProviderSkills(bundleDir, installRoot, copyTargets);
1571
- const v = getSkillsVersion(installRoot);
1638
+ if (!updateCheckSkipped && copyTargets.length > 0 && !isUpToDate(installRoot, copyTargets, bundleDir, scope)) {
1639
+ migrateUnprefixImpeccable(installRoot, scope);
1640
+ updated = refreshProviderSkills(bundleDir, installRoot, copyTargets, scope);
1641
+ const v = getSkillsVersion(installRoot, scope);
1572
1642
  console.log(`Updated ${updated} skill(s)${v ? ` to v${v}` : ''}.`);
1573
1643
  }
1574
1644
 
@@ -1581,7 +1651,7 @@ async function install(flags) {
1581
1651
  console.log('Existing skills were left unchanged.');
1582
1652
  console.log('Run with --force to reinstall.\n');
1583
1653
  } else if (updated === 0 && writtenHookTargets.length === 0) {
1584
- const v = getSkillsVersion(installRoot);
1654
+ const v = getSkillsVersion(installRoot, scope);
1585
1655
  console.log(`Skills are up to date${v ? ` (v${v})` : ''}.`);
1586
1656
  console.log('Run with --force to reinstall.\n');
1587
1657
  } else {
@@ -1620,12 +1690,12 @@ async function install(flags) {
1620
1690
 
1621
1691
  // Retire any old `i-`-prefixed install so the fresh copy lands on the
1622
1692
  // canonical `impeccable` dir instead of orphaning the prefixed one.
1623
- migrateUnprefixImpeccable(installRoot);
1693
+ migrateUnprefixImpeccable(installRoot, scope);
1624
1694
 
1625
1695
  let written = 0;
1626
1696
  let hookTargets = [];
1627
1697
  try {
1628
- written = copyProviderSkills(bundleDir, installRoot, targets);
1698
+ written = copyProviderSkills(bundleDir, installRoot, targets, { scope });
1629
1699
  hookTargets = wantHooks ? copyProviderHooks(bundleDir, hookRoot, targets, { force, skillRoot: installRoot }) : [];
1630
1700
  } catch (e) {
1631
1701
  rmSync(bundleDir, { recursive: true, force: true });
@@ -1655,27 +1725,31 @@ function findProjectRoot() {
1655
1725
  return process.cwd();
1656
1726
  }
1657
1727
 
1658
- function findInstalledProviders(root) {
1728
+ function findInstalledProviders(root, scope) {
1659
1729
  const found = [];
1660
1730
  for (const d of PROVIDER_DIRS) {
1661
- const skillsDir = join(root, d, 'skills');
1662
- if (!existsSync(skillsDir)) continue;
1663
- try {
1664
- const entries = readdirSync(skillsDir);
1665
- if (entries.some(name => isSkillDir(skillsDir, name))) found.push(d);
1666
- } catch {}
1731
+ for (const skillsDir of existingSkillsDirs(root, d, scope)) {
1732
+ try {
1733
+ const entries = readdirSync(skillsDir);
1734
+ if (entries.some(name => isSkillDir(skillsDir, name))) {
1735
+ found.push(d);
1736
+ break;
1737
+ }
1738
+ } catch {}
1739
+ }
1667
1740
  }
1668
1741
  return found;
1669
1742
  }
1670
1743
 
1671
- function findLinkedProviders(root, providers) {
1744
+ function findLinkedProviders(root, providers, scope) {
1672
1745
  return providers.filter(provider => {
1673
- const skillDir = join(root, provider, 'skills', 'impeccable');
1674
- try {
1675
- return lstatSync(skillDir).isSymbolicLink();
1676
- } catch {
1677
- return false;
1746
+ for (const skillsDir of providerSkillsDirCandidates(root, provider, scope)) {
1747
+ const skillDir = join(skillsDir, 'impeccable');
1748
+ try {
1749
+ if (lstatSync(skillDir).isSymbolicLink()) return true;
1750
+ } catch {}
1678
1751
  }
1752
+ return false;
1679
1753
  });
1680
1754
  }
1681
1755
 
@@ -1222,7 +1222,7 @@ if (IS_BROWSER) {
1222
1222
  return {
1223
1223
  type: f.type || f.id,
1224
1224
  category: ap ? ap.category : 'quality',
1225
- severity: ap?.severity || 'warning',
1225
+ severity: f.severity || ap?.severity || 'warning',
1226
1226
  detail: f.detail || f.snippet,
1227
1227
  ignoreValue: f.ignoreValue || f.value || '',
1228
1228
  name: ap ? ap.name : (f.type || f.id),
@@ -1458,10 +1458,7 @@ if (IS_BROWSER) {
1458
1458
  const _ruleOk = (id) => !_disabled.length || !_disabled.includes(id);
1459
1459
  const designSystem = browserDesignSystemConfig();
1460
1460
  const designSeen = { fonts: new Set(), colors: new Set(), radii: new Set() };
1461
- // Note: provider-gated rules (--gpt / --gemini) are NOT filtered here. In a
1462
- // real browser env (detector page, live overlay, extension) running every
1463
- // check is free, so we always surface them; the gating is purely a CLI
1464
- // output concern, applied in the Node engines' detect* return paths.
1461
+ // All deterministic rules run in the browser and extension path.
1465
1462
 
1466
1463
  for (const el of document.querySelectorAll('*')) {
1467
1464
  // Skip impeccable's own elements and any descendants (overlays, labels, banner, nav buttons)
@@ -1477,6 +1474,7 @@ if (IS_BROWSER) {
1477
1474
 
1478
1475
  const findings = [
1479
1476
  ...checkElementBordersDOM(el).map(f => ({ type: f.id, detail: f.snippet })),
1477
+ ...checkElementPseudoStripeDOM(el).map(f => ({ type: f.id, detail: f.snippet })),
1480
1478
  ...checkElementColorsDOM(el).map(f => ({ type: f.id, detail: f.snippet })),
1481
1479
  ...checkElementMotionDOM(el).map(f => ({ type: f.id, detail: f.snippet })),
1482
1480
  ...checkElementGlowDOM(el).map(f => ({ type: f.id, detail: f.snippet })),
@@ -1488,6 +1486,7 @@ if (IS_BROWSER) {
1488
1486
  ...checkElementClippedOverflowDOM(el).map(f => ({ type: f.id, detail: f.snippet })),
1489
1487
  ...checkElementGptBorderShadowDOM(el).map(f => ({ type: f.id, detail: f.snippet })),
1490
1488
  ...checkElementTextOverflowDOM(el).map(f => ({ type: f.id, detail: f.snippet })),
1489
+ ...checkElementBlinkingCursorDOM(el).map(f => ({ type: f.id, detail: f.snippet, ...(f.severity ? { severity: f.severity } : {}) })),
1491
1490
  ...checkElementDesignSystemDOM(el, designSystem, designSeen),
1492
1491
  ].filter(f => _ruleOk(f.type));
1493
1492
 
@@ -1526,12 +1525,55 @@ if (IS_BROWSER) {
1526
1525
  addBrowserFindings(groupMap, document.body, sectionKickerFindings);
1527
1526
  }
1528
1527
 
1528
+ const numberedLabelFindings = checkNumberedSectionLabelsDOM()
1529
+ .map(f => ({ type: f.id, detail: f.snippet }))
1530
+ .filter(f => _ruleOk(f.type));
1531
+ if (numberedLabelFindings.length > 0) {
1532
+ pageLevelFindings.push(...numberedLabelFindings);
1533
+ addBrowserFindings(groupMap, document.body, numberedLabelFindings);
1534
+ }
1535
+
1536
+ const repeatedTextFindings = checkRepeatedContainerTextDOM()
1537
+ .map(f => ({ type: f.id, detail: f.snippet }))
1538
+ .filter(f => _ruleOk(f.type));
1539
+ if (repeatedTextFindings.length > 0) {
1540
+ pageLevelFindings.push(...repeatedTextFindings);
1541
+ addBrowserFindings(groupMap, document.body, repeatedTextFindings);
1542
+ }
1543
+
1529
1544
  const layoutFindings = checkLayout().filter(f => _ruleOk(f.type));
1530
1545
  for (const f of layoutFindings) {
1531
1546
  const el = f.el || document.body;
1532
1547
  addBrowserFindings(groupMap, el, [{ type: f.type, detail: f.detail || f.snippet }]);
1533
1548
  }
1534
1549
 
1550
+ // Heading rhythm (browser-only: needs real layout for the gap math)
1551
+ const headingRhythmFindings = checkHeadingRhythmDOM().filter(f => _ruleOk(f.type));
1552
+ for (const f of headingRhythmFindings) {
1553
+ addBrowserFindings(groupMap, f.el || document.body, [{ type: f.type, detail: f.detail }]);
1554
+ }
1555
+
1556
+ // Edge-flush cards in horizontal scrollers (browser-only: needs real
1557
+ // layout for the scroller clip box vs card rect math)
1558
+ const edgeFlushFindings = checkEdgeFlushCardsDOM().filter(f => _ruleOk(f.type));
1559
+ for (const f of edgeFlushFindings) {
1560
+ addBrowserFindings(groupMap, f.el || document.body, [{ type: f.type, detail: f.detail }]);
1561
+ }
1562
+
1563
+ // Text occlusion / element overlap (browser-only: needs real layout +
1564
+ // elementFromPoint to confirm what actually paints on top)
1565
+ const occlusionFindings = checkTextOcclusionDOM().filter(f => _ruleOk(f.type));
1566
+ for (const f of occlusionFindings) {
1567
+ addBrowserFindings(groupMap, f.el || document.body, [{ type: f.type, detail: f.detail }]);
1568
+ }
1569
+
1570
+ // First-viewport column overflow — the stretched-hero signature
1571
+ // (browser-only: needs real layout for the content-extent math)
1572
+ const colOverflowFindings = checkFirstViewportColumnOverflowDOM().filter(f => _ruleOk(f.type));
1573
+ for (const f of colOverflowFindings) {
1574
+ addBrowserFindings(groupMap, f.el || document.body, [{ type: f.type, detail: f.detail }]);
1575
+ }
1576
+
1535
1577
  // Page-level quality checks (headings, etc.)
1536
1578
  const qualityFindings = checkPageQualityDOM().filter(f => _ruleOk(f.type));
1537
1579
  if (qualityFindings.length > 0) {
@@ -1557,7 +1599,25 @@ if (IS_BROWSER) {
1557
1599
  }
1558
1600
  const htmlPatternFindings = checkHtmlPatterns(docClone.outerHTML);
1559
1601
  if (htmlPatternFindings.length > 0) {
1560
- const mapped = htmlPatternFindings.map(f => ({ type: f.id, detail: f.snippet })).filter(f => _ruleOk(f.type));
1602
+ const mapped = htmlPatternFindings.map(f => {
1603
+ const item = { type: f.id, detail: f.snippet };
1604
+ if (f.severity) {
1605
+ item.severity = f.severity;
1606
+ } else if (f.id === 'pulsing-dot' && f.selector) {
1607
+ // The string scan promotes header/nav dots on its own; with a live
1608
+ // layout also promote dots resting in the first ~900px of the page
1609
+ // (the hero region), which the source scan cannot measure.
1610
+ try {
1611
+ const dotEl = document.querySelector(f.selector);
1612
+ if (dotEl) {
1613
+ const rect = dotEl.getBoundingClientRect();
1614
+ const pageTop = rect.top + (window.scrollY || 0);
1615
+ if (pageTop <= 900) item.severity = 'error';
1616
+ }
1617
+ } catch { /* unresolvable selector: keep registry severity */ }
1618
+ }
1619
+ return item;
1620
+ }).filter(f => _ruleOk(f.type));
1561
1621
  pageLevelFindings.push(...mapped);
1562
1622
  addBrowserFindings(groupMap, document.body, mapped);
1563
1623
  }
@@ -1931,6 +1991,9 @@ if (IS_BROWSER) {
1931
1991
  window.impeccableDetectAsync = detectAsync;
1932
1992
  window.impeccableScan = scan;
1933
1993
  window.impeccableScanAsync = scanAsync;
1994
+ // Raw measurement for the URL engine's content-hidden-at-rest pass: it
1995
+ // drives a reveal sweep from Node and thresholds the result itself.
1996
+ window.impeccableMeasureHiddenText = measureHiddenTextDOM;
1934
1997
  window.impeccableCollectVisualContrastCandidates = collectVisualContrastCandidates;
1935
1998
  window.impeccableAnalyzeVisualContrast = analyzeVisualContrast;
1936
1999
  window.impeccableGetLastVisualContrastAnalyses = () => lastVisualContrastAnalyses.slice();