笔记-文献-证据锚定

基于证据锚定的科学文献摘要与结构化笔记技能。适用于阅读、总结、提取论文卡片、构建节对齐笔记、提取原子知识点、比较多篇论文,或导出带有精确页面/节/块来源的可验证 Markdown/JSON 文献笔记。支持单/多栏 PDF、LaTeX、DOCX、HTML、Markdown、扫描回退以及自定义嵌套 output_contract 模式。

Qu'est-ce que 笔记-文献-证据锚定 ?

此技能(literature-notes-evidence-anchored)是一个专门用于科学文献结构化笔记的 AI 代理(如 Claude Code、Cursor、Codex)技能。它通过一个严格的五步确定性 SOP,确保每个实质性声明都绑定到不可变的源锚(如 `[P3-B014]`),并由代码审计。该技能特别适合研究人员、学生或任何需要从多篇论文中提取可验证知识点的用户。它支持多种文档格式(PDF、LaTeX、DOCX、HTML、Markdown),并能在扫描文档或格式不佳时提供回退机制。其核心价值在于强制性的证据锚定和反薄弱笔记底线,确保输出不包含未声明的来源或虚构信息。通过结构索引、增量读取、修补、代码审计和最终验证,该技能在保护预算(64 次请求/900 秒/16,384 Tokens)的同时,高效生成高质量的文献摘要、论文卡片和知识点,并直接集成到 Obsidian 或 Zotero 等工作流中。

Compatible avec✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/1139596193/scientific-pdf-parser-skill/tree/HEAD/reading-06-literature-notes

Installed? Explore more Recherche et analyse de données skills: affaan-m/uspto-database, affaan-m/scholar-evaluation, affaan-m/literature-review · View all 6 →

Demander à votre IA préférée

Ouvre une nouvelle conversation avec cette compétence d'agent déjà préchargée.

Documentation

文献笔记 — 证据锚定工作流

生成可验证、节对齐的文献摘要、统一论文卡片和原子知识点,其中每个实质性声明都绑定到不可变的源锚([P3-B014] 或 [D1-P3-B014]),在交付前由确定性代码审计。

环境与路径约定

  1. 定位已安装的技能目录(只读):
    SKILL_DIR="/skills/weekly-skill"
    [ -d "$SKILL_DIR/scripts" ] || SKILL_DIR="$(cd "$(dirname "${BASH_SOURCE[0]:-$0}")" && pwd)"
    
    (回退:find / -maxdepth 4 -name SKILL.md 2>/dev/null | head -1 | xargs dirname。)
  2. 只读技能纪律:切勿将临时文件、补丁或 __pycache__ 写入 $SKILL_DIR。始终使用 python3 -B "$SKILL_DIR/scripts/..." 调用。
  3. 运行时路径:从 /input/case.json、/input/task.md 和 /input/ 下的源文档读取输入。将中间工件写入 /app/work/,最终交付物(result.json、literature_notes.md)写入 /app/output/。

5 步确定性 SOP(预算:64 次请求 / 900 秒 / 16,384 Tokens)

步骤 1 — 索引文档骨架并构建阅读包

python3 -B "$SKILL_DIR/scripts/structure_indexer.py" \
  --input-dir /input \
  --work-dir /app/work \
  --output-dir /app/output

检查 stdout 摘要并读取:

  • /app/work/reading_packets/manifest.json → 包列表、字数预算、task_guidance(来自 task.md/case.json 的预期语言和重点)
  • /app/work/paper_signals.json → 元数据、图表、表格、公式、limitation_clues、quality_risk、quality_notices
  • /app/work/draft_skeleton.json → 早期保存的部分骨架 + output_contract

步骤 2 — 增量读取包并发出紧凑的 JSON 补丁

按顺序读取 /app/work/reading_packets/packet_001.md、packet_002.md ...(合并小于 1,200 词的相邻小包)。每个块标记为 [P{页}-B{序号}] 或 [D{文档}-P{页}-B{序号}](多文档)。引用锁定的节从包中排除。

  • 附录摘要表:切勿跳过尾部的 Appendix 包(例如 packet_005/packet_006);检查它们是否有关键的摘要表(表 4、参数界限、延迟消融),并包含相关的经验行/KP。
  • 合并单元格与 PUA 公式警告:当 quality_notices 标记 formula_pua_glyphs 或表格包含多行合并单元格时,交叉检查 paper_signals.json -> tables 绑定,并在可用时通过 table_formula_ocr.py / fitz 检查渲染的页面裁剪。

将紧凑的 JSON 补丁写入 /app/work/patches/(例如 01_paper_card.json、02_sections_p1.json、03_knowledge_points.json)。

强制补丁字段:

字段要求
anchor_ids每个实质性声明在包中观察到的 ≥ 1 个真实 anchor_id
verbatim_quote源文档原始语言中的精确摘录,8–25 个词
provenance_status对任何未陈述的事实(venue/DOI/code/baseline/limit)标记为 "not_reported_in_source"
section_alignment覆盖所有未锁定的正文区域;检查 paper_signals 中的 limitation_clues

反薄弱笔记底线(由审计器强制执行 — 切勿低于此标准):

  • key_results:≥ 3 个条目,每个包含 metric、value、baseline、condition、summary、≥ 1 个 anchor_id、verbatim_quote(仅当源中确实缺失时标记为 not_reported_in_source)
  • section_summaries[*].key_points:每个摘要的正文节 ≥ 2 个关键点,每个包含 verbatim_quote 和 ≥ 1 个 anchor_id
  • knowledge_points:8–15 个原子 KP,涵盖 7 个规范类别(concept_definition、method_mechanism、formula_algorithm、empirical_finding、dataset_metric、limitation_risk、future_direction)
  • 首先优先考虑 manifest.json → task_guidance 中的指令(自定义用户重点)

最小补丁骨架(可复制粘贴 — 匹配 note_assembler.py 模式):

01_paper_card.json:

{
  "paper_card": {
    "one_line_takeaway": {"value": "...", "anchor_ids": ["P1-B002"]},
    "research_problem": {"value": "...", "anchor_ids": ["P1-B003"]},
    "methodology_summary": {"value": "...", "anchor_ids": ["P3-B010"]},
    "limitations_and_assumptions": {"value": "...", "anchor_ids": ["P8-B041"]},
    "key_results": [
      {"result_id": "RES-001", "metric": "F1", "value": "92.3%", "baseline": "BERT",
       "condition": "English NER", "summary": "...", "anchor_ids": ["P5-B020"], "verbatim_quote": "..."}
    ],
    "tags": ["topic-a", "method-b"]
  }
}

02_sections.json:

{
  "section_summaries": [
    {"section_id": "S03", "summary": "Concise section narrative...",
     "key_points": [
       {"text": "Atomic claim...", "anchor_ids": ["P4-B015"], "verbatim_quote": "exact source excerpt"}
     ]}
  ]
}

03_knowledge_points.json:

{
  "knowledge_points": [
    {"kp_id": "KP-001", "category": "method_mechanism", "title": "...", "claim": "...",
     "detail": "...", "anchor_ids": ["P3-B012"], "verbatim_quote": "exact source excerpt"}
  ]
}

语言与引用规则:

  • 笔记遵循 task_guidance 中的语言(zh → 中文散文;保留英文技术术语内联)
  • verbatim_quote 始终使用源文档的原始语言,无论笔记语言如何
  • 对于中文笔记关于英文论文:散文用中文写,verbatim_quote 保留英文

步骤 3 — 组装笔记并回填来源

python3 -B "$SKILL_DIR/scripts/note_assembler.py" \
  --work-dir /app/work \
  --patches-dir /app/work/patches

对于单补丁修复:

python3 -B "$SKILL_DIR/scripts/note_assembler.py" \
  --work-dir /app/work \
  --patch /app/work/repair_01.json

步骤 4 — 运行 4 重代码审计与定向修复(最多 2 轮)

python3 -B "$SKILL_DIR/scripts/note_auditor.py" --work-dir /app/work

检查:(1)幽灵锚与引用保真度,(2)数字/单位/交叉引用/否定极性,(3)未锁定正文节与局限性覆盖,(4)扫描/乱码诚实性与占位符泄漏。

如果 blocking_issues > 0,读取 /app/work/repair_queue.json(≤ 15 个优先项),编写定向修复补丁,仅修复标记的 section_id/kp_id/result_id,然后重新运行步骤 3–4。最多 2 轮修复。未声明的源缺陷(扫描页面)→ 记录在 uncertainties 和 manual_review_checklist 中。

步骤 5 — 渲染交付物并强制执行硬验证门

python3 -B "$SKILL_DIR/scripts/render_deliverables.py" \
  --input-dir /input \
  --work-dir /app/work \
  --output-dir /app/output

python3 -B "$SKILL_DIR/scripts/validate_output.py" \
  --output-dir /app/output \
  --input-dir /input \
  --work-dir /app/work \
  --strict

在 validate_output.py --strict 以代码 0 退出之前,请勿完成。

硬纪律检查表

  • 早期回退:draft_skeleton.json 在步骤 1 中保存;如果接近预算(900 秒 / 64 次请求),立即运行步骤 3 + 5,以便保留诚实的 partial 输出。
  • 没有虚假的 success:当 has_unreadable_source=true、blocking_issues > 0 或 body_section_coverage < 0.85 时,切勿将 status 覆写为 "success"。validate_output.py --strict 以非零退出码拒绝不诚实的成功。
  • 按需加载参考:仅当遇到扫描的 PDF、乱码字体、跨语言引用、超过 30 页的预算或多文档集合时,才读取 $SKILL_DIR/references/schema_and_patches.md 以获取 JSON 补丁字段模板,或 $SKILL_DIR/references/edge_cases_and_recovery.md。
  • 未编号散文回退:对于白皮书、报告或没有编号标题的单栏散文,structure_indexer.py 自动注入一个合成正文节,以便 body_section_coverage 可以非零;不要在补丁中添加合成标题。
  • 同节编号上下文:审计器接受在兄弟锚点(相同 section_id,±3 个位置)中找到的数字为低严重性(非阻塞);仅在整个节中都缺少的数字才属于高严重性。

Individual skills in this repo

This repo contains 1 individual skill — each has its own dedicated page.

Skills associés