ralph-json-start-loop

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Ralph

Ralph

Run the autonomous loop to execute features from
prds/
directory.
运行自主循环以执行
prds/
目录中的功能。

Usage

使用方法

/ralph              # Run next available project (respects dependencies)
/ralph 25           # Run with 25 iterations
/ralph auth-flow    # Run specific project
/ralph              # 运行下一个可用项目(遵循依赖关系)
/ralph 25           # 运行25次迭代
/ralph auth-flow    # 运行指定项目

Process

流程

Run the loop script in background mode:
bash
~/.claude/skills/ralph/ralph.sh [iterations] [project-name]
Use
run_in_background: true
to prevent timeout. After starting, tell the user to check progress with
tail -f <worktree>/.ralph-progress.txt
.
在后台模式下运行循环脚本:
bash
~/.claude/skills/ralph/ralph.sh [iterations] [project-name]
设置
run_in_background: true
以防止超时。启动后,告知用户使用
tail -f <worktree>/.ralph-progress.txt
查看进度。

What It Does

功能说明

  1. Shows dependency graph, finds next available project
  2. Creates git worktree at
    ../{repo}-{feature}/
  3. For each iteration:
    • Picks first story where
      passes: false
    • Implements it, runs quality checks
    • Commits:
      feat: [id] - [title]
    • Updates JSON, syncs back to main repo
  4. When all stories pass, outputs
    <promise>COMPLETE</promise>
  1. 显示依赖关系图,找到下一个可用项目
  2. ../{repo}-{feature}/
    创建git worktree
  3. 每次迭代:
    • 选取第一个
      passes: false
      的任务故事
    • 实现该功能,运行质量检查
    • 提交:
      feat: [id] - [title]
    • 更新JSON文件,同步回主仓库
  4. 当所有任务故事通过后,输出
    <promise>COMPLETE</promise>

Dependencies

依赖关系

Ralph reads
dependsOn
from each PRD and enforces ordering:
json
{
  "projectName": "Dashboard",
  "dependsOn": ["auth-flow", "user-profile"]
}
Projects with incomplete dependencies are blocked. Ralph picks the first ready project alphabetically.
Ralph读取每个PRD中的
dependsOn
字段并强制执行顺序:
json
{
  "projectName": "Dashboard",
  "dependsOn": ["auth-flow", "user-profile"]
}
存在未完成依赖项的项目会被阻塞。Ralph会按字母顺序选取第一个就绪的项目。

Prerequisites

前置条件

  1. At least one
    .json
    PRD file in
    .claude/plans/
    ,
    plans/
    , or
    prds/
  2. Use plan mode to create a plan, then run
    /ralph-json-create-issues
    to convert it
  1. .claude/plans/
    plans/
    prds/
    目录中至少有一个
    .json
    格式的PRD文件
  2. 使用计划模式创建计划,然后运行
    /ralph-json-create-issues
    进行转换

Notes

注意事项

  • Run multiple Ralphs in parallel on independent projects (separate terminals)
  • Each works in its own worktree, no conflicts
  • 可在独立项目上并行运行多个Ralph实例(使用不同终端)
  • 每个实例在各自的worktree中工作,不会产生冲突