Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions skills/deeppapernote/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: deeppapernote
description: Generate a high-quality deep-reading note for a single paper and write it into an Obsidian-style vault. Use when the user gives a paper title, DOI, URL, arXiv ID, Zotero item, or local PDF and wants a polished Markdown note with strong structure, evidence-based analysis, and figure placeholders.
description: Generate a high-quality deep-reading note for a single paper and write it into an Obsidian-style vault. Use when the user gives a paper title, DOI, URL, arXiv ID, Zotero item, or local PDF and wants a polished Markdown note with strong structure, evidence-based analysis, and figure placeholders. Output language follows configuration (zh-CN, en, or ja). Japanese trigger phrases 「この論文の精読ノートを作って」「この論文をObsidianノートにまとめて」「論文を読んで日本語のMarkdownノートにして」.
---

# DeepPaperNote
Expand All @@ -20,6 +20,11 @@ English trigger examples:
- `Generate a deep-reading note for this paper`
- `Turn this paper into an Obsidian research note`

Japanese trigger examples:
- `この論文の精読ノートを作って`
- `この論文をObsidianノートにまとめて`
- `この論文を読んで日本語のMarkdownノートにして`

## User Configuration

Before a normal paper run, read `references/user-configuration.md` for configuration admission, migration, repair, Run Overrides, and Preference Changes.
Expand All @@ -28,7 +33,7 @@ Resolve Run Overrides from the explicit request, CLI, and current process enviro

## Language Integrity Contract

After Configuration Readiness, resolve one `output_language` (`zh-CN` or `en`) for the run. `source_manifest.language_hint` describes source text only and never selects the note profile.
After Configuration Readiness, resolve one `output_language` (`zh-CN`, `en`, or `ja`) for the run. `source_manifest.language_hint` describes source text only and never selects the note profile.

Bind that exact value through Save Target Admission → Figure Plan → Figure/Table Decisions → Synthesis Bundle → Note Plan → Grounding Lint → Final Note Lint → Final Quality Review → Final Readability Review → Formal Save:

Expand Down Expand Up @@ -136,7 +141,7 @@ Non-negotiable rules:
- fail-closed: if a usable PDF or sufficient evidence cannot be obtained after supported acquisition paths, stop and ask for better source material rather than producing a finished degraded note
- model-first: scripts structure evidence, but the model must decide emphasis, contribution, mechanism, limitations, and final prose in the configured language
- required structure: include the localized canonical sections in the order declared by `writing_contract.must_include_sections`
- abstract fidelity: preserve the original abstract's meaning without adding later evidence or model judgments; translate it in `zh-CN` mode and render it faithfully in English in `en` mode
- abstract fidelity: preserve the original abstract's meaning without adding later evidence or model judgments; translate it in `zh-CN` and `ja` modes and render it faithfully in English in `en` mode
- mechanism depth: method, framework, and system papers should include the localized mechanism-flow subsection under the localized method section, normally as a 3 to 4 step numbered flow with input, operation, and output destination
- placeholder-first figures: plan major figure/table placeholders first; replace one only when identity match and visual usability are both strong; otherwise keep the placeholder

Expand Down Expand Up @@ -193,7 +198,7 @@ Formal Save states:
- After the synthesis bundle is built, complete the model-led Visual Review Gate and Figure/Table Decision Freeze before creating `note_plan`; no `review_pending` item may cross that boundary.
- Pass the grounding and final-note figure gates before advancing; revise any failed decision coverage, insertion, structure, or status check.
- An `insert` decision is complete only after Formal Save materializes the selected image into the paper-local `images/` directory and the write succeeds.
- The note must pass the style gate for its configured language: `zh-CN` rejects mixed Chinese-English prose artifacts, while `en` rejects Chinese prose outside citation metadata.
- The note must pass the style gate for its configured language: `zh-CN` rejects mixed Chinese-English prose artifacts, `en` rejects Chinese prose outside citation metadata, and `ja` rejects simplified-Chinese leftovers and mixed Japanese-English prose outside citation metadata.
- The style gate also rejects mechanical term-replacement artifacts such as `KV缓存 of`, `批量ing`, `In相关 Researcher`, or `Single 序列 generation`; rewrite the sentence naturally instead of preserving a partially translated phrase.
- Style gate enforcement: when `lint_note.py` output contains `passes_style_gate: false`, fix the reported issues and re-run lint. Keep fixing and re-running until lint passes — multiple rounds are normal and expected. Do not decide that any failure is an acceptable exception — proper nouns, math formulas, and citation metadata are not automatic exemptions. Only escalate to the user if the same failures appear unchanged across multiple rounds with no reduction, indicating the model is unable to make further progress independently.
- If PDF or evidence quality is insufficient for a real deep note, fail closed: stop, report the blocked stage, and ask for the better PDF, OCR/source material, or other input needed to continue.
Expand Down
209 changes: 209 additions & 0 deletions skills/deeppapernote/references/domain_rules.ja.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,209 @@
# Japanese domain routing taxonomy, selected automatically when output_language is ja.
# Same aliases/keywords as domain_rules.yaml; only folder labels are translated.
# Copy to ~/.deeppapernote/domain_rules.yaml (or point DEEPPAPERNOTE_DOMAIN_RULES at a copy) to customize.
# Application domains are tried before fallback method domains.
domains:
- label: 医療・健康
aliases:
- healthcare
- medical
- clinical medicine
specialized_folders:
- メンタルヘルス
keywords:
- clinical
- patient
- patients
- depression
- anxiety
- mental health
- psychiatric
- psychology
- therapy
- counseling
- symptom
- diagnosis
- screening
- hospital
- healthcare
- medical
methods: []

- label: 法律
aliases:
- legal
- law
keywords:
- legal
- law
- court
- judge
- contract
- statute
- regulation
- litigation
- case law
methods: []

- label: 教育
aliases:
- education
- educational
keywords:
- education
- student
- teacher
- classroom
- curriculum
- tutoring
- learning analytics
- pedagogy
methods: []

- label: 金融
aliases:
- finance
- financial
keywords:
- finance
- financial
- stock
- market
- trading
- portfolio
- risk
- credit
- banking
- investment
methods: []

- label: ロボティクス
aliases:
- robotics
- robotic
keywords:
- robot
- robotics
- robotic
- manipulation
- navigation
- control policy
- locomotion
- autonomous driving
- embodied
methods:
- diffusion policy

- label: ソフトウェア工学
aliases:
- software engineering
keywords:
- software engineering
- code generation
- program repair
- bug
- repository
- developer
- code review
- test generation
- compiler
methods: []

- label: 生物医学
aliases:
- biomedical
- bioinformatics
keywords:
- biomedical
- genomics
- protein
- drug discovery
- molecular
- cell
- gene
- bioinformatics
methods: []

- label: メンタルヘルス
route_to: 医療・健康
aliases:
- mental health
- psychology
- psychiatry
keywords:
- depression
- anxiety
- mental health
- psychiatric
- psychology
- therapy
- counseling
- symptom
methods: []

- label: 推薦システム
aliases:
- recommender systems
- recommendation
keywords:
- recommendation
- recommender
- ctr prediction
- ranking system
- personalization
methods: []

fallback_domains:
- label: 大規模言語モデル
aliases:
- llm
- large language model
- language model
- foundation model
keywords:
- large language model
- llm
- foundation model
- gpt
- transformer
- instruction tuning
- pretrain
- pre-training
- language model
- agent
- multi-agent
- multi agent
- reasoning
- multimodal
- retrieval-augmented generation
- rag
- in-context learning
- long-context
- long context
- mixture-of-experts
- mixture of experts
- moe
- alignment
- rlhf
methods: []

- label: 機械学習
aliases:
- machine learning
- ml
keywords:
- machine learning
- deep learning
- neural network
- representation learning
- reinforcement learning
- computer vision
- graph neural network
- speech recognition
methods: []

- label: 未分類
aliases:
- unclassified
keywords: []
methods: []
45 changes: 43 additions & 2 deletions skills/deeppapernote/references/output-language.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
# Output Language

DeepPaperNote supports two output schemas:
DeepPaperNote supports three output schemas:

| Setting | Language |
|---|---|
| `zh-CN` | Simplified Chinese |
| `en` | English |
| `ja` | Japanese |

Resolve the profile through `user-configuration.md`. For a single command, use `--language en` with `run_pipeline.py`, `build_synthesis_bundle.py`, `lint_note.py`, or `write_obsidian_note.py` where applicable. A Run Override never changes User Configuration.
Resolve the profile through `user-configuration.md`. For a single command, use `--language en` (or `--language ja`) with `run_pipeline.py`, `build_synthesis_bundle.py`, `lint_note.py`, or `write_obsidian_note.py` where applicable. A Run Override never changes User Configuration.

## Simplified Chinese note schema

Expand Down Expand Up @@ -66,6 +67,46 @@ For a materialized image, use the normal image embed followed immediately by one

The English style gate checks headings, Core Information labels, figure callouts, inserted-image captions, and prose. Mark original non-English metadata with inline code inside `Core Information`, or with inline code or a Markdown link inside `References`; closed fenced code blocks and URLs keep their normal source text. In prose, a CJK identifier or stable proper noun must be an HTTP Markdown link or Obsidian wikilink. A source formula may retain only these CJK `\operatorname{...}` labels: `输入`, `输出`, `损失`, `状态`, `动作`, `奖励`, `标签`, `样本`, `预测`, and `目标`. The surrounding text remains subject to the English gate; inline code and free-form math text do not exempt Chinese prose.

## Japanese note schema

Use these top-level sections in this order:

1. `基本情報`
2. `要旨の翻訳`
3. `新規性`
4. `一言まとめ`
5. `研究課題`
6. `データとタスク定義`
7. `手法の骨子`
8. `主要な結果`
9. `深掘り分析`
10. `限界`
11. `私のメモ`
12. `参考文献`

The allowed 基本情報 fields, in order, are:

`タイトル`, `タイトル訳`, `著者`, `所属`, `発表時期`, `発表媒体`, `DOI`, `arXiv`, `論文リンク`, `コード / プロジェクト`, `データ / リソース`, `論文タイプ`.

Use `### 機構フロー` for the mechanism-flow subsection. Each figure placeholder uses:

```md
> [!figure] Figure 2 図の内容を表す短い見出し
> 推奨位置:手法の骨子
> 配置理由:この図は実行経路を明確にする。
> 現在の状態:プレースホルダを保持。切り出した画像は不完全。
```

For a materialized image, use the normal image embed followed immediately by one italic caption beginning with `論文原図番号:`.

`要旨の翻訳` is a faithful Japanese translation of the source abstract. Preserve its meaning and scope; contribution claims, result interpretation, and hindsight judgment belong later unless the source abstract itself contains them.

Write natural Japanese prose (常体・敬体 consistently within a note). Keep stable proper nouns, model names, dataset names, and metric names in their original form; do not force-translate them. Mechanism-flow steps should name 入力 / 操作 / 出力 explicitly.

The Japanese style gate checks headings, 基本情報 labels, figure callouts, inserted-image captions, and prose. Because kanji are shared with Chinese, the gate looks for simplified-Chinese-only characters (机, 图, 论, 议, 态, ...) that never appear in Japanese; any such character in a heading, label, or prose line is a leftover from the Chinese template and fails `passes_style_gate`. Original Chinese metadata is allowed inside `基本情報` and `参考文献` when marked with inline code or a Markdown link, and URLs and closed fenced code blocks keep their source text. Lines that mix Japanese with four or more English words including English function words are also rejected as mixed-language prose.

Domain folders: the skill ships `references/domain_rules.yaml` with Chinese folder labels and `references/domain_rules.ja.yaml` with Japanese ones (医療・健康, 法律, 教育, 金融, ロボティクス, ソフトウェア工学, 生物医学, メンタルヘルス, 推薦システム, 大規模言語モデル, 機械学習, 未分類). When the resolved `output_language` is `ja`, `resolve_domain_subdir` selects the Japanese file automatically, so a Japanese Vault gets Japanese folder names without extra setup. To customize labels, keep a copy outside the skill, either at `~/.deeppapernote/domain_rules.yaml` (next to `config.json`) or at the path named by `DEEPPAPERNOTE_DOMAIN_RULES`; both take precedence over any shipped file, and fallback folder labels are resolved through the `healthcare`, `machine learning`, and `unclassified` aliases of that taxonomy. Existing domain folders already present under the papers root are still reused regardless of language.

## Contract ownership

`SKILL.md` owns the cross-stage Language Integrity Contract. This reference owns only the profile-specific schema and labels above; apply them under the resolved language carried by that contract.
2 changes: 1 addition & 1 deletion skills/deeppapernote/references/user-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ DeepPaperNote can resolve a run entirely from Run Overrides. It also supports on

For isolated validation only, `DEEPPAPERNOTE_CONFIG_PATH` may relocate this one file for the current process. It is not a preference, does not create a second configuration layer, and must not be persisted into the configuration itself.

- `output_language`: `zh-CN` or `en`
- `output_language`: `zh-CN`, `en`, or `ja`
- `save_mode`: `workspace` or `obsidian`
- `obsidian_vault`: existing absolute directory, required only in Obsidian mode
- `papers_dir`: safe relative path inside the Vault, required only in Obsidian mode
Expand Down
2 changes: 1 addition & 1 deletion skills/deeppapernote/scripts/build_synthesis_bundle.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def parser() -> argparse.ArgumentParser:
required=True,
help="Figure/table decision JSON path or string.",
)
p.add_argument("--language", default="", help="Run Override for output language: en or zh-CN.")
p.add_argument("--language", default="", help="Run Override for output language: en, zh-CN, or ja.")
p.add_argument("--output", default="", help="Output JSON path.")
return p

Expand Down
Loading