@koda-sl/baker-cli 0.505.0 → 0.507.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.
- package/README.md +5 -2
- package/dist/{ads-OLOEMAID.js → ads-T5RPISTB.js} +3 -3
- package/dist/{analytics-4CCQYY7Z.js → analytics-P5UFA6I4.js} +315 -18
- package/dist/analytics-P5UFA6I4.js.map +1 -0
- package/dist/{chunk-DI44SZVP.js → chunk-7J3NZBPV.js} +31 -1
- package/dist/chunk-7J3NZBPV.js.map +1 -0
- package/dist/{chunk-VU5Z2V4S.js → chunk-D3KLDIPQ.js} +2 -2
- package/dist/{chunk-GJCB46L6.js → chunk-HWDRW36T.js} +2 -2
- package/dist/{chunk-S3FFLLYF.js → chunk-LIRX2Q66.js} +2 -2
- package/dist/{chunk-DX46OE4U.js → chunk-OJGYYH6K.js} +2 -2
- package/dist/{chunk-ZEGNIP3Y.js → chunk-TVTSA4EN.js} +3 -3
- package/dist/cli.js +4 -4
- package/dist/{critique-DU7K2KVR.js → critique-WOSMZPHW.js} +7 -17
- package/dist/critique-WOSMZPHW.js.map +1 -0
- package/dist/{funnel-727XATM5.js → funnel-S6JTLUK6.js} +3 -3
- package/dist/{google-VPL4KZDP.js → google-3GSINSOV.js} +2 -2
- package/dist/{landing-X4PG6XWU.js → landing-GEWSOHGZ.js} +3 -3
- package/dist/landing-GEWSOHGZ.js.map +1 -0
- package/dist/{lookup-LWJMDEEL.js → lookup-ZJIP2M4X.js} +4 -4
- package/dist/{performance-LMO73TUB.js → performance-WPFGEJTE.js} +2 -2
- package/dist/{plan-O2TTEUIW.js → plan-TVQSEKYL.js} +6 -6
- package/dist/{questionnaire-VE42SW77.js → questionnaire-LEZJLMAV.js} +3 -3
- package/dist/{sends-OLVQGOAE.js → sends-6FI7WELX.js} +3 -3
- package/dist/{sources-PSM2A5QD.js → sources-L3KNVLIB.js} +4 -4
- package/dist/{unstage-QFVL7AZ4.js → unstage-MDSSPUKV.js} +3 -3
- package/dist/{url-options-LA6BL3GS.js → url-options-IHL4OU4C.js} +2 -2
- package/package.json +1 -1
- package/dist/analytics-4CCQYY7Z.js.map +0 -1
- package/dist/chunk-DI44SZVP.js.map +0 -1
- package/dist/critique-DU7K2KVR.js.map +0 -1
- package/dist/landing-X4PG6XWU.js.map +0 -1
- /package/dist/{ads-OLOEMAID.js.map → ads-T5RPISTB.js.map} +0 -0
- /package/dist/{chunk-VU5Z2V4S.js.map → chunk-D3KLDIPQ.js.map} +0 -0
- /package/dist/{chunk-GJCB46L6.js.map → chunk-HWDRW36T.js.map} +0 -0
- /package/dist/{chunk-S3FFLLYF.js.map → chunk-LIRX2Q66.js.map} +0 -0
- /package/dist/{chunk-DX46OE4U.js.map → chunk-OJGYYH6K.js.map} +0 -0
- /package/dist/{chunk-ZEGNIP3Y.js.map → chunk-TVTSA4EN.js.map} +0 -0
- /package/dist/{funnel-727XATM5.js.map → funnel-S6JTLUK6.js.map} +0 -0
- /package/dist/{google-VPL4KZDP.js.map → google-3GSINSOV.js.map} +0 -0
- /package/dist/{lookup-LWJMDEEL.js.map → lookup-ZJIP2M4X.js.map} +0 -0
- /package/dist/{performance-LMO73TUB.js.map → performance-WPFGEJTE.js.map} +0 -0
- /package/dist/{plan-O2TTEUIW.js.map → plan-TVQSEKYL.js.map} +0 -0
- /package/dist/{questionnaire-VE42SW77.js.map → questionnaire-LEZJLMAV.js.map} +0 -0
- /package/dist/{sends-OLVQGOAE.js.map → sends-6FI7WELX.js.map} +0 -0
- /package/dist/{sources-PSM2A5QD.js.map → sources-L3KNVLIB.js.map} +0 -0
- /package/dist/{unstage-QFVL7AZ4.js.map → unstage-MDSSPUKV.js.map} +0 -0
- /package/dist/{url-options-LA6BL3GS.js.map → url-options-IHL4OU4C.js.map} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/commands/landing/critique.ts","../src/engine/landing/lib/constants.ts","../src/engine/landing/lib/copy-questions.ts","../src/engine/copy-tells/detect.ts","../src/engine/landing/lib/rules.ts","../src/engine/landing/lib/copy-judgments.ts","../src/engine/landing/lib/critique.ts","../src/commands/landing/snapshot.ts","../src/commands/landing/source-version.ts"],"sourcesContent":["import { readdir, readFile, stat } from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { defineCommand } from \"citty\";\nimport { loadBrandTokens } from \"../../engine/landing/lib/brand-tokens.ts\";\nimport { critiqueLanding, type LandingFinding } from \"../../engine/landing/lib/critique.ts\";\nimport { type AskNouls, rememberedJev } from \"../../engine/lib/remembered-nouls.ts\";\nimport type { ReviewUsage } from \"../../engine/nodes/local/lib/render-review.ts\";\nimport { registerSchema } from \"../../schemas.ts\";\nimport { holdUnbilledSpend } from \"../canvas/unbilled-spend.ts\";\nimport { CRITIC_VERSION, critiqueCacheDir, writeCritiqueSnapshot } from \"./snapshot.ts\";\nimport { computeLandingSourceSha, computeLegacyLandingSourceSha, readLandingSources } from \"./source-version.ts\";\n\nregisterSchema({\n command: \"landing.critique\",\n description:\n \"Start here: `baker landing critique my-landing` after building or editing a landing. Design-quality critic (ADVISORY — findings never fail it). Flags the known AI 'slop' tells (gradient text, overused fonts, side-tab borders, cream palettes, broken images…) in code, and reads the copy in any language for buzzwords, AI copy tells and positioning integrity (copy that ranks a competitor above the client, a rival named in a comparison), tiered block/warn/advisory, and records the critique the publish quality gate requires.\",\n args: {\n slug: {\n type: \"string\",\n description:\n \"Landing slug (folder under src/pages/). Pass several, space-separated, to critique them in one call.\",\n required: true,\n },\n full: {\n type: \"boolean\",\n description: \"Also print advisory-tier findings (default: block + warn only)\",\n required: false,\n },\n },\n});\n\n/** One path segment, no traversal, not a `_`-private folder — the slug is the\n * snapshot's filename, so it is parsed here at the boundary. */\nconst SLUG_RE = /^[a-z0-9][a-z0-9._-]*$/i;\n\n/**\n * Every slug the caller asked for, first-seen order, deduped.\n *\n * citty copies EVERY positional onto `_` (not just the ones past the first) and\n * additionally binds the first to `slug`, so `critique a b c` arrives as\n * `slug: \"a\"`, `_: [\"a\", \"b\", \"c\"]`. Deduping is therefore load-bearing, not a\n * nicety — without it the first landing would be critiqued twice.\n *\n * Batching matters because the critic is local and takes milliseconds: the cost\n * of critiquing three landings was three agent round-trips, not three analyses.\n */\nexport function parseCritiqueSlugs(args: { slug?: unknown; _?: unknown }): string[] {\n const rest = Array.isArray(args._) ? args._ : [];\n const all = [args.slug, ...rest].filter((s): s is string => typeof s === \"string\" && s.length > 0);\n return [...new Set(all.map(String))];\n}\n\nfunction fail(code: string, message: string, fix?: Record<string, unknown>): never {\n process.stderr.write(\n `${JSON.stringify({ ok: false, error: { code, message, ...(fix ? { fix } : {}) } }, null, 2)}\\n`,\n );\n process.exit(2);\n}\n\nexport const critiqueCommand = defineCommand({\n meta: {\n name: \"critique\",\n description:\n \"Start here: `baker landing critique <slug>` after building or editing a landing. Design-quality critic (ADVISORY — findings never fail it). Flags the known AI design tells (gradient text, overused fonts, side-tab borders, cream palettes, broken images) and reads the copy in any language for buzzwords, AI copy tells and positioning integrity (a concession ranking a competitor above the client, a rival named in a comparison), tiered block/warn/advisory, respecting the client's brand as the allowlist. Also records the critique that publishing requires — run it before finishing a landing.\",\n },\n args: {\n slug: {\n type: \"positional\",\n required: true,\n description: \"Landing slug (folder under src/pages/). Space-separate several to critique them in one call.\",\n },\n full: { type: \"boolean\", description: \"Also print advisory-tier findings\", default: false },\n },\n async run({ args }) {\n const slugs = parseCritiqueSlugs(args);\n const projectRoot = process.cwd();\n\n for (const slug of slugs) {\n if (!SLUG_RE.test(slug) || slug.includes(\"..\")) {\n fail(\n \"INVALID_SLUG\",\n `\"${slug}\" is not a landing slug — use the folder name directly under src/pages/ (letters, digits, dashes; not a path, not a _-private folder).`,\n { availableSlugs: await listLandingSlugs(projectRoot) },\n );\n }\n if (!(await isDir(path.resolve(projectRoot, \"src\", \"pages\", slug)))) {\n fail(\"NOT_FOUND\", `No landing at src/pages/${slug}/`, {\n availableSlugs: await listLandingSlugs(projectRoot),\n });\n }\n }\n\n // Brand tokens are the same for every landing in the call — read once.\n const spent: ReviewUsage[] = [];\n const onSpend = (u: ReviewUsage) => spent.push(u);\n const brand = await loadBrandTokens(projectRoot, { onSpend });\n const competitors = await readCompetitorNames(projectRoot);\n // The copy rules' answers are kept by sentence, so a re-run scores unchanged copy the same.\n const ask = rememberedJev(path.join(critiqueCacheDir(projectRoot), \".copy-answers.json\"), onSpend);\n const results = await Promise.all(slugs.map((slug) => critiqueOne(projectRoot, slug, brand, competitors, ask)));\n // No run record carries these calls: the next render of this workspace bills them.\n await holdUnbilledSpend(path.join(projectRoot, \"canvas\", \".cache\"), spent).catch(() => undefined);\n\n const landings = results.map(({ slug, report }) => ({\n slug,\n overall: report.overall,\n copyChecked: report.copyChecked,\n counts: report.counts,\n dimensions: report.dimensions,\n findings: report.findings.filter((f) => (args.full ? true : f.severity !== \"advisory\")).map(present),\n }));\n\n const blocked = results.filter((r) => r.report.counts.block > 0).map((r) => r.slug);\n const snapshotFailures = results.filter((r) => r.snapshotFailed).map((r) => r.slug);\n const copyUnchecked = results.filter((r) => !r.report.copyChecked).map((r) => r.slug);\n const hints = [\n blocked.length > 0\n ? `Block-tier tells are held at publish — fix them (${blocked.join(\", \")}). Warn/advisory are guidance. Scores are 0–1 (higher is better).`\n : copyUnchecked.length > 0\n ? \"No block-tier tells in what was checked.\"\n : \"No block-tier tells. Warn/advisory findings are guidance, not gates. Re-run after edits so the publish gate stays fresh.\",\n ...(copyUnchecked.length > 0\n ? [\n `The copy of ${copyUnchecked.join(\", \")} could not be checked just now (concessions to a competitor, rivals named, buzzwords and AI copy tells are unchecked, so none is reported), and this critique was not recorded for publishing. Run \\`baker landing critique ${copyUnchecked.join(\" \")}\\` again before publishing.`,\n ]\n : []),\n ...(snapshotFailures.length > 0\n ? [\n `Could not record the critique snapshot for ${snapshotFailures.join(\", \")} (.cache/ not writable?) — the publish quality gate will still report ${snapshotFailures.length === 1 ? \"this landing\" : \"these landings\"} as un-critiqued.`,\n ]\n : []),\n ];\n\n // One landing keeps the original top-level shape so existing readers (docs,\n // skills, the agent's own habits) are unaffected; `landings` is always there.\n const single = landings.length === 1 ? landings[0] : null;\n\n process.stdout.write(\n `${JSON.stringify(\n {\n ok: true,\n data: { advisory: true, ...(single ?? {}), landings },\n hints,\n },\n null,\n 2,\n )}\\n`,\n );\n // Advisory: findings never fail the command. Blocking is the verify/publish\n // gate's job (it reads the snapshot, not this output).\n },\n});\n\n/** Critique one landing and, when its copy was read, record its freshness snapshot. */\nexport async function critiqueOne(\n projectRoot: string,\n slug: string,\n brand: Awaited<ReturnType<typeof loadBrandTokens>>,\n competitors: string[],\n ask: AskNouls,\n) {\n // `projectRoot` + slug rather than the page's own directory: both of these\n // follow the import graph now, so a landing that renders a section from\n // another page's folder is critiqued on what it actually renders.\n //\n // The legacy sha is recorded alongside for a gate that predates the\n // composition one — see `CritiqueSnapshot`. It reads the landing's own folder\n // and nothing else, so it costs one small walk.\n const [sources, compositionSha, sourceSha] = await Promise.all([\n readLandingSources(projectRoot, slug),\n computeLandingSourceSha(projectRoot, slug),\n computeLegacyLandingSourceSha(path.resolve(projectRoot, \"src\", \"pages\", slug)),\n ]);\n\n const report = await critiqueLanding({ slug, sources, brand, competitors, ask });\n\n // Unread copy records nothing: the gate takes a snapshot hashed to this source\n // as the answer, and a concession it never read would publish as \"0 blocks\".\n if (!report.copyChecked) return { slug, report, snapshotFailed: false };\n\n // Record the freshness snapshot the publish gate reads. Best-effort — but a\n // failed write is SAID (as a hint), never swallowed: silence here would send\n // the agent into a loop where critique \"succeeds\" yet the gate keeps failing.\n let snapshotFailed = false;\n try {\n await writeCritiqueSnapshot(projectRoot, {\n slug,\n compositionSha,\n sourceSha,\n criticVersion: CRITIC_VERSION,\n at: new Date().toISOString(),\n blockCount: report.counts.block,\n warnCount: report.counts.warn,\n });\n } catch {\n snapshotFailed = true;\n }\n\n return { slug, report, snapshotFailed };\n}\n\n/**\n * Competitor names from the vault, for the \"named in a comparison\" rule.\n *\n * The entry's `title:`/`name:` frontmatter is the brand as it would be written\n * on the page; the slug is the fallback. Best-effort by design — a client with\n * no `competitors/` collection yet simply gets an empty list and one fewer\n * rule, never an error.\n */\nasync function readCompetitorNames(projectRoot: string): Promise<string[]> {\n const dir = path.join(projectRoot, \"src\", \"content\", \"competitors\");\n let entries: string[];\n try {\n entries = (await readdir(dir)).filter((f) => f.endsWith(\".md\"));\n } catch {\n return [];\n }\n const names: string[] = [];\n for (const entry of entries) {\n names.push(path.basename(entry, \".md\").replace(/[-_]+/g, \" \"));\n try {\n const head = (await readFile(path.join(dir, entry), \"utf8\")).slice(0, 2000);\n const titled = /^\\s*(?:title|name)\\s*:\\s*[\"']?([^\"'\\n]+)[\"']?\\s*$/im.exec(head);\n if (titled?.[1]) names.push(titled[1].trim());\n } catch {\n // Unreadable entry — the slug already covers it.\n }\n }\n return names;\n}\n\n/** Landing folders under src/pages/ (for error.fix on a wrong slug). */\nasync function listLandingSlugs(projectRoot: string): Promise<string[]> {\n try {\n const entries = await readdir(path.join(projectRoot, \"src\", \"pages\"), { withFileTypes: true });\n return entries\n .filter((e) => e.isDirectory() && !e.name.startsWith(\"_\") && !e.name.startsWith(\".\"))\n .map((e) => e.name)\n .sort();\n } catch {\n return [];\n }\n}\n\nfunction present(f: LandingFinding) {\n return {\n id: f.id,\n severity: f.severity,\n family: f.family,\n where: f.line ? `${f.file}:${f.line}` : f.file,\n snippet: f.snippet,\n note: f.note,\n ...(f.brandDrift ? { brandDrift: true } : {}),\n };\n}\n\nasync function isDir(p: string): Promise<boolean> {\n try {\n return (await stat(p)).isDirectory();\n } catch {\n return false;\n }\n}\n","/**\n * Landing anti-slop detector — constants.\n *\n * Reimplemented (with sense) from impeccable's deterministic detector\n * (Apache-2.0, github.com/pbakaus/impeccable — `cli/engine/shared/constants.mjs`\n * + `cli/engine/engines/regex/detect-text.mjs`). The thresholds and word lists\n * are the load-bearing facts; the code is Baker-native TypeScript and folds into\n * our landing/brand model (BRAND.md is the allowlist — see `brand-tokens.ts`).\n *\n * Everything here is a plain constant so the rules stay pure and testable.\n */\n\n/** Rendered severity of a finding. `block` fails the verify gate; `warn` prints\n * a non-blocking WARNING; `advisory` is taste-level (and where brand-matched\n * values land after the allowlist downgrades them). */\nexport type Severity = \"block\" | \"warn\" | \"advisory\";\n\n/** The design family a rule belongs to — rolled up into the report's dimensions\n * so the score reads like the canvas critic (one 0–1 score per family). */\nexport type Family = \"typography\" | \"color\" | \"borders_depth\" | \"motion\" | \"spacing\" | \"copy\" | \"integrity\";\n\n/**\n * Faces that signal \"a model made this\" — the training-data monoculture. Naming\n * one requires a reason no other face could satisfy; a subject association\n * (books→serif, tech→mono) is never that reason. Suppressed when the client's\n * BRAND.md commits the face (then it's a decision, not a tell).\n *\n * Entries match a declared family exactly OR as a word-boundary prefix (via\n * `isOverusedFont`), so \"crimson\" covers Crimson Text/Pro and \"ibm plex\" covers\n * every IBM Plex cut.\n */\nexport const OVERUSED_FONTS = new Set<string>([\n // Older monoculture (still ubiquitous):\n \"inter\",\n \"roboto\",\n \"open sans\",\n \"lato\",\n \"montserrat\",\n \"arial\",\n \"helvetica\",\n // Newer monoculture (the Anthropic-skill / Vercel / GitHub default wave):\n \"fraunces\",\n \"instrument sans\",\n \"instrument serif\",\n \"geist\",\n \"geist sans\",\n \"geist mono\",\n \"mona sans\",\n \"plus jakarta sans\",\n \"space grotesk\",\n \"space mono\",\n \"recoleta\",\n \"dm sans\",\n \"dm serif display\",\n \"dm serif text\",\n \"outfit\",\n \"syne\",\n \"cormorant\",\n \"playfair display\",\n \"lora\",\n \"crimson\",\n \"newsreader\",\n \"ibm plex\",\n \"ibm plex sans\",\n \"ibm plex serif\",\n]);\n\n/** Exact or word-boundary-prefix match against `OVERUSED_FONTS` (\"crimson\" hits\n * \"crimson text\"; \"inter\" does NOT hit \"interstate\"). */\nexport function isOverusedFont(family: string): boolean {\n if (OVERUSED_FONTS.has(family)) return true;\n for (const entry of OVERUSED_FONTS) if (family.startsWith(`${entry} `)) return true;\n return false;\n}\n\n/** Generic / system tokens that never count as a \"font choice\". */\nexport const GENERIC_FONTS = new Set<string>([\n \"serif\",\n \"sans-serif\",\n \"monospace\",\n \"cursive\",\n \"fantasy\",\n \"system-ui\",\n \"ui-serif\",\n \"ui-sans-serif\",\n \"ui-monospace\",\n \"ui-rounded\",\n \"-apple-system\",\n \"blinkmacsystemfont\",\n \"segoe ui\",\n \"inherit\",\n \"initial\",\n \"unset\",\n \"revert\",\n]);\n\n/** Em-dash overuse: two gates — an absolute floor AND a density (one dash per\n * N chars of body text). A long article with a few dashes never fires. */\nexport const EM_DASH_FLOOR = 8;\nexport const EM_DASH_CHARS_PER_DASH = 500;\n\n/** Tailwind text-size → px, so the flat-hierarchy analyzer sees utility sizing. */\nexport const TAILWIND_TEXT_PX: Record<string, number> = {\n \"text-xs\": 12,\n \"text-sm\": 14,\n \"text-base\": 16,\n \"text-lg\": 18,\n \"text-xl\": 20,\n \"text-2xl\": 24,\n \"text-3xl\": 30,\n \"text-4xl\": 36,\n \"text-5xl\": 48,\n \"text-6xl\": 60,\n \"text-7xl\": 72,\n \"text-8xl\": 96,\n \"text-9xl\": 128,\n};\n\n/**\n * AI copy tells (see `engine/copy-tells/`) promoted into landing findings, with\n * the count each needs before it fires and the severity it carries.\n *\n * The gates are the load-bearing part. Wikipedia's guide — and the `humanizer`\n * skill built on it — is explicit that isolated tells prove nothing and only\n * CLUSTERS are evidence, so almost everything here needs ≥2 occurrences on the\n * page. Two exceptions, in opposite directions:\n * - `chat-artifact` fires at 1. \"Here is an overview… let me know if\" is never\n * legitimate shipped copy; it means the agent pasted its own conversational\n * frame into the page.\n * - `curly-quote` is absent on purpose. macOS, Word, Google Docs and most\n * CMSes auto-curl by default, so it carries no signal on its own and would\n * fire on almost every page a human touched.\n *\n * Nothing here is `block`: these are strong-but-fallible prose tells, and the\n * pre-commit gate only fails on block-tier findings. Copy judgment stays with\n * the agent and the finish reviewer; this layer just makes the tell visible.\n */\nexport const COPY_TELL_GATES: Record<string, { minCount: number; severity: Severity }> = {\n \"chat-artifact\": { minCount: 1, severity: \"warn\" },\n \"rhetorical-opener\": { minCount: 2, severity: \"warn\" },\n \"negation-pivot\": { minCount: 2, severity: \"warn\" },\n \"vague-attribution\": { minCount: 2, severity: \"warn\" },\n \"participle-tail\": { minCount: 2, severity: \"advisory\" },\n \"copula-avoidance\": { minCount: 2, severity: \"advisory\" },\n \"authority-trope\": { minCount: 2, severity: \"advisory\" },\n signposting: { minCount: 2, severity: \"advisory\" },\n \"hollow-conclusion\": { minCount: 2, severity: \"advisory\" },\n \"filler-phrase\": { minCount: 2, severity: \"advisory\" },\n \"aphorism-formula\": { minCount: 2, severity: \"advisory\" },\n \"false-range\": { minCount: 2, severity: \"advisory\" },\n \"staccato-drama\": { minCount: 2, severity: \"advisory\" },\n \"title-case-heading\": { minCount: 2, severity: \"advisory\" },\n \"inline-header-list\": { minCount: 3, severity: \"advisory\" },\n emoji: { minCount: 3, severity: \"advisory\" },\n};\n\n/** The banned purple/indigo hero hex literals from the \"AI palette\" cluster. */\nexport const AI_PURPLE_HEXES = new Set<string>([\n \"#7c3aed\",\n \"#8b5cf6\",\n \"#a855f7\",\n \"#9333ea\",\n \"#7e22ce\",\n \"#6d28d9\",\n \"#6366f1\",\n \"#764ba2\",\n \"#667eea\",\n]);\n\n/** Tailwind background utilities that render the cream/parchment AI ground. */\nexport const CREAM_TAILWIND_BG = new Set<string>([\n \"bg-amber-50\",\n \"bg-amber-100\",\n \"bg-orange-50\",\n \"bg-orange-100\",\n \"bg-yellow-50\",\n \"bg-stone-50\",\n \"bg-stone-100\",\n \"bg-stone-200\",\n]);\n\n/**\n * Per-rule metadata: the family it rolls up into, its default severity, and the\n * one-line fix nudge shown to the agent. Severity is per the plan's placement\n * matrix — unambiguous tells `block`, strong-but-fallible tells `warn`, taste\n * `advisory`. Brand-matched values are downgraded to `advisory` in critique.ts.\n */\nexport const RULE_META: Record<\n string,\n { family: Family; severity: Severity; note: string; brandAware?: \"font\" | \"color\" | \"gradient\" }\n> = {\n \"gradient-text\": {\n family: \"color\",\n severity: \"block\",\n note: \"Gradient text is a top AI tell. Emphasis comes from weight or size, not a clipped gradient fill.\",\n brandAware: \"gradient\",\n },\n \"broken-image\": {\n family: \"integrity\",\n severity: \"block\",\n note: \"An <img> with an empty or placeholder src ships a broken image. Source a real asset via `baker images`.\",\n },\n \"competitor-concession\": {\n family: \"integrity\",\n severity: \"block\",\n note: \"This page ranks somebody else above the client, or says the client does not lead. A paid landing answers an objection by changing the axis, never by conceding it. Rewrite the claim around what this product does that the alternative structurally cannot (`references/sections/faq.md`).\",\n },\n \"competitor-named-in-comparison\": {\n family: \"integrity\",\n severity: \"warn\",\n note: \"A competitor from the vault is named in a comparative sentence outside a comparison table. Naming a rival on paid traffic sells their brand and is the client's decision, not yours — cite the capability, not the company.\",\n },\n \"side-tab\": {\n family: \"borders_depth\",\n severity: \"warn\",\n note: \"A thick colored border on one edge is the 'side-tab' AI tell. Use full borders, a background, or spacing instead.\",\n },\n \"border-accent-on-rounded\": {\n family: \"borders_depth\",\n severity: \"warn\",\n note: \"A colored top/bottom accent bar on a rounded card is an AI tell. Let the card's own surface carry the accent.\",\n },\n \"overused-font\": {\n family: \"typography\",\n severity: \"warn\",\n brandAware: \"font\",\n note: \"This face is a training-data default. Pick a face with a point of view — unless BRAND.md commits it.\",\n },\n \"single-font\": {\n family: \"typography\",\n severity: \"advisory\",\n note: \"Only one face across the page flattens hierarchy. A display/body pair usually reads richer.\",\n },\n \"flat-type-hierarchy\": {\n family: \"typography\",\n severity: \"warn\",\n note: \"Type steps are too close (<2× span). Widen the scale so the primary, secondary, and body are obvious at a glance.\",\n },\n \"ai-color-palette\": {\n family: \"color\",\n severity: \"warn\",\n brandAware: \"color\",\n note: \"Purple/indigo-on-heading or purple→cyan gradients are the AI palette cluster. Commit to the brand's own hues.\",\n },\n \"cream-palette\": {\n family: \"color\",\n severity: \"warn\",\n brandAware: \"color\",\n note: \"Cream/parchment ground is the 'measured rendition' AI default. Rework from the brand's saturated materials.\",\n },\n \"gray-on-color\": {\n family: \"color\",\n severity: \"warn\",\n note: \"Gray text on a colored surface reads muddy. Tint secondary text from the surface hue, never neutral gray.\",\n },\n \"bounce-easing\": {\n family: \"motion\",\n severity: \"warn\",\n note: \"Bounce/elastic easing feels dated. Use natural deceleration (e.g. cubic-bezier(0.16, 1, 0.3, 1)).\",\n },\n \"layout-transition\": {\n family: \"motion\",\n severity: \"advisory\",\n note: \"Transitioning width/height/padding/margin janks. Animate transform/opacity, or clip-path/max-height with care.\",\n },\n \"monotonous-spacing\": {\n family: \"spacing\",\n severity: \"warn\",\n note: \"One spacing value dominates. Create rhythm — tight groups, generous separation, more space above a heading than below.\",\n },\n \"marketing-buzzword\": {\n family: \"copy\",\n severity: \"warn\",\n note: \"SaaS filler ('supercharge your…') is generic. Name names, use numbers, say the specific thing only this product proves.\",\n },\n \"agent-washing\": {\n family: \"copy\",\n severity: \"warn\",\n note: \"The page claims autonomy but never says what the buyer controls. Name what it does on its own, what waits for approval, and what happens when it's wrong.\",\n },\n \"em-dash-overuse\": {\n family: \"copy\",\n severity: \"warn\",\n note: \"Dense em-dashes are an AI cadence tell (and brand copy bans them). Recast with commas, colons, or full stops.\",\n },\n \"chat-artifact\": {\n family: \"copy\",\n severity: \"warn\",\n note: \"Chatbot framing ('Here is an overview…', 'avísame si') leaked into the page. Delete it and state the claim directly.\",\n },\n \"rhetorical-opener\": {\n family: \"copy\",\n severity: \"warn\",\n note: \"Fake-candid openers ('Honestly?', 'La verdad es que') manufacture intimacy before an ordinary claim. Just say the thing.\",\n },\n \"negation-pivot\": {\n family: \"copy\",\n severity: \"warn\",\n note: \"'It's not just X, it's Y' / 'no se trata solo de' is now a louder AI tell than any single word. Cut the setup, keep the claim.\",\n },\n \"vague-attribution\": {\n family: \"copy\",\n severity: \"warn\",\n note: \"'Experts agree' / 'los estudios demuestran' attributes to nobody. Name the source and the year, or drop the claim.\",\n },\n \"participle-tail\": {\n family: \"copy\",\n severity: \"advisory\",\n note: \"Participles hung off a comma (', ensuring…', ', permitiendo…') fake depth. End the sentence, or make it a real clause.\",\n },\n \"copula-avoidance\": {\n family: \"copy\",\n severity: \"advisory\",\n note: \"'serves as' / 'cuenta con' dodges plain 'is' and 'has'. Use the simple verb — it reads as confidence, not flatness.\",\n },\n \"authority-trope\": {\n family: \"copy\",\n severity: \"advisory\",\n note: \"'At its core' / 'en el fondo' pretends to reach a deeper truth before restating an ordinary point. Make the point once.\",\n },\n signposting: {\n family: \"copy\",\n severity: \"advisory\",\n note: \"Announcing the writing ('Let's dive in', 'vamos a ver') instead of doing it. Delete the announcement, keep the content.\",\n },\n \"hollow-conclusion\": {\n family: \"copy\",\n severity: \"advisory\",\n note: \"'The future looks bright' / 'las posibilidades son infinitas' asserts nothing. End on a concrete next step or a number.\",\n },\n \"filler-phrase\": {\n family: \"copy\",\n severity: \"advisory\",\n note: \"Filler ('in order to', 'cabe destacar que') costs words and says nothing. Cut to the verb.\",\n },\n \"aphorism-formula\": {\n family: \"copy\",\n severity: \"advisory\",\n note: \"'X is the currency of Y' sounds profound without adding precision. Replace it with the concrete claim it gestures at.\",\n },\n \"false-range\": {\n family: \"copy\",\n severity: \"advisory\",\n note: \"'From onboarding to retention' pairs ends that aren't on a scale. List what you actually cover.\",\n },\n \"staccato-drama\": {\n family: \"copy\",\n severity: \"advisory\",\n note: \"A run of very short sentences manufactures drama. One clipped line lands; three in a row read as engineered.\",\n },\n \"title-case-heading\": {\n family: \"copy\",\n severity: \"advisory\",\n note: \"Title Case headings are an AI tell — and in Spanish the convention doesn't exist at all. Use sentence case.\",\n },\n \"inline-header-list\": {\n family: \"copy\",\n severity: \"advisory\",\n note: \"'**Speed:** it is fast' bullets are AI list shape. Write the sentence, or let the bullet carry the content directly.\",\n },\n emoji: {\n family: \"copy\",\n severity: \"advisory\",\n note: \"Emoji-decorated copy is a chatbot habit. Let the words and the layout carry the emphasis.\",\n },\n \"dark-glow\": {\n family: \"borders_depth\",\n severity: \"warn\",\n note: \"A zero-offset colored glow is decoration, not depth. Shadows carry an offset and a soft blur.\",\n },\n marquee: {\n family: \"motion\",\n severity: \"warn\",\n note: \"Auto-scrolling marquees are a dated tell. Let the visitor control the pace, or drop the motion.\",\n },\n};\n\n/** Weight subtracted from a family's 1.0 score per finding, by severity. */\nexport const SEVERITY_WEIGHT: Record<Severity, number> = {\n block: 0.5,\n warn: 0.2,\n advisory: 0.05,\n};\n","/**\n * The landing critique's questions about what the copy SAYS, asked of the decision model (Jev)\n * in whatever language the page is written. They replaced phrase lists in English, Spanish and\n * Portuguese (`CONCESSION_PATTERNS`, `BUZZWORDS`, `AUTONOMY_CLAIMS`, `AI_CONTROL_SIGNALS`,\n * `COMPARISON_MARKERS`), which a German or French page walked past and a paraphrase did too.\n * Thresholds were measured on scripts/landing-copy-evals (docs/decision-model.md).\n */\nimport type { NoulQuestion } from \"../../lib/remembered-nouls.ts\";\n\nconst ANY_LANGUAGE = \"The page may be in any language.\";\n\n/**\n * A paid landing that ranks somebody else above the client. It shipped live, on four pages: an\n * FAQ answer conceding a competitor's builder beat the client's own. Two shapes read alike and are\n * not it: premium positioning on price, and a superlative flipped by a negation (\"nobody is faster\n * than us\"), which is the strongest claim FOR the client.\n */\nexport const CONCESSION_QUESTION = `\\`sentence\\` is copy on a company's own sales page. Does it concede that a competitor, an alternative or somebody else is better than the company, or say the company is not the best or not the leader at what it sells? These do not count: a brag that nobody beats the company (\"No team works faster than ours\", \"Nothing is better than ours\"); saying it is not the cheapest or not the most expensive (price positioning); saying who it is not for or what it is not (\"We are not an agency\"). ${ANY_LANGUAGE}`;\n/** At or above this, the sentence concedes. */\nexport const CONCESSION_HELD = 0.5;\n\nexport const BUZZWORD_QUESTION = `Does \\`sentence\\` lean on generic marketing buzzwords that could describe any company, such as \"supercharge your workflow\", \"revolutionize\", \"seamless\", \"best-in-class\", \"cutting-edge\", \"unleash the power\", \"lleva tu negocio al siguiente nivel\", instead of saying something specific? ${ANY_LANGUAGE}`;\nexport const BUZZWORD_HELD = 0.8;\n\n/**\n * Naming a rival on paid traffic sells their brand. An integration or a partner named is not a\n * comparison; a comparison table is where one belongs (code exempts it before asking).\n */\nexport function comparisonQuestion(competitor: string): string {\n return `\\`sentence\\` is copy on a company's own sales page, and it names ${JSON.stringify(competitor)}, another company. Does it compare the two (better, worse, versus, cheaper than, an alternative to, switching from)? Naming it as something the product connects to, works with or imports from is not a comparison. ${ANY_LANGUAGE}`;\n}\nexport const COMPARISON_HELD = 0.5;\n\n/** Asked of each sentence: the claim lives in one, and the rest of the page argues with it. */\nexport const AUTONOMY_QUESTION = `Does \\`sentence\\` claim the product does the work by itself, with no person involved: fully autonomous agents, it runs while you sleep, set it and forget it, no human input needed? ${ANY_LANGUAGE}`;\nexport const AUTONOMY_HELD = 0.3;\n\n/**\n * What clears an autonomy claim is oversight of the agent's own actions. Privacy boilerplate rides\n * along in every footer and says nothing about who is in charge; a bare accuracy number is the\n * defect `references/ai-trust.md` names, not the remedy.\n */\nexport const CONTROL_QUESTION = `Does \\`page\\` tell the buyer how they stay in control of what the product does on its own: what waits for their approval, what they review before it happens, what they can override, undo or roll back, an audit log of what ran, or when it escalates to a person? Privacy or security statements (GDPR, encryption, \"your data is safe\") and accuracy figures do not count. ${ANY_LANGUAGE}`;\nexport const CONTROL_HELD = 0.3;\n\nexport function sentenceQuestion(question: string, sentence: string): NoulQuestion {\n return { instructions: { sentence, question } };\n}\n\nexport function pageQuestion(question: string, page: string): NoulQuestion {\n return { instructions: { page, question } };\n}\n","/**\n * AI copy tells — pure detection over a piece of copy.\n *\n * Shared by two real callers with different stakes: `baker landing critique`\n * (rolls findings into the `copy` family and the pre-commit gate) and the\n * `baker ads` staged writes (emit `hints[]`, never block — a false positive that\n * refuses an ad is worse than a tell that ships). So this module reports RAW\n * COUNTS and never decides severity. Thresholds belong to the caller.\n *\n * Every function is pure and total: text in, findings out, never throws.\n *\n * Only the tells that are a shape live here. The ones that read the words (an opener, a pivot,\n * a vague attribution…) are asked of the decision model in any language: `questions.ts`.\n */\n\nimport { type CopyTellId, STACCATO_MAX_WORDS, STACCATO_RUN } from \"./patterns.ts\";\nimport { rawSentences, wordCount } from \"./sentences.ts\";\n\nexport type CopyTell = {\n id: CopyTellId;\n /** How many times the tell fired. Callers gate on this. */\n count: number;\n /** The first match, trimmed for display in a hint or a critique snippet. */\n sample: string;\n};\n\nconst SAMPLE_MAX = 60;\n\nfunction sample(text: string): string {\n const clean = text.replace(/\\s+/g, \" \").trim();\n return clean.length <= SAMPLE_MAX ? clean : `${clean.slice(0, SAMPLE_MAX)}…`;\n}\n\n/** Staccato drama (§31): a run of very short sentences manufacturing weight. */\nfunction countStaccato(text: string): { count: number; first: string } {\n // Headings are labels, not sentences: a run of section titles is not drama.\n const prose = text\n .split(\"\\n\")\n .filter((line) => !/^\\s{0,3}#{1,6}\\s/.test(line))\n .join(\" \");\n const sentences = rawSentences(prose);\n let run = 0;\n let count = 0;\n let first = \"\";\n let runStart = 0;\n for (const [i, s] of sentences.entries()) {\n const words = wordCount(s);\n if (words > 0 && words <= STACCATO_MAX_WORDS) {\n if (run === 0) runStart = i;\n run++;\n if (run === STACCATO_RUN) {\n count++;\n if (!first) first = sentences.slice(runStart, i + 1).join(\" \");\n }\n } else {\n run = 0;\n }\n }\n return { count, first };\n}\n\n/** Title Case in a heading (§17). A stronger tell in Spanish, where the\n * convention does not exist at all. Needs ≥4 words so \"Cómo Funciona\" and\n * proper nouns in a short heading don't fire. */\nfunction countTitleCaseHeadings(text: string): { count: number; first: string } {\n let count = 0;\n let first = \"\";\n for (const m of text.matchAll(/^\\s{0,3}#{1,6}\\s+(.+)$/gm)) {\n const heading = (m[1] ?? \"\").trim();\n const words = heading.split(/\\s+/).filter((w) => /\\p{L}/u.test(w));\n if (words.length < 4) continue;\n const capitalized = words.filter((w) => /^\\p{Lu}/u.test(w)).length;\n if (capitalized / words.length < 0.8) continue;\n count++;\n if (!first) first = heading;\n }\n return { count, first };\n}\n\n/** Inline-header vertical lists (§16): `- **Speed:** it is fast.` */\nfunction countInlineHeaderList(text: string): { count: number; first: string } {\n const matches = [...text.matchAll(/^\\s*(?:[-*+]|\\d+\\.)\\s+\\*\\*[^*\\n]{2,40}:?\\*\\*:?\\s/gm)];\n if (matches.length < 3) return { count: 0, first: \"\" };\n return { count: matches.length, first: (matches[0]?.[0] ?? \"\").trim() };\n}\n\n// Written as an alternation rather than one class: U+FE0F is a combining\n// variation selector, and a class that mixes it with base characters matches\n// the pair as one character, undercounting a page's emoji.\nconst EMOJI = /[\\u{1F300}-\\u{1FAFF}]|[\\u{2600}-\\u{27BF}]|[\\u{1F000}-\\u{1F2FF}]|\\u{FE0F}/gu;\nconst CURLY = /[‘’“”]/g;\n\nfunction countPattern(text: string, re: RegExp): { count: number; first: string } {\n const matches = text.match(re) ?? [];\n return { count: matches.length, first: matches.join(\"\") };\n}\n\n/**\n * The AI copy tells that are a SHAPE of the copy rather than a reading of its words: a run of\n * very short sentences, Title Case in a heading, an inline-header list, curly quotes, emoji. Each\n * holds in any language. The tells that read the words are the decision model's\n * (`questions.ts`). One entry per tell that fired, with a raw count and a sample.\n *\n * `text` should already be plain copy — the landing caller strips markup first.\n */\nexport function structuralCopyTells(text: string): CopyTell[] {\n if (!text.trim()) return [];\n\n const results: Array<[CopyTellId, { count: number; first: string }]> = [\n [\"staccato-drama\", countStaccato(text)],\n [\"title-case-heading\", countTitleCaseHeadings(text)],\n [\"inline-header-list\", countInlineHeaderList(text)],\n [\"curly-quote\", countPattern(text, CURLY)],\n [\"emoji\", countPattern(text, EMOJI)],\n ];\n\n return results\n .filter(([, result]) => result.count > 0)\n .map(([id, result]) => ({ id, count: result.count, sample: sample(result.first) }));\n}\n","/**\n * Landing anti-slop detector — pure detection rules.\n *\n * Reimplemented (with sense) from impeccable's `cli/engine/engines/regex/\n * detect-text.mjs` (Apache-2.0). Two kinds of rule:\n * - line matchers: per-line regex tells (side-tab, gradient-text, fonts…)\n * - analyzers: aggregate tells, each `scope`d \"file\" or \"page\" (see below).\n *\n * SCOPE matters for Baker specifically. A landing here is always componentized —\n * `index.astro` + several small `_components/*.astro` — so a count-threshold tell\n * (a single font, a flat type scale, monotonous spacing, em-dash density) would\n * slip through if measured per small file. Those analyzers are `scope: \"page\"`\n * and run on the concatenated page. The `scope: \"file\"` analyzers are the ones\n * that fire at ≥1 or carry a line number (overused-font, glow), so\n * they stay per file for accurate `file:line` attribution.\n *\n * Every rule is pure and total — it takes source text and returns findings, and\n * never throws. None of them reads what the copy SAYS: that is the decision\n * model's job (`copy-judgments.ts`), over the sentences `landingCopy` returns. Severity/notes come from `RULE_META`; the caller (critique.ts)\n * assembles them and applies the BRAND.md allowlist.\n */\n\nimport { structuralCopyTells } from \"../../copy-tells/detect.ts\";\nimport { copySentences } from \"../../copy-tells/sentences.ts\";\nimport { hasChroma, isCreamColor, isNeutralAuthoredColor, parseColor } from \"./color.ts\";\nimport {\n AI_PURPLE_HEXES,\n COPY_TELL_GATES,\n CREAM_TAILWIND_BG,\n EM_DASH_CHARS_PER_DASH,\n EM_DASH_FLOOR,\n GENERIC_FONTS,\n isOverusedFont,\n TAILWIND_TEXT_PX,\n} from \"./constants.ts\";\n\nexport type RawFinding = { id: string; snippet: string; file: string; line?: number };\n\n/** Regex capture-group accessors that satisfy `noUncheckedIndexedAccess`. */\nconst cap = (m: RegExpMatchArray, i: number): string => m[i] ?? \"\";\nconst num = (m: RegExpMatchArray, i: number): number => Number(m[i] ?? 0);\n\nconst hasRounded = (line: string): boolean => /\\brounded(?:-\\w+)?\\b/.test(line) || /border-radius/i.test(line);\nconst isSafeElement = (line: string): boolean =>\n /<(?:blockquote|nav[\\s>]|pre[\\s>]|code[\\s>]|a\\s|input[\\s>]|span[\\s>])/i.test(line);\n/** A Tailwind border colored with a neutral scale is a hairline, not an accent. */\nconst hasNeutralTailwindBorder = (line: string): boolean =>\n /\\bborder-(?:gray|slate|zinc|neutral|stone|white|black|transparent|current|inherit)\\b|\\bborder-(?:gray|slate|zinc|neutral|stone)-\\d+\\b/.test(\n line,\n );\n\nfunction isNeutralBorderColor(str: string): boolean {\n const m = str.match(/solid\\s+((?:rgba?|hsla?|oklch|oklab|lab|lch|hwb|color)\\([^)]*\\)|#[0-9a-f]{3,8}\\b|[a-z]+)/i);\n if (!m) return false;\n return isNeutralAuthoredColor(m[1] ?? \"\");\n}\n\ntype LineMatcher = {\n id: string;\n regex: RegExp;\n test: (m: RegExpMatchArray, line: string) => boolean;\n fmt: (m: RegExpMatchArray, line: string) => string;\n};\n\nconst LINE_MATCHERS: LineMatcher[] = [\n // ── Side-tab: a thick colored border on one edge ──────────────────────────\n {\n id: \"side-tab\",\n regex: /\\bborder-[lrse]-(\\d+)\\b/g,\n test: (m, line) => {\n if (isSafeElement(line) || hasNeutralTailwindBorder(line)) return false;\n return hasRounded(line) ? num(m, 1) >= 2 : num(m, 1) >= 4;\n },\n fmt: (m) => cap(m, 0),\n },\n {\n id: \"side-tab\",\n regex: /border-(?:left|right)\\s*:\\s*(\\d+)px\\s+solid[^;]*/gi,\n test: (m, line) => {\n if (isSafeElement(line)) return false;\n if (isNeutralBorderColor(cap(m, 0))) return false;\n return hasRounded(line) ? num(m, 1) >= 2 : num(m, 1) >= 3;\n },\n fmt: (m) => cap(m, 0).replace(/\\s*;?\\s*$/, \"\"),\n },\n {\n id: \"side-tab\",\n regex: /border-(?:left|right)-width\\s*:\\s*(\\d+)px/gi,\n test: (m, line) => !isSafeElement(line) && num(m, 1) >= 3,\n fmt: (m) => cap(m, 0),\n },\n {\n id: \"side-tab\",\n regex: /border-inline-(?:start|end)(?:-width)?\\s*:\\s*(\\d+)px/gi,\n test: (m, line) => !isSafeElement(line) && num(m, 1) >= 3,\n fmt: (m) => cap(m, 0),\n },\n // ── Border accent on a rounded card (top/bottom colored bar) ──────────────\n {\n id: \"border-accent-on-rounded\",\n regex: /\\bborder-[tb]-(\\d+)\\b/g,\n test: (m, line) => hasRounded(line) && num(m, 1) >= 1 && !hasNeutralTailwindBorder(line),\n fmt: (m) => cap(m, 0),\n },\n {\n id: \"border-accent-on-rounded\",\n regex: /border-(?:top|bottom)\\s*:\\s*(\\d+)px\\s+solid/gi,\n test: (m, line) => num(m, 1) >= 3 && hasRounded(line),\n fmt: (m) => cap(m, 0),\n },\n // ── Gradient text (Tailwind class form; authored-CSS form is the window\n // analyzer below, so a multi-line rule block is still caught) ──────────────\n {\n id: \"gradient-text\",\n regex: /\\bbg-clip-text\\b/g,\n test: (_m, line) =>\n // v3 `bg-gradient-to-*`, v4 `bg-linear-to-*` / `bg-radial*` / `bg-conic*`,\n // and arbitrary-value `bg-[linear-gradient(…)]` spellings.\n /\\bbg-gradient-to-|\\bbg-linear-to-|\\bbg-(?:radial|conic)\\b|\\bbg-\\[(?:linear|radial|conic)-gradient/i.test(line),\n // The stops ride in the snippet so the brand allowlist can read them.\n fmt: (_m, line) => {\n const stops = line.match(/\\b(?:from|via|to)-\\[[^\\]\\s]+\\]|\\bbg-\\[(?:linear|radial|conic)-gradient[^\\]\\s]*\\]/g);\n return stops ? `bg-clip-text + ${stops.join(\" \")}` : \"bg-clip-text + gradient\";\n },\n },\n // ── Gray text on a colored background (Tailwind). Shade ≥ 300 only: a pale\n // tint panel (bg-blue-50 info box) is a normal light ground, not \"on color\". ──\n {\n id: \"gray-on-color\",\n regex: /\\btext-(?:gray|slate|zinc|neutral|stone)-(\\d+)\\b/g,\n test: (_m, line) => {\n const bg = line.match(\n /\\bbg-(?:red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose)-(\\d+)\\b/,\n );\n return bg !== null && Number(bg[1] ?? 0) >= 300;\n },\n fmt: (m, line) => {\n const bg = line.match(\n /\\bbg-(?:red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose)-\\d+\\b/,\n );\n return `${cap(m, 0)} on ${bg?.[0] || \"?\"}`;\n },\n },\n // ── AI color palette (Tailwind purple/indigo + banned hero hexes) ─────────\n {\n id: \"ai-color-palette\",\n regex: /\\btext-(?:purple|violet|indigo)-(\\d+)\\b/g,\n test: (_m, line) => /\\btext-(?:[2-9]xl)\\b|<h[1-3]/i.test(line),\n fmt: (m) => `${cap(m, 0)} on heading`,\n },\n {\n id: \"ai-color-palette\",\n regex: /\\bfrom-(?:purple|violet|indigo)-(\\d+)\\b/g,\n test: (_m, line) => /\\bto-(?:purple|violet|indigo|blue|cyan|pink|fuchsia)-\\d+\\b/.test(line),\n fmt: (m) => `${cap(m, 0)} gradient`,\n },\n {\n id: \"ai-color-palette\",\n regex: /#[0-9a-f]{6}\\b/gi,\n test: (m) => AI_PURPLE_HEXES.has(cap(m, 0).toLowerCase()),\n fmt: (m) => `${cap(m, 0)} (AI-cluster purple)`,\n },\n // ── Cream/parchment ground (Tailwind + authored background hex) ───────────\n {\n id: \"cream-palette\",\n regex: /\\bbg-(?:amber|orange|yellow|stone)-(?:50|100|200)\\b/g,\n test: (m) => CREAM_TAILWIND_BG.has(cap(m, 0)),\n fmt: (m) => `${cap(m, 0)} (cream ground)`,\n },\n {\n id: \"cream-palette\",\n regex: /background(?:-color)?\\s*:\\s*(#[0-9a-f]{6}\\b|rgba?\\([^)]+\\))/gi,\n test: (m) => {\n const c = parseColor(cap(m, 1));\n return c !== null && isCreamColor(c);\n },\n fmt: (m) => `${cap(m, 1)} (cream ground)`,\n },\n // ── Bounce / elastic easing ───────────────────────────────────────────────\n {\n id: \"bounce-easing\",\n regex: /\\banimate-bounce\\b/g,\n test: () => true,\n fmt: () => \"animate-bounce (Tailwind)\",\n },\n {\n id: \"bounce-easing\",\n regex: /animation(?:-name)?\\s*:\\s*([^;{}]*(?:bounce|elastic|wobble|jiggle|spring)[^;{}]*)/gi,\n test: () => true,\n fmt: (m) => `animation: ${cap(m, 1).trim()}`,\n },\n {\n id: \"bounce-easing\",\n regex: /cubic-bezier\\(\\s*([\\d.-]+)\\s*,\\s*([\\d.-]+)\\s*,\\s*([\\d.-]+)\\s*,\\s*([\\d.-]+)\\s*\\)/g,\n test: (m) => {\n const y1 = Number.parseFloat(cap(m, 2));\n const y2 = Number.parseFloat(cap(m, 4));\n return y1 < -0.1 || y1 > 1.1 || y2 < -0.1 || y2 > 1.1;\n },\n fmt: (m) => `cubic-bezier(${cap(m, 1)}, ${cap(m, 2)}, ${cap(m, 3)}, ${cap(m, 4)})`,\n },\n // ── Transitioning layout properties (jank) ────────────────────────────────\n {\n id: \"layout-transition\",\n // The lookahead skips Astro's view-transition directives (transition:name=,\n // transition:animate=, transition:persist) — markup idiom, not CSS.\n regex: /transition(?:-property)?\\s*:\\s*(?!name\\s*=|animate\\s*=|persist\\b)([^;{}]+)/gi,\n test: (m) => {\n const val = cap(m, 1).toLowerCase();\n if (/\\ball\\b/.test(val)) return false;\n return /\\b(?:(?:max|min)-)?(?:width|height)\\b|\\bpadding\\b|\\bmargin\\b/.test(val);\n },\n fmt: (m) => {\n const found = cap(m, 1).match(\n /\\b(?:(?:max|min)-)?(?:width|height)\\b|\\bpadding(?:-(?:top|right|bottom|left))?\\b|\\bmargin(?:-(?:top|right|bottom|left))?\\b/gi,\n );\n return `transition: ${found ? found.join(\", \") : cap(m, 1).trim()}`;\n },\n },\n // ── Broken image ──────────────────────────────────────────────────────────\n {\n id: \"broken-image\",\n regex: /<img\\b[^>]*?\\bsrc\\s*=\\s*(?:\"\"|''|\"\\s+\"|'\\s+'|\"#\"|'#')/gi,\n test: () => true,\n fmt: (m) => cap(m, 0).slice(0, 100),\n },\n {\n id: \"broken-image\",\n regex: /<img\\b(?:(?!\\bsrc\\s*=)[^>])*>/gi,\n test: (m) => !/\\bsrc\\s*=/i.test(cap(m, 0)),\n fmt: (m) => cap(m, 0).slice(0, 100),\n },\n];\n\n/**\n * Lowercase and strip diacritics, so one pattern covers \"más\" and \"mas\",\n * \"não\" and \"nao\". Length is preserved (NFD marks are dropped, not the letters\n * they sit on), which keeps match offsets usable for line attribution.\n */\nfunction foldForCopy(text: string): string {\n return text\n .toLowerCase()\n .normalize(\"NFD\")\n .replace(/[\\u0300-\\u036f]/g, \"\");\n}\n\n/** Strip tags/script/style/comments so copy analyzers don't read code. */\nfunction stripHtmlToText(html: string): string {\n return html\n .replace(/<script\\b[^>]*>[\\s\\S]*?<\\/script>/gi, \" \")\n .replace(/<style\\b[^>]*>[\\s\\S]*?<\\/style>/gi, \" \")\n .replace(/<!--[\\s\\S]*?-->/g, \" \")\n .replace(/<[^>]+>/g, \" \")\n .replace(/\\s+/g, \" \");\n}\n\n/**\n * Like `stripHtmlToText`, but rewrites `<h1>…<h6>` as markdown headings and\n * keeps block boundaries as newlines. The shared copy-tell detector reads\n * headings in markdown shape (it also serves markdown surfaces), and heading\n * *form* carries two tells — Title Case and, in Spanish, capitalization that\n * the language has no convention for. Flattening the page to one line the way\n * `stripHtmlToText` does would erase both, and would also let a run of short\n * sentences across three sections read as one staccato passage.\n */\nfunction stripHtmlPreservingHeadings(html: string): string {\n return html\n .replace(/<script\\b[^>]*>[\\s\\S]*?<\\/script>/gi, \" \")\n .replace(/<style\\b[^>]*>[\\s\\S]*?<\\/style>/gi, \" \")\n .replace(/<!--[\\s\\S]*?-->/g, \" \")\n .replace(\n /<h([1-6])\\b[^>]*>([\\s\\S]*?)<\\/h\\1>/gi,\n (_all, _lvl, inner) =>\n `\\n## ${String(inner)\n .replace(/<[^>]+>/g, \" \")\n .replace(/\\s+/g, \" \")\n .trim()}\\n`,\n )\n .replace(/<\\/(?:p|div|section|li|tr|br)>|<br\\s*\\/?>/gi, \"\\n\")\n .replace(/<[^>]+>/g, \" \")\n .replace(/[ \\t]+/g, \" \")\n .replace(/\\n{3,}/g, \"\\n\\n\");\n}\n\n/**\n * Does this string literal read as copy a visitor will see, rather than code?\n *\n * The bar is deliberately high. A false negative costs one missed tell; a false\n * positive puts an import path or a Tailwind class list in front of every copy\n * rule on the page, and those rules are what the publish gate reads.\n */\nfunction isProseLiteral(value: string): boolean {\n const text = value.trim();\n if (text.length < 12) return false;\n if (/^(?:https?:\\/\\/|\\/|\\.{1,2}\\/|#|@|[a-z]+:)/i.test(text)) return false;\n if (!/\\p{L}/u.test(text)) return false;\n const words = text.split(/\\s+/).filter(Boolean);\n if (words.length < 4) return false;\n // A utility-class list is 4+ \"words\" of pure lowercase tokens carrying dashes\n // or variant colons — the one non-prose shape that reliably clears the word\n // count (\"flex items-center gap-4 rounded-lg border border-slate-200 px-6\").\n const classy = words.filter((w) => /^-?[a-z][a-z0-9]*(?:[-.:/][a-z0-9.[\\]%-]+)+$/.test(w)).length;\n if (classy >= 3 && classy / words.length > 0.5) return false;\n return true;\n}\n\n/**\n * Blank an Astro frontmatter block (leading `---` … `---`) so rules never read\n * component JS — imports, props, config — while KEEPING the string literals\n * that hold visible copy. Every character is replaced by a space rather than\n * removed, so `file:line` attribution and `indexOf` offsets stay exact against\n * the original source. The `---` fences are blanked too: they'd otherwise count\n * as em-dashes.\n *\n * The rewrite walks CODE UNITS (`split(\"\")`), not code points: `stringLiterals`\n * indexes with `source[i]`, so a spread by code point would collapse each emoji\n * to one slot and slide every offset past it — silently shifting the line of\n * every finding in the file, this rule's and the others'. Feature-card icons\n * are exactly where that emoji lives.\n *\n * Keeping the prose is not a refinement, it is the point. Astro components hold\n * FAQ pairs, testimonial quotes, feature cards and pricing rows as a\n * `const items = [{ q, a }]` array in the frontmatter and render them in a\n * `.map()`, so blanking the block wholesale hid a large share of every\n * landing's actual copy from the critic. It shipped an FAQ answer conceding a\n * competitor was better, dense with em-dashes, past a clean run.\n */\nfunction blankAstroFrontmatter(text: string): string {\n const cut = frontmatterLength(text);\n if (cut === 0) return text;\n const head = text.slice(0, cut);\n const kept: string[] = head.split(\"\").map((ch) => (ch === \"\\n\" ? \"\\n\" : \" \"));\n for (const literal of stringLiterals(head)) {\n if (!isProseLiteral(literal.value)) continue;\n for (let i = 0; i < literal.value.length; i++) {\n const at = literal.start + i;\n if (head[at] !== \"\\n\") kept[at] = head[at] ?? \" \";\n }\n }\n return kept.join(\"\") + text.slice(cut);\n}\n\n/**\n * An `.astro` source with everything a visitor never sees blanked out — the\n * frontmatter's component JS (minus its prose literals) and every template\n * comment. Every character is replaced by a space rather than removed, so\n * `file:line` attribution stays exact. This is what every rule reads.\n */\nfunction blankUnrenderedSource(text: string): string {\n return blankTemplateComments(blankAstroFrontmatter(text));\n}\n\n/**\n * Blank Astro expression comments (`{/* … *\\/}`) and HTML comments\n * (`<!-- … -->`), preserving length and newlines.\n *\n * A comment is commentary about the markup, not markup, and no rule may read\n * one. The cost of that being false was a fleet-wide publish block: the shared\n * `Video.astro` wrapper explains its `preconnect` in prose that spells `<img>`\n * twice, the block-tier `broken-image` rule matched the prose, and every landing\n * rendering a video failed the publish gate — on a scaffold-protected file the\n * client's agent is forbidden to edit, so there was no fix from inside the\n * sandbox. Comment prose is also where a component's reasoning lives, em-dashes\n * and buzzwords and hexes included, so leaving it readable inflates every\n * count-threshold tell on top of that.\n *\n * The `{…}` fences are blanked with the comment: a bare `{` left behind would\n * read as an expression opening, and the `*\\/` would count as punctuation copy.\n * Walks CODE UNITS, like `blankAstroFrontmatter`, for the same reason — a spread\n * by code point collapses an emoji to one slot and slides every later offset.\n */\nfunction blankTemplateComments(text: string): string {\n const out = text.split(\"\");\n const pattern = /\\{\\s*\\/\\*[\\s\\S]*?\\*\\/\\s*\\}|<!--[\\s\\S]*?-->/g;\n for (const m of text.matchAll(pattern)) {\n const start = m.index ?? 0;\n for (let i = start; i < start + m[0].length && i < out.length; i++) {\n if (out[i] !== \"\\n\") out[i] = \" \";\n }\n }\n return out.join(\"\");\n}\n\n/** Characters covered by a leading `---` … `---` block, or 0 when there is none. */\nfunction frontmatterLength(text: string): number {\n if (!text.startsWith(\"---\")) return 0;\n const lines = text.split(\"\\n\");\n if (!/^---\\s*$/.test(lines[0] ?? \"\")) return 0;\n const end = lines.findIndex((line, i) => i > 0 && /^---\\s*$/.test(line));\n return end === -1 ? 0 : lines.slice(0, end + 1).join(\"\\n\").length;\n}\n\n/**\n * String literals in a block of component JS, skipping comments so a `//` line\n * mentioning a quote cannot open one. Returns the literal body and where it\n * starts in the input, which is what keeps offsets exact.\n */\nfunction stringLiterals(source: string): Array<{ start: number; value: string }> {\n const out: Array<{ start: number; value: string }> = [];\n for (let i = 0; i < source.length; i++) {\n const commentEnd = skipComment(source, i);\n if (commentEnd !== -1) {\n i = commentEnd;\n continue;\n }\n const quote = source[i];\n if (quote !== '\"' && quote !== \"'\" && quote !== \"`\") continue;\n const close = closingQuote(source, i + 1, quote);\n if (close === -1) break;\n out.push({ start: i + 1, value: source.slice(i + 1, close) });\n i = close;\n }\n return out;\n}\n\n/** Index of the last character of a comment opening at `i`, or -1 if none does.\n * An unterminated block comment consumes the rest of the source. */\nfunction skipComment(source: string, i: number): number {\n if (source[i] !== \"/\") return -1;\n if (source[i + 1] === \"/\") {\n const nl = source.indexOf(\"\\n\", i);\n return nl === -1 ? source.length : nl;\n }\n if (source[i + 1] === \"*\") {\n const close = source.indexOf(\"*/\", i + 2);\n return close === -1 ? source.length : close + 1;\n }\n return -1;\n}\n\n/** Index of the quote closing a literal that opened at `from`, honoring\n * backslash escapes; -1 when the literal never closes. */\nfunction closingQuote(source: string, from: number, quote: string): number {\n for (let j = from; j < source.length; j++) {\n if (source[j] === \"\\\\\") {\n j++;\n continue;\n }\n if (source[j] === quote) return j;\n }\n return -1;\n}\n\ntype Analyzer = {\n /** \"file\" → run per source file (line-attributed / ≥1-count tells). \"page\" →\n * run once on the concatenated page (count-threshold tells a componentized\n * landing would otherwise dodge). */\n scope: \"file\" | \"page\";\n run: (text: string, file: string) => RawFinding[];\n};\n\nconst ANALYZERS: Analyzer[] = [\n // Overused primary font (font-family declarations + Google Fonts URLs). Fires\n // at ≥1 and carries a line number → per file.\n {\n scope: \"file\",\n run: (text, file) => {\n const out: RawFinding[] = [];\n const seen = new Set<string>();\n for (const m of text.matchAll(/font-family\\s*:\\s*([^;}{]+)/gi)) {\n const first = firstFamily(cap(m, 1));\n if (first && !GENERIC_FONTS.has(first) && isOverusedFont(first) && !seen.has(first)) {\n seen.add(first);\n out.push({ id: \"overused-font\", snippet: `font-family: ${first}`, file, line: lineOf(text, m.index ?? 0) });\n }\n }\n for (const m of text.matchAll(/fonts\\.googleapis\\.com\\/css2?\\?[^\"'\\s)<>]*/gi)) {\n for (const fam of googleFontFamilies(cap(m, 0))) {\n if (isOverusedFont(fam) && !seen.has(fam)) {\n seen.add(fam);\n out.push({ id: \"overused-font\", snippet: `Google Fonts: ${fam}`, file, line: lineOf(text, m.index ?? 0) });\n }\n }\n }\n return out;\n },\n },\n // Single font across a substantial page — needs the whole page's font set.\n // Counts only the FIRST family of each stack (like overused-font): fallbacks\n // aren't choices, so `'Inter', 'Helvetica Neue'` everywhere is still one font.\n {\n scope: \"page\",\n run: (text, file) => {\n const fonts = new Set<string>();\n for (const m of text.matchAll(/font-family\\s*:\\s*([^;}{]+)/gi)) {\n const first = firstFamily(cap(m, 1));\n if (first && !GENERIC_FONTS.has(first)) fonts.add(first);\n }\n for (const f of allGoogleFontFamilies(text)) fonts.add(f);\n if (fonts.size !== 1 || text.split(\"\\n\").length < 20) return [];\n const only = [...fonts][0] ?? \"\";\n return [{ id: \"single-font\", snippet: `only font used across the page is ${only}`, file }];\n },\n },\n // Flat type hierarchy (all sizes span <2×) — needs every size on the page.\n {\n scope: \"page\",\n run: (text, file) => {\n const sizes = new Set<number>();\n const REM = 16;\n for (const m of text.matchAll(/font-size\\s*:\\s*([\\d.]+)(px|rem|em)\\b/gi)) {\n const px = cap(m, 2) === \"px\" ? num(m, 1) : num(m, 1) * REM;\n if (px > 0 && px < 200) sizes.add(Math.round(px * 10) / 10);\n }\n for (const [cls, px] of Object.entries(TAILWIND_TEXT_PX)) {\n if (new RegExp(`\\\\b${cls}\\\\b`).test(text)) sizes.add(px);\n }\n if (sizes.size < 3) return [];\n const sorted = [...sizes].sort((a, b) => a - b);\n const min = sorted[0] ?? 1;\n const max = sorted[sorted.length - 1] ?? 1;\n const ratio = max / min;\n if (ratio >= 2.0) return [];\n return [\n {\n id: \"flat-type-hierarchy\",\n snippet: `sizes ${sorted.map((s) => `${s}px`).join(\", \")} (ratio ${ratio.toFixed(1)}:1)`,\n file,\n },\n ];\n },\n },\n // Monotonous spacing (one value dominates) — needs every spacing value.\n {\n scope: \"page\",\n run: (text, file) => {\n const rounded = collectSpacingPx(text).map((v) => Math.round(v / 4) * 4);\n if (rounded.length < 10) return [];\n const counts: Record<number, number> = {};\n for (const v of rounded) counts[v] = (counts[v] || 0) + 1;\n const maxCount = Math.max(...Object.values(counts));\n const pct = maxCount / rounded.length;\n const unique = [...new Set(rounded)].filter((v) => v > 0);\n if (pct <= 0.6 || unique.length > 3) return [];\n const dominant = Object.entries(counts).sort((a, b) => b[1] - a[1])[0]?.[0] ?? \"?\";\n return [\n {\n id: \"monotonous-spacing\",\n snippet: `~${dominant}px used ${maxCount}/${rounded.length} times (${Math.round(pct * 100)}%)`,\n file,\n },\n ];\n },\n },\n // Em-dash overuse (density-gated) — density is measured over the page's copy.\n {\n scope: \"page\",\n run: (text, file) => {\n const body = stripHtmlToText(text).replace(/—|�*8212;|�*2014;/gi, \"—\");\n // `(?<!-)--(?!-)` refuses `---` runs (frontmatter fences, hr markers) so\n // only a writer's double-hyphen counts as an em-dash stand-in.\n const count = (body.match(/[—]|(?<!-)--(?!-)(?=\\S)/g) ?? []).length;\n if (count < EM_DASH_FLOOR) return [];\n if (body.length > count * EM_DASH_CHARS_PER_DASH) return [];\n return [{ id: \"em-dash-overuse\", snippet: `${count} em-dashes in body copy`, file }];\n },\n },\n // The AI copy tells that are a shape, not a reading (engine/copy-tells):\n // the ones that read the words are asked of the decision model in\n // `copy-judgments.ts`. Page-scope: every gate here is a count threshold, and\n // a landing is always split across small components, so measuring per file\n // would dilute a page-wide habit into nothing.\n {\n scope: \"page\",\n run: (text, file) => {\n const body = stripHtmlPreservingHeadings(text);\n const out: RawFinding[] = [];\n for (const tell of structuralCopyTells(body)) {\n const gate = COPY_TELL_GATES[tell.id];\n if (!gate || tell.count < gate.minCount) continue;\n out.push({ id: tell.id, snippet: `${tell.count}× — \"${tell.sample}\"`, file });\n }\n return out;\n },\n },\n // Gradient text in authored CSS. A rule block spans lines, so this scans a\n // ±6-line window around each `background-clip: text` instead of one line\n // (the Tailwind class form stays a line matcher above).\n {\n scope: \"file\",\n run: (text, file) => {\n const out: RawFinding[] = [];\n const lines = text.split(\"\\n\");\n for (const m of text.matchAll(/(?:-webkit-)?background-clip\\s*:\\s*text/gi)) {\n const line = lineOf(text, m.index ?? 0);\n const window = lines.slice(Math.max(0, line - 7), Math.min(lines.length, line + 6)).join(\"\\n\");\n const gradient = window.match(/(?:repeating-)?(?:linear|radial|conic)-gradient\\((?:[^()]|\\([^()]*\\))*\\)/i);\n if (gradient) {\n out.push({ id: \"gradient-text\", snippet: `background-clip: text + ${gradient[0]}`, file, line });\n }\n }\n return out;\n },\n },\n // Dark glow: a zero-offset chromatic shadow used as decoration. Line-attributed\n // → per file.\n {\n scope: \"file\",\n run: (text, file) => {\n const out: RawFinding[] = [];\n for (const m of text.matchAll(/(?:box|text)-shadow\\s*:\\s*([^;{}]+)/gi)) {\n if (shadowIsGlow(cap(m, 1))) {\n out.push({\n id: \"dark-glow\",\n snippet: `shadow: ${cap(m, 1).trim().slice(0, 60)}`,\n file,\n line: lineOf(text, m.index ?? 0),\n });\n }\n }\n return out;\n },\n },\n // Marquee (<marquee> element). Fires at ≥1 → per file.\n {\n scope: \"file\",\n run: (text, file) => (/<marquee\\b/i.test(text) ? [{ id: \"marquee\", snippet: \"<marquee> element\", file }] : []),\n },\n];\n\n/** Authored spacing values in px — CSS px/rem declarations plus Tailwind\n * utilities (incl. gap-x/y, space-x/y, and decimals like p-1.5). Zero values\n * are resets, not spacing choices, so they never count. */\nfunction collectSpacingPx(text: string): number[] {\n const vals: number[] = [];\n const push = (v: number) => {\n if (v > 0 && v < 200) vals.push(v);\n };\n for (const m of text.matchAll(/(?:padding|margin)(?:-(?:top|right|bottom|left))?\\s*:\\s*(\\d+)px/gi)) push(num(m, 1));\n for (const m of text.matchAll(/(?:padding|margin)(?:-(?:top|right|bottom|left))?\\s*:\\s*([\\d.]+)rem/gi))\n push(Math.round(Number.parseFloat(cap(m, 1)) * 16));\n for (const m of text.matchAll(/\\b(?:p|px|py|pt|pb|pl|pr|m|mx|my|mt|mb|ml|mr|gap(?:-[xy])?|space-[xy])-([\\d.]+)\\b/g))\n push(Number.parseFloat(cap(m, 1)) * 4);\n return vals;\n}\n\n/** Zero-offset chromatic blur = a decorative halo, not depth. */\nfunction shadowIsGlow(value: string): boolean {\n const first = (value.split(/,(?![^(]*\\))/)[0] ?? \"\").trim();\n const colorMatch = first.match(/#[0-9a-f]{3,8}\\b|rgba?\\([^)]+\\)|hsla?\\([^)]+\\)/i);\n if (!colorMatch) return false;\n // Strip the color before reading offsets so its digits aren't parsed as lengths.\n const lengthsPart = first.replace(colorMatch[0], \" \").replace(/\\binset\\b/gi, \" \");\n const offsets = lengthsPart.match(/-?\\d*\\.?\\d+(?:px|rem|em)?/g);\n if (!offsets || offsets.length < 3) return false;\n const x = Number.parseFloat(offsets[0] ?? \"0\");\n const y = Number.parseFloat(offsets[1] ?? \"0\");\n const blur = Number.parseFloat(offsets[2] ?? \"0\");\n if (!(x === 0 && y === 0 && blur > 4)) return false;\n const c = parseColor(colorMatch[0]);\n return c !== null && hasChroma(c, 30);\n}\n\nfunction firstFamily(decl: string): string {\n return (decl.split(\",\")[0] ?? \"\")\n .trim()\n .replace(/^['\"]|['\"]$/g, \"\")\n .toLowerCase();\n}\n\nfunction googleFontFamilies(url: string): string[] {\n const q = url.indexOf(\"?\");\n if (q === -1) return [];\n const params = new URLSearchParams(url.slice(q + 1).replace(/&/g, \"&\"));\n const out: string[] = [];\n for (const value of params.getAll(\"family\")) {\n for (const part of value.split(\"|\")) out.push((part.split(\":\")[0] ?? \"\").trim().toLowerCase());\n }\n return out.filter(Boolean);\n}\n\nfunction allGoogleFontFamilies(text: string): string[] {\n const out: string[] = [];\n for (const m of text.matchAll(/fonts\\.googleapis\\.com\\/css2?\\?[^\"'\\s)<>]*/gi))\n out.push(...googleFontFamilies(cap(m, 0)));\n return out;\n}\n\nfunction lineOf(text: string, index: number): number {\n let line = 1;\n for (let i = 0; i < index && i < text.length; i++) if (text[i] === \"\\n\") line++;\n return line;\n}\n\n/** Character ranges covered by a `<table>` — where a comparison belongs, and\n * where naming a competitor is the section doing its job. */\nfunction tableRanges(text: string): Array<[number, number]> {\n const out: Array<[number, number]> = [];\n for (const m of text.matchAll(/<table\\b[\\s\\S]*?<\\/table>/gi)) {\n const start = m.index ?? 0;\n out.push([start, start + m[0].length]);\n }\n return out;\n}\n\n/**\n * One entry per competitor, however many spellings the vault yields — it gives\n * both the file slug and the entry's `title:`, and a single mention reporting\n * twice reads as two defects. The capitalized spelling wins, being the one that\n * would appear on a page. Names under 4 characters are dropped: too short to\n * match a brand without catching ordinary words.\n */\nfunction distinctCompetitorNames(competitors: string[]): string[] {\n const byFold = new Map<string, string>();\n for (const raw of competitors) {\n if (typeof raw !== \"string\") continue;\n const name = raw.trim();\n if (name.length < 4) continue;\n const key = foldForCopy(name);\n if (!byFold.has(key) || /\\p{Lu}/u.test(name)) byFold.set(key, name);\n }\n return [...byFold.values()];\n}\n\n/** Elements that only style a run of words: everything else ends a block of copy. */\nconst INLINE_TAGS =\n /^<\\/?(?:a|abbr|b|bdi|bdo|cite|code|data|dfn|em|i|kbd|mark|q|s|samp|small|span|strong|sub|sup|time|u|var|wbr)\\b/i;\n\n/**\n * A source's visible copy with every offset kept: like `blankHtmlKeepingOffsets`, but a block\n * element (a heading, a paragraph, a cell, a button) starts a new line, so a heading and the\n * paragraph under it are never read as one sentence.\n */\nfunction visibleCopyKeepingOffsets(text: string): string {\n const out = text.split(\"\");\n const pattern = /<script\\b[^>]*>[\\s\\S]*?<\\/script>|<style\\b[^>]*>[\\s\\S]*?<\\/style>|<!--[\\s\\S]*?-->|<[^>]+>/gi;\n for (const m of text.matchAll(pattern)) {\n const start = m.index ?? 0;\n for (let i = start; i < start + m[0].length && i < out.length; i++) {\n if (out[i] !== \"\\n\") out[i] = \" \";\n }\n if (!INLINE_TAGS.test(m[0])) out[start] = \"\\n\";\n }\n return out.join(\"\");\n}\n\nexport type CopySentence = { file: string; line: number; text: string; before?: string; inTable: boolean };\nexport type CompetitorMention = { file: string; line: number; sentence: string; competitor: string };\n\n/**\n * Every sentence a visitor reads on the page, file by file and line by line (frontmatter prose\n * included, comments and code not), and each sentence that names a competitor outside a\n * comparison table. Pure: what the copy rules ask the decision model about.\n */\nexport function landingCopy(\n sources: Array<{ path: string; text: string }>,\n competitors: string[] = [],\n): { sentences: CopySentence[]; mentions: CompetitorMention[] } {\n const names = distinctCompetitorNames(competitors).map((name) => ({\n name,\n pattern: new RegExp(`(?<![\\\\p{L}\\\\p{N}])${escapeRegExp(name)}(?![\\\\p{L}\\\\p{N}])`, \"iu\"),\n }));\n const sentences = sources.flatMap(sourceSentences);\n const mentions = sentences.flatMap((s) =>\n s.inTable\n ? []\n : names\n .filter(({ pattern }) => pattern.test(s.text))\n .map(({ name }) => ({ file: s.file, line: s.line, sentence: s.text, competitor: name })),\n );\n return { sentences, mentions };\n}\n\n/** One source's visible sentences, each with its line and whether a `<table>` holds it. */\nfunction sourceSentences(source: { path: string; text: string }): CopySentence[] {\n const text = blankUnrenderedSource(source.text);\n const tables = tableRanges(text);\n return copySentences(visibleCopyKeepingOffsets(text)).map((s) => ({\n file: source.path,\n line: lineOf(text, s.start),\n text: s.text,\n ...(s.before ? { before: s.before } : {}),\n inTable: tables.some(([from, to]) => s.start >= from && s.start < to),\n }));\n}\n\nfunction escapeRegExp(value: string): string {\n return value.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n}\n\n/** Run the per-file rules over one source file (line matchers + file-scope\n * analyzers). Pure; never throws. Page-scope tells are handled by `detectPage`. */\nexport function detectSource(source: { path: string; text: string }): RawFinding[] {\n const file = source.path;\n // Frontmatter is component JS (imports, props) and a comment is commentary —\n // neither is design source. Blanked line-preservingly so no rule reads them\n // and attribution stays exact.\n const text = blankUnrenderedSource(source.text);\n const findings: RawFinding[] = [];\n const lines = text.split(\"\\n\");\n for (const matcher of LINE_MATCHERS) {\n for (let i = 0; i < lines.length; i++) {\n const line = lines[i] ?? \"\";\n for (const m of line.matchAll(matcher.regex)) {\n if (matcher.test(m, line)) findings.push({ id: matcher.id, snippet: matcher.fmt(m, line), file, line: i + 1 });\n }\n }\n }\n for (const analyzer of ANALYZERS) {\n if (analyzer.scope === \"file\") findings.push(...analyzer.run(text, file));\n }\n return dedupe(findings);\n}\n\n/** Run the page-scope analyzers over the ASSEMBLED page (all sources joined),\n * so count-threshold tells aren't diluted across small components. Page-level\n * findings have no single line; they attribute to the page's `index.astro`. */\nexport function detectPage(sources: Array<{ path: string; text: string }>): RawFinding[] {\n if (sources.length === 0) return [];\n const combined = sources.map((s) => blankUnrenderedSource(s.text)).join(\"\\n\");\n const pageFile =\n sources.find((s) => s.path === \"index.astro\" || s.path.endsWith(\"/index.astro\"))?.path ??\n sources[0]?.path ??\n \"index.astro\";\n const findings: RawFinding[] = [];\n for (const analyzer of ANALYZERS) {\n if (analyzer.scope === \"page\") findings.push(...analyzer.run(combined, pageFile));\n }\n return dedupe(findings);\n}\n\nexport function dedupe(findings: RawFinding[]): RawFinding[] {\n const out: RawFinding[] = [];\n for (const f of findings) {\n const dupe = out.some(\n (d) => d.id === f.id && d.snippet === f.snippet && Math.abs((d.line ?? 0) - (f.line ?? 0)) <= 2,\n );\n if (!dupe) out.push(f);\n }\n return out;\n}\n","/**\n * The landing critique's copy rules: what the page SAYS, read by the decision model (Jev) one\n * sentence at a time, in whatever language it is written, in one fanned-out set of requests.\n *\n * - `competitor-concession` (block): a sentence that ranks somebody else above the client.\n * - `competitor-named-in-comparison` (warn): a vault competitor compared outside a table.\n * - `marketing-buzzword` (warn): copy that could describe any company.\n * - `agent-washing` (warn): an autonomy claim the page never pairs with what the buyer controls.\n * - the AI copy tells (`copy-tells/questions.ts`), counted over the page and gated in\n * `COPY_TELL_GATES`.\n *\n * When Jev cannot answer, none of these is reported and `judged` is false: the critique never\n * blocks a publish on a guess, and it never falls back to a word list that only knows the\n * languages someone typed in.\n */\nimport { TELL_QUESTIONS, tellQuestionsFor } from \"../../copy-tells/questions.ts\";\nimport type { AskNouls, NoulQuestion } from \"../../lib/remembered-nouls.ts\";\nimport { COPY_TELL_GATES } from \"./constants.ts\";\nimport {\n AUTONOMY_HELD,\n AUTONOMY_QUESTION,\n BUZZWORD_HELD,\n BUZZWORD_QUESTION,\n COMPARISON_HELD,\n CONCESSION_HELD,\n CONCESSION_QUESTION,\n CONTROL_HELD,\n CONTROL_QUESTION,\n comparisonQuestion,\n pageQuestion,\n sentenceQuestion,\n} from \"./copy-questions.ts\";\nimport { type CopySentence, dedupe, landingCopy, type RawFinding } from \"./rules.ts\";\n\n/** About 15k tokens: the page fits Jev's context with room for the question. */\nconst PAGE_CHARS = 60_000;\nconst SNIPPET_CHARS = 70;\n\n/** The questions asked of every distinct sentence, in this order. */\nconst PER_SENTENCE = [\"concession\", \"buzzword\", \"autonomy\", ...TELL_QUESTIONS.map((t) => t.id)] as const;\n\nfunction questionsFor(sentence: CopySentence): NoulQuestion[] {\n return [\n sentenceQuestion(CONCESSION_QUESTION, sentence.text),\n sentenceQuestion(BUZZWORD_QUESTION, sentence.text),\n sentenceQuestion(AUTONOMY_QUESTION, sentence.text),\n ...tellQuestionsFor({ text: sentence.text, ...(sentence.before ? { before: sentence.before } : {}) }),\n ];\n}\n\nconst snippet = (text: string) => `\"${text.slice(0, SNIPPET_CHARS)}\"`;\n\n/** The page-level file a finding with no single line is reported on, as `detectPage` does. */\nfunction pageFile(sources: ReadonlyArray<{ path: string }>): string {\n return (\n sources.find((s) => s.path === \"index.astro\" || s.path.endsWith(\"/index.astro\"))?.path ??\n sources[0]?.path ??\n \"index.astro\"\n );\n}\n\ntype Said = (s: CopySentence, id: (typeof PER_SENTENCE)[number], held: number) => boolean;\n\n/** The per-sentence findings: each concession on its line, and each file's buzzword sentences. */\nfunction sentenceFindings(sentences: readonly CopySentence[], said: Said): RawFinding[] {\n const concessions = sentences\n .filter((s) => said(s, \"concession\", CONCESSION_HELD))\n .map((s) => ({ id: \"competitor-concession\", snippet: snippet(s.text), file: s.file, line: s.line }));\n const buzzwords = [...new Set(sentences.map((s) => s.file))].flatMap((file) => {\n const buzz = sentences.filter((s) => s.file === file && !s.inTable && said(s, \"buzzword\", BUZZWORD_HELD));\n const first = buzz[0];\n if (!first) return [];\n return [\n {\n id: \"marketing-buzzword\",\n snippet: `${buzz.length} buzzword sentence${buzz.length === 1 ? \"\" : \"s\"}: ${snippet(first.text)}`,\n file,\n line: first.line,\n },\n ];\n });\n return [...concessions, ...buzzwords];\n}\n\n/** The page-level findings: an unscaffolded autonomy claim, and every AI copy tell past its gate. */\nfunction pageFindings(sentences: readonly CopySentence[], said: Said, controlled: boolean, file: string): RawFinding[] {\n const out: RawFinding[] = [];\n const claim = sentences.find((s) => said(s, \"autonomy\", AUTONOMY_HELD));\n if (claim && !controlled) {\n out.push({\n id: \"agent-washing\",\n snippet: `${snippet(claim.text)} with no control or oversight signal on the page`,\n file,\n });\n }\n for (const tell of TELL_QUESTIONS) {\n const hits = sentences.filter((s) => !s.inTable && said(s, tell.id, tell.threshold));\n const gate = COPY_TELL_GATES[tell.id];\n if (!gate || hits.length < gate.minCount) continue;\n out.push({ id: tell.id, snippet: `${hits.length}× — ${snippet(hits[0]?.text ?? \"\")}`, file });\n }\n return out;\n}\n\nexport async function judgeLandingCopy(\n input: { sources: Array<{ path: string; text: string }>; competitors?: string[] },\n ask: AskNouls,\n): Promise<{ findings: RawFinding[]; judged: boolean }> {\n const { sentences, mentions } = landingCopy(input.sources, input.competitors ?? []);\n if (sentences.length === 0) return { findings: [], judged: true };\n\n // One entry per distinct sentence (and its lead-in): the same line in two components is one question.\n const keyOf = (s: CopySentence) => `${s.before ?? \"\"}\\u0000${s.text}`;\n const distinct = [...new Map(sentences.map((s) => [keyOf(s), s])).values()];\n const page = [...new Set(sentences.map((s) => s.text))].join(\"\\n\").slice(0, PAGE_CHARS);\n const answers = await ask([\n ...distinct.flatMap(questionsFor),\n ...mentions.map((m) => sentenceQuestion(comparisonQuestion(m.competitor), m.sentence)),\n pageQuestion(CONTROL_QUESTION, page),\n ]);\n if (answers === null) return { findings: [], judged: false };\n\n const answerOf = new Map(\n distinct.map((s, i) => [\n keyOf(s),\n Object.fromEntries(PER_SENTENCE.map((id, q) => [id, answers[i * PER_SENTENCE.length + q] ?? 0])),\n ]),\n );\n const said: Said = (s, id, held) => (answerOf.get(keyOf(s))?.[id] ?? 0) >= held;\n const comparedAt = distinct.length * PER_SENTENCE.length;\n const comparisons = mentions\n .filter((_, i) => (answers[comparedAt + i] ?? 0) >= COMPARISON_HELD)\n .map((m) => ({\n id: \"competitor-named-in-comparison\",\n snippet: `${snippet(m.sentence)} names ${m.competitor}`,\n file: m.file,\n line: m.line,\n }));\n const controlled = (answers[comparedAt + mentions.length] ?? 0) >= CONTROL_HELD;\n return {\n findings: dedupe([\n ...sentenceFindings(sentences, said),\n ...comparisons,\n ...pageFindings(sentences, said, controlled, pageFile(input.sources)),\n ]),\n judged: true,\n };\n}\n","/**\n * Landing anti-slop critic — the engine entry (pure + offline).\n *\n * Our answer for landing pages to the \"every model ships the same AI tells\"\n * problem, grounded in the doctrine the `landing` skill already teaches. It\n * scans a landing's `.astro` source, scores it on design families, and returns\n * findings tiered block/warn/advisory — BEFORE publish, so tells get fixed.\n *\n * Two kinds of rule. The design rules read the source's shape in code. The copy\n * rules read what the page SAYS, in whatever language it is written, through the\n * decision model (`copy-judgments.ts`); when it cannot answer, `copyChecked` is\n * false and no copy finding is reported, never a guess.\n *\n * ADVISORY as a value object: it returns scores + findings and never throws.\n * The CLI that wraps it always exits 0; blocking is the verify gate's job (it\n * reads the block-tier count from the freshness snapshot). Brand-matched values\n * are downgraded to advisory `brandDrift` so we never fight a committed brand.\n *\n * It takes the already-read source text, parsed brand tokens and the decision\n * model as an argument, so it has no fs surface and tests hand it a fake model.\n */\n\nimport type { AskNouls } from \"../../lib/remembered-nouls.ts\";\nimport type { BrandTokens } from \"./brand-tokens.ts\";\nimport { brandCommitsAiHue, brandCommitsCream, brandCommitsFont, brandCommitsGradient } from \"./brand-tokens.ts\";\nimport { type Family, RULE_META, SEVERITY_WEIGHT, type Severity } from \"./constants.ts\";\nimport { judgeLandingCopy } from \"./copy-judgments.ts\";\nimport { detectPage, detectSource, type RawFinding } from \"./rules.ts\";\n\nexport type LandingFinding = {\n id: string;\n severity: Severity;\n family: Family;\n snippet: string;\n file?: string;\n line?: number;\n note: string;\n brandDrift?: boolean;\n};\n\nexport type LandingDimension = {\n dimension: Family;\n /** 0–1, higher is better. */\n score: number;\n note: string;\n};\n\nexport type LandingSource = { path: string; text: string };\n\nexport type CritiqueLandingInput = {\n slug: string;\n sources: LandingSource[];\n brand: BrandTokens;\n /** Competitor names from `src/content/competitors/`. Absent for a client with\n * no competitor entries yet, which is normal and simply skips that rule. */\n competitors?: string[];\n /** The decision model the copy rules ask; absent, the copy is not checked. */\n ask?: AskNouls;\n};\n\nexport type CritiqueLandingReport = {\n advisory: true;\n overall: number;\n dimensions: LandingDimension[];\n findings: LandingFinding[];\n counts: { block: number; warn: number; advisory: number };\n /** False when the copy rules could not ask the decision model, so none of them reported. */\n copyChecked: boolean;\n};\n\nconst FAMILIES: Family[] = [\"typography\", \"color\", \"borders_depth\", \"motion\", \"spacing\", \"copy\", \"integrity\"];\n\nfunction round(n: number): number {\n return Math.round(n * 100) / 100;\n}\n\nfunction clamp01(n: number): number {\n return Math.max(0, Math.min(1, n));\n}\n\n/**\n * Apply the BRAND.md allowlist: a font/color/gradient tell whose value the brand commits\n * is a decision, not slop — downgrade it to advisory and mark it `brandDrift`.\n */\nfunction applyBrand(\n id: string,\n snippet: string,\n severity: Severity,\n brand: BrandTokens,\n): { severity: Severity; brandDrift: boolean } {\n const meta = RULE_META[id];\n if (!meta?.brandAware || !brand.hasTokens) return { severity, brandDrift: false };\n const matched =\n (meta.brandAware === \"font\" && brandCommitsFont(brand, snippet)) ||\n (meta.brandAware === \"color\" && id === \"ai-color-palette\" && brandCommitsAiHue(brand)) ||\n (meta.brandAware === \"color\" && id === \"cream-palette\" && brandCommitsCream(brand)) ||\n (meta.brandAware === \"gradient\" && brandCommitsGradient(brand, snippet));\n return matched ? { severity: \"advisory\", brandDrift: true } : { severity, brandDrift: false };\n}\n\n/** Score a landing. Branches nowhere — every family is always reported so the\n * output reads like a stable scorecard. Every heuristic degrades gracefully. */\nexport async function critiqueLanding(input: CritiqueLandingInput): Promise<CritiqueLandingReport> {\n const sources = Array.isArray(input.sources) ? input.sources : [];\n const findings: LandingFinding[] = [];\n\n // Per-file tells (line-attributed) plus page-scope tells over the assembled\n // page (count-threshold tells a componentized landing would otherwise dodge).\n const raws: RawFinding[] = [];\n for (const source of sources) raws.push(...detectSource(source));\n raws.push(...detectPage(sources));\n const copy = input.ask\n ? await judgeLandingCopy({ sources, competitors: input.competitors ?? [] }, input.ask)\n : { findings: [], judged: false };\n raws.push(...copy.findings);\n\n for (const raw of raws) {\n const meta = RULE_META[raw.id];\n if (!meta) continue;\n const { severity, brandDrift } = applyBrand(raw.id, raw.snippet, meta.severity, input.brand);\n findings.push({\n id: raw.id,\n severity,\n family: meta.family,\n snippet: raw.snippet,\n file: raw.file,\n line: raw.line,\n note: meta.note,\n ...(brandDrift ? { brandDrift: true } : {}),\n });\n }\n\n const dimensions: LandingDimension[] = FAMILIES.map((family) => {\n const fam = findings.filter((f) => f.family === family);\n const penalty = fam.reduce((s, f) => s + SEVERITY_WEIGHT[f.severity], 0);\n const score = round(clamp01(1 - penalty));\n const note = fam.length === 0 ? \"clean\" : `${fam.length} finding(s): ${describeCounts(fam)}`;\n return { dimension: family, score, note };\n });\n\n const overall = round(dimensions.reduce((s, d) => s + d.score, 0) / dimensions.length);\n const counts = {\n block: findings.filter((f) => f.severity === \"block\").length,\n warn: findings.filter((f) => f.severity === \"warn\").length,\n advisory: findings.filter((f) => f.severity === \"advisory\").length,\n };\n\n return { advisory: true, overall, dimensions, findings, counts, copyChecked: copy.judged };\n}\n\nfunction describeCounts(findings: LandingFinding[]): string {\n const b = findings.filter((f) => f.severity === \"block\").length;\n const w = findings.filter((f) => f.severity === \"warn\").length;\n const a = findings.filter((f) => f.severity === \"advisory\").length;\n return [b ? `${b} block` : \"\", w ? `${w} warn` : \"\", a ? `${a} advisory` : \"\"].filter(Boolean).join(\", \");\n}\n","import { mkdir, rename, writeFile } from \"node:fs/promises\";\nimport path from \"node:path\";\n\n/**\n * The freshness snapshot the critique CLI writes and the verify gate reads.\n * Lives under the gitignored `.cache/` so it never creates a diff. The gate\n * proves \"the critiqued source == the shipping source\" by recomputing the\n * landing's source hash and comparing it to the one recorded here.\n *\n * TWO fingerprints, for one release. `compositionSha` is the current one — every\n * `.astro` in the landing's import graph, so a section the page borrows counts.\n * `sourceSha` is the older, folder-shaped one, and it is written for a gate that\n * predates the composition fingerprint: this CLI and the gate reach a workspace\n * on different tracks (the E2B image vs the per-repo scaffold sync), so for a\n * while after the change each half meets the other's. A gate that cannot read\n * the fingerprint it is given calls every landing stale forever and blocks the\n * commit. Both fields, and both readers, go away together — see\n * `computeLegacyLandingSourceSha`.\n */\n\n/** Bump when a rule change should invalidate old snapshots (informational; the\n * gate keys off the source hash, this just lets the agent know it's re-scored). */\nexport const CRITIC_VERSION = \"5\";\n\nexport type CritiqueSnapshot = {\n slug: string;\n /** The composition fingerprint — what the current gate compares. */\n compositionSha: string;\n /** The folder-shaped fingerprint, for a gate older than the one above. */\n sourceSha: string;\n criticVersion: string;\n at: string;\n blockCount: number;\n warnCount: number;\n};\n\nexport function critiqueCacheDir(projectRoot: string): string {\n return path.join(projectRoot, \".cache\", \"landing-critique\");\n}\n\nfunction snapshotPath(projectRoot: string, slug: string): string {\n return path.join(critiqueCacheDir(projectRoot), `${slug}.json`);\n}\n\nexport async function writeCritiqueSnapshot(projectRoot: string, snapshot: CritiqueSnapshot): Promise<void> {\n await mkdir(critiqueCacheDir(projectRoot), { recursive: true });\n // Write-then-rename so a concurrent gate read never parses a half-written file.\n const dest = snapshotPath(projectRoot, snapshot.slug);\n const tmp = `${dest}.tmp`;\n await writeFile(tmp, `${JSON.stringify(snapshot, null, 2)}\\n`, \"utf8\");\n await rename(tmp, dest);\n}\n","import type { Dirent } from \"node:fs\";\nimport { readdir, readFile, stat } from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { sha256Hex } from \"../../engine/storage/sha256.ts\";\nimport { landingGraphFiles } from \"./import-graph.ts\";\n\n/**\n * A content fingerprint of a landing's editable source — the files an agent\n * edits. It is the bridge the quality gate uses to tell \"this critique is\n * current\" from \"the source was edited since the last critique\":\n *\n * - `baker landing critique <slug>` records the fingerprint it SCORED, and\n * - the `validate-landing-critique` verify gate recompares against the CURRENT\n * source. Equal → the critique is fresh; different (or missing) → the landing\n * changed and must be re-critiqued before it can publish.\n *\n * ## The file set follows the imports, not the folder\n *\n * It used to be `index.astro` plus this landing's own `_components/**\\/*.astro`.\n * Pages share components since A/B tests shipped — a variant borrows the\n * control's sections and forks only the one under test — so that set stopped\n * describing the page. Two things broke at once: an edit to a shared section\n * left the borrowing page's sha unchanged, so the gate passed a page it had\n * never scored in the shape it ships; and the critic was handed a page whose\n * sections it could not read, then asked to judge its composition.\n *\n * So the set is every `.astro` file in the landing's import graph, with\n * repo-relative paths because a shared section does not live under the landing.\n * Bounded to `src/pages/**` and `src/components/**` — the composition the critic\n * judges. The layout and the flow engine are reached by every page and are not\n * compositional; hashing them would restate \"the scaffold changed\" as \"every\n * landing is stale\".\n *\n * Content-addressed (not mtime), so a clone at a different path or clock skew\n * never produces a false \"edited\". The gate's `.mjs`\n * (`apps/scaffold-template/__tooling__/checks/sdk/landing-critique-freshness.mjs`)\n * reimplements this exact ordering + length-prefixed concat — it can't import the\n * CLI — so keep the two in lockstep: repo-relative POSIX paths, ascending\n * codepoint sort, `${len}\\0` prefix. `scripts/__tests__/landing-source-version-parity.test.ts`\n * runs both over one fixture tree and fails when they disagree.\n */\n\n/** Roots whose `.astro` files count as this landing's composition. */\nconst CRITIQUED_ROOTS = [\"src/pages/\", \"src/components/\"];\n\n/** Ordered repo-relative POSIX paths of a landing's source files (sorted, stable). */\nasync function landingSourceRelPaths(root: string, slug: string): Promise<string[]> {\n const files = await landingGraphFiles(root, slug);\n return [...files]\n .filter((rel) => rel.endsWith(\".astro\") && CRITIQUED_ROOTS.some((r) => rel.startsWith(r)))\n .sort((a, b) => (a < b ? -1 : a > b ? 1 : 0));\n}\n\n/** Read the landing's source files as {path, text} for the critic. */\nexport async function readLandingSources(root: string, slug: string): Promise<Array<{ path: string; text: string }>> {\n const rel = await landingSourceRelPaths(root, slug);\n const out: Array<{ path: string; text: string }> = [];\n for (const r of rel) out.push({ path: r, text: await readFile(path.join(root, r), \"utf8\") });\n return out;\n}\n\n/** Length-prefixed concat SHA over the landing's source files, in sorted order. */\nexport async function computeLandingSourceSha(root: string, slug: string): Promise<string> {\n const rel = await landingSourceRelPaths(root, slug);\n const parts: Buffer[] = [];\n for (const r of rel) {\n let bytes: Buffer;\n try {\n bytes = await readFile(path.join(root, r));\n } catch {\n bytes = Buffer.alloc(0);\n }\n // Length-prefix by both the path and the bytes so moving content across\n // files can't collide, mirroring canvas source-version.ts.\n parts.push(Buffer.from(`${r}\\0${bytes.length}\\0`), bytes);\n }\n return sha256Hex(Buffer.concat(parts));\n}\n\n/**\n * The fingerprint as it was BEFORE the composition one above: `index.astro`\n * plus this landing's own `_components/**\\/*.astro`, paths relative to the\n * landing folder.\n *\n * Written into every snapshot beside the composition sha, and read by nothing\n * here. It is there for a gate that predates the composition fingerprint: this\n * CLI reaches a workspace through the E2B image (`@koda-sl/baker-cli@latest`,\n * baked at build) and the gate reaches the same workspace through the per-repo\n * scaffold sync — two tracks with no ordering between them, and a repo whose\n * sync is frozen keeps the old gate indefinitely. An old gate handed only a\n * composition sha recomputes its own, calls every landing stale, re-runs this\n * command, gets the same snapshot back, and blocks the commit citing an\n * unwritable `.cache/`.\n *\n * Delete together with the scaffold's `computeLegacySourceSha` once the fleet\n * and the template both carry the composition fingerprint.\n */\nexport async function computeLegacyLandingSourceSha(landingDir: string): Promise<string> {\n const rel: string[] = [];\n if (await isFile(path.join(landingDir, \"index.astro\"))) rel.push(\"index.astro\");\n for (const abs of await walkAstro(path.join(landingDir, \"_components\"))) {\n rel.push(path.relative(landingDir, abs).split(path.sep).join(\"/\"));\n }\n rel.sort((a, b) => (a < b ? -1 : a > b ? 1 : 0));\n\n const parts: Buffer[] = [];\n for (const r of rel) {\n let bytes: Buffer;\n try {\n bytes = await readFile(path.join(landingDir, r));\n } catch {\n bytes = Buffer.alloc(0);\n }\n parts.push(Buffer.from(`${r}\\0${bytes.length}\\0`), bytes);\n }\n return sha256Hex(Buffer.concat(parts));\n}\n\nasync function isFile(p: string): Promise<boolean> {\n try {\n return (await stat(p)).isFile();\n } catch {\n return false;\n }\n}\n\nasync function walkAstro(dir: string): Promise<string[]> {\n let entries: Dirent[];\n try {\n entries = await readdir(dir, { withFileTypes: true });\n } catch {\n return [];\n }\n const out: string[] = [];\n for (const entry of entries) {\n const abs = path.join(dir, entry.name);\n if (entry.isDirectory()) out.push(...(await walkAstro(abs)));\n else if (entry.isFile() && entry.name.endsWith(\".astro\")) out.push(abs);\n }\n return out;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,WAAAA,UAAS,YAAAC,WAAU,QAAAC,aAAY;AACxC,OAAOC,WAAU;AACjB,SAAS,qBAAqB;;;AC6BvB,IAAM,iBAAiB,oBAAI,IAAY;AAAA;AAAA,EAE5C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAA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AAE;AAAA,IACN,UAAU,EAAE;AAAA,IACZ,QAAQ,EAAE;AAAA,IACV,OAAO,EAAE,OAAO,GAAG,EAAE,IAAI,IAAI,EAAE,IAAI,KAAK,EAAE;AAAA,IAC1C,SAAS,EAAE;AAAA,IACX,MAAM,EAAE;AAAA,IACR,GAAI,EAAE,aAAa,EAAE,YAAY,KAAK,IAAI,CAAC;AAAA,EAC7C;AACF;AAEA,eAAe,MAAM,GAA6B;AAChD,MAAI;AACF,YAAQ,MAAMG,MAAK,CAAC,GAAG,YAAY;AAAA,EACrC,QAAQ;AACN,WAAO;AAAA,EACT;AACF;","names":["readdir","readFile","stat","path","pageFile","snippet","path","path","path","readdir","readFile","stat"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/commands/landing/index.ts"],"sourcesContent":["import { defineCommand } from \"citty\";\n\nexport const landingCommand = defineCommand({\n meta: {\n name: \"landing\",\n description: `Design-quality tools for landing pages (src/pages/<slug>/), and downloading the published ones.\n\nStart here: \\`baker landing critique <slug>\\` after building or editing a landing.\n\nSubcommands:\n baker landing inspiration — reference library of real landing-page sections; search it during research, BEFORE writing the Direction Contract. Inspiration only: take the mechanism, never the words.\n baker landing variant <control> <slug> — the alternative version of a page for an A/B test: shares the control's sections, forks only the component you name, so the two arms differ by exactly your hypothesis. Run \\`baker experiment plan\\` first.\n baker landing critique <slug> — design-quality critic (advisory): flags the known AI 'slop' tells (gradient text, overused fonts, side-tab borders, cream palettes, broken images) and reads the copy in any language for buzzwords, AI copy tells and positioning integrity (copy ranking a competitor above the client), tiered block/warn/advisory, respecting the client's brand. Records the critique the publish quality gate requires — run it before finishing a landing.\n baker landing export start — download the PUBLISHED landings as a ZIP of plain HTML (\"download my landings\", \"send me the HTML\"); \\`baker landing export status <id>\\` gives the link.`,\n },\n subCommands: {\n inspiration: () => import(\"./inspiration/index.ts\").then((m) => m.inspirationCommand),\n critique: () => import(\"./critique.ts\").then((m) => m.critiqueCommand),\n variant: () => import(\"./variant.ts\").then((m) => m.variantCommand),\n export: () => import(\"./export.ts\").then((m) => m.exportCommand),\n },\n});\n"],"mappings":";;;AAAA,SAAS,qBAAqB;AAEvB,IAAM,iBAAiB,cAAc;AAAA,EAC1C,MAAM;AAAA,IACJ,MAAM;AAAA,IACN,aAAa;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASf;AAAA,EACA,aAAa;AAAA,IACX,aAAa,MAAM,OAAO,2BAAwB,EAAE,KAAK,CAAC,MAAM,EAAE,kBAAkB;AAAA,IACpF,UAAU,MAAM,OAAO,wBAAe,EAAE,KAAK,CAAC,MAAM,EAAE,eAAe;AAAA,IACrE,SAAS,MAAM,OAAO,uBAAc,EAAE,KAAK,CAAC,MAAM,EAAE,cAAc;AAAA,IAClE,QAAQ,MAAM,OAAO,sBAAa,EAAE,KAAK,CAAC,MAAM,EAAE,aAAa;AAAA,EACjE;AACF,CAAC;","names":[]}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|