Skip to content

A complete AI agency at your fingertips - From frontend wizards to Reddit community ninjas, from whimsy injectors to reality checkers. Each agent is a specialized expert with personality, processes, and proven deliverables.

Shell

Derive originality check's division set from divisions.json (#659)

Michael Sitarzewski217a63b8b6b6
diff --git a/scripts/check-agent-originality.sh b/scripts/check-agent-originality.sh
index 39b030a5..e55e4570 100755
--- a/scripts/check-agent-originality.sh
+++ b/scripts/check-agent-originality.sh
@@ -41,15 +41,18 @@ ORIGINALITY_FAIL="${ORIGINALITY_FAIL:-40}" \
ORIGINALITY_WARN="${ORIGINALITY_WARN:-20}" \
REPO_ROOT="$REPO_ROOT" \
python3 - "$@" <<'PYEOF'
-import os, re, sys, glob
+import os, re, sys, glob, json
REPO_ROOT = os.environ["REPO_ROOT"]
FAIL = float(os.environ["ORIGINALITY_FAIL"])
WARN = float(os.environ["ORIGINALITY_WARN"])
-AGENT_DIRS = ("academic design engineering finance game-development marketing "
- "paid-media product project-management sales spatial-computing "
- "specialized strategy support testing").split()
+# Division set — divisions.json (repo root) is the single source of truth, and
+# scripts/check-divisions.sh (CI) enforces it against the directories on disk.
+# Read it directly rather than hardcoding the list here so this check can never
+# drift out of sync with the catalog the way a copied literal silently would.
+with open(os.path.join(REPO_ROOT, "divisions.json")) as _fh:
+ AGENT_DIRS = sorted(json.load(_fh)["divisions"].keys())
# Proper nouns we neutralize so a find-replace re-skin (swap the country/platform
# and little else) still scores as a near-duplicate. Extend as new markets appear.