
Paper Source Trace
- 36 installs
- 55 repo stars
- Updated July 23, 2026
- canxiangcc/aminer-open-skill
Search and analyze academic research papers and citations
About
Enables searching, accessing, and analyzing academic research papers and citations. Essential during the idea phase for researching existing solutions, competitive analysis, and understanding problem domains.
- Academic search
- Paper discovery
- Research data access
Paper Source Trace by the numbers
- 36 all-time installs (skills.sh)
- Ranked #1,759 of 3,282 Productivity & Planning skills by installs in the Skillselion catalog
- Data as of Aug 1, 2026 (Skillselion catalog sync)
npx skills add https://github.com/canxiangcc/aminer-open-skill --skill paper-source-traceAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 36 |
|---|---|
| repo stars | ★ 55 |
| Last updated | July 23, 2026 |
| Repository | canxiangcc/aminer-open-skill ↗ |
What it does
Search and analyze academic research papers and citations
Files
Paper Source Trace
Paper Source Trace turns one target paper into grounded, claim-centered source-tracing artifacts. It keeps one canonical skill name, paper-source-trace.
Invoke it through natural language or /paper-source-trace.
Language Routing
- Use
SKILL.zh.mdwhen the user mainly writes in Chinese or explicitly requests Chinese output. - Use this
SKILL.mdfor all other requests. - Keep
json/graph/citation_graph.jsonkeys, intent labels, relation types, source roles, and parameter names in English in both workflows.
English Workflow
Standard Artifacts
Produce these artifacts when evidence and filesystem access allow:
analysis.md: human-readable report.json/graph/citation_graph.json: canonical machine-readable graph followingreferences/schema.md.citation_map.svg: static citation map when SVG generation is possible.citation_map.html: single-file interactive graph when graph data is available.citation_map_chain.svg: chain-style source trace SVG only whensvg: both.citation_map_spec.md: only when SVG generation has caveats or fails.
Default output directory:
outputs/paper-source-trace/<safe-paper-stem>/Preferred layout:
analysis.md
citation_map.svg
citation_map.html
citation_map_chain.svg # only when svg is both
citation_map_spec.md # only when SVG generation has caveats or fails
json/graph/citation_graph.json
json/aminer/*.json # only when AMiner raw results are saved
json/extraction/*.json # only when structured intermediates are savedLegacy compatibility: if the user writes mode: current, treat it as svg: radial; mode: example as svg: chain; and mode: all as svg: both. If svg and mode are both supplied and conflict, ask the user to confirm the intended SVG output. hybrid, interactive graph, or expandable knowledge graph means the user wants the standard citation_map.html; it is not an SVG mode and does not change the SVG choice.
Startup Confirmation
Before reading the paper, extracting citations, checking AMINER_API_KEY, calling AMiner, or generating SVG, ask the user to confirm:
- SVG output:
radial,chain, orboth. - AMiner enrichment:
onoroff.
If the user already supplied one or both values, restate them as provisional and still ask for final confirmation. Stop until the user answers.
If interactive confirmation is genuinely impossible, use the recommended defaults: svg: both and aminer: on. Still follow the high-cost confirmation rule before any AMiner call estimated at ¥5 or more; if AMINER_API_KEY is missing, skip AMiner enrichment and continue local analysis.
Core Rules
1. Use only supplied paper text, citation contexts, reference entries, user notes, or explicitly requested AMiner results as evidence. 2. Do not infer citation intent from domain memory alone. 3. AMiner enrichment is explicit opt-in only. Do not check AMINER_API_KEY unless requested. 4. AMiner may enrich IDs, URLs, candidate reference matches, and external citation relationships, but it cannot replace local citation contexts or prove intent/source traces by itself. 5. Preserve uncertainty; lower confidence when citation context, reference matching, or source role evidence is incomplete. 6. Keep citation_sentence and context in the source language of the target paper. They are original evidence anchors, not localized explanations. 7. Use the user's output language for evidence, summary, notes, Markdown report text, and visible SVG/HTML UI. 8. If output files can be written, do not stop at a chat-only summary.
AMiner Enrichment
When confirmation is possible, treat AMiner as off unless the user confirms aminer: on or explicitly writes enhance with AMiner, use AMiner metadata, complete paper_id, or trace AMiner citation relationships. When confirmation is genuinely impossible, the recommended fallback is aminer: on.
When enabled:
1. Check only whether AMINER_API_KEY exists; never print the token. 2. If missing, continue local analysis and record that enrichment was skipped. 3. Use the shortest viable chain: paper_search or paper_search_pro, paper_detail, paper_relation, and paper_info. 4. Output a cost summary for all planned or completed AMiner calls. 5. If estimated cost is ¥5 or more, ask for explicit confirmation before paid calls. 6. Record enrichment metadata under metadata.aminer_enrichment in json/graph/citation_graph.json.
Intent Labels
Use only these labels unless the user explicitly extends the taxonomy:
background, problem, core-method, supporting-method, dataset, metric, baseline, tool-resource, theory, result-evidence, limitation, future-work.
Execution Steps
1. Ask the startup confirmation question and wait for the answer. 2. Resolve input evidence and output directory. 3. Extract reliable paper text, reference entries, and citation contexts. 4. Read references/evidence_protocol.md before important classification or source tracing. 5. Classify citations with the allowed intent labels. 6. Extract key target-paper claims or contributions when supported by text. 7. Build source_traces[] by linking claims to local citation contexts, cited-source roles, and evidence steps. 8. Extract entities and relations that explain the target paper. 9. If AMiner is enabled, enrich metadata without replacing local evidence. 10. Write json/graph/citation_graph.json before visual artifacts. 11. Write analysis.md; use references/analysis_template.md only for explicit template or fixed-format requests. 12. Generate citation_map.html and the confirmed SVG output with one renderer command: scripts/render_html.py --graph <output>/json/graph/citation_graph.json --output <output>/citation_map.html --svg <radial|chain|both> --language auto. 13. Do not hand-write ad hoc SVG or HTML; both static SVG modes and the HTML radial / chain views must share the renderer layout, colors, language pack, text wrapping, node priority, and edge rules. 14. Validate artifacts before the final reply.
Reference Files
references/schema.md: canonical schema and JSON example.references/evidence_protocol.md: evidence and uncertainty rules.references/prompts.md: English and Chinese extraction/review prompts.references/visual.md: SVG and HTML graph rules.references/analysis_template.md: fixed report templates for explicit template mode.scripts/render_html.py: standard graph renderer. Use it forcitation_map.html,citation_map.svg, andcitation_map_chain.svg; do not hand-write ad hoc SVG or HTML.
Quality Checks
- Every citation has
intent,evidence,confidence, and eitherreference_idorunmatched_reference: true. - Every intent label is in the allowed list.
- Key citations trace back to a citation sentence or local context.
citation_sentenceandcontextpreserve the target paper's original language; only explanation fields are localized.- Every entity is supported by at least one citation.
- Every source trace is grounded in at least one local citation context; AMiner metadata cannot be the sole support.
- Generate
citation_map.htmland SVG maps withscripts/render_html.pyafterjson/graph/citation_graph.jsonis written. HTML and SVG must use one visible language, the same canonical group labels, the same node ranking, and the same reduced-edge layout strategy. - Static SVG should use only useful main edges, summarize dense groups with
+N, and avoid citation-to-citation cross-links or AMiner-only relation lines. json/graph/citation_graph.jsonremains complete even if Markdown, SVG, or HTML has caveats.
/paper-source-trace - Paper Source Trace
User invoked the Paper Source Trace skill with:
$ARGUMENTSLanguage Routing / 语言路由
- If
$ARGUMENTSor the conversation is mainly Chinese, follow 中文命令流程 and read${CLAUDE_PLUGIN_ROOT}/SKILL.zh.md. - Otherwise follow English Command Flow and read
${CLAUDE_PLUGIN_ROOT}/SKILL.md. - Parameter names stay English:
file,output,svg,template,aminer; legacymodeis accepted only as an alias. - JSON keys, intent labels, relation types, and source roles stay English.
- 如果
$ARGUMENTS或当前对话主要是中文,使用 中文命令流程。 - 否则使用 English Command Flow。
English Command Flow
1. Task
Read and follow ${CLAUDE_PLUGIN_ROOT}/SKILL.md. This command is an orchestration entrypoint. For citation_map.html and static SVG maps, use the standard renderer at ${CLAUDE_PLUGIN_ROOT}/scripts/render_html.py; do not hand-write ad hoc SVG or HTML.
Produce the standard artifacts when evidence allows:
analysis.mdjson/graph/citation_graph.jsoncitation_map.svgcitation_map.htmlcitation_map_chain.svgonly whensvg: bothcitation_map_spec.mdonly when SVG generation has caveats or fails
2. Startup Confirmation
Before reading the paper, checking AMINER_API_KEY, calling AMiner, or generating SVG, ask the user to confirm both settings:
- SVG output:
radial,chain, orboth - AMiner enrichment:
onoroff
If $ARGUMENTS already contains svg, legacy mode, or aminer, restate the provisional values and ask for final confirmation. Stop until the user answers. Map legacy mode: current to svg: radial, mode: example to svg: chain, and mode: all to svg: both. If svg and mode conflict, ask the user to choose one. Treat hybrid, interactive graph, or expandable knowledge graph as a request for the standard citation_map.html, not as an SVG mode.
If interactive confirmation is genuinely impossible, use the recommended defaults: svg: both and aminer: on. Keep the high-cost AMiner confirmation rule: ask before any estimated cost reaches ¥5 or more.
3. Parse Arguments
Accept structured fields and natural language together:
| Field | Values | Meaning |
|---|---|---|
file | PDF path, text path, or citation-context file path | Primary input |
output | directory path | Artifact output directory |
svg | radial, chain, both | Static SVG output |
mode | current, example, all | Legacy alias for svg |
template | yes, no | Whether to use references/analysis_template.md |
aminer | on, off | Whether AMiner enrichment is explicitly requested |
Preserve the user's language preference, output requirements, AMiner opt-in, template request, and SVG output.
4. Input Guard
If no PDF path, text path, pasted paper text, citation contexts, reference list, or usable paper evidence is available, ask the user to provide input. Do not fabricate analysis.md, json/graph/citation_graph.json, SVG/HTML content, citations, references, claims, or source traces.
5. AMiner Opt-In
Check AMINER_API_KEY only when aminer: on, the user explicitly requests AMiner enrichment, or interactive confirmation is genuinely impossible and the recommended aminer: on fallback is being used. Never print the token. If the token is missing, skip AMiner enrichment, continue local analysis when local evidence exists, and record the skipped reason.
AMiner may enrich metadata, paper IDs, URLs, candidate reference matching, and external citation relationships. It must not be the sole evidence for citation intent or source_traces[].
6. Output and Execution
Use output when provided; otherwise use:
outputs/paper-source-trace/<safe-paper-stem>/Output layout:
analysis.md
citation_map.svg
citation_map.html
citation_map_chain.svg # only when svg is both
citation_map_spec.md # only when SVG generation has caveats or fails
json/graph/citation_graph.json
json/aminer/*.json # only when AMiner raw results are saved
json/extraction/*.json # only when structured intermediates are savedRead referenced files only as needed: references/schema.md, references/evidence_protocol.md, references/analysis_template.md for explicit template mode, and references/visual.md before SVG/HTML work.
After json/graph/citation_graph.json exists, generate HTML and the confirmed SVG output with one renderer command:
python "${CLAUDE_PLUGIN_ROOT}/scripts/render_html.py" --graph "<output>/json/graph/citation_graph.json" --output "<output>/citation_map.html" --svg "<radial|chain|both>" --language autoThe renderer owns both SVG modes and the HTML views. Do not generate separate ad hoc SVG layouts, extra cross-links, or mixed-language labels.
中文命令流程
1. 任务
读取并遵循 ${CLAUDE_PLUGIN_ROOT}/SKILL.zh.md。这个命令是编排入口。生成 citation_map.html 和静态 SVG 图谱时必须使用 ${CLAUDE_PLUGIN_ROOT}/scripts/render_html.py 标准渲染器,不要临场手写 SVG 或 HTML。
证据允许时生成标准产物:
analysis.mdjson/graph/citation_graph.jsoncitation_map.svgcitation_map.htmlcitation_map_chain.svg,仅在svg: both时生成citation_map_spec.md,仅在 SVG 生成存在限制或失败时生成
2. 启动确认
在读取论文、检查 AMINER_API_KEY、调用 AMiner 或生成 SVG 之前,先请用户确认两个设置:
- SVG 输出:
radial、chain或both - AMiner 增强:
on或off
如果 $ARGUMENTS 已包含 svg、旧参数 mode 或 aminer,先复述为暂定值,再请求最终确认。用户回答前停止执行。旧参数 mode: current 映射为 svg: radial,mode: example 映射为 svg: chain,mode: all 映射为 svg: both。如果 svg 和 mode 冲突,必须请用户选择。hybrid、interactive graph、expandable knowledge graph、交互图谱 或 可展开知识图谱 表示需要标准产物 citation_map.html,不是 SVG 模式。
如果确实无法进行交互确认,使用推荐默认值:svg: both 和 aminer: on。保留 AMiner 高成本确认规则:预估成本达到或超过 ¥5 时必须先询问。
3. 解析参数
同时接受结构化字段和自然语言:
| 字段 | 取值 | 含义 |
|---|---|---|
file | PDF 路径、文本路径或 citation-context 文件路径 | 主要输入 |
output | 目录路径 | 产物输出目录 |
svg | radial, chain, both | 静态 SVG 输出 |
mode | current, example, all | svg 的旧别名 |
template | yes, no | 是否使用 references/analysis_template.md |
aminer | on, off | 是否显式开启 AMiner 增强 |
保留用户的语言偏好、产物要求、AMiner opt-in、模板请求和 SVG 输出选择。
4. 输入保护
如果没有 PDF 路径、文本路径、粘贴的论文文本、citation contexts、参考文献列表或可用论文证据,提示用户补充输入。不要伪造 analysis.md、json/graph/citation_graph.json、SVG/HTML、citations、references、claims 或 source traces。
5. AMiner Opt-In
只有 aminer: on、用户明确要求 AMiner 增强,或确实无法交互确认并采用推荐 aminer: on fallback 时,才检查 AMINER_API_KEY。绝不打印 token。如果缺少 token,跳过 AMiner 增强;在有本地证据时继续本地分析,并记录跳过原因。
AMiner 只能补充元数据、paper ID、URL、候选参考文献匹配和外部引用关系,不能作为 citation intent 或 source_traces[] 的唯一证据。
6. 输出与执行
如果用户指定 output,使用该目录;否则使用:
outputs/paper-source-trace/<safe-paper-stem>/输出结构:
analysis.md
citation_map.svg
citation_map.html
citation_map_chain.svg # only when svg is both
citation_map_spec.md # only when SVG generation has caveats or fails
json/graph/citation_graph.json
json/aminer/*.json # only when AMiner raw results are saved
json/extraction/*.json # only when structured intermediates are saved只在需要时读取参考文件:references/schema.md、references/evidence_protocol.md、显式模板模式下的 references/analysis_template.md,以及生成 SVG/HTML 前的 references/visual.md。
当 json/graph/citation_graph.json 已存在后,用同一条渲染命令生成 HTML 和已确认的 SVG 输出:
python "${CLAUDE_PLUGIN_ROOT}/scripts/render_html.py" --graph "<output>/json/graph/citation_graph.json" --output "<output>/citation_map.html" --svg "<radial|chain|both>" --language auto渲染器统一负责两种 SVG 模式和 HTML 视图。不要额外生成临场 SVG 布局、无效 cross-link 或中英文混杂标签。
{
"skill_name": "paper-source-trace",
"evals": [
{
"id": 1,
"prompt": "I have pasted extracted text from a paper, including its reference list. Please identify citation intents and create a citation map. Do not use AMiner.",
"expected_output": "Run local evidence-first citation analysis only. Write analysis.md, json/graph/citation_graph.json, citation_map.svg, and citation_map.html when graph data is available. Do not check AMINER_API_KEY and do not call AMiner APIs.",
"files": [],
"expectations": [
"Treats local paper text and citation contexts as the only evidence",
"Does not call AMiner APIs",
"Produces or describes the standard artifact set including SVG and HTML graphs",
"json/graph/citation_graph.json uses English keys and allowed intent labels"
]
},
{
"id": 2,
"prompt": "请根据这篇论文文本做引用意图识别,生成中文 analysis.md 和 citation_graph.json。",
"expected_output": "Use the unified skill. The report, evidence explanations, SVG labels, and HTML UI text should be Chinese, while JSON keys and intent labels remain English.",
"files": [],
"expectations": [
"Chinese user-facing report language",
"English JSON keys",
"Allowed 12 intent labels only",
"Every citation includes intent, evidence, confidence, and reference linkage or unmatched_reference=true"
]
},
{
"id": 3,
"prompt": "Use AMiner enrichment to supplement paper_id, URLs, and citation relationships for this target paper. My token is configured in AMINER_API_KEY.",
"expected_output": "Because AMiner enrichment is explicitly requested, check for AMINER_API_KEY and plan/use the shortest viable API chain. Record AMiner metadata under metadata.aminer_enrichment and output a cost summary.",
"files": [],
"expectations": [
"Checks token existence without printing token",
"Uses or plans paper_search/paper_search_pro, paper_detail, paper_relation, and paper_info as needed",
"Does not treat AMiner metadata as local citation-context evidence",
"Includes cost summary and enrichment caveats"
]
},
{
"id": 4,
"prompt": "请用 AMiner 补全这篇论文的引用链,但我还没有配置 token。",
"expected_output": "Explain that AMiner enrichment cannot run without AMINER_API_KEY, do not call APIs, and continue local citation-intent analysis if paper text or citation contexts are available.",
"files": [],
"expectations": [
"Reports AMINER_API_KEY is missing without exposing secrets",
"Does not call AMiner APIs",
"Continues local analysis when local evidence exists",
"Records enrichment skipped or unavailable in output notes"
]
},
{
"id": 5,
"prompt": "Use the standard template / 固定结构 to produce a citation-intent report for this paper.",
"expected_output": "Read references/analysis_template.md and follow the fixed section order. Do not force missing evidence into template rows. The output checklist should use json/graph/citation_graph.json and include citation_map.html.",
"files": [],
"expectations": [
"Uses the fixed template only because the user explicitly requested it",
"Keeps required sections and tables",
"Writes no-evidence rows as no reliable evidence / 未发现可靠证据",
"Still produces json/graph/citation_graph.json"
]
},
{
"id": 6,
"prompt": "Generate a hybrid expandable knowledge graph for this paper's citations.",
"expected_output": "Treat hybrid as an interactive HTML graph request, not as an SVG mode. Use citation_map.html for the interactive graph. Do not invent a fake static hybrid SVG. If no SVG option is confirmed, ask for svg: radial, chain, or both.",
"files": [],
"expectations": [
"Does not generate a fake hybrid SVG",
"Does not record hybrid as a formal SVG mode",
"Explains that citation_map.html handles interactive graph behavior",
"Still provides json/graph/citation_graph.json",
"Produces or describes citation_map.html as the interactive graph"
]
},
{
"id": 7,
"prompt": "Trace the source lineage for this paper's main method claims. I want to know which cited works the claims depend on, adapt, or contrast with.",
"expected_output": "Run local claim-centered source tracing. Produce the standard artifacts and include source_traces[] in json/graph/citation_graph.json when local citation contexts support the traces.",
"files": [],
"expectations": [
"Keeps analysis.md and json/graph/citation_graph.json as the standard outputs",
"Identifies target-paper claims from supplied paper text",
"Links each source trace to citation_id and reference_id when available",
"Uses source_role values such as foundation, method-origin, method-adaptation, or contrast",
"Does not use AMiner unless explicitly requested"
]
},
{
"id": 8,
"prompt": "请围绕论文的核心贡献做来源追踪,说明每个 claim 是由哪些引用上下文支撑、继承或对比出来的。",
"expected_output": "Generate Chinese claim-to-source trace explanations in analysis.md and citation_map.html while keeping json/graph/citation_graph.json keys, intent labels, relation types, and source_role values in English.",
"files": [],
"expectations": [
"Chinese source-trace explanations in analysis.md",
"English JSON keys and source_role values",
"source_traces[] appears when local citation evidence supports it",
"Each source step has citation_id, reference_id, source_role, intent, relation_type, evidence, and confidence",
"Lowers confidence for weak or noisy citation contexts"
]
},
{
"id": 9,
"prompt": "Use AMiner enrichment to match paper IDs, but build the source trace only from the PDF citation contexts.",
"expected_output": "Because AMiner enrichment is explicitly requested, check AMINER_API_KEY and record metadata, but source_traces[] must be grounded in local citation contexts rather than AMiner-only links.",
"files": [],
"expectations": [
"AMiner is explicit opt-in and token existence is checked without printing secrets",
"metadata.aminer_enrichment records the enrichment chain and cost summary",
"metadata.source_trace records claim-centered trace coverage",
"AMiner IDs and URLs do not justify source_role or intent by themselves",
"Cost confirmation rule still applies at estimated cost >= ¥5"
]
},
{
"id": 10,
"prompt": "This paper claims a surprising result, but the pasted text has no citation sentence for that claim. Please still trace the source.",
"expected_output": "Do not fabricate a source trace. State that no reliable source trace was found for that claim and preserve the uncertainty in analysis.md and json/graph/citation_graph.json notes.",
"files": [],
"expectations": [
"Does not invent citations, references, or source steps",
"Uses No reliable source trace found or 未发现可靠溯源证据 as appropriate",
"Records missing source-trace evidence in coverage notes",
"Still preserves ordinary citation-intent analysis for available evidence",
"Does not report unsupported traces as high confidence"
]
},
{
"id": 11,
"prompt": "Validate that the Paper Source Trace JSON follows the current schema.",
"expected_output": "Use schema version 0.3.0 for json/graph/citation_graph.json. Verify citations still satisfy existing required fields and source_traces[] source_steps link back to citation_id and reference_id when available.",
"files": [],
"expectations": [
"schema_version is 0.3.0",
"Existing citation, reference, entity, relation, and visual_groups fields remain compatible",
"source_traces[] is optional but valid when present",
"metadata.source_trace.strategy is claim-centered when source tracing is performed",
"The 12 citation intent labels are unchanged"
]
},
{
"id": 12,
"prompt": "/paper-source-trace file: papers/demo.pdf output: outputs/paper-source-trace/demo svg: both template: no aminer: off",
"expected_output": "Treat the slash command as an orchestration entry. Read the skill workflow, use the provided file path as the input source when available, write standard artifacts to the requested output directory, save the graph as json/graph/citation_graph.json, generate both SVG modes when possible, generate one citation_map.html with view switching, and do not check AMINER_API_KEY because aminer is off.",
"files": [],
"expectations": [
"Recognizes /paper-source-trace as a valid command entry",
"Parses file, output, svg, template, and aminer fields",
"Produces or describes analysis.md, json/graph/citation_graph.json, citation_map.svg, citation_map.html, and citation_map_chain.svg when possible",
"Does not use the fixed template because template is no",
"Does not check AMINER_API_KEY and does not call AMiner APIs"
]
},
{
"id": 13,
"prompt": "/paper-source-trace",
"expected_output": "If no paper file, pasted text, citation contexts, or reference list are available in the conversation, ask the user to provide input. Do not fabricate analysis.md, json/graph/citation_graph.json, citations, references, claims, source_traces, SVG content, or HTML content.",
"files": [],
"expectations": [
"Recognizes /paper-source-trace as a valid command entry",
"Detects missing input evidence",
"Asks for a PDF, extracted paper text, citation contexts, or reference list",
"Does not invent artifacts or analysis results",
"Does not check AMINER_API_KEY by default"
]
},
{
"id": 14,
"prompt": "/paper-source-trace file: papers/demo.pdf aminer:on 请用中文输出 analysis.md, 但如果没有 token 就继续本地分析。",
"expected_output": "Because aminer:on explicitly requests AMiner enrichment, check whether AMINER_API_KEY exists without printing it. If missing, skip AMiner enrichment, continue local evidence-first analysis when the input file or text is available, and record the skipped enrichment reason.",
"files": [],
"expectations": [
"Parses aminer:on as explicit AMiner opt-in",
"Checks token existence without printing the token value",
"Skips AMiner calls when AMINER_API_KEY is missing",
"Continues local citation intent and source tracing when local evidence is available",
"Chinese analysis.md language with English JSON keys and labels"
]
},
{
"id": 15,
"prompt": "Please use Paper Source Trace on this extracted paper text. Keep the report in English and generate json/graph/citation_graph.json plus SVG/HTML maps.",
"expected_output": "Follow skills/paper-source-trace/SKILL.md. Ask for startup confirmation of svg and aminer before analysis. When confirmed, produce English visible prose in analysis.md, SVG labels, HTML UI text, and final summary while keeping JSON keys, intent labels, relation types, and source roles in English.",
"files": [],
"expectations": [
"Routes to skills/paper-source-trace/SKILL.md",
"Asks for svg and aminer confirmation before analysis",
"English visible output in analysis.md, SVG, HTML, and final prose",
"json/graph/citation_graph.json keeps English keys and stable labels",
"Does not check AMINER_API_KEY unless AMiner is explicitly enabled"
]
},
{
"id": 16,
"prompt": "请使用 Paper Source Trace 分析这篇论文文本,svg: both,输出中文报告和中文图谱标签,但 JSON 字段保持英文。",
"expected_output": "Follow skills/paper-source-trace/SKILL.zh.md. Ask for startup confirmation of svg and aminer before analysis. When confirmed, produce Chinese visible prose in analysis.md, SVG labels, HTML UI text, and final summary while keeping JSON keys, intent labels, relation types, and source roles in English. With svg: both, citation_map_chain.svg uses the Chinese chain layout with 问题链、方法链、数据链、基线链、局限/资源链.",
"files": [],
"expectations": [
"Routes to skills/paper-source-trace/SKILL.zh.md",
"先确认 svg 和 aminer 再开始分析",
"analysis.md、SVG、HTML 和最终说明使用中文可见文本",
"svg: both 时 citation_map_chain.svg 使用问题链、方法链、数据链、基线链、局限/资源链",
"json/graph/citation_graph.json 保持英文 keys 和稳定 labels",
"未显式开启 AMiner 时不检查 AMINER_API_KEY"
]
},
{
"id": 17,
"prompt": "/paper-source-trace file: papers/demo.pdf output: outputs/paper-source-trace/demo mode: all template: no aminer: off",
"expected_output": "Accept legacy mode: all as an alias for svg: both, mention the new preferred svg: both syntax, then follow the normal command workflow after startup confirmation.",
"files": [],
"expectations": [
"Maps mode: all to svg: both",
"Mentions svg: both as the preferred new syntax",
"Generates citation_map.svg and citation_map_chain.svg when graph data and SVG generation are available",
"Generates one citation_map.html with radial and chain view switching when graph data is available",
"Does not treat mode: all as a separate new SVG mode"
]
},
{
"id": 18,
"prompt": "请用 Paper Source Trace 生成中文 citation_map.html,要求图谱节点不要重叠,并且可以缩放和拖动节点。",
"expected_output": "After json/graph/citation_graph.json is available, use scripts/render_html.py to generate citation_map.html. The Chinese HTML UI must use one unified template and Chinese labels, including 径向图, 溯源链图, 搜索, 筛选, 节点详情, 证据, 参考文献, 来源追踪, AMiner 元数据, 缩放, and 重置布局. It must include zoom, pan, draggable citation nodes, reset layout, search, filters, and source trace details.",
"files": [],
"expectations": [
"Uses scripts/render_html.py rather than ad hoc HTML",
"中文 HTML UI 不使用 current、example、Target Paper、Claim hub、Evidence 作为可见控件文案",
"包含缩放、平移、节点拖动和重置布局",
"保持单文件 HTML、内联 CSS、内联 JavaScript、内嵌 graph data",
"不依赖 CDN、外部脚本或本地 HTTP server"
]
},
{
"id": 19,
"prompt": "Generate an English Paper Source Trace HTML graph from an existing citation_graph.json with a stable style.",
"expected_output": "Use scripts/render_html.py to generate citation_map.html from json/graph/citation_graph.json. The English HTML UI must use the unified template and English labels, including Radial, Chain, Search, Filter, Node details, Evidence, Reference, Source traces, AMiner metadata, Zoom, and Reset layout. It must not mix Chinese UI labels into English output.",
"files": [],
"expectations": [
"Uses scripts/render_html.py rather than ad hoc HTML",
"English HTML UI does not use 搜索、筛选、节点详情 as visible controls",
"Does not use current/example as HTML layout button labels",
"Includes zoom, pan, draggable citation nodes, reset layout, search, filters, and source trace details",
"Uses the same CSS and panel structure as other generated HTML maps"
]
},
{
"id": 20,
"prompt": "请从已有 json/graph/citation_graph.json 生成中文 svg: both 和 citation_map.html,要求 SVG 与 HTML 风格一致、不要中英文混杂、线条少一些。",
"expected_output": "Use scripts/render_html.py with --svg both so citation_map.html, citation_map.svg, and citation_map_chain.svg share the same canonical groups, colors, language pack, node priority, text wrapping, overflow summaries, and reduced-edge layout. Chinese radial and chain labels must stay Chinese; chain hubs must be 问题链、方法链、数据链、基线链、局限/资源链.",
"files": [],
"expectations": [
"Uses one renderer command for HTML and both SVG outputs",
"SVG and HTML use the same canonical group colors and labels",
"中文 SVG/HTML 不出现 Target Paper、Problem chain、Evidence 作为可见提示",
"citation_map_chain.svg 使用问题链、方法链、数据链、基线链、局限/资源链",
"Static SVG reduces edge clutter and does not draw citation-to-citation cross-links or AMiner-only relation lines",
"Dense groups use +N overflow summaries while preserving complete records in json/graph/citation_graph.json"
]
},
{
"id": 21,
"prompt": "Generate English radial and chain SVG maps plus citation_map.html from an existing citation_graph.json.",
"expected_output": "Use scripts/render_html.py with --svg both. The English SVG and HTML output must share canonical groups, colors, text wrapping, node ranking, and reduced-edge rules. English chain hubs must be Problem chain, Method chain, Data chain, Baseline chain, and Limits/resources chain.",
"files": [],
"expectations": [
"Uses scripts/render_html.py with --svg both",
"English SVG/HTML do not use 搜索、问题链、节点详情 as visible UI labels",
"Radial and chain layouts use deterministic generous spacing",
"Chain SVG uses only lightweight hub-to-citation and citation-to-target main edges",
"AMiner is shown only as metadata badge, not as evidence edges"
]
},
{
"id": 22,
"prompt": "请从已有 json/graph/citation_graph.json 生成中文 citation_map.html,并在角色、意图、AMiner 元数据和来源追踪步骤旁加入悬浮提示。",
"expected_output": "Use scripts/render_html.py to generate the Chinese citation_map.html. The HTML must include unified ! tooltip circles with hover and keyboard focus support. Tooltip text must be Chinese, include 来源角色推荐值 and AMiner 元数据仅用于补全, and explain that source traces require local citation context evidence.",
"files": [],
"expectations": [
"Uses scripts/render_html.py rather than ad hoc tooltip HTML",
"HTML contains ! tooltip controls with tabindex or equivalent keyboard focus support",
"中文提示包含来源角色推荐值和固定 source_role 推荐值列表",
"中文 AMiner 提示说明 AMiner 元数据仅用于补全,不能替代本地引用上下文证据",
"中文 tooltip 不混用 English UI tooltip text such as Recommended source_role values"
]
},
{
"id": 23,
"prompt": "Generate an English citation_map.html with help tooltips for Role, Intent, Confidence, AMiner metadata, Source traces, Steps, Fit screen, Reset layout, Export SVG, and Filter.",
"expected_output": "Use scripts/render_html.py to generate the English citation_map.html. The HTML must include unified ! tooltip circles with hover and keyboard focus support. Tooltip text must be English, include Recommended source_role values and AMiner metadata only enriches metadata, and explain that confidence is evidence confidence rather than an AMiner match score or model probability.",
"files": [],
"expectations": [
"Uses scripts/render_html.py rather than ad hoc tooltip HTML",
"HTML contains ! tooltip controls with tabindex or equivalent keyboard focus support",
"English tooltip includes Recommended source_role values and the source_role list",
"English AMiner tooltip says AMiner metadata only enriches metadata and cannot replace local citation-context evidence",
"English tooltip output does not use 中文 UI 提示 such as 来源角色推荐值"
]
}
]
}
Paper Source Trace
paper-source-trace 中文说明。英文说明见 README.md。
paper-source-trace 是同一个 Skill 下的双语说明。用户使用英文或未指定中文时使用 SKILL.md;用户主要使用中文或明确要求中文输出时使用 SKILL.zh.md。
快速开始
使用自然语言:
请围绕这篇论文的核心 claim 做来源追踪,识别引用意图,并生成 analysis.md、json/graph/citation_graph.json、citation_map.svg 和 citation_map.html。使用 slash command:
/paper-source-trace file: papers/demo.pdf output: outputs/paper-source-trace/demo svg: both template: no aminer: on开始分析前必须确认 svg 和 aminer。推荐设置为 svg: both 和 aminer: on;如果确实无法交互确认,使用这两个推荐默认值。旧参数 mode: current|example|all 仍兼容,分别映射到 svg: radial|chain|both。如果 AMiner 开启但缺少 token,跳过增强并继续本地分析。
使用场景
当用户提供论文 PDF、抽取后的论文文本、引用上下文或参考文献,并要求以下任务时使用本 Skill:
- 引用意图识别;
- 围绕关键 claim 和贡献做来源追踪;
- 实体与关系抽取;
- 论文贡献图谱;
json/graph/citation_graph.json;- SVG 和 HTML 引用图谱;
- 可选 AMiner 元数据或引用关系增强。
产物
| 产物 | 说明 |
|---|---|
analysis.md | 使用用户输出语言撰写的报告,覆盖引用意图、claim-to-source trace、图谱解读和不确定性 |
json/graph/citation_graph.json | 稳定的机器可读图谱,key、intent label 和可选 source_traces[] 保持英文 |
citation_map.svg | 由 scripts/render_html.py 生成的静态径向图;svg: chain 时为链式图 |
citation_map.html | 有图谱数据时由 scripts/render_html.py 生成的单文件交互图谱 |
citation_map_chain.svg | 仅在 svg: both 时由 scripts/render_html.py 输出的链式来源追踪 SVG |
citation_map_spec.md | SVG 无法干净生成时的降级说明 |
SVG 和 HTML 图谱使用同一个固定渲染器,共享 canonical groups、配色、语言包、节点排序、文字换行和减少边线布局。HTML 额外包含 radial/chain 布局切换、搜索、筛选、缩放、平移、可拖动 citation 节点、重置布局、节点详情、来源追踪,以及用于解释角色、意图、置信度、AMiner 元数据和 trace steps 的内置 hover/focus ! 提示。
AMiner 规则
AMiner 是可选增强。本地来源追踪不需要 AMiner token 或 AMINER_API_KEY。
只有用户明确要求时才使用 AMiner,例如 aminer:on、AMiner 增强、用 AMiner 补全、查 AMiner 引用链 或 enhance with AMiner。
AMiner 只能补充 ID、URL、候选参考文献和外部引用元数据,不能替代本地 citation context,也不能单独证明 citation intent 或 source_traces[]。
Token 配置
下面的仓库配置工具仅面向 Claude Code、Codex 等对话式 Skill 使用场景。它们会为这些会话使用的本地用户环境配置 AMINER_API_KEY。
Windows 可运行:
.\tools\setup-aminer-token.cmdmacOS/Linux 可运行:
./tools/setup-aminer-token.sh检查 token 状态时不会打印 token:
.\tools\setup-aminer-token.ps1 -Status这些工具不会配置 OpenClaw 命令运行、独立 CLI 任务、CI、定时任务或其他命令运行环境。这些环境需要在各自运行上下文中额外配置 AMINER_API_KEY。如果宿主环境使用 OpenClaw 风格配置,也可以在 Skill 外配置环境变量:
openclaw config set env.vars.AMINER_API_KEY "<YOUR_TOKEN>"不要提交真实 token、包含 token 的截图,或打印 token 的日志。
参数
| 参数 | 取值 | 默认值 | 说明 |
|---|---|---|---|
file | PDF 或文本路径 | 无 | 输入论文、抽取文本、引用上下文或参考文献 |
output | 输出目录 | outputs/paper-source-trace/<safe-paper-stem>/ | 输出根目录;JSON 产物进入 json/graph/、json/aminer/ 和 json/extraction/ |
svg | radial, chain, both | 先确认;无法确认时为 both | 静态 SVG 输出 |
mode | current, example, all | 无 | 旧别名:current -> radial、example -> chain、all -> both |
template | yes, no | no | 仅在明确要求时使用固定 analysis.md 模板 |
aminer | on, off | 先确认;无法确认时为 on | 启用 AMiner 增强或无法确认并采用推荐默认值时检查 AMINER_API_KEY |
参考文件
references/schema.md:规范citation_graph.jsonschema,保存位置为json/graph/citation_graph.json。references/evidence_protocol.md:证据链和不确定性规则。references/prompts.md:中英文抽取与审查 prompts。references/visual.md:SVG 和 HTML 图谱布局规则。references/analysis_template.md:显式模板请求使用的中英文固定报告模板。scripts/render_html.py:稳定生成citation_map.html、citation_map.svg和citation_map_chain.svg的标准渲染器。
Paper Source Trace
English guide for paper-source-trace. For Chinese, see README_zh.md.
paper-source-trace is one Skill with separate English and Chinese instruction files. Use SKILL.md when the user writes in English or does not request Chinese. Use SKILL.zh.md when the user mainly writes in Chinese or explicitly asks for Chinese output.
Quick Start
Use natural language:
Please trace this paper's main claims, identify citation intents, and generate analysis.md, json/graph/citation_graph.json, citation_map.svg, and citation_map.html.Use the slash command:
/paper-source-trace file: papers/demo.pdf output: outputs/paper-source-trace/demo svg: both template: no aminer: onBefore analysis begins, confirm svg and aminer. Recommended settings are svg: both and aminer: on; if interactive confirmation is genuinely impossible, use those recommended defaults. Legacy mode: current|example|all remains accepted as an alias for svg: radial|chain|both. If AMiner is on but the token is missing, skip enrichment and continue local analysis.
Use Cases
Use this Skill when a user provides a paper PDF, extracted paper text, citation contexts, or references and asks for:
- citation intent extraction;
- claim-to-source tracing for key claims and contributions;
- entity and relation extraction;
- paper contribution mapping;
json/graph/citation_graph.json;- SVG and HTML citation maps;
- optional AMiner metadata or citation-relation enrichment.
Outputs
| Output | Description |
|---|---|
analysis.md | Report in the user's output language, covering citation intent groups, claim-to-source traces, graph interpretation, and uncertainty |
json/graph/citation_graph.json | Stable machine-readable graph with English keys, allowed intent labels, and optional source_traces[] |
citation_map.svg | Static radial map, or chain map when svg: chain, generated by scripts/render_html.py |
citation_map.html | Single-file interactive graph generated by scripts/render_html.py when graph data is available |
citation_map_chain.svg | Extra chain-style SVG generated by scripts/render_html.py only when svg: both |
citation_map_spec.md | Fallback notes when SVG cannot be generated cleanly |
SVG and HTML maps use the same fixed renderer, canonical groups, colors, language pack, node ranking, text wrapping, and reduced-edge layout. HTML also includes radial/chain switching, search, filters, zoom, pan, draggable citation nodes, reset layout, node details, source traces, and built-in hover/focus ! tooltips for roles, intents, confidence, AMiner metadata, and source trace steps.
AMiner Policy
AMiner is optional. Local source tracing does not require an AMiner token or AMINER_API_KEY.
AMiner enrichment is used only when explicitly requested with phrases such as aminer:on, enhance with AMiner, or use AMiner metadata.
When enabled, AMiner may enrich IDs, URLs, candidate references, and external cited-paper metadata. It must not replace local citation contexts or justify citation-intent labels or source_traces[] by itself.
Token Setup
The repository helpers below are intended for Claude Code, Codex, and other conversational Skill sessions. They configure AMINER_API_KEY for the local user environment used by those sessions.
On Windows, run:
.\tools\setup-aminer-token.cmdOn macOS/Linux, run:
./tools/setup-aminer-token.shCheck token status without printing the token:
.\tools\setup-aminer-token.ps1 -StatusThey do not configure OpenClaw command runs, standalone CLI jobs, CI, scheduled jobs, or other command-run environments. Those environments must configure AMINER_API_KEY in their own runtime context. For OpenClaw-style configuration, configure the environment variable outside the Skill:
openclaw config set env.vars.AMINER_API_KEY "<YOUR_TOKEN>"Never commit real tokens, screenshots containing tokens, or logs that print tokens.
Parameters
| Parameter | Values | Default | Description |
|---|---|---|---|
file | PDF or text path | none | Input paper, extracted text, citation contexts, or reference list |
output | output directory | outputs/paper-source-trace/<safe-paper-stem>/ | Output root; JSON artifacts go under json/graph/, json/aminer/, and json/extraction/ |
svg | radial, chain, both | confirm first; fallback both | Static SVG output |
mode | current, example, all | none | Legacy alias: current -> radial, example -> chain, all -> both |
template | yes, no | no | Use fixed analysis.md template only when requested |
aminer | on, off | confirm first; fallback on | Check AMINER_API_KEY when AMiner enrichment is enabled or confirmation is impossible |
References
references/schema.md: canonicalcitation_graph.jsonschema saved asjson/graph/citation_graph.json.references/evidence_protocol.md: evidence and uncertainty policy.references/prompts.md: English and Chinese extraction/review prompts.references/visual.md: SVG and HTML graph layout rules.references/analysis_template.md: fixed English and Chinese report templates for explicit template requests.scripts/render_html.py: standard renderer for stablecitation_map.html,citation_map.svg, andcitation_map_chain.svg.
Fixed analysis.md Templates / 固定 analysis.md 模板
Use this file only when the user explicitly requests a template, compliance format, standard format, or fixed structure.
只有用户明确要求模板、规范格式、标准格式或固定结构时,才使用本文件。
Language Routing / 语言路由
- Use the English template when the user writes in English or does not request Chinese output.
- Use the Chinese template when the user mainly writes in Chinese or explicitly asks for Chinese output.
- Keep JSON field names, intent labels, relation types, and source roles in English.
- 用户主要使用中文或明确要求中文输出时,使用中文模板。
- 其他情况使用英文模板。
- JSON 字段名、intent label、relation type 和 source role 始终保持英文。
Do not invent citations to fill a section. If no reliable evidence supports an intent or row, write No reliable evidence found or 未发现可靠证据, matching the output language.
不要为了填满模板而编造引用。如果某一项没有可靠证据,按输出语言写 No reliable evidence found 或 未发现可靠证据。
English Template
# Citation Intent Analysis: <paper_title>
## 1. Overall Conclusion
- Target paper:
- Citation structure judgment:
- Citation chains worth reading first:
- Main uncertainty:
## 2. Target Paper Core Content
| Item | Content |
| --- | --- |
| Research problem | |
| Core method | |
| Data / benchmark | |
| Main result | |
| Limitation | |
## 3. Citation Intent Overview
| Intent label | Count | Representative references | Role in understanding the paper |
| --- | ---: | --- | --- |
## 4. Intent-Grouped Citation Analysis
### 4.x `<intent>`: <display label>
| Item | Content |
| --- | --- |
| Judgment basis | |
| Key citations | |
| Evidence anchors | |
| Role in the paper's argument | |
| Uncertainty | |
Repeat only for intents with reliable evidence. Summarize absent expected intents briefly instead of fabricating citations.
## 5. Core Method Citation Chain
| Method component | Supporting reference | Borrowed idea | Role in this paper | Evidence and uncertainty |
| --- | --- | --- | --- | --- |
## 6. Claim-to-Source Trace
| Target claim | Claim type | Source role | Supporting citation / reference | Evidence anchor | Confidence and uncertainty |
| --- | --- | --- | --- | --- | --- |
For key claims with reliable evidence, explain the reading path from target-paper claim to cited source. If a claim has no citation-backed trace, write `No reliable source trace found`.
## 7. Dataset, Metric, and Baseline Citations
| Evaluation target | Dataset / metric / baseline | Supporting reference | Role in result interpretation | Evidence and uncertainty |
| --- | --- | --- | --- | --- |
## 8. Entity and Relation Graph Interpretation
- Main entities:
- Main relations:
- Recommended reading path through `citation_map.html` or `citation_map.svg`:
- AMiner enrichment impact, if any:
## 9. Coverage, Noise, and Uncertainty
- Coverage:
- Missing or noisy evidence:
- Reference matching caveats:
- Source trace coverage:
- AMiner enrichment caveats:
- SVG generation status:
## 10. Output File Checklist
| File | Status | Notes |
| --- | --- | --- |
| `analysis.md` | Generated | Report in the requested language |
| `json/graph/citation_graph.json` | Generated | Must parse as JSON; includes `source_traces[]` when trace evidence exists |
| `citation_map.svg` | Generated / not generated | Static citation map |
| `citation_map.html` | Generated / not generated | Single-file interactive graph |
| `citation_map_chain.svg` | Generated / not used | Only for `svg: both` |
| `citation_map_spec.md` | Optional / not used | Fallback if SVG generation fails |中文模板
# 引用意图与论文来源追踪分析:<paper_title>
## 1. 总体结论
- 目标论文:
- 引用结构判断:
- 最值得优先阅读的引用链:
- 主要不确定性:
## 2. 目标论文核心内容
| 项目 | 内容 |
| --- | --- |
| 研究问题 | |
| 核心方法 | |
| 数据 / 基准 | |
| 主要结果 | |
| 局限性 | |
## 3. 引用意图概览
| Intent label | 数量 | 代表性参考文献 | 对理解论文的作用 |
| --- | ---: | --- | --- |
## 4. 按意图分组的引用分析
### 4.x `<intent>`:<中文显示标签>
| 项目 | 内容 |
| --- | --- |
| 判断依据 | |
| 关键引用 | |
| 证据锚点 | |
| 在论文论证中的作用 | |
| 不确定性 | |
只对有可靠证据的 intent 分组展开。对缺失但预期存在的意图,简要说明证据不足,不要编造引用。
## 5. 核心方法引用链
| 方法组件 | 支撑参考文献 | 借鉴内容 | 在本文中的作用 | 证据与不确定性 |
| --- | --- | --- | --- | --- |
## 6. Claim-to-Source Trace
| 目标 claim | Claim type | Source role | 支撑 citation / reference | 证据锚点 | 置信度与不确定性 |
| --- | --- | --- | --- | --- | --- |
对有可靠证据的关键 claim,说明从目标论文 claim 到被引来源的阅读路径。若某个 claim 没有 citation-backed trace,写 `未发现可靠溯源证据`。
## 7. Dataset、Metric 与 Baseline 引用
| 评估对象 | Dataset / metric / baseline | 支撑参考文献 | 对结果解释的作用 | 证据与不确定性 |
| --- | --- | --- | --- | --- |
## 8. 实体与关系图谱解读
- 主要实体:
- 主要关系:
- 建议通过 `citation_map.html` 或 `citation_map.svg` 阅读的路径:
- AMiner 增强影响,如有:
## 9. 覆盖范围、噪声与不确定性
- 覆盖范围:
- 缺失或噪声证据:
- 参考文献匹配风险:
- Source trace 覆盖情况:
- AMiner 增强限制:
- SVG 生成状态:
## 10. 输出文件检查表
| 文件 | 状态 | 说明 |
| --- | --- | --- |
| `analysis.md` | 已生成 | 使用请求语言撰写的报告 |
| `json/graph/citation_graph.json` | 已生成 | 必须可解析为 JSON;有 trace 证据时包含 `source_traces[]` |
| `citation_map.svg` | 已生成 / 未生成 | 静态引用图谱 |
| `citation_map.html` | 已生成 / 未生成 | 单文件交互图谱 |
| `citation_map_chain.svg` | 已生成 / 未使用 | 仅用于 `svg: both` |
| `citation_map_spec.md` | 可选 / 未使用 | SVG 生成失败时的降级说明 |Quality Rules / 质量规则
- Keep the section order in the selected language.
- Preserve all records in
json/graph/citation_graph.json; the Markdown report may summarize dense groups. - Each intent group must explain how the group supports the target paper's problem, method, experiment, or limitation.
- Each source trace must connect a target-paper claim to local citation evidence and a cited-source role.
- AMiner-enriched metadata must be labeled as metadata, not as local citation evidence.
- 按所选语言保持章节顺序。
json/graph/citation_graph.json必须保留完整记录,Markdown 报告可以概括密集分组。- 每个 intent 分组都要说明其如何支撑目标论文的问题、方法、实验或局限。
- 每条 source trace 必须把目标论文 claim 连接到本地引用证据和被引来源角色。
- AMiner 增强元数据必须标注为 metadata,不能写成本地 citation evidence。
Evidence Protocol / 证据协议
Use this protocol before writing analysis.md and before finalizing json/graph/citation_graph.json.
在写入 analysis.md 和最终确定 json/graph/citation_graph.json 前,使用本协议。
Language Routing / 语言路由
- Use the English rules when the user writes in English or does not request Chinese output.
- Use the Chinese rules when the user mainly writes in Chinese or explicitly asks for Chinese output.
- Keep JSON keys, intent labels, relation types, source roles, and IDs in English.
- 用户主要使用中文或明确要求中文输出时,使用中文规则。
- 其他情况使用英文规则。
- JSON key、intent label、relation type、source role 和 ID 保持英文。
English Rules
Evidence Sources
Use only:
- supplied PDF text;
- extracted paper text;
- citation contexts;
- reference entries;
- user-provided notes;
- explicitly requested AMiner metadata or citation relationships.
Do not fill gaps with domain memory, plausible bibliography guesses, or AMiner-only citation links.
Evidence Anchors
For each important citation, capture as many anchors as possible:
| Anchor | Meaning |
|---|---|
citation_context | Local sentence or short paragraph where the citation appears |
section | Target paper section or nearby heading |
target_claim | Target-paper claim, method choice, dataset choice, or result interpretation supported by the citation |
cited_work_role | Role of the cited work, such as problem origin, method component, dataset source, baseline, tool, theory, result evidence, or limitation |
intent_rationale | Why this citation belongs to its selected intent label instead of a nearby label |
confidence_reason | Why confidence is high, medium, or low |
Claim-Centered Source Tracing
Use source tracing to answer: which cited sources support, motivate, supply, contrast, or limit a target-paper claim?
For each important claim or contribution:
1. Identify the claim from the target paper text, not outside memory. 2. Link the claim to one or more local citation contexts. 3. Assign each cited source a source_role, such as foundation, method-origin, method-adaptation, dataset-source, metric-source, baseline-comparison, evidence-support, contrast, limitation-source, or future-direction. 4. Explain how the cited source supports the claim using visible evidence. 5. Record uncertainty when the claim is clear but the citation context is weak, noisy, or indirect.
Build source_traces[] only when at least one local citation context supports the trace. AMiner metadata can enrich IDs, URLs, and candidate matches, but cannot by itself prove a claim-to-source relationship.
Citation Context Rules
- Prefer citation sentences and adjacent context over abstract-level summaries.
- Preserve
citation_sentenceandcontextin the target paper's original language. Do not translate, paraphrase, or localize them. - Use the output language only for explanation fields such as
evidence,intent_rationale,confidence_reason,summary, andnotes. - If a citation appears only in a table, figure caption, or noisy PDF extraction, mark the noise in
notes. - If the cited title or reference entry cannot be matched reliably, use
unmatched_reference: true. - Do not copy long source passages into
analysis.md; summarize evidence and keep short anchors. - AMiner metadata can improve reference matching but cannot create local citation evidence.
Confidence Policy
| Level | Range | Use when |
|---|---|---|
| high | 0.80-1.00 | Citation sentence, reference match, and target claim are all clear |
| medium | 0.55-0.79 | Intent is likely but section context, reference match, or cited-work role is incomplete |
| low | 0.10-0.54 | Evidence is noisy, table-derived, ambiguous, or weakly connected |
Do not use high confidence when only the reference title or AMiner metadata is known but the local citation context is missing.
No-Evidence Handling
If an expected intent, method chain, dataset link, or baseline link has no reliable evidence, write No reliable evidence found.
If a target-paper claim has no reliable citation-backed source trace, write No reliable source trace found.
When generating analysis.md, explicitly distinguish evidence-backed conclusions, plausible but uncertain interpretations, missing/noisy evidence, AMiner metadata enrichment, and claim-to-source traces supported by local citation contexts.
中文规则
证据来源
只能使用:
- 用户提供的 PDF 文本;
- 抽取后的论文文本;
- citation contexts;
- reference entries;
- 用户提供的笔记;
- 用户明确要求的 AMiner 元数据或引用关系。
不要用领域记忆、看似合理的参考文献猜测,或仅来自 AMiner 的引用链接来补证据缺口。
证据锚点
对每条重要 citation,尽量记录以下锚点:
| 锚点 | 含义 |
|---|---|
citation_context | citation 出现处的本地句子或短段落 |
section | 目标论文中的章节或附近标题 |
target_claim | 该 citation 支撑的目标论文 claim、方法选择、数据集选择或结果解释 |
cited_work_role | 被引工作的角色,例如问题来源、方法组件、数据集来源、baseline、tool、theory、result evidence 或 limitation |
intent_rationale | 为什么该 citation 属于所选 intent label,而不是相近标签 |
confidence_reason | 为什么置信度是 high、medium 或 low |
以 Claim 为中心的来源追踪
Source tracing 回答的问题是:哪些被引来源支撑、启发、提供、对比或限制了目标论文中的某个 claim?
对每个重要 claim 或 contribution:
1. 从目标论文文本中识别 claim,不从外部记忆中补充。 2. 将 claim 连接到一个或多个本地 citation contexts。 3. 给每个被引来源分配 source_role,例如 foundation、method-origin、method-adaptation、dataset-source、metric-source、baseline-comparison、evidence-support、contrast、limitation-source 或 future-direction。 4. 用可见证据解释该被引来源如何支撑 claim。 5. 如果 claim 清楚但 citation context 弱、噪声大或关系间接,记录不确定性。
只有至少一个本地 citation context 支撑 trace 时,才构建 source_traces[]。AMiner 元数据可以补充 ID、URL 和候选匹配,但不能单独证明 claim-to-source 关系。
Citation Context 规则
- 优先使用 citation sentence 和邻近上下文,而不是摘要级概括。
citation_sentence和context必须保留目标论文原文语言,不要翻译、意译或按用户语言改写。- 只有
evidence、intent_rationale、confidence_reason、summary和notes等解释性字段跟随输出语言。 - 如果 citation 只出现在表格、图注或噪声 PDF 抽取结果中,在
notes中说明噪声。 - 如果被引标题或参考文献条目无法可靠匹配,使用
unmatched_reference: true。 - 不要在
analysis.md中复制长段原文;应概括证据并保留短锚点。 - AMiner 元数据可以改善 reference matching,但不能创造本地 citation evidence。
置信度策略
| 等级 | 范围 | 使用条件 |
|---|---|---|
| high | 0.80-1.00 | citation sentence、reference match 和 target claim 都清楚 |
| medium | 0.55-0.79 | intent 较可能成立,但章节上下文、reference match 或 cited-work role 不完整 |
| low | 0.10-0.54 | 证据有噪声、来自表格、语义模糊或连接较弱 |
如果只有参考文献标题或 AMiner 元数据,而缺少本地 citation context,不要给 high confidence。
无证据处理
如果预期的 intent、方法链、数据集链接或 baseline 链接没有可靠证据,写 未发现可靠证据。
如果某个目标论文 claim 没有 citation-backed source trace,写 未发现可靠溯源证据。
生成 analysis.md 时,明确区分:有证据支撑的结论、合理但不确定的解释、缺失或噪声证据、不能证明 intent 的 AMiner 元数据增强,以及由本地 citation context 支撑的 claim-to-source traces。
Shared JSON Note / 共享 JSON 说明
When generating json/graph/citation_graph.json, preserve uncertainty in notes, intent_rationale, confidence_reason, or source_traces[].notes.
生成 json/graph/citation_graph.json 时,在 notes、intent_rationale、confidence_reason 或 source_traces[].notes 中保留不确定性。
LLM Prompt Reference / LLM Prompt 参考
Use these prompts when the workflow needs LLM-assisted extraction. Replace placeholders before use.
当工作流需要 LLM 辅助抽取时使用这些 prompts。使用前替换占位符。
Language Routing / 语言路由
- Use the English prompts when the user writes in English or does not request Chinese output.
- Use the Chinese prompts when the user mainly writes in Chinese or explicitly asks for Chinese output.
- Keep
json/graph/citation_graph.jsonkeys, intent labels, relation types, source roles, and IDs in English. - Write explanations in
{{output_language}}. - 用户主要使用中文或明确要求中文输出时,使用中文 prompts。
- 其他情况使用英文 prompts。
json/graph/citation_graph.json的 key、intent label、relation type、source role 和 ID 保持英文。- 解释性文本使用
{{output_language}}。
English Prompts
System Prompt
You are an academic paper analysis assistant. Extract citation intents, claim-centered source traces, entities, and relations from one target paper.
Rules:
1. Use only the supplied target paper text, citation contexts, reference list, user notes, and explicitly requested AMiner metadata.
2. Use only the allowed intent labels.
3. Ground every citation intent in a citation sentence, local context, section name, or reference entry.
4. AMiner metadata may enrich IDs and URLs but cannot replace citation context evidence.
5. Ground every source trace in at least one local citation context; AMiner metadata alone cannot prove a trace.
6. If evidence is weak, lower confidence and explain uncertainty in {{output_language}}.
7. Keep JSON keys and labels in English.
8. Keep `citation_sentence` and `context` in the target paper's source language; do not translate them to {{output_language}}.
9. Output a complete object that can be saved as json/graph/citation_graph.json after validation.Citation Extraction Prompt
Task: Extract citation records from the target paper text.
Output language for evidence and explanations: {{output_language}}
Allowed intent labels:
background, problem, core-method, supporting-method, dataset, metric, baseline, tool-resource, theory, result-evidence, limitation, future-work
Return JSON only with this shape:
{
"citations": [
{
"citation_id": "cit-001",
"reference_id": "ref-001 or null",
"unmatched_reference": false,
"marker": "citation marker",
"section": "section name",
"citation_sentence": "exact source-language citation sentence",
"context": "short source-language local context",
"intent": "one allowed label",
"confidence": 0.0,
"evidence": "grounded explanation in output language",
"target_claim": "claim supported by this citation, or unknown",
"cited_work_role": "role of the cited work, or unknown",
"intent_rationale": "why this label fits",
"confidence_reason": "why confidence is high, medium, or low",
"secondary_intents": [],
"entity_ids": [],
"coarse_intent": "background/method/result"
}
]
}Source Trace Extraction Prompt
Task: Build claim-centered source traces from the target paper.
Use only target-paper claims, citation records, reference entries, and explicitly requested AMiner metadata. AMiner metadata may enrich IDs and URLs, but cannot be the sole evidence for a trace.
Output language for summaries, evidence, and notes: {{output_language}}
Allowed claim_type values:
problem, method, dataset, evaluation, result, limitation, future-work, contribution
Recommended source_role values:
foundation, method-origin, method-adaptation, dataset-source, metric-source, baseline-comparison, evidence-support, contrast, limitation-source, future-direction
<target_paper_summary>
{{target_paper_summary}}
</target_paper_summary>
<citations>
{{citations_json}}
</citations>
<references>
{{references_json}}
</references>
Return JSON only:
{
"source_traces": [
{
"trace_id": "trace-001",
"claim_id": "claim-001",
"target_claim": "target-paper claim being traced",
"claim_type": "method",
"summary": "claim-to-source trace summary in output language",
"source_steps": [
{
"citation_id": "cit-001",
"reference_id": "ref-001 or null",
"source_role": "foundation",
"intent": "one allowed citation intent label",
"relation_type": "uses-method",
"evidence": "grounded explanation from local citation context",
"confidence": 0.0
}
],
"confidence": 0.0,
"notes": "uncertainty, missing evidence, or AMiner metadata caveat"
}
],
"metadata": {
"source_trace": {
"enabled": true,
"strategy": "claim-centered",
"claims_traced_count": 0,
"source_steps_count": 0,
"coverage_notes": "coverage summary"
}
}
}Entity and Relation Prompt
Task: Convert citation records into graph entities and relations.
Use only evidence from citation records and target paper summary.
Output language for descriptions and evidence: {{output_language}}
<citations>
{{citations_json}}
</citations>
Return JSON only:
{
"entities": [
{
"entity_id": "ent-001",
"name": "surface name",
"type": "problem/method/component/dataset/metric/task/baseline/tool-resource/theory/result/limitation/future-work",
"description": "grounded description",
"source_citation_ids": ["cit-001"]
}
],
"relations": [
{
"relation_id": "rel-001",
"source_id": "target-paper",
"target_id": "ent-001",
"relation_type": "uses-method",
"intent": "one allowed intent label or null",
"evidence": "grounded explanation"
}
]
}Graph Grouping Prompt
Task: Group graph nodes for a static citation map.
Use deterministic groups. Labels should be in {{output_language}}.
<citation_graph>
{{citation_graph_json}}
</citation_graph>
Return JSON only:
{
"visual_groups": [
{
"group_id": "method-core",
"label": "display label",
"intent_filters": ["core-method", "supporting-method", "tool-resource"],
"node_ids": ["cit-001", "ent-001"],
"color": "#ef5b45"
}
]
}JSON Repair Prompt
Repair the following JSON so that it follows the citation graph schema.
Rules:
1. Return JSON only.
2. Do not invent new citations, references, entities, or labels.
3. Preserve uncertainty notes.
4. Keep intent labels in the allowed list.
5. Ensure every citation has intent, evidence, confidence, and reference_id or unmatched_reference=true.
<broken_json>
{{broken_json}}
</broken_json>Quality Review Prompt
Task: Review the citation graph for schema and grounding problems.
Check:
1. Every citation has intent, evidence, confidence, and reference_id or unmatched_reference=true.
2. Every intent is allowed.
3. Every entity is supported by at least one citation.
4. AMiner metadata is not used as intent evidence by itself.
5. Every source trace is supported by at least one local citation context and links to citation_id/reference_id when available.
6. AMiner metadata is not used as the sole evidence for source_traces.
7. Weak, noisy, or table-derived evidence is not reported as high confidence.
8. visual_groups and show_on_map cues are sufficient for SVG or a deterministic fallback.
Return a concise issue list in {{output_language}}.中文 Prompts
System Prompt
你是学术论文分析助手。请从一篇目标论文中抽取 citation intents、claim-centered source traces、entities 和 relations。
规则:
1. 只使用提供的目标论文文本、citation contexts、参考文献列表、用户笔记,以及用户明确要求的 AMiner 元数据。
2. 只使用允许的 intent labels。
3. 每个 citation intent 都必须由 citation sentence、本地上下文、章节名或参考文献条目支撑。
4. AMiner 元数据可以补充 ID 和 URL,但不能替代 citation context evidence。
5. 每条 source trace 至少要由一个本地 citation context 支撑;AMiner 元数据不能单独证明 trace。
6. 如果证据较弱,降低 confidence,并用 {{output_language}} 解释不确定性。
7. JSON keys 和 labels 保持英文。
8. `citation_sentence` 和 `context` 保留目标论文原文语言,不要翻译为 {{output_language}}。
8. 输出一个完整对象,验证后可保存为 json/graph/citation_graph.json。Citation Extraction Prompt
任务:从目标论文文本中抽取 citation records。
证据和解释的输出语言:{{output_language}}
允许的 intent labels:
background, problem, core-method, supporting-method, dataset, metric, baseline, tool-resource, theory, result-evidence, limitation, future-work
只返回 JSON,结构如下:
{
"citations": [
{
"citation_id": "cit-001",
"reference_id": "ref-001 or null",
"unmatched_reference": false,
"marker": "citation marker",
"section": "section name",
"citation_sentence": "exact source-language citation sentence",
"context": "short source-language local context",
"intent": "one allowed label",
"confidence": 0.0,
"evidence": "grounded explanation in output language",
"target_claim": "claim supported by this citation, or unknown",
"cited_work_role": "role of the cited work, or unknown",
"intent_rationale": "why this label fits",
"confidence_reason": "why confidence is high, medium, or low",
"secondary_intents": [],
"entity_ids": [],
"coarse_intent": "background/method/result"
}
]
}Source Trace Extraction Prompt
任务:从目标论文中构建以 claim 为中心的 source traces。
只使用目标论文 claims、citation records、reference entries 和用户明确要求的 AMiner 元数据。AMiner 元数据可以补充 ID 和 URL,但不能作为 trace 的唯一证据。
summary、evidence 和 notes 的输出语言:{{output_language}}
允许的 claim_type values:
problem, method, dataset, evaluation, result, limitation, future-work, contribution
推荐 source_role values:
foundation, method-origin, method-adaptation, dataset-source, metric-source, baseline-comparison, evidence-support, contrast, limitation-source, future-direction
<target_paper_summary>
{{target_paper_summary}}
</target_paper_summary>
<citations>
{{citations_json}}
</citations>
<references>
{{references_json}}
</references>
只返回 JSON:
{
"source_traces": [
{
"trace_id": "trace-001",
"claim_id": "claim-001",
"target_claim": "target-paper claim being traced",
"claim_type": "method",
"summary": "claim-to-source trace summary in output language",
"source_steps": [
{
"citation_id": "cit-001",
"reference_id": "ref-001 or null",
"source_role": "foundation",
"intent": "one allowed citation intent label",
"relation_type": "uses-method",
"evidence": "grounded explanation from local citation context",
"confidence": 0.0
}
],
"confidence": 0.0,
"notes": "uncertainty, missing evidence, or AMiner metadata caveat"
}
],
"metadata": {
"source_trace": {
"enabled": true,
"strategy": "claim-centered",
"claims_traced_count": 0,
"source_steps_count": 0,
"coverage_notes": "coverage summary"
}
}
}Entity and Relation Prompt
任务:将 citation records 转换为 graph entities 和 relations。
只使用 citation records 和目标论文摘要中的证据。
description 和 evidence 的输出语言:{{output_language}}
<citations>
{{citations_json}}
</citations>
只返回 JSON:
{
"entities": [
{
"entity_id": "ent-001",
"name": "surface name",
"type": "problem/method/component/dataset/metric/task/baseline/tool-resource/theory/result/limitation/future-work",
"description": "grounded description",
"source_citation_ids": ["cit-001"]
}
],
"relations": [
{
"relation_id": "rel-001",
"source_id": "target-paper",
"target_id": "ent-001",
"relation_type": "uses-method",
"intent": "one allowed intent label or null",
"evidence": "grounded explanation"
}
]
}Graph Grouping Prompt
任务:为静态 citation map 对图节点分组。
使用确定性分组。可见 label 使用 {{output_language}}。
<citation_graph>
{{citation_graph_json}}
</citation_graph>
只返回 JSON:
{
"visual_groups": [
{
"group_id": "method-core",
"label": "display label",
"intent_filters": ["core-method", "supporting-method", "tool-resource"],
"node_ids": ["cit-001", "ent-001"],
"color": "#ef5b45"
}
]
}JSON Repair Prompt
请修复下面的 JSON,使其符合 citation graph schema。
规则:
1. 只返回 JSON。
2. 不要编造新的 citations、references、entities 或 labels。
3. 保留不确定性说明。
4. intent labels 必须属于允许列表。
5. 确保每条 citation 都有 intent、evidence、confidence,并且有 reference_id 或 unmatched_reference=true。
<broken_json>
{{broken_json}}
</broken_json>Quality Review Prompt
任务:审查 citation graph 是否存在 schema 或证据支撑问题。
检查:
1. 每条 citation 都有 intent、evidence、confidence,并且有 reference_id 或 unmatched_reference=true。
2. 每个 intent 都属于允许列表。
3. 每个 entity 至少由一条 citation 支撑。
4. AMiner 元数据没有被单独用作 intent evidence。
5. 每条 source trace 至少由一个本地 citation context 支撑,并在可用时链接到 citation_id/reference_id。
6. AMiner 元数据没有作为 source_traces 的唯一证据。
7. 弱证据、噪声证据或表格来源证据没有被报告为 high confidence。
8. visual_groups 和 show_on_map 信息足以支持 SVG 或确定性 fallback。
用 {{output_language}} 返回简洁问题列表。Citation Graph Schema / 引用图谱 Schema
This file defines the canonical citation_graph.json structure for paper-source-trace.
Operational note: save the canonical graph as json/graph/citation_graph.json. Save it even when SVG or HTML generation fails. Raw AMiner responses and structured extraction intermediates, when retained, should live under json/aminer/ and json/extraction/.
本文件定义 paper-source-trace 的规范 citation_graph.json 结构。规范图谱必须保存为 json/graph/citation_graph.json;即使 SVG 或 HTML 生成失败,也要保存该 JSON。保留 AMiner 原始响应或结构化抽取中间结果时,分别放入 json/aminer/ 和 json/extraction/。
Language Routing / 语言路由
- Use English field explanations when the user uses English or does not request Chinese output.
- Use Chinese field explanations when the user mainly uses Chinese or explicitly requests Chinese output.
- JSON keys, intent labels, relation types, source roles, IDs, and file paths remain English in both languages.
- 用户使用英文或未要求中文输出时,使用英文字段说明。
- 用户主要使用中文或明确要求中文输出时,使用中文字段说明。
- 无论输出语言如何,JSON key、intent label、relation type、source role、ID 和文件路径都保持英文。
Top-Level Object / 顶层对象
{
"schema_version": "0.3.0",
"paper": {},
"references": [],
"citations": [],
"source_traces": [],
"entities": [],
"relations": [],
"visual_groups": [],
"metadata": {}
}paper
Required fields / 必需字段:
| Field | Type | Description / 说明 |
|---|---|---|
paper_id | string | Stable local ID, usually target-paper / 稳定本地 ID,通常为 target-paper |
title | string | Target paper title; use unknown if unavailable / 目标论文标题;不可得时用 unknown |
authors | array[string] | Authors when available / 可获得时填写作者 |
year | string or number | Publication year when available / 可获得时填写发表年份 |
abstract | string | Abstract or concise summary / 摘要或简明概述 |
core_contributions | array[string] | Main contributions grounded in target paper text / 基于目标论文文本的主要贡献 |
Optional AMiner fields / 可选 AMiner 字段:aminer_paper_id, aminer_url.
references[]
Required fields / 必需字段:
| Field | Type | Description / 说明 |
|---|---|---|
reference_id | string | Stable ID, e.g. ref-001 / 稳定 ID,例如 ref-001 |
marker | string | In-text marker, e.g. [1] or Smith et al., 2020 / 文内引用标记,例如 [1] 或 Smith et al., 2020 |
title | string | Reference title; use unknown if not recoverable / 参考文献标题;不可恢复时用 unknown |
authors | array[string] | Reference authors when available / 可获得时填写参考文献作者 |
year | string or number | Reference year when available / 可获得时填写参考文献年份 |
raw_reference | string | Original bibliography entry or best available text / 原始参考文献条目或最佳可用文本 |
Optional fields / 可选字段:venue, doi, url, notes, aminer_paper_id, aminer_url, match_confidence.
match_confidence is a number from 0.0 to 1.0 describing how confidently a reference entry was matched to AMiner metadata. match_confidence 表示参考文献条目与 AMiner 元数据匹配的置信度。
citations[]
Required fields / 必需字段:
| Field | Type | Description / 说明 |
|---|---|---|
citation_id | string | Stable ID, e.g. cit-001 / 稳定 ID,例如 cit-001 |
reference_id | string or null | Matched reference ID; null only if unmatched / 匹配到的参考文献 ID;只有未匹配时为 null |
unmatched_reference | boolean | True when marker cannot be matched to a reference / citation marker 无法匹配参考文献时为 true |
marker | string | Citation marker in the text / 文中的 citation marker |
section | string | Section where citation appears / citation 出现的章节 |
citation_sentence | string | Exact sentence containing the citation, preserved in the target paper's source language / 包含 citation 的原句,保留目标论文原文语言 |
context | string | Exact local citation sentence plus neighboring source-language text; do not translate / citation sentence 及其邻近原文片段,保留原文语言,不要翻译 |
intent | string | One allowed intent label / 一个允许的 intent label |
confidence | number | 0.0 to 1.0 confidence / 0.0 到 1.0 的置信度 |
evidence | string | Short grounded explanation in the output language / 使用输出语言撰写的简短证据解释 |
Optional fields / 可选字段:
secondary_intents: array of allowed intent labels.entity_ids: linked entity IDs.coarse_intent: one ofbackground,method,result.notes: uncertainty or extraction notes.show_on_map: boolean.target_claim: target-paper claim, method choice, dataset choice, or result interpretation supported by the citation.cited_work_role: role of the cited work.intent_rationale: why the selected intent label is more appropriate than nearby labels.confidence_reason: why the confidence value is high, medium, or low.trace_ids: array of source trace IDs that use this citation as evidence.
Validation rule: every citation must include intent, evidence, confidence, and either a non-empty reference_id or unmatched_reference: true. 校验规则:每条 citation 必须包含 intent、evidence、confidence,并且有非空 reference_id 或 unmatched_reference: true。
Allowed intent values / 允许的 intent 取值:
background
problem
core-method
supporting-method
dataset
metric
baseline
tool-resource
theory
result-evidence
limitation
future-worksource_traces[]
Optional claim-centered traces. Use this section when the supplied paper text supports tracing target-paper claims or contributions back to local citation contexts and cited-source roles.
可选的 claim-centered traces。当提供的论文文本足以把目标论文 claim 或 contribution 追溯到本地 citation contexts 和被引来源角色时,使用本字段。
Required fields / 必需字段:
| Field | Type | Description / 说明 |
|---|---|---|
trace_id | string | Stable ID, e.g. trace-001 / 稳定 ID,例如 trace-001 |
claim_id | string | Stable local claim ID, e.g. claim-001 / 稳定本地 claim ID,例如 claim-001 |
target_claim | string | Target-paper claim, contribution, method choice, dataset choice, result interpretation, or limitation being traced / 被追踪的目标论文 claim、贡献、方法选择、数据集选择、结果解释或局限 |
claim_type | string | One allowed claim type / 一个允许的 claim type |
summary | string | Source-trace summary in the output language / 使用输出语言撰写的来源追踪总结 |
source_steps | array[object] | Ordered or grouped evidence steps linking the claim to cited sources / 将 claim 连接到被引来源的有序或分组证据步骤 |
confidence | number | 0.0 to 1.0 confidence for the full trace / 整条 trace 的 0.0 到 1.0 置信度 |
notes | string | Missing evidence, noisy extraction, AMiner-only metadata caveats, or uncertainty / 缺失证据、抽取噪声、AMiner-only 元数据限制或不确定性 |
Allowed claim_type values / 允许的 claim_type 取值:
problem
method
dataset
evaluation
result
limitation
future-work
contributionRequired source_steps[] fields / 必需 source_steps[] 字段:
| Field | Type | Description / 说明 |
|---|---|---|
citation_id | string | Citation ID supporting this step / 支撑该步骤的 citation ID |
reference_id | string or null | Reference ID when matched; null only if unmatched / 匹配到的 reference ID;只有未匹配时为 null |
source_role | string | Role of the cited source in this trace / 被引来源在该 trace 中的角色 |
intent | string | One allowed citation intent label / 一个允许的 citation intent label |
relation_type | string | Relationship between the claim and source / claim 与 source 之间的关系 |
evidence | string | Grounded explanation in the output language / 使用输出语言撰写的证据解释 |
confidence | number | 0.0 to 1.0 confidence for this step / 该步骤的 0.0 到 1.0 置信度 |
Recommended source_role values / 推荐 source_role 取值:
foundation
method-origin
method-adaptation
dataset-source
metric-source
baseline-comparison
evidence-support
contrast
limitation-source
future-directionValidation rule: every source trace must be supported by at least one local citation context. AMiner metadata can enrich IDs and URLs, but cannot be the sole evidence for source_traces[]. 校验规则:每条 source trace 至少由一个本地 citation context 支撑。AMiner 元数据可以补充 ID 和 URL,但不能作为 source_traces[] 的唯一证据。
entities[]
Required fields / 必需字段:
| Field | Type | Description / 说明 |
|---|---|---|
entity_id | string | Stable ID, e.g. ent-001 / 稳定 ID,例如 ent-001 |
name | string | Entity surface name / 实体表面名称 |
type | string | Entity type / 实体类型 |
description | string | Description grounded in target paper text or citation evidence / 基于目标论文文本或引用证据的描述 |
source_citation_ids | array[string] | Supporting citation IDs / 支撑该实体的 citation IDs |
Allowed type values / 允许的 type 取值:
problem
method
component
dataset
metric
task
baseline
tool-resource
theory
result
limitation
future-workrelations[]
Required fields / 必需字段:
| Field | Type | Description / 说明 |
|---|---|---|
relation_id | string | Stable ID, e.g. rel-001 / 稳定 ID,例如 rel-001 |
source_id | string | Paper, citation, reference, or entity ID / paper、citation、reference 或 entity ID |
target_id | string | Paper, citation, reference, or entity ID / paper、citation、reference 或 entity ID |
relation_type | string | Relationship category / 关系类别 |
intent | string or null | Citation intent when relation is citation-related / 与 citation 相关时填写 citation intent |
evidence | string | Grounded explanation / 有证据支撑的解释 |
Recommended relation_type values / 推荐 relation_type 取值:
cites-for
uses-method
uses-dataset
evaluates-with
compares-against
extends
contrasts-with
supports-claim
reveals-limitation
motivatesvisual_groups[]
Required fields / 必需字段:
| Field | Type | Description / 说明 |
|---|---|---|
group_id | string | Stable group ID / 稳定分组 ID |
label | string | Display label in the output language / 使用输出语言的显示标签 |
intent_filters | array[string] | Intents included in this group / 该分组包含的 intents |
node_ids | array[string] | Citation/entity/reference IDs shown in this group / 该分组展示的 citation/entity/reference IDs |
color | string | Hex color for the group / 该分组的十六进制颜色 |
Default groups / 默认分组:
group_id | English label | Chinese label | Intents |
|---|---|---|---|
problem-background | Problem/background | 问题背景 | background, problem, theory |
method-core | Core methods | 核心方法 | core-method, supporting-method, tool-resource |
data-eval | Data/evaluation | 数据与评估 | dataset, metric |
baseline-result | Baselines/results | 基线与结果 | baseline, result-evidence |
limits-future | Limits/future | 局限与未来 | limitation, future-work |
metadata
Recommended fields / 推荐字段:
| Field | Type | Description / 说明 |
|---|---|---|
source_file | string | Relative input filename only; avoid private absolute paths / 只写相对输入文件名,避免私有绝对路径 |
created_at | string | ISO-like timestamp if available / 可获得时填写 ISO 风格时间戳 |
extraction_method | string | manual, llm, cli, or hybrid / manual、llm、cli 或 hybrid |
output_language | string | zh, en, or another language tag / zh、en 或其他语言标签 |
coverage_notes | string | Missing sections, noisy PDF text, or reference matching caveats / 缺失章节、PDF 文本噪声或参考文献匹配风险 |
source_trace | object | Claim-centered source trace metadata / claim-centered source trace 元数据 |
aminer_enrichment | object | AMiner enrichment metadata / AMiner 增强元数据 |
Recommended metadata.source_trace fields / 推荐 metadata.source_trace 字段:
| Field | Type | Description / 说明 |
|---|---|---|
enabled | boolean | Whether claim-centered source tracing was performed / 是否执行 claim-centered source tracing |
strategy | string | Use claim-centered / 使用 claim-centered |
claims_traced_count | number | Number of target-paper claims traced / 已追踪的目标论文 claims 数量 |
source_steps_count | number | Total number of source steps across traces / 所有 traces 中 source steps 的总数 |
coverage_notes | string | Missing claims, weak evidence, noisy citation contexts, or trace limitations / 缺失 claim、弱证据、噪声 citation contexts 或 trace 限制 |
Recommended metadata.aminer_enrichment fields / 推荐 metadata.aminer_enrichment 字段:
| Field | Type | Description / 说明 |
|---|---|---|
enabled | boolean | Whether AMiner enrichment was requested and used / 是否请求并使用了 AMiner 增强 |
api_chain | array[string] | APIs called or planned / 已调用或计划调用的 APIs |
cost_summary | string | Human-readable cost summary / 面向人阅读的成本摘要 |
matched_target | boolean | Whether target paper was matched / 是否匹配到目标论文 |
matched_references_count | number | Number of references enriched through AMiner / 通过 AMiner 增强的参考文献数量 |
notes | string | Missing token, skipped paid calls, ambiguous matches, or other caveats / 缺失 token、跳过付费调用、匹配歧义或其他限制 |
Minimal Example / 最小示例
{
"schema_version": "0.3.0",
"paper": {
"paper_id": "target-paper",
"title": "Attention Is All You Need",
"authors": ["Ashish Vaswani", "Noam Shazeer"],
"year": 2017,
"abstract": "A sequence transduction model based entirely on attention mechanisms.",
"core_contributions": ["Introduces the Transformer architecture", "Replaces recurrence with self-attention"],
"aminer_paper_id": "53e9a82db7602d970317d3d8",
"aminer_url": "https://www.aminer.cn/pub/53e9a82db7602d970317d3d8"
},
"references": [
{
"reference_id": "ref-001",
"marker": "[1]",
"title": "Neural Machine Translation by Jointly Learning to Align and Translate",
"authors": ["Dzmitry Bahdanau", "Kyunghyun Cho", "Yoshua Bengio"],
"year": 2014,
"raw_reference": "Bahdanau et al. Neural Machine Translation by Jointly Learning to Align and Translate. 2014.",
"aminer_paper_id": "53e9b0f4b7602d9703b6a4f2",
"aminer_url": "https://www.aminer.cn/pub/53e9b0f4b7602d9703b6a4f2",
"match_confidence": 0.92
}
],
"citations": [
{
"citation_id": "cit-001",
"reference_id": "ref-001",
"unmatched_reference": false,
"marker": "[1]",
"section": "Introduction",
"citation_sentence": "Attention mechanisms have become an integral part of sequence modeling and transduction models [1].",
"context": "Attention mechanisms have become an integral part of sequence modeling and transduction models [1].",
"intent": "core-method",
"confidence": 0.86,
"evidence": "The citation introduces attention as a method foundation for the target paper.",
"secondary_intents": ["background"],
"entity_ids": ["ent-001"],
"coarse_intent": "method",
"target_claim": "The target paper builds sequence transduction around attention mechanisms.",
"cited_work_role": "method foundation",
"intent_rationale": "The cited work is not only background; it directly supports the target method choice.",
"confidence_reason": "The citation sentence and reference match are both clear.",
"trace_ids": ["trace-001"]
}
],
"source_traces": [
{
"trace_id": "trace-001",
"claim_id": "claim-001",
"target_claim": "The target paper builds sequence transduction around attention mechanisms instead of recurrence.",
"claim_type": "method",
"summary": "The target method claim is traced to a cited attention-based translation model that supplies method foundation evidence.",
"source_steps": [
{
"citation_id": "cit-001",
"reference_id": "ref-001",
"source_role": "foundation",
"intent": "core-method",
"relation_type": "uses-method",
"evidence": "The citation sentence identifies attention mechanisms as integral to sequence modeling and transduction.",
"confidence": 0.86
}
],
"confidence": 0.84,
"notes": "Minimal example; the trace uses local citation context as evidence, while AMiner only enriches IDs and URLs."
}
],
"entities": [
{
"entity_id": "ent-001",
"name": "attention mechanism",
"type": "method",
"description": "A sequence modeling method foundation used by the target paper.",
"source_citation_ids": ["cit-001"]
}
],
"relations": [
{
"relation_id": "rel-001",
"source_id": "target-paper",
"target_id": "ent-001",
"relation_type": "uses-method",
"intent": "core-method",
"evidence": "The target paper builds its architecture around attention mechanisms."
}
],
"visual_groups": [
{
"group_id": "method-core",
"label": "Core methods",
"intent_filters": ["core-method", "supporting-method", "tool-resource"],
"node_ids": ["cit-001", "ent-001"],
"color": "#ef5b45"
}
],
"metadata": {
"source_file": "attention-is-all-you-need.pdf",
"created_at": "2026-05-19T00:00:00Z",
"extraction_method": "llm",
"output_language": "en",
"coverage_notes": "Minimal schema example only.",
"source_trace": {
"enabled": true,
"strategy": "claim-centered",
"claims_traced_count": 1,
"source_steps_count": 1,
"coverage_notes": "Only one method claim is traced in this minimal example."
},
"aminer_enrichment": {
"enabled": true,
"api_chain": ["paper_search", "paper_detail", "paper_relation", "paper_info"],
"cost_summary": "Estimated ¥0.11 total plus free calls",
"matched_target": true,
"matched_references_count": 1,
"notes": "AMiner metadata enriched IDs and URLs only; intent classification used local citation context."
}
}
}Visual Source Trace Outputs / 可视化来源追踪产物
The Skill has three formal static SVG options plus one standard single-file HTML graph. Use English visible labels for English output and Chinese visible labels for Chinese output. The formal SVG parameter is svg: radial|chain|both.
All visual artifacts must be generated by scripts/render_html.py after json/graph/citation_graph.json exists. Do not hand-write one-off SVG or HTML. The renderer owns the shared layout, colors, language pack, node priority, text wrapping, overflow summaries, and edge rules for both static SVG and HTML views.
本 Skill 有三种正式静态 SVG 选项,以及一个标准单文件 HTML 图谱。英文输出使用英文可见标签,中文输出使用中文可见标签。正式 SVG 参数为 svg: radial|chain|both。
所有可视化产物都必须在 json/graph/citation_graph.json 写入后由 scripts/render_html.py 生成。不要临场手写一次性 SVG 或 HTML。渲染器统一负责静态 SVG 与 HTML 视图的布局、配色、语言包、节点优先级、文字换行、溢出摘要和边线规则。
English Rules
SVG Option Decision
| User request | Output behavior |
|---|---|
svg: radial, radial, overview, grouped radial | Generate the grouped radial overview as citation_map.svg |
svg: chain, chain, source trace, mind map, reference image | Generate the source-trace chain SVG as citation_map.svg |
svg: both, both | Generate the radial SVG as citation_map.svg and the chain SVG as citation_map_chain.svg |
hybrid, interactive graph, expandable knowledge graph | Treat as a request for the standard citation_map.html; still ask for `svg: radial |
| No explicit SVG option and asking is possible | Ask which SVG output the user wants: radial, chain, or both |
| No explicit SVG option and asking is not possible | Generate recommended svg: both |
Legacy aliases:
mode: current->svg: radialmode: example->svg: chainmode: all->svg: both- If
svgand legacymodeconflict, ask the user to confirm. - Do not generate
citation_map_example.svgunless the user explicitly asks for the legacy filename for compatibility.
Radial SVG
Use radial for a compact overview: the target paper sits in the center and citation-intent groups surround it. Use the renderer's canonical five groups, fixed colors, wide spacing, and reduced main edges.
- Target paper stays in the center.
- Citation intent groups are arranged around the target paper.
- Group hubs use stable colors and deterministic positions.
- Group nodes show high-priority citations first: citations linked to
source_traces[], then higher confidence citations, then other visible citations. show_on_map=falsecitations are omitted from SVG but retained in JSON.- Dense groups render only the configured high-priority nodes and summarize overflow as
+N; full records remain in JSON and HTML details. - Do not draw citation-to-citation cross-links or AMiner-only relation lines.
Recommended group positions:
| Group | Position | Intents |
|---|---|---|
| Problem/background | Upper left | background, problem, theory |
| Core/supporting methods | Upper right | core-method, supporting-method, tool-resource |
| Data/evaluation | Right or middle | dataset, metric |
| Baselines/results | Lower left | baseline, result-evidence |
| Limits/future | Bottom or far left | limitation, future-work |
Chain SVG
Use chain for a source-trace diagram: the target paper is on the right, with layered source chains on the left. Use wide lanes, two-row packing per lane, and reduced main edges.
- Prefer dynamic height, wide lanes, multi-column packing, and generous spacing over dropping nodes.
- Show high-priority citations first and summarize overflow as
+N; full records must remain injson/graph/citation_graph.jsonand HTML details. - Draw only lightweight
chain hub -> citationandcitation -> target papermain lines. - Do not draw dashed cross-links by default.
- Wrap node titles with multiple text lines instead of shrinking below readable size.
Required structure:
- Target paper node on the right side, vertically centered.
- Left-side first-level chain hubs:
- Problem chain:
background,problem,theory - Method chain:
core-method,supporting-method,tool-resource - Data chain:
dataset,metric - Baseline chain:
baseline,result-evidence - Limits/resources chain:
limitation,future-work - Main edge labels in the output language.
- Second-level nodes show method components, datasets, baselines, or key author-year references.
- Secondary roles belong in HTML details and JSON, not as default static cross-links.
Node text priority: target_claim, cited_work_role, shortened evidence, shortened citation_sentence, then reference label from reference_id.
Shared Color Palette
| Intent group | Color |
|---|---|
| Problem/background | #cf6f6f |
| Core/supporting methods | #ef6c2f |
| Data/metrics | #8a5cf6 |
| Baselines/results | #d18a19 |
| Limits/resources/future | #4f9c56 |
| Unmatched/uncertain | #9aa3ad |
SVG Requirements
- Include a visible target paper node labeled with the paper title or short title.
- Use the canonical group labels and colors from the renderer; do not invent new labels per paper.
- Use deterministic layout; do not use random force-directed placement.
- Use text labels in addition to color.
- Keep main labels at least
16pxand secondary labels at least12px. - Avoid long verbatim citation sentences in nodes; use short evidence labels.
- If AMiner enrichment is shown, mark it as metadata enrichment rather than citation-context evidence.
- Static SVG and HTML must share the same canonical group labels, node ranking, text wrapping, and reduced-edge strategy.
HTML Graph Requirements
Generate citation_map.html whenever enough graph data exists. It is a standard artifact, independent of the chosen SVG option.
- Generate it with
scripts/render_html.pyafterjson/graph/citation_graph.jsonis written. The same command can also generatecitation_map.svgandcitation_map_chain.svg. - Make it a single self-contained HTML file with inline CSS, inline JavaScript, and an embedded graph data snapshot.
- Do not depend on CDN assets, external scripts, external stylesheets, package installs, or a local HTTP server.
- Use the renderer's fixed three-column layout: control panel, SVG canvas, and details panel.
- Provide one page that can switch between
radialandchainviews; use onecitation_map.html. - Include visible legend/groups, intent-group toggles, claim/source trace viewer, node details panel, search/filter controls, zoom controls, fit screen, reset layout, draggable citation nodes, and AMiner metadata badges when enrichment exists.
- Include renderer-owned
!tooltip circles with hover and keyboard focus for difficult controls and fields, including role/source_role, intent labels, confidence, AMiner metadata, source traces, steps, fit screen, reset layout, export SVG, and filters. Tooltip text must come from the renderer language pack, not one-off HTML. - Use one visible UI language per file. Chinese UI must use labels such as
径向图,溯源链图,搜索,筛选,节点详情,证据,参考文献,来源追踪,AMiner 元数据,缩放, and重置布局. English UI must use labels such asRadial,Chain,Search,Filter,Node details,Evidence,Reference,Source traces,AMiner metadata,Zoom, andReset layout. - Do not use legacy UI labels
currentorexamplein HTML controls. - Display AMiner as metadata enrichment only; do not present AMiner-only links as local citation-context evidence.
- Keep JSON keys and labels from
json/graph/citation_graph.jsonunchanged inside embedded data; visible UI labels should follow the output language. - If a view cannot be rendered cleanly, keep the data visible in a details panel and record the limitation in
analysis.mdorcitation_map_spec.md.
Interactive Graph Requests
hybrid, interactive graph, and expandable knowledge graph mean an expandable, interactive graph that reveals details on demand. Use citation_map.html for this behavior. It is not a static SVG option.
When requested, do not generate a fake static hybrid SVG. Continue to provide the confirmed SVG output and json/graph/citation_graph.json as the HTML graph data source.
中文规则
SVG 选项选择
| 用户请求 | 输出行为 |
|---|---|
svg: radial, radial, 概览图, 分组径向图 | 生成分组径向概览图为 citation_map.svg |
svg: chain, chain, 溯源链图, 思维导图, 参考图 | 生成来源追踪链式 SVG 为 citation_map.svg |
svg: both, both | 生成径向 SVG 为 citation_map.svg,并生成链式 SVG 为 citation_map_chain.svg |
hybrid, interactive graph, expandable knowledge graph, 交互图谱, 可展开知识图谱 | 视为用户需要标准产物 citation_map.html;如果尚未确认 SVG 选项,仍需询问 `svg: radial |
| 未明确 SVG 选项且可以询问 | 询问用户使用哪种 SVG 输出:radial、chain 或 both |
| 未明确 SVG 选项且无法询问 | 生成推荐默认值 svg: both |
旧别名兼容:
mode: current->svg: radialmode: example->svg: chainmode: all->svg: both- 如果
svg和旧参数mode冲突,必须询问用户确认。 - 除非用户明确要求兼容旧文件名,否则不要生成
citation_map_example.svg。
Radial SVG:分组径向图
radial 用于紧凑概览:目标论文位于中心,引用意图分组围绕目标论文排列。使用渲染器固定的五个 canonical groups、稳定配色、宽松间距和减少后的主线。
- 目标论文位于中心。
- 引用意图分组围绕目标论文排列。
- 分组 hub 使用稳定颜色和确定性位置。
- 分组节点优先展示高优先级 citations:进入
source_traces[]的 citation 优先,其次是高 confidence citation,再其次是其他可见 citation。 show_on_map=false的 citation 不显示在 SVG 中,但保留在 JSON 中。- 密集分组只展示配置数量内的高优先级节点,并用
+N概括溢出内容;完整记录保留在 JSON 和 HTML 详情中。 - 不绘制 citation-to-citation cross-link 或 AMiner-only 关系线。
推荐分组位置:
| 分组 | 位置 | Intents |
|---|---|---|
| 问题/背景 | 左上 | background, problem, theory |
| 核心/辅助方法 | 右上 | core-method, supporting-method, tool-resource |
| 数据/评估 | 右侧或中部 | dataset, metric |
| 基线/结果 | 左下 | baseline, result-evidence |
| 局限/未来 | 底部或远左 | limitation, future-work |
Chain SVG:溯源链图
chain 用于来源追踪图:右侧放目标论文,左侧放分层引用链。使用宽 lane、每条 lane 两行排布和减少后的主线。
- 中文
chain或bothSVG 必须保持旧paper-citation-map-zh风格:右侧目标论文,左侧多层引用链,一级 hub 固定为问题链、方法链、数据链、基线链、局限/资源链。 - 不要在
citation_map_chain.svg中复用 radial 分组标签,例如问题/背景、核心/辅助方法、数据/评估、基线/结果、局限/未来。 - 优先使用动态高度、宽 lane、多列排布和充足间距,而不是删除节点。
- 优先展示高优先级 citation,并用
+N概括溢出内容;完整记录必须保留在json/graph/citation_graph.json和 HTML 详情中。 - 只绘制轻量的
chain hub -> citation和citation -> target paper主线。 - 默认不画 dashed cross-link。
- 节点标题换行显示,不要缩小到不可读。
必要结构:
- 目标论文节点在右侧垂直居中。
- 左侧一级引用链 hub:
- 问题链:
background,problem,theory - 方法链:
core-method,supporting-method,tool-resource - 数据链:
dataset,metric - 基线链:
baseline,result-evidence - 局限/资源链:
limitation,future-work - 主要边标签固定使用中文语义 badge:
问题、方法、数据集、基线、局限。 - 二级节点展示方法组件、数据集、baseline 或关键 author-year 参考。
- secondary roles 放入 HTML 详情和 JSON,不作为默认静态 cross-link。
节点文本优先级:target_claim、cited_work_role、缩短后的 evidence、缩短后的 citation_sentence、来自 reference_id 的参考文献标签。
共享配色
| Intent group | Color |
|---|---|
| Problem/background | #cf6f6f |
| Core/supporting methods | #ef6c2f |
| Data/metrics | #8a5cf6 |
| Baselines/results | #d18a19 |
| Limits/resources/future | #4f9c56 |
| Unmatched/uncertain | #9aa3ad |
SVG 要求
- 包含可见的目标论文节点,标签使用论文标题或短标题。
- 使用渲染器 canonical group 标签和配色,不要每篇论文临场发明新标签。
- 使用确定性布局,不使用随机 force-directed placement。
- 除颜色外必须使用文本标签。
- 主标签至少
16px,次级标签至少12px。 - 不在节点中放长段 citation 原句;使用短 evidence label。
- 如果展示 AMiner 增强,必须标为 metadata enrichment,而不是 citation-context evidence。
- 静态 SVG 与 HTML 必须共享同一 canonical group 标签、节点排序、换行和减少边线策略。
HTML 图谱要求
只要有足够图谱数据,就生成 citation_map.html。它是标准产物,独立于 SVG 选项。
- 写入
json/graph/citation_graph.json后,用scripts/render_html.py生成。该命令也可以同时生成citation_map.svg和citation_map_chain.svg。 - 生成单文件、自包含 HTML,内联 CSS、JavaScript 和 graph data snapshot。
- 不依赖 CDN、外部脚本、外部样式、包安装或本地 HTTP server。
- 使用渲染器固定三栏布局:控制栏、SVG 画布和详情栏。
- 在一个页面内切换
radial和chain视图;只生成一个citation_map.html。 - 包含图例/分组、intent-group 开关、claim/source trace 查看器、节点详情面板、搜索/筛选控件、缩放控件、适配屏幕、重置布局、可拖动 citation 节点,以及 AMiner metadata badge。
- 包含由渲染器统一生成的
!圆圈提示,并支持 hover 与键盘 focus。提示覆盖较难理解的控件和字段,包括角色/source_role、intent 标签、置信度、AMiner 元数据、来源追踪、步骤、适配屏幕、重置布局、导出当前 SVG 和筛选。提示文案必须来自渲染器语言包,不能临场手写。 - 每个 HTML 文件只能使用一种可见 UI 语言。中文 UI 必须使用
径向图、溯源链图、搜索、筛选、节点详情、证据、参考文献、来源追踪、AMiner 元数据、缩放、重置布局等标签。英文 UI 必须使用Radial、Chain、Search、Filter、Node details、Evidence、Reference、Source traces、AMiner metadata、Zoom、Reset layout等标签。 - HTML 控件不要使用旧 UI 标签
current或example。 - AMiner 只能显示为 metadata enrichment,不能把 AMiner-only links 展示成本地 citation-context evidence。
- 嵌入数据中的
json/graph/citation_graph.jsonkeys 和 labels 保持不变;可见 UI 文本使用输出语言。 - 如果某个视图无法干净渲染,保留详情面板中的数据,并在
analysis.md或citation_map_spec.md中记录限制。
交互图谱请求
hybrid、interactive graph、expandable knowledge graph、交互图谱 和 可展开知识图谱 表示可展开、按需展示细节的交互图。当前用 citation_map.html 承担该行为,它不是静态 SVG 选项。
当用户请求这类交互图时,不生成假的静态 hybrid SVG。继续提供已确认的 SVG 输出,并保留 json/graph/citation_graph.json 作为 HTML 图谱数据源。
# No third-party Python dependencies required.
# scripts/render_html.py uses only the Python standard library.
Paper Source Trace
Paper Source Trace 将单篇目标论文转换为以 claim 为中心、证据可追溯的来源追踪产物。本 Skill 只有一个规范名称:paper-source-trace。
你可以用自然语言或 /paper-source-trace 触发本 Skill。
语言路由
- 用户主要使用中文,或明确要求中文输出时,使用本
SKILL.zh.md。 - 其他情况使用
SKILL.md。 - 无论使用哪种语言,
json/graph/citation_graph.json的 key、intent label、relation type、source role 和参数名都保持英文。
中文工作流
标准产物
在证据和文件系统权限允许时,生成以下产物:
analysis.md:面向人阅读的中文分析报告。json/graph/citation_graph.json:遵循references/schema.md的规范机器可读图谱。citation_map.svg:可生成时输出静态引用图谱。citation_map.html:有图谱数据时输出单文件交互图谱。citation_map_chain.svg:仅在svg: both时输出的链式来源追踪 SVG。citation_map_spec.md:仅在 SVG 生成存在限制或失败时输出。
默认输出目录:
outputs/paper-source-trace/<safe-paper-stem>/推荐目录结构:
analysis.md
citation_map.svg
citation_map.html
citation_map_chain.svg # only when svg is both
citation_map_spec.md # only when SVG generation has caveats or fails
json/graph/citation_graph.json
json/aminer/*.json # only when AMiner raw results are saved
json/extraction/*.json # only when structured intermediates are saved旧参数兼容:如果用户写 mode: current,视为 svg: radial;mode: example 视为 svg: chain;mode: all 视为 svg: both。如果同时提供 svg 和 mode 且两者冲突,必须询问用户确认。hybrid、interactive graph、expandable knowledge graph、交互图谱 或 可展开知识图谱 表示用户需要标准产物 citation_map.html;它不是 SVG 模式,也不改变 SVG 选择。
启动确认
在读取论文、抽取引用、检查 AMINER_API_KEY、调用 AMiner 或生成 SVG 之前,必须先请用户确认:
- SVG 输出:
radial、chain或both。 - AMiner 增强:
on或off。
如果用户已经给出其中一个或两个设置,先复述为暂定选择,再请求最终确认。用户回答前不要继续执行。
如果确实无法进行交互确认,使用推荐默认值:svg: both 和 aminer: on。但预估 AMiner 成本达到或超过 ¥5 时,仍必须先请求明确确认;如果缺少 AMINER_API_KEY,跳过 AMiner 增强并继续本地分析。
核心规则
1. 只使用用户提供的论文文本、引用上下文、参考文献、用户笔记,或用户明确要求的 AMiner 结果作为证据。 2. 不凭领域记忆推断 citation intent。 3. AMiner 增强必须显式开启;未请求时不检查 AMINER_API_KEY。 4. AMiner 只能补充 paper ID、URL、候选参考文献匹配和外部引用关系,不能替代本地 citation context,也不能单独证明 intent 或 source trace。 5. 保留不确定性;当引用上下文、参考文献匹配或来源角色证据不完整时降低置信度。 6. citation_sentence 和 context 必须保留目标论文原文语言。它们是原始证据锚点,不是跟随用户语言改写的解释。 7. evidence、summary、notes、Markdown 报告正文以及 SVG/HTML 可见 UI 文案跟随用户输出语言。 8. 如果可以写入文件,不要只给聊天摘要。
AMiner 增强
能够确认时,除非用户确认 aminer: on 或明确写出 AMiner 增强、用 AMiner 补全、查 AMiner 引用链、补全 paper_id、enhance with AMiner、use AMiner metadata,否则不启用 AMiner。确实无法确认时,推荐默认值为 aminer: on。
开启后:
1. 只检查 AMINER_API_KEY 是否存在,绝不打印 token。 2. 如果缺少 token,继续本地分析,并记录 AMiner 增强已跳过。 3. 使用最短可行链路:paper_search 或 paper_search_pro、paper_detail、paper_relation、paper_info。 4. 对所有计划或完成的 AMiner 调用输出成本摘要。 5. 预估成本达到或超过 ¥5 时,先请求用户明确确认。 6. 在 json/graph/citation_graph.json 的 metadata.aminer_enrichment 中记录增强元数据。
Intent Labels
除非用户明确扩展分类体系,只使用以下 12 类标签:
background, problem, core-method, supporting-method, dataset, metric, baseline, tool-resource, theory, result-evidence, limitation, future-work。
执行步骤
1. 先询问启动确认问题,并等待用户回答。 2. 确认输入证据和输出目录。 3. 抽取可靠的论文文本、参考文献条目和 citation contexts。 4. 重要分类或来源追踪前,读取 references/evidence_protocol.md。 5. 使用允许的 intent labels 分类每条引用。 6. 在文本支持时抽取目标论文的关键 claims 或 contributions。 7. 构建 source_traces[],把目标 claim 连接到本地 citation contexts、被引文献角色和证据步骤。 8. 抽取解释目标论文的 entities 和 relations。 9. 如果启用 AMiner,只补充元数据,不替代本地证据。 10. 先写入 json/graph/citation_graph.json,再生成可视化产物。 11. 写入 analysis.md;只有用户明确要求模板或固定格式时才使用 references/analysis_template.md。 12. 用同一条渲染命令生成 citation_map.html 和已确认的 SVG 输出:scripts/render_html.py --graph <output>/json/graph/citation_graph.json --output <output>/citation_map.html --svg <radial|chain|both> --language auto。 13. 不要临场手写 SVG 或 HTML;静态 SVG 两种模式与 HTML 的 radial / chain 视图必须共享渲染器布局、配色、语言包、换行、节点优先级和边线规则。 14. 最终回复前验证产物。
参考文件
references/schema.md:规范 schema 和 JSON 示例。references/evidence_protocol.md:证据链和不确定性规则。references/prompts.md:中英文抽取与审查 prompts。references/visual.md:SVG 和 HTML 图谱规则。references/analysis_template.md:显式模板模式下使用的固定报告模板。scripts/render_html.py:标准图谱渲染器。生成citation_map.html、citation_map.svg和citation_map_chain.svg时必须使用它,不要临场手写 SVG 或 HTML。
质量检查
- 每条 citation 都有
intent、evidence、confidence,并且有reference_id或unmatched_reference: true。 - 每个 intent label 都属于允许的 12 类。
- 关键引用能追溯到 citation sentence 或本地上下文。
citation_sentence和context保留目标论文原文语言;只有解释性字段跟随用户语言。- 每个 entity 至少由一条 citation 支撑。
- 每条 source trace 至少由一个本地 citation context 支撑;AMiner 元数据不能作为唯一支撑。
- 中文
citation_map_chain.svg使用问题链、方法链、数据链、基线链、局限/资源链,不用 radial 分组标签替代。 - 写入
json/graph/citation_graph.json后,用scripts/render_html.py同时生成 HTML 和 SVG。HTML 与 SVG 必须使用单一可见语言、同一套 canonical group 标签、同一节点排序和同一减少边线策略。 - 静态 SVG 只保留有用主线,密集分组用
+N汇总,不画 citation-to-citation cross-link 或 AMiner-only 关系线。 - 即使 Markdown、SVG 或 HTML 有限制,
json/graph/citation_graph.json仍必须完整。