create-research-questions

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Create Research Questions

创建研究问题

Create a query plan for a later research session. The artifact describes what the codebase and its dependencies do today; it does not design the requested change or answer the questions.
为后续研究会话创建一份查询计划。该产物描述代码库及其依赖当前的作用;它不设计所请求的变更,也不回答这些问题。

1. Establish the source boundary

1. 确定来源边界

Read every file the user explicitly names or
@
-mentions, in full, before exploring anything else. This includes a named
ticket.md
,
task.md
, or collateral document. Treat the user's request and those files as the task brief. Leave other task artifacts unopened unless the user explicitly includes them.
While reading, build a private pointer ledger containing every exact:
  • URL or document/issue reference;
  • repository name or path;
  • library, dependency, package, or version;
  • file or directory path.
Preserve pointer text verbatim. Also identify the requested outcome privately so it can guide scope without appearing as a proposed implementation in the question list.
Complete when: every explicitly supplied source has been read from beginning to end, every concrete pointer from those sources is present once in the ledger, and the task's research boundary can be stated without guessing.
在探索其他任何内容之前,完整读取用户明确命名或通过
@
提及的每个文件。这包括明确指定的
ticket.md
、
task.md
或辅助文档。将用户请求和这些文件视为任务简报。除非用户明确包含,否则不要打开其他任务产物。
阅读时,建立一份私有指针清单,其中包含每个确切的:
  • URL 或文档/议题引用;
  • 仓库名称或路径;
  • 库、依赖项、软件包或版本;
  • 文件或目录路径。
逐字保留指针文本。同时私下确定预期结果,用它来指导范围界定,但不要让它以建议实现的形式出现在问题列表中。
完成条件: 已从头到尾阅读所有明确提供的来源,所有来自这些来源的具体指针均已一次性记录在清单中,并且无需猜测即可表述任务的研究边界。

2. Run reconnaissance, not the research phase

2. 执行初步勘察,而不是正式研究

Collect only enough evidence to turn the brief into grounded questions. Keep the reconnaissance read-only.
只收集足够的证据,将任务简报转化为有依据的问题。初步勘察应保持只读。

Repository evidence branch

仓库证据分支

When the task touches the current repository, inspect it with the available repository tools or delegate bounded read-only work to these specialist agents when present:
  • codebase-locator
    — locate relevant source, configuration, migration, documentation, and test surfaces;
  • codebase-analyzer
    — trace a current flow, contract, or component interaction that is needed to frame a question;
  • codebase-pattern-finder
    — locate comparable implementations and the conventions they expose.
Use agents concurrently only for independent surfaces. Give each agent a narrow current-state query and require paths plus line references. Treat their findings as reconnaissance leads, not as the final research report. Stop once the major boundaries and likely evidence locations are known.
当任务涉及当前仓库时,使用可用的仓库工具进行检查;如果存在以下专业 Agent,也可向其委派范围明确的只读工作:
  • codebase-locator
    ——定位相关源代码、配置、迁移、文档和测试界面;
  • codebase-analyzer
    ——追踪为构建问题所需的当前流程、契约或组件交互;
  • codebase-pattern-finder
    ——定位类似的现有实现及其所体现的约定。
仅在各个工作面相互独立时并发使用 Agent。为每个 Agent 提供范围明确的当前状态查询,并要求返回路径及行号引用。将其发现视为勘察线索,而不是最终研究报告。一旦主要边界和可能的证据位置已经明确,即停止探索。

External evidence branch

外部证据分支

Use
web-search-researcher
or the available web tools when the brief contains an external URL, repository, SDK, library, protocol, hosted service, or version-sensitive capability whose documentation affects the query plan. Prefer official, current sources and retain direct URLs. Skip this branch for a wholly internal task whose questions can be anchored in repository evidence.
Add newly discovered high-signal paths, packages, repositories, and URLs to the pointer ledger. Mark discovered pointers separately from user-supplied pointers so only verbatim supplied pointers are guaranteed provenance.
Complete when: every in-scope system boundary has at least one evidence lead, each repository lead has a path (and line when available), each external lead has a direct authoritative URL, and no further exploration is required merely to phrase the questions precisely.
当任务简报包含外部 URL、仓库、SDK、库、协议、托管服务,或文档会影响查询计划的版本敏感能力时,使用
web-search-researcher
或可用的 Web 工具。优先采用官方最新来源,并保留直接 URL。对于完全内部的任务,如果问题能够以仓库证据为依据,则跳过此分支。
将新发现的高信号路径、软件包、仓库和 URL 添加到指针清单中。将发现的指针与用户提供的指针分开标记,确保只有逐字提供的指针具有来源保证。
完成条件: 每个范围内的系统边界至少有一条证据线索,每条仓库线索都有路径(在可用时还有行号),每条外部线索都有直接权威 URL,并且无需进一步探索即可准确表述问题。

3. Build a coverage map

3. 构建覆盖映射

Map the task to the current-state dimensions that a researcher must explain. Consider each dimension and retain it only when material:
  • entry points and end-to-end control or data flow;
  • ownership, module boundaries, and component/service interactions;
  • interfaces, schemas, storage, events, and cross-repository contracts;
  • configuration, feature flags, runtime or deployment behavior;
  • error paths, edge cases, lifecycle, concurrency, and state transitions;
  • existing analogous patterns and their tests;
  • test coverage, fixtures, mocks, and verification conventions;
  • dependency or platform behavior documented outside the repository.
For frontend or visual work, always reserve coverage for the relevant design system: component library, color values, typography, spacing, borders, shadows, tokens, themes, and existing product-area composition patterns. This design-system question may be broader than the named screen or component.
Merge dimensions answered by the same evidence trail. Split dimensions whose answers require different systems or sources.
Complete when: every material dimension appears exactly once in the map, every map item names an evidence lead or pointer, and the map has no duplicate or orphaned item.
将任务映射到研究人员必须解释的当前状态维度。逐一考虑以下维度,仅保留实质性维度:
  • 入口点以及端到端控制流或数据流;
  • 所有权、模块边界以及组件/服务交互;
  • 接口、模式、存储、事件和跨仓库契约;
  • 配置、功能开关、运行时或部署行为;
  • 错误路径、边缘情况、生命周期、并发和状态转换;
  • 现有类似模式及其测试;
  • 测试覆盖、fixtures、mocks 和验证约定;
  • 在仓库之外有文档说明的依赖项或平台行为。
对于前端或视觉工作,始终为相关设计系统保留覆盖范围:组件库、颜色值、排版、间距、边框、阴影、tokens、主题以及现有产品区域的组合模式。该设计系统问题的范围可以比指定的屏幕或组件更广。
合并可由同一证据链解答的维度。拆分需要不同系统或来源才能解答的维度。
完成条件: 每个实质性维度在映射中恰好出现一次,每个映射项都指定了证据线索或指针,并且映射中不存在重复项或孤立项。

4. Turn the map into descriptive questions

4. 将映射转化为描述性问题

Write a prioritized set of questions for the next agent. Default to 2–7 questions; exceed seven only for an unusually broad task or an explicit user request.
Each question must:
  • ask what exists, where it exists, how it works, or how current parts interact;
  • name the relevant scope and, when known, an evidence starting point;
  • be broad enough to produce a coherent explanation but bounded enough to know when it is answered;
  • cover current tests and edge behavior with the component they belong to;
  • direct dependency questions to the exact library, version, repository, or official documentation when known.
Use neutral formulations such as “How does…?”, “Trace…”, “Explain…”, “Where is…?”, and “What contract…?”. Translate the requested future change into its surrounding current-state behavior. A proposed solution, desired architecture, improvement, root-cause theory, or implementation instruction is outside this query plan unless the user explicitly asks for that additional mode.
Complete when: every coverage-map item is owned by at least one question, every question has a recognizable answer boundary and evidence strategy, and the set contains no redundant question.
为下一个 Agent 编写一组有优先级的问题。默认使用 2–7 个问题;仅当任务异常广泛或用户明确要求时才超过七个。
每个问题必须:
  • 询问当前存在什么、位于哪里、如何工作,或当前各部分如何交互;
  • 指明相关范围,并在已知时提供证据起点;
  • 范围足够宽,能够产生连贯解释,但又足够有界,以便明确何时已得到答案;
  • 将当前测试和边缘行为与其所属组件一并覆盖;
  • 将依赖项问题指向确切库、版本、仓库或官方文档(已知时)。
使用中立表述,例如“它如何……?”、“追踪……”、“解释……”、“位于哪里?”以及“存在什么……契约?”。将请求的未来变更转换为其所处的当前状态行为。除非用户明确要求采用额外模式,否则查询计划中不应包含建议解决方案、期望架构、改进方案、根因理论或实现指令。
完成条件: 覆盖映射中的每个项目至少由一个问题负责,每个问题都有可识别的答案边界和证据策略,并且问题集合不存在冗余。

5. Run the current-state gate

5. 执行当前状态门禁

Audit every question independently:
  1. Could it be answered by documenting the system as it exists now?
  2. Does it avoid revealing or endorsing the requested implementation?
  3. Does it avoid asking what should change, what should be built, or which option is better?
  4. Does it point the researcher toward concrete repository or authoritative external evidence?
  5. Does it contribute unique coverage at the task's actual scale?
Rewrite or remove every question that fails any check. Confirm that frontend scope includes the design-system coverage from step 3.
Complete when: every retained question passes all five checks, the count is justified by task breadth, and all high-impact unknowns from the coverage map remain represented.
独立审核每个问题:
  1. 该问题能否通过记录系统当前状态来回答?
  2. 它是否避免泄露或认可所请求的实现?
  3. 它是否避免询问应该改变什么、应该构建什么或哪个方案更优?
  4. 它是否为研究人员指明具体的仓库证据或权威外部证据?
  5. 它是否在任务的实际规模下提供独特覆盖?
重写或删除任何未通过检查的问题。确认前端范围包含步骤 3 中的设计系统覆盖。
完成条件: 每个保留的问题均通过全部五项检查,问题数量与任务广度相称,并且覆盖映射中的所有高影响未知项仍得到体现。

6. Write the artifact

6. 编写产物

Read
references/research_questions_template.md
in full before writing.
Resolve the destination as follows:
  1. Use the task artifact directory supplied by the environment when available.
  2. Otherwise enumerate
    .agent-work/tasks
    while following symlinks and reuse the single directory matching the ticket identifier or task slug.
  3. If no matching directory exists, create
    .agent-work/tasks/<TICKET-ID>-<task-slug>/
    when a ticket exists, or
    .agent-work/tasks/<task-slug>/
    otherwise.
  4. If multiple directories plausibly match and the sources do not disambiguate them, ask the user which one owns the artifact before writing.
  5. Inspect every filename in the chosen directory, take the highest leading two-digit
    NN-
    index, and increment it. Use
    01
    when none exists.
  6. Write
    NN-research-questions-DESCRIPTION.md
    , where
    DESCRIPTION
    is a specific 2–4 word kebab-case slug.
For example, a ticket-backed first artifact may be
.agent-work/tasks/ENG-1478-parent-child-tracking/01-research-questions-parent-child-tracking.md
; a request without a ticket may use
.agent-work/tasks/authentication-flow/01-research-questions-auth-flow.md
.
Populate the template without placeholders. Include
Key Context Pointers
only when the ledger is non-empty. Preserve user-supplied pointer spelling exactly; label additional reconnaissance pointers clearly rather than presenting them as user-supplied. If the host returns a permalink for the written artifact, capture it; otherwise use the local artifact path as the navigation target.
Complete when: exactly one new artifact exists at the resolved path, its index is the next chronological index, its frontmatter is valid, every numbered entry passed the current-state gate, every pointer is categorized with correct provenance, and no template placeholder remains.
编写前,完整读取
references/research_questions_template.md
。
按以下规则确定目标位置:
  1. 如果环境提供了任务产物目录,则使用该目录。
  2. 否则,在遍历
    .agent-work/tasks
    时跟随符号链接,并复用与 ticket 标识符或任务 slug 匹配的单一目录。
  3. 如果不存在匹配目录,则在存在 ticket 时创建
    .agent-work/tasks/<TICKET-ID>-<task-slug>/
    ,否则创建
    .agent-work/tasks/<task-slug>/
    。
  4. 如果多个目录都 plausibly 匹配,且来源无法消除歧义,请在写入前询问用户哪个目录拥有该产物。
  5. 检查所选目录中的每个文件名,选取最前面的两位数字
    NN-
    索引中的最高值并加一。如果不存在,则使用
    01
    。
  6. 写入
    NN-research-questions-DESCRIPTION.md
    ,其中
    DESCRIPTION
    是具体的 2–4 个单词的 kebab-case slug。
例如,基于 ticket 的首个产物可以是
.agent-work/tasks/ENG-1478-parent-child-tracking/01-research-questions-parent-child-tracking.md
;没有 ticket 的请求可以使用
.agent-work/tasks/authentication-flow/01-research-questions-auth-flow.md
。
填写模板时不得留有任何占位符。仅当指针清单非空时,才包含
Key Context Pointers
。逐字保留用户提供指针的拼写;清楚标注额外勘察指针,不要将其呈现为用户提供。如果主机为已写入的产物返回 permalink,则捕获该链接;否则使用本地产物路径作为导航目标。
完成条件: 解析后的路径中恰好存在一个新产物,其索引为下一个顺序索引,frontmatter 有效,每个编号条目均通过当前状态门禁,每个指针都按正确来源分类,并且不存在任何模板占位符。

7. Hand off to research

7. 移交给研究阶段

Read
references/research_questions_final_answer.md
in full after the artifact is written. Render it exactly once, substituting the local artifact path and adding a host permalink only when one was actually returned. Keep
$create-research
as the next command; the user is not expected to answer the questions.
Complete when: the response identifies the local artifact path, explains that the next agent will answer it, contains
$create-research
, includes only a real optional host permalink, and contains no invented link or extra summary.
写入产物后,完整读取
references/research_questions_final_answer.md
。仅呈现一次,替换为本地产物路径,并且仅在主机实际返回 permalink 时添加该链接。将
$create-research
保留为下一条命令;用户无需回答这些问题。
完成条件: 响应中包含本地产物路径,说明下一个 Agent 将回答这些问题,包含
$create-research
,仅包含真实且可选的主机 permalink,并且不包含虚构链接或额外摘要。