feat(init): interactive agent selection during ox init and integrate#509
feat(init): interactive agent selection during ox init and integrate#509rsnodgrass merged 1 commit intomainfrom
Conversation
Co-Authored-By: SageOx <ox@sageox.ai> SageOx-Session: https://sageox.ai/repo/repo_019c5812-01e9-7b7d-b5b1-321c471c9777/sessions/2026-04-13T15-04-ryan-OxcXPu/view
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughMulti-agent selection support introduced to initialization and integration commands with a new interactive multi-select UI component. Users can now select which agent adapters to configure during Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant CLI as ox init
participant Selector as selectAgentsForInit
participant Hooks as installAgentHooks
participant Config as Config/Hooks
User->>CLI: ox init [--agents flag]
CLI->>Selector: Detect repo & available agents
alt --agents provided
Selector->>Selector: Parse agent names
else Interactive mode
Selector->>User: Multi-select UI
User->>Selector: Select agents
else Non-interactive mode
Selector->>Selector: Default to claude-code
end
Selector-->>CLI: Return selectedAgents map
alt claude-code selected
CLI->>Config: Inject Claude Code config
CLI->>Config: Install slash commands
end
CLI->>Hooks: installAgentHooks(selectedAgents)
Hooks->>Config: Install selected agent hooks
Config-->>Hooks: Success
Hooks-->>CLI: Complete
CLI-->>User: Integration summary
sequenceDiagram
participant User
participant CLI as ox integrate
participant Detector as Agent Detector
participant UI as SelectMany UI
participant Installer as Agent Installers
participant Status as Status Display
User->>CLI: ox integrate (interactive, no flags)
CLI->>Detector: Detect git root & agents
Detector->>Detector: Enumerate Claude Code hooks
Detector->>Detector: Discover external adapters
Detector->>Detector: Check for OpenCode
Detector->>Detector: Precompute install status
Detector-->>CLI: Return agent info list
CLI->>UI: SelectMany(agents with status)
UI->>User: Display multi-select with disabled installed
User->>UI: Select agents to install
UI-->>CLI: Return selected agents
loop For each selected agent
CLI->>Installer: Run agent installer
Installer->>Status: Update install status
Status-->>CLI: Success/warning
end
CLI-->>User: Per-agent status report
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Summary
ox initwas aggressively installing hooks for ALL discovered adapter binaries (.codex, .factory, .gemini, .opencode) without asking — bad DXox initletting users choose which AI coworkers to configureox integrate install(no flags) now shows the same interactive selector, with already-installed agents greyed outox integrate listdynamically shows status of all discovered adapters instead of hardcoded Claude Code only--agentsflag onox initfor scripted/CI usage (e.g.,ox init --agents claude-code,gemini)flowchart TD A[ox init] --> B{--agents flag?} B -->|yes| C[parse flag, skip prompt] B -->|no| D{interactive TTY?} D -->|no| E[Claude Code only] D -->|yes| F[discover adapters] F --> G[filter by Detect] G --> H[multi-select prompt] H --> I[install selected agents]Test plan
ox initin fresh repo — verify multi-select appears with Claude Code pre-checked.claude/directory createdox init --agents gemini— verify only Gemini + no promptecho | ox init) — verify Claude Code only, no promptox integrate install— verify interactive selector with installed agents greyed outox integrate list— verify all discovered adapters shown with statusmake lint && make test— 13,097 tests pass, 0 lint issuesCo-Authored-By: SageOx ox@sageox.ai
Summary by CodeRabbit
--agentsCLI flag to specify agent adapters to configure during initialization