pdd-bug

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

PDD bug

PDD bug 修复

Each area is one main chat. Step briefs are in
steps/
.
?
= optional.
  1. story: reproduce, prompt-story → gate: approve
  2. prompt-pr: check, try? → approve, then gate: pr (PR 1: prompt, Story, tests), then ask
  3. code: build, verify, formal → gate: pr (PR 2)
每个区域都是一个主聊天。步骤简报位于
steps/
。
?
= 可选。
  1. story: 复现,prompt-story → gate: approve
  2. prompt-pr: 检查,try? → approve,然后 gate: pr(PR 1: prompt、Story、测试),接着询问
  3. code: build、verify、formal → gate: pr(PR 2)

Rules

规则

  • The main chat coordinates and talks with the person. It does not write code.
  • Run each step in a new subagent, never reused, so verify never checks its own code. Give it its full brief at once: the step file and file paths, not the chat history. Then wait for it with one long time-out. Do not send small follow-up messages or use short waits.
  • At a gate, show the result, ask the person, and stop. For changes, revise here and ask again.
  • Write each link as its full URL (
    https://…
    ), never as a linked word.
  • Before an optional step, ask the person and wait for the answer: "Do you want to try it now? yes/no". In a run, run
    <pdd> workflow ask
    first.
  • At the story gate, start with one verdict line, then the details: "Verdict: the bug is in the PROMPT (its check fails on the issue's case).", "Verdict: the prompt is right; the bug is only in the CODE." or "Verdict: no prompt covers this yet; the bug can only be in the code." Give the full paths of the Story files. If a new prompt covers only this issue, say that a bigger "adopt PDD for this module" step can come later. You may offer: "You can also open it now with
    pdd try <story>
    before the check." End with: "Reply 'I approve' here or run
    pdd workflow approve N
    , or tell me what to change."
  • Before PR 1, show the
    Runtime check
    line(s) with the report link(s) and the Try link, if any. Ask the person to try it and approve, or ask for changes. pdd opens PR 1 only after the approval. Then show the PR 1 link and ask: "Do you want the code PR now, or stop here and merge PR 1 first? To make the code PR later, run
    pdd workflow approve N
    ." The code area starts only when the person asks.
  • If verify or formal finds a failing case, go back to build in a new subagent, at most 2 times. If it still fails, PR 2 opens anyway with "✗ N vectors fail" on top. Say so at the gate.
  • A person decides expected values. Never change a test to make it pass.
  • Never push, open a PR or merge.
  • 主聊天负责协调并与用户沟通,不编写代码。
  • 每个步骤都在一个新的 subagent 中运行,绝不重复使用,确保 verify 不会检查自己编写的代码。一次性向其提供完整的 brief:步骤文件和文件路径,而不是聊天记录。然后使用一次长时间超时等待完成。不要发送简短的后续消息,也不要使用短等待。
  • 到达 gate 时,展示结果、询问用户,然后停止。如果需要修改,则在此处修改并再次询问。
  • 每个链接都写为完整 URL(
    https://…
    ),绝不写成链接文字。
  • 在可选步骤之前,询问用户并等待回答:“您想现在试试吗?yes/no”。在一次 run 中,先运行
    <pdd> workflow ask
    。
  • 在 story gate,先给出一行结论,然后提供详情:“结论:bug 位于 PROMPT(其 check 在该问题的用例上失败)。”“结论:prompt 是正确的;bug 仅存在于 CODE 中。”或“结论:目前还没有 prompt 覆盖此问题;bug 只可能存在于 code 中。”给出 Story 文件的完整路径。如果新增的 prompt 仅覆盖此问题,说明之后可以执行更大范围的 “adopt PDD for this module” 步骤。可以提议:“您也可以先运行
    pdd try <story>
    ,然后再进行 check。”结尾为:“请在此回复 'I approve' 或运行
    pdd workflow approve N
    ,或者告诉我需要修改什么。”
  • 在 PR 1 之前,展示
    Runtime check
    行、报告链接以及存在时的 Try 链接。请用户试用并批准,或提出修改要求。只有获得批准后,pdd 才会创建 PR 1。然后展示 PR 1 链接并询问:“您想现在创建代码 PR,还是先停在这里并合并 PR 1?如果想稍后创建代码 PR,请运行
    pdd workflow approve N
    。”仅当用户提出要求时,code 区域才会开始。
  • 如果 verify 或 formal 找到失败的用例,则回到 build,并在一个新的 subagent 中重试,最多 2 次。如果仍然失败,PR 2 仍会创建,并在顶部显示“✗ N vectors fail”。在 gate 处说明这一点。
  • 预期值由用户决定。绝不修改测试来使其通过。
  • 绝不 push、创建 PR 或 merge。

In a run (see the first message)

在一次 run 中(参见第一条消息)

  • Each step writes notes to
    <run folder>/STEP.md
    and commits its code.
  • When you need the person's answer in the middle of a step, run
    <pdd> workflow ask "<question>"
    first. Then ask it in a plain chat message (never a question dialog such as request_user_input) and end your turn. The person answers in the chat or with
    pdd workflow changes N "answer"
    .
  • When the person approves in their own words, run
    <pdd> workflow approve N
    . Never approve for them.
To try a CLI, run
pdd try <story> --cli
, then run the command.
  • 每个步骤都将笔记写入
    <run folder>/STEP.md
    ,并 commit 其代码。
  • 如果在步骤中途需要用户回答,先运行
    <pdd> workflow ask "<question>"
    。然后在普通聊天消息中询问(绝不使用 request_user_input 之类的问题对话框),并结束当前回合。用户可以在聊天中回答,或运行
    pdd workflow changes N "answer"
    。
  • 当用户用自己的话表示批准时,运行
    <pdd> workflow approve N
    。绝不代替用户批准。
要试用 CLI,运行
pdd try <story> --cli
,然后运行该命令。