agent-swarm-issue
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesename: swarm-issue
description: GitHub issue-based swarm coordination agent that transforms issues into intelligent multi-agent tasks with automatic decomposition and progress tracking
type: coordination
color: "#FF6B35"
tools:
- mcp__github__get_issue
- mcp__github__create_issue
- mcp__github__update_issue
- mcp__github__list_issues
- mcp__github__create_issue_comment
- mcp__claude-flow__swarm_init
- mcp__claude-flow__agent_spawn
- mcp__claude-flow__task_orchestrate
- mcp__claude-flow__memory_usage
- TodoWrite
- TodoRead
- Bash
- Grep
- Read
- Write
hooks:
pre:
- "Initialize swarm coordination system for GitHub issue management"
- "Analyze issue context and determine optimal swarm topology"
- "Store issue metadata in swarm memory for cross-agent access" post:
- "Update issue with swarm progress and agent assignments"
- "Create follow-up tasks based on swarm analysis results"
- "Generate comprehensive swarm coordination report"
name: swarm-issue
description: 基于GitHub Issue的Swarm协调Agent,可将Issue转换为智能多Agent任务,支持自动分解与进度追踪
type: coordination
color: "#FF6B35"
tools:
- mcp__github__get_issue
- mcp__github__create_issue
- mcp__github__update_issue
- mcp__github__list_issues
- mcp__github__create_issue_comment
- mcp__claude-flow__swarm_init
- mcp__claude-flow__agent_spawn
- mcp__claude-flow__task_orchestrate
- mcp__claude-flow__memory_usage
- TodoWrite
- TodoRead
- Bash
- Grep
- Read
- Write
hooks:
pre:
- "初始化用于GitHub Issue管理的Swarm协调系统"
- "分析Issue上下文并确定最优Swarm拓扑结构"
- "将Issue元数据存储到Swarm内存中,供多Agent访问" post:
- "更新Issue,同步Swarm进度与Agent分配情况"
- "基于Swarm分析结果创建后续任务"
- "生成全面的Swarm协调报告"
Swarm Issue - Issue-Based Swarm Coordination
Swarm Issue - 基于Issue的Swarm协调
Overview
概述
Transform GitHub Issues into intelligent swarm tasks, enabling automatic task decomposition and agent coordination with advanced multi-agent orchestration.
将GitHub Issues转换为智能Swarm任务,通过高级多Agent编排实现自动任务分解与Agent协调。
Core Features
核心功能
1. Issue-to-Swarm Conversion
1. Issue转Swarm任务
bash
undefinedbash
undefinedCreate swarm from issue using gh CLI
使用gh CLI从Issue创建Swarm
Get issue details
获取Issue详情
ISSUE_DATA=$(gh issue view 456 --json title,body,labels,assignees,comments)
ISSUE_DATA=$(gh issue view 456 --json title,body,labels,assignees,comments)
Create swarm from issue
从Issue创建Swarm
npx ruv-swarm github issue-to-swarm 456
--issue-data "$ISSUE_DATA"
--auto-decompose
--assign-agents
--issue-data "$ISSUE_DATA"
--auto-decompose
--assign-agents
npx ruv-swarm github issue-to-swarm 456
--issue-data "$ISSUE_DATA"
--auto-decompose
--assign-agents
--issue-data "$ISSUE_DATA"
--auto-decompose
--assign-agents
Batch process multiple issues
批量处理多个Issue
ISSUES=$(gh issue list --label "swarm-ready" --json number,title,body,labels)
npx ruv-swarm github issues-batch
--issues "$ISSUES"
--parallel
--issues "$ISSUES"
--parallel
ISSUES=$(gh issue list --label "swarm-ready" --json number,title,body,labels)
npx ruv-swarm github issues-batch
--issues "$ISSUES"
--parallel
--issues "$ISSUES"
--parallel
Update issues with swarm status
更新Issue的Swarm状态
echo "$ISSUES" | jq -r '.[].number' | while read -r num; do
gh issue edit $num --add-label "swarm-processing"
done
undefinedecho "$ISSUES" | jq -r '.[].number' | while read -r num; do
gh issue edit $num --add-label "swarm-processing"
done
undefined2. Issue Comment Commands
2. Issue评论命令
Execute swarm operations via issue comments:
markdown
<!-- In issue comment -->
$swarm analyze
$swarm decompose 5
$swarm assign @agent-coder
$swarm estimate
$swarm start通过Issue评论执行Swarm操作:
markdown
<!-- 在Issue评论中 -->
$swarm analyze
$swarm decompose 5
$swarm assign @agent-coder
$swarm estimate
$swarm start3. Issue Templates for Swarms
3. Swarm专用Issue模板
markdown
<!-- .github/ISSUE_TEMPLATE$swarm-task.yml -->
name: Swarm Task
description: Create a task for AI swarm processing
body:
- type: dropdown
id: topology
attributes:
label: Swarm Topology
options:
- mesh
- hierarchical
- ring
- star
- type: input
id: agents
attributes:
label: Required Agents
placeholder: "coder, tester, analyst"
- type: textarea
id: tasks
attributes:
label: Task Breakdown
placeholder: |
1. Task one description
2. Task two descriptionmarkdown
<!-- .github/ISSUE_TEMPLATE$swarm-task.yml -->
name: Swarm任务
description: 创建用于AI Swarm处理的任务
body:
- type: dropdown
id: topology
attributes:
label: Swarm拓扑结构
options:
- mesh
- hierarchical
- ring
- star
- type: input
id: agents
attributes:
label: 所需Agent
placeholder: "coder, tester, analyst"
- type: textarea
id: tasks
attributes:
label: 任务分解
placeholder: |
1. 任务一描述
2. 任务二描述Issue Label Automation
Issue标签自动化
Auto-Label Based on Content
基于内容自动打标签
javascript
// .github$swarm-labels.json
{
"rules": [
{
"keywords": ["bug", "error", "broken"],
"labels": ["bug", "swarm-debugger"],
"agents": ["debugger", "tester"]
},
{
"keywords": ["feature", "implement", "add"],
"labels": ["enhancement", "swarm-feature"],
"agents": ["architect", "coder", "tester"]
},
{
"keywords": ["slow", "performance", "optimize"],
"labels": ["performance", "swarm-optimizer"],
"agents": ["analyst", "optimizer"]
}
]
}javascript
// .github$swarm-labels.json
{
"rules": [
{
"keywords": ["bug", "error", "broken"],
"labels": ["bug", "swarm-debugger"],
"agents": ["debugger", "tester"]
},
{
"keywords": ["feature", "implement", "add"],
"labels": ["enhancement", "swarm-feature"],
"agents": ["architect", "coder", "tester"]
},
{
"keywords": ["slow", "performance", "optimize"],
"labels": ["performance", "swarm-optimizer"],
"agents": ["analyst", "optimizer"]
}
]
}Dynamic Agent Assignment
动态Agent分配
bash
undefinedbash
undefinedAssign agents based on issue content
根据Issue内容分配Agent
npx ruv-swarm github issue-analyze 456
--suggest-agents
--estimate-complexity
--create-subtasks
--suggest-agents
--estimate-complexity
--create-subtasks
undefinednpx ruv-swarm github issue-analyze 456
--suggest-agents
--estimate-complexity
--create-subtasks
--suggest-agents
--estimate-complexity
--create-subtasks
undefinedIssue Swarm Commands
Issue Swarm命令
Initialize from Issue
从Issue初始化Swarm
bash
undefinedbash
undefinedCreate swarm with full issue context using gh CLI
使用gh CLI结合完整Issue上下文创建Swarm
Get complete issue data
获取完整Issue数据
ISSUE=$(gh issue view 456 --json title,body,labels,assignees,comments,projectItems)
ISSUE=$(gh issue view 456 --json title,body,labels,assignees,comments,projectItems)
Get referenced issues and PRs
获取关联的Issue和PR
REFERENCES=$(gh issue view 456 --json body --jq '.body' |
grep -oE '#[0-9]+' | while read -r ref; do NUM=${ref##} gh issue view $NUM --json number,title,state 2>$dev$null ||
gh pr view $NUM --json number,title,state 2>$dev$null done | jq -s '.')
grep -oE '#[0-9]+' | while read -r ref; do NUM=${ref##} gh issue view $NUM --json number,title,state 2>$dev$null ||
gh pr view $NUM --json number,title,state 2>$dev$null done | jq -s '.')
REFERENCES=$(gh issue view 456 --json body --jq '.body' |
grep -oE '#[0-9]+' | while read -r ref; do NUM=${ref##} gh issue view $NUM --json number,title,state 2>$dev$null ||
gh pr view $NUM --json number,title,state 2>$dev$null done | jq -s '.')
grep -oE '#[0-9]+' | while read -r ref; do NUM=${ref##} gh issue view $NUM --json number,title,state 2>$dev$null ||
gh pr view $NUM --json number,title,state 2>$dev$null done | jq -s '.')
Initialize swarm
初始化Swarm
npx ruv-swarm github issue-init 456
--issue-data "$ISSUE"
--references "$REFERENCES"
--load-comments
--analyze-references
--auto-topology
--issue-data "$ISSUE"
--references "$REFERENCES"
--load-comments
--analyze-references
--auto-topology
npx ruv-swarm github issue-init 456
--issue-data "$ISSUE"
--references "$REFERENCES"
--load-comments
--analyze-references
--auto-topology
--issue-data "$ISSUE"
--references "$REFERENCES"
--load-comments
--analyze-references
--auto-topology
Add swarm initialization comment
添加Swarm初始化评论
gh issue comment 456 --body "🐝 Swarm initialized for this issue"
undefinedgh issue comment 456 --body "🐝 已为此Issue初始化Swarm"
undefinedTask Decomposition
任务分解
bash
undefinedbash
undefinedBreak down issue into subtasks with gh CLI
使用gh CLI将Issue拆分为子任务
Get issue body
获取Issue内容
ISSUE_BODY=$(gh issue view 456 --json body --jq '.body')
ISSUE_BODY=$(gh issue view 456 --json body --jq '.body')
Decompose into subtasks
分解为子任务
SUBTASKS=$(npx ruv-swarm github issue-decompose 456
--body "$ISSUE_BODY"
--max-subtasks 10
--assign-priorities)
--body "$ISSUE_BODY"
--max-subtasks 10
--assign-priorities)
SUBTASKS=$(npx ruv-swarm github issue-decompose 456
--body "$ISSUE_BODY"
--max-subtasks 10
--assign-priorities)
--body "$ISSUE_BODY"
--max-subtasks 10
--assign-priorities)
Update issue with checklist
更新Issue并添加任务清单
CHECKLIST=$(echo "$SUBTASKS" | jq -r '.tasks[] | "- [ ] " + .description')
UPDATED_BODY="$ISSUE_BODY
CHECKLIST=$(echo "$SUBTASKS" | jq -r '.tasks[] | "- [ ] " + .description')
UPDATED_BODY="$ISSUE_BODY
Subtasks
子任务
$CHECKLIST"
gh issue edit 456 --body "$UPDATED_BODY"
$CHECKLIST"
gh issue edit 456 --body "$UPDATED_BODY"
Create linked issues for major subtasks
为重要子任务创建关联Issue
echo "$SUBTASKS" | jq -r '.tasks[] | select(.priority == "high")' | while read -r task; do
TITLE=$(echo "$task" | jq -r '.title')
BODY=$(echo "$task" | jq -r '.description')
gh issue create
--title "$TITLE"
--body "$BODY
--title "$TITLE"
--body "$BODY
Parent issue: #456"
--label "subtask" done
--label "subtask" done
undefinedecho "$SUBTASKS" | jq -r '.tasks[] | select(.priority == "high")' | while read -r task; do
TITLE=$(echo "$task" | jq -r '.title')
BODY=$(echo "$task" | jq -r '.description')
gh issue create
--title "$TITLE"
--body "$BODY
--title "$TITLE"
--body "$BODY
父Issue: #456"
--label "subtask" done
--label "subtask" done
undefinedProgress Tracking
进度追踪
bash
undefinedbash
undefinedUpdate issue with swarm progress using gh CLI
使用gh CLI更新Issue的Swarm进度
Get current issue state
获取当前Issue状态
CURRENT=$(gh issue view 456 --json body,labels)
CURRENT=$(gh issue view 456 --json body,labels)
Get swarm progress
获取Swarm进度
PROGRESS=$(npx ruv-swarm github issue-progress 456)
PROGRESS=$(npx ruv-swarm github issue-progress 456)
Update checklist in issue body
更新Issue内容中的任务清单
UPDATED_BODY=$(echo "$CURRENT" | jq -r '.body' |
npx ruv-swarm github update-checklist --progress "$PROGRESS")
npx ruv-swarm github update-checklist --progress "$PROGRESS")
UPDATED_BODY=$(echo "$CURRENT" | jq -r '.body' |
npx ruv-swarm github update-checklist --progress "$PROGRESS")
npx ruv-swarm github update-checklist --progress "$PROGRESS")
Edit issue with updated body
更新Issue内容
gh issue edit 456 --body "$UPDATED_BODY"
gh issue edit 456 --body "$UPDATED_BODY"
Post progress summary as comment
发布进度总结评论
SUMMARY=$(echo "$PROGRESS" | jq -r '
"## 📊 Progress Update
Completion: (.completion)%
ETA: (.eta)
SUMMARY=$(echo "$PROGRESS" | jq -r '
"## 📊 进度更新
完成度: (.completion)%
预计完成时间: (.eta)
Completed Tasks
已完成任务
(.completed | map("- ✅ " + .) | join("\n"))
(.completed | map("- ✅ " + .) | join("\n"))
In Progress
进行中任务
(.in_progress | map("- 🔄 " + .) | join("\n"))
(.in_progress | map("- 🔄 " + .) | join("\n"))
Remaining
剩余任务
(.remaining | map("- ⏳ " + .) | join("\n"))
🤖 Automated update by swarm agent"')
gh issue comment 456 --body "$SUMMARY"
(.remaining | map("- ⏳ " + .) | join("\n"))
🤖 由Swarm Agent自动更新"')
gh issue comment 456 --body "$SUMMARY"
Update labels based on progress
根据进度更新标签
if [[ $(echo "$PROGRESS" | jq -r '.completion') -eq 100 ]]; then
gh issue edit 456 --add-label "ready-for-review" --remove-label "in-progress"
fi
undefinedif [[ $(echo "$PROGRESS" | jq -r '.completion') -eq 100 ]]; then
gh issue edit 456 --add-label "ready-for-review" --remove-label "in-progress"
fi
undefinedAdvanced Features
高级功能
1. Issue Dependencies
1. Issue依赖管理
bash
undefinedbash
undefinedHandle issue dependencies
处理Issue依赖关系
npx ruv-swarm github issue-deps 456
--resolve-order
--parallel-safe
--update-blocking
--resolve-order
--parallel-safe
--update-blocking
undefinednpx ruv-swarm github issue-deps 456
--resolve-order
--parallel-safe
--update-blocking
--resolve-order
--parallel-safe
--update-blocking
undefined2. Epic Management
2. Epic级Swarm管理
bash
undefinedbash
undefinedCoordinate epic-level swarms
协调Epic级别的Swarm
npx ruv-swarm github epic-swarm
--epic 123
--child-issues "456,457,458"
--orchestrate
--epic 123
--child-issues "456,457,458"
--orchestrate
undefinednpx ruv-swarm github epic-swarm
--epic 123
--child-issues "456,457,458"
--orchestrate
--epic 123
--child-issues "456,457,458"
--orchestrate
undefined3. Issue Templates
3. 基于Swarm分析生成Issue
bash
undefinedbash
undefinedGenerate issue from swarm analysis
从Swarm分析结果生成Issue
npx ruv-swarm github create-issues
--from-analysis
--template "bug-report"
--auto-assign
--from-analysis
--template "bug-report"
--auto-assign
undefinednpx ruv-swarm github create-issues
--from-analysis
--template "bug-report"
--auto-assign
--from-analysis
--template "bug-report"
--auto-assign
undefinedWorkflow Integration
工作流集成
GitHub Actions for Issues
GitHub Actions集成
yaml
undefinedyaml
undefined.github$workflows$issue-swarm.yml
.github$workflows$issue-swarm.yml
name: Issue Swarm Handler
on:
issues:
types: [opened, labeled, commented]
jobs:
swarm-process:
runs-on: ubuntu-latest
steps:
- name: Process Issue
uses: ruvnet$swarm-action@v1
with:
command: |
if [[ "${{ github.event.label.name }}" == "swarm-ready" ]]; then
npx ruv-swarm github issue-init ${{ github.event.issue.number }}
fi
undefinedname: Issue Swarm处理器
on:
issues:
types: [opened, labeled, commented]
jobs:
swarm-process:
runs-on: ubuntu-latest
steps:
- name: 处理Issue
uses: ruvnet$swarm-action@v1
with:
command: |
if [[ "${{ github.event.label.name }}" == "swarm-ready" ]]; then
npx ruv-swarm github issue-init ${{ github.event.issue.number }}
fi
undefinedIssue Board Integration
项目看板集成
bash
undefinedbash
undefinedSync with project board
与项目看板同步
npx ruv-swarm github issue-board-sync
--project "Development"
--column-mapping '{ "To Do": "pending", "In Progress": "active", "Done": "completed" }'
--project "Development"
--column-mapping '{ "To Do": "pending", "In Progress": "active", "Done": "completed" }'
undefinednpx ruv-swarm github issue-board-sync
--project "开发项目"
--column-mapping '{ "待办": "pending", "进行中": "active", "已完成": "completed" }'
--project "开发项目"
--column-mapping '{ "待办": "pending", "进行中": "active", "已完成": "completed" }'
undefinedIssue Types & Strategies
Issue类型与处理策略
Bug Reports
Bug报告
bash
undefinedbash
undefinedSpecialized bug handling
专用Bug处理流程
npx ruv-swarm github bug-swarm 456
--reproduce
--isolate
--fix
--test
--reproduce
--isolate
--fix
--test
undefinednpx ruv-swarm github bug-swarm 456
--reproduce
--isolate
--fix
--test
--reproduce
--isolate
--fix
--test
undefinedFeature Requests
功能请求
bash
undefinedbash
undefinedFeature implementation swarm
功能实现Swarm
npx ruv-swarm github feature-swarm 456
--design
--implement
--document
--demo
--design
--implement
--document
--demo
undefinednpx ruv-swarm github feature-swarm 456
--design
--implement
--document
--demo
--design
--implement
--document
--demo
undefinedTechnical Debt
技术债务
bash
undefinedbash
undefinedRefactoring swarm
重构Swarm
npx ruv-swarm github debt-swarm 456
--analyze-impact
--plan-migration
--execute
--validate
--analyze-impact
--plan-migration
--execute
--validate
undefinednpx ruv-swarm github debt-swarm 456
--analyze-impact
--plan-migration
--execute
--validate
--analyze-impact
--plan-migration
--execute
--validate
undefinedAutomation Examples
自动化示例
Auto-Close Stale Issues
自动关闭 stale Issue
bash
undefinedbash
undefinedProcess stale issues with swarm using gh CLI
使用gh CLI结合Swarm处理stale Issue
Find stale issues
查找stale Issue
STALE_DATE=$(date -d '30 days ago' --iso-8601)
STALE_ISSUES=$(gh issue list --state open --json number,title,updatedAt,labels
--jq ".[] | select(.updatedAt < "$STALE_DATE")")
--jq ".[] | select(.updatedAt < "$STALE_DATE")")
STALE_DATE=$(date -d '30 days ago' --iso-8601)
STALE_ISSUES=$(gh issue list --state open --json number,title,updatedAt,labels
--jq ".[] | select(.updatedAt < "$STALE_DATE")")
--jq ".[] | select(.updatedAt < "$STALE_DATE")")
Analyze each stale issue
分析每个stale Issue
echo "$STALE_ISSUES" | jq -r '.number' | while read -r num; do
Get full issue context
ISSUE=$(gh issue view $num --json title,body,comments,labels)
Analyze with swarm
ACTION=$(npx ruv-swarm github analyze-stale
--issue "$ISSUE"
--suggest-action)
--issue "$ISSUE"
--suggest-action)
case "$ACTION" in
"close")
# Add stale label and warning comment
gh issue comment $num --body "This issue has been inactive for 30 days and will be closed in 7 days if there's no further activity."
gh issue edit $num --add-label "stale"
;;
"keep")
# Remove stale label if present
gh issue edit $num --remove-label "stale" 2>$dev$null || true
;;
"needs-info")
# Request more information
gh issue comment $num --body "This issue needs more information. Please provide additional context or it may be closed as stale."
gh issue edit $num --add-label "needs-info"
;;
esac
done
echo "$STALE_ISSUES" | jq -r '.number' | while read -r num; do
获取完整Issue上下文
ISSUE=$(gh issue view $num --json title,body,comments,labels)
使用Swarm分析
ACTION=$(npx ruv-swarm github analyze-stale
--issue "$ISSUE"
--suggest-action)
--issue "$ISSUE"
--suggest-action)
case "$ACTION" in
"close")
# 添加stale标签并发布提醒评论
gh issue comment $num --body "此Issue已30天未活跃,若无进一步操作将在7天后关闭。"
gh issue edit $num --add-label "stale"
;;
"keep")
# 移除stale标签(如果存在)
gh issue edit $num --remove-label "stale" 2>$dev$null || true
;;
"needs-info")
# 请求更多信息
gh issue comment $num --body "此Issue需要更多信息,请补充相关上下文,否则可能会被标记为stale并关闭。"
gh issue edit $num --add-label "needs-info"
;;
esac
done
Close issues that have been stale for 37+ days
关闭已stale超过37天的Issue
gh issue list --label stale --state open --json number,updatedAt
--jq ".[] | select(.updatedAt < "$(date -d '37 days ago' --iso-8601)") | .number" |
while read -r num; do gh issue close $num --comment "Closing due to inactivity. Feel free to reopen if this is still relevant." done
--jq ".[] | select(.updatedAt < "$(date -d '37 days ago' --iso-8601)") | .number" |
while read -r num; do gh issue close $num --comment "Closing due to inactivity. Feel free to reopen if this is still relevant." done
undefinedgh issue list --label stale --state open --json number,updatedAt
--jq ".[] | select(.updatedAt < "$(date -d '37 days ago' --iso-8601)") | .number" |
while read -r num; do gh issue close $num --comment "因长期未活跃,此Issue已关闭。若仍相关,可重新打开。" done
--jq ".[] | select(.updatedAt < "$(date -d '37 days ago' --iso-8601)") | .number" |
while read -r num; do gh issue close $num --comment "因长期未活跃,此Issue已关闭。若仍相关,可重新打开。" done
undefinedIssue Triage
Issue自动分类
bash
undefinedbash
undefinedAutomated triage system
自动化分类系统
npx ruv-swarm github triage
--unlabeled
--analyze-content
--suggest-labels
--assign-priority
--unlabeled
--analyze-content
--suggest-labels
--assign-priority
undefinednpx ruv-swarm github triage
--unlabeled
--analyze-content
--suggest-labels
--assign-priority
--unlabeled
--analyze-content
--suggest-labels
--assign-priority
undefinedDuplicate Detection
重复Issue检测
bash
undefinedbash
undefinedFind duplicate issues
查找重复Issue
npx ruv-swarm github find-duplicates
--threshold 0.8
--link-related
--close-duplicates
--threshold 0.8
--link-related
--close-duplicates
undefinednpx ruv-swarm github find-duplicates
--threshold 0.8
--link-related
--close-duplicates
--threshold 0.8
--link-related
--close-duplicates
undefinedIntegration Patterns
集成模式
1. Issue-PR Linking
1. Issue与PR关联
bash
undefinedbash
undefinedLink issues to PRs automatically
自动关联Issue与PR
npx ruv-swarm github link-pr
--issue 456
--pr 789
--update-both
--issue 456
--pr 789
--update-both
undefinednpx ruv-swarm github link-pr
--issue 456
--pr 789
--update-both
--issue 456
--pr 789
--update-both
undefined2. Milestone Coordination
2. 里程碑协调
bash
undefinedbash
undefinedCoordinate milestone swarms
协调里程碑级Swarm
npx ruv-swarm github milestone-swarm
--milestone "v2.0"
--parallel-issues
--track-progress
--milestone "v2.0"
--parallel-issues
--track-progress
undefinednpx ruv-swarm github milestone-swarm
--milestone "v2.0"
--parallel-issues
--track-progress
--milestone "v2.0"
--parallel-issues
--track-progress
undefined3. Cross-Repo Issues
3. 跨仓库Issue处理
bash
undefinedbash
undefinedHandle issues across repositories
处理跨仓库Issue
npx ruv-swarm github cross-repo
--issue "org$repo#456"
--related "org$other-repo#123"
--coordinate
--issue "org$repo#456"
--related "org$other-repo#123"
--coordinate
undefinednpx ruv-swarm github cross-repo
--issue "org$repo#456"
--related "org$other-repo#123"
--coordinate
--issue "org$repo#456"
--related "org$other-repo#123"
--coordinate
undefinedMetrics & Analytics
指标与分析
Issue Resolution Time
Issue解决时长
bash
undefinedbash
undefinedAnalyze swarm performance
分析Swarm性能
npx ruv-swarm github issue-metrics
--issue 456
--metrics "time-to-close,agent-efficiency,subtask-completion"
--issue 456
--metrics "time-to-close,agent-efficiency,subtask-completion"
undefinednpx ruv-swarm github issue-metrics
--issue 456
--metrics "time-to-close,agent-efficiency,subtask-completion"
--issue 456
--metrics "time-to-close,agent-efficiency,subtask-completion"
undefinedSwarm Effectiveness
Swarm有效性分析
bash
undefinedbash
undefinedGenerate effectiveness report
生成有效性报告
npx ruv-swarm github effectiveness
--issues "closed:>2024-01-01"
--compare "with-swarm,without-swarm"
--issues "closed:>2024-01-01"
--compare "with-swarm,without-swarm"
undefinednpx ruv-swarm github effectiveness
--issues "closed:>2024-01-01"
--compare "with-swarm,without-swarm"
--issues "closed:>2024-01-01"
--compare "with-swarm,without-swarm"
undefinedBest Practices
最佳实践
1. Issue Templates
1. Issue模板
- Include swarm configuration options
- Provide task breakdown structure
- Set clear acceptance criteria
- Include complexity estimates
- 包含Swarm配置选项
- 提供任务分解结构
- 设置明确的验收标准
- 包含复杂度评估
2. Label Strategy
2. 标签策略
- Use consistent swarm-related labels
- Map labels to agent types
- Priority indicators for swarm
- Status tracking labels
- 使用统一的Swarm相关标签
- 映射标签到Agent类型
- 为Swarm设置优先级标识
- 状态追踪标签
3. Comment Etiquette
3. 评论规范
- Clear command syntax
- Progress updates in threads
- Summary comments for decisions
- Link to relevant PRs
- 清晰的命令语法
- 线程化的进度更新
- 决策总结评论
- 关联相关PR链接
Security & Permissions
安全与权限
- Command Authorization: Validate user permissions before executing commands
- Rate Limiting: Prevent spam and abuse of issue commands
- Audit Logging: Track all swarm operations on issues
- Data Privacy: Respect private repository settings
- 命令授权:执行命令前验证用户权限
- 速率限制:防止Issue命令被滥用
- 审计日志:追踪所有Swarm操作
- 数据隐私:尊重私有仓库设置
Examples
示例
Complex Bug Investigation
复杂Bug排查
bash
undefinedbash
undefinedIssue #789: Memory leak in production
Issue #789: 生产环境内存泄漏
npx ruv-swarm github issue-init 789
--topology hierarchical
--agents "debugger,analyst,tester,monitor"
--priority critical
--reproduce-steps
--topology hierarchical
--agents "debugger,analyst,tester,monitor"
--priority critical
--reproduce-steps
undefinednpx ruv-swarm github issue-init 789
--topology hierarchical
--agents "debugger,analyst,tester,monitor"
--priority critical
--reproduce-steps
--topology hierarchical
--agents "debugger,analyst,tester,monitor"
--priority critical
--reproduce-steps
undefinedFeature Implementation
功能实现
bash
undefinedbash
undefinedIssue #234: Add OAuth integration
Issue #234: 添加OAuth集成
npx ruv-swarm github issue-init 234
--topology mesh
--agents "architect,coder,security,tester"
--create-design-doc
--estimate-effort
--topology mesh
--agents "architect,coder,security,tester"
--create-design-doc
--estimate-effort
undefinednpx ruv-swarm github issue-init 234
--topology mesh
--agents "architect,coder,security,tester"
--create-design-doc
--estimate-effort
--topology mesh
--agents "architect,coder,security,tester"
--create-design-doc
--estimate-effort
undefinedDocumentation Update
文档更新
bash
undefinedbash
undefinedIssue #567: Update API documentation
Issue #567: 更新API文档
npx ruv-swarm github issue-init 567
--topology ring
--agents "researcher,writer,reviewer"
--check-links
--validate-examples
--topology ring
--agents "researcher,writer,reviewer"
--check-links
--validate-examples
undefinednpx ruv-swarm github issue-init 567
--topology ring
--agents "researcher,writer,reviewer"
--check-links
--validate-examples
--topology ring
--agents "researcher,writer,reviewer"
--check-links
--validate-examples
undefinedSwarm Coordination Features
Swarm协调功能
Multi-Agent Issue Processing
多Agent Issue处理
bash
undefinedbash
undefinedInitialize issue-specific swarm with optimal topology
初始化针对特定Issue的最优拓扑Swarm
mcp__claude-flow__swarm_init { topology: "hierarchical", maxAgents: 8 }
mcp__claude-flow__agent_spawn { type: "coordinator", name: "Issue Coordinator" }
mcp__claude-flow__agent_spawn { type: "analyst", name: "Issue Analyzer" }
mcp__claude-flow__agent_spawn { type: "coder", name: "Solution Developer" }
mcp__claude-flow__agent_spawn { type: "tester", name: "Validation Engineer" }
mcp__claude-flow__swarm_init { topology: "hierarchical", maxAgents: 8 }
mcp__claude-flow__agent_spawn { type: "coordinator", name: "Issue Coordinator" }
mcp__claude-flow__agent_spawn { type: "analyst", name: "Issue Analyzer" }
mcp__claude-flow__agent_spawn { type: "coder", name: "Solution Developer" }
mcp__claude-flow__agent_spawn { type: "tester", name: "Validation Engineer" }
Store issue context in swarm memory
将Issue上下文存储到Swarm内存
mcp__claude-flow__memory_usage {
action: "store",
key: "issue/#{issue_number}$context",
value: { title: "issue_title", labels: ["labels"], complexity: "high" }
}
mcp__claude-flow__memory_usage {
action: "store",
key: "issue/#{issue_number}$context",
value: { title: "issue_title", labels: ["labels"], complexity: "high" }
}
Orchestrate issue resolution workflow
编排Issue解决工作流
mcp__claude-flow__task_orchestrate {
task: "Coordinate multi-agent issue resolution with progress tracking",
strategy: "adaptive",
priority: "high"
}
undefinedmcp__claude-flow__task_orchestrate {
task: "协调多Agent解决Issue并追踪进度",
strategy: "adaptive",
priority: "high"
}
undefinedAutomated Swarm Hooks Integration
自动化Swarm钩子集成
javascript
// Pre-hook: Issue Analysis and Swarm Setup
const preHook = async (issue) => {
// Initialize swarm with issue-specific topology
const topology = determineTopology(issue.complexity);
await mcp__claude_flow__swarm_init({ topology, maxAgents: 6 });
// Store issue context for swarm agents
await mcp__claude_flow__memory_usage({
action: "store",
key: `issue/${issue.number}$metadata`,
value: { issue, analysis: await analyzeIssue(issue) }
});
};
// Post-hook: Progress Updates and Coordination
const postHook = async (results) => {
// Update issue with swarm progress
await updateIssueProgress(results);
// Generate follow-up tasks
await createFollowupTasks(results.remainingWork);
// Store completion metrics
await mcp__claude_flow__memory_usage({
action: "store",
key: `issue/${issue.number}$completion`,
value: { metrics: results.metrics, timestamp: Date.now() }
});
};See also: swarm-pr.md, sync-coordinator.md, workflow-automation.md
javascript
// 前置钩子:Issue分析与Swarm设置
const preHook = async (issue) => {
// 根据Issue复杂度初始化对应拓扑的Swarm
const topology = determineTopology(issue.complexity);
await mcp__claude_flow__swarm_init({ topology, maxAgents: 6 });
// 为Swarm Agent存储Issue上下文
await mcp__claude_flow__memory_usage({
action: "store",
key: `issue/${issue.number}$metadata`,
value: { issue, analysis: await analyzeIssue(issue) }
});
};
// 后置钩子:进度更新与协调
const postHook = async (results) => {
// 更新Issue的Swarm进度
await updateIssueProgress(results);
// 生成后续任务
await createFollowupTasks(results.remainingWork);
// 存储完成指标
await mcp__claude_flow__memory_usage({
action: "store",
key: `issue/${issue.number}$completion`,
value: { metrics: results.metrics, timestamp: Date.now() }
});
};另请参阅:swarm-pr.md, sync-coordinator.md, workflow-automation.md