hyperresearch

命令行工具

jordan-gibbs/hyperresearch

将 Claude Code 变为深度研究代理,构建持久可检索的知识库。

项目简介

将 Claude Code 变成深度研究代理:通过分层自适应的 16 步流水线收集上百个来源,由对抗性评审逐句核验引用后生成报告。所有来源存入持久、可检索的 Markdown 加 SQLite 知识库,后续会话可直接复用,并支持崩溃后断点续跑。

README 预览

\n\nThe Most Powerful Deep Research Harness\n\n\n  \n  \n  \n  \n\n\n---\n\n**Hyperresearch turns Claude Code into a deep research agent: one that currently leads the DeepResearch-Bench RACE leaderboard (benchmarked internally).** A tier-adaptive 16-step pipeline takes one prompt and produces an adversarially-audited report with full source provenance. Every source it reads lands in a persistent, searchable vault, so each session starts smarter than the last.\n\n\n  \n\n\nForward-looking projection from a stratified pilot against the DeepResearch-Bench leaderboard snapshot (https://huggingface.co/spaces/muset-ai/DeepResearch-Bench-Leaderboard). Third party validation is pending.\n\n## Why it wins\n\n- **250+ sources in a single run.** The `premier` scale profile targets 100–130 in the width sweep alone; citation chasing and gap-fill fetches more than double what actually lands in the corpus.\n- **Every citation is verified before the report ships.** A skeptical cite-checker audits whether each cited source actually supports its sentence. Hallucinated quotes and unacknowledged retractions are hard blocks at the gate.\n- **Syndication doesn't count as consensus.** An independence audit clusters derivative copies, so five reprints of one press release argue with the weight of one source.\n- **Adversarial by construction.** Four critics attack every draft in parallel, and a tool-locked patcher can only apply surgical edits. It physically cannot rewrite the report.\n- **Eight scholarly sources, one query.** `hpr scholar search` hits OpenAlex, Crossref, CORE, DOAB, ClinicalTrials.gov, SEC EDGAR and FRED through one client layer and returns a single list deduplicated by DOI and title. Books, trials and filings come back alongside papers, each tagged so the pipeline knows which is which. The humanities and social sciences are covered on purpose, not as an afterthought.\n- **Paywalled papers get read, not skimmed.** A closed paper normally enters a vault as a 1,500-character

常见问题 (3)

故障排除
如何修复 `run init` 接受 `../../x` 作为 vault 标签并在 vault 之外生成脚手架的路径遍历漏洞?

Vault.run_dir() 和 init_run 在未经验证的情况下将 vault_tag 拼接到 research/runs/ 上,因此诸如 ../../x 这样的标签或绝对路径会逃逸出 vault。请按照 #114 中 --tag 遍历问题的修复方式来处理:解析拼接后的路径,并要求其位于 research/runs/ 之下,否则以清晰的错误信息拒绝该标签。一个更简单的替代方案是在 CLI 边界处将标签限制为 slug 模式 [A-Za-z0-9_.-]+,从而完全阻止 / 和 .. 段。请注意,该修复涉及每一个 run 子命令,因为它们都以相同的方式解析标签。

来源 Issue #116
故障排除
为什么 hyperresearch 的 quote-integrity lint 会误报 "hallucinated quote" 错误,并以 blocked_on verify 状态阻止运行完成?

根本原因(hyperresearch v0.10.0):在 cli/lint.py(_check_quote_integrity)中,跨度正则表达式 _QUOTE_SPAN_RE = re.compile(r'["“]([^"“”]{20,600})["”]') 强制设定了 20 个字符的最小长度。任何真实引用但短于 20 个字符的短语(例如 "TVL"、"reasonable use")都完全无法匹配;其右引号随后被误读为新的*起始*引号,并与数百个字符之后的下一个引号字符配对,从而产生一个包含普通正文的巨大虚假"幻觉"跨度。修复(修补该工具):将该正则表达式替换为无硬性下限的非贪婪匹配——r'["“]([^"“”]{1,600}?)["”]'——并让现有的 if len(quote.split()) < 5: continue 检查来跳过对短跨度的验证,而不是依赖正则表达式的长度进行过滤。变通方案(报告侧,无需修改代码):找出所有少于 20 个字符的引用跨度(编写一个顺序配对 " 标记并标记出少于 20 字符跨度的脚本),然后要么将真正的简短专业术语改为斜体(用 *Low Security* 代替 "Low Security"),要么将连续源文本中相邻的短引用合并为一条更长的逐字引用(例如,将五个短标签片段合并为单个 90+ 字符的引用跨度),直到 run finish 通过为止。

来源 Issue #120
故障排除
为什么 hyperresearch 技能命令会失败,并提示 'run: command not found' 或 '$HPR' not found 错误?

在 hyperresearch 0.11.1 中,.claude/skills/ 下已安装的 19 个 step skills 中有 14 个以 $HPR 的形式调用 CLI,但 HPR 变量从未被定义——既不在环境中,也不在 .claude/settings.json 中,也不在软件包内的任何地方。当 HPR 未设置时,$HPR 会展开为空字符串,因此像 $HPR run finish <vault_tag> --json 这样的命令会变成 run finish ...,shell 随即报告 run: command not found(这是 shell 错误,而非 CLI 错误)。变通方法:1) 自行导出指向已安装二进制文件的变量:export HPR="$(command -v hyperresearch)"(将其添加到你的 shell profile 或 agent 的环境中)。2) 或者将已安装 skills 中的 $HPR 替换为解析后的 CLI 绝对路径——即安装程序已经写入 CLAUDE.md(显示为 **CLI path: /path/to/hyperresearch**)以及所有 agent prompts 中的那个相同路径。例如:grep -rl '\$HPR' .claude/skills/ | xargs sed -i "s|\$HPR|/path/to/hyperresearch|g"。修复前用 bash -c 'unset HPR; $HPR run status -j' 验证(会失败),修复后用 /path/to/hyperresearch run status -j 验证(可正常运行)。

来源 Issue #133