nsfc-ref-alignment
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseNSFC Ref Alignment
NSFC Ref Alignment
与 bensz-collect-bugs 的协作约定
Collaboration Agreement with bensz-collect-bugs
- 当用户环境中出现因本 skill 设计缺陷导致的 bug 时,优先使用 按规范记录到
bensz-collect-bugs,严禁直接修改用户本地 Claude Code / Codex 中已安装的 skill 源码。~/.bensz-skills/bugs/ - 若 AI 仍可通过 workaround 继续完成用户任务,应先记录 bug,再继续完成当前任务。
- 当用户明确要求“report bensz skills bugs”等公开上报动作时,调用本地 与
gh,仅上传新增 bug 到bensz-collect-bugs;不要 pull / clone 整个 bug 仓库。huangwb8/bensz-bugs
- When a bug caused by the design flaw of this skill occurs in the user's environment, prioritize using to record it in
bensz-collect-bugsaccording to specifications. It is strictly forbidden to directly modify the source code of the skill installed in the user's local Claude Code / Codex.~/.bensz-skills/bugs/ - If the AI can still complete the user's task through a workaround, it should first record the bug, then continue to complete the current task.
- When the user explicitly requests actions such as "report bensz skills bugs", call the local and
ghto upload only new bugs tobensz-collect-bugs; do not pull / clone the entire bug repository.huangwb8/bensz-bugs
适用场景
Applicable Scenarios
- 你有一份 NSFC 标书(LaTeX 项目),希望检查:
- 里所有
.tex/\cite{...}/\citep{...}等引用的 bibkey 是否都存在于\citet{...}.bib - 条目的基础字段是否完备、格式是否明显错误(如 DOI 非法、年份缺失)
.bib - 引用所在句子的“语义主张”是否与该文献(至少从 title/author/year/venue/DOI 等元信息)相匹配,是否存在乱引/过度主张/张冠李戴风险
- 你希望只得到一份报告先人工审核(改 / 改正文属于大事)。
.bib
- You have an NSFC proposal (LaTeX project) and want to check:
- Whether all bibkeys cited in files via
.tex/\cite{...}/\citep{...}etc. exist in\citet{...}files.bib - Whether the basic fields of entries are complete and the format is obviously incorrect (such as invalid DOI, missing year)
.bib - Whether the "semantic claim" of the sentence where the citation is located matches the literature (at least from metadata such as title/author/year/venue/DOI), and whether there are risks of incorrect citation/overclaiming/misattribution
- Whether all bibkeys cited in
- You want to only get a report for manual review first (modifying / revising the text is a major matter).
.bib
不适用
Inapplicable Scenarios
- 你希望“自动替换 bibkey / 自动改写正文”——本 skill 默认禁止直接修改(除非你明确要求)。
- 你只是想补齐 BibTeX 条目:优先使用 。
nsfc-bib-manager
- You want to "automatically replace bibkeys / automatically rewrite the text" — this skill prohibits direct modification by default (unless you explicitly request it).
- You just want to complete BibTeX entries: prioritize using .
nsfc-bib-manager
输入
Input
- :标书项目根目录(如
project_root)projects/NSFC_General - 可选::主入口 tex(默认
main_tex)main.tex - 可选::报告输出目录(默认
report_dir,相对你运行 skill 的当前目录)./references - 可选::是否进行在线核验(默认 false;仅做确定性查询,失败降级)
verify_online
- : Root directory of the proposal project (e.g.,
project_root)projects/NSFC_General - Optional: : Main entry tex file (default
main_tex)main.tex - Optional: : Report output directory (default
report_dir, relative to the current directory where you run the skill)./references - Optional: : Whether to perform online verification (default false; only deterministic queries are performed, and it degrades on failure)
verify_online
输出(只读 + 可复现)
Output (Read-only + Reproducible)
中间产物(强制)
Intermediate Products (Mandatory)
所有中间文件必须托管在:
{project_root}/.nsfc-ref-alignment/run_{YYYYMMDDHHMMSS}/其中 为时间戳;如同秒重复运行,脚本会追加 ,确保多次分析不冲突。
run_{YYYYMMDDHHMMSS}-2/-3/...该目录至少包含:
- :结构化输入(引用位置 + 句子上下文 + 文献元信息 + 校验结果),供宿主 AI 做语义判断
ai_ref_alignment_input.json - :确定性报告(缺失 bibkey、重复条目、字段缺失、DOI 格式问题等)
ref_integrity_report.md - :逐条引用清单(file/line/bibkey/sentence)
citations.csv - :BibTeX 清单(被引用条目与问题标注)
bib_inventory.json
All intermediate files must be hosted in:
{project_root}/.nsfc-ref-alignment/run_{YYYYMMDDHHMMSS}/Where is a timestamp; if the skill is run repeatedly in the same second, the script will append to ensure multiple analyses do not conflict.
run_{YYYYMMDDHHMMSS}-2/-3/...This directory must contain at least:
- : Structured input (citation location + sentence context + literature metadata + verification results) for the host AI to make semantic judgments
ai_ref_alignment_input.json - : Deterministic report (missing bibkey, duplicate entries, missing fields, DOI format issues, etc.)
ref_integrity_report.md - : Itemized citation list (file/line/bibkey/sentence)
citations.csv - : BibTeX inventory (cited entries and issue annotations)
bib_inventory.json
最终交付(默认)
Final Delivery (Default)
仅输出一份供用户审核的报告(默认写入 ;用户可指定其他目录):
./references/- (如同秒重复运行,脚本会追加
NSFC-REF-ALIGNMENT-vYYYYMMDDHHMMSS.md避免覆盖)-2/-3/...
该报告必须是“只读审查报告”,不得直接修改标书正文或 。
.bibOnly output a report for user review (default written to ; users can specify other directories):
./references/- (if run repeatedly in the same second, the script will append
NSFC-REF-ALIGNMENT-vYYYYMMDDHHMMSS.mdto avoid overwriting)-2/-3/...
This report must be a "read-only review report" and must not directly modify the proposal text or files.
.bib工作流(推荐)
Workflow (Recommended)
步骤 1:预检与定位
Step 1: Pre-check and Localization
- 确认 存在且包含
project_root。main_tex - 自动解析 的
main_tex/\input{}依赖树,收集所有涉及的\include{}文件。.tex - 自动发现 /
\bibliography{...}指向的\addbibresource{...}文件;若发现 0 个.bib,则回退为在.bib下搜索project_root并给出 warning。*.bib
- Confirm that exists and contains
project_root.main_tex - Automatically parse the /
\input{}dependency tree of\include{}and collect all involvedmain_texfiles..tex - Automatically discover files pointed to by
.bib/\bibliography{...}; if 0\addbibresource{...}files are found, fall back to searching for.bibunder*.biband issue a warning.project_root
步骤 2:确定性抽取(脚本执行)
Step 2: Deterministic Extraction (Script Execution)
运行脚本生成结构化输入与确定性报告:
bash
cd /path/to/ChineseResearchLaTeX
python3 skills/nsfc-ref-alignment/scripts/run_ref_alignment.py \
--project-root "projects/NSFC_General" \
--main-tex "main.tex" \
--report-dir "references" \
--prepare如需在线核验(建议只对最终稿/重点条目开启):
bash
python3 skills/nsfc-ref-alignment/scripts/run_ref_alignment.py \
--project-root "projects/NSFC_General" \
--main-tex "main.tex" \
--report-dir "references" \
--prepare \
--verify-onlineRun the script to generate structured input and deterministic reports:
bash
cd /path/to/ChineseResearchLaTeX
python3 skills/nsfc-ref-alignment/scripts/run_ref_alignment.py \
--project-root "projects/NSFC_General" \
--main-tex "main.tex" \
--report-dir "references" \
--prepareFor online verification (recommended only for final drafts/key entries):
bash
python3 skills/nsfc-ref-alignment/scripts/run_ref_alignment.py \
--project-root "projects/NSFC_General" \
--main-tex "main.tex" \
--report-dir "references" \
--prepare \
--verify-online步骤 3:宿主 AI 语义核查(本 skill 的核心)
Step 3: Host AI Semantic Verification (Core of This Skill)
宿主 AI 在读取 后,逐条核查:
{run_dir}/ai_ref_alignment_input.json-
真实性/存在性(P0)
- bibkey 缺失:正文引用了不存在的条目
- DOI/URL 明显无效或在线核验失败且元信息严重不一致
-
语义不匹配风险(P0/P1)
- P0:句子对文献作出了“强断言”,但从元信息看高度不可能(如年份矛盾、领域完全不相关、明显张冠李戴)
- P1:可疑但证据不足(元信息不足、缺少 DOI/缺少 title/作者信息不全)
-
过度主张/弱支撑(P1)
- 例如“首次/唯一/最优/显著优于”但缺乏足够支撑或疑似需要更强引用
证据优先级(强制): 在线核验结果(若开启) > BibTeX 的 title/abstract > 仅从句子推断(最低优先级)。
After reading , the host AI verifies item-by-item:
{run_dir}/ai_ref_alignment_input.json-
Authenticity/Existence (P0)
- Missing bibkey: The text cites a non-existent entry
- DOI/URL is obviously invalid or online verification fails with severely inconsistent metadata
-
Semantic Mismatch Risk (P0/P1)
- P0: The sentence makes a "strong assertion" about the literature, but it is highly unlikely based on metadata (e.g., year contradiction, completely unrelated field, obvious misattribution)
- P1: Suspicious but insufficient evidence (insufficient metadata, missing DOI/missing title/incomplete author information)
-
Overclaiming/Weak Support (P1)
- For example, "first/only/best/significantly better than" but lacks sufficient support or seems to require stronger citations
Evidence Priority (Mandatory): Online verification results (if enabled) > BibTeX title/abstract > Inference only from sentences (lowest priority).
步骤 4:生成最终报告(只读)
Step 4: Generate Final Report (Read-only)
在 写入最终报告 ,必须包含:
report_dirNSFC-REF-ALIGNMENT-vYYYYMMDDHHMMSS.md- Summary:总引用数、唯一 bibkey 数、缺失条目数、重复条目数、P0/P1 数
- P0(必须处理):缺失 bibkey、明显伪造/错误元信息、严重语义错配
- P1(建议处理):字段不全(缺 DOI/缺 year)、弱支撑/过度主张、需要人工复核
- 附录:逐条引用明细(至少包含 file/line、原句、bib 条目关键字段、风险判断与理由)
Write the final report in , which must include:
NSFC-REF-ALIGNMENT-vYYYYMMDDHHMMSS.mdreport_dir- Summary: Total number of citations, number of unique bibkeys, number of missing entries, number of duplicate entries, number of P0/P1 issues
- P0 (Must be handled): Missing bibkey, obviously forged/incorrect metadata, serious semantic mismatch
- P1 (Recommended to be handled): Incomplete fields (missing DOI/missing year), weak support/overclaiming, need manual review
- Appendix: Itemized citation details (at least including file/line, original sentence, key fields of the bib entry, risk judgment and reasons)
修改边界(强制)
Modification Boundaries (Mandatory)
- 默认不修改任何标书内容与配置:
- 禁止修改:、
**/*.tex、**/*.bib、**/*.cls**/*.sty
- 禁止修改:
- 允许写入:
- (中间产物)
{project_root}/.nsfc-ref-alignment/** - (最终报告;可由用户改到别处)
./references/**
- 若用户明确要求“修复引用/修复 bib”,必须先在报告里给出修改计划与影响面,再执行最小化修改(默认不做)。
- By default, do not modify any proposal content or configuration:
- Prohibited modifications: ,
**/*.tex,**/*.bib,**/*.cls**/*.sty
- Prohibited modifications:
- Allowed writes:
- (intermediate products)
{project_root}/.nsfc-ref-alignment/** - (final report; can be changed to other locations by the user)
./references/**
- If the user explicitly requests "fix citations/fix bib", a modification plan and impact scope must be provided in the report first, then minimal modifications are performed (not done by default).
与 check-review-alignment 的关系(经验复用)
Relationship with check-review-alignment (Experience Reuse)
- 共同点:脚本只做确定性抽取;“语义是否匹配”的判断由宿主 AI 完成;输出可追溯的结构化输入与报告。
- 不同点:本 skill 面向标书项目(多文件 结构),且默认不做任何自动改写(只输出审查报告)。
\input{}
- Common points: The script only performs deterministic extraction; the judgment of "whether semantics match" is completed by the host AI; outputs traceable structured input and reports.
- Differences: This skill targets proposal projects (multi-file structure) and defaults to no automatic rewriting (only outputs review reports).
\input{}
验证清单(静态自检)
Verification Checklist (Static Self-check)
- 存在且包含 4 个核心产物(json/md/csv/json)。
{project_root}/.nsfc-ref-alignment/run_{timestamp}/ - 最终报告写入 ,且没有任何
report_dir文件被修改。.tex/.bib - 报告对每个 P0/P1 给出:定位(file/line)+ 原句 + 依据 + 建议动作。
- exists and contains 4 core products (json/md/csv/json).
{project_root}/.nsfc-ref-alignment/run_{timestamp}/ - The final report is written to , and no
report_dirfiles are modified..tex/.bib - The report provides for each P0/P1 issue: location (file/line) + original sentence + basis + recommended action.