Deep Research System
bb2c91754b
v0.20.5 add antigravity clean workspace
2026-05-07 20:47:33 +08:00
Deep Research System
a0f1144f6c
v0.20.4 refine antigravity research skills
2026-05-07 13:43:04 +08:00
Deep Research System
4ab502df91
v0.20.3 align antigravity agent layering
2026-05-07 13:12:28 +08:00
Deep Research System
e991b26af9
v0.20.2 harden antigravity research workflow
2026-05-07 12:57:11 +08:00
kai
68e45bcf41
release: v0.20 Codex-ready skill-driven core
2026-05-07 08:21:28 +08:00
kai
0644a68ecc
v0.21 alpha add research brief and compressed findings
2026-05-06 19:23:30 +08:00
kai
db626f1d58
v0.20 alpha skill-driven python core
2026-05-06 16:26:41 +08:00
Deep Research System
d1169646b8
v0.13: add Quarto/xelatex PDF engine and fix ReportLab wide-table rendering
...
build_report.py:
- add --engine quarto option: Quarto 1.9 + xelatex pipeline with
CJK font setup (Source Han Serif/Sans CN via fontspec),
automatic {.landscape} wrapping for wide tables (>=8 cols),
TOC/references placeholder replacement, sources.jsonl backfill
- prepare_qmd(): converts Markdown to .qmd with proper YAML front matter,
writes _preamble.tex for longtable/pdflscape/lscape packages
- _detect_wide_tables(), _build_references_block(): helper functions
- ReportLab path unchanged (remains default)
report-template.py:
- render_table(): force equal-width column distribution for tables
with >=4 cols or any cell >30 chars, preventing negative availWidth
crash on mixed CJK/English content
- render_table_blocks(): split long tables (>25 rows) into chunks to
avoid NoneType comparison crash in ReportLab splitByRow logic
.gitignore:
- add rules for LaTeX temp files (*.aux, xetest.*, *.qmd, _preamble.tex)
- add projects/ to gitignore (research data, not source code)
README.md:
- update status to v0.13
- rewrite PDF section as dual-engine guide with install steps,
comparison table, and landscape table chunking guidance
- add Quarto troubleshooting (font italic mapping, tlmgr path, param_size)
- add v0.13 to changelog
2026-05-05 11:50:32 +08:00
kai
ddaa6730bc
v0.12.1: select model profile at init and carry via manifest
2026-04-29 16:20:24 +08:00
kai
5342a26018
v0.12: stabilize search routing and profile-driven phase4 pipeline
2026-04-29 15:53:20 +08:00
kai
450ecebcff
v0.10: add automated Codex orchestration and deployment check
2026-04-24 13:38:22 +08:00
kai
77df1838b1
v0.10: add native Codex adapter for deep research
2026-04-24 10:48:14 +08:00
kai
c93fce5078
v0.9: parallelize phase4 and add model/search playbooks
2026-04-24 10:19:48 +08:00
kai
c444007f04
v0.8: Serper 集成 + H1 章节标题双行居中 + 反方证据观点化 + 术语核查命令
...
新增:Google 系检索(SerpAPI → Serper.dev)
- scripts/lib/serper_client.py:封装 serper.dev 的 Google Search / Scholar / News / Patents
- 专利检索用 site:patents.google.com 技巧,serper.dev 没专用 endpoint 但效果很好
- Scholar 带引用数、年份、期刊信息,便于权威信源识别
- News 支持 time_range(d/w/m/y)时效性过滤
- scripts/lib/search_client.py 扩展为多路由门面:
- search() 通用:Exa → Tavily
- patents() 专利:Serper(Google Patents)→ 通用搜索 + site: 兜底
- scholar() 论文:Serper Scholar → 通用搜索兜底
- news() 新闻:Serper News → 通用搜索兜底
- 所有 httpx 客户端 trust_env=False,绕过系统 socks5 代理(v0.6 修过的 TLS EOF)
- .opencode/skills/search-strategy/SKILL.md §三重写:按查询类型路由,明确何时用哪个 API
H1 章节标题:两行居中 + 装饰横线
- 新增 ParagraphStyle: h1-chapter-num / h1-chapter-title
- 新增 parse_chapter_title() 支持中文/阿拉伯/混合空格章号:
"第一章" / "第 9 章" / "第6章" / "Chapter 1" 全覆盖
- 分隔符支持: em dash — / en dash – / - / : / :
- 新增 build_chapter_header():章号小字居中 + 章名大字深蓝居中 + HRFlowable 3cm 装饰线
- 只对正文章节(_title_kind == "chapter")启用;前置件(免责声明/执行摘要/术语表/目录)
仍用单行 h1 样式
反方证据段规范化(用户反馈 v0.7 问题 #5)
- skill:evidence-table 新增 §"正文中反方证据段落的写作规范":
- 禁止机械标题"反驳证据" / "Counter-Evidence" / "反方观点"
- 必须观点化,包含具体判断(如"另一种声音:管线虚胖还是真实进展?")
- 用 H2 或 H3,禁止加粗段冒充标题
- 给出段落结构模板(1-2 句过渡 → 列表型反方论点 → 整合判断)
- dr-analyst.md Hard Rules #3 改为引用该规范
术语表事实核查前置(新 command /dr-glossary)
- 新增 .opencode/commands/dr-glossary.md,支持 --from phase1|phase2|phase4 三个时机
- Phase 1 末 / Phase 2 初:从 framework.md 抽取专有名词种子表,在 dr-analyst 起草前
预先核查公司名/产品名/技术名拼写,避免编造错误(Mabwell → Maywavee 这类)
- Phase 4:维持当前用法,对 glossary.json 全量核查
实测:dual-target-rnai-pipeline-2026 重生 PDF 55 页,所有 10 章标题双行居中正确渲染
(第一章/第二章/... 第十章 / 第 6 章 / 第 9 章 多种形式都识别)。
v0.8
2026-04-22 17:04:05 +08:00
kai
09f681beb5
v0.7.2: 前置件排版重构 + emoji 禁令 + 引文核查
...
用户反馈 7 个 bug 修复:
1. 禁止 LLM 使用 emoji(全链路)
- scripts/prompts/translate_system.txt 增加规则 12
- scripts/prompts/polish_system.txt 增加规则 7
- .opencode/agents/dr-analyst.md Hard Rules 增加第 10 条(同时把 prompt 自身的 ✅ ❌ 改为 MUST / MUST NOT)
- .opencode/agents/dr-editor-in-chief.md 禁止事项加入 emoji 条款
- .opencode/skills/output-hygiene/SKILL.md 新增 §J emoji 强制禁用
2. 术语表位置错误(应在目录之后)
重构 build_body 为两阶段:
(a) 扫描所有前置件(第一个正文 H1 前的所有 H1/H2),按 title_kind 分组收集
(b) 按固定顺序渲染:免责声明 → 执行摘要 → 目录 → 术语表 → 正文 → 参考文献
无论 Markdown 原文顺序如何,排版都一致。
3. 执行摘要/术语表提升为一级标题 + 分页空页 bug
统一所有独立章节(disclaimer/executive_summary/toc/glossary/references)用 h1 样式,
章节前 PageBreak;但第一个独立章节不 PageBreak(封面后已换页,避免空白)。
去掉 build_toc 内部末尾 PageBreak(原双 PageBreak 夹出空白页)。
4. 参考文献分页
已作为独立章节自动分页。
5. 附录章节自动删除
_title_kind 识别 "appendix" / "version_history" / "abstract" 全部跳过。
正文中若写了这些章节,模板直接丢弃。
6. 信源完整性核查
新增 scripts/check_citations.py:
- 孤立引用(正文有 sources 无)检测
- 孤岛信源(sources 有正文无)检测
- emoji 扫描
- 实测发现项目中 61 条孤立引用(dr-analyst 编造的占位符)+ 5 条孤岛信源
7. git commit message 中文转义 bug
之前 commit 用 shell 双引号 + 反斜杠导致 \uXXXX 字面保留。
本 commit 用 heredoc 保证中文以 UTF-8 直接写入。
已 push 的历史不改,之后都用本 commit 的写法。
PDF 验证结果:55 页,0 空白页。
章节起始页:封面(1) - 免责声明(2) - 执行摘要(3) - 目录(5) - 术语表(7) -
第一章(12) - 第十章(48) - 参考文献(52)。
v0.7.2
2026-04-22 16:31:01 +08:00
kai and User <human>
1394d98346
v0.7.1: \u4fee\u590d emoji \u65b9\u6846 + \u5206\u9875\u95ee\u9898 + \u5220\u9664\u6458\u8981\u91cd\u590d
...
\u7528\u6237\u53cd\u9988\u4e09\u4e2a P0 bug\uff1a
1. \u8868\u683c\u4e2d\u7684 \u2705/\u274c/\ud83d\udd36 \u6e32\u67d3\u4e3a\u65b9\u6846
\u539f\u56e0\uff1a\u601d\u6e90\u5b57\u4f53\u5b50\u96c6\u4e0d\u542b\u5f69\u8272 emoji\u7684 glyph\u3002\u9664\u975e\u6362\u5b57\u4f53\uff08\u8d85\u51fa\u9879\u76ee\u8303\u56f4\uff09\uff0c
\u5426\u5219\u53ea\u80fd\u66ff\u6362\u6210\u5b57\u4f53\u6709\u7684\u7b26\u53f7\u3002
\u65b0\u589e _EMOJI_FALLBACK \u6620\u5c04\u8868\uff0c\u6db5\u76d6 20+ \u5e38\u7528 emoji\uff08\u5bf9\u5e94 CHECK/CROSS/DIAMOND/CIRCLE/STAR \u7b49\uff09\u3002
\u7528 fontTools \u9a8c\u8bc1\u8fc7\u5b57\u6bcd\u6709\u65e0\uff1a\u2713/\u00d7/\u25c6/\u25c7/\u25cf/\u25cb/\u2605/\u203b \u90fd\u6709\u3001\u2717/\u2611/\u2610 \u6ca1\u6709\uff0c\u5df2\u8c03\u6574\u76f8\u5e94\u66ff\u6362\u503c\u3002
2. \u76ee\u5f55/\u672f\u8bed\u8868\u4e0e\u4e0b\u4e00\u7ae0\u540c\u9875 / \u4e2d\u95f4\u7a7a\u9875
\u539f\u56e0\uff1abuild_toc \u672b\u5c3e\u52a0 PageBreak\uff0c\u7136\u540e\u4e0b\u4e00\u4e2a\u7ae0\u8282 H1 \u53c8 PageBreak\uff0c\u4e24\u4e2a PageBreak \u5939\u51fa\u7a7a\u9875\u3002
\u4fee\u590d\uff1abuild_toc / \u672f\u8bed\u8868\u6e32\u67d3\u672b\u5c3e\u53bb\u6389 PageBreak\uff0c\u4ec5\u9760\u4e0b\u4e2a H1 \u7684 PageBreak\u3002
\u5f00\u5934\u7684 PageBreak \u4fdd\u7559\uff0c\u4fdd\u8bc1\u201c\u76ee\u5f55 / \u672f\u8bed\u8868\u72ec\u7acb\u7b2c\u4e00\u9875\u5f00\u59cb\u201d\u3002
3. \u201c\u6267\u884c\u6458\u8981\u201d\u548c\u201c\u6458\u8981\u201d\u91cd\u590d
\u6839\u636e\u7528\u6237\u9009\u62e9\uff1a\u4fdd\u7559\u6267\u884c\u6458\u8981\uff08Executive Summary\uff09\uff0c\u5220\u6389\u6458\u8981\uff08Abstract\uff09\u3002
build_body \u65b0\u589e\u201c\u8df3\u8fc7\u6574\u4e2a\u7ae0\u8282\u201d\u903b\u8f91\uff1a\u770b\u5230 "## \u6458\u8981" / "# \u6458\u8981" / "## Abstract" \u5c31\u8df3\u5230\u4e0b\u4e00\u4e2a H1/H2\u3002
\u91cd\u6784\u6e05\u7406\uff1a
- \u63d0\u53d6 _render_generic_block \u5e2e\u52a9\u51fd\u6570\uff0c\u4ee3\u66ff build_body \u5185\u8054\u7684 p/quote/bullet/hr/image/table \u6e32\u67d3\u4ee3\u7801
- \u672f\u8bed\u8868\u90e8\u5206\u5faa\u73af\u590d\u7528\u8be5\u51fd\u6570
\u9a8c\u8bc1\u7ed3\u679c\uff1aPDF \u4ece 56 \u9875 \u2192 54 \u9875\uff08\u5220\u6389\u91cd\u590d\u7684\u6458\u8981 + \u6d88\u9664\u7a7a\u9875\uff09\u3002
\u5c55\u5f00\u7ae0\u8282\u8d77\u59cb\u9875\u987a\u5e8f\uff1a\u5c01\u9762(1) - \u514d\u8d23(2) - \u6267\u884c\u6458\u8981(2) - \u672f\u8bed\u8868(4) - \u76ee\u5f55(9) - \u6b63\u6587\u7b2c\u4e00\u7ae0(11) - \u7b2c\u5341\u7ae0(47) - \u53c2\u8003\u6587\u732e\u3002
remote \u914d\u7f6e\u4e3a http://192.168.50.45:3000/kai/deep_research.git\u3002
Co-authored-by: User <human>
v0.7.1
2026-04-22 16:05:45 +08:00
kai and User <human>
c88da4a20f
v0.7: \u4fee\u590d PDF \u5f15\u6587\u7f16\u53f7\u4e0d\u5bf9\u5e94 + \u5c01\u9762\u91cd\u590d
...
\u4e24\u4e2a P0 bug \u4fee\u590d\uff1a
1. \u5f15\u6587\u7f16\u53f7\u5931\u914d
\u5148\u524d\u7b56\u7565\uff1a\u53c2\u8003\u6587\u732e\u533a\u6309\u6b63\u6587\u51fa\u73b0\u987a\u5e8f\u91cd\u7f16\u53f7\u4e3a [1]/[2]/...\uff0c\u5bfc\u81f4\u6b63\u6587\u4e2d\u4e0a\u6807\u7684 [src_E43]
\u4e0e\u53c2\u8003\u6587\u732e\u533a\u7684 [27] \u5b8c\u5168\u5bf9\u4e0d\u4e0a\u3002
\u65b0\u7b56\u7565\uff1a\u53c2\u8003\u6587\u732e\u6761\u76ee\u76f4\u63a5\u7528\u539f\u59cb src_id \u4f5c\u7f16\u53f7\uff08\u5982 [src_E43] ...\uff09\uff0c
\u6309\u5b57\u6bcd\u6570\u5b57\u6392\u5e8f\u5206\u7ec4\u5c55\u793a\u3002\u6b63\u6587\u548c\u53c2\u8003\u6587\u732e\u540c key\uff0c\u4e00\u773c\u5bf9\u5e94\u3002
\u540c\u65f6\u628a\u7f3a\u5931\u7684 src_id\uff08sources.jsonl \u91cc\u6ca1\u7684\uff09\u5355\u72ec\u5217\u5728\u300c\u672a\u627e\u5230\u6765\u6e90\u300d
\u7ae0\u8282\uff0c\u6a59\u8272\u8b66\u793a\uff0c\u8868\u660e\u662f\u539f\u59cb\u62a5\u544a\u7684\u8d28\u91cf\u95ee\u9898\u3001\u800c\u975e\u6e32\u67d3\u95ee\u9898\u3002
\u9876\u90e8\u65b0\u589e\u300c\u5f15\u6587\u5065\u5eb7\u72b6\u6001\u300d\u5c0f\u7ed3\uff08\u6b63\u6587\u5f15\u7528X\u3001\u6536\u5f55Y\u3001\u7f3a\u5931Z\uff09\u3002
2. \u5c01\u9762\u91cd\u590d\uff08\u622a\u56fe\uff1a\u526f\u6807\u9898 + Confidentiality/Date/Version \u4ecd\u5728\u6b63\u6587\u9996\u9875\uff09
\u539f\u56e0\uff1a\u539f\u8df3\u8fc7\u903b\u8f91\u662f\u201c\u8df3\u9996\u4e2a H1 \u2192 \u8df3\u5339\u914d is_cover_frontmatter \u7684 p\u201d\u3002
\u526f\u6807\u9898\u662f\u52a0\u7c97\u6bb5\uff08**...**\uff09\uff0c\u4e0d\u542b "Confidentiality/Date" \u7b49\u5173\u952e\u8bcd\uff0c
\u5339\u914d\u4e0d\u4e0a\u5c31\u89e6\u53d1\u300c\u5c01\u9762\u7ed3\u675f\u300d\u903b\u8f91\uff0c\u540e\u7eed\u5143\u4fe1\u606f\u6bb5\u4e5f\u6240\u4ee5\u5c31\u6f0f\u5305\u4e86\u3002
\u65b0\u7b56\u7565\uff1a\u7b80\u5316\u4e3a\u300c\u6253\u8868\u4ece\u7b2c\u4e00\u4e2a H2/H3 \u5f00\u59cb\u8fed\u4ee3\u300d\uff0c\u524d\u9762\u7684 block \u5168\u90e8\u4e22\u6389\u3002
\u7406\u7531\uff1a\u5c01\u9762\u5df2\u7531 build_cover \u4ece manifest \u72ec\u7acb\u751f\u6210\uff0c\u6b63\u6587\u5f00\u5934\u5728\u7b2c\u4e00\u4e2a H2
\uff08\u201c## \u514d\u8d23\u58f0\u660e\u201d\uff09\u524d\u7684\u4efb\u4f55\u5185\u5bb9\u90fd\u662f\u5197\u4f59\u7684\u5c01\u9762\u5143\u4fe1\u606f\u3002
\u9a8c\u8bc1\uff1a\u91cd\u8dd1 PDF\uff0c\u7528 pypdf \u63d0\u53d6\u7b2c 1-2 \u9875\u548c\u53c2\u8003\u6587\u732e\u9875\u786e\u8ba4\u4e24\u4e2a bug \u90fd\u5df2\u6d88\u5931\u3002
\u9879\u76ee\u65b0\u589e pypdf \u4f9d\u8d56\uff08\u5de5\u5177\u7c7b\uff0c\u9a8c\u8bc1 PDF \u6587\u672c\u5185\u5bb9\u7528\uff09\u3002
Co-authored-by: User <human>
v0.7
2026-04-22 15:41:56 +08:00
kai and User <human>
743d189dee
v0.6: deprecate dr-translator/polisher agents, rewire /dr-finalize to Python pipeline
...
\u6765\u5b8c\u6210 v0.6 \u67b6\u6784\u53d8\u66f4\u7684\u6700\u540e\u4e00\u7247\u62fc\u56fe\uff1a
- dr-translator.md / dr-polisher.md \u6807\u8bb0 [DEPRECATED v0.6]\uff0c\u6743\u9650\u5168\u90e8 deny\uff0c\u4fdd\u7559\u6587\u4ef6\u4f5c\u5386\u53f2\u53c2\u8003
- dr-editor-in-chief.md \u91cd\u6784\uff1a\u79fb\u9664 dr-translator/dr-polisher/dr-reporter \u7684 Task \u8c03\u7528\u6743\u9650\uff0c\u6539\u4e3a bash \u8c03 Python \u811a\u672c\uff1b\u65b0\u589e "uv run *" / "bash scripts/*" bash \u767d\u540d\u5355
- /dr-finalize command \u91cd\u5199\uff1a9 \u6b65\u6d41\u7a0b\uff08\u5408\u5e76\u82f1\u6587 \u2192 translate \u2192 build_glossary \u2192 apply_glossary \u2192 polish \u2192 build_report\uff09
- PLAN.md \u00a712 \u8865 v0.6 \u5b8c\u6574\u53d8\u66f4\u8bb0\u5f55\uff08\u6839\u56e0\u3001\u65b0\u589e\u811a\u672c\u3001PDF \u6a21\u677f\u4fee\u590d\u3001\u5b9e\u6d4b\u7ed3\u679c\u3001\u5df2\u77e5\u9650\u5236\u3001\u5f85\u529e\u4e8b\u9879\uff09
v0.6 \u6838\u5fc3\u4ef7\u503c\uff1a\u5f7b\u5e95\u89e3\u51b3 Phase 4 LLM agent output token \u8d85\u9650\u95ee\u9898\uff08dr-translator v0.5.2 \u591a\u8f6e\u5361\u6b7b\u7684\u6839\u56e0\uff09\uff0c\u540c\u65f6\u901a\u8fc7 build_glossary \u5f15\u5165\u4e8b\u5b9e\u6838\u67e5\u80fd\u529b\uff0c\u53d1\u73b0\u5e76\u81ea\u52a8\u4fee\u6b63\u4e86\u591a\u5904\u8f6f\u4e8b\u5b9e\u9519\u8bef\uff08Mabwell \u62fc\u5199\u3001\u516c\u53f8\u4e2d\u6587\u8bd1\u540d\u8bef\u7528\uff09\u3002
Co-authored-by: User <human>
v0.6
2026-04-22 13:31:05 +08:00
kai and User <human>
7f1bcc69da
v0.6-wip: apply_glossary \u5c06\u672f\u8bed\u6838\u67e5\u7ed3\u679c\u56de\u5857\u5230\u6b63\u6587
...
scripts/apply_glossary.py\uff08\u65b0\u589e\uff09\uff1a
- \u4ece glossary \u7684 issue \u5b57\u6bb5\u6293\u53d6\u201c\u539f\u672c\u9519\u8bef / \u6b63\u786e\u5199\u6cd5\u201d\u5bf9\uff0c\u76f4\u63a5\u5728 Markdown \u6b63\u6587\u4e2d\u505a\u5b57\u9762\u66ff\u6362
- \u4fdd\u5b88\u7b56\u7565\uff1a
* \u82f1\u6587\u62fc\u5199\u9519\u8bef\uff08high conf\uff09\u76f4\u63a5\u6539
* \u4e2d\u6587\u8bd1\u540d\u9519\u8bef\u4ec5\u5bf9\u201c\u4e13\u6709\u540d\u8bcd\u201d\uff08\u516c\u53f8/\u673a\u6784/\u4ea7\u54c1\uff09\u6539
* \u901a\u7528\u7f29\u5199\uff08PDE/ASGPR/LNP \u7b49\uff09\u6709\u9ed1\u540d\u5355\u62e6\u622a\uff0c\u907f\u514d\u4e0a\u4e0b\u6587\u6b67\u4e49
- dry-run \u6a21\u5f0f\u9884\u89c8
- \u5e42\u7b49
\u5728\u53cc\u9776\u70b9 RNAi \u9879\u76ee\u7684\u6210\u679c\uff1a
- build_glossary \u6210\u529f\u6838\u67e5 201/310 \u672f\u8bed\uff0c\u53d1\u73b0\u4e09\u6761\u4e25\u91cd\u9519\u8bef\uff1a
* Maywavee \u2192 Mabwell\uff08\u8fc8\u5a01\u751f\u7269\uff09- \u82f1\u6587\u62fc\u5199\u9519\u8bef
* Beyotime \u2192 '\u7891\u4e91\u5929' \u4e3a\u9519\u8bef\u8bd1\u540d\uff0c\u5e94\u4e3a '\u5fc5\u8d1d\u7279\u533b\u836f'
* Aurigene \u2192 '\u5929\u6d25\u5965\u5229\u6cd5' \u5e94\u4e3a '\u5929\u6d25\u5965\u745e\u82bc\u751f\u7269\u533b\u836f\u6709\u9650\u516c\u53f8'
- apply_glossary \u5e72\u51c0\u4fee\u6b63 3 \u5904\uff0c\u6b63\u5728\u518d\u6b21\u751f\u6210 PDF + DOCX
- \u6210\u672c\uff1a0.1 \u7f8e\u5143\uff08Haiku + Exa\uff09
\u5df2\u77e5\u9650\u5236\uff1a
- Exa/\u4ee3\u7406\u7ec4\u5408\u5728 >6 \u5e76\u53d1\u4e0b\u4f1a\u51fa\u73b0 SSL EOF \u9519\u8bef\uff0c\u5931\u8d25 106 \u6761\u3002\u53ef\u91cd\u8dd1\u6216\u964d\u5230 3 workers\u3002
- \u672a\u6765\u53ef\u5c06 build_glossary \u524d\u79fb\u5230 Phase 2 \u65f6\u8fd0\u884c\uff0c\u6b63\u6587\u751f\u6210\u524d\u5c31\u62e6\u4f4f\u4fe1\u6e90\u4fa7\u9519\u8bef
Co-authored-by: User <human>
2026-04-22 13:22:00 +08:00
kai and User <human>
d3fde1cbb8
v0.6-wip: build_report \u7edf\u4e00\u5165\u53e3 + build_glossary \u672f\u8bed\u6838\u67e5
...
\u7ee7\u7eed\u89e3\u51b3\u7528\u6237\u53cd\u9988\u7684 PDF \u95ee\u9898\u3002
scripts/build_report.py\uff08\u65b0\u589e\uff09\uff1a
- \u5355\u4e00\u5165\u53e3\u540c\u65f6\u51fa PDF + DOCX
- \u6587\u4ef6\u540d\u81ea\u52a8\u4ece manifest.report_title \u751f\u6210\uff08\u89e3\u51b3 "final.pdf" \u6CDB\u540d\u95EE\u9898\uff09
- pandoc --from=markdown-tex_math_dollars \u4fee\u590d DOCX \u751f\u6210\u65f6\u7684 $ \u8bef\u89e3
- \u81ea\u52a8\u5bfb\u627e phase2/sources.jsonl \u4f5c\u4e3a\u53c2\u8003\u6587\u732e\u5f15\u6587\u6e90
scripts/lib/search_client.py\uff08\u65b0\u589e\uff09\uff1a
- Exa \u4e3b\u529b + Tavily fallback \u7684\u7edf\u4e00\u63a5\u53e3
- \u5173\u952e\u4fee\u590d\uff1atrust_env=False \u7ed5\u5f00\u7cfb\u7edf socks5 \u4ee3\u7406
\uff08Clash on macOS \u5c0a httpx TLS \u63e1\u624b\u5728 CONNECT \u540e EOF\uff09
scripts/build_glossary.py\uff08\u65b0\u589e\uff09\uff1a
- \u7528\u7684\u4e92\u65b9\u5f0f\u89e3\u51b3\u4e86\u7528\u6237\u53cd\u9988 #6\uff1a\u672f\u8bed\u7ffb\u8bd1\u4e0d\u4e13\u4e1a / \u4e8b\u5b9e\u9519\u8bef
- ThreadPoolExecutor \u5e76\u53d1\uff08\u9ed8\u8ba4 6 worker\uff09\uff0c\u6bcf\u4e2a\u672f\u8bed\u72ec\u7acb\uff1a
Search \u2192 Top-3 snippet \u2192 Haiku \u5224\u5b9a \u2192 \u8fd4\u56de {zh, en_full, confidence, issue}
- \u5b9e\u6d4b\u6210\u529f\u8bc6\u522b "Maywavee" \u4e3a "Mabwell" \u7684\u62fc\u5199\u9519\u8bef\u5e76\u6807\u51fa issue
- \u65ad\u70b9\u7eed\u4f20\uff08\u5df2\u6807 verified_at \u7684\u9ed8\u8ba4\u8df3\u8fc7\uff09
- Haiku \u6210\u672c\u6781\u4f4e\uff083 \u4e2a\u672f\u8bed\u8c03\u7528 \u2248 0.01 \u7f8e\u5206\uff09
- \u652f\u6301 --extra terms.txt \u8865\u5145\u7ffb\u8bd1\u9636\u6bb5\u672a\u6536\u5165\u7684\u672f\u8bed
scripts/prompts/glossary_system.txt\uff08\u65b0\u589e\uff09\uff1a
- Haiku \u6838\u67e5\u672f\u8bed\u7684 prompt\uff0c\u660e\u786e\u5224\u5b9a\u7ef4\u5ea6\u548c JSON \u8f93\u51fa\u683c\u5f0f
Co-authored-by: User <human>
2026-04-22 13:12:01 +08:00
kai and User <human>
a86010e9a7
v0.6-wip: polish pipeline + PDF template fixes
...
Phase 4 \u6da6\u8272\u5c42\u4e0e PDF \u6a21\u677f\u4fee\u590d\uff0c\u63a5\u7740\u4e0a\u4e00\u4e2a commit\u3002
polish.py\uff08\u65b0\u589e\uff09\uff1a
- \u548c translate.py \u5bf9\u79f0\uff0c\u6309 H2 section \u5207\u5757 \u2192 \u5faa\u73af\u6da6\u8272 \u2192 \u62fc\u63a5
- \u4f7f\u7528 <<<POLISHED>>>/<<<NOTES>>> \u5206\u9694\u7b26 prompt\uff08\u907f\u5f00 Markdown-in-JSON \u95ee\u9898\uff09
- \u65ad\u70b9\u7eed\u4f20\u3001\u6a21\u578b\u81ea\u8bc4\u6ce8\u8bb0\u843d\u76d8 polish_notes.jsonl
- \u5728\u53cc\u9776\u70b9 RNAi \u9879\u76ee\u8dd1\u901a\uff1a60 \u5757\u5168\u6210\u529f\uff0c10.7 \u5206\u949f\uff0c$1.20\uff0c\u5b57\u6570 -0.2%
report-template.py\uff08\u5927\u6539\u4e00\u6279 P0 bug\uff09\uff1a
- \u5b57\u4f53\u6ce8\u518c\u652f\u6301 fonts/ttf/ \u5b50\u76ee\u5f55\uff08\u89e3\u51b3 OTF PostScript outlines \u4e0d\u517c\u5bb9\uff09
- \u5220\u9664 build_disclaimer \u91cd\u590d\u8c03\u7528\uff08\u514d\u8d23\u58f0\u660e\u4ece Markdown \u8bfb\uff0cmanifest \u4e0d\u518d\u91cd\u590d\uff09
- build_body \u81ea\u52a8\u8df3\u8fc7\u6b63\u6587\u9996\u4e2a H1+\u5c01\u9762\u5143\u4fe1\u606f\u6bb5\uff08\u4e0e\u5c01\u9762\u91cd\u590d\uff09
- \u5360\u4f4d\u7b26 \u201c\u76ee\u5f55\u5c06\u5728\u6700\u7ec8\u6e32\u67d3\u65f6\u81ea\u52a8\u751f\u6210\u201d \u2192 \u81ea\u52a8\u751f\u6210 TOC
- \u5360\u4f4d\u7b26 \u201c\u5b8c\u6574\u7f16\u53f7\u53c2\u8003\u6587\u732e\u5217\u8868\u2026\u201d \u2192 \u4ece phase2/sources.jsonl \u81ea\u52a8\u751f\u6210 GB/T 7714 \u683c\u5f0f\u5f15\u6587
- src \u4e0a\u6807\u6b63\u5219\u6269\u5c55\uff1a\u652f\u6301 src_A14 / src_B-18 \u7b49\u5b57\u6bcd+\u6570\u5b57\u7ec4\u5408 ID\uff08\u539f\u53ea\u652f\u6301 src_\d+\uff09
- Unicode \u4e0a/\u4e0b\u6807\u8f6c <super>/<sub>\uff1a10\u2076 \u2192 10<super>6</super>\uff08\u601d\u6e90\u5b57\u4f53\u5b50\u96c6\u4e0d\u542b\u4e0a\u6807\u5b57\u5f62\uff0c\u5426\u5219\u6e32\u67d3\u65b9\u6846\uff09
- \u4e2d\u82f1\u6df7\u6392\u81ea\u52a8\u52a0\u7a7a\u683c\uff08CJK \u2194 [A-Za-z0-9] \u8fb9\u754c\uff09
- \u8868\u683c\u6837\u5f0f\u91cd\u505a\uff1atable-header/table-cell/table-cell-center\uff1b\u5782\u76f4\u5c45\u4e2d\uff1b\u77ed cell\uff08\u7eaf\u6570\u5b57/\u77ed\u6807\u7b7e\uff09\u6c34\u5e73\u5c45\u4e2d\uff1b\u957f cell \u81ea\u52a8 CJK \u6362\u884c
- TOC \u672b\u5c3e PageBreak\uff08\u76ee\u5f55\u72ec\u5360\u6574\u9875\uff09
\u5df2\u77e5\u672a\u4fee\u590d\uff1a
- Maywavee \u662f LLM \u5728 dr-analyst \u9636\u6bb5\u7f16\u9020\uff0c\u6b63\u786e\u4e3a Mabwell\uff08\u8fc8\u5a01\u751f\u7269\uff09\u3002\u4fe1\u6e90\u4fa7 bug\uff0c\u9700\u5728\u540e\u7eed build_glossary.py \u4e2d\u505a\u4e8b\u5b9e\u6838\u67e5\u3002
- \u6b63\u6587 101 \u4e2a src_id\u3001sources.jsonl \u53ea\u670947 \u4e2a\u3001\u4ea4\u96c6 39 \u4e2a\u2014\u2014\u662f v0.4 \u9057\u7559\u7684\u6ce8\u5165 bug\uff0cbuild_references \u73b0\u5728\u4f1a\u5217\u51fa\u7f3a\u5931\u7684 id \u4f9b\u4eba\u5de5\u6838\u5bf9
- \u53cd\u9a73\u8bc1\u636e\u6bb5\u683c\u5f0f\u4e0d\u7edf\u4e00\u662f dr-analyst/skill \u89c4\u8303\u95ee\u9898\uff0c\u4e0b\u4e00\u6279\u6539 skill
Co-authored-by: User <human>
2026-04-22 12:58:07 +08:00
kai and User <human>
1b47b50d3c
v0.6-wip: Python-based Phase 4 translation pipeline
...
架构变更:把 dr-translator 从 opencode agent 降级为 Python 脚本编排下的 LLM
调用。根本原因是 agent 一次性处理 19k 英文词整文,单次 output token 接近
Sonnet 4.6 上限(~32k),多次重跑都卡在同一个坑里——问题是架构本身,不是
prompt。
新架构:
scripts/lib/zenmux_client.py HTTP 客户端,指数退避重试、token 统计
JSONL 日志、secrets.env 自动加载
scripts/lib/markdown_chunker.py 按 H1/H2 切块,稳定 anchor ID(order+title
sha1),支持合并/统计
scripts/prompts/translate_system.txt 英译中 prompt,用自定义 <<<TRANSLATION>>>
分隔符格式(规避 Markdown-in-JSON 问题)
scripts/prompts/polish_system.txt 中文润色 prompt(留给下一步 polish.py)
scripts/translate.py 主入口:章节级切块 → 逐块翻译 → 拼接
关键设计:
- 0 依赖 LLM 遵从性:Python 控制切块/循环/重试,LLM 只做单块翻译
- 断点续传:每块翻译完立即写 phase4/zh_chunks/<order>-<anchor>.md
- 术语表累积:每块的 glossary_patch 合并回 phase4/glossary.json
- 失败隔离:单块失败不影响其他块,重跑只补缺
- 调试友好:--only N,M / --limit K / --force
实测(dual-target-rnai-pipeline-2026):
- 63 块全部成功,17 分钟,$1.70
- 33,441 中文字(符合"研究类 ≥30,000 字"硬标准)
- 310 条双语术语
- 翻译质量:接近母语咨询分析师写作
下一步:polish.py(按 H2 section 润色)、merge_chapters.py(从 phase2/drafts
合并生成 final_en.md)、重构 dr-editor-in-chief 调度脚本、更新 /dr-finalize。
Co-authored-by: User <human>
2026-04-22 10:43:43 +08:00
kai
701bc1887e
v0.5.2: dr-translator chunked translation protocol
...
Root cause: dr-translator was trying to write entire final_zh.md in one
write call, hitting Sonnet 4-6 output token limit for long reports
(~19k English words → ~27k Chinese chars → blown past 32k token cap).
Fix: explicit chunk-and-append protocol
- Split final_en.md by H1 (# ) then H2 (## ) boundaries
- Each chunk ≤ 2,500 English words
- First chunk uses write to create final_zh.md
- Subsequent chunks use edit or read+write to append
- Per-chunk Chinese output kept under ~5,000 characters (safe margin)
- Preserves glossary.json updates across chunks
2026-04-21 23:10:10 +08:00
kai
333b7bb8d5
v0.5.1: disable apply_patch in agents prone to append-mode failures
...
Root cause: apply_patch finds anchor lines in read-cached file state,
but file may have been modified between read and patch, causing stalls.
Changes:
- dr-verifier: disable apply_patch AND edit; force read-then-write protocol for evidence file appends
- dr-analyst: document write-preferred protocol for sources.jsonl appends
- dr-polisher: disable apply_patch; keep edit for small string replacements
- dr-editor-in-chief / dr-translator: disable apply_patch
Recovery procedure documented in dr-verifier for write failures.
2026-04-21 14:44:03 +08:00
kai
a092af4398
v0.5: deep quality refactor (P0+P1+P2)
...
- Split dr-chief-editor (Phase 3 read-only) vs new dr-editor-in-chief (Opus, Phase 4 lead)
- New dr-translator (en->zh) and new humanizer-cn / output-hygiene / en-zh-translation skills
- Switch to English working language (Phase 2-3), final Chinese translation (Phase 4)
- /dr-init: add report title proposals + word budget mode
- /dr-frame: bilingual framework
- /dr-finalize: new chain editor->translator->polisher->reporter
- report-template.py: widows/orphans/keepWithNext, 3-color hierarchy, confidentiality banner
- dr-reporter: mandatory citations backfill + output hygiene check
- dr-pm: batch-level context compression via manifest.batches_summary
- mckinsey-method: SCQA only for Executive Summary + chapter intros (no explicit labels)
- length-budget: 4 word-budget modes + en/zh 1:1.4 ratio
v0.5
2026-04-21 13:02:54 +08:00
kai
4a38f6bed1
snapshot before v0.5 refactor
v0.4-final
2026-04-21 12:31:58 +08:00