ralph-github-start-loop
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseLoop GitHub Issues
循环处理GitHub Issues
Run the autonomous loop to execute features from GitHub Issues.
运行自主循环以执行GitHub Issues中的功能需求。
Usage
使用方法
/loop-github-issues # Interactive: shows available PRDs and asks which to run
/loop-github-issues --all # Run all available PRDs (no prompt)
/loop-github-issues auth-flow # Run PRDs matching search term
/loop-github-issues 25 # Run with 25 iterations per PRD
/loop-github-issues --all 25 # Run all PRDs with 25 iterations eachWhen running non-interactively (background mode), is auto-enabled.
--all/loop-github-issues # 交互式:显示可用PRD并询问要运行的目标
/loop-github-issues --all # 运行所有可用PRD(无提示)
/loop-github-issues auth-flow # 运行匹配搜索词的PRD
/loop-github-issues 25 # 每个PRD运行25次迭代
/loop-github-issues --all 25 # 所有PRD各运行25次迭代在非交互式运行(后台模式)时,会自动启用。
--allPrerequisites
前提条件
- CLI authenticated
gh - PRD issues created via (reads from
/ralph-github-create-issuesor.claude/plans/)prds/
Note: Assume gh extensions are installed. Do NOT try to install them.
- 已完成gh CLI认证
- 通过创建的PRD问题(读取自
/ralph-github-create-issues或.claude/plans/目录)prds/
注意:假设gh扩展已安装,请勿尝试安装它们。
Process
执行流程
- Check prerequisites ()
gh auth status - Run the script directly - it handles PRD selection and filtering:
bash
~/.claude/skills/loop-github-issues/loop-github-issues.sh [iterations] [prd-search-term] [--all]Use to prevent timeout.
run_in_background: trueMonitoring progress:
- Local status:
cat /tmp/ralph-status-{repo}-{prd-number}.txt - GitHub: Comments are posted to the PRD issue as stories complete
Important: Don't list PRDs separately before running - the script shows available PRDs (excluding those with open PRs) and handles selection.
- 检查前提条件(执行)
gh auth status - 直接运行脚本——它会处理PRD的选择和过滤:
bash
~/.claude/skills/loop-github-issues/loop-github-issues.sh [iterations] [prd-search-term] [--all]使用以避免超时。
run_in_background: trueWhat It Does
监控进度:
- Lists open PRD issues (identified by label) that don't already have open PRs
prd - Prompts user to select which PRD(s) to work on (or auto-selects in background mode)
- For each selected PRD:
- Assigns issue to current user (shows as in progress)
- Creates git worktree at
../{repo}-{feature}/ - For each iteration:
- Passes all open sub-issues to the agent
- Agent picks the logical next story based on dependencies
- Implements the story
- Commits:
feat: Story Title (closes #XXX) - Closes sub-issue with link to commit
- When all sub-issues closed, creates PR (parent PRD closes on merge)
- Cleans up worktree
- 本地状态:执行查看
cat /tmp/ralph-status-{repo}-{prd-number}.txt - GitHub:当需求故事完成时,会在PRD问题下发布评论
重要提示:运行前无需单独列出PRD——脚本会显示可用的PRD(排除已有开放PR的PRD)并处理选择。
Differences from /ralph
/ralph功能说明
| Aspect | | |
|---|---|---|
| Story source | | GitHub Issues |
| Status tracking | | Issue open/closed |
| Dependencies | | Native GitHub blocking |
| Completion | Update JSON | Close issue |
| PRD done | All stories pass | All sub-issues closed |
- 列出所有开放的PRD问题(通过标签识别)且该PRD尚未关联开放PR
prd - 提示用户选择要处理的PRD(或在后台模式下自动选择)
- 对于每个选中的PRD:
- 将问题分配给当前用户(标记为进行中)
- 在目录创建git工作区
../{repo}-{feature}/ - 每次迭代:
- 将所有开放的子问题传递给Agent
- Agent根据依赖关系选择逻辑上的下一个需求故事
- 实现该需求故事
- 提交:
feat: Story Title (closes #XXX) - 关闭子问题并关联提交链接
- 当所有子问题关闭后,创建PR(合并父PRD时自动关闭)
- 清理工作区
Dependencies
与/ralph
的差异
/ralphRalph-issues checks GitHub's native blocking relationships. PRDs with open blocking issues are skipped.
The script queries the field via GraphQL to determine if a PRD is ready to start.
blockedBy| 维度 | | |
|---|---|---|
| 需求故事来源 | | GitHub Issues |
| 状态跟踪 | | 问题的开放/关闭状态 |
| 依赖关系 | | GitHub原生阻塞机制 |
| 完成标记 | 更新JSON文件 | 关闭问题 |
| PRD完成条件 | 所有故事验证通过 | 所有子问题关闭 |
Issue Conventions
依赖关系
Finding PRD Issues
—
bash
gh issue list --label prd --state open --json number,title,bodyRalph-issues会检查GitHub原生的阻塞关系,存在开放阻塞问题的PRD会被跳过。
脚本通过GraphQL查询字段来判断PRD是否可以启动。
blockedByFinding Story Sub-Issues
问题规范
—
查找PRD问题
Uses the extension:
gh-sub-issuebash
gh sub-issue list <parent-number> --state open --json number,title,bodybash
gh issue list --label prd --state open --json number,title,bodyClosing Issues
查找需求故事子问题
On story completion:
bash
gh issue close 101 --comment "Implemented in https://github.com/owner/repo/commit/abc123"Parent PRD issues close automatically when the PR is merged (via in PR body).
Closes #XX使用扩展:
gh-sub-issuebash
gh sub-issue list <parent-number> --state open --json number,title,bodyBranch Naming
关闭问题
Uses conventional prefixes parsed from the PRD issue body:
- for enhancements
feature/<name> - for bug fixes
bugfix/<name>
当需求故事完成时:
bash
gh issue close 101 --comment "Implemented in https://github.com/owner/repo/commit/abc123"父PRD问题会在PR合并时自动关闭(通过PR正文中的标记)。
Closes #XXNotes
分支命名
- Run multiple Ralph instances in parallel on independent PRDs (separate terminals)
- Each works in its own worktree, no conflicts
- Commits include to auto-close issues on merge
closes #XXX
使用从PRD问题正文中解析的常规前缀:
- 用于功能增强
feature/<name> - 用于Bug修复
bugfix/<name>
—
注意事项
—
- 可在独立PRD上并行运行多个Ralph实例(使用不同终端)
- 每个实例在各自的工作区运行,无冲突
- 提交信息包含,以便合并时自动关闭问题
closes #XXX