jpralph-iterate

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Ralph Single Iteration Executor

Ralph单迭代执行器

Execute ONE Ralph iteration - implement a single user story completely, then stop.
This is the manual mode skill. Use this when you want:
  • Maximum context cleanliness (new chat per story)
  • Full control and review between stories
  • To work through complex projects carefully
For faster execution with batches, use
jpralph-auto
instead.

执行一次Ralph迭代——完整实现单个用户故事后停止。
这是手动模式skill。当你有以下需求时可以使用:
  • 最高的上下文纯净度(每个故事对应新对话)
  • 故事之间可完全控制和审核
  • 谨慎处理复杂项目
如果需要批量快速执行,请使用
jpralph-auto
替代。

Your Task

你的任务

  1. Read the PRD at
    prd.json
    (in project root)
  2. Read the progress log at
    progress.txt
    (check Codebase Patterns section first)
  3. Check you're on the correct branch from PRD
    branchName
    . If not, check it out or create from main.
  4. Pick the highest priority user story where
    passes: false
  5. Implement that single user story completely
  6. Run quality checks (e.g., typecheck, lint, test - use whatever your project requires)
  7. Update AGENTS.md files if you discover reusable patterns (see below)
  8. If checks pass, commit ALL changes with message:
    feat: [Story ID] - [Story Title]
  9. Update the PRD to set
    passes: true
    for the completed story
  10. Append your progress to
    progress.txt

  1. 读取项目根目录下的
    prd.json
    文件(PRD)
  2. 读取
    progress.txt
    中的进度日志(先查看「代码库模式」章节)
  3. 检查当前分支是否与PRD中指定的
    branchName
    一致。若不一致,切换到该分支或从main分支创建该分支。
  4. 选择优先级最高且
    passes: false
    的用户故事
  5. 完整实现该单个用户故事
  6. 运行质量检查(例如类型检查、代码规范检查、测试——使用项目要求的任意检查方式)
  7. 若发现可复用模式,更新AGENTS.md文件(详见下文)
  8. 若检查通过,提交所有变更,提交信息格式为:
    feat: [Story ID] - [Story Title]
  9. 更新PRD,将已完成故事的
    passes
    设置为
    true
  10. 将你的执行进度追加到
    progress.txt

Progress Report Format

进度报告格式

APPEND to progress.txt (never replace, always append):
undefined
追加到progress.txt中(切勿替换内容,始终追加):
undefined

[Date/Time] - [Story ID]

[日期/时间] - [Story ID]

Chat: [Current chat ID or description]
  • What was implemented
  • Files changed
  • Learnings for future iterations:
    • Patterns discovered (e.g., "this codebase uses X for Y")
    • Gotchas encountered (e.g., "don't forget to update Z when changing W")
    • Useful context (e.g., "the evaluation panel is in component X")


The learnings section is critical - it helps future iterations avoid repeating mistakes and understand the codebase better.

---
对话: [当前对话ID或描述]
  • 实现内容
  • 修改的文件
  • 未来迭代的经验总结:
    • 发现的模式(例如:「此代码库使用X实现Y」)
    • 遇到的陷阱(例如:「修改W时别忘了更新Z」)
    • 有用的上下文信息(例如:「评估面板位于组件X中」)


经验总结部分至关重要——它有助于后续迭代避免重复犯错,更好地理解代码库。

---

Consolidate Patterns

整合模式

If you discover a reusable pattern that future iterations should know, add it to the
## Codebase Patterns
section at the TOP of progress.txt (create it if it doesn't exist). This section should consolidate the most important learnings:
undefined
若你发现可复用模式且后续迭代需要知晓,请将其添加到progress.txt顶部的「## 代码库模式」章节中(若该章节不存在则创建)。本章节应整合最重要的经验总结:
undefined

Codebase Patterns

代码库模式

  • Example: Use
    sql<number>
    template for aggregations
  • Example: Always use
    IF NOT EXISTS
    for migrations
  • Example: Export types from actions.ts for UI components

Only add patterns that are **general and reusable**, not story-specific details.

---
  • 示例:使用
    sql<number>
    模板实现聚合操作
  • 示例:迁移时始终使用
    IF NOT EXISTS
  • 示例:从actions.ts导出类型供UI组件使用

仅添加通用且可复用的模式,不要添加故事特定的细节。

---

Update AGENTS.md Files

更新AGENTS.md文件

Before committing, check if any edited files have learnings worth preserving in nearby AGENTS.md files:
  1. Identify directories with edited files - Look at which directories you modified
  2. Check for existing AGENTS.md - Look for AGENTS.md in those directories or parent directories
  3. Add valuable learnings - If you discovered something future developers/agents should know:
    • API patterns or conventions specific to that module
    • Gotchas or non-obvious requirements
    • Dependencies between files
    • Testing approaches for that area
    • Configuration or environment requirements
Examples of good AGENTS.md additions:
  • "When modifying X, also update Y to keep them in sync"
  • "This module uses pattern Z for all API calls"
  • "Tests require the dev server running on PORT 3000"
  • "Field names must match the template exactly"
Do NOT add:
  • Story-specific implementation details
  • Temporary debugging notes
  • Information already in progress.txt
Only update AGENTS.md if you have genuinely reusable knowledge that would help future work in that directory.

提交前,检查是否有任何编辑过的文件包含值得保留在附近AGENTS.md文件中的经验总结:
  1. 确定修改文件所在的目录——查看你修改了哪些目录
  2. 检查是否存在AGENTS.md——查看这些目录或其父目录中是否有AGENTS.md
  3. 添加有价值的经验总结——若你发现未来开发者/Agent需要知晓的内容:
    • 该模块特有的API模式或约定
    • 需要注意的陷阱或非明显要求
    • 文件之间的依赖关系
    • 该区域的测试方法
    • 配置或环境要求
优秀的AGENTS.md添加示例:
  • 「修改X时,也需更新Y以保持同步」
  • 「此模块对所有API调用使用模式Z」
  • 「测试需要开发服务器运行在PORT 3000端口」
  • 「字段名称必须完全匹配模板」
请勿添加:
  • 故事特定的实现细节
  • 临时调试笔记
  • 已在progress.txt中存在的信息
仅当你拥有能帮助该目录后续工作的真正可复用知识时,才更新AGENTS.md。

Quality Requirements

质量要求

  • ALL commits must pass your project's quality checks (typecheck, lint, test)
  • Do NOT commit broken code
  • Keep changes focused and minimal
  • Follow existing code patterns

  • 所有提交必须通过项目的质量检查(类型检查、代码规范检查、测试)
  • 请勿提交有问题的代码
  • 保持变更聚焦且最小化
  • 遵循现有代码模式

Browser Testing (Required for Frontend Stories)

浏览器测试(前端故事必填)

For any story that changes UI, you MUST verify it works in the browser:
  1. Use Antigravity's browser tools to navigate to the relevant page
  2. Verify the UI changes work as expected
  3. Take a screenshot if helpful for the progress log
A frontend story is NOT complete until browser verification passes.

对于任何修改UI的故事,你必须在浏览器中验证其功能:
  1. 使用Antigravity的浏览器工具导航到相关页面
  2. 验证UI变更是否按预期工作
  3. 若有助于进度记录,可截取屏幕截图
前端故事只有通过浏览器验证才算完成。

Stop Condition

停止条件

After completing a user story, check if ALL stories have
passes: true
.
If ALL stories are complete and passing, reply with: <promise>COMPLETE</promise>
If there are still stories with
passes: false
, end your response with: <promise>DONE</promise>
This signals that this iteration is complete, but more work remains. The user should create a NEW CHAT for the next iteration.

完成一个用户故事后,检查是否所有故事的
passes
都为
true
若所有故事均已完成且通过检查,回复: <promise>COMPLETE</promise>
若仍有故事的
passes: false
,请在响应末尾添加: <promise>DONE</promise>
这表示本次迭代已完成,但仍有剩余工作。用户应创建新对话以进行下一次迭代。

Important

重要提示

  • Work on ONE story per iteration
  • Commit when quality checks pass
  • Keep CI green
  • Read the Codebase Patterns section in progress.txt before starting
  • End with
    <promise>DONE</promise>
    when this story is complete
  • End with
    <promise>COMPLETE</promise>
    only if ALL stories are done

  • 每次迭代仅处理一个故事
  • 质量检查通过后再提交
  • 保持CI构建绿色
  • 开始前阅读progress.txt中的「代码库模式」章节
  • 完成本故事后,在末尾添加
    <promise>DONE</promise>
  • 仅当所有故事完成时,才添加
    <promise>COMPLETE</promise>

Next Steps Guidance

后续步骤指引

When you output
<promise>DONE</promise>
, also provide clear guidance:
Story US-XXX complete! ✅

Remaining stories: [count]
Next story: US-YYY - [title]

To continue:
1. Create a NEW CHAT (for fresh context)
2. Load the jpralph-iterate skill
3. The agent will pick up the next story automatically
This helps the user know exactly what to do next.
当你输出
<promise>DONE</promise>
时,同时提供清晰的指引:
故事US-XXX已完成! ✅

剩余故事数量:[数量]
下一个故事:US-YYY - [标题]

继续操作步骤:
1. 创建新对话(获取全新上下文)
2. 加载jpralph-iterate skill
3. Agent将自动接手下一个故事
这能帮助用户明确了解接下来的操作。