Skip to content

fix(docs): correct per-category rule counts on group overview pages - #171

Merged
nc9 merged 1 commit into
mainfrom
fix/1661-group-overview-counts
Sep 1, 2026
Merged

nc9 merged 1 commit into
mainfrom
fix/1661-group-overview-counts

Conversation

@nc9

@nc9 nc9 commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

What

docs/rules/seo/index.mdx is a group overview page: it repeats each category's
rule count in its own cards. Only the canonical index (docs/rules/index.mdx) is
covered by the count guard, so this second copy drifted silently. Eight cards were
stale against the live catalog:

category doc said live
crawl 18 20
core 13 14
links 14 15
content 12 18
schema 10 12
social 4 5
a11y 59 61
url 8 9

How the numbers were derived

Recomputed from this repo, not copied from anywhere: loadAllRules() in
packages/rules, tallied by rule.meta.category. At this commit that is
278 rules across 21 categories.

Also checked, no change needed

  • docs/rules/agents/index.mdx (ax 17), docs/rules/performance/index.mdx
    (perf 29, card and prose), docs/rules/security/index.mdx (integrity 9,
    legal 4, blocking 3, security 16) are all current.
  • The exact totals on docs/index.mdx (278 / 21, including the per-category
    table, which sums to 278) and docs/agent-setup/index.mdx (278) are current.
  • "spanning 16 categories" on the SEO page is correct: 15 live categories map to
    the SEO group in packages/report/src/categories.ts, plus the docs-only
    Gap Analysis card.

Validation

make validate in docs/: Pages: 384 Orphans: 1 ✓ All checks passed.
make build: 387 pages built, clean.

Follow-up (not in this PR)

docs/configuration/rules.mdx is stale in the same way but needs a content
rewrite rather than a numeric fix: it claims "All 18 audit rule categories",
lists 20 sections (Site Integrity is missing entirely), documents the legacy
ai/* alias instead of the canonical ax/*, and has 14 stale **Rules:** N
values. Tracked separately so this fix stays reviewable.

Refs squirrelscan/repo#1661, which adds the guard that stops these pages
drifting again.

…1661

The SEO group overview page (docs/rules/seo/index.mdx) carries its own copy of
each category's rule count. Only the canonical index (docs/rules/index.mdx) was
guarded, so eight of the overview's cards had gone stale against loadAllRules():

  crawl 18 -> 20, core 13 -> 14, links 14 -> 15, content 12 -> 18,
  schema 10 -> 12, social 4 -> 5, a11y 59 -> 61, url 8 -> 9

Counts recomputed from packages/rules (loadAllRules(), 278 rules / 21
categories at this commit). The other group overview pages (agents,
performance, security) were checked and are already current, as are the exact
totals on docs/index.mdx and docs/agent-setup/index.mdx.

Refs squirrelscan/repo#1661, which adds a guard on the private side so these
pages cannot drift again.

Signed-off-by: Nik Cubrilovic <[email protected]>
@nc9
nc9 merged commit d67ee51 into main Sep 1, 2026
13 checks passed
@nc9
nc9 deleted the fix/1661-group-overview-counts branch September 1, 2026 08:48
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