v0.12: stabilize search routing and profile-driven phase4 pipeline

This commit is contained in:
kai
2026-04-29 15:53:20 +08:00
parent 450ecebcff
commit 5342a26018
33 changed files with 1436 additions and 140 deletions
+11
View File
@@ -17,6 +17,8 @@ permission:
"*": deny
"wc *": allow
"python3 *": allow
"uv run python scripts/search.py *": allow
"uv run python scripts/ground.py *": allow
"mkdir *": allow
"grep *": allow
"cat *": allow
@@ -66,6 +68,15 @@ Read `projects/<slug>/phase1/framework.md` to understand the chapter's positioni
- Round 3: Counter-evidence (search for limitations, failures, controversies)
- Round 4: Tavily/Exa/Brave for gap-filling, trace back to Tier 1-2 originals
Mandatory project search gateway:
- Literature / reviews: `uv run python scripts/search.py "<query>" --route scholar --num-results 10 --year-low 2023`
- Patents / FTO: `uv run python scripts/search.py "<query>" --route patents --num-results 10`
- News / transactions: `uv run python scripts/search.py "<query>" --route news --num-results 10 --time-range m`
- Generic gap-fill: `uv run python scripts/search.py "<query>" --route general --num-results 10`
- Fast grounded fact-check (native model web search): `uv run python scripts/ground.py "<query>" --json`
Record the routes used in the evidence file. Do not use Tavily / Exa / Brave MCP as the primary path for literature or patent searches.
Search in **both English and Chinese** for each direction (Chinese sources critical for China market / NMPA / CSRC disclosures).
### Step 3: Source Scoring
+12 -4
View File
@@ -7,10 +7,14 @@ temperature: 0.1
tools:
read: true
webfetch: true
bash: true
skill: true
permission:
bash:
"*": deny
"uv run python scripts/search.py *": allow
"uv run python scripts/ground.py *": allow
"python3 scripts/search.py *": allow
edit: deny
webfetch: allow
task:
@@ -25,10 +29,13 @@ permission:
1. 加载 `skill:search-strategy` 了解信源优先级与检索规则
2. 加载 `skill:source-quality` 了解评分标准与黑名单
3. 按调用方给定的关键词方向,执行 **3 轮检索**
- 第 1 轮:英文关键词,优先 Tavily advanced 模式,锁定 Tier 1 域名
- 第 2 轮:中文关键词,查中文专业来源
- 第 3 轮:反方/限制性关键词(如 `limitations`, `adverse`, `failed`
3. 按调用方给定的关键词方向,执行 **3 轮检索**,必须优先使用项目搜索网关
- 文献:`uv run python scripts/search.py "<query>" --route scholar --num-results 10 --year-low 2023`
- 专利:`uv run python scripts/search.py "<query>" --route patents --num-results 10`
- 新闻/行业动态:`uv run python scripts/search.py "<query>" --route news --num-results 10 --time-range m`
- 通用补漏:`uv run python scripts/search.py "<query>" --route general --num-results 10`
- 快速 grounding`uv run python scripts/ground.py "<query>" --json`
- Tavily / Brave / Exa MCP 只能作为 gap-fill 或脚本不可用时的兜底
4. 对每条候选信源按 source-quality 评分,过滤掉评分 < 5 及黑名单
5. 整理输出,直接返回给调用方(不写文件)
@@ -43,6 +50,7 @@ permission:
- 英文:...
- 中文:...
- 反方:...
- Routes used: scholar / patents / news / general
### 信源列表(共 N 条,Tier 1-2)
+11 -1
View File
@@ -2,7 +2,7 @@
description: Cross-model verification agent (English). Uses non-Claude model (GPT-5.4) to do counter-evidence searching and fact-check on completed chapters, avoiding same-source bias. Scheduled by dr-pm after dr-analyst finishes each chapter.
mode: subagent
hidden: true
model: zenmux/openai/gpt-5.4
model: zenmux/openai/gpt-5.4-mini
temperature: 0.2
tools:
read: true
@@ -10,12 +10,16 @@ tools:
edit: false
apply_patch: false
webfetch: true
bash: true
skill: true
permission:
edit: allow
webfetch: allow
bash:
"*": deny
"uv run python scripts/search.py *": allow
"uv run python scripts/ground.py *": allow
"python3 scripts/search.py *": allow
task:
"*": deny
---
@@ -74,6 +78,12 @@ For each core claim, search:
Run 3-5 webfetch queries per claim, prioritizing Tier 1-2 sources.
Use the project search gateway before generic webfetch:
- `uv run python scripts/search.py "<claim keyword> limitations failed controversy" --route scholar --num-results 10 --year-low 2023`
- For patent/IP claims: `uv run python scripts/search.py "<claim keyword>" --route patents --num-results 10`
- For news or transaction claims: `uv run python scripts/search.py "<claim keyword>" --route news --num-results 10 --time-range y`
- For rapid independent spot checks: `uv run python scripts/ground.py "<claim keyword>" --json`
### Step 3: Data Sanity Check
Verify all numbers in the chapter: