From f36d1ac2d9f53e7eed73193a78ef44601588a3eb Mon Sep 17 00:00:00 2001 From: Paul Bakaus Date: Tue, 12 May 2026 22:47:18 -0700 Subject: [PATCH] site + build: bump rule count to 29, strip changelog from detector check Two changes: - site/pages/index.astro: three live mentions of "28 rules / checks" bumped to 29 after the body-text-viewport-edge rule landed in b9bf496. - scripts/build.js: the detection-count validator was reading the unstripped content, so historical counts inside changelog entries (e.g. "28 rules" from an older release note) were flagging against the current detector total. The command-count check already strips the changelog ul; the detection check now does the same. Co-Authored-By: Claude Opus 4.7 (1M context) --- scripts/build.js | 6 ++++-- site/pages/index.astro | 6 +++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/scripts/build.js b/scripts/build.js index e6891d7c3..b9dd0c43d 100644 --- a/scripts/build.js +++ b/scripts/build.js @@ -95,9 +95,11 @@ function generateCounts(rootDir, skills, buildDir) { } } - // Check for stale detection counts + // Check for stale detection counts. Use the changelog-stripped content + // so historical counts in changelog entries (e.g. "28 rules" from an + // older release) don't flag against the current detector total. const detectPattern = /\b(\d+)\s+(deterministic\s+)?(checks|patterns|rules|detections)/gi; - for (const match of content.matchAll(detectPattern)) { + for (const match of strippedContent.matchAll(detectPattern)) { const num = parseInt(match[1]); if (num !== detectionCount && num > 10) { // ignore small numbers like "3 patterns" console.error(` ❌ ${relPath}: found "${match[0]}" but detection count is ${detectionCount}`); diff --git a/site/pages/index.astro b/site/pages/index.astro index 5ee3451d1..b5d1b78fb 100644 --- a/site/pages/index.astro +++ b/site/pages/index.astro @@ -491,7 +491,7 @@ import '../styles/sub-pages.css';