1仕組みと動作原理
純粋なプロンプトオーケストレーション、スクリプトおよびアセットゼロ:how の SKILL.md は「分割と委任の方法」のみを規定し、コード読み込みアクションはすべてホスト Task サブエージェントに委ねられ、組み込みの2つのプロンプトテンプレート(explorer/explainer)のみを参照物とします。
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.
複雑度ルーティング:単純な質問は1パスの explainer で直接出力し、複雑な質問はまず2〜4つの視点から並列に explorer を派遣してスライス深掘りを行い、その後に explainer に集約・合成させます。判断に迷った場合はデフォルトで単純パスを選択します。
**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.
explorer はすべて読み取り専用、並列実行、1回のメッセージで一斉送信:各ルートに1つの generalPurpose サブエージェントを割り当て、model は設定値(デフォルト grok-4.6-fast-xhigh)を取得、readonly は常に true——探索層は副作用のない事実収集機として設計されています。
Decompose the question into 2 to 4 exploration angles, each a distinct slice of the subsystem. Spawn all explorers in a single message
explorer の成果物は固定構造の事実契約(Components Found / Flow / Files Read / Boundaries / Non-Obvious Things / Open Questions)であり、「コード読み込みにおいて推測を禁じる」と「ブレークポイントを正直に認める」ことを厳格な要件としています。
Start by finding the relevant code. Use Glob to find directories and files, Grep to find key symbols, Read to understand the actual implementation. Don't guess from names. Read the code.
explainer は調停と再検証を担当:複数ルートの explorer の発見に重複や矛盾がある場合、explainer は解説を書く前に自身でコードを確認して解消し、最初から探索し直すことなく読み取り専用の再調査権限(Read/Grep/Glob)を行使します。
Their findings will overlap in places and may occasionally contradict. Reconcile them. Merge overlapping descriptions, resolve contradictions by checking the code yourself, and combine the separate slices into a unified picture.
出力形式と提示規律:解説は固定セクション(Overview/Key Concepts/How It Works/Where Things Live/Gotchas、省略可)に従い、複雑なフローでは mermaid/ASCII 図を許可するものの装飾的な図は禁止します。フロントエンドは軽度の推敲のみを行い、大幅な書き換えは禁止します。
Present the explainer's output to the user. Light edits for clarity or context from the conversation are fine. Do not substantially rewrite it.
トリガー面はユーザーの明示的な呼び出しに限定され、モデルロールは設定可能:frontmatter で disable-model-invocation: true を宣言し、モデルのデフォルト値は pstack の常駐モデルルールによってオーバーライド可能です。
disable-model-invocation: true
2コア機能
4推奨統制措置と判定根拠
- 本地文件: ローカルプロジェクトファイルまたはワークスペース成果物の操作
5二重目の独立検証
- [ok] 纯 prompt、无脚本资产 — 技能目录仅 SKILL.md + references/explorer-prompt.md + references/explainer-prompt.md 三个 markdown,无 scripts/data/模板之外文件。
- [ok] 复杂度路由与默认简单路径 — SKILL.md 原文 'When in doubt, take the simple path.' 存在;Simple→2b、Complex→2a→3 的流程编号自洽。
- [ok] 2-4 路并行 explorer + 单一 explainer 合成 — 原文 'Decompose the question into 2 to 4 exploration angles'、'Spawn all explorers in a single message'、'synthesize their findings into one explanation' 逐字在。
- [ok] readonly 贯穿 — Step 2a/2b/3 三处均列 '- `readonly`: `true`';模板无任何写盘/执行指令。
- [ok] explorer 输出契约与反编造要求 — explorer-prompt.md 含完整小节标题(Components Found 等六个)、'Don't guess from names. Read the code.'、以及 'is better than making something up' 原文。
- [ok] explainer 调停矛盾 + 只读复查 — 原文 'resolve contradictions by checking the code yourself' 与 'You have read-only access to the codebase' 均在。
- [ok] 输出格式/呈现纪律 — SKILL.md 列出的五章节与模板 Output Format 一致;'Light edits for clarity…do not substantially rewrite it.' 逐字存在。
- [ok] 模型可配置(how-explorer/how-explainer) — how 内仅声明默认值;配置写入/读取路径在 setup-pstack(写 ~/.cursor/rules/pstack-models.mdc)与 interrogate/arena/swarm(读同文件)一致,机制真实存在;角色键 how-explorer/how-explainer 的逐键映射未在 pstack 内单点列出,属『规则文件按角色键注入』的通用机制 [INFERENCE],已在正文限定表述。
6結論
ee70ff35028506ef…