Skip to content

Commit 439d54d

Browse files
committed
Improve note quality contracts and lint gates
1 parent 4c5552f commit 439d54d

20 files changed

Lines changed: 1397 additions & 70 deletions

SKILL.md

Lines changed: 42 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,31 @@ Follow this order:
6464
7. build the synthesis bundle
6565
8. have Codex/GPT read the bundle and write the note
6666
9. lint the final note
67-
10. write into Obsidian
67+
10. perform `final_readability_review` after lint passes
68+
11. write into Obsidian
69+
70+
This is the required workflow for a normal single-paper note request, not a loose suggestion.
71+
Unless this skill explicitly marks a stage as optional, required stages must not be silently skipped, reordered into a shortcut, or treated as complete just because a partial artifact already exists.
72+
73+
Global no-short-circuit rule:
74+
- do not stop after only the early stages and present the workflow as finished
75+
- do not treat slowness, inconvenience, or temporary uncertainty as permission to bypass a required stage
76+
- do not replace the declared workflow with an improvised shortcut
77+
- if a required stage fails, only do one of three things:
78+
- retry that stage
79+
- enter a fallback that is explicitly allowed by this skill
80+
- stop and report which stage is blocked and which downstream required stages remain incomplete
81+
- do not describe the whole task as complete while required downstream stages are still pending
82+
83+
Completion-language rule:
84+
- say `笔记已完成` only when the required workflow is actually complete
85+
- say `已生成草稿` when drafting is done but lint, final readability review, or save is still pending
86+
- say `已通过校验` only when lint has actually been run and passed
87+
- say `已保存到 Obsidian` only when the write step has actually succeeded
88+
- do not treat `lint 已通过` as equivalent to `整篇笔记已经润色完成`
89+
- if final readability review is still pending, explicitly say the draft passed script lint but has not finished final language review
90+
- if the workflow stopped early, name the current stage and the still-missing required stages instead of using completion language
91+
- lint is a floor, not the writing objective
6892

6993
Read [references/workflow.md](references/workflow.md) for the full pipeline and data contracts.
7094
Read [references/architecture.md](references/architecture.md) for the separation between the reusable core workflow and the Codex-specific adapter layer.
@@ -97,6 +121,7 @@ then switch into setup-assistant mode:
97121
5. if Codex can directly help complete a missing configuration, offer that next
98122

99123
In setup-assistant mode, prefer a practical environment report over generic documentation text.
124+
The no-short-circuit rules above apply to normal note-generation requests, not to this setup-assistant mode.
100125

101126
## Tool and Source Priority
102127

@@ -120,16 +145,26 @@ Zotero-first rule:
120145
## Output Rules
121146

122147
- The default output is a Markdown note written into the Obsidian vault when configured.
123-
- If no Obsidian vault is configured, DeepPaperNote should fall back to saving into the current workspace instead of failing outright.
148+
- Workspace fallback is allowed only when no Obsidian vault is configured at all.
149+
- If an Obsidian vault is configured, DeepPaperNote must treat that vault as the required save target rather than silently switching output roots.
150+
- If the configured vault or its paper-local subdirectories are outside the current writable scope, DeepPaperNote must ask the user for permission escalation instead of downgrading to workspace output.
151+
- If the user refuses that permission escalation, DeepPaperNote must clearly report that the note has not been saved into Obsidian yet.
152+
- After such a refusal, DeepPaperNote may save to the workspace only if it asks again and receives explicit user consent for that fallback.
124153
- By default, each paper should be written into its own same-name folder, with the note and images stored together.
125154
- The note should never default to the bare `20_Research/Papers` root. Choose a domain folder first.
126155
- Domain selection should be conservative: prefer an existing domain folder in the user's vault when there is a reasonable match; only create a new domain folder when no existing domain fits well.
127156
- A normal note-generation request should complete in one pass: note text, figure placeholder decisions, image materialization when confident, and final save.
128157
- Do not stop after a text-only draft just to ask whether the user wants figures inserted. Finish the figure replacement decision inside the same task unless the user explicitly asked for text only.
129158
- Always create the paper-local `images/` folder during final save, even if no high-confidence images were materialized.
159+
- The `images/` folder is part of the required save protocol, not an optional cleanup step. If permission is missing, request it; do not skip the directory.
160+
- Do not present a workspace write as if the Obsidian save already succeeded.
130161
- The note must use real heading levels: `#`, `##`, and `###`.
131-
- The note should include `原始摘要` near the beginning when abstract metadata is available, before `一句话总结`.
132-
- When abstract metadata is available, `原始摘要` should normally contain both the English original and a Chinese translation.
162+
- The note should include `原文摘要翻译` near the beginning when abstract metadata is available, before `一句话总结`.
163+
- When abstract metadata is available, `原文摘要翻译` should directly translate the original paper abstract into Chinese rather than restating it as your own summary.
164+
- The `原文摘要翻译` section itself should be Chinese-only; do not place English abstract sentences or English paragraph excerpts in that section.
165+
- Do not mix later judgments, innovation summaries, or hindsight explanations into `原文摘要翻译`; keep it as the original abstract translated into Chinese.
166+
- The note should include a dedicated `创新点` section immediately after `原文摘要翻译` and before `一句话总结`.
167+
- The `创新点` section should not be empty praise. It should enumerate the paper's actual innovations and briefly explain why each one matters.
133168
- High-quality notes should usually contain multiple meaningful `###` subheadings in the technical sections when the paper is non-trivial.
134169
- The note must include figure/table placeholders for all major visuals rather than silently skipping them.
135170
- Real images may replace some placeholders, but only if they clearly match the corresponding paper figure/table.
@@ -148,6 +183,9 @@ Model-first rule:
148183
- if formulas, objectives, or complexity expressions are central, include the key ones in the final note
149184
- render math as `$...$` or `$$...$$`, not as inline code or fenced code blocks
150185
- before final save, explicitly self-review whether the note contains enough technical detail, key numbers, and any necessary formulas
186+
- after script lint passes, reread the full note once more for readability; do not stop at formal compliance only
187+
- in that final readability review, ordinary English phrase leftovers should usually be rewritten into natural Chinese, while stable proper nouns may remain in English
188+
- do not use the final readability review to invent new facts, empty filler text, or shallower but safer wording just to satisfy lint
151189

152190
Use [references/note-quality.md](references/note-quality.md) for quality checks.
153191
Use [references/paper-types.md](references/paper-types.md) for domain adaptation.

assets/note_template.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616
- 领域:
1717
- 论文类型:
1818

19+
## 原文摘要翻译
20+
21+
## 创新点
22+
1923
## 一句话总结
2024

2125
## 研究问题
@@ -24,6 +28,8 @@
2428

2529
## 方法主线
2630

31+
### 机制流程
32+
2733
## 关键结果
2834

2935
## 深度分析
@@ -33,4 +39,3 @@
3339
## 我的笔记
3440

3541
## 引用
36-

references/deep-analysis.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,17 @@ Explain:
126126
- what the training target or optimization target really is
127127
- how inference or sampling actually proceeds
128128
- which implementation details matter for reproducing the claimed gain
129+
- even if an extracted Algorithm block is broken, reconstruct the mechanism in plain engineering language rather than giving up
130+
- make the reader feel the Input -> key transformation -> Output flow, not just the paper's terminology
131+
132+
For method, framework, or system papers:
133+
- default to an explicit `### 机制流程` subsection inside `方法主线`
134+
- write it as a 3 to 4 step numbered list rather than a long paragraph
135+
- each step should say what goes in, what operation happens, and where the output goes next
136+
- if the paper has both training and inference details, use `### 机制流程` for the dominant execution chain and leave training recipe details to neighboring subsections
129137

130138
For complex papers, use `###` subheadings such as:
139+
- `### 机制流程`
131140
- `### 数据构建`
132141
- `### 中间表征抽取`
133142
- `### 模型结构`
@@ -146,6 +155,8 @@ Include:
146155
For method papers, also ask:
147156
- does the result support the claimed mechanism
148157
- is the gain internal-only or external too
158+
- if the paper reports ablations or removed-module comparisons, include at least one setting that hurt performance, made training unstable, or revealed a trade-off
159+
- if the evidence bundle contains no such negative ablation signal, say explicitly that the paper did not clearly report failed or unstable settings
149160

150161
### 深度分析
151162

@@ -192,6 +203,7 @@ Seed future follow-up with prompts such as:
192203
When the paper has useful visuals:
193204
- preserve placeholders for the important ones
194205
- prioritize one method figure, one data/task figure, and one result figure or table
206+
- if a high-confidence pipeline or architecture figure clearly matches the core execution chain, place it in `### 机制流程` first
195207
- explain why each figure matters
196208
- keep original paper numbering such as `Fig. 1` or `Table 2`
197209

@@ -209,6 +221,8 @@ Typical cases where a formula should appear:
209221
- scaling-law fit
210222

211223
Prefer a few stable, well-explained formulas over many noisy ones.
224+
- after each retained formula, add one short engineering explanation of what it means in implementation terms
225+
- do not stop at naming variables; explain what operation, objective term, or state update the formula corresponds to
212226

213227
## Minimum Honesty Standard
214228

references/figure-placement.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ Priority order:
1717

1818
## Placement Logic
1919

20-
- Put method overview figures in `方法主线`
20+
- Put method overview figures in `### 机制流程` when they directly explain the core execution chain
21+
- If the match is weaker or the note does not need that micro-structure, keep them in `方法主线`
2122
- Put data or task figures in `数据与任务定义`
2223
- Put main result figures or tables in `关键结果`
2324
- Put conceptual diagrams in `研究问题` or `深度分析` if they clarify the argument

references/final-writing.md

Lines changed: 76 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,35 @@ Then draft the final note in natural language.
1414

1515
Near the beginning of the note, include:
1616
- `## 核心信息`
17-
- `## 原始摘要`
17+
- `## 原文摘要翻译`
18+
- `## 创新点`
1819
- `## 一句话总结`
1920

20-
The `原始摘要` section should preserve the paper's original abstract in readable Chinese note context:
21-
- if the abstract is available, include it before the one-sentence summary
21+
`## 核心信息` is a fixed metadata block, not an analysis block.
22+
Rules for this section:
23+
- only use the predefined metadata-style fields from the note template
24+
- keep each line in `- 字段名: 值` form
25+
- do not add ad hoc fields such as judgments, takeaways, or mini-summaries
26+
- do not move explanatory prose, evaluation, or "my view" sentences into this section
27+
- if a field is unavailable, leave it blank or mark it as not clearly available rather than replacing the field with commentary
28+
29+
The `原文摘要翻译` section should be a Chinese translation of the paper's original abstract:
30+
- if the abstract is available, translate the original abstract into Chinese before the one-sentence summary
2231
- do not let the summary replace the abstract
23-
- the summary should explain the paper's real value, while the abstract section preserves the author's original framing
24-
- do not stop at only the English abstract
25-
- inside this section, prefer:
26-
- `### 英文原文`
27-
- `### 中文翻译`
28-
- the Chinese translation should be fluent and faithful, not a second “一句话总结”
32+
- do not treat `原文摘要翻译` as your own summary of the full paper; it is the original abstract translated into Chinese
33+
- do not split this section into `### 英文原文` and `### 中文翻译`
34+
- keep the section title exactly as `原文摘要翻译`
35+
- the `原文摘要翻译` section itself must be written in Chinese; do not output English abstract sentences or English-original paragraphs here
36+
- the Chinese abstract should be fluent and faithful, not a second “一句话总结”
37+
- do not turn `原文摘要翻译` into a selective excerpt or a compressed highlight list
38+
- do not add judgments, hindsight, or details learned from later sections of the paper into `原文摘要翻译`; only translate what the original abstract says
39+
40+
The `创新点` section should be a dedicated top-level section after `原文摘要翻译` rather than a hidden bullet buried later.
41+
It should usually:
42+
- enumerate 3 to 5 paper-specific innovations
43+
- explain what problem each innovation addresses
44+
- explain what new capability, mechanism, or evaluation angle it enables
45+
- avoid generic praise such as “the paper is novel” without locating the novelty
2946

3047
## Writer Persona
3148

@@ -88,6 +105,26 @@ The final Chinese note must also pass a language-cleanliness check:
88105
- no half-English half-Chinese prose lines
89106
- English is allowed only for stable proper nouns or citation metadata
90107
- if the style gate fails, do not write the note into Obsidian yet
108+
- do not write for the linter; lint is only a minimum floor, not the writing objective
109+
- after script lint passes, `final_readability_review` is still required before the note should be treated as polished and ready to save
110+
111+
正文术语策略:
112+
- default to natural Chinese prose in正文分析
113+
- keep English only when it is a stable proper noun or source-faithful technical label
114+
- stable English that may remain:
115+
- model names
116+
- dataset names
117+
- metric names
118+
- method names
119+
- math symbols
120+
- code tokens
121+
- original paper figure/table ids
122+
- English that should usually be rewritten into natural Chinese:
123+
- ordinary English phrases
124+
- abstract descriptive phrases in analytical prose
125+
- leftover English wording that has no clear reason to remain
126+
- when a first mention benefits from both forms, prefer Chinese-first wording with an English gloss in parentheses
127+
- do not leave phrases such as `reasoning dataset`, `distillation risk`, or `reward model quality` directly inside Chinese prose when a natural Chinese rendering is available
91128

92129
For non-trivial papers, the note should usually not stop at only broad `##` sections.
93130
It should use meaningful `###` subheadings where they improve technical clarity.
@@ -105,12 +142,23 @@ Examples:
105142
- `### 哪些地方容易被误读`
106143

107144
For technical papers, also strongly consider subsections such as:
145+
- `### 机制流程`
108146
- `### 训练目标`
109147
- `### 推理与采样链路`
110148
- `### 关键实现细节`
111149
- `### 复杂度与扩展性`
112150
- `### 消融到底说明了什么`
113151

152+
For method, framework, and system papers, prefer an explicit `### 机制流程` subsection instead of hiding the execution chain inside generic prose.
153+
That subsection should usually be a 3 to 4 step numbered list covering:
154+
- what the Input is
155+
- what the main intermediate transformations are
156+
- what the Output is
157+
- what the training or inference loop is actually doing
158+
- do not rely on a damaged Algorithm block to carry this explanation for you
159+
- do not let the steps collapse into module-name listing; each step should describe an operation
160+
- if a high-confidence pipeline or architecture figure matches this execution chain, place it in `### 机制流程`
161+
114162
## Formula Rule
115163

116164
Do not avoid formulas by default.
@@ -127,6 +175,10 @@ Use formulas sparingly and purposefully:
127175
- each formula should help explain the method
128176
- do not dump many formulas just to look technical
129177
- if the source extraction is noisy, prefer reconstructing a small, stable core formula rather than copying broken math verbatim
178+
- after each retained formula, add one sentence explaining what it corresponds to in engineering or code terms
179+
- do not only translate variable names; explain the concrete operation, loss term, update rule, or control effect
180+
- formulas in the final Markdown should be written as directly renderable Obsidian/MathJax math, not as JSON-style escaped strings
181+
- do not double-escape TeX commands such as `\\tau`, `\\frac`, `\\bar`, `\\begin`, or `\\end` when the final note should contain `\tau`, `\frac`, `\bar`, `\begin`, or `\end`
130182
- use real math delimiters:
131183
- inline math: `$...$`
132184
- display math: `$$ ... $$`
@@ -179,7 +231,22 @@ Before outputting the final Markdown, explicitly check:
179231
- does the note contain concrete numbers, dimensions, complexity terms, or formulas when the paper clearly depends on them?
180232
- can a reader familiar with Python and deep learning frameworks follow the core method from this note alone?
181233
- does the method section explain the mechanism rather than only summarize the claim?
234+
- if this is a method/system/framework paper, does `方法主线` explicitly contain `### 机制流程` with a 3 to 4 step numbered list?
235+
- if the evidence bundle contains negative or unstable ablation signals, did the note include at least one of them?
236+
- if the evidence bundle does not contain such signals, did the note explicitly say the paper did not clearly report failed or unstable settings?
182237
- does the note contain at least one honest limitation and one paper-specific insight?
183238
- are there any suspicious mid-sentence line breaks left in the prose?
239+
- after script lint passes, have you reread the full note once more for readability rather than stopping at "lint passed"?
240+
- are there still any stiff translations, awkward Chinese phrasing, or ordinary English phrases that should be rewritten into natural Chinese?
241+
- are there any lines that sound like they were written only to satisfy lint or section compliance rather than to help a real reader?
242+
- if the note includes LaTeX formulas, did you quickly check that the final Markdown uses directly renderable TeX rather than double-escaped commands or broken math delimiters?
243+
244+
This final readability review is a language-and-expression pass, not a second evidence-judgment pass:
245+
- improve fluency and readability
246+
- remove stiff translations
247+
- convert ordinary English phrase leftovers into natural Chinese
248+
- keep stable proper nouns when forcing a translation would sound worse
249+
- do not invent new facts, numbers, comparisons, or failure cases during this pass
250+
- do not use polish as an excuse to flatten the note into a safer but shallower summary
184251

185252
If the answer to the first three questions is "no", the draft is still too shallow and should be revised before save.

0 commit comments

Comments
 (0)