ratatouille

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Ratatouille

Ratatouille

Implement one task from
prd.json
per iteration using tracer-bullet methodology and a compounding engineering mindset. Maintain
progress.txt
across iterations.
每次迭代采用追踪式开发(tracer-bullet)方法和复合工程思维完成
prd.json
中的一个任务。在迭代过程中维护
progress.txt
文件。

Trigger Formats

触发格式

  • ratatouille: <short task hint>
  • ratatouille: <file path>
    (e.g.,
    ratatouille: prd.json
    )
  • ratatouille: <简短任务提示>
  • ratatouille: <文件路径>
    (例如:
    ratatouille: prd.json

Required Files

必需文件

  • prd.json
    (root)
  • progress.txt
    (root)
  • prd.json
    (根目录)
  • progress.txt
    (根目录)

Workflow

工作流程

0) Bootstrap (Always First)

0) 初始化(始终第一步)

  1. Read
    progress.txt
    (if missing, create it).
  2. Read
    prd.json
    . If missing, stop and ask user to run mise-en-place.
  3. If this is the first iteration, ask what to do after each iteration and store in
    progress.txt
    .
Post-iteration action options:
  • qa
    (run tests/checks)
  • simplify
    (refactor for clarity)
  • deslop
    (remove duplication, tighten docs)
  • review
    (code-review + fix)
  • commit
    (atomic commit)
  • none
  1. 读取
    progress.txt
    文件(若缺失则创建)。
  2. 读取
    prd.json
    文件。若缺失,停止操作并要求用户运行mise-en-place(环境准备)。
  3. 如果是第一次迭代,询问用户每次迭代后要执行的操作,并将其存储到
    progress.txt
    中。
迭代后操作选项:
  • qa
    (运行测试/检查)
  • simplify
    (重构以提升清晰度)
  • deslop
    (移除重复代码,优化文档)
  • review
    (代码审查+修复问题)
  • commit
    (原子提交)
  • none
    (无操作)

1) Pick the Next Task

1) 选择下一个任务

  • If the user provided a task hint, match it to a
    tasks[].id
    or
    tasks[].title
    .
  • Otherwise, pick the first
    status: "todo"
    task.
  • If multiple tasks are equally valid, ask the user to choose.
  • 如果用户提供了任务提示,将其与
    tasks[].id
    tasks[].title
    匹配。
  • 否则,选择第一个状态为
    status: "todo"
    的任务。
  • 如果有多个符合条件的任务,询问用户选择。

2) Tracer-Bullet Implementation

2) 追踪式开发实现

For the chosen task: Use a tracer bullet to build the thinnest end-to-end vertical slice that touches every needed layer. This code is not a throwaway prototype—it becomes the foundation you expand after validating the path works. Aim for one happy path, minimal data, and fast feedback before adding depth.
  1. Identify layers involved (UI, API, DB, config, tests).
  2. Build the thinnest end-to-end slice that works.
  3. Validate it (minimal integration test or manual check).
  4. Expand only after the tracer bullet is working.
针对选定的任务: 采用追踪式开发构建最精简的端到端垂直切片,覆盖所有必要层级。此代码并非一次性原型——它将成为验证路径可行后进行扩展的基础。目标是先实现一个正常流程、最小化数据量,在增加深度前快速获取反馈。
  1. 确定涉及的层级(UI、API、数据库、配置、测试)。
  2. 构建可运行的最精简端到端切片
  3. 验证其有效性(最小化集成测试或手动检查)。
  4. 仅在追踪式开发的基础路径可行后再进行扩展。

3) Compound Engineering Mindset

3) 复合工程思维

Apply compounding leverage:
  • Prefer reusable abstractions only after the tracer works.
  • Automate or document any non-obvious learnings.
  • Make improvements that reduce future work (tests, scripts, patterns).
应用复合杠杆效应:
  • 仅在追踪式开发的基础路径可行后,才优先考虑可复用的抽象。
  • 将任何非显而易见的经验自动化或记录下来。
  • 进行能减少未来工作量的改进(测试、脚本、模式)。

4) Update
progress.txt

4) 更新
progress.txt

Append a new section:
Iteration: <N>
Task: <id + title>
Status: done|partial|blocked
Decisions:
- ...
Learnings:
- ...
Next:
- ...
Post-Iteration Actions:
- qa|simplify|deslop|review|commit|none
追加新的章节:
Iteration: <N>
Task: <id + title>
Status: done|partial|blocked
Decisions:
- ...
Learnings:
- ...
Next:
- ...
Post-Iteration Actions:
- qa|simplify|deslop|review|commit|none

5) Update
prd.json

5) 更新
prd.json

  • Set task
    status
    to
    done
    or
    partial
    .
  • Add notes if blocked.
  • Keep
    updated
    date fresh.
  • 将任务的
    status
    设置为
    done
    partial
  • 若任务被阻塞,添加备注。
  • 更新
    updated
    日期为最新。

6) Run Post-Iteration Actions

6) 执行迭代后操作

Use the actions recorded in
progress.txt
:
  • qa
    : run relevant tests/checks
  • simplify
    : simplify or refactor touched code
  • deslop
    : remove duplication, tighten docs
  • review
    : run a code review and fix issues
  • commit
    : create an atomic commit
按照
progress.txt
中记录的操作执行:
  • qa
    :运行相关测试/检查
  • simplify
    :简化或重构涉及的代码
  • deslop
    :移除重复代码,优化文档
  • review
    :进行代码审查并修复问题
  • commit
    :创建原子提交

7) Recursive Handoff

7) 递归交接

If tasks remain, re-trigger ratatouille:
  • If the harness supports
    /handoff
    or
    /new
    , re-issue the same prompt with updated context.
  • Otherwise, ask the user to re-run the same
    ratatouille:
    command.
若仍有剩余任务,重新触发ratatouille:
  • 如果工具支持
    /handoff
    /new
    指令,使用更新后的上下文重新发送相同的提示。
  • 否则,要求用户重新运行相同的
    ratatouille:
    命令。

Notes

注意事项

  • Always start by reading
    progress.txt
    .
  • Implement one task per iteration.
  • Keep changes scoped and verified.
  • 始终先读取
    progress.txt
  • 每次迭代仅完成一个任务
  • 保持变更范围明确并经过验证。