From 6a4fcc46ef3443568ba8dc461f63f226c39903c6 Mon Sep 17 00:00:00 2001 From: Security Auditor Date: Tue, 17 Mar 2026 23:29:43 +0200 Subject: [PATCH] refactor: sync agent directory lists across all scripts The three scripts (convert.sh, install.sh, lint-agents.sh) each maintained their own hardcoded list of agent category directories, which had drifted out of sync: - lint-agents.sh was missing: academic, sales, strategy - convert.sh was missing: strategy - install.sh duplicated the dir list inline in two functions Changes: - Add missing directories to all three scripts - Sort entries alphabetically for easier maintenance - Extract a shared AGENT_DIRS constant in install.sh (replaces two identical inline lists in install_claude_code and install_copilot) - Add a comment reminding maintainers to keep the lists in sync No behavioral changes for directories that already existed. --- scripts/convert.sh | 4 ++-- scripts/install.sh | 12 ++++++++---- scripts/lint-agents.sh | 7 +++++-- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/scripts/convert.sh b/scripts/convert.sh index 27d2f66e..ba05f71f 100755 --- a/scripts/convert.sh +++ b/scripts/convert.sh @@ -61,8 +61,8 @@ OUT_DIR="$REPO_ROOT/integrations" TODAY="$(date +%Y-%m-%d)" AGENT_DIRS=( - academic design engineering game-development marketing paid-media sales product project-management - testing support spatial-computing specialized + academic design engineering game-development marketing paid-media product project-management + sales spatial-computing specialized strategy support testing ) # --- Usage --- diff --git a/scripts/install.sh b/scripts/install.sh index 9bc4f1d8..e1ed4789 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -103,6 +103,12 @@ INTEGRATIONS="$REPO_ROOT/integrations" ALL_TOOLS=(claude-code copilot antigravity gemini-cli opencode openclaw cursor aider windsurf qwen) +# Standard agent category directories (keep sorted, sync with convert.sh / lint-agents.sh) +AGENT_DIRS=( + academic design engineering game-development marketing paid-media product project-management + sales spatial-computing specialized strategy support testing +) + # --------------------------------------------------------------------------- # Usage # --------------------------------------------------------------------------- @@ -298,8 +304,7 @@ install_claude_code() { local count=0 mkdir -p "$dest" local dir f first_line - for dir in academic design engineering game-development marketing paid-media sales product project-management \ - testing support spatial-computing specialized; do + for dir in "${AGENT_DIRS[@]}"; do [[ -d "$REPO_ROOT/$dir" ]] || continue while IFS= read -r -d '' f; do first_line="$(head -1 "$f")" @@ -317,8 +322,7 @@ install_copilot() { local count=0 mkdir -p "$dest_github" "$dest_copilot" local dir f first_line - for dir in academic design engineering game-development marketing paid-media sales product project-management \ - testing support spatial-computing specialized; do + for dir in "${AGENT_DIRS[@]}"; do [[ -d "$REPO_ROOT/$dir" ]] || continue while IFS= read -r -d '' f; do first_line="$(head -1 "$f")" diff --git a/scripts/lint-agents.sh b/scripts/lint-agents.sh index f5e3bb6f..709aab79 100755 --- a/scripts/lint-agents.sh +++ b/scripts/lint-agents.sh @@ -11,6 +11,7 @@ set -euo pipefail AGENT_DIRS=( + academic design engineering game-development @@ -18,10 +19,12 @@ AGENT_DIRS=( paid-media product project-management - testing - support + sales spatial-computing specialized + strategy + support + testing ) REQUIRED_FRONTMATTER=("name" "description" "color")