Repository navigation
docs(rules): search-first rewrite for local, schema, ax, ai, agents, perf, performance, core - #314
Merged
Merged
Conversation
This was referenced Sep 10, 2026
geo-meta, nap-consistency, service-area and the category index rewritten to the template in docs/rules/a11y/aria-labels.mdx: search-first title, "what it is" / "what squirrel checks" / "how to fix it", related rules, verified references, CTA. Source-derived corrections to the old text: - local/service-area: the five path patterns are anchored to the end of the pathname, so only a hub such as /locations matches. Child pages like /locations/san-francisco do not. The old page did not say this. - local/nap-consistency: documents the 10-page sample floor and the 70% modal agreement floor, and the exact skip/fail/warn messages, none of which the old page carried. - local/geo-meta: the rule matches tag names only and never validates values; ICBM is matched with that exact uppercase spelling. Claude-Session: https://claude.ai/code/session_0174D96WamG9ZhJxRudpeniA Signed-off-by: Nik Cubrilovic <[email protected]>
- geo-meta: note the zero-check path when a page has no parsed document; drop the unsourced claim about directory crawlers. - nap-consistency: "up to four checks" (contact-info is emitted only on pass); name the exact @type set (LocalBusiness, Organization, Restaurant, Store); note the case-insensitive /contact match and that the business name value can be absent; say the address messages are the phone messages with the label substituted. - service-area: describe areaServed as what schema/local-business accepts rather than attributing it to Google Search Central, which does not document it. - index: the rule pair checks phone and address consistency, not name. Claude-Session: https://claude.ai/code/session_0174D96WamG9ZhJxRudpeniA Signed-off-by: Nik Cubrilovic <[email protected]>
Twelve rule pages plus the category index rewritten to the template in docs/rules/a11y/aria-labels.mdx. Source-derived corrections to the old text: - schema/organization: `logo` is NOT in REQUIRED_PROPS. The required set is name and url; the missing-logo result is a separate info check. The old solution text called logo required. - schema/local-business: REQUIRED_PROPS is ["name"] alone. squirrel accepts areaServed (or the legacy serviceArea, including an @id reference resolved through the graph) in place of an address, which Google's LocalBusiness reference does not document. Noted on the page. - schema/website-search, organization, breadcrumb, faq, product, review, video: these read the top level of each ld+json script and do NOT flatten @graph, so Yoast-style markup reports as absent. Documented as the common false positive on each page. schema/article and schema/local-business do flatten, and say so. - schema/review: the pass message hardcodes `/5` regardless of bestRating. - schema/product: only the FIRST entry of an offers array is checked, and a price of 0 counts as missing because the test is falsiness. - schema/breadcrumb: the sequence check only runs on numeric positions, so a string "1" is never reported as out of order. - schema/video: the duration check tests the PT prefix only. - schema/faq: a Question whose @type is an array is counted invalid. - schema/website-search and schema/faq: Google retired the sitelinks search box on 21 November 2024 and stopped showing FAQ rich results on 7 May 2026. Both pages say so instead of promising a rich result. Claude-Session: https://claude.ai/code/session_0174D96WamG9ZhJxRudpeniA Signed-off-by: Nik Cubrilovic <[email protected]>
- Node selection: the raw-script rules keep the FIRST match in the LAST matching script, not the first on the page. Corrected on website-search, organization, breadcrumb, faq, product and video. - Check counts corrected: article 1-3, organization 1-4, product 1-3, video 1-3, local-business 1-4 (address and location are mutually exclusive), website-search 0-2. - Every property test is truthiness, not presence. Stated on each page where it changes the outcome (price 0, name "", position 0). - website-search: a SearchAction is matched only on an exact @type string; an array containing it is not. - breadcrumb: the first numeric position is compared against 1. - coverage-outlier: only 2xx pages with a non-unknown page type enter a group; a type present on 70% of a group DOES join its norm; the norm summary is sorted by page type and by type name. - video: a <video> element counts whatever domain it plays from; only the iframe match is restricted to youtube/vimeo. P1D is a valid ISO 8601 duration the PT-prefix check rejects. - review: only script-root nodes are inspected, no nesting, no @graph; the count warning fires only once ratingValue is present. - rating-scope: message templates rather than filled examples; the visible-text search includes alt, aria-label and title; the article carrier set includes Brand, WebSite and WebPage. - Softened claims the cited references do not support on article, organization, product, review, json-ld-valid, coverage-outlier, rating-scope and website-search. Claude-Session: https://claude.ai/code/session_0174D96WamG9ZhJxRudpeniA Signed-off-by: Nik Cubrilovic <[email protected]>
Fourteen rule pages plus the category index rewritten to the template in docs/rules/a11y/aria-labels.mdx. Source-derived corrections to the old text: - ax/ai-crawlers: 24 tokens in four classes (11 training, 5 AI-search, 5 user-action, 3 archive). Blocking is Disallow: / with no Allow: / in the groups that apply; a group naming the token wins over *. Training-only blocks emit no warning at all. - ax/content-signals: names the exact scoping rule (a directive under * or outside any group is checked against every block; a named group only against its own agents) and the `use=` auxiliary key Cloudflare emits. - ax/agent-blocking: the soft-block threshold is 20% of the browser body size; a Claude-User block is a fail and a GPTBot block a warn; a 402 is handed to ax/pay-per-crawl rather than reported as a block. - ax/content-without-js: the three thresholds (200 rendered words, 100 JS-only words, 60% raw coverage) and the three skip paths, including the self-identical comparison on a browser-rendered crawl. - ax/token-weight: 15% ratio floor, 100,000-token budget, 1,024-byte minimum, and bytes/4 as the token heuristic. The two warn messages carry no numbers on purpose, because the report groups by message. - ax/llms-txt: the SPA-fallback body sniff is the only `fail` in the rule; the two alternate paths; the three format notes verbatim. - ax/agents-md: the AGENTS.md recommendation only escalates to a warning on sites that already publish llms.txt. - ax/rsl-license: a never-requested document reports "unknown", not "broken"; both look like status 0 and the reason is the discriminator. - ax/archive-indexing: 365 days is the staleness threshold, measured from the lookup timestamp. Claude-Session: https://claude.ai/code/session_0174D96WamG9ZhJxRudpeniA Signed-off-by: Nik Cubrilovic <[email protected]>
Four ai/* rule pages and the Agents group index. Source-derived corrections to the old text: - ai/ai-content is RETIRED, not "beta". The rule is a hard-guarded no-op that cannot invoke a model, marked disabled in its meta, and its only possible result is a skip with "AI content detection is retired". The old page described it as experimental and documented prerequisites for a check that cannot run. - ai/page-type-match: documents the exact ten-type mapping table and the 0.7 confidence floor below which a disagreement passes rather than warns. Neither was on the old page. - ai/llm-parsability: an analysis that ran but returned nothing scores 0, which reads as a failure rather than a skip. - ai/site-metadata: the summary is built field by field, domain age switches from days to whole years at one year, and weight 0 means the rule cannot move the score. - All four rules carry category "ax", so their pages keep the Agent Experience category link and their existing ai/* disable blocks. Claude-Session: https://claude.ai/code/session_0174D96WamG9ZhJxRudpeniA Signed-off-by: Nik Cubrilovic <[email protected]>
Replaced filled-in message examples with the source's own templates on every page, so nothing reads as a literal string the report never emits. - agent-blocking: at most two checks, not three; a soft block needs the agent response to be 2xx and the browser body non-empty, not equal statuses; an unchallenged 3xx or 404 counts as clean. - ai-crawlers: the summary's blocked clause is omitted when nothing is blocked, and each answer-access clause is omitted when its class has nothing blocked. Softened the archive claim: robots.txt is honoured voluntarily and does not remove existing captures. - api-discovery: registration_endpoint is RFC 8414 metadata pointing at the RFC 7591 endpoint; the protected-resource clause is optional. - content-signals: names all three signal descriptions, the use= values as the exception to yes/no, and that ONE blocked crawler in the class raises the contradiction. - content-without-js: a render that returns no HTML uses a different message from the other two skips. - llms-txt: the HTML sniff reads 512 characters, trimmed and lowercased. - noai-signals and rsl-license: robots.txt is voluntary, not enforcement; only an edge block enforces anything. - rsl-license: "unknown" needs a document explicitly recorded as never requested; an empty document list warns. - token-weight: the estimate is round(UTF-8 bytes / 4), and the warn messages do carry the fixed thresholds, just not per-page numbers. - well-known-agent: one check per manifest kind, first hit only; the plausible-key match is case-insensitive. - archive-indexing: the Common Crawl source suffix is optional and the staleness clock falls back to now when the capture time is unusable. Claude-Session: https://claude.ai/code/session_0174D96WamG9ZhJxRudpeniA Signed-off-by: Nik Cubrilovic <[email protected]>
fetchpriority, css-file-size, dom-size, lcp-hints, cls-hints, inp-hints, render-blocking, preconnect, font-loading, font-delivery, ttfb, cache-headers, bad-caching, compression, asset-compression, js-file-size, total-byte-weight. Also replaces the auto-generated Options tables, which printed every type as `unknown` and every default as `undefined`, with the real types and defaults from each rule's zod schema. Claude-Session: https://claude.ai/code/session_0174D96WamG9ZhJxRudpeniA Signed-off-by: Nik Cubrilovic <[email protected]>
The remaining 13 rule pages plus the perf category index and the Performance group index. Source-derived corrections to the old text: - perf/lcp-hints: the preload match compares the raw src attribute against the raw preload href, so a relative src and an absolute preload URL do not match and the image is still counted. - perf/cls-hints: ONE of width or height clears the image check, even though the browser needs both; an iframe needs both. - perf/render-blocking: any media attribute at all, including media="all", excludes a stylesheet from the count. - perf/preconnect: a CDN is reported only on an exact https://<host> origin match, and the list is thirteen hosts. - perf/font-loading: the @font-face scan is a regex over the page HTML, so declarations in an external stylesheet are never checked. - perf/unminified-css and perf/unminified-js: half of each rule judges by filename, so a minified file without .min in its name is still reported at info status. - perf/animated-content: a GIF is found by extension, so a static GIF is reported; a <video> with a src and no <source> children never is. - perf/carousel-hidden-eager: only inline hiding is detected, so a slide hidden by a class is invisible to the rule. - perf/duplicate-js: the fallback name pattern reduces app-header.js and app-footer.js to one library, "app". - perf/js-libraries: only 5 of the 22 libraries carry advisory data, and a library detected without a version is never checked against them. - perf/source-maps: external scripts and stylesheets are not read, so the finding is a floor. - perf/total-byte-weight: the sum covers every distinct resource across the crawl, not one page load, and the fonts bucket is never populated. - perf/http2: the negotiated protocol is not a response header, so the rule infers from Alt-Svc and the Server string. Claude-Session: https://claude.ai/code/session_0174D96WamG9ZhJxRudpeniA Signed-off-by: Nik Cubrilovic <[email protected]>
Fourteen rule pages plus the category index. Source-derived corrections to the old text: - core/doctype: the page targets the pasted error "Doctype must be declared first". A BOM and an XML declaration are the only two things allowed before the doctype; anything else warns rather than fails. Non-HTML5 doctypes warn and are labelled XHTML, HTML4 or legacy. - core/charset: three sources are read in order (meta charset, http-equiv, Content-Type header) and the attribute names are matched case-insensitively for React's charSet/httpEquiv. The position check accepts a <title> before the charset meta. The header fallback is why two pages of one template can disagree. - core/meta-title: a missing title emits TWO checks, meta-title and document-title. - core/title-unique: normalisation lowercases AND collapses whitespace, which is stricter than content/duplicate-title. Untitled pages are skipped, not grouped. - core/canonical: a non-self-referential canonical is info, not a warning. - core/canonical-header: the comparison lowercases, drops the fragment and strips a trailing slash, so those differences do not count as a mismatch. - core/canonical-form-drift: four axes, with trailing slash compared inside a first-path-segment section; the site root and any path whose last segment contains a dot are excluded from that axis. Tracking params are matched by an explicit name list, not by "has a query". - core/nosnippet: max-snippet matches only the exact max-snippet:<digits> form, and a positive value is info. - core/robots-meta: the noindex/nofollow test is a substring match. - core/og-tags: each missing tag is its own check; og:type is info and does not block the summary pass. - core/twitter-cards: only summary_large_image has its image requirement checked, and the type is matched exactly. - core/favicon: formats are read from the rel and the file extension, deduplicated, and the file is never fetched. Also replaces the auto-generated Options tables on meta-title and meta-description, which printed every default as `undefined`. Claude-Session: https://claude.ai/code/session_0174D96WamG9ZhJxRudpeniA Signed-off-by: Nik Cubrilovic <[email protected]>
Source corrections: - cache-headers: the extension test runs against the whole URL, so an uppercase extension or any query string makes a response "HTML". cache-immutable is emitted after the max-age branch either way. - cls-hints: an empty width or height clears nothing; an iframe needs a src to be reported, so srcdoc iframes never are. - critical-request-chains: every @import on the page folds into ONE chain member, not one each. - css-file-size: the recorded size is the transferred size only when the headers gave one, else the decoded body length. - duplicate-js: corrected the name-extraction description and the false positive example (app-header.js keeps its full name). - font-delivery: media is lowercased before the print comparison. - font-loading: the font-display test is a case-sensitive substring and matches inside comments; the Google Fonts usage test accepts any link[href] to that host, including a preconnect. - http2: three checks are possible on an http URL advertising h2. - inp-hints: the pass needs at least one script[src], and an empty src is not counted as blocking. - js-libraries: URLs and bodies from the crawl's script list are scanned too; the version suffix is omitted when none was extracted. - js-redirects: 300-399 includes 304, which is cache revalidation. - lazy-above-fold: the hidden test includes the image itself. - lcp-fetchpriority: the snippet is rebuilt, not the original tag. - lcp-hints: a lazy image with fetchpriority=high is a candidate, and a candidate with no src consumes a slot silently. - legacy-js: exactly 500 characters is scanned; TypeScript uses its own target option, not browserslist. - preconnect and render-blocking: hint, href and src values must be non-empty to count. - source-maps: external scripts from the crawl ARE read, headers and bodies both; a data: URI in a header is classified as exposed. - total-byte-weight: the HTML and font buckets are never populated, and estimation needs the resource containers to be absent, not empty. - ttfb: the skip is on a missing TTFB value, and download-time is suppressed by that same early return. - unminified-css and unminified-js: at most two checks; 2,048 is inclusive; the hash pattern is [.-][a-f0-9]{8,}. ; the DOM-only lists differ from the crawl-list ones. Standards claims corrected: WebM is a container; HTTP/1.1 keeps connections alive; identity is the no-op coding; immutable applies while fresh; heuristic caching exists; font-display defaults to auto; async still interrupts parsing; lazy loading has a loading distance; fetchpriority is a hint; sourcesContent is optional; sourcemap "hidden" still writes the file. Several "common false positive" notes were limitations in the other direction and are now labelled as such. Claude-Session: https://claude.ai/code/session_0174D96WamG9ZhJxRudpeniA Signed-off-by: Nik Cubrilovic <[email protected]>
Source corrections: - canonical-form-drift: the norm summary is in fixed axis order (scheme, host, trailing slash, tracking params); the host test compares full hostnames after stripping www., so a sibling subdomain is cross-host; the empty-crawl skip wording is the non-streaming path's. - canonical-header: the trailing-slash trim runs on the serialised URL, not the pathname. - doctype: the value is truncated to 50 characters PLUS an ellipsis; leading whitespace is allowed, a comment is not. - favicon: the format test is a case-sensitive endsWith on the whole href, so /favicon.svg?v=2 and /favicon.SVG both record as "icon". - nosnippet: the informational branch matches on the max-snippet: prefix alone, so max-snippet:-1 and a bare max-snippet: land there. - title-unique: a crawl where every page is untitled PASSES. - meta-title and meta-description: the thresholds in the messages are the configured options, with 30/75 and 120/160 as defaults. - h1: weight 7 is behind meta-title's 8, not joint highest. Standards claims corrected: a relative canonical is valid and absolute is a recommendation; whitespace and comments before a doctype do not themselves cause quirks mode; the charset meta forms are resolved by document order under the header; the Open Graph protocol requires og:type rather than defaulting it; nofollow is a hint; a player or app Twitter card cannot fall back to Open Graph. Dropped the unsourced "roughly half of results" figure and the claim that a search engine has "no way" to distinguish pages with duplicate titles. Claude-Session: https://claude.ai/code/session_0174D96WamG9ZhJxRudpeniA Signed-off-by: Nik Cubrilovic <[email protected]>
- Trim two ai/* titles to under 60 characters. - Remove every em-dash from the ax category index prose, including the five pillar sections the intro rewrite had left alone, and turn their four rhetorical-question openers into declarative sentences. - Drop "actually" and "simply" as filler across 13 pages. Every reference URL in the branch was re-checked with curl and returns 200. `tangly check --strict` passes. Claude-Session: https://claude.ai/code/session_0174D96WamG9ZhJxRudpeniA Signed-off-by: Nik Cubrilovic <[email protected]>
- Every card in the local, schema, ax, perf and core category indexes now carries the rewritten page's own title and frontmatter description, with order, icons and links unchanged. 77 cards, verified to match their target page exactly. - The two group index cards (agents, performance) take the category index's description and keep their rule counts. - core/h1: described a11y/heading-order as "the axe-core check". There is no axe-core in packages/rules/src; every rule is a hand-written static check. Rewritten to say what the rule detects. Claude-Session: https://claude.ai/code/session_0174D96WamG9ZhJxRudpeniA Signed-off-by: Nik Cubrilovic <[email protected]>
Audited every cross-category "Related rules" line against the target rule's own meta.description. Twenty were wrong or vague: - content/date-agreement compares the visible date, the schema dates and the year in the URL or title. It does not read the sitemap. - crawl/canonical-chain finds canonicals pointing at URLs that REDIRECT, not canonicals that chain to other canonicals. - crawl/schema-noindex-conflict is rich-result markup on a page blocked from indexing; crawl/indexability-conflicts is robots.txt disagreeing with the meta tags and headers. - images/aspect-mismatch compares the declared ratio with the CSS box, not with the real file. - social/asset-divergence covers the favicon, theme colour and default OG image against the rest of the site. - eeat/authority-signals is an AI assessment of authorship, citations and outbound references. - content/author-info checks author markup, so the "not only in markup" gloss was backwards. - links/internal-links validates a link count, not a link graph. Plus tighter wording for content/hidden-text, content/thin-vs-site-norm, content/word-count, images/lazy-loading, images/svg-inline, security/cookie-flags, security/csp, security/leaked-secrets, social/social-profiles and url/slug-convention. Every related-rule id and link in the batch now resolves to a real rule and a real page. Claude-Session: https://claude.ai/code/session_0174D96WamG9ZhJxRudpeniA Signed-off-by: Nik Cubrilovic <[email protected]>
nc9
force-pushed
the
docs/rules-batch-b
branch
from
September 10, 2026 02:28
91c023f to
a0c8c74
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rewrites 77 rule pages plus 7 category and group index pages to the search-first template introduced in
docs/rules/a11y/aria-labels.mdx.Targets
main. The diff also carries dc0f3a1, the template commit fromdocs/rule-page-template, which lands with PR #316; once that merges this branch rebases ontoorigin/mainand the overlap disappears.Part of https://github.com/squirrelscan/repo/issues/2050.
Each rule page gets a search-first title and description, a "what it is" section, a "what squirrel checks" section derived line by line from the rule source in
packages/rules/src/, a fix snippet with the common false positive named, related rules, verified references, and the CTA block.Categories
category: "ax")What changed beyond the template
Every "what squirrel checks" bullet quotes the rule's own message template rather than paraphrasing it, and each page names the behaviour the old text got wrong. The per-category commit bodies list those individually. The largest ones:
website-search,organization,breadcrumb,faq,product,video,review) do not flatten@graph, so Yoast-style markup reports as absent.articleandlocal-businessdo flatten. Every page now says which.schema/local-businessrequiresnamealone and acceptsareaServedin place of an address, which Google's LocalBusiness reference does not document.ai/ai-contentis retired and hard-guarded, not "beta" as the old page said. Its only possible result is a skip.unknownand every default asundefined. They now carry the real values from each rule's zod schema.perf/total-byte-weightnever populates its HTML or font buckets, so documents and fonts are missing from the total.local/service-areamatches only the hub path, never a child page.Index cards
Every card in the local, schema, ax, perf and core category indexes now carries its target page's own title and frontmatter description, with order, icons and links unchanged. Verified programmatically to match, card by card.
Verification
make validate(tangly check --strict) passes.curl -sILand return 200.codex execagainst its rule source, and the findings were applied in a follow-up commit per category.meta.description; 20 were corrected. All ids and links resolve.packages/rules/src.https://claude.ai/code/session_0174D96WamG9ZhJxRudpeniA