/duet:swarm <任务:探清 X / 审计 Y / 评审 Z 的方案>from duet
XL 级任务的多智能体编排火力档——并行探查 / 多维度审计+对抗验证 / 多方案评审。重、耗 token,只给单上下文吃不下的活用;日常任务走 /duet:clean-loop。
Ships in duet. Installing the plugin adds it to Claude Code.
What the command file sets; muted values are Claude Code's defaults
你在执行 duet swarm:用多智能体编排啃 XL 级任务。任务:$ARGUMENTS
主线程先花少量动作探清"工作清单"(哪些目录 / 文件 / 维度 / 候选方案),编排步骤要在已知形状上跑,不要盲目撒代理。
按任务形状选一种,脚本骨架照抄后按需改:
explore(并行探查→汇总地图):按目录/子系统分片,每片一个只读读者,最后一个综合者拼"结构地图 + 关键调用链 + 风险点"。
phase('Explore')
const maps = await parallel(chunks.map(c => () =>
agent(`只读探清 ${c}:结构/关键调用链/坑,返回要点`, {phase: 'Explore'})))
phase('Synthesize')
return agent(`综合成一张地图:${JSON.stringify(maps.filter(Boolean))}`)
review(多维度找→逐条对抗验证):维度 = 正确性/边界/并发/安全/性能…;每条发现派独立怀疑者去推翻,多数推翻则丢弃。用 pipeline,别加不必要的 barrier。
const results = await pipeline(DIMENSIONS,
d => agent(`审计维度 ${d}:只报确凿问题+复现`, {phase: 'Find', schema: FINDINGS}),
r => parallel(r.findings.map(f => () =>
agent(`对抗验证,默认不成立:${f.title}`, {phase: 'Verify', schema: VERDICT})
.then(v => ({...f, real: v.isReal})))))
design(N 方案→评审团→综合):3 个不同切入角(MVP 优先 / 风险优先 / 一致性优先)独立出方案,评审团打分,综合胜者并嫁接其余亮点。
7-day visitors to each command page
3 commands in this plugin
npx claudepluginhub biefan/duet --plugin duetOther plugins' commands for the same job