nsfc-justification-writer
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese科研立项依据写作器
Research Project Justification Writer
目标输出(契约)
Target Output (Contract)
- 唯一写入落点:
extraTex/1.1.立项依据.tex - 禁止改动:、
main.tex、任何extraTex/@config.tex.cls/.sty - 写作目标:把"为什么要做"讲清楚,并为 铺垫"科学问题/假说与切入点"。
(二)研究内容 - AI 依赖:默认使用运行环境提供的 Claude Code / Codex 原生智能(无需配置任何外部 API Key,AI 不可用会自动回退到硬编码能力)
- 理论创新导向(默认):优先关注科学问题/假说的可证伪性、理论贡献的清晰性、验证维度的完备性(详见 theoretical_innovation_guidelines.md)
- 写作导向可配置:在 中用
skills/nsfc-justification-writer/config.yaml切换(默认style.mode=theoretical|mixed|engineering)theoretical
- Only write to:
extraTex/1.1.立项依据.tex - Prohibited modifications: ,
main.tex, anyextraTex/@config.texfiles.cls/.sty - Writing goal: Clearly explain "why this project needs to be done" and lay the groundwork for " (II) Research Content" with "scientific questions/hypotheses and entry points".
- AI dependency: By default, uses the native intelligence of Claude Code / Codex provided by the runtime environment (no need to configure any external API Key; will automatically fall back to hard-coded capabilities if AI is unavailable)
- Theoretical innovation orientation (default): Prioritize the falsifiability of scientific questions/hypotheses, clarity of theoretical contributions, and completeness of verification dimensions (see theoretical_innovation_guidelines.md)
- Configurable writing orientation: Switch using in
style.mode=theoretical|mixed|engineering(default isskills/nsfc-justification-writer/config.yaml)theoretical
必需输入(最小信息表)
Required Input (Minimal Information Form)
- 若用户未提供,请先收集/补全:references/info_form.md
推荐:用脚本快速生成信息表(并可交互填写),见。skills/nsfc-justification-writer/scripts/run.py init
- If not provided by the user, first collect/supplement: references/info_form.md
Recommendation: Use the script to quickly generate the information form (with interactive filling), see.skills/nsfc-justification-writer/scripts/run.py init
工作流(按顺序执行)
Workflow (Execute in Order)
- 定位项目与目标文件:确认 ,读取并仅编辑
project_root。extraTex/1.1.立项依据.tex - 抽取现有骨架:若文件已有 等小标题,优先保留骨架,仅替换正文段落(除非用户要求重构层级)。默认不强制标题精确匹配(
\subsubsection),更关注“内容维度是否覆盖”。strict_title_match=false - 渐进式写作引导(主推):先骨架→再段落→再修订→再润色→再验收(避免一步到位压力)
- 使用 自动判断当前阶段并给出“本轮只做三件事 + 需要你补充的问题 + 可复制提示词”
scripts/run.py coach --stage auto - 每轮只改一个 的正文,配合
\subsubsection安全写入并自动备份apply-section
- 使用
- 生成“立项依据”主叙事(建议 4 段闭环,AI 会检查内容维度覆盖而非死盯标题):
- 价值与必要性:痛点→影响范围/成本→为何现在必须做。
- 现状与不足:主流路线/代表性工作→2–4 个明确不足(尽量可量化/可验证)。
- 科学问题/核心假说:一句假说 + 1–3 个关键科学问题(断点式),指向“可验证”。
- 本项目切入点与贡献:本项目相对现有工作的“差异化切口”,并用 1 句过渡到研究内容。
- 可核验性与引用守护:
- AI 语义识别“可能引起评审不适的表述”(绝对化/填补空白/无依据夸大/自我定性),并给出改写建议;硬编码高风险词仅作提示,不做机械阻断。
- 不写“国际领先/国内首次”等不可证明表述;需要对外部工作举证时,先让用户提供 DOI/链接或调用 核验后再写
nsfc-bib-manager。\cite{...}
- 跨章节一致性检查:检查术语/缩写/指标口径是否能与 对齐;必要时列出需用户确认的 3–5 个关键名词与指标。
2.1 研究内容 - 目标字数解析:优先解析用户意图/信息表中的“字数”/“±范围”/区间描述;无显式指示时再使用配置兜底。
- Locate project and target file: Confirm , read and only edit
project_root.extraTex/1.1.立项依据.tex - Extract existing skeleton: If the file already has subheadings like , prioritize retaining the skeleton and only replace the body paragraphs (unless the user requests restructuring). By default, do not enforce exact title matching (
\subsubsection), focus more on "whether content dimensions are covered".strict_title_match=false - Progressive writing guidance (recommended): Skeleton first → then paragraphs → then revision → then polishing → then acceptance (avoid the pressure of one-step completion)
- Use to automatically judge the current stage and provide "only three tasks for this round + questions you need to supplement + copyable prompts"
scripts/run.py coach --stage auto - Only modify the body of one per round, use
\subsubsectionfor safe writing and automatic backupapply-section
- Use
- Generate the main narrative of "Project Justification" (recommended 4-paragraph closed loop; AI will check content dimension coverage instead of rigidly adhering to titles):
- Value and Necessity: Pain points → scope of impact/cost → why it must be done now.
- Current Status and Limitations: Mainstream approaches/representative works → 2–4 clear limitations (try to be quantifiable/verifiable).
- Scientific Questions/Core Hypotheses: One hypothesis + 1–3 key scientific questions (breakpoint style), oriented towards "verifiability".
- Project Entry Point and Contributions: The "differentiated entry point" of this project compared to existing work, with one transition sentence to the research content.
- Verifiability and Citation Protection:
- AI semantically identifies "expressions that may cause reviewer discomfort" (absolute statements/filling gaps/unsubstantiated exaggerations/self-qualification) and provides rewriting suggestions; hard-coded high-risk words are only for prompts, not mechanical blocking.
- Do not write unprovable statements like "internationally leading/first in China"; when citing external works, first ask the user to provide DOI/link or call for verification before writing
nsfc-bib-manager.\cite{...}
- Cross-section Consistency Check: Check if terms/abbreviations/indicator calibers align with ; if necessary, list 3–5 key nouns and indicators for user confirmation.
2.1 Research Content - Target Word Count Analysis: Prioritize parsing the user's intent/"word count"/"± range"/interval description in the information form; use configuration defaults only if there is no explicit instruction.
配置校验与大文件支持(可选)
Configuration Validation and Large File Support (Optional)
- 配置校验:
python skills/nsfc-justification-writer/scripts/run.py validate-config - 大文件 Tier2:(支持
diagnose/review --tier2 --chunk-size 12000 --max-chunks 20缓存;超大文件会优先使用流式分块以降低峰值内存;用.cache/ai强制重算)--fresh - 说明:本仓库脚本层不会“默认直连外部大模型”;AI 能力是否可用取决于运行环境是否注入 responder(不可用会自动回退到硬编码能力)
- 相关设计说明:
- 内容维度覆盖检查:
skills/nsfc-justification-writer/references/dimension_coverage_design.md - "可能引起评审不适的表述"判别与改写:
skills/nsfc-justification-writer/references/boastful_expression_guidelines.md - 理论创新导向写作指南:(含方法学术语误用警示)
skills/nsfc-justification-writer/references/theoretical_innovation_guidelines.md - 方法学术语误用对比示例:(新增)
skills/nsfc-justification-writer/references/methodology_term_examples.md
- 内容维度覆盖检查:
- Configuration validation:
python skills/nsfc-justification-writer/scripts/run.py validate-config - Large File Tier2: (supports
diagnose/review --tier2 --chunk-size 12000 --max-chunks 20caching; ultra-large files will prioritize streaming chunking to reduce peak memory usage; use.cache/aito force recalculation)--fresh - Note: The script layer of this repository will not "directly connect to external large models by default"; whether AI capabilities are available depends on whether the runtime environment injects a responder (will automatically fall back to hard-coded capabilities if unavailable)
- Related design instructions:
- Content dimension coverage check:
skills/nsfc-justification-writer/references/dimension_coverage_design.md - Identification and rewriting of "expressions that may cause reviewer discomfort":
skills/nsfc-justification-writer/references/boastful_expression_guidelines.md - Theoretical Innovation Orientation Writing Guidelines: (includes warnings on misused methodological terms)
skills/nsfc-justification-writer/references/theoretical_innovation_guidelines.md - Comparison Examples of Misused Methodological Terms: (newly added)
skills/nsfc-justification-writer/references/methodology_term_examples.md
- Content dimension coverage check:
Prompt 模板可配置化(可选)
Configurable Prompt Templates (Optional)
config.yamlpreset.yamloverride.yamlprompts.*- 文件路径:如
prompts/tier2_diagnostic.txt - 直接写多行 Prompt:在 YAML 中用 写入多行文本(适合不同领域改侧重点)
|
也支持按 preset 变体覆盖:例如当 时,可提供 。
--preset medicalprompts.tier2_diagnostic_medicalprompts.*config.yamlpreset.yamloverride.yaml- File path: e.g.,
prompts/tier2_diagnostic.txt - Direct multi-line Prompt: Write multi-line text in YAML using (suitable for adjusting focus in different fields)
|
It also supports override by preset variants: for example, when is used, can be provided.
--preset medicalprompts.tier2_diagnostic_medical推荐 \\subsubsection
标题与内容映射
\\subsubsectionRecommended \\subsubsection
Title and Content Mapping
\\subsubsection说明:模板与 默认推荐 4 个 标题(),而“4 段闭环”是内容叙事逻辑。为避免用户困惑,推荐按下表映射写作:
config.yaml\\subsubsectionstructure.recommended_subsubsections | 对应叙事段落 | 核心写作要素(理论创新导向默认) |
|---|---|---|
| 研究背景 | 价值与必要性 | 理论空白/认知缺失→为何现在必须做(理论驱动) |
| 国内外研究现状 | 现状与不足 | 主流路线→理论局限性(假设过强/框架不统一/因果缺失/界不紧) |
| 现有研究的局限性 | 科学问题/核心假说 | 可证伪假说→关键科学问题→验证维度(理论证明/定理/数值验证) |
| 研究切入点 | 本项目切入点与贡献 | 理论差异化切口(新表征/方法学/统一框架)→承上启下到 2.1 研究内容 |
如用户确需改小标题:建议仍保持 4 段结构,并先统一标题骨架(见 );结构检查不再机械匹配标题,但仍要求至少 4 个小节。
templates/structure_template.texNote: The template and recommend 4 titles by default (), while the "4-paragraph closed loop" is the content narrative logic. To avoid user confusion, recommend mapping writing according to the following table:
config.yaml\subsubsectionstructure.recommended_subsubsections | Corresponding Narrative Paragraph | Core Writing Elements (Theoretical Innovation Orientation by Default) |
|---|---|---|
| Research Background | Value and Necessity | Theoretical gaps/cognitive deficiencies → Why it must be done now (theory-driven) |
| Domestic and International Research Status | Current Limitations | Mainstream approaches → Theoretical Limitations (overly strong assumptions/unified framework missing/causality gaps/loose boundaries) |
| Limitations of Existing Research | Scientific Questions/Core Hypotheses | Falsifiable hypothesis → Key scientific questions → Verification dimensions (theoretical proof/theorem/numerical verification) |
| Research Entry Point | Project Entry Point and Contributions | Theoretical Differentiated Entry Point (new representation/methodology/unified framework) → Transition to 2.1 Research Content |
If the user really needs to modify the subheadings: It is recommended to maintain the 4-paragraph structure and unify the title skeleton first (see ); the structure check will no longer mechanically match titles, but still requires at least 4 sections.
templates/structure_template.tex关键能力
Key Capabilities
用于“先诊断→再生成→再安全写入→再验收”的闭环:
For the closed loop of "diagnose first → then generate → then safe writing → then acceptance":
AI 功能清单(可选增强)
AI Function List (Optional Enhancement)
| 功能 | 是否需要 AI | Fallback 行为 |
|---|---|---|
| Tier1 诊断(结构/引用/字数/高风险示例/危险命令) | ❌ | N/A |
| 内容维度覆盖检查 | ✅ | 启发式关键词检测(兜底) |
| 吹牛式表述识别(语义) | ✅ | 不阻断;仅依赖 Tier1 高风险示例提示 |
| 术语一致性(语义) | ✅ | 仅输出硬编码矩阵( |
| AI 示例推荐(带理由) | ✅ | 关键词/类别启发式匹配 |
| AI 阶段判断(coach --stage auto) | ✅ | 硬编码阈值规则 |
| Tier2 深度诊断(diagnose --tier2) | ✅ | 跳过(仅输出 Tier1) |
AI 是否可用取决于运行环境是否注入 responder;可用自检。skills/nsfc-justification-writer/scripts/run.py check-ai
- Tier1 硬编码诊断:结构(≥4 个 )/引用键是否存在于
\subsubsection/DOI 缺失与格式异常提示/字数统计/高风险表述提示与危险命令扫描.bib - 内容维度覆盖检查(AI):不依赖标题用词,检查“价值与必要性/现状与不足/科学问题/切入点”是否被覆盖
- 吹牛式表述识别(AI):识别绝对化/填补空白式/无依据夸大/自我定性,输出改写建议
- 跨章节一致性矩阵:基于 的
config.yaml(研究对象/指标/术语)做跨章节一致性提示terminology.dimensions - AI 术语一致性(可选):当 AI 可用且 时,额外给出语义视角的“同义词/缩写混用”检查与修改建议(不可用则仅输出矩阵)
terminology.mode=auto/ai - 安全写入工具:按 精确定位并替换正文,写入白名单文件 + 备份(产物放在
\subsubsection{...})skills/nsfc-justification-writer/runs/ - 写入前质量闸门(可选):仅对“本次新增正文”做高风险词/危险命令扫描;若 AI 可用则叠加“吹牛式表述”语义阻断,避免被历史遗留内容卡死
apply-section --strict-quality - 评审建议生成器:基于 DoD + 诊断结果输出“评审人会问什么 + 怎么改”()
scripts/run.py review - 可视化 HTML 诊断报告:快速定位问题()
scripts/run.py diagnose --html-report auto - 版本 diff/回滚:基于 runs 备份做差异查看与一键回滚()
scripts/run.py diff/rollback - 示例推荐:从 读取
examples/关键词,辅助按主题匹配参考骨架(*.metadata.yaml/scripts/run.py coach --topic ...)scripts/run.py examples - AI 示例推荐(可选):当 AI 可用时,优先进行语义匹配并给出“推荐理由”(不可用则回退到关键词/类别启发式)
- AI 阶段判断(可选):coach 在 时,可用 AI 综合字数/结构/质量状态推断“skeleton/draft/revise/polish/final”,AI 不可用时回退到硬编码阈值
--stage auto - 配置覆盖与预设:支持 与
--preset medical/engineering覆盖术语维度等参数(需要时可用~/.config/nsfc-justification-writer/override.yaml关闭)--no-user-override
脚本入口:(用法见 )。
skills/nsfc-justification-writer/scripts/run.pyskills/nsfc-justification-writer/scripts/README.md| Function | AI Required? | Fallback Behavior |
|---|---|---|
| Tier1 Diagnosis (structure/citation/word count/high-risk examples/dangerous commands) | ❌ | N/A |
| Content Dimension Coverage Check | ✅ | Heuristic keyword detection (fallback) |
| Boastful Expression Recognition (semantic) | ✅ | No blocking; only rely on Tier1 high-risk example prompts |
| Term Consistency (semantic) | ✅ | Only output hard-coded matrix ( |
| AI Example Recommendation (with reasons) | ✅ | Keyword/category heuristic matching |
| AI Stage Judgment (coach --stage auto) | ✅ | Hard-coded threshold rules |
| Tier2 In-Depth Diagnosis (diagnose --tier2) | ✅ | Skip (only output Tier1) |
Whether AI is available depends on whether the runtime environment injects a responder; usefor self-test.skills/nsfc-justification-writer/scripts/run.py check-ai
- Tier1 Hard-Coded Diagnosis: Structure (≥4 s) / whether citation keys exist in
\subsubsection/ DOI missing and format abnormality prompts / word count statistics / high-risk expression prompts and dangerous command scanning.bib - Content Dimension Coverage Check (AI): Does not depend on title wording, checks whether "value and necessity/current limitations/scientific questions/entry points" are covered
- Boastful Expression Recognition (AI): Identifies absolute statements/gap-filling/unsubstantiated exaggerations/self-qualification, outputs rewriting suggestions
- Cross-Section Consistency Matrix: Provides cross-section consistency prompts based on (research objects/indicators/terms) in
terminology.dimensionsconfig.yaml - AI Term Consistency (Optional): When AI is available and , additionally provides semantic perspective checks and modification suggestions for "synonym/abbreviation misuse" (only outputs matrix if unavailable)
terminology.mode=auto/ai - Safe Writing Tool: Precisely locates and replaces the body text by , writes to whitelisted files + backup (products are stored in
\subsubsection{...})skills/nsfc-justification-writer/runs/ - Pre-Writing Quality Gate (Optional): only scans the "newly added body text" for high-risk words/dangerous commands; if AI is available, it adds semantic blocking of "boastful expressions" to avoid being stuck by historical content
apply-section --strict-quality - Reviewer Suggestion Generator: Based on DoD + diagnosis results, outputs "what reviewers will ask + how to modify" ()
scripts/run.py review - Visual HTML Diagnosis Report: Quickly locate issues ()
scripts/run.py diagnose --html-report auto - Version Diff/Rollback: View differences and one-click rollback based on runs backups ()
scripts/run.py diff/rollback - Example Recommendation: Read keywords from
*.metadata.yamlto assist in matching reference skeletons by topic (examples//scripts/run.py coach --topic ...)scripts/run.py examples - AI Example Recommendation (Optional): When AI is available, prioritize semantic matching and provide "recommendation reasons" (falls back to keyword/category heuristics if unavailable)
- AI Stage Judgment (Optional): When is used in coach, AI can comprehensively infer "skeleton/draft/revise/polish/final" based on word count/structure/quality status; falls back to hard-coded thresholds if AI is unavailable
--stage auto - Configuration Override and Presets: Supports and
--preset medical/engineeringto override parameters such as term dimensions (can be turned off with~/.config/nsfc-justification-writer/override.yamlif needed)--no-user-override
Script entry: (usage see ).
skills/nsfc-justification-writer/scripts/run.pyskills/nsfc-justification-writer/scripts/README.mdsystematic-literature-review 集成(可选)
systematic-literature-review Integration (Optional)
本技能支持只读访问 生成的文献综述目录,便于引用已有的研究现状内容。
systematic-literature-reviewThis skill supports read-only access to literature review directories generated by , facilitating citation of existing research status content.
systematic-literature-review识别标准
Identification Criteria
目录满足以下任一条件时,自动识别为 systematic-literature-review 生成的目录:
- 存在隐藏文件夹 ,且包含
.systematic-literature-review和{主题}_review.tex/{主题}_参考文献.bib文件(运行中的 pipeline)references.bib - 存在典型的文件组合:+
{主题}_review.tex/{主题}_参考文献.bib+references.bib(已完成的输出目录){主题}_工作条件.md - 存在同名的 和
{主题}_review.tex文件(基于文件名前缀匹配){主题}_参考文献.bib
A directory is automatically identified as a generated directory if it meets any of the following conditions:
systematic-literature-review- Contains a hidden folder , which includes
.systematic-literature-reviewand{topic}_review.tex/{topic}_参考文献.bibfiles (running pipeline)references.bib - Contains typical file combinations: +
{topic}_review.tex/{topic}_参考文献.bib+references.bib(completed output directory){topic}_工作条件.md - Contains files with the same prefix: and
{topic}_review.tex(based on filename prefix matching){topic}_参考文献.bib
只读访问约束
Read-Only Access Constraints
对 systematic-literature-review 生成的目录:
- 只读模式:仅读取 和
.tex文件内容.bib - 禁止写入:不会修改目录中的任何文件
- 引用验证:自动验证 中的引用与
.tex中的定义是否一致.bib
For directories generated by :
systematic-literature-review- Read-only mode: Only read the content of and
.texfiles.bib - No writing allowed: Will not modify any files in the directory
- Citation verification: Automatically verify whether citations in are consistent with definitions in
.tex.bib
使用场景
Usage Scenarios
- 用户要求引用已有的文献综述内容
- 需要从系统综述中提取研究现状信息
- 想要确保引用的一致性
- The user requests to cite existing literature review content
- Need to extract research status information from systematic reviews
- Want to ensure citation consistency
核心功能
Core Functions
- 目录检测:判断是否为 systematic-literature-review 目录
detect_slr_directory(path) - 目录分析:返回目录结构信息
analyze_review_directory(path) - 引用验证:检查引用一致性
validate_citation_consistency(tex_path, bib_path) - 内容提取:从 和
.tex文件中提取关键信息.bib
实现见:
core/review_integration.py- Directory detection: judges whether it is a
detect_slr_directory(path)directorysystematic-literature-review - Directory analysis: returns directory structure information
analyze_review_directory(path) - Citation verification: checks citation consistency
validate_citation_consistency(tex_path, bib_path) - Content extraction: Extract key information from and
.texfiles.bib
Implementation:
core/review_integration.py验收标准(Definition of Done)
Acceptance Criteria (Definition of Done)
- 见:references/dod_checklist.md
- See: references/dod_checklist.md
变更记录
Change Log
- 本技能不在本文档内维护变更历史;统一记录在根级 。
CHANGELOG.md - 版本号仅在 (
skills/nsfc-justification-writer/config.yaml)与本文件 frontmatter 中维护,避免口径分散。skill_info.version
- This skill does not maintain change history in this document; it is uniformly recorded in the root-level .
CHANGELOG.md - Version numbers are only maintained in (
skills/nsfc-justification-writer/config.yaml) and the frontmatter of this file to avoid inconsistent caliber.skill_info.version