how
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseHow
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.
Each spawn below names a role line in the rule and a default. Set to that line's value, or to the default if the rule or the line is missing. Leave unset when the value is or . If the Task tool rejects a slug, use the default and say so. If it rejects the default, use the closest valid slug of the same family from its error message.
pstack-models.mdcmodelmodelautoinherit-parent探索代码库,回答“X 如何工作?”这类问题。产出面向正在熟悉某个子系统的高级工程师的架构解释,内容应足以帮助其建立可用的心智模型,但不应详尽到像一份逐行注释的源代码。
以下每个 spawn 步骤都指定了 规则中的一行角色配置及其默认值。将 设置为该行的值;如果规则或该行不存在,则使用默认值。当值为 或 时,不要设置 。如果 Task 工具拒绝某个 slug,则改用默认值并说明情况。如果 Task 工具拒绝默认值,则根据错误消息选择同一系列中最接近的有效 slug。
pstack-models.mdcmodelautoinherit-parentmodelStep 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. One explainer explores and explains in a single pass. Go to Step 2b.
- Complex (a subsystem spanning multiple files or services, a cross-cutting feature, a full architectural overview): spawn parallel explorers first, then hand off to the explainer. Go to Step 2a.
When in doubt, take the simple path.
如果范围不明确,请说明你的理解并开始探索。用户可以重新调整方向。
- 简单(单个模块、小型工具函数、范围较窄的问题,例如“函数 X 如何工作”):不使用 explorer。由一个 explainer 一次性完成探索和解释。转到第 2b 步。
- 复杂(跨多个文件或服务的子系统、横向贯穿的功能、完整的架构概览):先并行启动 explorer,再移交给 explainer。转到第 2a 步。
如有疑问,选择简单路径。
Step 2a. Explore (complex questions only)
第 2a 步:探索(仅限复杂问题)
Decompose the question into 2 to 4 exploration angles, each a distinct slice of the subsystem. Spawn all explorers in a single message:
- :
subagent_typegeneralPurpose - : the
modelline, defaulthow explorergrok-4.7-xhigh-fast - :
readonlytrue
Each explorer gets the prompt in with its angle filled in. Then go to Step 3.
references/explorer-prompt.md将问题分解为 2 到 4 个探索角度,每个角度对应子系统的不同切面。在一条消息中启动所有 explorer:
- :
subagent_typegeneralPurpose - :
model行,默认值为how explorergrok-4.7-xhigh-fast - :
readonlytrue
每个 explorer 的提示词都基于 ,并填入其探索角度。然后转到第 3 步。
references/explorer-prompt.mdStep 2b. Direct Explain (simple questions)
第 2b 步:直接解释(简单问题)
Spawn one Task subagent that explores and explains in one pass:
- :
subagent_typegeneralPurpose - : the
modelline, defaulthow explainerclaude-opus-5-5-max - :
readonlytrue
Build its prompt from without the explorer-findings section. Go to Step 4.
references/explainer-prompt.md启动一个 Task subagent,一次性完成探索和解释:
- :
subagent_typegeneralPurpose - :
model行,默认值为how explainerclaude-opus-5-5-max - :
readonlytrue
基于 构建其提示词,不包含 explorer-findings 部分。然后转到第 4 步。
references/explainer-prompt.mdStep 3. Synthesize (complex questions only)
第 3 步:综合(仅限复杂问题)
Once all explorers have returned, spawn one Task subagent to synthesize their findings into one explanation:
- :
subagent_typegeneralPurpose - : the
modelline, defaulthow explainerclaude-opus-5-5-max - :
readonlytrue
Build its prompt from with every explorer's findings filled in.
references/explainer-prompt.md所有 explorer 返回结果后,启动一个 Task subagent,将它们的发现综合成一份解释:
- :
subagent_typegeneralPurpose - :
model行,默认值为how explainerclaude-opus-5-5-max - :
readonlytrue
基于 构建其提示词,并填入所有 explorer 的发现结果。
references/explainer-prompt.mdStep 4. Present
第 4 步:展示
Present the explainer's output to the user. 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 , 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)。
references/explainer-prompt.md