xarchitecture
Design, analyze, and evolve system architecture using Domain-Driven Design, 12-Factor App, and proven patterns
Coordinate changes across multiple repositories with parallel agent orchestration
How it fires
How this command gets triggered: by you, by Claude, or both.
/xmultirepoContext preview
What this command does when you run it.
Coordinate changes across multiple repositories with parallel agent orchestration
description: Coordinate changes across multiple repositories with parallel agent orchestration tags: [multi-repo, orchestration, cross-repo, batch, coordination, automation]
Coordinate related changes across multiple repositories with discovery, planning, execution, and cross-repo validation.
**Coordinate a change across repos:**
/xmultirepo update logging library across all services /xmultirepo rename API endpoint /v1/users to /v2/users
**Specify target repos:**
/xmultirepo --repos ~/Code/api,~/Code/frontend,~/Code/shared -- migrate from axios to fetch
**Discover and plan only (no changes):**
/xmultirepo --plan-only find all uses of deprecated config format
**Help and options:**
/xmultirepo help /xmultirepo --help
**`--repos <paths>`** - Comma-separated list of repository paths
/xmultirepo --repos ~/Code/svc-auth,~/Code/svc-orders -- update JWT library
**`--plan-only`** - Discover and plan without executing changes
/xmultirepo --plan-only find hardcoded URLs
**`--dry-run`** - Show what would change without modifying files
/xmultirepo --dry-run migrate config format
**`--branch <name>`** - Use a consistent branch name across repos
/xmultirepo --branch feat/new-logging -- update logging
If $ARGUMENTS contains "help" or "--help": Display this usage information and exit.
If $ARGUMENTS is empty: Tell the user: "Describe the change to coordinate across repos. Example: /xmultirepo update shared library version across all services" Stop and wait for input.
Extract from $ARGUMENTS:
If `--repos` was provided:
If `--repos` was NOT provided:
for dir in ../*/; do
if [ -d "$dir/.git" ]; then
echo "$dir"
fi
doneFound N repositories: 1. ~/Code/api (branch: main, clean) 2. ~/Code/frontend (branch: main, 2 uncommitted changes) 3. ~/Code/shared (branch: feat/wip, clean) Which repos should be included? (all / comma-separated numbers / none)
Stop and wait for user confirmation before proceeding.
For each confirmed repository, gather context:
Present a discovery summary:
## Discovery Report ### ~/Code/api - Language: TypeScript (Node.js) - Occurrences: 12 matches in 5 files - Key files: src/lib/logger.ts, src/middleware/logging.ts ### ~/Code/frontend - Language: TypeScript (React) - Occurrences: 3 matches in 2 files - Key files: src/utils/logger.ts ### ~/Code/shared - Language: TypeScript - Occurrences: 1 match in 1 file - Key files: src/logging.ts (this is the shared module)
Create a sequenced plan that respects dependency order:
## Execution Plan ### Dependency Order Shared libraries and packages change first, consumers change last. | Order | Repository | Changes | Estimated Impact | |-------|-----------|---------|-----------------| | 1 | ~/Code/shared | Update logging module | Low (1 file) | | 2 | ~/Code/api | Update imports, adapt calls | Medium (5 files) | | 3 | ~/Code/frontend | Update imports, adapt calls | Low (2 files) | ### Per-Repository Steps **1. ~/Code/shared** - [ ] Create branch: `feat/update-logging` - [ ] Modify src/logging.ts - [ ] Run tests - [ ] Commit changes **2. ~/Code/api** (after shared) - [ ] Create branch: `feat/update-logging` - [ ] Update imports in 5 files - [ ] Run tests - [ ] Commit changes **3. ~/Code/frontend** (after shared) - [ ] Create branch: `feat/update-logging` - [ ] Update imports in 2 files - [ ] Run tests - [ ] Commit changes
If `--plan-only` was specified:
**Ask the user to confirm the plan before executing.**
For each repository in dependency order:
1. **Change directory** to the repo 2. **Create branch** using `--branch` value or generated name 3. **Execute the changes** as described in the plan 4. **Run validation**:
5. **Report result** before moving to next repo
If `--dry-run` was specified, show diffs without writing files.
If a repo fails validation:
After all repos are modified, verify consistency:
Report any inconsistencies found:
## Cross-Repo Validation [PASS] Version alignment: all repos reference shared@2.1.0 [PASS] API contracts: logging.info() signature matches in 3/3 repos [WARN] Config key: api uses LOG_LEVEL, frontend uses LOGGING_LEVEL
##
Transform Claude Code into a complete development platform with 45 AI-powered commands that automate your entire software development workflow. Now with improved git identity management!
Design, analyze, and evolve system architecture using Domain-Driven Design, 12-Factor App, and proven patterns
Manage project configuration files, environment variables, and application settings
Continue an execution plan from where it left off across sessions
Interactive debugging support with error analysis and fix suggestions - integrates with Debug Specialist sub-agent for complex…