Skip to content

feat: add --division flag for selective agent installation#157

Open
kienbui1995 wants to merge 1 commit intomsitarzewski:mainfrom
kienbui1995:fix/selective-division-install
Open

feat: add --division flag for selective agent installation#157
kienbui1995 wants to merge 1 commit intomsitarzewski:mainfrom
kienbui1995:fix/selective-division-install

Conversation

@kienbui1995
Copy link

@kienbui1995 kienbui1995 commented Mar 12, 2026

Closes #134

What

Adds a --division flag to install.sh so users can install agents from specific divisions only, instead of all 120 agents.

Usage

# Install only engineering agents
./scripts/install.sh --tool claude-code --division engineering

# Install multiple divisions (comma-separated)
./scripts/install.sh --tool copilot --division engineering,design

# Invalid division names are caught with helpful error
./scripts/install.sh --division invalid
# [ERR] Unknown division 'invalid'. Valid: design engineering ...

How It Works

  • claude-code/copilot: Filters source directories directly
  • cursor/antigravity/gemini-cli/opencode/openclaw: Builds allowed slug set from source files in filtered divisions, then matches integration filenames
  • aider/windsurf: Single-file output, division filter not applicable (installs full file)
  • No flag = installs all divisions (fully backward compatible)

Test Results

$ ./scripts/install.sh --tool claude-code --division engineering
  Divisions:  engineering
  Claude Code: 16 agents

$ ./scripts/install.sh --tool claude-code --division engineering,design,testing
  Divisions:  engineering design testing
  Claude Code: 32 agents

$ ./scripts/install.sh --tool copilot --division sales
  Divisions:  sales
  Copilot: 8 agents

$ ./scripts/install.sh --tool claude-code
  Claude Code: 120 agents  (no flag = all, backward compatible)

$ ./scripts/install.sh --division fake
  [ERR] Unknown division 'fake'. Valid: design engineering game-development ...

Per-division breakdown (all verified)

Division Agents
design 8
engineering 16
game-development 19
marketing 18
paid-media 7
sales 8
product 4
project-management 6
testing 8
support 6
spatial-computing 6
specialized 14
Total 120 ✅ matches full install

Changes

  • 1 file changed: scripts/install.sh (+84 lines)
  • Added --division flag parsing with validation
  • Added active_divisions(), slug_allowed() filtering helpers
  • Updated all 7 per-tool installers to respect division filter
  • Zero changes to existing behavior when flag is not used

Adds --division flag to install.sh allowing users to install agents from
specific divisions only, instead of all agents.

Usage:
  ./scripts/install.sh --tool claude-code --division engineering
  ./scripts/install.sh --tool copilot --division engineering,design

Works across all supported tools:
- claude-code/copilot: filters source directories directly
- cursor/antigravity/gemini-cli/opencode/openclaw: filters by agent slug

Closes msitarzewski#134
@msitarzewski
Copy link
Owner

Hey @kienbui1995 — love this feature, it's a commonly requested one (see #134). The implementation is clean and backward-compatible.

One thing before we merge: get_field() and slugify() are duplicated from convert.sh. Could you source them from a shared location instead? A small scripts/lib.sh with the common helpers that both scripts source would keep things DRY. Something like:

# scripts/lib.sh
slugify() { ... }
get_field() { ... }
get_body() { ... }

Then both convert.sh and install.sh can . "$SCRIPT_DIR/lib.sh". Keeps maintenance simple as the helper logic evolves.

Otherwise this is good to go!

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.

How to install the specified Agent folder

3 participants