seo 0.17.3 → 0.17.5

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/dist/mcp.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { createRequire as __seoCreateRequire } from 'node:module'; const require = __seoCreateRequire(import.meta.url);
2
- import { i as __toESM, n as version, r as __commonJSMin, t as load } from "./esm-HKeFfXOD.js";
2
+ import { i as __toESM, n as version, r as __commonJSMin, t as load } from "./esm-lrKCsK_C.js";
3
3
  import { createHash, randomUUID, sign } from "node:crypto";
4
4
  import { ZodOptional, z } from "zod";
5
5
  import { arch, homedir, platform, tmpdir, totalmem } from "node:os";
@@ -32,7 +32,7 @@ import { ZodFirstPartyTypeKind } from "zod/v3";
32
32
  import * as z4mini from "zod/v4-mini";
33
33
  import * as z$1 from "zod/v4";
34
34
  import process$1 from "node:process";
35
- // node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js
35
+ // node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.2_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js
36
36
  function isZ4Schema(s) {
37
37
  return !!s._zod;
38
38
  }
@@ -154,7 +154,7 @@ function getLiteralValue(schema) {
154
154
  const directValue = schema.value;
155
155
  if (directValue !== void 0) return directValue;
156
156
  }
157
- // node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
157
+ // node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.2_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
158
158
  const LATEST_PROTOCOL_VERSION = "2025-11-25";
159
159
  const SUPPORTED_PROTOCOL_VERSIONS = [
160
160
  LATEST_PROTOCOL_VERSION,
@@ -2099,7 +2099,7 @@ var UrlElicitationRequiredError = class extends McpError {
2099
2099
  return this.data?.elicitations ?? [];
2100
2100
  }
2101
2101
  };
2102
- // node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js
2102
+ // node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.2_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js
2103
2103
  /**
2104
2104
  * Experimental task interfaces for MCP SDK.
2105
2105
  * WARNING: These APIs are experimental and may change without notice.
@@ -3156,7 +3156,7 @@ const zodToJsonSchema = (schema, options) => {
3156
3156
  if (refs.target === "openAi" && ("anyOf" in combined || "oneOf" in combined || "allOf" in combined || "type" in combined && Array.isArray(combined.type))) console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property.");
3157
3157
  return combined;
3158
3158
  };
3159
- // node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js
3159
+ // node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.2_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js
3160
3160
  function mapMiniTarget(t) {
3161
3161
  if (!t) return "draft-7";
3162
3162
  if (t === "jsonSchema7" || t === "draft-7") return "draft-7";
@@ -10636,7 +10636,7 @@ var require_dist = /* @__PURE__ */ __commonJSMin(((exports, module) => {
10636
10636
  Object.defineProperty(exports, "__esModule", { value: true });
10637
10637
  exports.default = formatsPlugin;
10638
10638
  }));
10639
- // node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js
10639
+ // node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.2_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js
10640
10640
  var import_ajv = /* @__PURE__ */ __toESM(require_ajv(), 1);
10641
10641
  var import_dist = /* @__PURE__ */ __toESM(require_dist(), 1);
10642
10642
  function createDefaultAjvInstance() {
@@ -10711,7 +10711,7 @@ var AjvJsonSchemaValidator = class {
10711
10711
  };
10712
10712
  }
10713
10713
  };
10714
- // node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.js
10714
+ // node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.2_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.js
10715
10715
  /**
10716
10716
  * Experimental server task features for MCP SDK.
10717
10717
  * WARNING: These APIs are experimental and may change without notice.
@@ -10928,7 +10928,7 @@ var ExperimentalServerTasks = class {
10928
10928
  return this._server.cancelTask({ taskId }, options);
10929
10929
  }
10930
10930
  };
10931
- // node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js
10931
+ // node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.2_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js
10932
10932
  /**
10933
10933
  * Experimental task capability assertion helpers.
10934
10934
  * WARNING: These APIs are experimental and may change without notice.
@@ -10972,7 +10972,7 @@ function assertClientRequestTaskCapability(requests, method, entityName) {
10972
10972
  case "elicitation/create": if (!requests.elicitation?.create) throw new Error(`${entityName} does not support task creation for elicitation/create (required for ${method})`);
10973
10973
  }
10974
10974
  }
10975
- // node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js
10975
+ // node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.2_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js
10976
10976
  /**
10977
10977
  * An MCP server on top of a pluggable transport.
10978
10978
  *
@@ -11294,7 +11294,7 @@ var Server = class extends Protocol {
11294
11294
  return this.notification({ method: "notifications/prompts/list_changed" });
11295
11295
  }
11296
11296
  };
11297
- // node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/server/completable.js
11297
+ // node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.2_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/server/completable.js
11298
11298
  const COMPLETABLE_SYMBOL = Symbol.for("mcp.completable");
11299
11299
  /**
11300
11300
  * Checks if a schema is completable (has completion metadata).
@@ -11312,7 +11312,7 @@ var McpZodTypeKind;
11312
11312
  (function(McpZodTypeKind) {
11313
11313
  McpZodTypeKind["Completable"] = "McpCompletable";
11314
11314
  })(McpZodTypeKind || (McpZodTypeKind = {}));
11315
- // node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/toolNameValidation.js
11315
+ // node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.2_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/toolNameValidation.js
11316
11316
  /**
11317
11317
  * Tool name validation utilities according to SEP: Specify Format for Tool Names
11318
11318
  *
@@ -11382,7 +11382,7 @@ function validateAndWarnToolName(name) {
11382
11382
  issueToolNameWarning(name, result.warnings);
11383
11383
  return result.isValid;
11384
11384
  }
11385
- // node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/mcp-server.js
11385
+ // node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.2_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/mcp-server.js
11386
11386
  /**
11387
11387
  * Experimental McpServer task features for MCP SDK.
11388
11388
  * WARNING: These APIs are experimental and may change without notice.
@@ -11412,7 +11412,7 @@ var ExperimentalMcpServerTasks = class {
11412
11412
  return this._mcpServer._createRegisteredTool(name, config.title, config.description, config.inputSchema, config.outputSchema, config.annotations, execution, config._meta, handler);
11413
11413
  }
11414
11414
  };
11415
- // node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js
11415
+ // node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.2_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js
11416
11416
  function toolInputElementCount(value, max) {
11417
11417
  let count = 0;
11418
11418
  const stack = [value];
@@ -11454,6 +11454,9 @@ var McpServer = class {
11454
11454
  this._promptHandlersInitialized = false;
11455
11455
  this.server = new Server(serverInfo, options);
11456
11456
  this._maxToolInputElements = resolveMaxToolInputElements(options?.maxToolInputElements);
11457
+ if (options?.capabilities?.tools) this.setToolRequestHandlers();
11458
+ if (options?.capabilities?.resources) this.setResourceRequestHandlers();
11459
+ if (options?.capabilities?.prompts) this.setPromptRequestHandlers();
11457
11460
  }
11458
11461
  /**
11459
11462
  * Access experimental features.
@@ -12095,7 +12098,7 @@ function deserializeMessage(line) {
12095
12098
  function serializeMessage(message) {
12096
12099
  return JSON.stringify(message) + "\n";
12097
12100
  }
12098
- // node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
12101
+ // node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.2_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
12099
12102
  /**
12100
12103
  * Server transport for stdio: this communicates with an MCP client by reading from the current process' stdin and writing to stdout.
12101
12104
  *
@@ -41029,6 +41032,17 @@ const PROSE = [
41029
41032
  "quote",
41030
41033
  "prop"
41031
41034
  ];
41035
+ const SENTENCE_KINDS = [
41036
+ "paragraph",
41037
+ "quote",
41038
+ "prop",
41039
+ "list"
41040
+ ];
41041
+ const RHYTHM_KINDS = [
41042
+ "paragraph",
41043
+ "quote",
41044
+ "prop"
41045
+ ];
41032
41046
  const ALL = [
41033
41047
  "paragraph",
41034
41048
  "list",
@@ -41282,7 +41296,7 @@ const PHRASE_RULES = [
41282
41296
  id: "significance-inflation",
41283
41297
  family: "ai",
41284
41298
  level: "error",
41285
- description: "Importance puffery: \"plays a crucial role\", \"marks a pivotal moment\", \"a testament to\".",
41299
+ description: "Importance puffery: \"plays a crucial role\", \"marks a pivotal moment\", \"a testament to\", \"the part that really matters\".",
41286
41300
  patterns: [
41287
41301
  /\bplays? an? (?:crucial|pivotal|vital|key|significant|critical|central|important|major) role\b/gi,
41288
41302
  /\b(?:marks?|marking|represents?|signals?) an? (?:pivotal|significant|important|major|defining|watershed|key) (?:moment|shift|turning point|milestone|step)\b/gi,
@@ -41301,8 +41315,11 @@ const PHRASE_RULES = [
41301
41315
  /\b(?:a|another) (?:major|key|significant|important|huge|big|proud) milestone\b/gi,
41302
41316
  /\bbuilding a better (?:future|world|tomorrow)\b/gi,
41303
41317
  /\bthe implications are (?:profound|significant|enormous|huge|far-reaching)\b/gi,
41304
- /\b(?:is|was) an (?:event|experience|attraction) in itself\b/gi
41318
+ /\b(?:is|was) an (?:event|experience|attraction) in itself\b/gi,
41319
+ /\b(?:answers|asks|addresses) the (?:actual|real) question\b/gi,
41320
+ /\bthe (?:one |only )?(?:part|bit|thing|piece|step|number|leg|detail|line|row) that (?:actually|really|truly) (?:matters|counts)\b/gi
41305
41321
  ],
41322
+ levelFor: (match) => /question|that (?:actually|really|truly)/i.test(match.text) ? "warning" : void 0,
41306
41323
  message: "It inflates importance without saying what changed.",
41307
41324
  fix: "Cut it, or name the concrete effect the text already states. Do not add a number that is not there."
41308
41325
  },
@@ -41310,9 +41327,9 @@ const PHRASE_RULES = [
41310
41327
  id: "participle-tail",
41311
41328
  family: "ai",
41312
41329
  level: "error",
41313
- description: "A sentence that ends on \", highlighting/underscoring/showcasing ...\" commentary.",
41330
+ description: "A sentence that ends on \", highlighting/underscoring/suggesting ...\" commentary.",
41314
41331
  kinds: PROSE,
41315
- patterns: [/,\s+(?:highlighting|underscoring|emphasi[sz]ing|showcasing|symboli[sz]ing|solidifying|cementing|signall?ing|reinforcing|fostering|cultivating|paving the way|setting the stage|demonstrating|illustrating|reflecting|ensuring|marking|contributing to)\b[^.!?]{0,120}[.!?]?/gi, /,\s+(?:giving (?:users|teams|customers|small teams|every \w+|people) (?:a|an|the|more)\b|freeing (?:you|them|up)\b|making it (?:easy|easier|simple|simpler|effortless|possible) (?:for|to)\b|creating an? (?:[\w-]+ )?(?:experience|panorama|atmosphere|sense)\b|delivering (?:real-time|accurate|predictions|reliable|a seamless|an intuitive)\b)[^.!?]{0,120}[.!?]?/gi],
41332
+ patterns: [/,\s+(?:highlighting|underscoring|emphasi[sz]ing|showcasing|symboli[sz]ing|solidifying|cementing|signall?ing|reinforcing|fostering|cultivating|paving the way|setting the stage|suggesting|demonstrating|illustrating|reflecting|ensuring|marking|contributing to)\b[^.!?]{0,120}[.!?]?/gi, /,\s+(?:giving (?:users|teams|customers|small teams|every \w+|people) (?:a|an|the|more)\b|freeing (?:you|them|up)\b|making it (?:easy|easier|simple|simpler|effortless|possible) (?:for|to)\b|creating an? (?:[\w-]+ )?(?:experience|panorama|atmosphere|sense)\b|delivering (?:real-time|accurate|predictions|reliable|a seamless|an intuitive)\b)[^.!?]{0,120}[.!?]?/gi],
41316
41333
  levelFor: (match) => /^,\s+(?:reflecting|ensuring|marking|contributing|demonstrating|illustrating|giving|freeing|making|creating|delivering)/i.test(match.text) ? "warning" : void 0,
41317
41334
  message: "The \", highlighting ...\" tail comments on the sentence instead of adding a fact.",
41318
41335
  fix: "End the sentence at the comma. If the tail holds a real fact, give it its own sentence with a subject and verb."
@@ -41425,6 +41442,7 @@ const PHRASE_RULES = [
41425
41442
  /\bpunch(?:es|ing)? (?:well )?above (?:its|their|his|her) weight\b/gi,
41426
41443
  /\b(?:thrilled|delighted) to (?:announce|share|introduce|unveil)\b/gi,
41427
41444
  /\bthe (?:whole|entire) point\b/gi,
41445
+ /\bthe only (?:[\w-]+ ){1,3}(?:I|we) (?:actually |really |still )?trust\b/gi,
41428
41446
  /,? which is (?:the (?:whole |real |entire )?point|exactly the point|kind of the point)\b/gi
41429
41447
  ],
41430
41448
  message: (match) => `"${match.text}" is a stock phrase that would fit any page.`,
@@ -41549,6 +41567,16 @@ const PHRASE_RULES = [
41549
41567
  message: "Two hedges where one, or none, would do.",
41550
41568
  fix: "Keep one qualifier, or state what the evidence shows."
41551
41569
  },
41570
+ {
41571
+ id: "false-range",
41572
+ family: "ai",
41573
+ level: "error",
41574
+ kinds: PROSE,
41575
+ description: "Stacked \"from X to Y\" ranges that sound broad but name no scale: \"from the Big Bang to the cosmic web, from stars to dark matter\".",
41576
+ patterns: [/\bfrom [^,.;:!?\n]{1,40} to [^,.;:!?\n]{1,40},\s+(?:and )?from [^,.;:!?\n]{1,40} to [^,.;:!?\n]{1,40}/gi],
41577
+ message: "Two \"from X to Y\" ranges in a row cover everything and say nothing.",
41578
+ fix: "Name the specific things the text covers, or cut the ranges."
41579
+ },
41552
41580
  {
41553
41581
  id: "colon-reveal",
41554
41582
  family: "ai",
@@ -41607,27 +41635,30 @@ const PHRASE_RULES = [
41607
41635
  family: "ai",
41608
41636
  level: "error",
41609
41637
  kinds: PROSE,
41610
- description: "A one-line denial used as a beat: \"It isn't.\" \"Not quite.\" \"But only part.\"",
41638
+ description: "A one-line denial used as a beat: \"It isn't.\" \"Not quite.\" \"The sixth is not.\" \"; the data didn't.\"",
41611
41639
  patterns: [
41612
41640
  /(?:^|[.!?:]\s+)(?:It|That|This|They|He|She|We) (?:isn't|wasn't|doesn't|didn't|won't|aren't|weren't|is not|was not|does not|did not)\.(?=\s|$)/g,
41613
41641
  /(?:^|[.!?:]\s+)(?:Not quite|Not even close|Not really|Not anymore|Not any more)\.(?=\s|$)/g,
41614
- /(?:^|[.!?:]\s+)(?:But|And) only (?:part|half|some|partly)\.(?=\s|$)/g
41642
+ /(?:^|[.!?:]\s+)(?:But|And) only (?:part|half|some|partly)\.(?=\s|$)/g,
41643
+ /(?:^|[.!?]\s+)The (?:[\w-]+ ){0,1}[\w-]+ (?:isn't|wasn't|doesn't|didn't|won't|aren't|weren't|hasn't|haven't|is not|was not|does not|did not|are not|were not|has not)\.(?=\s|$)/g,
41644
+ /;\s+(?:the|its|their|our|your) (?:[\w-]+ ){0,1}[\w-]+ (?:isn't|wasn't|doesn't|didn't|won't|aren't|weren't|hasn't|haven't|is not|was not|does not|did not|are not|were not|has not)\.(?=\s|$)/gi
41615
41645
  ],
41616
- message: "A two-word denial used for rhythm. It makes the reader wait.",
41617
- fix: "Join it to the sentence before, so the point is stated once."
41646
+ message: "A bare denial used for rhythm. It makes the reader wait.",
41647
+ fix: "Join it to the sentence before and name the thing, so the point is stated once."
41618
41648
  },
41619
41649
  {
41620
41650
  id: "strawman",
41621
41651
  family: "ai",
41622
41652
  level: "error",
41623
41653
  kinds: PROSE,
41624
- description: "An answer to an objection nobody raised: \"It isn't perfect.\", \"doesn't have to be stressful\", \"None of this means\", \"This isn't about\".",
41654
+ description: "An answer to an objection nobody raised: \"It isn't perfect.\", \"doesn't have to be stressful\", \"None of this means\", \"This isn't about\", \"is the obvious reading, and it is wrong\".",
41625
41655
  patterns: [
41626
41656
  /(?:^|[.!?:]\s+)(?:It|This|That|Nothing|No \w+)(?:'s| is|'s not| isn't| is not| wasn't| was not) (?:not )?perfect\.(?=\s|$)/g,
41627
41657
  /\b(?:doesn't|does not|don't|do not|needn't|need not) (?:have to |need to )?be (?:so )?(?:stressful|hard|complicated|difficult|painful|expensive|overwhelming|a chore|scary|intimidating|daunting|confusing|a headache)\b/gi,
41628
41658
  /(?:^|[.!?]\s)None of this means\b/g,
41629
41659
  /(?:^|[.!?]\s)(?:This|That|It)(?: isn't| is not|'s not) (?:just |really |only )?about\b/g,
41630
- /\b(?:isn't|is not|ain't) rocket science\b/gi
41660
+ /\b(?:isn't|is not|ain't) rocket science\b/gi,
41661
+ /\bis the (?:obvious|natural|easy|tempting|intuitive|common|usual|first) (?:reading|answer|interpretation|explanation|assumption|guess|conclusion|take)(?:,)? (?:and|but) (?:it(?:'s| is| was)|that(?:'s| is)) (?:wrong|mistaken|backwards|not (?:quite )?right)\b/gi
41631
41662
  ],
41632
41663
  message: "It answers a doubt the reader did not raise.",
41633
41664
  fix: "Cut it, or state the limit or the point plainly as a fact."
@@ -41888,7 +41919,7 @@ const SEO_RULES = {
41888
41919
  family: "copy",
41889
41920
  level: "error",
41890
41921
  presets: { docs: "warning" },
41891
- description: "Headings that label instead of telling: \"Overview\", \"Key takeaways\", \"Why it matters\", \"The ultimate guide\"."
41922
+ description: "Headings that label instead of telling, or tease: \"Overview\", \"Key takeaways\", \"Why it matters\", 'What \"exhausted\" means', \"X is dead\"."
41892
41923
  },
41893
41924
  emoji: {
41894
41925
  id: "emoji",
@@ -41960,6 +41991,7 @@ function lengths(ctx) {
41960
41991
  }
41961
41992
  }
41962
41993
  const HEADING_CLICHE = /^(?:a )?(?:deep dive|under the hood|demystifying\b|why (?:it|this|that) matters|a closer look|the ultimate guide|everything you need to know|mastering\b|unlocking\b|the power of\b|the future of\b|what you'll learn|key takeaways|final thoughts|wrapping up|conclusion|in conclusion|tl;?dr|overview|introduction|the road ahead|looking ahead|challenges and (?:legacy|opportunities|future)|future outlook|the bottom line|let's dive in|get started today|(?:the )?(?:challenge|solution|results?)$|at a glance$|first impressions$|a note of thanks$)/i;
41994
+ const HEADING_COY = /^(?:what "[^"]{1,40}" (?:really |actually )?means$|[^?]{1,60} is dead$|the one [\w-]+ (?:that|which|you|we)\b)/i;
41963
41995
  function headings(ctx) {
41964
41996
  const list = ctx.blocks(["heading"]);
41965
41997
  const h1s = list.filter((block) => block.level === 1);
@@ -41969,7 +42001,8 @@ function headings(ctx) {
41969
42001
  const level = block.level ?? 2;
41970
42002
  if (previous && level > previous + 1) ctx.hit(SEO_RULES.headingSkip, block, 0, block.text.length, `This H${level} follows an H${previous}.`, `Make it an H${previous + 1}, or add the missing level above it.`);
41971
42003
  previous = level;
41972
- if (HEADING_CLICHE.test(block.norm)) ctx.hit(SEO_RULES.headingCliche, block, 0, block.text.length, "A heading that labels the section instead of saying what is in it.", "Name what the section tells the reader, such as \"Check coverage before trusting the count\".");
42004
+ const coy = HEADING_COY.test(block.norm);
42005
+ if (coy || HEADING_CLICHE.test(block.norm)) ctx.hit(SEO_RULES.headingCliche, block, 0, block.text.length, coy ? "A heading that teases or announces a verdict instead of saying what is in the section." : "A heading that labels the section instead of saying what is in it.", "Name what the section tells the reader, such as \"Check coverage before trusting the count\".");
41973
42006
  }
41974
42007
  }
41975
42008
  const EMOJI = /^\p{Extended_Pictographic}/u;
@@ -42086,94 +42119,8 @@ function runSeoRules(ctx) {
42086
42119
  heroLength(ctx);
42087
42120
  reviews(ctx);
42088
42121
  }
42089
- // packages/core/dist/lint/rules-structure.js
42090
- const SENTENCE_KINDS = [
42091
- "paragraph",
42092
- "quote",
42093
- "prop",
42094
- "list"
42095
- ];
42096
- const RHYTHM_KINDS = [
42097
- "paragraph",
42098
- "quote",
42099
- "prop"
42100
- ];
42101
- const STRUCTURE_RULES = {
42102
- negativeParallelism: {
42103
- id: "negative-parallelism",
42104
- family: "ai",
42105
- level: "error",
42106
- description: "\"It isn't X, it's Y\" and \"isn't just X. It's Y.\" reframes."
42107
- },
42108
- contrastReframe: {
42109
- id: "contrast-reframe",
42110
- family: "ai",
42111
- level: "error",
42112
- presets: { docs: "warning" },
42113
- description: "A trailing \", not X\" or \"rather than X\" contrast added for drama: \"The fix is in the template, not in 600 posts.\""
42114
- },
42115
- heresAnnouncement: {
42116
- id: "heres-announcement",
42117
- family: "ai",
42118
- level: "error",
42119
- presets: { docs: "off" },
42120
- description: "A short \"Here's the X\" sentence that announces what comes next instead of saying it."
42121
- },
42122
- pithyFragment: {
42123
- id: "pithy-fragment",
42124
- family: "ai",
42125
- level: "error",
42126
- description: "Verbless slogan fragments: \"Same essay, two titles.\", \"Every month. No exceptions.\", \"$299 per month. That's it.\""
42127
- },
42128
- stockCloser: {
42129
- id: "stock-closer",
42130
- family: "ai",
42131
- level: "error",
42132
- description: "A stock kicker line: \"That's a real win.\" \"That is what makes this interesting.\""
42133
- },
42134
- negativeReframe: {
42135
- id: "negative-reframe",
42136
- family: "ai",
42137
- level: "warning",
42138
- description: "A short \"That's not how/what ...\" dismissal."
42139
- },
42140
- figurativeWorth: {
42141
- id: "figurative-worth",
42142
- family: "ai",
42143
- level: "error",
42144
- description: "A \"worth + -ing\" idiom that mixes its metaphor or points at the reader: \"a fight worth picking\", \"worth noting\"."
42145
- },
42146
- anaphora: {
42147
- id: "anaphora",
42148
- family: "ai",
42149
- level: "error",
42150
- description: "Short sentences in a row that start with the same word: two or more \"No ...\" sentences, or three or more starting \"It's\", \"They\", \"We\" or \"You\"."
42151
- },
42152
- vocabularyCluster: {
42153
- id: "ai-vocabulary-cluster",
42154
- family: "ai",
42155
- level: "warning",
42156
- description: "Two or more words such as crucial, pivotal, foster, landscape or journey in one paragraph."
42157
- },
42158
- triad: {
42159
- id: "triad",
42160
- family: "ai",
42161
- level: "warning",
42162
- presets: { docs: "off" },
42163
- description: "Formula triads: three parallel clauses (\"It is cheap, it is reversible, and it works\"), three items that open with the same word, three adjectives after \"is\", or three abstract nouns. Plain lists of three are left alone."
42164
- },
42165
- inventedLabel: {
42166
- id: "invented-label",
42167
- family: "ai",
42168
- level: "warning",
42169
- description: "Two or more coined labels such as \"the integration tax\" or \"the supervision paradox\"."
42170
- },
42171
- pseudoCleft: {
42172
- id: "pseudo-cleft",
42173
- family: "ai",
42174
- level: "warning",
42175
- description: "Repeated \"What makes this work is ...\" or \"The problem is that ...\" setups."
42176
- },
42122
+ // packages/core/dist/lint/rules-bold.js
42123
+ const BOLD_RULES = {
42177
42124
  boldEmphasis: {
42178
42125
  id: "bold-emphasis",
42179
42126
  family: "ai",
@@ -42189,7 +42136,87 @@ const STRUCTURE_RULES = {
42189
42136
  family: "ai",
42190
42137
  level: "warning",
42191
42138
  presets: { docs: "off" },
42192
- description: "Three or more list items in a row that open with a bold label."
42139
+ description: "Three or more list items in a row that open with a bold label, or one whose label the item then repeats: \"**Performance:** Performance has been improved.\""
42140
+ }
42141
+ };
42142
+ const RESTATED = /^\s*(?:[-*+]|\d{1,9}[.)])\s+(?:\*\*|__)(?:[^*_\n]{0,30}\s)?([a-z]{4})[^*_\s]*(?:\*\*|__)\s*[:.]?\s+\1/i;
42143
+ function boldLabels(ctx) {
42144
+ const rule = BOLD_RULES.boldLabels;
42145
+ if (ctx.level(rule) === "off") return;
42146
+ if (ctx.doc.format !== "md" && ctx.doc.format !== "mdx") return;
42147
+ const lists = ctx.blocks(["list"]);
42148
+ let run = [];
42149
+ const report = () => {
42150
+ if (run.length >= 3) {
42151
+ const first = run[0];
42152
+ ctx.hit(rule, first, 0, Math.min(first.text.length, 60), `${run.length} list items in a row open with a bold label.`, "Drop the bold labels and write each item as one plain sentence, or use a table if the items really are parallel.");
42153
+ }
42154
+ run = [];
42155
+ };
42156
+ let previous = null;
42157
+ for (const block of lists) {
42158
+ const offset = block.map[0] ?? 0;
42159
+ const line = ctx.doc.source.lastIndexOf("\n", offset) + 1;
42160
+ const raw = ctx.doc.source.slice(line, offset + 4);
42161
+ const bold = /^\s*(?:[-*+]|\d{1,9}[.)])\s+(?:\*\*|__)/.test(raw);
42162
+ if (bold && RESTATED.test(ctx.doc.source.slice(line, line + 200))) ctx.hit(rule, block, 0, Math.min(block.text.length, 60), "The item repeats its bold label.", "Drop the label and keep the sentence, or cut the repeat.");
42163
+ const adjacent = previous !== null && ctx.doc.blocks.indexOf(block) === ctx.doc.blocks.indexOf(previous) + 1;
42164
+ if (!bold || !adjacent) report();
42165
+ if (bold) run.push(block);
42166
+ previous = block;
42167
+ }
42168
+ report();
42169
+ }
42170
+ function boldEmphasis(ctx) {
42171
+ const rule = BOLD_RULES.boldEmphasis;
42172
+ if (ctx.level(rule) === "off") return;
42173
+ const markdown = ctx.doc.format === "md" || ctx.doc.format === "mdx";
42174
+ const re = markdown ? /(\*\*|__)(?=\S)[^*_\n]+?\1/g : /<(strong|b)\b[^>]*>[^<]{1,200}<\/\1>/gi;
42175
+ const prose = ctx.blocks([
42176
+ "paragraph",
42177
+ "list",
42178
+ "quote",
42179
+ "prop"
42180
+ ]);
42181
+ const spans = [];
42182
+ for (const found of ctx.doc.source.matchAll(re)) {
42183
+ const open = markdown ? 2 : found[0].indexOf(">") + 1;
42184
+ const from = (found.index ?? 0) + open;
42185
+ const to = (found.index ?? 0) + found[0].length - (markdown ? 2 : found[0].length - found[0].lastIndexOf("<"));
42186
+ for (const block of prose) {
42187
+ const first = block.map[0] ?? 0;
42188
+ const last = block.map[block.map.length - 1] ?? 0;
42189
+ if (from < first || from > last) continue;
42190
+ const start = block.map.indexOf(from);
42191
+ if (start <= 0 && block.kind === "list") break;
42192
+ if (start < 0) break;
42193
+ let end = start;
42194
+ while (end < block.map.length && (block.map[end] ?? 0) < to) end++;
42195
+ spans.push({
42196
+ block,
42197
+ start,
42198
+ end
42199
+ });
42200
+ break;
42201
+ }
42202
+ }
42203
+ if (spans.length < 3 || spans.length * 100 <= ctx.proseWords) return;
42204
+ for (const span of spans) ctx.hit(rule, span.block, span.start, span.end, `${spans.length} bold phrases in ${ctx.proseWords.toLocaleString("en-US")} words of prose. Bold this often stops meaning "important".`, "Remove the bold here. Keep bold, if any, for the one thing a skimming reader must not miss.");
42205
+ }
42206
+ // packages/core/dist/lint/rules-contrast.js
42207
+ const CONTRAST_RULES = {
42208
+ negativeParallelism: {
42209
+ id: "negative-parallelism",
42210
+ family: "ai",
42211
+ level: "error",
42212
+ description: "\"It isn't X, it's Y\" and \"isn't just X. It's Y.\" reframes."
42213
+ },
42214
+ contrastReframe: {
42215
+ id: "contrast-reframe",
42216
+ family: "ai",
42217
+ level: "error",
42218
+ presets: { docs: "warning" },
42219
+ description: "A trailing \", not X\" or \"rather than X\" contrast added for drama: \"The fix is in the template, not in 600 posts.\""
42193
42220
  }
42194
42221
  };
42195
42222
  const NEG = "(?:\\b(?:is|are|was|were)(?:n't|\\s+not)\\b|\\b(?:it|this|that|they|we|you)(?:'s|'re)\\s+not\\b)";
@@ -42210,6 +42237,10 @@ const PARALLEL = [
42210
42237
  kind: "split",
42211
42238
  re: new RegExp(`${NEG}\\s+(?:${MINIMIZER}\\s+)?${BODY}[.!]\\s+${RESTATE}`, "gi")
42212
42239
  },
42240
+ {
42241
+ kind: "repeated",
42242
+ re: new RegExp(`(?<=^|[.!?]\\s+)(The\\s+(?:[\\w-]+\\s+){0,2}?[\\w-]+)\\s+(?:is|are|was|were)(?:n't|\\s+not)\\s+${BODY}[.!]\\s+\\1\\s+(?:is|are|was|were)\\b`, "gi")
42243
+ },
42213
42244
  {
42214
42245
  kind: "joined",
42215
42246
  re: new RegExp(`${NEG}\\s+${BODY}${JOIN}${RESTATE}`, "gi")
@@ -42217,7 +42248,7 @@ const PARALLEL = [
42217
42248
  ];
42218
42249
  const FRAMING = /^(?:the |this |that |our |my |your )?(?:real )?(?:problem|question|answer|issue|point|goal|story|bottleneck|fix|difference|trick|lesson|catch|risk|gap|win|work|job|key|opportunity|plan|idea|value)\b/i;
42219
42250
  function negativeParallelism(ctx) {
42220
- const rule = STRUCTURE_RULES.negativeParallelism;
42251
+ const rule = CONTRAST_RULES.negativeParallelism;
42221
42252
  for (const block of ctx.blocks(SENTENCE_KINDS)) {
42222
42253
  const sentences = ctx.sentences(block);
42223
42254
  const taken = [];
@@ -42234,14 +42265,14 @@ function negativeParallelism(ctx) {
42234
42265
  const pronoun = /^(?:but |and |so )?(?:it|this|that|they)?$/i.test(subject.replace(/(?:'s|'re)$/, ""));
42235
42266
  const firstWords = words$2(block.norm.slice(sentence.start, end)).length;
42236
42267
  let level = "warning";
42237
- if (kind === "reveal" || kind === "about") level = "error";
42268
+ if (kind === "reveal" || kind === "about" || kind === "repeated") level = "error";
42238
42269
  else if (FRAMING.test(subject)) level = "error";
42239
42270
  else if (pronoun && (kind === "joined" || firstWords <= 10)) level = "error";
42240
42271
  const after = sentenceAt(sentences, end - 1);
42241
42272
  const restate = /(?:it|this|that|they)(?:'s|'re|\s+(?:is|are|was|were))$/i.exec(found[0]);
42242
42273
  const from = restate ? end - restate[0].length : end;
42243
42274
  const second = block.text.slice(from, after.end).trim();
42244
- const fix = second ? `Drop the "isn't" half and state the claim: "${second.charAt(0).toUpperCase()}${second.slice(1)}"` : "Drop the \"isn't\" half and state the claim once.";
42275
+ const fix = kind === "repeated" ? `Drop the "isn't" sentence and keep the claim: "${block.text.slice(after.start, after.end).trim()}"` : second ? `Drop the "isn't" half and state the claim: "${second.charAt(0).toUpperCase()}${second.slice(1)}"` : "Drop the \"isn't\" half and state the claim once.";
42245
42276
  const concession = (/,\s*but\s+(?:[\w']+\s*){1,3}$/i.test(found[0]) || /^(?:while|although|though|even though)\b/i.test(subject)) && kind !== "reveal";
42246
42277
  if (level === "warning" && firstWords > 12 || concession) {
42247
42278
  ctx.review("contrast", block, sentence.start, Math.max(after.end, end), "Does this \"isn't X ... it's Y\" correct something a reader would really think? If not, state the claim once.");
@@ -42281,7 +42312,7 @@ function gerund(word) {
42281
42312
  }
42282
42313
  const NOT_JUST = /,\s+not (?:just|merely|simply) [^,.;:!?]{1,50}[.!?]?$|\bnot (?:just|merely|simply) [^,.;:!?]{1,50},? but\b/i;
42283
42314
  function contrastReframe(ctx) {
42284
- const rule = STRUCTURE_RULES.contrastReframe;
42315
+ const rule = CONTRAST_RULES.contrastReframe;
42285
42316
  if (ctx.level(rule) === "off") return;
42286
42317
  for (const block of ctx.blocks([...SENTENCE_KINDS, "heading"])) for (const sentence of ctx.sentences(block)) {
42287
42318
  const text = sentence.text;
@@ -42325,8 +42356,227 @@ function contrastReframe(ctx) {
42325
42356
  }
42326
42357
  }
42327
42358
  }
42359
+ // packages/core/dist/lint/rules-counted.js
42360
+ const COUNTED_RULES = {
42361
+ vocabularyCluster: {
42362
+ id: "ai-vocabulary-cluster",
42363
+ family: "ai",
42364
+ level: "warning",
42365
+ description: "Two or more words such as crucial, pivotal, foster, landscape or journey in one paragraph."
42366
+ },
42367
+ triad: {
42368
+ id: "triad",
42369
+ family: "ai",
42370
+ level: "warning",
42371
+ presets: { docs: "off" },
42372
+ description: "Formula triads: three parallel clauses (\"It is cheap, it is reversible, and it works\"), three items that open with the same word, three adjectives after \"is\", or three abstract nouns. Plain lists of three are left alone."
42373
+ },
42374
+ inventedLabel: {
42375
+ id: "invented-label",
42376
+ family: "ai",
42377
+ level: "warning",
42378
+ description: "Two or more coined labels such as \"the integration tax\" or \"the supervision paradox\"."
42379
+ },
42380
+ colonDensity: {
42381
+ id: "colon-density",
42382
+ family: "ai",
42383
+ level: "warning",
42384
+ description: "Colons used mid-sentence as a pause or lead-in, three or more per 1,000 words. One is ordinary; a piece full of them reads as AI."
42385
+ },
42386
+ pseudoCleft: {
42387
+ id: "pseudo-cleft",
42388
+ family: "ai",
42389
+ level: "warning",
42390
+ description: "Repeated \"What makes this work is ...\" or \"The problem is that ...\" setups."
42391
+ }
42392
+ };
42393
+ const TIER2 = /\b(?:crucial(?:ly)?|pivotal|vibrant|comprehensive|enhanc(?:e|es|ed|ing|ement)|foster(?:s|ed|ing)?|harness(?:es|ed|ing)?|navigat(?:e|es|ed|ing)|streamlin(?:e|es|ed|ing)|empower(?:s|ed|ing|ment)?|elevat(?:e|es|ed|ing)|unleash(?:es|ed|ing)?|transformative|nuanced?|myriad|plethora|encompass(?:es|ed|ing)?|cultivat(?:e|es|ed|ing)|resonat(?:e|es|ed|ing)|cornerstone|poised|burgeoning|nascent|quintessential|overarching|actionable|impactful|landscape|ecosystem|journey|additionally|notably|moreover|furthermore|profound(?:ly)?|quietly|fundamentally|remarkabl[ey]|arguably|invaluable|deeply (?:rooted|committed|integrated|personal|meaningful))\b/gi;
42394
+ const TECHNICAL = /^(?:comprehensive|ecosystem|streamlin|navigat)/i;
42395
+ function vocabularyCluster(ctx) {
42396
+ const rule = COUNTED_RULES.vocabularyCluster;
42397
+ if (ctx.level(rule) === "off") return;
42398
+ for (const block of ctx.blocks([
42399
+ "paragraph",
42400
+ "list",
42401
+ "quote",
42402
+ "prop",
42403
+ "heading",
42404
+ "description",
42405
+ "title"
42406
+ ])) {
42407
+ const seen = /* @__PURE__ */ new Map();
42408
+ TIER2.lastIndex = 0;
42409
+ for (const found of block.norm.matchAll(TIER2)) {
42410
+ const word = found[0].toLowerCase();
42411
+ if (ctx.preset === "docs" && TECHNICAL.test(word)) continue;
42412
+ const stem = word.slice(0, 6);
42413
+ const start = found.index ?? 0;
42414
+ if (ctx.preset === "landing" || ctx.preset === "meta") {
42415
+ ctx.hit(rule, block, start, start + found[0].length, `"${found[0]}" is filler in short copy.`, "Use the plain word, or the concrete thing it stands for.");
42416
+ continue;
42417
+ }
42418
+ if (!seen.has(stem)) seen.set(stem, start);
42419
+ if (seen.size === 2 && !seen.has(`${stem}!`)) {
42420
+ seen.set(`${stem}!`, start);
42421
+ const listed = [...seen.keys()].filter((key) => !key.endsWith("!"));
42422
+ ctx.hit(rule, block, start, start + found[0].length, `This paragraph stacks words common in AI text (${listed.length} of them, ending with "${found[0]}").`, "Rewrite with plain words: \"important\" for crucial, \"help\" for foster, \"field\" for landscape, or cut them.");
42423
+ }
42424
+ }
42425
+ }
42426
+ }
42427
+ const SERIES = /\b[\w'$-]+(?: [\w'$-]+){0,5}(?:, [\w'$-]+(?: [\w'$-]+){0,5}){1,3},? (?:and|or) [\w'$-]+(?: [\w'$-]+){0,5}/g;
42428
+ const ABSTRACT_TRIAD = /\b[a-z]+(?:tion|sion|ity|ness|ment|ence|ance|ism), (?:and )?[a-z]+(?:tion|sion|ity|ness|ment|ence|ance|ism),? and [a-z]+(?:tion|sion|ity|ness|ment|ence|ance|ism)\b/gi;
42429
+ const ECHO = new Set("to our your their my his her its every each more less no it they we you".split(" "));
42430
+ const COPULA = /\b(?:is|are|was|were|'s|feels?|felt|looks?|stays?|remains?|seems?)\s+$/i;
42431
+ function formulaTriad(items, before) {
42432
+ const firsts = items.map((item) => words$2(item)[0]?.toLowerCase() ?? "");
42433
+ const echo = firsts[0] ?? "";
42434
+ if (ECHO.has(echo) && firsts.every((first) => first === echo)) return `Each item opens with "${echo}".`;
42435
+ if (items.every((item) => /^(?:the|their|our|your|its|it|they|we|you|he|she)\b/i.test(item) && words$2(item).length >= 3 && words$2(item).length <= 7 && !verbless(item))) return "Three parallel clauses in a row.";
42436
+ if (items.every((item) => /^[a-z]/.test(item) && words$2(item).length <= 2 && !PREPOSITIONS.has(words$2(item)[0] ?? "")) && COPULA.test(before)) return "A string of adjectives after \"is\".";
42437
+ if (items.every((item) => /^\w+ed\b/i.test(item) && words$2(item).length <= 3)) return "A string of past participles.";
42438
+ return null;
42439
+ }
42440
+ function triads(ctx) {
42441
+ const rule = COUNTED_RULES.triad;
42442
+ if (ctx.level(rule) === "off") return;
42443
+ for (const block of ctx.blocks([
42444
+ "paragraph",
42445
+ "quote",
42446
+ "prop",
42447
+ "list"
42448
+ ])) {
42449
+ const taken = [];
42450
+ ABSTRACT_TRIAD.lastIndex = 0;
42451
+ for (const match of block.norm.matchAll(ABSTRACT_TRIAD)) {
42452
+ const start = match.index ?? 0;
42453
+ taken.push([start, start + match[0].length]);
42454
+ ctx.hit(rule, block, start, start + match[0].length, "Three abstract nouns in a row sound weighty but say little.", "Keep the one that matters and give an example of it.");
42455
+ }
42456
+ for (const sentence of ctx.sentences(block)) {
42457
+ SERIES.lastIndex = 0;
42458
+ for (const match of sentence.text.matchAll(SERIES)) {
42459
+ let from = match.index ?? 0;
42460
+ const raw = match[0].split(/,\s*(?:(?:and|or)\s+)?|\s+(?:and|or)\s+(?=[^,]*$)/);
42461
+ if (raw.length < 3) continue;
42462
+ const items = [...raw];
42463
+ const head = raw[0] ?? "";
42464
+ const lead = /^.*\b(?:is|are|was|were|'s|feels?|looks?|stays?|remains?|seems?|of|for|to|with|by|from|on|in|like|including|as)\s+/i.exec(head);
42465
+ if (lead && words$2(head.slice(lead[0].length)).length) {
42466
+ items[0] = head.slice(lead[0].length);
42467
+ from += lead[0].length;
42468
+ }
42469
+ const end = sentence.start + (match.index ?? 0) + match[0].length;
42470
+ const before = block.norm.slice(sentence.start, sentence.start + from);
42471
+ const echo = words$2(raw[1] ?? "")[0]?.toLowerCase() ?? "";
42472
+ const inFirst = new RegExp(`\\b${echo}\\b(?!.*\\b${echo}\\b)`, "i").exec(head);
42473
+ if (ECHO.has(echo) && inFirst && inFirst.index > 0) {
42474
+ items[0] = head.slice(inFirst.index);
42475
+ from = (match.index ?? 0) + inFirst.index;
42476
+ }
42477
+ const plain = formulaTriad(raw, "");
42478
+ const why = plain ?? formulaTriad(items, before);
42479
+ if (!why) continue;
42480
+ if (plain) from = match.index ?? 0;
42481
+ const start = sentence.start + from;
42482
+ if (taken.some(([a, b]) => start < b && end > a)) continue;
42483
+ taken.push([start, end]);
42484
+ ctx.hit(rule, block, start, end, `A list of ${items.length} that reads as a formula. ${why}`, "Keep the items the reader needs. If all of them are needed, write them plainly or as two sentences; if one was added for rhythm, cut it.");
42485
+ }
42486
+ }
42487
+ }
42488
+ }
42489
+ function countedPatterns(ctx) {
42490
+ const labels = COUNTED_RULES.inventedLabel;
42491
+ const clefts = COUNTED_RULES.pseudoCleft;
42492
+ for (const [rule, re] of [[labels, /\bthe [a-z]+(?:-[a-z]+)? (?:paradox|trap|tax|creep|divide|vacuum|inversion|cliff|treadmill|illusion|fallacy|flywheel|moat)\b/gi], [clefts, /(?:^|[.!?]\s+)(?:What (?:makes|made|matters|changed|really|actually|you get|this means|I (?:like|love|learned|found))\b[^.!?]{0,40}\s+(?:is|was)\b|The (?:problem|difference|catch|key|trick|point|reason) is that\b)/g]]) {
42493
+ if (ctx.level(rule) === "off") continue;
42494
+ const found = [];
42495
+ for (const block of ctx.blocks(RHYTHM_KINDS)) {
42496
+ re.lastIndex = 0;
42497
+ for (const match of block.norm.matchAll(re)) {
42498
+ let start = match.index ?? 0;
42499
+ while (/[\s.!?]/.test(block.norm[start] ?? "")) start++;
42500
+ found.push({
42501
+ block,
42502
+ start,
42503
+ end: (match.index ?? 0) + match[0].length
42504
+ });
42505
+ }
42506
+ }
42507
+ if (found.length < 2) continue;
42508
+ for (const item of found) ctx.hit(rule, item.block, item.start, item.end, rule === labels ? `${found.length} coined labels in one piece. Each asks the reader to learn a term.` : `${found.length} "What X is" or "The problem is that" setups in one piece.`, rule === labels ? "Describe the thing in plain words instead of naming it." : "Start with the subject and say the thing directly.");
42509
+ }
42510
+ }
42511
+ function colonDensity(ctx) {
42512
+ const rule = COUNTED_RULES.colonDensity;
42513
+ if (ctx.level(rule) === "off") return;
42514
+ const found = [];
42515
+ for (const block of ctx.blocks(SENTENCE_KINDS)) {
42516
+ const sentences = ctx.sentences(block);
42517
+ for (const match of block.norm.matchAll(/:\s+(?=\S)/g)) {
42518
+ const at = match.index ?? 0;
42519
+ const after = block.norm.slice(at + match[0].length);
42520
+ if (/^["'(]/.test(after)) continue;
42521
+ const lead = block.norm.slice(sentenceAt(sentences, at).start, at);
42522
+ if (words$2(lead).length <= 4 && verbless(lead)) continue;
42523
+ const source = block.map[at] ?? -1;
42524
+ if (/^(?:\*\*|__)/.test(ctx.doc.source.slice(source + 1, source + 3)) || /(?:\*\*|__)$/.test(ctx.doc.source.slice(source - 2, source))) continue;
42525
+ if (block.links.some((link) => link.start <= at && link.end > at)) continue;
42526
+ if (insideQuotes(block.norm, at, at + 1)) continue;
42527
+ const clause = after.match(/^(?:[^.!?;]|[.!?](?=\S)){0,60}/)?.[0] ?? "";
42528
+ found.push({
42529
+ block,
42530
+ start: at,
42531
+ end: at + match[0].length + clause.trimEnd().length
42532
+ });
42533
+ }
42534
+ }
42535
+ if (found.length < 4 || found.length * 1e3 < 3 * ctx.proseWords) return;
42536
+ for (const item of found) ctx.hit(rule, item.block, item.start, item.end, `${found.length} mid-sentence colons in ${ctx.proseWords.toLocaleString("en-US")} words. A colon used as a pause in sentence after sentence is a common AI habit.`, "Use a full stop, or join the two parts with a plain word such as \"because\" or \"so\". Keep colons that introduce a list or a quotation.");
42537
+ }
42538
+ // packages/core/dist/lint/rules-rhythm.js
42539
+ const RHYTHM_RULES = {
42540
+ heresAnnouncement: {
42541
+ id: "heres-announcement",
42542
+ family: "ai",
42543
+ level: "error",
42544
+ presets: { docs: "off" },
42545
+ description: "A short \"Here's the X\" sentence that announces what comes next instead of saying it."
42546
+ },
42547
+ pithyFragment: {
42548
+ id: "pithy-fragment",
42549
+ family: "ai",
42550
+ level: "error",
42551
+ description: "Verbless slogan fragments: \"Same essay, two titles.\", \"Every month. No exceptions.\", \"$299 per month. That's it.\""
42552
+ },
42553
+ stockCloser: {
42554
+ id: "stock-closer",
42555
+ family: "ai",
42556
+ level: "error",
42557
+ description: "A stock kicker line: \"That's a real win.\" \"That is what makes this interesting.\" \"That's why X mattered.\""
42558
+ },
42559
+ negativeReframe: {
42560
+ id: "negative-reframe",
42561
+ family: "ai",
42562
+ level: "warning",
42563
+ description: "A short \"That's not how/what ...\" dismissal."
42564
+ },
42565
+ figurativeWorth: {
42566
+ id: "figurative-worth",
42567
+ family: "ai",
42568
+ level: "error",
42569
+ description: "A \"worth + -ing\" idiom that mixes its metaphor or points at the reader: \"a fight worth picking\", \"worth noting\"."
42570
+ },
42571
+ anaphora: {
42572
+ id: "anaphora",
42573
+ family: "ai",
42574
+ level: "error",
42575
+ description: "Short sentences in a row that start with the same word: two or more \"No ...\" sentences, or three or more starting \"It's\", \"They\", \"We\" or \"You\". Also a list written as prose: \"The first wall ... The second wall ... The third wall ...\"."
42576
+ }
42577
+ };
42328
42578
  function heresAnnouncement(ctx) {
42329
- const rule = STRUCTURE_RULES.heresAnnouncement;
42579
+ const rule = RHYTHM_RULES.heresAnnouncement;
42330
42580
  if (ctx.level(rule) === "off") return;
42331
42581
  for (const block of ctx.blocks([
42332
42582
  "paragraph",
@@ -42381,7 +42631,7 @@ function fragmentRuns(ctx, rule) {
42381
42631
  }
42382
42632
  }
42383
42633
  function pithyFragment(ctx) {
42384
- const rule = STRUCTURE_RULES.pithyFragment;
42634
+ const rule = RHYTHM_RULES.pithyFragment;
42385
42635
  if (ctx.level(rule) === "off") return;
42386
42636
  fragmentRuns(ctx, rule);
42387
42637
  for (const block of ctx.blocks(RHYTHM_KINDS)) for (const sentence of ctx.sentences(block)) {
@@ -42404,11 +42654,12 @@ const CLOSERS = [
42404
42654
  /^(?:and |but |so )?(?:that|this)(?:'s| is| was) (?:exactly )?what makes [^.]{1,60}(?:interesting|special|different|powerful|unique|useful|valuable|effective|work|works|matter|compelling|worth \w+)\.$/i,
42405
42655
  /^(?:and |but |so )?(?:that|this)(?:'s| is) (?:why|where|how) (?:it|this|that) (?:matters|counts|works)\.$/i,
42406
42656
  /^(?:and |but )?that distinction matters\.$/i,
42657
+ /^(?:and |but |so )?(?:that|this)(?:'s| is| was) (?:why|what|how) [^.]{1,80} (?:mattered|made (?:all )?the difference|paid off)\.$/i,
42407
42658
  /^(?:and |but )?(?:that|this)(?:'s| is) (?:huge|everything|the whole thing|what matters|all that matters)\.$/i
42408
42659
  ];
42409
42660
  function stockCloser(ctx) {
42410
- const rule = STRUCTURE_RULES.stockCloser;
42411
- const reframe = STRUCTURE_RULES.negativeReframe;
42661
+ const rule = RHYTHM_RULES.stockCloser;
42662
+ const reframe = RHYTHM_RULES.negativeReframe;
42412
42663
  for (const block of ctx.blocks(RHYTHM_KINDS)) for (const sentence of ctx.sentences(block)) {
42413
42664
  const text = sentence.text;
42414
42665
  if (CLOSERS.some((re) => re.test(text))) {
@@ -42420,7 +42671,7 @@ function stockCloser(ctx) {
42420
42671
  }
42421
42672
  const FIGURATIVE_NOUNS = "fights?|battles?|hills?|wars?|bets?|gambles?|races?|risks?|horses?|roads?|bridges?|doors?|games?|ships?|cards?";
42422
42673
  function figurativeWorth(ctx) {
42423
- const rule = STRUCTURE_RULES.figurativeWorth;
42674
+ const rule = RHYTHM_RULES.figurativeWorth;
42424
42675
  const strong = new RegExp(`\\b(?:${FIGURATIVE_NOUNS}) worth \\w+ing\\b`, "gi");
42425
42676
  const reader = /\bworth (?:noting|mentioning|knowing|highlighting|calling out|pointing out|flagging|a (?:closer |second )?look)\b/gi;
42426
42677
  const any = /\b(\w+) worth (\w+ing)\b/gi;
@@ -42464,9 +42715,50 @@ function staccato(ctx) {
42464
42715
  report();
42465
42716
  }
42466
42717
  }
42718
+ const ORDINALS = [
42719
+ "first",
42720
+ "second",
42721
+ "third",
42722
+ "fourth",
42723
+ "fifth",
42724
+ "sixth"
42725
+ ];
42726
+ const ORDINAL_OPENER = /^(?:And |But |So )?The (first|second|third|fourth|fifth|sixth) ([a-z][\w-]*)\b/i;
42727
+ function numberedProse(ctx, rule) {
42728
+ let open = null;
42729
+ const report = (item, endBlock, end) => {
42730
+ const count = item.next;
42731
+ ctx.hit(rule, item.block, item.start, item.block === endBlock ? end : item.block.text.length, `${count} sentences open "The first ${item.noun}", "The second ${item.noun}" and so on: a list written as prose.`, "Write it as a list, or as plain prose that names each point without numbering it.", "warning");
42732
+ };
42733
+ let last = null;
42734
+ for (const block of ctx.blocks(RHYTHM_KINDS)) for (const sentence of ctx.sentences(block)) {
42735
+ const found = ORDINAL_OPENER.exec(sentence.text);
42736
+ if (!found) continue;
42737
+ const ordinal = ORDINALS.indexOf((found[1] ?? "").toLowerCase());
42738
+ const noun = (found[2] ?? "").toLowerCase();
42739
+ if (ordinal === 0) {
42740
+ if (open && open.next >= 3 && last) report(open, last.block, last.end);
42741
+ open = {
42742
+ block,
42743
+ start: sentence.start,
42744
+ next: 1,
42745
+ noun
42746
+ };
42747
+ last = null;
42748
+ } else if (open && ordinal === open.next && noun === open.noun) {
42749
+ open.next++;
42750
+ last = {
42751
+ block,
42752
+ end: sentence.end
42753
+ };
42754
+ }
42755
+ }
42756
+ if (open && open.next >= 3 && last) report(open, last.block, last.end);
42757
+ }
42467
42758
  function anaphora(ctx) {
42468
- const rule = STRUCTURE_RULES.anaphora;
42759
+ const rule = RHYTHM_RULES.anaphora;
42469
42760
  if (ctx.level(rule) === "off") return;
42761
+ numberedProse(ctx, rule);
42470
42762
  for (const block of ctx.blocks(RHYTHM_KINDS)) {
42471
42763
  const sentences = ctx.sentences(block);
42472
42764
  let i = 0;
@@ -42494,186 +42786,24 @@ function anaphora(ctx) {
42494
42786
  }
42495
42787
  }
42496
42788
  }
42497
- const TIER2 = /\b(?:crucial(?:ly)?|pivotal|vibrant|comprehensive|enhanc(?:e|es|ed|ing|ement)|foster(?:s|ed|ing)?|harness(?:es|ed|ing)?|navigat(?:e|es|ed|ing)|streamlin(?:e|es|ed|ing)|empower(?:s|ed|ing|ment)?|elevat(?:e|es|ed|ing)|unleash(?:es|ed|ing)?|transformative|nuanced?|myriad|plethora|encompass(?:es|ed|ing)?|cultivat(?:e|es|ed|ing)|resonat(?:e|es|ed|ing)|cornerstone|poised|burgeoning|nascent|quintessential|overarching|actionable|impactful|landscape|ecosystem|journey|additionally|notably|moreover|furthermore|profound(?:ly)?|quietly|fundamentally|remarkabl[ey]|arguably|invaluable|deeply (?:rooted|committed|integrated|personal|meaningful))\b/gi;
42498
- const TECHNICAL = /^(?:comprehensive|ecosystem|streamlin|navigat)/i;
42499
- function vocabularyCluster(ctx) {
42500
- const rule = STRUCTURE_RULES.vocabularyCluster;
42501
- if (ctx.level(rule) === "off") return;
42502
- for (const block of ctx.blocks([
42503
- "paragraph",
42504
- "list",
42505
- "quote",
42506
- "prop",
42507
- "heading",
42508
- "description",
42509
- "title"
42510
- ])) {
42511
- const seen = /* @__PURE__ */ new Map();
42512
- TIER2.lastIndex = 0;
42513
- for (const found of block.norm.matchAll(TIER2)) {
42514
- const word = found[0].toLowerCase();
42515
- if (ctx.preset === "docs" && TECHNICAL.test(word)) continue;
42516
- const stem = word.slice(0, 6);
42517
- const start = found.index ?? 0;
42518
- if (ctx.preset === "landing" || ctx.preset === "meta") {
42519
- ctx.hit(rule, block, start, start + found[0].length, `"${found[0]}" is filler in short copy.`, "Use the plain word, or the concrete thing it stands for.");
42520
- continue;
42521
- }
42522
- if (!seen.has(stem)) seen.set(stem, start);
42523
- if (seen.size === 2 && !seen.has(`${stem}!`)) {
42524
- seen.set(`${stem}!`, start);
42525
- const listed = [...seen.keys()].filter((key) => !key.endsWith("!"));
42526
- ctx.hit(rule, block, start, start + found[0].length, `This paragraph stacks words common in AI text (${listed.length} of them, ending with "${found[0]}").`, "Rewrite with plain words: \"important\" for crucial, \"help\" for foster, \"field\" for landscape, or cut them.");
42527
- }
42528
- }
42529
- }
42530
- }
42531
- const SERIES = /\b[\w'$-]+(?: [\w'$-]+){0,5}(?:, [\w'$-]+(?: [\w'$-]+){0,5}){1,3},? (?:and|or) [\w'$-]+(?: [\w'$-]+){0,5}/g;
42532
- const ABSTRACT_TRIAD = /\b[a-z]+(?:tion|sion|ity|ness|ment|ence|ance|ism), (?:and )?[a-z]+(?:tion|sion|ity|ness|ment|ence|ance|ism),? and [a-z]+(?:tion|sion|ity|ness|ment|ence|ance|ism)\b/gi;
42533
- const ECHO = new Set("to our your their my his her its every each more less no it they we you".split(" "));
42534
- const COPULA = /\b(?:is|are|was|were|'s|feels?|felt|looks?|stays?|remains?|seems?)\s+$/i;
42535
- function formulaTriad(items, before) {
42536
- const firsts = items.map((item) => words$2(item)[0]?.toLowerCase() ?? "");
42537
- const echo = firsts[0] ?? "";
42538
- if (ECHO.has(echo) && firsts.every((first) => first === echo)) return `Each item opens with "${echo}".`;
42539
- if (items.every((item) => /^(?:the|their|our|your|its|it|they|we|you|he|she)\b/i.test(item) && words$2(item).length >= 3 && words$2(item).length <= 7 && !verbless(item))) return "Three parallel clauses in a row.";
42540
- if (items.every((item) => /^[a-z]/.test(item) && words$2(item).length <= 2 && !PREPOSITIONS.has(words$2(item)[0] ?? "")) && COPULA.test(before)) return "A string of adjectives after \"is\".";
42541
- if (items.every((item) => /^\w+ed\b/i.test(item) && words$2(item).length <= 3)) return "A string of past participles.";
42542
- return null;
42543
- }
42544
- function triads(ctx) {
42545
- const rule = STRUCTURE_RULES.triad;
42546
- if (ctx.level(rule) === "off") return;
42547
- for (const block of ctx.blocks([
42548
- "paragraph",
42549
- "quote",
42550
- "prop",
42551
- "list"
42552
- ])) {
42553
- const taken = [];
42554
- ABSTRACT_TRIAD.lastIndex = 0;
42555
- for (const match of block.norm.matchAll(ABSTRACT_TRIAD)) {
42556
- const start = match.index ?? 0;
42557
- taken.push([start, start + match[0].length]);
42558
- ctx.hit(rule, block, start, start + match[0].length, "Three abstract nouns in a row sound weighty but say little.", "Keep the one that matters and give an example of it.");
42559
- }
42560
- for (const sentence of ctx.sentences(block)) {
42561
- SERIES.lastIndex = 0;
42562
- for (const match of sentence.text.matchAll(SERIES)) {
42563
- let from = match.index ?? 0;
42564
- const raw = match[0].split(/,\s*(?:(?:and|or)\s+)?|\s+(?:and|or)\s+(?=[^,]*$)/);
42565
- if (raw.length < 3) continue;
42566
- const items = [...raw];
42567
- const head = raw[0] ?? "";
42568
- const lead = /^.*\b(?:is|are|was|were|'s|feels?|looks?|stays?|remains?|seems?|of|for|to|with|by|from|on|in|like|including|as)\s+/i.exec(head);
42569
- if (lead && words$2(head.slice(lead[0].length)).length) {
42570
- items[0] = head.slice(lead[0].length);
42571
- from += lead[0].length;
42572
- }
42573
- const end = sentence.start + (match.index ?? 0) + match[0].length;
42574
- const before = block.norm.slice(sentence.start, sentence.start + from);
42575
- const echo = words$2(raw[1] ?? "")[0]?.toLowerCase() ?? "";
42576
- const inFirst = new RegExp(`\\b${echo}\\b(?!.*\\b${echo}\\b)`, "i").exec(head);
42577
- if (ECHO.has(echo) && inFirst && inFirst.index > 0) {
42578
- items[0] = head.slice(inFirst.index);
42579
- from = (match.index ?? 0) + inFirst.index;
42580
- }
42581
- const plain = formulaTriad(raw, "");
42582
- const why = plain ?? formulaTriad(items, before);
42583
- if (!why) continue;
42584
- if (plain) from = match.index ?? 0;
42585
- const start = sentence.start + from;
42586
- if (taken.some(([a, b]) => start < b && end > a)) continue;
42587
- taken.push([start, end]);
42588
- ctx.hit(rule, block, start, end, `A list of ${items.length} that reads as a formula. ${why}`, "Keep the items the reader needs. If all of them are needed, write them plainly or as two sentences; if one was added for rhythm, cut it.");
42589
- }
42590
- }
42591
- }
42592
- }
42593
- function countedPatterns(ctx) {
42594
- const labels = STRUCTURE_RULES.inventedLabel;
42595
- const clefts = STRUCTURE_RULES.pseudoCleft;
42596
- for (const [rule, re] of [[labels, /\bthe [a-z]+(?:-[a-z]+)? (?:paradox|trap|tax|creep|divide|vacuum|inversion|cliff|treadmill|illusion|fallacy|flywheel|moat)\b/gi], [clefts, /(?:^|[.!?]\s+)(?:What (?:makes|made|matters|changed|really|actually|you get|this means|I (?:like|love|learned|found))\b[^.!?]{0,40}\s+(?:is|was)\b|The (?:problem|difference|catch|key|trick|point|reason) is that\b)/g]]) {
42597
- if (ctx.level(rule) === "off") continue;
42598
- const found = [];
42599
- for (const block of ctx.blocks(RHYTHM_KINDS)) {
42600
- re.lastIndex = 0;
42601
- for (const match of block.norm.matchAll(re)) {
42602
- let start = match.index ?? 0;
42603
- while (/[\s.!?]/.test(block.norm[start] ?? "")) start++;
42604
- found.push({
42605
- block,
42606
- start,
42607
- end: (match.index ?? 0) + match[0].length
42608
- });
42609
- }
42610
- }
42611
- if (found.length < 2) continue;
42612
- for (const item of found) ctx.hit(rule, item.block, item.start, item.end, rule === labels ? `${found.length} coined labels in one piece. Each asks the reader to learn a term.` : `${found.length} "What X is" or "The problem is that" setups in one piece.`, rule === labels ? "Describe the thing in plain words instead of naming it." : "Start with the subject and say the thing directly.");
42613
- }
42614
- }
42615
- function boldLabels(ctx) {
42616
- const rule = STRUCTURE_RULES.boldLabels;
42617
- if (ctx.level(rule) === "off") return;
42618
- if (ctx.doc.format !== "md" && ctx.doc.format !== "mdx") return;
42619
- const lists = ctx.blocks(["list"]);
42620
- let run = [];
42621
- const report = () => {
42622
- if (run.length >= 3) {
42623
- const first = run[0];
42624
- ctx.hit(rule, first, 0, Math.min(first.text.length, 60), `${run.length} list items in a row open with a bold label.`, "Drop the bold labels and write each item as one plain sentence, or use a table if the items really are parallel.");
42625
- }
42626
- run = [];
42627
- };
42628
- let previous = null;
42629
- for (const block of lists) {
42630
- const offset = block.map[0] ?? 0;
42631
- const line = ctx.doc.source.lastIndexOf("\n", offset) + 1;
42632
- const raw = ctx.doc.source.slice(line, offset + 4);
42633
- const bold = /^\s*(?:[-*+]|\d{1,9}[.)])\s+(?:\*\*|__)/.test(raw);
42634
- const adjacent = previous !== null && ctx.doc.blocks.indexOf(block) === ctx.doc.blocks.indexOf(previous) + 1;
42635
- if (!bold || !adjacent) report();
42636
- if (bold) run.push(block);
42637
- previous = block;
42638
- }
42639
- report();
42640
- }
42641
- function boldEmphasis(ctx) {
42642
- const rule = STRUCTURE_RULES.boldEmphasis;
42643
- if (ctx.level(rule) === "off") return;
42644
- const markdown = ctx.doc.format === "md" || ctx.doc.format === "mdx";
42645
- const re = markdown ? /(\*\*|__)(?=\S)[^*_\n]+?\1/g : /<(strong|b)\b[^>]*>[^<]{1,200}<\/\1>/gi;
42646
- const prose = ctx.blocks([
42647
- "paragraph",
42648
- "list",
42649
- "quote",
42650
- "prop"
42651
- ]);
42652
- const spans = [];
42653
- for (const found of ctx.doc.source.matchAll(re)) {
42654
- const open = markdown ? 2 : found[0].indexOf(">") + 1;
42655
- const from = (found.index ?? 0) + open;
42656
- const to = (found.index ?? 0) + found[0].length - (markdown ? 2 : found[0].length - found[0].lastIndexOf("<"));
42657
- for (const block of prose) {
42658
- const first = block.map[0] ?? 0;
42659
- const last = block.map[block.map.length - 1] ?? 0;
42660
- if (from < first || from > last) continue;
42661
- const start = block.map.indexOf(from);
42662
- if (start <= 0 && block.kind === "list") break;
42663
- if (start < 0) break;
42664
- let end = start;
42665
- while (end < block.map.length && (block.map[end] ?? 0) < to) end++;
42666
- spans.push({
42667
- block,
42668
- start,
42669
- end
42670
- });
42671
- break;
42672
- }
42673
- }
42674
- if (spans.length < 3 || spans.length * 100 <= ctx.proseWords) return;
42675
- for (const span of spans) ctx.hit(rule, span.block, span.start, span.end, `${spans.length} bold phrases in ${ctx.proseWords.toLocaleString("en-US")} words of prose. Bold this often stops meaning "important".`, "Remove the bold here. Keep bold, if any, for the one thing a skimming reader must not miss.");
42676
- }
42789
+ // packages/core/dist/lint/rules-structure.js
42790
+ const STRUCTURE_RULES = {
42791
+ negativeParallelism: CONTRAST_RULES.negativeParallelism,
42792
+ contrastReframe: CONTRAST_RULES.contrastReframe,
42793
+ heresAnnouncement: RHYTHM_RULES.heresAnnouncement,
42794
+ pithyFragment: RHYTHM_RULES.pithyFragment,
42795
+ stockCloser: RHYTHM_RULES.stockCloser,
42796
+ negativeReframe: RHYTHM_RULES.negativeReframe,
42797
+ figurativeWorth: RHYTHM_RULES.figurativeWorth,
42798
+ anaphora: RHYTHM_RULES.anaphora,
42799
+ vocabularyCluster: COUNTED_RULES.vocabularyCluster,
42800
+ triad: COUNTED_RULES.triad,
42801
+ inventedLabel: COUNTED_RULES.inventedLabel,
42802
+ colonDensity: COUNTED_RULES.colonDensity,
42803
+ pseudoCleft: COUNTED_RULES.pseudoCleft,
42804
+ boldEmphasis: BOLD_RULES.boldEmphasis,
42805
+ boldLabels: BOLD_RULES.boldLabels
42806
+ };
42677
42807
  function runStructureRules(ctx) {
42678
42808
  negativeParallelism(ctx);
42679
42809
  contrastReframe(ctx);
@@ -42686,6 +42816,7 @@ function runStructureRules(ctx) {
42686
42816
  vocabularyCluster(ctx);
42687
42817
  triads(ctx);
42688
42818
  countedPatterns(ctx);
42819
+ colonDensity(ctx);
42689
42820
  boldLabels(ctx);
42690
42821
  boldEmphasis(ctx);
42691
42822
  }
@@ -44924,7 +45055,7 @@ async function analyticsBeside(access, site, range, before, pages) {
44924
45055
  }
44925
45056
  // packages/core/dist/commands/audit.js
44926
45057
  const AUDIT_SECTION = "weekly-audit";
44927
- const AUDIT_SECTION_TEXT = "What the weekly crawl of the site found (broken and redirected internal links, missing, empty or duplicate titles and descriptions, missing H1s, noindex for Google, canonicals to another page, sitemap URLs that do not return 200, thin pages, tags that JavaScript changes), with what is new, back or resolved since the crawl before. Only for sites added to the weekly site audit beta.";
45058
+ const AUDIT_SECTION_TEXT = "What the weekly crawl of the site found (broken and redirected internal links, missing, empty or duplicate titles and descriptions, missing H1s, noindex for Google, canonicals to another page, sitemap URLs that do not return 200, thin pages, tags that JavaScript changes), with what is new, back or resolved since the crawl before. Only for sites in the weekly site audit.";
44928
45059
  const AUDIT_RULES = {
44929
45060
  link_to_error: "Internal links to a page that returns an error",
44930
45061
  link_to_redirect: "Internal links to a redirect",
@@ -49100,11 +49231,11 @@ async function runAllSites(deps, sites) {
49100
49231
  if (!data && sites) {
49101
49232
  const list = await sites();
49102
49233
  return {
49103
- text: `No site given. Pick one below and send it: ${deps.call("report", { site: "<site>" })}. The summary of every site is for accounts in the weekly site audit beta.\n\n${list.text}`,
49234
+ text: `No site given. Pick one below and send it: ${deps.call("report", { site: "<site>" })}. The summary of every site is for accounts with the weekly site audit.\n\n${list.text}`,
49104
49235
  data: list.data
49105
49236
  };
49106
49237
  }
49107
- if (!data) throw new CommandError("INVALID_INPUT", `No site given. Name one: ${deps.call("report", { site: "<site>" })}. The summary of every site is for accounts in the weekly site audit beta.`);
49238
+ if (!data) throw new CommandError("INVALID_INPUT", `No site given. Name one: ${deps.call("report", { site: "<site>" })}. The summary of every site is for accounts with the weekly site audit.`);
49108
49239
  const startMs = Date.parse(`${data.start}T00:00:00Z`);
49109
49240
  const endMs = Date.parse(`${data.end}T00:00:00Z`) + DAY_MS;
49110
49241
  const urgency = (site) => issues(site, startMs, endMs)[0]?.rank ?? Number.POSITIVE_INFINITY;
@@ -49199,9 +49330,9 @@ const SHARED_TOOLS = [
49199
49330
  name: "seo_report",
49200
49331
  command: "report",
49201
49332
  title: "Search Console report",
49202
- description: `Start here. Without site: a short summary of every site in the person's weekly site audit (beta) for last week, with each site's Google index, weekly crawl and search clicks, sites with changes first, ending with the site to ask about next; an account outside that beta gets its site list to pick from. With site: the main report for that Search Console property, the overview plus each section's row count and top rows. With site and section: that section's rows; page sections also check their top 20 URLs live. Sections:\n${Object.entries(SECTIONS).map(([id, text]) => `- ${id}: ${text}`).join("\n")}\n- ${ISSUES_SECTION}: ${ISSUES_SECTION_TEXT}\n- ${UPDATES_SECTION}: ${UPDATES_SECTION_TEXT}\nWith site, mark and issues: records what the person decided about those issue ids (fixed, ignored, or open to undo) and runs no checks.`,
49333
+ description: `Start here. Without site: a short summary of every site in the person's weekly site audit for last week, with each site's Google index, weekly crawl and search clicks, sites with changes first, ending with the site to ask about next; an account without the audit gets its site list to pick from. With site: the main report for that Search Console property, the overview plus each section's row count and top rows. With site and section: that section's rows; page sections also check their top 20 URLs live. Sections:\n${Object.entries(SECTIONS).map(([id, text]) => `- ${id}: ${text}`).join("\n")}\n- ${ISSUES_SECTION}: ${ISSUES_SECTION_TEXT}\n- ${UPDATES_SECTION}: ${UPDATES_SECTION_TEXT}\nWith site, mark and issues: records what the person decided about those issue ids (fixed, ignored, or open to undo) and runs no checks.`,
49203
49334
  input: z.object({
49204
- site: site.optional().describe("Leave it out for the summary of every audited site (weekly site audit beta). Otherwise a Search Console property or site, such as sc-domain:example.com, https://example.com/ or example.com."),
49335
+ site: site.optional().describe("Leave it out for the summary of every site in the weekly site audit. Otherwise a Search Console property or site, such as sc-domain:example.com, https://example.com/ or example.com."),
49205
49336
  section: z.enum([
49206
49337
  ...SECTION_IDS,
49207
49338
  ISSUES_SECTION,
@@ -49450,7 +49581,7 @@ function indexFromStore(shared) {
49450
49581
  const paged = "detail" in shared.input.shape;
49451
49582
  return {
49452
49583
  ...shared,
49453
- description: `${shared.description} For a site in the weekly site audit beta it answers at once from the URL Inspection results this server keeps for the site, checked in the background each day, and says how many URLs are covered, how many are queued and the time left.`,
49584
+ description: `${shared.description} For a site in the weekly site audit it answers at once from the URL Inspection results this server keeps for the site, checked in the background each day, and says how many URLs are covered, how many are queued and the time left.`,
49454
49585
  run: async (surface, parsed) => {
49455
49586
  const input = parsed;
49456
49587
  const audit = surface.deps.audit;
@@ -49522,7 +49653,7 @@ const MCP_SERVER_INFO = {
49522
49653
  };
49523
49654
  const MCP_INSTRUCTIONS = `SEO Skill reads the person's own Search Console, Google Analytics, Bing Webmaster Tools, Clicky and optional keyword accounts, and returns facts with their dates and limits. It gives no advice.
49524
49655
  1. seo_sites: the properties the connected accounts can read.
49525
- 2. seo_report: start here. Without site it summarises last week across every site in the weekly site audit (beta) and names the site to ask about next. With site it shows that property's overview and every section's count and top rows; then ask for the one section you need. Section issues keeps a list of what it found for the site between sessions; mark records which the person fixed or wants ignored.
49656
+ 2. seo_report: start here. Without site it summarises last week across every site in the weekly site audit and names the site to ask about next. With site it shows that property's overview and every section's count and top rows; then ask for the one section you need. Section issues keeps a list of what it found for the site between sessions; mark records which the person fixed or wants ignored.
49526
49657
  3. seo_page for one URL, seo_compare for before and after a date, seo_index for Google's indexing reasons and pages that lost their clicks, seo_research for keyword, competitor and backlink data, and whether AI answers cite the site, from the DataForSEO or Ahrefs key the person saved, seo_data for raw rows, including Google Analytics, Bing and Clicky.
49527
49658
  4. seo_lint checks copy you are writing or editing (a landing page, blog post, title or meta description) for patterns common in AI-written text and for title and description length. It reads only the text or files you give it.`;
49528
49659
  const mcpCall = (command, args) => {