agent-multi-repo-swarm
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesename: multi-repo-swarm
description: Cross-repository swarm orchestration for organization-wide automation and intelligent collaboration
type: coordination
color: "#FF6B35"
tools:
- Bash
- Read
- Write
- Edit
- Glob
- Grep
- LS
- TodoWrite
- mcp__claude-flow__swarm_init
- mcp__claude-flow__agent_spawn
- mcp__claude-flow__task_orchestrate
- mcp__claude-flow__swarm_status
- mcp__claude-flow__memory_usage
- mcp__claude-flow__github_repo_analyze
- mcp__claude-flow__github_pr_manage
- mcp__claude-flow__github_sync_coord
- mcp__claude-flow__github_metrics
hooks:
pre:
- "gh auth status || (echo 'GitHub CLI not authenticated' && exit 1)"
- "git status --porcelain || echo 'Not in git repository'"
- "gh repo list --limit 1 >$dev$null || (echo 'No repo access' && exit 1)" post:
- "gh pr list --state open --limit 5 | grep -q . && echo 'Active PRs found'"
- "git log --oneline -5 | head -3"
- "gh repo view --json name,description,topics"
name: multi-repo-swarm
description: 面向全组织自动化与智能协作的跨仓库Swarm编排
type: coordination
color: "#FF6B35"
tools:
- Bash
- Read
- Write
- Edit
- Glob
- Grep
- LS
- TodoWrite
- mcp__claude-flow__swarm_init
- mcp__claude-flow__agent_spawn
- mcp__claude-flow__task_orchestrate
- mcp__claude-flow__swarm_status
- mcp__claude-flow__memory_usage
- mcp__claude-flow__github_repo_analyze
- mcp__claude-flow__github_pr_manage
- mcp__claude-flow__github_sync_coord
- mcp__claude-flow__github_metrics
hooks:
pre:
- "gh auth status || (echo 'GitHub CLI not authenticated' && exit 1)"
- "git status --porcelain || echo 'Not in git repository'"
- "gh repo list --limit 1 >$dev$null || (echo 'No repo access' && exit 1)" post:
- "gh pr list --state open --limit 5 | grep -q . && echo 'Active PRs found'"
- "git log --oneline -5 | head -3"
- "gh repo view --json name,description,topics"
Multi-Repo Swarm - Cross-Repository Swarm Orchestration
Multi-Repo Swarm - 跨仓库Swarm编排
Overview
概述
Coordinate AI swarms across multiple repositories, enabling organization-wide automation and intelligent cross-project collaboration.
跨多个仓库协调AI Swarm,实现全组织自动化与跨项目智能协作。
Core Features
核心功能
1. Cross-Repo Initialization
1. 跨仓库初始化
bash
undefinedbash
undefinedInitialize multi-repo swarm with gh CLI
Initialize multi-repo swarm with gh CLI
List organization repositories
List organization repositories
REPOS=$(gh repo list org --limit 100 --json name,description,languages
--jq '.[] | select(.name | test("frontend|backend|shared"))')
--jq '.[] | select(.name | test("frontend|backend|shared"))')
REPOS=$(gh repo list org --limit 100 --json name,description,languages
--jq '.[] | select(.name | test("frontend|backend|shared"))')
--jq '.[] | select(.name | test("frontend|backend|shared"))')
Get repository details
Get repository details
REPO_DETAILS=$(echo "$REPOS" | jq -r '.name' | while read -r repo; do
gh api repos$org/$repo --jq '{name, default_branch, languages, topics}'
done | jq -s '.')
REPO_DETAILS=$(echo "$REPOS" | jq -r '.name' | while read -r repo; do
gh api repos$org/$repo --jq '{name, default_branch, languages, topics}'
done | jq -s '.')
Initialize swarm with repository context
Initialize swarm with repository context
npx ruv-swarm github multi-repo-init
--repo-details "$REPO_DETAILS"
--repos "org$frontend,org$backend,org$shared"
--topology hierarchical
--shared-memory
--sync-strategy eventual
--repo-details "$REPO_DETAILS"
--repos "org$frontend,org$backend,org$shared"
--topology hierarchical
--shared-memory
--sync-strategy eventual
undefinednpx ruv-swarm github multi-repo-init
--repo-details "$REPO_DETAILS"
--repos "org$frontend,org$backend,org$shared"
--topology hierarchical
--shared-memory
--sync-strategy eventual
--repo-details "$REPO_DETAILS"
--repos "org$frontend,org$backend,org$shared"
--topology hierarchical
--shared-memory
--sync-strategy eventual
undefined2. Repository Discovery
2. 仓库发现
bash
undefinedbash
undefinedAuto-discover related repositories with gh CLI
Auto-discover related repositories with gh CLI
Search organization repositories
Search organization repositories
REPOS=$(gh repo list my-organization --limit 100
--json name,description,languages,topics
--jq '.[] | select(.languages | keys | contains(["TypeScript"]))')
--json name,description,languages,topics
--jq '.[] | select(.languages | keys | contains(["TypeScript"]))')
REPOS=$(gh repo list my-organization --limit 100
--json name,description,languages,topics
--jq '.[] | select(.languages | keys | contains(["TypeScript"]))')
--json name,description,languages,topics
--jq '.[] | select(.languages | keys | contains(["TypeScript"]))')
Analyze repository dependencies
Analyze repository dependencies
DEPS=$(echo "$REPOS" | jq -r '.name' | while read -r repo; do
Get package.json if it exists
if gh api repos$my-organization/$repo$contents$package.json --jq '.content' 2>$dev$null; then
gh api repos$my-organization/$repo$contents$package.json
--jq '.content' | base64 -d | jq '{name, dependencies, devDependencies}' fi done | jq -s '.')
--jq '.content' | base64 -d | jq '{name, dependencies, devDependencies}' fi done | jq -s '.')
DEPS=$(echo "$REPOS" | jq -r '.name' | while read -r repo; do
Get package.json if it exists
if gh api repos$my-organization/$repo$contents$package.json --jq '.content' 2>$dev$null; then
gh api repos$my-organization/$repo$contents$package.json
--jq '.content' | base64 -d | jq '{name, dependencies, devDependencies}' fi done | jq -s '.')
--jq '.content' | base64 -d | jq '{name, dependencies, devDependencies}' fi done | jq -s '.')
Discover and analyze
Discover and analyze
npx ruv-swarm github discover-repos
--repos "$REPOS"
--dependencies "$DEPS"
--analyze-dependencies
--suggest-swarm-topology
--repos "$REPOS"
--dependencies "$DEPS"
--analyze-dependencies
--suggest-swarm-topology
undefinednpx ruv-swarm github discover-repos
--repos "$REPOS"
--dependencies "$DEPS"
--analyze-dependencies
--suggest-swarm-topology
--repos "$REPOS"
--dependencies "$DEPS"
--analyze-dependencies
--suggest-swarm-topology
undefined3. Synchronized Operations
3. 同步操作
bash
undefinedbash
undefinedExecute synchronized changes across repos with gh CLI
Execute synchronized changes across repos with gh CLI
Get matching repositories
Get matching repositories
MATCHING_REPOS=$(gh repo list org --limit 100 --json name
--jq '.[] | select(.name | test("-service$")) | .name')
--jq '.[] | select(.name | test("-service$")) | .name')
MATCHING_REPOS=$(gh repo list org --limit 100 --json name
--jq '.[] | select(.name | test("-service$")) | .name')
--jq '.[] | select(.name | test("-service$")) | .name')
Execute task and create PRs
Execute task and create PRs
echo "$MATCHING_REPOS" | while read -r repo; do
Clone repo
gh repo clone org/$repo $tmp/$repo -- --depth=1
Execute task
cd $tmp/$repo
npx ruv-swarm github task-execute
--task "update-dependencies"
--repo "org/$repo"
--task "update-dependencies"
--repo "org/$repo"
Create PR if changes exist
if [[ -n $(git status --porcelain) ]]; then
git checkout -b update-dependencies-$(date +%Y%m%d)
git add -A
git commit -m "chore: Update dependencies"
# Push and create PR
git push origin HEAD
PR_URL=$(gh pr create \
--title "Update dependencies" \
--body "Automated dependency update across services" \
--label "dependencies,automated")
echo "$PR_URL" >> $tmp$created-prs.txtfi
cd -
done
echo "$MATCHING_REPOS" | while read -r repo; do
Clone repo
gh repo clone org/$repo $tmp/$repo -- --depth=1
Execute task
cd $tmp/$repo
npx ruv-swarm github task-execute
--task "update-dependencies"
--repo "org/$repo"
--task "update-dependencies"
--repo "org/$repo"
Create PR if changes exist
if [[ -n $(git status --porcelain) ]]; then
git checkout -b update-dependencies-$(date +%Y%m%d)
git add -A
git commit -m "chore: Update dependencies"
# Push and create PR
git push origin HEAD
PR_URL=$(gh pr create \
--title "Update dependencies" \
--body "Automated dependency update across services" \
--label "dependencies,automated")
echo "$PR_URL" >> $tmp$created-prs.txtfi
cd -
done
Link related PRs
Link related PRs
PR_URLS=$(cat $tmp$created-prs.txt)
npx ruv-swarm github link-prs --urls "$PR_URLS"
undefinedPR_URLS=$(cat $tmp$created-prs.txt)
npx ruv-swarm github link-prs --urls "$PR_URLS"
undefinedConfiguration
配置
Multi-Repo Config File
多仓库配置文件
yaml
undefinedyaml
undefined.swarm$multi-repo.yml
.swarm$multi-repo.yml
version: 1
organization: my-org
repositories:
-
name: frontend url: github.com$my-org$frontend role: ui agents: [coder, designer, tester]
-
name: backend url: github.com$my-org$backend role: api agents: [architect, coder, tester]
-
name: shared url: github.com$my-org$shared role: library agents: [analyst, coder]
coordination:
topology: hierarchical
communication: webhook
memory: redis:/$shared-memory
dependencies:
- from: frontend to: [backend, shared]
- from: backend to: [shared]
undefinedversion: 1
organization: my-org
repositories:
-
name: frontend url: github.com$my-org$frontend role: ui agents: [coder, designer, tester]
-
name: backend url: github.com$my-org$backend role: api agents: [architect, coder, tester]
-
name: shared url: github.com$my-org$shared role: library agents: [analyst, coder]
coordination:
topology: hierarchical
communication: webhook
memory: redis:/$shared-memory
dependencies:
- from: frontend to: [backend, shared]
- from: backend to: [shared]
undefinedRepository Roles
仓库角色
javascript
// Define repository roles and responsibilities
{
"roles": {
"ui": {
"responsibilities": ["user-interface", "ux", "accessibility"],
"default-agents": ["designer", "coder", "tester"]
},
"api": {
"responsibilities": ["endpoints", "business-logic", "data"],
"default-agents": ["architect", "coder", "security"]
},
"library": {
"responsibilities": ["shared-code", "utilities", "types"],
"default-agents": ["analyst", "coder", "documenter"]
}
}
}javascript
// Define repository roles and responsibilities
{
"roles": {
"ui": {
"responsibilities": ["user-interface", "ux", "accessibility"],
"default-agents": ["designer", "coder", "tester"]
},
"api": {
"responsibilities": ["endpoints", "business-logic", "data"],
"default-agents": ["architect", "coder", "security"]
},
"library": {
"responsibilities": ["shared-code", "utilities", "types"],
"default-agents": ["analyst", "coder", "documenter"]
}
}
}Orchestration Commands
编排命令
Dependency Management
依赖管理
bash
undefinedbash
undefinedUpdate dependencies across all repos with gh CLI
Update dependencies across all repos with gh CLI
Create tracking issue first
Create tracking issue first
TRACKING_ISSUE=$(gh issue create
--title "Dependency Update: typescript@5.0.0"
--body "Tracking issue for updating TypeScript across all repositories"
--label "dependencies,tracking"
--json number -q .number)
--title "Dependency Update: typescript@5.0.0"
--body "Tracking issue for updating TypeScript across all repositories"
--label "dependencies,tracking"
--json number -q .number)
TRACKING_ISSUE=$(gh issue create
--title "Dependency Update: typescript@5.0.0"
--body "Tracking issue for updating TypeScript across all repositories"
--label "dependencies,tracking"
--json number -q .number)
--title "Dependency Update: typescript@5.0.0"
--body "Tracking issue for updating TypeScript across all repositories"
--label "dependencies,tracking"
--json number -q .number)
Get all repos with TypeScript
Get all repos with TypeScript
TS_REPOS=$(gh repo list org --limit 100 --json name | jq -r '.[].name' |
while read -r repo; do if gh api repos$org/$repo$contents$package.json 2>$dev$null |
jq -r '.content' | base64 -d | grep -q '"typescript"'; then echo "$repo" fi done)
while read -r repo; do if gh api repos$org/$repo$contents$package.json 2>$dev$null |
jq -r '.content' | base64 -d | grep -q '"typescript"'; then echo "$repo" fi done)
TS_REPOS=$(gh repo list org --limit 100 --json name | jq -r '.[].name' |
while read -r repo; do if gh api repos$org/$repo$contents$package.json 2>$dev$null |
jq -r '.content' | base64 -d | grep -q '"typescript"'; then echo "$repo" fi done)
while read -r repo; do if gh api repos$org/$repo$contents$package.json 2>$dev$null |
jq -r '.content' | base64 -d | grep -q '"typescript"'; then echo "$repo" fi done)
Update each repository
Update each repository
echo "$TS_REPOS" | while read -r repo; do
Clone and update
gh repo clone org/$repo $tmp/$repo -- --depth=1
cd $tmp/$repo
Update dependency
npm install --save-dev typescript@5.0.0
Test changes
if npm test; then
# Create PR
git checkout -b update-typescript-5
git add package.json package-lock.json
git commit -m "chore: Update TypeScript to 5.0.0
Part of #$TRACKING_ISSUE"
git push origin HEAD
gh pr create \
--title "Update TypeScript to 5.0.0" \
--body "Updates TypeScript to version 5.0.0\n\nTracking: #$TRACKING_ISSUE" \
--label "dependencies"else
# Report failure
gh issue comment $TRACKING_ISSUE
--body "❌ Failed to update $repo - tests failing" fi cd - done
--body "❌ Failed to update $repo - tests failing" fi cd - done
undefinedecho "$TS_REPOS" | while read -r repo; do
Clone and update
gh repo clone org/$repo $tmp/$repo -- --depth=1
cd $tmp/$repo
Update dependency
npm install --save-dev typescript@5.0.0
Test changes
if npm test; then
# Create PR
git checkout -b update-typescript-5
git add package.json package-lock.json
git commit -m "chore: Update TypeScript to 5.0.0
Part of #$TRACKING_ISSUE"
git push origin HEAD
gh pr create \
--title "Update TypeScript to 5.0.0" \
--body "Updates TypeScript to version 5.0.0\n\nTracking: #$TRACKING_ISSUE" \
--label "dependencies"else
# Report failure
gh issue comment $TRACKING_ISSUE
--body "❌ Failed to update $repo - tests failing" fi cd - done
--body "❌ Failed to update $repo - tests failing" fi cd - done
undefinedRefactoring Operations
重构操作
bash
undefinedbash
undefinedCoordinate large-scale refactoring
Coordinate large-scale refactoring
npx ruv-swarm github multi-repo-refactor
--pattern "rename:OldAPI->NewAPI"
--analyze-impact
--create-migration-guide
--staged-rollout
--pattern "rename:OldAPI->NewAPI"
--analyze-impact
--create-migration-guide
--staged-rollout
undefinednpx ruv-swarm github multi-repo-refactor
--pattern "rename:OldAPI->NewAPI"
--analyze-impact
--create-migration-guide
--staged-rollout
--pattern "rename:OldAPI->NewAPI"
--analyze-impact
--create-migration-guide
--staged-rollout
undefinedSecurity Updates
安全更新
bash
undefinedbash
undefinedCoordinate security patches
Coordinate security patches
npx ruv-swarm github multi-repo-security
--scan-all
--patch-vulnerabilities
--verify-fixes
--compliance-report
--scan-all
--patch-vulnerabilities
--verify-fixes
--compliance-report
undefinednpx ruv-swarm github multi-repo-security
--scan-all
--patch-vulnerabilities
--verify-fixes
--compliance-report
--scan-all
--patch-vulnerabilities
--verify-fixes
--compliance-report
undefinedCommunication Strategies
通信策略
1. Webhook-Based Coordination
1. 基于Webhook的协调
javascript
// webhook-coordinator.js
const { MultiRepoSwarm } = require('ruv-swarm');
const swarm = new MultiRepoSwarm({
webhook: {
url: 'https:/$swarm-coordinator.example.com',
secret: process.env.WEBHOOK_SECRET
}
});
// Handle cross-repo events
swarm.on('repo:update', async (event) => {
await swarm.propagate(event, {
to: event.dependencies,
strategy: 'eventual-consistency'
});
});javascript
// webhook-coordinator.js
const { MultiRepoSwarm } = require('ruv-swarm');
const swarm = new MultiRepoSwarm({
webhook: {
url: 'https:/$swarm-coordinator.example.com',
secret: process.env.WEBHOOK_SECRET
}
});
// Handle cross-repo events
swarm.on('repo:update', async (event) => {
await swarm.propagate(event, {
to: event.dependencies,
strategy: 'eventual-consistency'
});
});2. GraphQL Federation
2. GraphQL联邦
graphql
undefinedgraphql
undefinedFederated schema for multi-repo queries
Federated schema for multi-repo queries
type Repository @key(fields: "id") {
id: ID!
name: String!
swarmStatus: SwarmStatus!
dependencies: [Repository!]!
agents: [Agent!]!
}
type SwarmStatus {
active: Boolean!
topology: Topology!
tasks: [Task!]!
memory: JSON!
}
undefinedtype Repository @key(fields: "id") {
id: ID!
name: String!
swarmStatus: SwarmStatus!
dependencies: [Repository!]!
agents: [Agent!]!
}
type SwarmStatus {
active: Boolean!
topology: Topology!
tasks: [Task!]!
memory: JSON!
}
undefined3. Event Streaming
3. 事件流
yaml
undefinedyaml
undefinedKafka configuration for real-time coordination
Kafka configuration for real-time coordination
kafka:
brokers: ['kafka1:9092', 'kafka2:9092']
topics:
swarm-events:
partitions: 10
replication: 3
swarm-memory:
partitions: 5
replication: 3
undefinedkafka:
brokers: ['kafka1:9092', 'kafka2:9092']
topics:
swarm-events:
partitions: 10
replication: 3
swarm-memory:
partitions: 5
replication: 3
undefinedAdvanced Features
高级功能
1. Distributed Task Queue
1. 分布式任务队列
bash
undefinedbash
undefinedCreate distributed task queue
Create distributed task queue
npx ruv-swarm github multi-repo-queue
--backend redis
--workers 10
--priority-routing
--dead-letter-queue
--backend redis
--workers 10
--priority-routing
--dead-letter-queue
undefinednpx ruv-swarm github multi-repo-queue
--backend redis
--workers 10
--priority-routing
--dead-letter-queue
--backend redis
--workers 10
--priority-routing
--dead-letter-queue
undefined2. Cross-Repo Testing
2. 跨仓库测试
bash
undefinedbash
undefinedRun integration tests across repos
Run integration tests across repos
npx ruv-swarm github multi-repo-test
--setup-test-env
--link-services
--run-e2e
--tear-down
--setup-test-env
--link-services
--run-e2e
--tear-down
undefinednpx ruv-swarm github multi-repo-test
--setup-test-env
--link-services
--run-e2e
--tear-down
--setup-test-env
--link-services
--run-e2e
--tear-down
undefined3. Monorepo Migration
3. 单体仓库迁移
bash
undefinedbash
undefinedAssist in monorepo migration
Assist in monorepo migration
npx ruv-swarm github to-monorepo
--analyze-repos
--suggest-structure
--preserve-history
--create-migration-prs
--analyze-repos
--suggest-structure
--preserve-history
--create-migration-prs
undefinednpx ruv-swarm github to-monorepo
--analyze-repos
--suggest-structure
--preserve-history
--create-migration-prs
--analyze-repos
--suggest-structure
--preserve-history
--create-migration-prs
undefinedMonitoring & Visualization
监控与可视化
Multi-Repo Dashboard
多仓库仪表盘
bash
undefinedbash
undefinedLaunch monitoring dashboard
Launch monitoring dashboard
npx ruv-swarm github multi-repo-dashboard
--port 3000
--metrics "agent-activity,task-progress,memory-usage"
--real-time
--port 3000
--metrics "agent-activity,task-progress,memory-usage"
--real-time
undefinednpx ruv-swarm github multi-repo-dashboard
--port 3000
--metrics "agent-activity,task-progress,memory-usage"
--real-time
--port 3000
--metrics "agent-activity,task-progress,memory-usage"
--real-time
undefinedDependency Graph
依赖图谱
bash
undefinedbash
undefinedVisualize repo dependencies
Visualize repo dependencies
npx ruv-swarm github dep-graph
--format mermaid
--include-agents
--show-data-flow
--format mermaid
--include-agents
--show-data-flow
undefinednpx ruv-swarm github dep-graph
--format mermaid
--include-agents
--show-data-flow
--format mermaid
--include-agents
--show-data-flow
undefinedHealth Monitoring
健康监控
bash
undefinedbash
undefinedMonitor swarm health across repos
Monitor swarm health across repos
npx ruv-swarm github health-check
--repos "org/*"
--check "connectivity,memory,agents"
--alert-on-issues
--repos "org/*"
--check "connectivity,memory,agents"
--alert-on-issues
undefinednpx ruv-swarm github health-check
--repos "org/*"
--check "connectivity,memory,agents"
--alert-on-issues
--repos "org/*"
--check "connectivity,memory,agents"
--alert-on-issues
undefinedSynchronization Patterns
同步模式
1. Eventually Consistent
1. 最终一致性
javascript
// Eventual consistency for non-critical updates
{
"sync": {
"strategy": "eventual",
"max-lag": "5m",
"retry": {
"attempts": 3,
"backoff": "exponential"
}
}
}javascript
// Eventual consistency for non-critical updates
{
"sync": {
"strategy": "eventual",
"max-lag": "5m",
"retry": {
"attempts": 3,
"backoff": "exponential"
}
}
}2. Strong Consistency
2. 强一致性
javascript
// Strong consistency for critical operations
{
"sync": {
"strategy": "strong",
"consensus": "raft",
"quorum": 0.51,
"timeout": "30s"
}
}javascript
// Strong consistency for critical operations
{
"sync": {
"strategy": "strong",
"consensus": "raft",
"quorum": 0.51,
"timeout": "30s"
}
}3. Hybrid Approach
3. 混合方式
javascript
// Mix of consistency levels
{
"sync": {
"default": "eventual",
"overrides": {
"security-updates": "strong",
"dependency-updates": "strong",
"documentation": "eventual"
}
}
}javascript
// Mix of consistency levels
{
"sync": {
"default": "eventual",
"overrides": {
"security-updates": "strong",
"dependency-updates": "strong",
"documentation": "eventual"
}
}
}Use Cases
使用场景
1. Microservices Coordination
1. 微服务协调
bash
undefinedbash
undefinedCoordinate microservices development
Coordinate microservices development
npx ruv-swarm github microservices
--services "auth,users,orders,payments"
--ensure-compatibility
--sync-contracts
--integration-tests
--services "auth,users,orders,payments"
--ensure-compatibility
--sync-contracts
--integration-tests
undefinednpx ruv-swarm github microservices
--services "auth,users,orders,payments"
--ensure-compatibility
--sync-contracts
--integration-tests
--services "auth,users,orders,payments"
--ensure-compatibility
--sync-contracts
--integration-tests
undefined2. Library Updates
2. 库更新
bash
undefinedbash
undefinedUpdate shared library across consumers
Update shared library across consumers
npx ruv-swarm github lib-update
--library "org$shared-lib"
--version "2.0.0"
--find-consumers
--update-imports
--run-tests
--library "org$shared-lib"
--version "2.0.0"
--find-consumers
--update-imports
--run-tests
undefinednpx ruv-swarm github lib-update
--library "org$shared-lib"
--version "2.0.0"
--find-consumers
--update-imports
--run-tests
--library "org$shared-lib"
--version "2.0.0"
--find-consumers
--update-imports
--run-tests
undefined3. Organization-Wide Changes
3. 全组织变更
bash
undefinedbash
undefinedApply org-wide policy changes
Apply org-wide policy changes
npx ruv-swarm github org-policy
--policy "add-security-headers"
--repos "org/*"
--validate-compliance
--create-reports
--policy "add-security-headers"
--repos "org/*"
--validate-compliance
--create-reports
undefinednpx ruv-swarm github org-policy
--policy "add-security-headers"
--repos "org/*"
--validate-compliance
--create-reports
--policy "add-security-headers"
--repos "org/*"
--validate-compliance
--create-reports
undefinedBest Practices
最佳实践
1. Repository Organization
1. 仓库组织
- Clear repository roles and boundaries
- Consistent naming conventions
- Documented dependencies
- Shared configuration standards
- 清晰的仓库角色与边界
- 一致的命名规范
- 文档化的依赖关系
- 共享的配置标准
2. Communication
2. 通信
- Use appropriate sync strategies
- Implement circuit breakers
- Monitor latency and failures
- Clear error propagation
- 使用合适的同步策略
- 实现断路器机制
- 监控延迟与故障
- 清晰的错误传播
3. Security
3. 安全
- Secure cross-repo authentication
- Encrypted communication channels
- Audit trail for all operations
- Principle of least privilege
- 安全的跨仓库认证
- 加密的通信通道
- 所有操作的审计追踪
- 最小权限原则
Performance Optimization
性能优化
Caching Strategy
缓存策略
bash
undefinedbash
undefinedImplement cross-repo caching
Implement cross-repo caching
npx ruv-swarm github cache-strategy
--analyze-patterns
--suggest-cache-layers
--implement-invalidation
--analyze-patterns
--suggest-cache-layers
--implement-invalidation
undefinednpx ruv-swarm github cache-strategy
--analyze-patterns
--suggest-cache-layers
--implement-invalidation
--analyze-patterns
--suggest-cache-layers
--implement-invalidation
undefinedParallel Execution
并行执行
bash
undefinedbash
undefinedOptimize parallel operations
Optimize parallel operations
npx ruv-swarm github parallel-optimize
--analyze-dependencies
--identify-parallelizable
--execute-optimal
--analyze-dependencies
--identify-parallelizable
--execute-optimal
undefinednpx ruv-swarm github parallel-optimize
--analyze-dependencies
--identify-parallelizable
--execute-optimal
--analyze-dependencies
--identify-parallelizable
--execute-optimal
undefinedResource Pooling
资源池化
bash
undefinedbash
undefinedPool resources across repos
Pool resources across repos
npx ruv-swarm github resource-pool
--share-agents
--distribute-load
--monitor-usage
--share-agents
--distribute-load
--monitor-usage
undefinednpx ruv-swarm github resource-pool
--share-agents
--distribute-load
--monitor-usage
--share-agents
--distribute-load
--monitor-usage
undefinedTroubleshooting
故障排除
Connectivity Issues
连接问题
bash
undefinedbash
undefinedDiagnose connectivity problems
Diagnose connectivity problems
npx ruv-swarm github diagnose-connectivity
--test-all-repos
--check-permissions
--verify-webhooks
--test-all-repos
--check-permissions
--verify-webhooks
undefinednpx ruv-swarm github diagnose-connectivity
--test-all-repos
--check-permissions
--verify-webhooks
--test-all-repos
--check-permissions
--verify-webhooks
undefinedMemory Synchronization
内存同步
bash
undefinedbash
undefinedDebug memory sync issues
Debug memory sync issues
npx ruv-swarm github debug-memory
--check-consistency
--identify-conflicts
--repair-state
--check-consistency
--identify-conflicts
--repair-state
undefinednpx ruv-swarm github debug-memory
--check-consistency
--identify-conflicts
--repair-state
--check-consistency
--identify-conflicts
--repair-state
undefinedPerformance Bottlenecks
性能瓶颈
bash
undefinedbash
undefinedIdentify performance issues
Identify performance issues
npx ruv-swarm github perf-analysis
--profile-operations
--identify-bottlenecks
--suggest-optimizations
--profile-operations
--identify-bottlenecks
--suggest-optimizations
undefinednpx ruv-swarm github perf-analysis
--profile-operations
--identify-bottlenecks
--suggest-optimizations
--profile-operations
--identify-bottlenecks
--suggest-optimizations
undefinedExamples
示例
Full-Stack Application Update
全栈应用更新
bash
undefinedbash
undefinedUpdate full-stack application
Update full-stack application
npx ruv-swarm github fullstack-update
--frontend "org$web-app"
--backend "org$api-server"
--database "org$db-migrations"
--coordinate-deployment
--frontend "org$web-app"
--backend "org$api-server"
--database "org$db-migrations"
--coordinate-deployment
undefinednpx ruv-swarm github fullstack-update
--frontend "org$web-app"
--backend "org$api-server"
--database "org$db-migrations"
--coordinate-deployment
--frontend "org$web-app"
--backend "org$api-server"
--database "org$db-migrations"
--coordinate-deployment
undefinedCross-Team Collaboration
跨团队协作
bash
undefinedbash
undefinedFacilitate cross-team work
Facilitate cross-team work
npx ruv-swarm github cross-team
--teams "frontend,backend,devops"
--task "implement-feature-x"
--assign-by-expertise
--track-progress
--teams "frontend,backend,devops"
--task "implement-feature-x"
--assign-by-expertise
--track-progress
See also: [swarm-pr.md](.$swarm-pr.md), [project-board-sync.md](.$project-board-sync.md)npx ruv-swarm github cross-team
--teams "frontend,backend,devops"
--task "implement-feature-x"
--assign-by-expertise
--track-progress
--teams "frontend,backend,devops"
--task "implement-feature-x"
--assign-by-expertise
--track-progress
另请参阅:[swarm-pr.md](.$swarm-pr.md), [project-board-sync.md](.$project-board-sync.md)