how

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

How

运作方式

Explore the codebase to answer "how does X work?" questions. Produce architectural explanations at the level of a senior engineer onboarding onto a subsystem, enough to build a working mental model, not so much that it reads like annotated source code. Use why when the user wants historical motivation.
Every spawn is a read-only subagent that inherits the parent model. When the host supports model selection, a fast model suits explorers and a judgment-focused model suits the explainer. Pick each subagent's reasoning level for the job, per the Subagents section of the poteto-mode skill. If subagents are unavailable or forbidden, do each step inline in the same order.
探索 codebase,回答“X 如何工作?”这类问题。生成符合高级工程师熟悉 subsystem 标准的架构说明,既要足以建立完整的心智模型,又不应像逐行注释过的源代码一样冗长。当用户想了解历史设计动机时,使用 why。
每次 spawn 都是一个只读 subagent,它会继承父级 model。当宿主支持 model 选择时,explorer 适合使用快速 model,explainer 适合使用侧重判断力的 model。按照 poteto-mode skill 的 Subagents 部分,为每个 subagent 选择适合当前任务的推理级别。如果 subagent 不可用或被禁止,则按相同顺序在当前上下文中内联完成每个步骤。

1. Assess complexity

1. 评估复杂度

If the scope is ambiguous, state your interpretation and explore. The user can redirect.
  • Simple (a single module, a small utility, a narrow question such as "how does function X work"): no explorers. Spawn one explainer that explores and explains in one pass, built from
    references/explainer-prompt.md
    without the explorer-findings section. Go to step 4.
  • Complex (a subsystem spanning multiple files or services, a cross-cutting feature, a full architectural overview): go to step 2.
When in doubt, take the simple path.
如果范围不明确,请说明你的理解并开始探索。用户可以随时调整方向。
  • 简单(单个模块、小型工具函数、范围较窄的问题,例如“function X 如何工作”):不使用 explorer。Spawn 一个 explainer,在一次任务中完成探索和说明;其提示词基于
    references/explainer-prompt.md
    构建,但不包含 explorer-findings 部分。转到步骤 4。
  • 复杂(横跨多个文件或服务的 subsystem、跨领域功能、完整的架构概览):转到步骤 2。
如有疑问,选择简单路径。

2. Explore (complex only)

2. 探索(仅限复杂任务)

Decompose the question into 2 to 4 angles, each a distinct, non-overlapping slice of the subsystem. Start all explorers concurrently, each with
references/explorer-prompt.md
and its angle filled in.
将问题拆解为 2 到 4 个角度,每个角度对应 subsystem 中一个独立且互不重叠的部分。同时启动所有 explorer,为每个 explorer 填入
references/explorer-prompt.md
和对应角度。

3. Synthesize (complex only)

3. 综合(仅限复杂任务)

Once all explorers have returned, spawn one explainer with
references/explainer-prompt.md
and every explorer's findings filled in.
所有 explorer 返回结果后,spawn 一个 explainer,为其填入
references/explainer-prompt.md
以及所有 explorer 的发现。

4. Present

4. 展示

Present the explainer's output. Light edits for clarity or context from the conversation are fine. Do not substantially rewrite it.
展示 explainer 的输出。可以为清晰度或补充对话上下文进行轻微编辑,但不应进行实质性改写。

Output format

输出格式

The explanation uses the sections defined in
references/explainer-prompt.md
, dropping any that do not apply: Overview, Key Concepts, How It Works, Where Things Live, Gotchas.
说明应使用
references/explainer-prompt.md
中定义的章节,并删除不适用的章节:Overview、Key Concepts、How It Works、Where Things Live、Gotchas。