noindex tooling, content/noindex/component/testing guidelines for agents

- IPAL_NOINDEX=1: whole-site noindex for staging (robots Disallow /, robots
  meta noindex,nofollow, X-Robots-Tag via buildSecurityHeaders).
- Markdown mirrors and llms files: X-Robots-Tag noindex; Markdown adds a
  Link rel=canonical to the HTML page.
- buildNoindexField refuses noindex on the homepage and archive pages.
- AGENT.md §0c: writing pages for Google and AI (structure, answer-first,
  facts, E-E-A-T, entity consistency, sameAs, aiSummary, meta) and a
  when-to-noindex table (legal pages stay indexed by default; drafts instead
  of noindexed pages; staging via env).
- AGENT.md §6.0: ten component rules (small, Button styled once, buttons as
  '+ Add Button' array, variants, panel clarity); audit warns on buttons
  styled inside sections.
- AGENT.md §8a + smoke.spec.template.ts: what to test in a client project;
  PROGRAMISTA §8.1a: how the plugin itself is tested.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-10-16 03:13:44 +02:00
co-authored by Claude Opus 5.5
parent 8e2dd28b83
commit f7466cf77f
13 changed files with 314 additions and 10 deletions
+4
View File
@@ -1,3 +1,5 @@
import { isSiteNoindex } from './siteNoindex.js'
type RobotRule = { allow?: string; disallow?: string[]; userAgent: string | string[] }
/**
@@ -125,6 +127,8 @@ export function buildRobots({
sitemap = true,
}: BuildRobotsArgs): RobotsRules {
const origin = baseUrl.replace(/\/$/, '')
// Staging / preview (IPAL_NOINDEX=1): nothing may be crawled.
if (isSiteNoindex()) {return { rules: { disallow: ['/'], userAgent: '*' } }}
const defaults = [...(adminRoute ? [adminRoute] : []), '/api']
const paramRules = disallowParams