Skip to content

refactor: sync agent directory lists across all scripts#253

Open
BloodShop wants to merge 1 commit intomsitarzewski:mainfrom
BloodShop:refactor/sync-agent-dirs
Open

refactor: sync agent directory lists across all scripts#253
BloodShop wants to merge 1 commit intomsitarzewski:mainfrom
BloodShop:refactor/sync-agent-dirs

Conversation

@BloodShop
Copy link

Summary

The three shell scripts each maintained their own hardcoded list of agent category directories, which had drifted out of sync. This caused some agent categories to be silently skipped during linting, conversion, or installation.

Problem

Directory convert.sh install.sh lint-agents.sh
academic/ missing
sales/ missing
strategy/ missing missing missing

This means:

  • lint-agents.sh never linted agents in academic/, sales/, or strategy/
  • convert.sh never converted agents in strategy/
  • install.sh never installed agents from strategy/

Changes

1. Add missing directories to all three scripts

All scripts now include the same 14 directories, sorted alphabetically:

academic design engineering game-development marketing paid-media
product project-management sales spatial-computing specialized
strategy support testing

2. Extract shared AGENT_DIRS constant in install.sh

Previously, install_claude_code() and install_copilot() each had their own identical inline directory list. Now both reference a single AGENT_DIRS array, matching the pattern already used by convert.sh and lint-agents.sh.

3. Sort entries alphabetically

Makes it trivial to spot missing entries when new directories are added.

Files Changed

File Change
scripts/lint-agents.sh Added academic, sales, strategy; sorted entries
scripts/convert.sh Added strategy; sorted entries
scripts/install.sh Extracted AGENT_DIRS constant; added strategy; replaced 2 inline loops

Impact

  • 3 files changed, 15 insertions, 8 deletions
  • Zero breaking changes — only adds previously-skipped directories
  • Agents in academic/, sales/, and strategy/ will now be properly linted, converted, and installed
  • Future directory additions only need updating in one place per script (the AGENT_DIRS array)

Testing

# Verify lint now picks up all dirs
./scripts/lint-agents.sh

# Verify convert processes strategy/
./scripts/convert.sh --tool cursor
ls integrations/cursor/rules/ | grep strategy

# Verify install uses shared constant
grep -n 'AGENT_DIRS' scripts/install.sh

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant