Step 1: Resolve inputs
- Confirm the current harness exposes a native subagent facility. If it does not, stop and tell the operator — this skill dispatches slices only as native subagents.
- Parse , , , from the invocation. If or is missing, ask the operator and stop.
- Default to when omitted. Reject values below 1 or above 8 — ask the operator to choose a value in range.
- Do not validate ahead of time — the harness surfaces incompatibilities at dispatch; when one does, report it to the operator and re-dispatch the slice with the model they choose.
- Resolve to an absolute path. If the directory does not exist, ask the operator whether to create it before continuing; if creation fails, stop and report the filesystem error.
- Create if absent. The dispatched subagents refuse to write into a missing directory.
Step 2: Parent-led initial scout (MANDATORY — do not skip)
The scout is the load-bearing step that prevents wasted parallel dispatch. The parent must do this work itself before any slice is launched.
- Perform a brief read-only exploration of the problem space using path globs, content searches, and targeted file reads. The scout's job is to learn enough about the territory to divide it well — not to produce analysis content. Cap the scout at 8–15 tool calls; deep reading belongs to the dispatched subagents.
- From the scout, identify exactly distinct slices that are:
- Non-overlapping — two slices should not require reading the same primary files for the same purpose.
- Independently answerable — a slice's analysis must not depend on another slice's output.
- Aligned with the operator's — every slice serves the original research question.
- For each slice, assign:
- A two-digit ordinal (..).
- A short kebab-case slug (≤ 4 words) reflecting that slice's focus (e.g. , , ).
- A focused per-slice prompt that names the slice question, the primary source paths/URLs to read, and any cross-references the dispatched subagent should use.
- Briefly tell the operator the slice list (one line per slice: ) before dispatching. Do not ask for approval unless the slices look thin or overlap; just announce and proceed.
If the scout reveals that fewer than
non-overlapping slices exist, reduce the dispatch count and tell the operator. Do not pad slices to hit the requested count.
Step 3: Dispatch explorer subagents in parallel
Gist tripwires — the contract items the parent must enforce in every dispatched prompt:
- The prompt names three things: slice scope, slug+ordinal, exact target file path. If any is missing, the dispatched subagent must refuse and ask back.
- The dispatched subagent gets exactly one file-write — at the named target path — and nothing else. No edits, no //package managers, no writes outside .
- All slices dispatch in parallel — one subagent call per slice, issued in a single batch. Wait for every slice to finish before verification.
STOP. Read references/dispatch-rules.md
in full before composing any slice prompt. That file contains the complete scoped-write contract, tool allow/forbid lists, parent responsibilities, and failure handling. The bullets above are tripwires, not the contract — the contract must be embedded verbatim in every slice prompt.
STOP. Read assets/explorer-prompt.md
in full before composing any slice prompt. That file is the explorer's role prompt — it must open every slice prompt verbatim so the dispatched subagent knows its contract.
STOP. Read assets/analysis-template.md
in full before composing any slice prompt. That file is the canonical seven-section schema every dispatched subagent fills. The schema must be embedded in the prompt; do not paraphrase it.
Compose one slice prompt per slice. Every prompt MUST include, in this order:
assets/explorer-prompt.md
content embedded verbatim (the explorer's role and contract).
- The operator's original verbatim, prefixed by a short orientation line.
- The slice's focused question and the primary sources to read.
- The exact target path:
<path>/analysis/NN_analysis_<slug>.md
(absolute path).
references/dispatch-rules.md
content embedded verbatim (copy-paste, do not paraphrase).
- The seven-section schema from
assets/analysis-template.md
.
Write each composed prompt to its own file at
<path>/.dispatch/prompts/NN_<slug>.txt
— the round's audit trail and the exact text to re-dispatch on a slice failure. The file basename (without extension) is the slice id.
Issue one subagent call per slice — all in a single parallel batch, using whatever async/parallel subagent facility the harness exposes. Each call passes the slice prompt file content verbatim as the subagent's prompt, grants read/search access plus file-write capability (the embedded contract confines the subagent to one write), and applies a model override only when the operator pinned one. Wait for every subagent to complete before Step 4. A subagent that errors, or returns without its written-path confirmation, is a failed slice — re-dispatch it with the contract restated. Never synthesize a missing slice's analysis as if its dispatch succeeded.
Step 4: Verify outputs
Gist tripwires — the floor items that catch most failures:
- Every slice finished clean — its subagent returned the written-path confirmation (path written, seven sections). Anything else is a slice failure, not a warning.
- Exactly files at the expected paths under .
- All seven schema sections present in each file; no empty sections without a gap-note + Open Question.
- At least one cited source per file sample-checked (read local paths; check URL well-formedness).
STOP. Read in full before declaring outputs verified. That file is the seven-section output validation checklist (runtime, inputs, scout, dispatch, files, schema, summary). Every item must pass; failing items trigger a re-dispatch of the offending slice. The bullets above are tripwires, not the contract.
If a section is empty, a file is missing, a cited path is fake, or the schema is incomplete, re-dispatch the offending slice with the schema embedded and a request to fill the gap. The parent never authors the missing analysis content — the dispatched subagent owns the write.
- Read every
<path>/analysis/NN_analysis_<slug>.md
in full.
- Author
<path>/analysis/summary.md
with these sections:
- Research Question — the operator's , verbatim.
- Slice Map — table mapping each to its slice question and one-line finding.
- Convergences — patterns or risks that appear in two or more analyses, with cross-citations to the slice files.
- Divergences — places where slices disagree or where one slice surfaces a finding the others miss.
- Risks & Open Questions — consolidated, deduplicated list pulled from each analysis's Open Questions and Risks/Mismatches sections.
- Recommended Next Steps — short, actionable list. Each step cites the slice file(s) that support it.
- Index — bullet list of
<path>/analysis/NN_analysis_<slug>.md
paths so a future reader can drill in.
- is parent-authored. Do not dispatch a slice for this step.
步骤1:解析输入
- 确认当前harness支持原生子代理工具。若不支持,停止操作并告知操作者——本技能仅能以原生子代理形式调度切片。
- 从调用命令中解析、、、参数。若或缺失,询问操作者后停止操作。
- 若省略,默认设置为。拒绝小于1或大于8的值——请操作者选择范围内的数值。
- 无需提前验证——harness会在调度时暴露兼容性问题;若出现兼容性问题,向操作者报告并使用其选择的模型重新调度切片。
- 将解析为绝对路径。若目录不存在,询问操作者是否创建后再继续;若创建失败,停止操作并报告文件系统错误。
- 若不存在则创建该目录。调度的子代理拒绝写入不存在的目录。
步骤2:父代理主导的初始侦察(必须执行——请勿跳过)
侦察是避免并行调度浪费资源的核心步骤。父代理必须在启动任何切片前自行完成此工作。
- 使用路径通配符、内容搜索和定向文件读取,对问题空间进行简短的只读探索。侦察的任务是充分了解研究领域以合理划分切片——而非生成分析内容。侦察阶段的工具调用次数上限为8-15次;深度阅读属于调度的子代理的工作。
- 通过侦察,确定恰好个满足以下条件的独立切片:
- 无重叠——两个切片不应因相同目的而需要读取相同的核心文件。
- 可独立解答——一个切片的分析不应依赖另一个切片的输出。
- 与操作者的一致——每个切片都服务于原始研究问题。
- 为每个切片分配:
- 两位数字序号(..)。
- 反映切片研究重点的短横线命名slug(≤4个词,例如、、)。
- 聚焦的切片提示词,包含切片问题、需读取的核心源路径/URL,以及调度的子代理应使用的任何交叉引用。
- 在调度前向操作者简要告知切片列表(每个切片一行:)。除非切片内容单薄或存在重叠,否则无需请求批准,直接告知后继续操作。
若侦察发现符合条件的无重叠切片数量少于
,则减少调度数量并告知操作者。请勿为达到请求的数量而填充无关切片。
步骤3:并行调度explorer子代理
核心规则——父代理必须在每个调度的提示词中强制执行的契约条款:
- 提示词需包含三项内容:切片范围、slug+序号、精确目标文件路径。若缺少任何一项,调度的子代理必须拒绝并反馈。
- 调度的子代理仅能进行一次文件写入——写入指定目标路径,不得进行其他操作。禁止编辑、//包管理器操作,禁止写入之外的路径。
- 所有切片并行调度——每个切片对应一次子代理调用,批量发起。等待所有切片完成后再进行验证。
停止操作。在编写任何切片提示词前完整阅读references/dispatch-rules.md
。 该文件包含完整的范围写入契约、工具允许/禁止列表、父代理职责和故障处理。以上要点仅为核心提醒,而非完整契约——契约必须逐字嵌入每个切片的提示词中。
停止操作。在编写任何切片提示词前完整阅读assets/explorer-prompt.md
。 该文件是explorer的角色提示词——必须逐字作为每个切片提示词的开头,让调度的子代理了解其契约。
停止操作。在编写任何切片提示词前完整阅读assets/analysis-template.md
。 该文件是每个调度的子代理必须填写的标准七节架构。架构必须嵌入提示词中,请勿复述。
为每个切片编写一份提示词。每个提示词必须按以下顺序包含:
- 逐字嵌入
assets/explorer-prompt.md
的内容(explorer的角色和契约)。
- 逐字包含操作者的原始,前缀添加简短的说明行。
- 切片的聚焦问题和需读取的核心源。
- 精确目标路径:
<path>/analysis/NN_analysis_<slug>.md
(绝对路径)。
- 逐字嵌入
references/dispatch-rules.md
的内容(直接复制粘贴,请勿复述)。
assets/analysis-template.md
中的七节架构。
将每个编写好的提示词写入
<path>/.dispatch/prompts/NN_<slug>.txt
文件——这是本轮操作的审计记录,也是切片失败时重新调度的精确文本。文件名(不含扩展名)即为切片ID。
为每个切片发起一次子代理调用——所有调用作为单个并行批次,使用harness提供的任何异步/并行子代理工具。每次调用将切片提示词文件内容逐字作为子代理的提示词,授予读取/搜索权限和文件写入能力(嵌入的契约将子代理限制为一次写入),仅当操作者指定固定模型时才应用模型覆盖参数。等待所有子代理完成后再进入步骤4。若子代理报错或未返回写入路径确认,则视为切片失败——重新调度该切片并重述契约。绝不能假装调度成功而自行合成缺失切片的分析内容。
步骤4:验证输出
核心规则——识别大多数故障的基础检查项:
- 每个切片均正常完成——子代理返回写入路径确认(已写入路径、包含七节内容)。任何其他情况均视为切片失败,而非警告。
- 下存在恰好个符合预期路径的文件。
- 每个文件包含所有七节架构内容;若存在空节,必须附带说明备注和开放问题。
- 抽样检查每个文件,确保至少包含一个引用源(读取本地路径;检查URL格式是否正确)。
停止操作。在宣布输出验证通过前完整阅读。 该文件是七节输出验证清单(运行时、输入、侦察、调度、文件、架构、总结)。所有项必须通过;若有项未通过,触发对应切片的重新调度。以上要点仅为核心提醒,而非完整契约。
若某节内容为空、文件缺失、引用路径无效或架构不完整,重新调度该问题切片,嵌入架构并要求填补空白。父代理绝不能自行撰写缺失的分析内容——调度的子代理负责写入操作。
- 完整阅读所有
<path>/analysis/NN_analysis_<slug>.md
文件。
- 撰写
<path>/analysis/summary.md
,包含以下章节:
- 研究问题——逐字包含操作者的。
- 切片映射——表格,将每个映射到其切片问题和一行核心发现。
- 趋同点——在两个或多个分析中出现的模式或风险,附带切片文件的交叉引用。
- 分歧点——切片结论不一致的地方,或某一切片发现其他切片未提及内容的地方。
- 风险与开放问题——从每个分析的“开放问题”和“风险/不匹配点”章节中提取并去重后的汇总列表。
- 建议后续步骤——简短、可执行的列表。每个步骤需引用支持该步骤的切片文件。
- 索引——
<path>/analysis/NN_analysis_<slug>.md
路径的项目符号列表,方便后续读者深入查看。
- 由父代理撰写。请勿为此步骤调度切片。