ccai40359-wq/multiagents-workflow / skills/dual-read
dual-read
VerifiedDual-channel document reading — the main agent reads, one subagent per file reads independently, then cross-compare (match/addition/conflict). MUST USE for close reading, analysis, or fact extraction from documents/PDFs/contracts/manuals/reports/long files — triggers include "read carefully", "don't miss anything", "cross-check", "用子agent读", "双读". Essential when extracting key facts (numbers, limits, clauses, rules). Not for browsing a table of contents, reading a code diff, or merely confirming a file exists.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 4.6 KB |
| SKILL.zh.md | markdown | 4.0 KB |
SKILL.zh.md
View on GitHub---
name: dual-read
description: 双通道文档精读——主agent自读 + 每个文件派一个子代理独立精读 + 交叉比对(一致/增量/矛盾)。MUST USE when 需要精读、分析、提取信息的文档/PDF/合同/手册/报告/长文件,或用户说"仔细看""别漏信息""核对一下""用子agent读""提高读取准确率"。涉及关键事实提取(数字/限额/条款/规则)时必用;纯浏览目录、看代码diff、快速确认文件存在时不用。
---
# 双通道文档精读 (Dual-Read)
目的:单通道阅读会漏信息。双通道 = 主 agent 自读 + 子代理独立精读 + 交叉比对。
实测效果(单一环境,5 份长 PDF;数字随文档与环境变化):主 agent 自读后自认结论完整,子代理仍补出 4-5 处关键遗漏(规则类细节、数字类上限、完整条款——都属于"不看就不知道自己漏了"的类型)。
## 流程(严格按顺序)
### 1. 主 agent 先自读
自己跑脚本或直接 Read,形成初步结论(文档定性 + 关键事实清单)。带着自己的答案去比对,不是空白头脑等子代理喂。
### 2. 提取为纯文本(PDF/Office 必做)
- PDF 用 fitz (PyMuPDF) 逐页提取全文到 .txt,每页之间加 `===== 第N页 =====` 分隔,每份 PDF 一个 txt。
- 若你的环境有路径安全策略会拦 `open(变量路径)`:稳妥模板 = 提取脚本只 `print()` 到 stdout,用 shell 重定向落盘(`python extract.py 1 > pdf_txt_a.txt`)。
- 原因:子代理的 Read 读不了二进制 PDF,纯文本最稳(先转 txt 再派读)。
### 3. 每个文件派一个子代理,并行派发
一条消息里同时发多个 Agent 调用(并行,不要串行)。
选型:
- **researcher**:纯文本精读、摘要、事实提取(读 txt 最稳;Bash 可用性取决于你的角色配置)
- **general-purpose / worker-coder**:需要子代理自己跑脚本处理 PDF/Office/图片时
子代理提示词必须自包含(它们从零开始,看不到主会话):
1. txt 的绝对路径 + 文件多长、怎么分段
2. 背景:我们已有什么(现有知识库/产品库/已知结论),防止子代理把已有内容当新发现
3. 要回答的具体问题清单(越具体越好,如"冷静期有没有写具体天数?给页码原句")
4. 输出格式(清单式,每条带来源)
5. 溯源铁律:**每条事实必须带页码/行号;读不到就写"文中未见",严禁脑补**
长文件(>50K 字符):明令"禁止通读,用 Grep 搜关键词 + 只读命中处上下文",并给出关键词清单(中英文都给)。
### 4. 三类比对(主 agent 做仲裁)
- **一致**:主读与子读结论相同 → 高置信,直接采信
- **增量**:子代理发现主 agent 漏掉的事实 → 采纳前抽查 1-2 条回原文核验
- **矛盾**:两边说法冲突 → 主 agent 亲自回原文读原句仲裁,不许和稀泥、不许各打五十大板
### 5. 产出
- 判定表:每份文件一行(判定 一致/增量/矛盾 + 理由 + 页码来源)
- 明确列出"子代理补上的增量"和"仲裁过的矛盾"——这是双通道的价值证明
- 外层套全包统一的五段报告契约(`REPORT-CONTRACT.md`):**发现** = 判定表;**已验证** = 对照原文核过的引用(每条带页码/行号);**未覆盖** = 没读到的章节;**已跳过** = 未达精读阈值没深读的文件。机械化把关:`node <pack-root>/tools/gates/report-lint.mjs <report.md>`
## 何时可以不双读
- 文件 <10K 字符且无关键事实提取(浏览、确认存在性)
- 代码 diff / 配置修改(那是 reviewer 流程,不是这个)
- 用户明确说"快速看一眼就行"
## 何时必须双读
- 关键事实提取:数字、限额、规则、条款、日期
- 用户质疑过读取准确率,或说了"别漏信息 / 仔细看 / 确认一下"
- 文档内容将写入知识库/产品库/对外材料(进错一条 = 合规风险)
---
与同包的 `web-research-fanout` 共用同一套证据分类(一致 / 增量 / 矛盾)。
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |