uppercrusteve/dsh-plugin-split-and-solve0

dsh-plugin-split-and-solve

科研批量/多子问题任务自动拆分 + 子代理并行求解 + 结果合并(DSH 插件)

包名
dsh-plugin-split-and-solve
版本
1.0.0
许可证
MIT
最近更新
2026年8月29日

安装

此插件尚未提供可验证的 bundle,或兼容性检查未通过。请先阅读仓库说明。 阅读完整 README ↗

Usage(用法,中文)

一个简化例子(完整三条端到端示例见 content/examples.md —— 注意其中的 DOI、数据集名与指标数值均为示意,不是真实文献的事实断言):

/split-and-solve 帮我把这 5 篇做 GNN 药物发现的论文逐篇按【问题 / 方法 / 数据与基准 /
主要指标 / 局限】五栏总结,最后给一张横向对比表,另外告诉我哪几篇的可复现性最差:

1. DOI:10.1093/bioinformatics/btaa210(示意)
2. arXiv:2105.03904v2(示意)
3. /data/papers/mol-contrastive-2023.pdf(示意,本地 PDF)
4. DOI:10.1038/s41467-022-30123-4(示意)
5. DOI:10.1145/3459637.3482278(示意)

摘要我没贴,你按标识符自己去取;取不到就别猜。

发生什么:

  1. 检测:显式命令直接启用;不带命令时,"3 个 DOI + 逐篇/对比"也已满足自动建议阈值 (结构特征任一维度 ≥ minTriggerCount=3 且有批量意图词)。
  2. 拆分:产出 5 个小问题的 JSON 清单,每条一个自包含提示(目标 / 输入 / 输出格式含示例行 / 长度上限 / "查不到写未查到"),sourceRef 逐字搬运你的标识符(v2 这类版本后缀保留)。
  3. 确认:先把"拆成 5 条 + 每条标题 + 合并后长什么样"给你看,回"开始"才派发 (confirmSplitPlan = true;想跳过就带 --yes)。
  4. 求解:5 次 harness subagent 调用并行发出,不指定 model / provider(跟随主对话默认 路由);每条按 STATUS / CONFIDENCE / RESULT / GAPS / META 五段返回,原文落盘。
  5. 合并:对齐成对比表(列 > 8 时退化为卡片 + 速览表),⚠️冲突 只标注不裁决, —(未查到)—(未报告) 严格区分,缺失清单必给,每行首列是可回查的 sourceRef
  6. 收尾:告诉你交付物在哪、哪些条没解决、卡在哪、哪几处冲突要你裁决。

交付物落盘(默认 ./split-and-solve-output/-/,相对当前会话工作目录):

00-split-plan.json        拆分方案原样
01-merged.md              交付物(对比表 / 分节综述 / 回复信)
02-gaps-and-conflicts.md  冲突清单 + 缺失清单全文
subagent-outputs/         每个子代理的原样返回(-
.md)—— 回查唯一依据

显式命令与开关(语义固定;slash 注册形态由 harness 决定,未注册时把这句话当普通文本处理): /split-and-solve /split-and-solve(对上一条启用)、--yes--group--no-merge--max N/split-and-solve list/split-and-solve retry Q03 Q07; 禁用说法:别拆 / 直接答 / no split / just answer / in one go

Configuration

Defaults and semantics are defined in content/config-defaults.md and mirrored in cordis.patch.yml's config: block. lib/index.js clamps the same way.

keydefaultmeaning
minTriggerCount3structural signals needed before auto-suggesting (clamped to ≥ 2)
maxSubQuestions12split ceiling; beyond it items are grouped by theme (clamped to ≤ 30)
subagentRetryOnFailure1retry once per failed/timed-out/empty item, carrying the reason (clamped to ≤ 2)
outputDir./split-and-solve-output/-/deliverable root, relative to the session working directory
confirmSplitPlantrueshow the plan and wait for confirmation before dispatch
autoTriggertruefalse = respond only to the explicit command
maxParallelSubagents4in-flight cap; the rest queue
subagentTimeoutSeconds300soft timeout per item, counts as failed(timeout)
autoMergetruefalse = stop at per-item results until you say "merge"
mergeTableMaxCellChars220cell truncation threshold, pointer to the raw output retained
outputLanguageautodeliverable language (auto follows your request; JSON keys stay English)
groupWhenTooManytruefalse = return needsClarification and ask you to narrow the list
keepRawOutputstruekeep subagent-outputs/ — the only trustworthy raw evidence behind any cell

Not configurable on purpose: subagents are always dispatched without model / provider, so they inherit the main conversation's route.