seo-supervisor 1.2.0 → 2.0.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.
Files changed (207) hide show
  1. package/.claude-plugin/icon.png +0 -0
  2. package/.claude-plugin/marketplace.json +2 -2
  3. package/.claude-plugin/plugin.json +16 -3
  4. package/CHANGELOG.md +430 -0
  5. package/NOTICE +7 -0
  6. package/README.md +230 -25
  7. package/agents/seo-auditor.md +16 -0
  8. package/agents/seo-reviewer.md +16 -0
  9. package/bin/agents.mjs +194 -29
  10. package/bin/extras.mjs +422 -0
  11. package/bin/prompt.mjs +34 -14
  12. package/bin/seo-supervisor.mjs +386 -53
  13. package/commands/seo-audit.md +29 -3
  14. package/commands/seo-brief.md +28 -0
  15. package/commands/seo-connect.md +27 -0
  16. package/commands/seo-fix.md +24 -3
  17. package/commands/seo-grow.md +26 -0
  18. package/commands/seo-launch.md +17 -3
  19. package/commands/seo-review.md +13 -1
  20. package/commands/seo-rewrite.md +25 -0
  21. package/commands/seo-setup.md +17 -1
  22. package/commands/seo-watch.md +28 -0
  23. package/hooks/hooks.json +117 -0
  24. package/package.json +20 -7
  25. package/skills/seo-supervisor/NOTICE +7 -0
  26. package/skills/seo-supervisor/SKILL.md +302 -21
  27. package/skills/seo-supervisor/audience.md +61 -0
  28. package/skills/seo-supervisor/examples/drafts/security.md +41 -0
  29. package/skills/seo-supervisor/examples/hooks/README.md +28 -0
  30. package/skills/seo-supervisor/examples/hooks/claude-code-settings.json +15 -0
  31. package/skills/seo-supervisor/examples/hooks/codex-hooks.json +17 -0
  32. package/skills/seo-supervisor/examples/hooks/copilot-hooks.json +15 -0
  33. package/skills/seo-supervisor/examples/hooks/cursor-hooks.json +11 -0
  34. package/skills/seo-supervisor/examples/hooks/github-actions.yml +21 -0
  35. package/skills/seo-supervisor/examples/hooks/pre-commit +17 -0
  36. package/skills/seo-supervisor/examples/hooks/reading-ease.yml +24 -0
  37. package/skills/seo-supervisor/examples/sample-audit.json +94 -2
  38. package/skills/seo-supervisor/examples/sample-report.html +111 -61
  39. package/skills/seo-supervisor/examples/sample-report.md +147 -44
  40. package/skills/seo-supervisor/examples/scheduled-runs.md +89 -0
  41. package/skills/seo-supervisor/examples/snippets.md +648 -1
  42. package/skills/seo-supervisor/grow.md +342 -0
  43. package/skills/seo-supervisor/og-images.md +85 -0
  44. package/skills/seo-supervisor/page-types.md +124 -0
  45. package/skills/seo-supervisor/planning.md +19 -7
  46. package/skills/seo-supervisor/profile-template.md +41 -0
  47. package/skills/seo-supervisor/report-format.md +177 -10
  48. package/skills/seo-supervisor/rewrite.md +59 -0
  49. package/skills/seo-supervisor/rules/ai-search.md +65 -12
  50. package/skills/seo-supervisor/rules/content.md +33 -9
  51. package/skills/seo-supervisor/rules/crawl-index.md +33 -6
  52. package/skills/seo-supervisor/rules/internal-linking.md +49 -6
  53. package/skills/seo-supervisor/rules/launch-monitoring.md +17 -8
  54. package/skills/seo-supervisor/rules/media.md +13 -1
  55. package/skills/seo-supervisor/rules/metadata.md +41 -9
  56. package/skills/seo-supervisor/rules/performance.md +50 -5
  57. package/skills/seo-supervisor/rules/rendering.md +39 -2
  58. package/skills/seo-supervisor/rules/search-intent.md +32 -0
  59. package/skills/seo-supervisor/rules/sitemaps-robots.md +24 -12
  60. package/skills/seo-supervisor/rules/structured-data.md +37 -14
  61. package/skills/seo-supervisor/rules/trust-security.md +25 -2
  62. package/skills/seo-supervisor/rules/urls.md +10 -2
  63. package/skills/seo-supervisor/scripts/ai-answers.mjs +314 -0
  64. package/skills/seo-supervisor/scripts/backlinks.mjs +412 -0
  65. package/skills/seo-supervisor/scripts/change-check.mjs +281 -0
  66. package/skills/seo-supervisor/scripts/checks/agents.mjs +488 -0
  67. package/skills/seo-supervisor/scripts/checks/assets.mjs +404 -0
  68. package/skills/seo-supervisor/scripts/checks/bots.mjs +146 -0
  69. package/skills/seo-supervisor/scripts/checks/business-type.mjs +193 -0
  70. package/skills/seo-supervisor/scripts/checks/content.mjs +391 -0
  71. package/skills/seo-supervisor/scripts/checks/coverage.mjs +184 -0
  72. package/skills/seo-supervisor/scripts/checks/crawl.mjs +95 -0
  73. package/skills/seo-supervisor/scripts/checks/hreflang.mjs +396 -0
  74. package/skills/seo-supervisor/scripts/checks/hygiene.mjs +227 -0
  75. package/skills/seo-supervisor/scripts/checks/lighthouse.mjs +271 -0
  76. package/skills/seo-supervisor/scripts/checks/link-strength.mjs +59 -0
  77. package/skills/seo-supervisor/scripts/checks/links.mjs +360 -0
  78. package/skills/seo-supervisor/scripts/checks/local.mjs +101 -0
  79. package/skills/seo-supervisor/scripts/checks/media.mjs +194 -0
  80. package/skills/seo-supervisor/scripts/checks/outbound.mjs +53 -0
  81. package/skills/seo-supervisor/scripts/checks/page.mjs +223 -0
  82. package/skills/seo-supervisor/scripts/checks/probes.mjs +130 -0
  83. package/skills/seo-supervisor/scripts/checks/render.mjs +552 -0
  84. package/skills/seo-supervisor/scripts/checks/robots.mjs +144 -0
  85. package/skills/seo-supervisor/scripts/checks/schema.mjs +206 -0
  86. package/skills/seo-supervisor/scripts/checks/site-agents.mjs +79 -0
  87. package/skills/seo-supervisor/scripts/checks/site-content.mjs +135 -0
  88. package/skills/seo-supervisor/scripts/checks/site-hygiene.mjs +202 -0
  89. package/skills/seo-supervisor/scripts/checks/site-pages.mjs +474 -0
  90. package/skills/seo-supervisor/scripts/checks/site-security.mjs +102 -0
  91. package/skills/seo-supervisor/scripts/checks/sitemap.mjs +473 -0
  92. package/skills/seo-supervisor/scripts/checks/speed.mjs +267 -0
  93. package/skills/seo-supervisor/scripts/checks/technical.mjs +368 -0
  94. package/skills/seo-supervisor/scripts/checks/tls.mjs +297 -0
  95. package/skills/seo-supervisor/scripts/checks/trust.mjs +421 -0
  96. package/skills/seo-supervisor/scripts/checks/visual.mjs +1132 -0
  97. package/skills/seo-supervisor/scripts/checks/writing.mjs +192 -0
  98. package/skills/seo-supervisor/scripts/commoncrawl.mjs +452 -0
  99. package/skills/seo-supervisor/scripts/connect-keys.mjs +422 -0
  100. package/skills/seo-supervisor/scripts/content-scan.mjs +515 -158
  101. package/skills/seo-supervisor/scripts/crawl/catalog.mjs +1248 -0
  102. package/skills/seo-supervisor/scripts/crawl/fetch.mjs +362 -0
  103. package/skills/seo-supervisor/scripts/crawl/page.mjs +741 -0
  104. package/skills/seo-supervisor/scripts/crawl/queue.mjs +190 -0
  105. package/skills/seo-supervisor/scripts/dashboard.mjs +140 -0
  106. package/skills/seo-supervisor/scripts/data/ai-bots.json +38 -0
  107. package/skills/seo-supervisor/scripts/data/build-schema-vocab.mjs +57 -0
  108. package/skills/seo-supervisor/scripts/data/business-types.json +338 -0
  109. package/skills/seo-supervisor/scripts/data/google-rich-results.json +79 -0
  110. package/skills/seo-supervisor/scripts/data/schema-vocab.json +1 -0
  111. package/skills/seo-supervisor/scripts/deploy-check.mjs +462 -0
  112. package/skills/seo-supervisor/scripts/disavow.mjs +176 -0
  113. package/skills/seo-supervisor/scripts/doctor.mjs +174 -0
  114. package/skills/seo-supervisor/scripts/geo-grid.mjs +371 -0
  115. package/skills/seo-supervisor/scripts/google/search-console.mjs +151 -0
  116. package/skills/seo-supervisor/scripts/google/session.mjs +167 -0
  117. package/skills/seo-supervisor/scripts/google-updates.mjs +189 -0
  118. package/skills/seo-supervisor/scripts/google.mjs +1341 -0
  119. package/skills/seo-supervisor/scripts/gsc-import.mjs +298 -0
  120. package/skills/seo-supervisor/scripts/guard/adapters/claude-code.mjs +149 -0
  121. package/skills/seo-supervisor/scripts/guard/adapters/cline.mjs +28 -0
  122. package/skills/seo-supervisor/scripts/guard/adapters/codex.mjs +26 -0
  123. package/skills/seo-supervisor/scripts/guard/adapters/copilot.mjs +36 -0
  124. package/skills/seo-supervisor/scripts/guard/adapters/cursor.mjs +33 -0
  125. package/skills/seo-supervisor/scripts/guard/adapters/devin.mjs +25 -0
  126. package/skills/seo-supervisor/scripts/guard/adapters/edits.mjs +124 -0
  127. package/skills/seo-supervisor/scripts/guard/mode.mjs +37 -0
  128. package/skills/seo-supervisor/scripts/guard/rules.mjs +931 -0
  129. package/skills/seo-supervisor/scripts/guard.mjs +74 -0
  130. package/skills/seo-supervisor/scripts/images.mjs +408 -0
  131. package/skills/seo-supervisor/scripts/indexnow.mjs +300 -0
  132. package/skills/seo-supervisor/scripts/issues.mjs +217 -0
  133. package/skills/seo-supervisor/scripts/keys/authority.mjs +135 -0
  134. package/skills/seo-supervisor/scripts/keys/bing.mjs +239 -0
  135. package/skills/seo-supervisor/scripts/keys/clarity.mjs +137 -0
  136. package/skills/seo-supervisor/scripts/keys/dataforseo.mjs +57 -0
  137. package/skills/seo-supervisor/scripts/keys/googleplaces.mjs +26 -0
  138. package/skills/seo-supervisor/scripts/keys/http.mjs +212 -0
  139. package/skills/seo-supervisor/scripts/keys/matomo.mjs +138 -0
  140. package/skills/seo-supervisor/scripts/keys/openai.mjs +26 -0
  141. package/skills/seo-supervisor/scripts/keys/perplexity.mjs +26 -0
  142. package/skills/seo-supervisor/scripts/keys/posthog.mjs +165 -0
  143. package/skills/seo-supervisor/scripts/keys/semrush.mjs +25 -0
  144. package/skills/seo-supervisor/scripts/keys/services.mjs +41 -0
  145. package/skills/seo-supervisor/scripts/keys/store.mjs +140 -0
  146. package/skills/seo-supervisor/scripts/keys/visits.mjs +58 -0
  147. package/skills/seo-supervisor/scripts/keys/youtube.mjs +84 -0
  148. package/skills/seo-supervisor/scripts/keyword-data.mjs +316 -0
  149. package/skills/seo-supervisor/scripts/keyword-ideas.mjs +503 -0
  150. package/skills/seo-supervisor/scripts/lib/args.mjs +56 -0
  151. package/skills/seo-supervisor/scripts/lib/business.mjs +27 -0
  152. package/skills/seo-supervisor/scripts/lib/cdp.mjs +242 -0
  153. package/skills/seo-supervisor/scripts/lib/cli.mjs +56 -0
  154. package/skills/seo-supervisor/scripts/lib/csv.mjs +38 -0
  155. package/skills/seo-supervisor/scripts/lib/findings.mjs +100 -0
  156. package/skills/seo-supervisor/scripts/lib/google-client.mjs +9 -0
  157. package/skills/seo-supervisor/scripts/lib/html.mjs +146 -0
  158. package/skills/seo-supervisor/scripts/lib/http.mjs +28 -0
  159. package/skills/seo-supervisor/scripts/lib/image-size.mjs +78 -0
  160. package/skills/seo-supervisor/scripts/lib/is-main.mjs +13 -0
  161. package/skills/seo-supervisor/scripts/lib/net.mjs +116 -0
  162. package/skills/seo-supervisor/scripts/lib/proxy.mjs +47 -0
  163. package/skills/seo-supervisor/scripts/lib/recheck.mjs +106 -0
  164. package/skills/seo-supervisor/scripts/lib/redact.mjs +78 -0
  165. package/skills/seo-supervisor/scripts/lib/robots.mjs +73 -0
  166. package/skills/seo-supervisor/scripts/lib/score.mjs +266 -0
  167. package/skills/seo-supervisor/scripts/lib/settings-dir.mjs +81 -0
  168. package/skills/seo-supervisor/scripts/links-import.mjs +603 -0
  169. package/skills/seo-supervisor/scripts/log-scan.mjs +597 -0
  170. package/skills/seo-supervisor/scripts/og-card.mjs +273 -0
  171. package/skills/seo-supervisor/scripts/osm.mjs +359 -0
  172. package/skills/seo-supervisor/scripts/rdap.mjs +164 -0
  173. package/skills/seo-supervisor/scripts/render-report.mjs +324 -690
  174. package/skills/seo-supervisor/scripts/report/client.js +37 -0
  175. package/skills/seo-supervisor/scripts/report/diff.mjs +264 -0
  176. package/skills/seo-supervisor/scripts/report/findings.mjs +165 -0
  177. package/skills/seo-supervisor/scripts/report/format.mjs +111 -0
  178. package/skills/seo-supervisor/scripts/report/markdown.mjs +250 -0
  179. package/skills/seo-supervisor/scripts/report/model.mjs +171 -0
  180. package/skills/seo-supervisor/scripts/report/overview-lines.mjs +158 -0
  181. package/skills/seo-supervisor/scripts/report/overview.mjs +224 -0
  182. package/skills/seo-supervisor/scripts/report/page.mjs +127 -0
  183. package/skills/seo-supervisor/scripts/report/panel.mjs +172 -0
  184. package/skills/seo-supervisor/scripts/report/panels/ai.mjs +211 -0
  185. package/skills/seo-supervisor/scripts/report/panels/connections.mjs +139 -0
  186. package/skills/seo-supervisor/scripts/report/panels/content.mjs +204 -0
  187. package/skills/seo-supervisor/scripts/report/panels/data-search.mjs +379 -0
  188. package/skills/seo-supervisor/scripts/report/panels/data-site.mjs +44 -0
  189. package/skills/seo-supervisor/scripts/report/panels/links.mjs +380 -0
  190. package/skills/seo-supervisor/scripts/report/panels/local.mjs +221 -0
  191. package/skills/seo-supervisor/scripts/report/panels/site.mjs +359 -0
  192. package/skills/seo-supervisor/scripts/report/panels/speed-media.mjs +267 -0
  193. package/skills/seo-supervisor/scripts/report/sources.mjs +163 -0
  194. package/skills/seo-supervisor/scripts/report/styles.css +223 -0
  195. package/skills/seo-supervisor/scripts/report/traffic.mjs +264 -0
  196. package/skills/seo-supervisor/scripts/report-plan.mjs +112 -33
  197. package/skills/seo-supervisor/scripts/schema-check.mjs +717 -0
  198. package/skills/seo-supervisor/scripts/seo-crawl.mjs +1086 -638
  199. package/skills/seo-supervisor/scripts/seo-diff.mjs +584 -0
  200. package/skills/seo-supervisor/scripts/update-check.mjs +82 -0
  201. package/skills/seo-supervisor/site-types/content.md +34 -1
  202. package/skills/seo-supervisor/site-types/ecommerce.md +38 -1
  203. package/skills/seo-supervisor/site-types/local-business.md +96 -6
  204. package/skills/seo-supervisor/site-types/services.md +46 -0
  205. package/skills/seo-supervisor/site-types/tools.md +3 -3
  206. package/skills/seo-supervisor/strategy.md +232 -0
  207. package/skills/seo-supervisor/troubleshooting.md +56 -0
@@ -0,0 +1,124 @@
1
+ // @ts-check
2
+ // Shared by the non-Claude adapters: tool arguments or a patch as guard actions, and the text the model sees when
3
+ // stopped. Undocumented argument names are matched by their usual spellings; an edit that can't be read is allowed.
4
+ import { readFileSync } from "node:fs";
5
+ import { resolve } from "node:path";
6
+
7
+ /** The file as it is on disk, or "" when it isn't there yet. */
8
+ export const onDisk = file => {
9
+ try {
10
+ return readFileSync(file, "utf8");
11
+ } catch {
12
+ return "";
13
+ }
14
+ };
15
+ /** An object from a value that may be a JSON string (Copilot's toolArgs, Cursor's MCP input), else {}. */
16
+ export const obj = v => {
17
+ if (typeof v === "string")
18
+ try {
19
+ v = JSON.parse(v);
20
+ } catch {}
21
+ return v && typeof v === "object" && !Array.isArray(v) ? v : {};
22
+ };
23
+ const first = (o, keys) => keys.map(k => o[k]).find(v => typeof v === "string");
24
+
25
+ /** Shell commands from a tool's arguments: command as a string, or commands as a string or a list. */
26
+ export const bashActions = args =>
27
+ [args.command, ...[].concat(args.commands ?? [])]
28
+ .filter(c => typeof c === "string" && c.trim())
29
+ .map(command => ({ kind: "bash", command }));
30
+
31
+ /** One file edit or write from a tool's arguments. A whole new text is a write; old and new strings are applied to the
32
+ * file on disk, or compared as they are when the old text isn't found there. */
33
+ export function editActions(args, cwd) {
34
+ const path = first(args, ["file_path", "filePath", "path", "target_file", "file"]);
35
+ if (!path) return [];
36
+ const file = resolve(cwd, path),
37
+ before = onDisk(file);
38
+ const whole = first(args, ["content", "contents", "file_text", "text"]);
39
+ if (whole !== undefined) return [{ kind: "edit", file, before, after: whole }];
40
+ const was = first(args, ["old_string", "old_str", "old_text"]),
41
+ now = first(args, ["new_string", "new_str", "new_text", "insert_text"]);
42
+ if (now === undefined) return [];
43
+ return [
44
+ was && before.includes(was)
45
+ ? { kind: "edit", file, before, after: before.replace(was, () => now) }
46
+ : { kind: "edit", file, before: was ?? "", after: now },
47
+ ];
48
+ }
49
+
50
+ /** The actions in an apply_patch patch, the format Codex, Devin and Cline use: "*** Add File: ", "*** Delete File: ",
51
+ * "*** Update File: " with an optional "*** Move to: ", then "@@" hunks of "+", "-" or " " lines. A move deletes the
52
+ * old path. https://github.com/openai/codex/blob/main/codex-rs/apply-patch/src/parser.rs */
53
+ export function patchActions(patch, cwd) {
54
+ const out = [];
55
+ /** @type {{ file: string, to?: string, add: boolean, hunks: { old: string[], new: string[] }[] } | null} */
56
+ let cur = null;
57
+ const done = () => {
58
+ if (!cur) return;
59
+ const hunks = cur.hunks.filter(h => h.old.length || h.new.length),
60
+ join = k => hunks.map(h => h[k].join("\n")).join("\n");
61
+ const disk = onDisk(cur.file),
62
+ file = cur.to || cur.file;
63
+ let after = disk;
64
+ for (const h of hunks) {
65
+ const was = h.old.join("\n");
66
+ after = after !== null && was && after.includes(was) ? after.replace(was, () => h.new.join("\n")) : null;
67
+ }
68
+ if (cur.add) out.push({ kind: "edit", file, before: disk, after: join("new") });
69
+ else
70
+ out.push(
71
+ after === null
72
+ ? { kind: "edit", file, before: join("old"), after: join("new") }
73
+ : { kind: "edit", file, before: disk, after },
74
+ );
75
+ if (cur.to) out.push({ kind: "delete", file: cur.file });
76
+ cur = null;
77
+ };
78
+ for (const raw of String(patch).split(/\r?\n/)) {
79
+ const m = raw.trim().match(/^\*\*\* (Add File|Delete File|Update File|Move to): (.+)$/);
80
+ if (m) {
81
+ if (m[1] === "Move to") {
82
+ if (cur) cur.to = resolve(cwd, m[2].trim());
83
+ continue;
84
+ }
85
+ done();
86
+ const file = resolve(cwd, m[2].trim());
87
+ if (m[1] === "Delete File") out.push({ kind: "delete", file });
88
+ else cur = { file, add: m[1] === "Add File", hunks: [{ old: [], new: [] }] };
89
+ } else if (cur && raw.startsWith("@@")) cur.hunks.push({ old: [], new: [] });
90
+ else if (cur && !raw.trim().startsWith("***")) {
91
+ const h = cur.hunks.at(-1),
92
+ sign = raw[0],
93
+ text = raw.slice(1);
94
+ if (cur.add) h.new.push(sign === "+" ? text : raw);
95
+ else if (sign === "+") h.new.push(text);
96
+ else if (sign === "-") h.old.push(text);
97
+ else if (sign === " " || raw === "") {
98
+ h.old.push(text);
99
+ h.new.push(text);
100
+ }
101
+ }
102
+ }
103
+ done();
104
+ return out;
105
+ }
106
+
107
+ /** The text the model sees. A deny not about a key means block mode; an agent with no yes/no prompt turns "ask" into a
108
+ * stop. Both say what to do next. */
109
+ export function say(result, canAsk = false) {
110
+ const why = `SEO Supervisor guard: ${result?.reason || "this needs the owner's yes first."}`;
111
+ if (result?.decision === "deny" && result.rule !== "key")
112
+ return `${why} The guard is set to block. Tell the owner what you wanted to do and why; they can do it themselves or change the guard's mode. Don't work around it.`;
113
+ if (result?.decision !== "ask" || canAsk) return why;
114
+ // A change to the guard's own settings must come from the user, so turning the guard off isn't offered for it.
115
+ const or =
116
+ result.rule === "settings"
117
+ ? ""
118
+ : `, or let it through by setting "guard": "off" in seo-audit/settings.json for this one step (and back to "ask" after)`;
119
+ return `${why} This agent can't show a yes/no box, so the step was stopped. Ask the owner in chat. If they say yes, they can do it themselves${or}. Don't work around it.`;
120
+ }
121
+
122
+ /** The answer every adapter gives when the guard lets an action through, unless it says otherwise. */
123
+ export const SILENT = { stdout: "", stderr: "", exitCode: 0 };
124
+ export const json = (o, exitCode = 0, stderr = "") => ({ stdout: JSON.stringify(o), stderr, exitCode });
@@ -0,0 +1,37 @@
1
+ // @ts-check
2
+ // The guard's mode: ask (the default), block or off.
3
+ import { readFileSync } from "node:fs";
4
+ import { join } from "node:path";
5
+
6
+ const MODES = new Set(["ask", "block", "off"]);
7
+
8
+ /** seo-audit/settings.json in the working folder, else in the project folder Claude Code names, else {}. */
9
+ export function projectSettings(cwd = process.cwd(), env = process.env) {
10
+ for (const d of [cwd, env.CLAUDE_PROJECT_DIR]) {
11
+ if (!d) continue;
12
+ try {
13
+ return JSON.parse(readFileSync(join(d, "seo-audit", "settings.json"), "utf8")) || {};
14
+ } catch {}
15
+ }
16
+ return {};
17
+ }
18
+
19
+ /** One mode value as the guard reads it; an empty or unknown one is ask. @returns {"ask"|"block"|"off"} */
20
+ export const modeOf = v => {
21
+ const m = String(v ?? "")
22
+ .trim()
23
+ .toLowerCase();
24
+ return MODES.has(m) ? /** @type {"ask"|"block"|"off"} */ (m) : "ask";
25
+ };
26
+
27
+ // Claude Code exports the plugin's guard_mode setting to hooks as CLAUDE_PLUGIN_OPTION_GUARD_MODE; other agents use
28
+ // SEO_SUPERVISOR_GUARD or settings.json. Empty values are skipped.
29
+ // https://code.claude.com/docs/en/plugins-reference
30
+ /** @returns {"ask"|"block"|"off"} */
31
+ export function guardMode(env = process.env, cwd = process.cwd()) {
32
+ return modeOf(
33
+ [env.CLAUDE_PLUGIN_OPTION_GUARD_MODE, env.SEO_SUPERVISOR_GUARD, projectSettings(cwd, env).guard].find(x =>
34
+ String(x ?? "").trim(),
35
+ ),
36
+ );
37
+ }