iterate-research

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Iterate Research

迭代研究

Revise one research artifact in place. Treat the artifact as a current-state technical map: feedback changes the questions or corrects the map, and evidence determines the resulting claims.
原地修订一份研究产物。将该产物视为反映当前状态的技术地图:反馈会改变研究问题或纠正这张地图,而证据决定最终形成的主张。

1. Select exactly one research artifact

1. 恰好选择一份研究产物

Prefer a research-document path supplied by the user. Otherwise, inspect the task artifact directory named in the system context, or
.agent-work/tasks/<task-slug>/
when the task slug is known, with
ls -La -- <artifact-directory>
;
-L
is required because the directory may be a symlink. Select files whose basename matches
*research*.md
while excluding
*research-questions*.md
.
  • One candidate: select it.
  • Several candidates: list them, ask the user to choose, and stop before reading any candidate.
  • No candidate, or no task artifact directory in context: ask the user for the research-document path and the feedback or additional question to address.
The artifact directory is a narrow trust boundary. Read the selected research document and only feedback sources the user explicitly identifies; leave
ticket.md
,
task.md
, research-question artifacts, and unrelated task files unopened.
Complete when: one research artifact has been selected unambiguously, or the turn has stopped on the single missing selection required from the user.
优先使用用户提供的研究文档路径。否则,检查系统上下文中指定的任务产物目录;如果已知任务 slug,则使用
.agent-work/tasks/<task-slug>/
,并通过
ls -La -- <artifact-directory>
进行检查。由于目录可能是符号链接,因此必须使用
-L
。选择文件名匹配
*research*.md
的文件,但排除
*research-questions*.md
。
  • 只有一个候选项:选择它。
  • 有多个候选项:列出它们,请用户选择,并在读取任何候选项之前停止。
  • 没有候选项,或上下文中没有任务产物目录:请用户提供研究文档路径,以及要处理的反馈或补充问题。
任务产物目录是一个范围严格的信任边界。读取选定的研究文档,并且只读取用户明确指定的反馈来源;不要打开
ticket.md
、
task.md
、研究问题产物或无关的任务文件。
完成条件: 已无歧义地选择一份研究产物,或者本轮已停止,并只需用户补充唯一缺失的选择。

2. Establish the full baseline

2. 建立完整基线

Read the selected document from first byte to last, including its YAML frontmatter, citations, open questions, and any existing revision-history convention. Read every file the user directly names as feedback in full before delegating research.
If the feedback arrives as artifact comments, asks to fetch comments, or includes a
<comments>...</comments>
block, read comment feedback now and follow its input and authorization rules. If no feedback, comments, or follow-up question was provided, ask for one focused revision request and stop.
Complete when: the whole artifact and every explicitly supplied feedback source have been read, the feedback source is known, and no unrequested artifact file has been opened.
从头到尾完整读取选定的文档,包括其 YAML frontmatter、引用、开放问题以及任何现有的修订历史约定。在委派研究之前,完整读取用户直接指定为反馈来源的所有文件。
如果反馈以产物评论的形式到达、要求获取评论,或包含
<comments>...</comments>
块,请立即阅读评论反馈,并遵循其中的输入和授权规则。如果未提供反馈、评论或后续问题,请提出一个聚焦的修订请求并停止。
完成条件: 已完整读取整个产物及所有明确提供的反馈来源,已知反馈来源,且未打开任何未经请求的产物文件。

3. Build an exhaustive revision ledger

3. 建立详尽的修订台账

Split the input into atomic items and assign each one a mode:
ModeRequired treatment
EditorialReword, restructure, or clarify without changing unsupported facts.
Correction or challenged claimRe-check the affected claim against current evidence.
Evidence gap or follow-up questionInvestigate the missing repository behavior.
Scope changeState the new boundary and identify every section it affects.
External-source refreshUse web research only when the user explicitly requested it.
Comment actionTrack the content change separately from any reply, resolution, or deletion.
Record the target section, evidence needed, and intended disposition for every item. Mark ambiguous items before research; ask only when competing interpretations would materially change the artifact.
Complete when: every feedback statement and every in-scope unresolved comment appears once in the ledger, and each item has a mode, affected section, evidence need, and intended disposition.
将输入拆分为原子条目,并为每个条目指定一种模式:
模式必需处理方式
编辑在不改变缺乏依据的事实的情况下,重新措辞、重组或澄清内容。
更正或受到质疑的主张根据当前证据重新检查受影响的主张。
证据缺口或后续问题调查缺失的代码库行为。
范围变更说明新的边界,并确定其影响的所有章节。
外部来源刷新仅当用户明确要求时才使用网络研究。
评论操作将内容变更与任何回复、解决或删除操作分开跟踪。
为每个条目记录目标章节、所需证据和预期处置。在研究前标记含义不明确的条目;仅当不同解释会实质改变产物时才向用户询问。
完成条件: 每条反馈陈述和每个在范围内且尚未解决的评论都在台账中出现一次,并且每个条目都有模式、受影响章节、证据需求和预期处置。

4. Refresh the affected evidence

4. 刷新受影响的证据

For every ledger item that can change a factual claim, read and apply evidence revision. Editorial-only items may skip this step when they leave meaning and citations unchanged.
Use independent read-only subagents in parallel for independent repository questions. Keep artifact synthesis and editing in this agent. Wait for all dispatched work, reconcile overlapping findings, and run a focused second wave only for uncovered paths or unresolved contradictions.
Complete when: every factual ledger item is supported, narrowed, contradicted, or explicitly left open; every new or changed claim has traceable evidence; and all delegated work has returned and been reconciled.
对于每个可能改变事实性主张的台账条目,阅读并应用证据修订。仅涉及编辑的条目如果不改变含义和引用,可以跳过此步骤。
对于彼此独立的代码库问题,使用相互独立的只读子 Agent 并行处理。产物综合与编辑保留在本 Agent 中。等待所有已分派的工作返回,协调相互重叠的发现,并且仅针对未覆盖的路径或尚未解决的矛盾进行有针对性的第二轮处理。
完成条件: 每个事实性台账条目均已得到支持、收窄、反驳或被明确保留为开放状态;每项新增或变更的主张都有可追溯的证据;所有委派工作均已返回并完成协调。

5. Recompose the artifact in place

5. 原地重组产物

Before editing, read research document style. Revise the selected path rather than creating a sibling document. Preserve the frontmatter schema, key order, and unrelated values. When repository evidence was refreshed, update existing snapshot fields such as
date
,
git_commit
,
branch
, or
repository
to the snapshot actually researched; add no new frontmatter keys unless the user requested them.
Weave findings into their conceptual sections and rework affected transitions, summaries, code references, architecture explanations, testing coverage, and open questions. Preserve useful unaffected material. When a conclusion changed, keep provenance at the affected claim or in the document's existing revision-history section; a newly appended changelog is not a substitute for a cohesive document.
If authorized comment actions depend on the edit, perform them only after the artifact write succeeds, following comment feedback.
Complete when: every ledger item has one visible disposition in the revised artifact or comment thread, the artifact contains no placeholders, and the selected file is the only artifact file created or edited.
编辑前,阅读研究文档样式。修订选定路径,而不是创建同级文档。保留 frontmatter 模式、键顺序和无关值。当代码库证据已刷新时,将
date
、
git_commit
、
branch
或
repository
等现有快照字段更新为实际研究时的快照;除非用户要求,否则不得新增 frontmatter 键。
将研究发现融入相应概念性章节,并重构受影响的衔接内容、摘要、代码引用、架构说明、测试覆盖和开放问题。保留仍然有用且不受影响的内容。当结论发生变化时,在受影响的主张处或文档现有的修订历史章节中保留来源记录;新追加的变更日志不能替代一份连贯完整的文档。
如果已授权的评论操作依赖本次编辑,则仅在产物写入成功后执行,并遵循评论反馈。
完成条件: 每个台账条目都在修订后的产物或评论线程中呈现一种明确可见的处置结果,产物中不包含占位内容,并且选定文件是唯一被创建或编辑的产物文件。

6. Validate and hand off

6. 验证并交付

Read the revised artifact completely. Verify all of the following:
  • frontmatter parses and preserves the prior schema;
  • every ledger item is accepted, partially accepted, disputed with evidence, deferred with a reason, or converted into a specific open question;
  • every changed factual claim has a valid repository citation or external link, and cited locations still support the surrounding sentence;
  • contradictions, version boundaries, and inference are labeled rather than silently flattened;
  • takeaway headers, visuals, prose, code references, testing coverage, and open questions satisfy research document style;
  • Markdown fences and local links are balanced and resolvable, host-provided or repository permalinks contain no placeholder values, and the open-question count is exact;
  • every authorized comment reply/state change succeeded, while unrequested comment state stayed unchanged.
Then read the research handoff. If any validation check remains unresolved, render its blocked branch and do not claim the revision is complete or offer the next workflow command. Otherwise render the completed branch with the artifact path and any permalink the host provides.
Complete when: either every validation check passes and the completed handoff reports the verified artifact location and accurate open-question status, or the blocked handoff names every unresolved check and the evidence or decision needed to continue.
完整读取修订后的产物。验证以下所有事项:
  • frontmatter 可以解析,并保留原有模式;
  • 每个台账条目均已被接受、部分接受、附证据提出异议、附理由推迟,或转化为具体的开放问题;
  • 每项变更后的事实性主张都有有效的代码库引用或外部链接,且引用位置仍支持上下文中的句子;
  • 矛盾、版本边界和推断均已明确标注,而不是被无声地混同;
  • 结论标题、图表、行文、代码引用、测试覆盖和开放问题均符合研究文档样式;
  • Markdown 代码围栏和本地链接保持平衡且可以解析,宿主提供或代码库中的永久链接不包含占位值,开放问题数量准确无误;
  • 每项已授权的评论回复或状态变更均已成功执行,而未经请求的评论状态保持不变。
然后阅读研究交付说明。如果仍有任何验证检查未解决,请输出对应的阻塞分支,并且不要声称修订已经完成,也不要提供下一条工作流命令。否则,输出完成分支,其中包含产物路径以及宿主提供的任何永久链接。
完成条件: 所有验证检查均已通过,且完成交付说明报告了已验证的产物位置和准确的开放问题状态;或者阻塞交付说明列出了所有未解决的检查,以及继续推进所需的证据或决策。