scientify 2.0.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (140) hide show
  1. package/README.en.md +21 -0
  2. package/README.md +21 -0
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +1 -76
  5. package/dist/index.js.map +1 -1
  6. package/dist/src/cli/research.d.ts.map +1 -1
  7. package/dist/src/cli/research.js +6 -23
  8. package/dist/src/cli/research.js.map +1 -1
  9. package/dist/src/commands/metabolism-status.d.ts.map +1 -1
  10. package/dist/src/commands/metabolism-status.js +5 -25
  11. package/dist/src/commands/metabolism-status.js.map +1 -1
  12. package/dist/src/commands.d.ts +8 -8
  13. package/dist/src/commands.d.ts.map +1 -1
  14. package/dist/src/commands.js +91 -262
  15. package/dist/src/commands.js.map +1 -1
  16. package/dist/src/templates/bootstrap.d.ts.map +1 -1
  17. package/dist/src/templates/bootstrap.js +45 -59
  18. package/dist/src/templates/bootstrap.js.map +1 -1
  19. package/dist/src/types.d.ts +2 -10
  20. package/dist/src/types.d.ts.map +1 -1
  21. package/openclaw.plugin.json +3 -16
  22. package/package.json +2 -3
  23. package/skills/idea-generation/SKILL.md +20 -44
  24. package/skills/idea-generation/references/code-mapping.md +3 -3
  25. package/skills/idea-generation/references/idea-template.md +1 -1
  26. package/skills/idea-generation/references/reading-long-papers.md +3 -3
  27. package/skills/metabolism/SKILL.md +80 -36
  28. package/skills/paper-download/SKILL.md +61 -0
  29. package/skills/research-collect/SKILL.md +41 -111
  30. package/skills/research-experiment/SKILL.md +11 -12
  31. package/skills/research-implement/SKILL.md +10 -11
  32. package/skills/research-pipeline/SKILL.md +23 -31
  33. package/skills/research-plan/SKILL.md +7 -11
  34. package/skills/research-review/SKILL.md +21 -22
  35. package/skills/research-survey/SKILL.md +11 -25
  36. package/skills/write-review-paper/SKILL.md +12 -12
  37. package/skills/write-review-paper/references/note-template.md +1 -1
  38. package/skills/write-review-paper/references/survey-template.md +1 -1
  39. package/dist/src/hooks/research-mode.d.ts +0 -22
  40. package/dist/src/hooks/research-mode.d.ts.map +0 -1
  41. package/dist/src/hooks/research-mode.js +0 -35
  42. package/dist/src/hooks/research-mode.js.map +0 -1
  43. package/dist/src/hooks/scientify-cron-autofill.d.ts +0 -15
  44. package/dist/src/hooks/scientify-cron-autofill.d.ts.map +0 -1
  45. package/dist/src/hooks/scientify-cron-autofill.js +0 -156
  46. package/dist/src/hooks/scientify-cron-autofill.js.map +0 -1
  47. package/dist/src/hooks/scientify-signature.d.ts +0 -21
  48. package/dist/src/hooks/scientify-signature.d.ts.map +0 -1
  49. package/dist/src/hooks/scientify-signature.js +0 -150
  50. package/dist/src/hooks/scientify-signature.js.map +0 -1
  51. package/dist/src/knowledge-state/project.d.ts +0 -13
  52. package/dist/src/knowledge-state/project.d.ts.map +0 -1
  53. package/dist/src/knowledge-state/project.js +0 -88
  54. package/dist/src/knowledge-state/project.js.map +0 -1
  55. package/dist/src/knowledge-state/render.d.ts +0 -63
  56. package/dist/src/knowledge-state/render.d.ts.map +0 -1
  57. package/dist/src/knowledge-state/render.js +0 -368
  58. package/dist/src/knowledge-state/render.js.map +0 -1
  59. package/dist/src/knowledge-state/store.d.ts +0 -19
  60. package/dist/src/knowledge-state/store.d.ts.map +0 -1
  61. package/dist/src/knowledge-state/store.js +0 -978
  62. package/dist/src/knowledge-state/store.js.map +0 -1
  63. package/dist/src/knowledge-state/types.d.ts +0 -182
  64. package/dist/src/knowledge-state/types.d.ts.map +0 -1
  65. package/dist/src/knowledge-state/types.js +0 -2
  66. package/dist/src/knowledge-state/types.js.map +0 -1
  67. package/dist/src/literature/subscription-state.d.ts +0 -112
  68. package/dist/src/literature/subscription-state.d.ts.map +0 -1
  69. package/dist/src/literature/subscription-state.js +0 -696
  70. package/dist/src/literature/subscription-state.js.map +0 -1
  71. package/dist/src/research-subscriptions/constants.d.ts +0 -16
  72. package/dist/src/research-subscriptions/constants.d.ts.map +0 -1
  73. package/dist/src/research-subscriptions/constants.js +0 -59
  74. package/dist/src/research-subscriptions/constants.js.map +0 -1
  75. package/dist/src/research-subscriptions/cron-client.d.ts +0 -8
  76. package/dist/src/research-subscriptions/cron-client.d.ts.map +0 -1
  77. package/dist/src/research-subscriptions/cron-client.js +0 -81
  78. package/dist/src/research-subscriptions/cron-client.js.map +0 -1
  79. package/dist/src/research-subscriptions/delivery.d.ts +0 -10
  80. package/dist/src/research-subscriptions/delivery.d.ts.map +0 -1
  81. package/dist/src/research-subscriptions/delivery.js +0 -82
  82. package/dist/src/research-subscriptions/delivery.js.map +0 -1
  83. package/dist/src/research-subscriptions/handlers.d.ts +0 -6
  84. package/dist/src/research-subscriptions/handlers.d.ts.map +0 -1
  85. package/dist/src/research-subscriptions/handlers.js +0 -204
  86. package/dist/src/research-subscriptions/handlers.js.map +0 -1
  87. package/dist/src/research-subscriptions/parse.d.ts +0 -11
  88. package/dist/src/research-subscriptions/parse.d.ts.map +0 -1
  89. package/dist/src/research-subscriptions/parse.js +0 -492
  90. package/dist/src/research-subscriptions/parse.js.map +0 -1
  91. package/dist/src/research-subscriptions/prompt.d.ts +0 -5
  92. package/dist/src/research-subscriptions/prompt.d.ts.map +0 -1
  93. package/dist/src/research-subscriptions/prompt.js +0 -347
  94. package/dist/src/research-subscriptions/prompt.js.map +0 -1
  95. package/dist/src/research-subscriptions/types.d.ts +0 -66
  96. package/dist/src/research-subscriptions/types.d.ts.map +0 -1
  97. package/dist/src/research-subscriptions/types.js +0 -2
  98. package/dist/src/research-subscriptions/types.js.map +0 -1
  99. package/dist/src/research-subscriptions.d.ts +0 -2
  100. package/dist/src/research-subscriptions.d.ts.map +0 -1
  101. package/dist/src/research-subscriptions.js +0 -2
  102. package/dist/src/research-subscriptions.js.map +0 -1
  103. package/dist/src/services/auto-updater.d.ts +0 -15
  104. package/dist/src/services/auto-updater.d.ts.map +0 -1
  105. package/dist/src/services/auto-updater.js +0 -188
  106. package/dist/src/services/auto-updater.js.map +0 -1
  107. package/dist/src/tools/arxiv-download.d.ts +0 -24
  108. package/dist/src/tools/arxiv-download.d.ts.map +0 -1
  109. package/dist/src/tools/arxiv-download.js +0 -177
  110. package/dist/src/tools/arxiv-download.js.map +0 -1
  111. package/dist/src/tools/github-search-tool.d.ts +0 -25
  112. package/dist/src/tools/github-search-tool.d.ts.map +0 -1
  113. package/dist/src/tools/github-search-tool.js +0 -114
  114. package/dist/src/tools/github-search-tool.js.map +0 -1
  115. package/dist/src/tools/openreview-lookup.d.ts +0 -31
  116. package/dist/src/tools/openreview-lookup.d.ts.map +0 -1
  117. package/dist/src/tools/openreview-lookup.js +0 -414
  118. package/dist/src/tools/openreview-lookup.js.map +0 -1
  119. package/dist/src/tools/paper-browser.d.ts +0 -23
  120. package/dist/src/tools/paper-browser.d.ts.map +0 -1
  121. package/dist/src/tools/paper-browser.js +0 -121
  122. package/dist/src/tools/paper-browser.js.map +0 -1
  123. package/dist/src/tools/scientify-cron.d.ts +0 -63
  124. package/dist/src/tools/scientify-cron.d.ts.map +0 -1
  125. package/dist/src/tools/scientify-cron.js +0 -265
  126. package/dist/src/tools/scientify-cron.js.map +0 -1
  127. package/dist/src/tools/scientify-literature-state.d.ts +0 -303
  128. package/dist/src/tools/scientify-literature-state.d.ts.map +0 -1
  129. package/dist/src/tools/scientify-literature-state.js +0 -957
  130. package/dist/src/tools/scientify-literature-state.js.map +0 -1
  131. package/dist/src/tools/unpaywall-download.d.ts +0 -21
  132. package/dist/src/tools/unpaywall-download.d.ts.map +0 -1
  133. package/dist/src/tools/unpaywall-download.js +0 -169
  134. package/dist/src/tools/unpaywall-download.js.map +0 -1
  135. package/dist/src/tools/workspace.d.ts +0 -32
  136. package/dist/src/tools/workspace.d.ts.map +0 -1
  137. package/dist/src/tools/workspace.js +0 -69
  138. package/dist/src/tools/workspace.js.map +0 -1
  139. package/skills/metabolism-init/SKILL.md +0 -80
  140. package/skills/research-subscription/SKILL.md +0 -119
@@ -5,19 +5,7 @@
5
5
  "configSchema": {
6
6
  "type": "object",
7
7
  "additionalProperties": false,
8
- "properties": {
9
- "autoUpdate": {
10
- "type": "boolean",
11
- "default": true,
12
- "description": "Automatically check and install updates (default: true)"
13
- }
14
- }
15
- },
16
- "uiHints": {
17
- "autoUpdate": {
18
- "label": "Auto Update",
19
- "description": "Silently check for and install Scientify updates"
20
- }
8
+ "properties": {}
21
9
  },
22
10
  "skills": [
23
11
  "skills/idea-generation",
@@ -28,9 +16,8 @@
28
16
  "skills/research-review",
29
17
  "skills/research-experiment",
30
18
  "skills/research-collect",
19
+ "skills/paper-download",
31
20
  "skills/write-review-paper",
32
- "skills/research-subscription",
33
- "skills/metabolism",
34
- "skills/metabolism-init"
21
+ "skills/metabolism"
35
22
  ]
36
23
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scientify",
3
- "version": "2.0.0",
3
+ "version": "3.0.0",
4
4
  "description": "Scientify - AI-powered research workflow automation for OpenClaw. Includes idea generation, literature review, research pipeline skills, and arxiv tool.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -40,8 +40,7 @@
40
40
  "release": "npm version patch && git push && git push --tags"
41
41
  },
42
42
  "dependencies": {
43
- "@sinclair/typebox": "^0.32.0",
44
- "tar": "^7.0.0"
43
+ "@sinclair/typebox": "^0.32.0"
45
44
  },
46
45
  "devDependencies": {
47
46
  "@semantic-release/changelog": "^6.0.3",
@@ -19,27 +19,25 @@ Generate innovative research ideas grounded in literature analysis. This skill r
19
19
 
20
20
  **Core principle:** Ideas MUST be grounded in actual papers, not generated from model knowledge.
21
21
 
22
- **Workspace:** `$W` = working directory provided in task parameter. Outputs go to `$W/ideas/`.
22
+ Outputs go to `ideas/`.
23
23
 
24
24
  ---
25
25
 
26
26
  ## Step 1: Check Workspace Resources
27
27
 
28
- First, check what resources already exist in `$W`:
28
+ First, check what resources already exist:
29
29
 
30
30
  ```bash
31
- ls $W/papers/ 2>/dev/null | head -20
32
- ls $W/papers/_meta/ 2>/dev/null | head -10
33
- ls $W/survey/ 2>/dev/null
31
+ ls papers/ 2>/dev/null | head -20
32
+ ls knowledge/ 2>/dev/null
34
33
  ```
35
34
 
36
35
  ### Assess Available Resources
37
36
 
38
37
  | Resource | Location | Status |
39
38
  |----------|----------|--------|
40
- | Papers | `$W/papers/` | Count: ? |
41
- | Survey clusters | `$W/survey/clusters.json` | Exists: Y/N |
42
- | Repos | `$W/repos/` | Count: ? |
39
+ | Papers | `papers/` | Count: ? |
40
+ | Knowledge | `knowledge/_index.md` | Exists: Y/N |
43
41
 
44
42
  ---
45
43
 
@@ -77,7 +75,7 @@ This will:
77
75
  - Search 100+ papers systematically
78
76
  - Filter by relevance (score ≥4)
79
77
  - Cluster into research directions
80
- - Save to $W/papers/
78
+ - Save to papers/
81
79
 
82
80
  After survey completes, run /idea-generation again.
83
81
  ```
@@ -86,31 +84,25 @@ After survey completes, run /idea-generation again.
86
84
 
87
85
  For fast iteration, do minimal search:
88
86
 
89
- 1. **ArXiv search:**
87
+ 1. **Search papers:**
90
88
  ```
91
- Tool: arxiv_search
92
- Arguments:
93
- query: "{user_topic}"
94
- max_results: 10
89
+ arxiv_search({ query: "{user_topic}", max_results: 10 })
90
+ openalex_search({ query: "{user_topic}", max_results: 10 })
95
91
  ```
96
92
 
97
- 2. **Clone 3-5 reference repos:**
98
- ```bash
99
- mkdir -p $W/repos
100
- git clone --depth 1 {repo_url} $W/repos/{name}
101
- ```
93
+ 2. **Download papers:** 按 /paper-download 的方式下载到 `papers/`
102
94
 
103
- 3. **Download paper sources:**
95
+ 3. **Clone reference repos (optional):**
104
96
  ```bash
105
- mkdir -p $W/papers/{arxiv_id}
106
- curl -L "https://arxiv.org/src/{arxiv_id}" | tar -xz -C $W/papers/{arxiv_id}
97
+ gh search repos "{paper_title} implementation" --limit 5 --sort stars
98
+ git clone --depth 1 {repo_url} repos/{name}
107
99
  ```
108
100
 
109
101
  ---
110
102
 
111
103
  ## Step 4: Analyze Literature
112
104
 
113
- **Prerequisites:** At least 5 papers in `$W/papers/`
105
+ **Prerequisites:** At least 5 papers in `papers/`
114
106
 
115
107
  ### 4.1 Read Papers
116
108
 
@@ -130,7 +122,7 @@ Look for:
130
122
  - Scalability issues
131
123
  - Assumptions that could be relaxed
132
124
 
133
- Document gaps in `$W/ideas/gaps.md`:
125
+ Document gaps in `ideas/gaps.md`:
134
126
  ```markdown
135
127
  # Research Gaps Identified
136
128
 
@@ -146,7 +138,7 @@ Document gaps in `$W/ideas/gaps.md`:
146
138
 
147
139
  ## Step 5: Generate 5 Ideas
148
140
 
149
- Create `$W/ideas/idea_1.md` through `idea_5.md` using template in `references/idea-template.md`.
141
+ Create `ideas/idea_1.md` through `idea_5.md` using template in `references/idea-template.md`.
150
142
 
151
143
  **Requirements:**
152
144
  - Each idea cites ≥2 papers by arXiv ID
@@ -175,28 +167,12 @@ Create `$W/ideas/idea_1.md` through `idea_5.md` using template in `references/id
175
167
 
176
168
  ### 6.2 Enhance Selected Idea
177
169
 
178
- Create `$W/ideas/selected_idea.md` with:
170
+ Create `ideas/selected_idea.md` with:
179
171
  - Detailed math (loss functions, gradients)
180
172
  - Architecture choices
181
173
  - Hyperparameters
182
174
  - Implementation roadmap
183
175
 
184
- ### 6.3 (Optional but recommended) OpenReview Evidence Check
185
-
186
- For the top 1-2 shortlisted ideas, validate novelty/positioning risk with `openreview_lookup`:
187
-
188
- - Query using core title keywords or representative baseline paper title
189
- - Extract evidence:
190
- - decision (if available)
191
- - average rating/confidence
192
- - reviewer weakness patterns
193
- - Add a short "submission risk note" section per idea:
194
- - likely reviewer concern
195
- - mitigation experiment to add
196
- - positioning adjustment
197
-
198
- Do not claim accept/reject predictions as facts. Report evidence-backed risk signals only.
199
-
200
176
  ---
201
177
 
202
178
  ## Step 7: Code Survey
@@ -205,13 +181,13 @@ Map idea concepts to reference implementations.
205
181
 
206
182
  See `references/code-mapping.md` for template.
207
183
 
208
- **Output:** `$W/ideas/implementation_report.md`
184
+ **Output:** `ideas/implementation_report.md`
209
185
 
210
186
  ---
211
187
 
212
188
  ## Step 8: Summary
213
189
 
214
- Create `$W/ideas/summary.md`:
190
+ Create `ideas/summary.md`:
215
191
  - All 5 ideas with scores
216
192
  - Selected idea details
217
193
  - Next steps: `/research-pipeline` to implement
@@ -9,13 +9,13 @@ From `selected_idea.md`, list concepts needing implementation.
9
9
  ## Step 2: Survey Codebases
10
10
 
11
11
  ```bash
12
- grep -r "class.*Attention" $WORKSPACE/repos/
13
- grep -r "def forward" $WORKSPACE/repos/
12
+ grep -r "class.*Attention" repos/
13
+ grep -r "def forward" repos/
14
14
  ```
15
15
 
16
16
  ## Step 3: Implementation Report
17
17
 
18
- Write to `$WORKSPACE/ideas/implementation_report.md`:
18
+ Write to `ideas/implementation_report.md`:
19
19
 
20
20
  ```markdown
21
21
  # Implementation Report
@@ -1,6 +1,6 @@
1
1
  # Idea Template
2
2
 
3
- Use this template for each generated idea (`$WORKSPACE/ideas/idea_N.md`).
3
+ Use this template for each generated idea (`ideas/idea_N.md`).
4
4
 
5
5
  ## Required Sections
6
6
 
@@ -5,8 +5,8 @@ For papers >50KB or >15k tokens, use chunked reading.
5
5
  ## Step 1: Structure Scan
6
6
 
7
7
  ```bash
8
- ls -la $WORKSPACE/papers/{arxiv_id}/
9
- wc -l $WORKSPACE/papers/{arxiv_id}/*.tex
8
+ ls -la papers/{arxiv_id}/
9
+ wc -l papers/{arxiv_id}/*.tex
10
10
  ```
11
11
 
12
12
  ## Step 2: Chunked Reading
@@ -16,7 +16,7 @@ Use Read tool with `offset` and `limit`:
16
16
  ```
17
17
  Tool: Read
18
18
  Arguments:
19
- file_path: "$WORKSPACE/papers/2404.04429/main.tex"
19
+ file_path: "papers/2404.04429/main.tex"
20
20
  offset: 1
21
21
  limit: 500 # First 500 lines
22
22
  ```
@@ -1,24 +1,80 @@
1
1
  ---
2
2
  name: metabolism
3
- description: "Knowledge metabolism cycle: ingest new papers, update knowledge state, detect cross-topic links, generate hypotheses. Use /metabolism to trigger manually."
4
- user-invokable: true
3
+ description: "Knowledge metabolism: Day 0 init (discuss + baseline survey) or daily cycle (incremental search + update knowledge + generate hypotheses). Triggered by bootstrap and daily cron."
5
4
  ---
6
5
 
7
- # Continuous Knowledge Metabolism — Incremental Cycle
6
+ # Knowledge Metabolism
8
7
 
9
- 你正在执行知识新陈代谢循环。严格按以下步骤执行。
8
+ 读取 `config.json` 的 `currentDay` 字段判断执行哪个分支:
10
9
 
11
- **前提:** `metabolism/config.json` 必须已存在且 `currentDay >= 1`。如果不存在或 `currentDay` 为 0,提示用户先执行 /metabolism-init 完成初始化。
10
+ - **`currentDay == 0`config.json 不存在** 执行 Day 0(初始化)
11
+ - **`currentDay >= 1`** → 执行每日增量循环
12
12
 
13
- ## 准备
13
+ ---
14
+
15
+ ## Day 0:初始化
16
+
17
+ 与用户讨论研究方向后,构建领域基线知识。
14
18
 
15
- 1. 读取 `metabolism/config.json` 获取关键词、arXiv 分类、`processed_ids` 和 `currentDay`
16
- 2. 读取 `metabolism/knowledge/_index.md` 获取当前知识状态
19
+ ### 准备
17
20
 
18
- ## Step 1: Search(增量搜索)
21
+ 1. 检查 `config.json` 是否存在
22
+ - 不存在:询问用户研究方向,创建 `config.json`(包含 `keywords`, `arxivCategories`, `sources`, `currentDay: 0`, `processed_ids: []`)
23
+ - 已存在且 `currentDay > 0`:跳转到每日循环
19
24
 
20
- 用滑动窗口(过去 5 天)搜索,靠 `processed_ids` 去重:
25
+ ### Step 1: 宽泛调研
21
26
 
27
+ 委托 /research-collect 执行宽泛调研(不限日期),构建初始知识:
28
+
29
+ ```
30
+ sessions_spawn({
31
+ task: "/research-collect\n研究主题: {从 config.json 的 keywords 提取}\n这是 Day 0 基线构建,请做宽泛调研(不限日期),覆盖领域经典工作和近期进展。",
32
+ label: "Day 0 Baseline Survey",
33
+ runTimeoutSeconds: 1800
34
+ })
35
+ ```
36
+
37
+ 等待完成后,读取 `papers/` 获取论文列表。
38
+
39
+ ### Step 2: 阅读与知识提取
40
+
41
+ 对每篇论文:
42
+ - 读 .tex 源码(优先)或 PDF
43
+ - 提取:核心方法、关键结论、领域现状
44
+
45
+ 将每篇论文的 arXiv ID / DOI 追加到 `config.json` 的 `processed_ids`。
46
+
47
+ ### Step 3: 构建初始知识状态
48
+
49
+ 创建 `knowledge/_index.md`:
50
+ - Research Goal(从 config.json 提取)
51
+ - Topics 表格(按论文主题聚类)
52
+ - Cross-topic Links(如有)
53
+ - Timeline(记录 Day 0)
54
+
55
+ 为每个识别出的主题创建 `knowledge/topic-{name}.md`:
56
+ - 已知方法
57
+ - 关键论文与结论
58
+ - 开放问题
59
+
60
+ ### Step 4: 记录日志
61
+
62
+ 写入 `log/{YYYY-MM-DD}-init.md`,更新 `config.json`:`currentDay` 设为 1。
63
+
64
+ ---
65
+
66
+ ## Day 1+:每日增量循环
67
+
68
+ ### 准备
69
+
70
+ 1. 读取 `config.json` 获取关键词、arXiv 分类、`sources`、`processed_ids` 和 `currentDay`
71
+ 2. 读取 `knowledge/_index.md` 获取当前知识状态
72
+
73
+ ### Step 1: Search(增量搜索)
74
+
75
+ 根据 `config.json` 的 `sources` 字段选择搜索来源,用滑动窗口(过去 5 天)搜索,靠 `processed_ids` 去重:
76
+
77
+ **arXiv**(如果 sources 包含 "arxiv"):
22
78
  ```
23
79
  arxiv_search({
24
80
  query: "{keywords} AND cat:{category}",
@@ -26,7 +82,10 @@ arxiv_search({
26
82
  sort_by: "submittedDate",
27
83
  max_results: 30
28
84
  })
85
+ ```
29
86
 
87
+ **OpenAlex**(如果 sources 包含 "openalex"):
88
+ ```
30
89
  openalex_search({
31
90
  query: "{keywords}",
32
91
  filter: "from_publication_date:{5天前 YYYY-MM-DD}",
@@ -37,14 +96,9 @@ openalex_search({
37
96
 
38
97
  合并结果,按 arXiv ID / DOI 去重,**跳过 `processed_ids` 中已有的论文**。
39
98
 
40
- 下载新论文:
99
+ 按 /paper-download 的方式下载新论文到 `papers/`(arXiv 优先 .tex 源文件,DOI 通过 Unpaywall 获取 OA PDF)。
41
100
 
42
- ```
43
- arxiv_download({ arxiv_ids: ["{id1}", "{id2}", ...] })
44
- unpaywall_download({ dois: ["{doi1}", "{doi2}", ...] })
45
- ```
46
-
47
- ## Step 2: Read(阅读)
101
+ ### Step 2: Read(阅读)
48
102
 
49
103
  对每篇新论文:
50
104
  - 读 .tex 源码(优先)或 PDF
@@ -52,9 +106,9 @@ unpaywall_download({ dois: ["{doi1}", "{doi2}", ...] })
52
106
 
53
107
  将每篇论文的 arXiv ID / DOI 追加到 `config.json` 的 `processed_ids`。
54
108
 
55
- ## Step 3: Update Knowledge
109
+ ### Step 3: Update Knowledge
56
110
 
57
- 读取当前 `metabolism/knowledge/_index.md` 和相关 `topic-*.md`,根据今日阅读的论文更新。
111
+ 读取当前 `knowledge/_index.md` 和相关 `topic-*.md`,根据今日阅读的论文更新。
58
112
 
59
113
  **更新原则:**
60
114
  - 新发现 → 添加到相关章节
@@ -64,15 +118,15 @@ unpaywall_download({ dois: ["{doi1}", "{doi2}", ...] })
64
118
 
65
119
  **篇幅管理:** 每个 topic 文件控制在 200 行以内。接近上限时,压缩早期内容(合并相似结论、删除低价值条目),保留信息密度。不要为了压缩而丢失关键结论和来源引用。
66
120
 
67
- ## Step 4: Hypothesize(假设)
121
+ ### Step 4: Hypothesize(假设)
68
122
 
69
- 更新完 knowledge.md 后,回顾今日新增内容,自问:
123
+ 更新完知识后,回顾今日新增内容,自问:
70
124
 
71
125
  - 有没有反复出现但尚未被验证的模式?
72
126
  - 有没有两个独立发现组合后暗示的新方向?
73
127
  - 有没有现有方法的明显空白?
74
128
 
75
- **有想法** → 写入 `metabolism/hypotheses/hyp-{NNN}.md`:
129
+ **有想法** → 写入 `ideas/hyp-{NNN}.md`:
76
130
 
77
131
  ```markdown
78
132
  # Hypothesis {NNN}
@@ -94,27 +148,17 @@ unpaywall_download({ dois: ["{doi1}", "{doi2}", ...] })
94
148
 
95
149
  然后用 `sessions_send` 通知 main session。
96
150
 
97
- **说明:** 发送给用户的内容不要输出“触发条件检查表/列表”,只需解释为什么这个假设合理、哪些已读内容启发了它。
98
-
99
151
  **没有想法** → 跳过,不要硬凑。
100
152
 
101
- ## Step 5: Log & Finish
153
+ ### Step 5: Log & Finish
102
154
 
103
- 写入 `metabolism/log/{YYYY-MM-DD}.md`:
155
+ 写入 `log/{YYYY-MM-DD}.md`,更新 `config.json`:`currentDay` +1。
104
156
 
105
- ```markdown
106
- # Day {currentDay} — {YYYY-MM-DD}
107
-
108
- 新论文: {N} 篇
109
- 知识更新: {简述主要变更}
110
- 假设: {有/无}
111
- ```
112
-
113
- 更新 `config.json`:`currentDay` +1。
157
+ ---
114
158
 
115
159
  ## 行为约束
116
160
 
117
161
  1. 不捏造论文中未出现的事实性声明,但可以用自身知识做推理和关联判断
118
162
  2. 没有想法时不生成假设
119
- 3. 自主运行,不向人类提问
163
+ 3. 自主运行,不向人类提问(Day 0 初始配置除外)
120
164
  4. 修改知识文件前必须先读取当前内容
@@ -0,0 +1,61 @@
1
+ ---
2
+ name: paper-download
3
+ description: "Download academic papers: arXiv source/PDF by ID, DOI papers via Unpaywall open access. Supports batch download."
4
+ ---
5
+
6
+ # Paper Download
7
+
8
+ 将论文下载到当前工作目录的 `papers/` 下。
9
+
10
+ ## arXiv 论文
11
+
12
+ **优先下载 .tex 源文件**(可读性远优于 PDF):
13
+
14
+ ```bash
15
+ mkdir -p papers/{arxiv_id}
16
+ curl -L "https://arxiv.org/src/{arxiv_id}" | tar -xz -C papers/{arxiv_id}
17
+ ```
18
+
19
+ 如果 tar 解压失败(部分论文只提供 PDF),回退到 PDF:
20
+
21
+ ```bash
22
+ curl -L -o papers/{arxiv_id}.pdf "https://arxiv.org/pdf/{arxiv_id}"
23
+ ```
24
+
25
+ > arXiv 限速:连续下载时每篇间隔 3 秒(`sleep 3`)。
26
+
27
+ ## DOI 论文(通过 Unpaywall)
28
+
29
+ 查询开放获取链接,有则下载,无则跳过:
30
+
31
+ ```bash
32
+ curl -s "https://api.unpaywall.org/v2/{doi}?email=research@openclaw.ai" | \
33
+ python3 -c "
34
+ import sys, json
35
+ d = json.load(sys.stdin)
36
+ oa = d.get('best_oa_location') or {}
37
+ url = oa.get('url_for_pdf') or oa.get('url')
38
+ if url: print(url)
39
+ else: print('NO_OA', file=sys.stderr)
40
+ " | xargs -I{} curl -L -o papers/{doi_slug}.pdf "{}"
41
+ ```
42
+
43
+ > `{doi_slug}` = DOI 中的 `/` 替换为 `_`,例如 `10.1000/xyz123` → `10.1000_xyz123`。
44
+ > 非开放获取论文静默跳过,不报错。
45
+
46
+ ## 批量下载
47
+
48
+ ```bash
49
+ # 批量 arXiv
50
+ for id in 2401.12345 2403.00001 2405.67890; do
51
+ mkdir -p papers/$id
52
+ curl -L "https://arxiv.org/src/$id" | tar -xz -C papers/$id || \
53
+ curl -L -o papers/$id.pdf "https://arxiv.org/pdf/$id"
54
+ sleep 3
55
+ done
56
+ ```
57
+
58
+ ## 下载后
59
+
60
+ - 下载的论文 ID 应追加到 `config.json` 的 `processed_ids`(如果存在)
61
+ - 优先读 `.tex` 源码而非 PDF(信息更完整,公式可直接提取)