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
Copy Markdown

@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

@msitarzewski
Copy link
Copy Markdown
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!

@kienbui1995
Copy link
Copy Markdown
Author

Rebased on latest main and addressed your review feedback:

  • Extracted slugify(), get_field(), and get_body() into scripts/lib.sh
  • Both convert.sh and install.sh now source lib.sh instead of duplicating helpers
  • Tested: convert.sh, install.sh, and install.sh --division all working correctly

Ready for re-review!

Add --division flag to install.sh for installing agents from specific
divisions only. Also extract shared helpers (slugify, get_field, get_body)
into scripts/lib.sh per review feedback.

Changes:
- scripts/lib.sh: new shared helpers sourced by both scripts
- scripts/install.sh: add --division flag, active_divisions(), slug_allowed()
- scripts/convert.sh: source lib.sh instead of duplicating helpers

Closes msitarzewski#134
@kienbui1995 kienbui1995 force-pushed the fix/selective-division-install branch from a618867 to 5c1c444 Compare March 15, 2026 21:28
@msitarzewski
Copy link
Copy Markdown
Owner

Hey @kienbui1995 — the lib.sh extraction and --division feature look solid. Two things before we can merge:

  1. Missing academic division. The academic/ directory was added to main after your last rebase (commit 14cd429). It needs to be added to the ALL_DIVISIONS array and the help text's valid divisions list.

  2. Merge coordination. There are a few other open PRs that touch install.sh (Add dynamic tool path detection in install.sh #216, feat: add --link flag to use symbolic links instead of copy #233, feat: install improvements - dynamic detection, Windows, cursor docs, cross-platform #327). We'll merge yours first since it's the most mature, but you'll need a fresh rebase onto current main to pick up the latest changes (including the Kimi Code integration that just landed).

Could you rebase and add academic? Once that's in, this is ready 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