Skip to content

Universal SEO skill for Claude Code. 26 sub-skills + 19 sub-agents covering technical SEO, E-E-A-T, schema, GEO/AEO, agent readiness (Lighthouse Agentic Browsing, WebMCP, llms.txt), backlinks, local SEO, e-commerce, international SEO, Google APIs, and PDF/Excel reporting. 9 optional extensions for live SEO data.

fix(seo_updates): accept --kind documentation

Agrici Danielfd4ee1c55417
diff --git a/scripts/seo_updates.py b/scripts/seo_updates.py
index 556f147..aaa926d 100644
--- a/scripts/seo_updates.py
+++ b/scripts/seo_updates.py
@@ -31,6 +31,14 @@ from typing import Iterable
_DATA_FILE = Path(__file__).resolve().parents[1] / "data" / "google-updates.json"
+# Every kind the ledger schema accepts. tests/test_content_quality.py asserts the
+# ledger only uses these, and the CLI --kind filter accepts exactly the same set.
+KNOWN_KINDS = (
+ "core", "spam", "core+spam", "policy", "qrg", "product", "schema", "cwv",
+ "discover", "documentation",
+)
+
+
def _load() -> dict:
with _DATA_FILE.open() as fh:
return json.load(fh)
@@ -70,7 +78,7 @@ def main() -> int:
parser.add_argument(
"--kind",
action="append",
- choices=("core", "spam", "core+spam", "policy", "qrg", "product", "schema", "cwv", "discover"),
+ choices=KNOWN_KINDS,
help="Filter to one or more kinds (repeatable).",
)
parser.add_argument(
diff --git a/tests/test_content_quality.py b/tests/test_content_quality.py
index 220e75d..7bd414c 100644
--- a/tests/test_content_quality.py
+++ b/tests/test_content_quality.py
@@ -273,6 +273,7 @@ def test_seo_updates_schema_and_order_are_enforced() -> None:
assert dates == sorted(dates), "updates[] must be chronological"
assert len(names) == len(set(names)), "update names must be unique"
+ assert set(seo_updates.KNOWN_KINDS) == allowed_kinds, "CLI --kind choices drifted from the schema"
assert all(entry["kind"] in allowed_kinds for entry in updates)
assert all(entry.get("notes", "").strip() for entry in updates)
assert all(date.fromisoformat(value) for value in dates)
@@ -317,3 +318,16 @@ def test_seo_updates_filter_by_year() -> None:
data = seo_updates._load()
since_2025 = seo_updates._filter(data["updates"], since="2025")
assert all(u["date"] >= "2025-01-01" for u in since_2025)
+
+
+def test_seo_updates_cli_accepts_every_known_kind() -> None:
+ """`--kind documentation` used to be rejected by argparse while the ledger used it."""
+ import subprocess, sys
+ script = REPO_ROOT / "scripts" / "seo_updates.py" if "REPO_ROOT" in globals() else Path(__file__).resolve().parents[1] / "scripts" / "seo_updates.py"
+ for kind in seo_updates.KNOWN_KINDS:
+ result = subprocess.run(
+ [sys.executable, str(script), "--kind", kind, "--json", "--limit", "1"],
+ capture_output=True, text=True,
+ )
+ assert result.returncode == 0, f"--kind {kind} failed: {result.stderr}"
+ json.loads(result.stdout)