lifeos 1.0.2 → 1.0.3
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.
- package/README.md +15 -9
- package/README.zh.md +15 -9
- package/assets/lifeos-rules.en.md +1 -1
- package/assets/lifeos-rules.zh.md +1 -1
- package/assets/lifeos.yaml +1 -0
- package/assets/skills/archive/SKILL.en.md +1 -1
- package/assets/skills/archive/SKILL.zh.md +1 -1
- package/assets/skills/ask/SKILL.en.md +1 -1
- package/assets/skills/ask/SKILL.zh.md +1 -1
- package/assets/skills/brainstorm/SKILL.en.md +1 -1
- package/assets/skills/brainstorm/SKILL.zh.md +1 -1
- package/assets/skills/digest/SKILL.en.md +212 -0
- package/assets/skills/digest/SKILL.zh.md +207 -0
- package/assets/skills/digest/references/__pycache__/rss-arxiv-script.cpython-312.pyc +0 -0
- package/assets/skills/digest/references/config-parser.en.md +179 -0
- package/assets/skills/digest/references/config-parser.zh.md +177 -0
- package/assets/skills/digest/references/rss-arxiv-script.py +1549 -0
- package/assets/skills/digest/references/run-pipeline.en.md +236 -0
- package/assets/skills/digest/references/run-pipeline.zh.md +235 -0
- package/assets/skills/digest/references/setup-guide.en.md +192 -0
- package/assets/skills/digest/references/setup-guide.zh.md +188 -0
- package/assets/skills/knowledge/SKILL.en.md +1 -1
- package/assets/skills/knowledge/SKILL.zh.md +1 -1
- package/assets/skills/project/SKILL.en.md +1 -1
- package/assets/skills/project/SKILL.zh.md +1 -1
- package/assets/skills/read-pdf/SKILL.en.md +1 -1
- package/assets/skills/read-pdf/SKILL.zh.md +1 -1
- package/assets/skills/research/SKILL.en.md +1 -1
- package/assets/skills/research/SKILL.zh.md +1 -1
- package/assets/skills/revise/SKILL.en.md +1 -1
- package/assets/skills/revise/SKILL.zh.md +1 -1
- package/assets/skills/today/SKILL.en.md +1 -1
- package/assets/skills/today/SKILL.zh.md +1 -1
- package/dist/cli/commands/doctor.js +9 -9
- package/dist/cli/commands/doctor.js.map +1 -1
- package/dist/cli/commands/upgrade.js +20 -2
- package/dist/cli/commands/upgrade.js.map +1 -1
- package/dist/cli/utils/install-assets.js +6 -2
- package/dist/cli/utils/install-assets.js.map +1 -1
- package/dist/config.d.ts +1 -0
- package/dist/config.js +2 -0
- package/dist/config.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/server.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
# Run Mode Pipeline
|
|
2
|
+
|
|
3
|
+
When the user runs `/digest` or `/digest <topic>`, follow this pipeline to fetch updates and generate the digest.
|
|
4
|
+
|
|
5
|
+
## Preflight
|
|
6
|
+
|
|
7
|
+
1. Check that Python 3 is available: `python3 --version`
|
|
8
|
+
- unavailable → ask the user to install Python 3 and stop
|
|
9
|
+
2. Scan `.md` files under `{system directory}/{digest subdirectory}/`
|
|
10
|
+
- no config files → automatically enter Setup mode (see `setup-guide.md`)
|
|
11
|
+
- topic specified → load only the matching file
|
|
12
|
+
- no topic specified → load every config file and run them one by one
|
|
13
|
+
|
|
14
|
+
## Execution Pipeline (run per topic)
|
|
15
|
+
|
|
16
|
+
### Phase 1: Parse the Config
|
|
17
|
+
|
|
18
|
+
Parse the config note according to `config-parser.md` and produce structured data:
|
|
19
|
+
|
|
20
|
+
```text
|
|
21
|
+
config = {
|
|
22
|
+
topic: "LLM Agent",
|
|
23
|
+
period_days: 7,
|
|
24
|
+
language: "English",
|
|
25
|
+
modules: {
|
|
26
|
+
rss: { enabled, feeds },
|
|
27
|
+
papers: { enabled, sources },
|
|
28
|
+
web: { enabled, queries, sites },
|
|
29
|
+
huggingface: { enabled, keywords },
|
|
30
|
+
github: { enabled, keywords }
|
|
31
|
+
},
|
|
32
|
+
categories: [{ name, scope }]
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Legacy `arxiv` blocks are still accepted during the transition and are normalized into
|
|
37
|
+
`papers.sources` before execution.
|
|
38
|
+
|
|
39
|
+
Compute the date range:
|
|
40
|
+
|
|
41
|
+
- `end_date` = today
|
|
42
|
+
- `start_date` = today - `period_days`
|
|
43
|
+
- `date_range_str` = `MMDD-MMDD` for the filename
|
|
44
|
+
- `date_range_display` = `YYYY-MM-DD ~ YYYY-MM-DD` for the title
|
|
45
|
+
|
|
46
|
+
### Phase 2: Fetch in Parallel
|
|
47
|
+
|
|
48
|
+
Run enabled modules in parallel. RSS + arXiv use the Python helper; the rest use agent tools.
|
|
49
|
+
|
|
50
|
+
#### Task A: RSS + paper sources (Python helper)
|
|
51
|
+
|
|
52
|
+
For paper sources, the helper should use this runtime contract:
|
|
53
|
+
|
|
54
|
+
1. normalize `Paper Sources` rows into source adapter inputs
|
|
55
|
+
2. run the source adapters for `arXiv`, `bioRxiv`, `medRxiv`, `ChemRxiv`, `SocArXiv`, and `SSRN`
|
|
56
|
+
3. return normalized papers plus structured per-source errors
|
|
57
|
+
4. if one source fails, keep the successful sources and report the failure in `errors`
|
|
58
|
+
5. legacy `arxiv` config blocks are converted into `arXiv` adapter inputs before execution
|
|
59
|
+
6. the `arXiv` adapter retains the existing OpenAlex fallback behavior when arXiv lookups fail
|
|
60
|
+
7. `SocArXiv` may normalize to `OSF` landing pages; `SSRN` prefers source-hosted SSRN links
|
|
61
|
+
8. keep the transport low-budget: one primary request per source and no pagination
|
|
62
|
+
|
|
63
|
+
Build the JSON input and send it through stdin:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
echo '<json_config>' | python3 .agents/skills/digest/references/rss-arxiv-script.py
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
The payload should include at least:
|
|
70
|
+
|
|
71
|
+
```json
|
|
72
|
+
{
|
|
73
|
+
"language": "en",
|
|
74
|
+
"rss": {...},
|
|
75
|
+
"papers": {
|
|
76
|
+
"enabled": true,
|
|
77
|
+
"sources": [
|
|
78
|
+
{
|
|
79
|
+
"source_type": "arXiv",
|
|
80
|
+
"query": "\"llm agent\"",
|
|
81
|
+
"scope": "cs.AI",
|
|
82
|
+
"notes": "Core technical papers"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"source_type": "bioRxiv",
|
|
86
|
+
"query": "single-cell",
|
|
87
|
+
"scope": "Neuroscience",
|
|
88
|
+
"notes": "Biomedical preprints"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"source_type": "SocArXiv",
|
|
92
|
+
"query": "social identity",
|
|
93
|
+
"scope": "Sociology",
|
|
94
|
+
"notes": "Social science preprints"
|
|
95
|
+
}
|
|
96
|
+
]
|
|
97
|
+
},
|
|
98
|
+
"days": 7
|
|
99
|
+
}
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
The script returns JSON:
|
|
103
|
+
|
|
104
|
+
```json
|
|
105
|
+
{
|
|
106
|
+
"rss_articles": [...],
|
|
107
|
+
"papers": [...],
|
|
108
|
+
"stats": { "rss_count": 12, "paper_count": 45 },
|
|
109
|
+
"errors": [...]
|
|
110
|
+
}
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
#### Task B: Web Search (WebSearch)
|
|
114
|
+
|
|
115
|
+
For each query template:
|
|
116
|
+
|
|
117
|
+
1. replace `{date range}` with the actual date span
|
|
118
|
+
2. run WebSearch
|
|
119
|
+
3. collect the results
|
|
120
|
+
|
|
121
|
+
For each supplemental site:
|
|
122
|
+
|
|
123
|
+
1. build a `site:{url} {topic}` query
|
|
124
|
+
2. run WebSearch
|
|
125
|
+
|
|
126
|
+
Use `defuddle` on high-value results when the article body matters.
|
|
127
|
+
|
|
128
|
+
#### Task C: HuggingFace Papers (WebFetch)
|
|
129
|
+
|
|
130
|
+
1. open `https://huggingface.co/papers`
|
|
131
|
+
2. filter results with the configured keywords
|
|
132
|
+
3. collect title, link, and short description
|
|
133
|
+
4. deduplicate against arXiv results with fuzzy title matching
|
|
134
|
+
|
|
135
|
+
#### Task D: GitHub Trending (WebFetch, optional)
|
|
136
|
+
|
|
137
|
+
1. open `https://github.com/trending`
|
|
138
|
+
2. filter repositories with the configured keywords
|
|
139
|
+
3. collect repository name, description, stars, and link
|
|
140
|
+
|
|
141
|
+
### Phase 3: Merge and Deduplicate
|
|
142
|
+
|
|
143
|
+
1. **Deduplication**
|
|
144
|
+
- when two items refer to the same paper (title similarity > 80%), keep the richest source
|
|
145
|
+
- priority: arXiv original > HuggingFace > RSS summary > Web search
|
|
146
|
+
|
|
147
|
+
2. **Categorization**
|
|
148
|
+
- match titles and summaries against the configured category system
|
|
149
|
+
- the "Key Papers / Key Articles" section should contain the 3-5 most important items overall
|
|
150
|
+
- uncategorized items fall back to the last category, usually "Industry Updates"
|
|
151
|
+
|
|
152
|
+
3. **Summary writing**
|
|
153
|
+
- write a 1-2 sentence English summary for each item
|
|
154
|
+
- include the source link
|
|
155
|
+
|
|
156
|
+
### Phase 4: Write the Digest
|
|
157
|
+
|
|
158
|
+
Write `{drafts directory}/{topic_name}-{date_range_str}.md`.
|
|
159
|
+
|
|
160
|
+
**Frontmatter:**
|
|
161
|
+
|
|
162
|
+
```yaml
|
|
163
|
+
---
|
|
164
|
+
title: "{topic_display} Weekly Digest · {date_range_display}"
|
|
165
|
+
type: draft
|
|
166
|
+
created: "{YYYY-MM-DD}"
|
|
167
|
+
status: pending
|
|
168
|
+
tags: [digest, {topic_tag}, weekly-digest]
|
|
169
|
+
aliases: []
|
|
170
|
+
---
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
**Body structure:**
|
|
174
|
+
|
|
175
|
+
```markdown
|
|
176
|
+
# {topic_display} Weekly Digest · {date_range_display}
|
|
177
|
+
|
|
178
|
+
> Auto-compiled · RSS {N} items · arXiv {M} items · Web {K} additions · Generated at {HH:MM}
|
|
179
|
+
|
|
180
|
+
## {category_1}
|
|
181
|
+
|
|
182
|
+
- **[Title](link)** — one-sentence English summary
|
|
183
|
+
|
|
184
|
+
## {category_2}
|
|
185
|
+
|
|
186
|
+
...
|
|
187
|
+
|
|
188
|
+
---
|
|
189
|
+
|
|
190
|
+
## Sources
|
|
191
|
+
|
|
192
|
+
**RSS feeds:** {rss_names_list}
|
|
193
|
+
**Paper sources:** {paper_source_summaries}
|
|
194
|
+
**Legacy arXiv search:** {legacy_arxiv_summary if present}
|
|
195
|
+
**Web search:** {web_sites_list}
|
|
196
|
+
**HuggingFace:** huggingface.co/papers
|
|
197
|
+
**GitHub:** github.com/trending
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
Only list enabled modules. Omit empty categories.
|
|
201
|
+
|
|
202
|
+
### Phase 5: Wrap-up
|
|
203
|
+
|
|
204
|
+
1. call `memory_notify(file_path="{digest file path}")`
|
|
205
|
+
2. print the completion message:
|
|
206
|
+
|
|
207
|
+
```text
|
|
208
|
+
Weekly digest written to {drafts directory}/{topic_name}-{date_range_str}.md
|
|
209
|
+
RSS {N} items + arXiv {M} items + Web {K} items
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
## Multi-topic Runs
|
|
213
|
+
|
|
214
|
+
When `/digest` is called without arguments and multiple config files exist:
|
|
215
|
+
|
|
216
|
+
- run them in filename order
|
|
217
|
+
- produce one digest per topic
|
|
218
|
+
- print a summary after all topics finish
|
|
219
|
+
|
|
220
|
+
```text
|
|
221
|
+
All weekly digests generated:
|
|
222
|
+
- LLM-Agent: 00_Drafts/LLM-Agent-0324-0330.md (RSS 12 + arXiv 45 + Web 8)
|
|
223
|
+
- SpatialAI: 00_Drafts/SpatialAI-0324-0330.md (RSS 8 + arXiv 67 + Web 5)
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
## Error Handling
|
|
227
|
+
|
|
228
|
+
| Error | Handling |
|
|
229
|
+
|-------|----------|
|
|
230
|
+
| Python unavailable | tell the user to install Python and stop |
|
|
231
|
+
| RSS feed timeout | mark that source as failed and continue |
|
|
232
|
+
| paper source adapter failure | record a structured source error and continue with the other sources |
|
|
233
|
+
| arXiv API unavailable | record a structured arXiv error and try OpenAlex fallback |
|
|
234
|
+
| WebSearch returns nothing | skip that query and continue |
|
|
235
|
+
| config parsing fails | raise an error with the concrete problem |
|
|
236
|
+
| every source fails | do not generate a digest; report the failure reasons |
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
# Run 模式执行管线
|
|
2
|
+
|
|
3
|
+
当用户执行 `/digest` 或 `/digest <主题名>` 时,按此管线执行信息抓取和周报生成。
|
|
4
|
+
|
|
5
|
+
## 前置检查
|
|
6
|
+
|
|
7
|
+
1. 检查 Python 3 是否可用:`python3 --version`
|
|
8
|
+
- 不可用 → 提示用户安装 Python 3 并重试
|
|
9
|
+
2. 扫描 `{系统目录}/{信息子目录}/` 下的 `.md` 文件
|
|
10
|
+
- 无配置文件 → 自动进入 Setup 模式(见 `setup-guide.md`)
|
|
11
|
+
- 指定了主题名 → 只加载匹配文件
|
|
12
|
+
- 未指定主题名 → 加载全部配置并逐个执行
|
|
13
|
+
|
|
14
|
+
## 执行管线(每个主题独立执行)
|
|
15
|
+
|
|
16
|
+
### Phase 1: 解析配置
|
|
17
|
+
|
|
18
|
+
按 `config-parser.md` 规范解析配置笔记,产出结构化数据:
|
|
19
|
+
|
|
20
|
+
```text
|
|
21
|
+
config = {
|
|
22
|
+
topic: "LLM Agent",
|
|
23
|
+
period_days: 7,
|
|
24
|
+
language: "中文",
|
|
25
|
+
modules: {
|
|
26
|
+
rss: { enabled, feeds },
|
|
27
|
+
papers: { enabled, sources },
|
|
28
|
+
web: { enabled, queries, sites },
|
|
29
|
+
huggingface: { enabled, keywords },
|
|
30
|
+
github: { enabled, keywords }
|
|
31
|
+
},
|
|
32
|
+
categories: [{ name, scope }]
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
旧版 `arxiv` 配置块在过渡期内仍然兼容,会在执行前归一化为 `papers.sources`。
|
|
37
|
+
|
|
38
|
+
计算日期范围:
|
|
39
|
+
|
|
40
|
+
- `end_date` = 今天
|
|
41
|
+
- `start_date` = 今天 - `period_days`
|
|
42
|
+
- `date_range_str` = `MMDD-MMDD`(用于文件名)
|
|
43
|
+
- `date_range_display` = `YYYY-MM-DD ~ YYYY-MM-DD`(用于标题)
|
|
44
|
+
|
|
45
|
+
### Phase 2: 并行抓取
|
|
46
|
+
|
|
47
|
+
按启用的模块执行抓取。RSS + arXiv 通过 Python 脚本批量处理,其余通过 Agent 工具处理。
|
|
48
|
+
|
|
49
|
+
#### Task A: RSS + paper sources(Python 脚本)
|
|
50
|
+
|
|
51
|
+
对论文来源,脚本应遵循以下运行契约:
|
|
52
|
+
|
|
53
|
+
1. 将 `Paper Sources` 行归一化为来源 adapter 输入
|
|
54
|
+
2. 依次运行 `arXiv`、`bioRxiv`、`medRxiv`、`ChemRxiv`、`SocArXiv`、`SSRN` 的来源 adapters
|
|
55
|
+
3. 返回归一化后的论文结果以及结构化的逐来源错误
|
|
56
|
+
4. 某个来源失败时,保留成功来源并把失败写入 `errors`
|
|
57
|
+
5. 旧版 `arxiv` 配置块会先转换成 `arXiv` adapter 输入,再继续执行
|
|
58
|
+
6. `arXiv` adapter 在 arXiv 检索失败时会保留现有的 OpenAlex fallback 行为
|
|
59
|
+
7. `SocArXiv` 可以归一化到 `OSF` 落地页;`SSRN` 优先保留源站 SSRN 链接
|
|
60
|
+
8. 传输层保持低请求预算:每个来源一次主请求,不做分页
|
|
61
|
+
|
|
62
|
+
构造 JSON 输入并通过 stdin 传给脚本:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
echo '<json_config>' | python3 .agents/skills/digest/references/rss-arxiv-script.py
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
JSON 输入从 Phase 1 的配置构造,至少包括:
|
|
69
|
+
|
|
70
|
+
```json
|
|
71
|
+
{
|
|
72
|
+
"language": "zh",
|
|
73
|
+
"rss": {...},
|
|
74
|
+
"papers": {
|
|
75
|
+
"enabled": true,
|
|
76
|
+
"sources": [
|
|
77
|
+
{
|
|
78
|
+
"source_type": "arXiv",
|
|
79
|
+
"query": "\"llm agent\"",
|
|
80
|
+
"scope": "cs.AI",
|
|
81
|
+
"notes": "核心技术论文"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"source_type": "bioRxiv",
|
|
85
|
+
"query": "single-cell",
|
|
86
|
+
"scope": "Neuroscience",
|
|
87
|
+
"notes": "生物医学预印本"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"source_type": "SocArXiv",
|
|
91
|
+
"query": "social identity",
|
|
92
|
+
"scope": "Sociology",
|
|
93
|
+
"notes": "社会科学预印本"
|
|
94
|
+
}
|
|
95
|
+
]
|
|
96
|
+
},
|
|
97
|
+
"days": 7
|
|
98
|
+
}
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
脚本输出 JSON:
|
|
102
|
+
|
|
103
|
+
```json
|
|
104
|
+
{
|
|
105
|
+
"rss_articles": [...],
|
|
106
|
+
"papers": [...],
|
|
107
|
+
"stats": { "rss_count": 12, "paper_count": 45 },
|
|
108
|
+
"errors": [...]
|
|
109
|
+
}
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
#### Task B: Web 搜索(WebSearch)
|
|
113
|
+
|
|
114
|
+
对每条搜索查询模板:
|
|
115
|
+
|
|
116
|
+
1. 将 `{日期范围}` 替换为实际日期
|
|
117
|
+
2. 执行 WebSearch
|
|
118
|
+
3. 收集结果
|
|
119
|
+
|
|
120
|
+
对补充站点:
|
|
121
|
+
|
|
122
|
+
1. 生成 `site:{url} {topic}` 查询
|
|
123
|
+
2. 执行 WebSearch
|
|
124
|
+
|
|
125
|
+
对高价值结果,用 `defuddle` 提取正文摘要。
|
|
126
|
+
|
|
127
|
+
#### Task C: HuggingFace 热门论文(WebFetch)
|
|
128
|
+
|
|
129
|
+
1. 用 WebFetch 打开 `https://huggingface.co/papers`
|
|
130
|
+
2. 用配置关键词过滤结果
|
|
131
|
+
3. 记录标题、链接和简要描述
|
|
132
|
+
4. 与 arXiv 结果去重(按标题模糊匹配)
|
|
133
|
+
|
|
134
|
+
#### Task D: GitHub Trending(WebFetch,仅启用时)
|
|
135
|
+
|
|
136
|
+
1. 用 WebFetch 打开 `https://github.com/trending`
|
|
137
|
+
2. 用配置关键词过滤结果
|
|
138
|
+
3. 记录仓库名、描述、星标数和链接
|
|
139
|
+
|
|
140
|
+
### Phase 3: 合并去重
|
|
141
|
+
|
|
142
|
+
1. **去重规则**
|
|
143
|
+
- 同一论文(标题相似度 > 80%)只保留最详细来源
|
|
144
|
+
- 优先级:arXiv 原文 > HuggingFace > RSS 摘要 > Web 搜索
|
|
145
|
+
|
|
146
|
+
2. **分类归类**
|
|
147
|
+
- 根据标题和摘要匹配配置中的分类体系
|
|
148
|
+
- 「重要论文/重要文章」分类从全量结果里选出影响最大的 3-5 条
|
|
149
|
+
- 无法归类的信息放入最后一个分类(通常是「行业动态」)
|
|
150
|
+
|
|
151
|
+
3. **摘要生成**
|
|
152
|
+
- 每条信息用 1-2 句中文提炼核心内容
|
|
153
|
+
- 附原文链接
|
|
154
|
+
|
|
155
|
+
### Phase 4: 写入周报
|
|
156
|
+
|
|
157
|
+
写入 `{草稿目录}/{topic_name}-{date_range_str}.md`。
|
|
158
|
+
|
|
159
|
+
**Frontmatter:**
|
|
160
|
+
|
|
161
|
+
```yaml
|
|
162
|
+
---
|
|
163
|
+
title: "{topic_display} 周报 · {date_range_display}"
|
|
164
|
+
type: draft
|
|
165
|
+
created: "{YYYY-MM-DD}"
|
|
166
|
+
status: pending
|
|
167
|
+
tags: [digest, {topic_tag}, weekly-digest]
|
|
168
|
+
aliases: []
|
|
169
|
+
---
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
**正文结构:**
|
|
173
|
+
|
|
174
|
+
```markdown
|
|
175
|
+
# {topic_display} 周报 · {date_range_display}
|
|
176
|
+
|
|
177
|
+
> 自动汇总 · RSS {N} 篇 · arXiv {M} 篇 · Web 补充 {K} 条 · 生成时间 {HH:MM}
|
|
178
|
+
|
|
179
|
+
## {category_1}
|
|
180
|
+
|
|
181
|
+
- **[标题](链接)** — 一句话中文摘要
|
|
182
|
+
|
|
183
|
+
## {category_2}
|
|
184
|
+
|
|
185
|
+
...
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
## 信息来源
|
|
190
|
+
|
|
191
|
+
**RSS 订阅:** {rss_names_list}
|
|
192
|
+
**论文来源:** {paper_source_summaries}
|
|
193
|
+
**旧版 arXiv 搜索:** {legacy_arxiv_summary if present}
|
|
194
|
+
**Web 搜索:** {web_sites_list}
|
|
195
|
+
**HuggingFace:** huggingface.co/papers
|
|
196
|
+
**GitHub:** github.com/trending
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
只列出已启用模块的来源。空分类不输出。
|
|
200
|
+
|
|
201
|
+
### Phase 5: 收尾
|
|
202
|
+
|
|
203
|
+
1. 调用 `memory_notify(file_path="{周报文件路径}")`
|
|
204
|
+
2. 输出完成提示:
|
|
205
|
+
|
|
206
|
+
```text
|
|
207
|
+
✅ {topic_display} 周报已写入:{草稿目录}/{topic_name}-{date_range_str}.md
|
|
208
|
+
RSS {N} 篇 + arXiv {M} 篇 + Web {K} 条
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
## 多主题执行
|
|
212
|
+
|
|
213
|
+
当无参数调用 `/digest` 且存在多个配置文件时:
|
|
214
|
+
|
|
215
|
+
- 按文件名字母序逐个执行
|
|
216
|
+
- 每个主题独立产出一份周报
|
|
217
|
+
- 全部主题完成后统一输出汇总
|
|
218
|
+
|
|
219
|
+
```text
|
|
220
|
+
✅ 全部周报已生成:
|
|
221
|
+
- LLM-Agent: 00_草稿/LLM-Agent-0324-0330.md(RSS 12 + arXiv 45 + Web 8)
|
|
222
|
+
- SpatialAI: 00_草稿/SpatialAI-0324-0330.md(RSS 8 + arXiv 67 + Web 5)
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
## 错误处理
|
|
226
|
+
|
|
227
|
+
| 错误 | 处理 |
|
|
228
|
+
|------|------|
|
|
229
|
+
| Python 不可用 | 报错提示安装并中止执行 |
|
|
230
|
+
| RSS feed 超时 | 标记失败,继续其他来源 |
|
|
231
|
+
| 论文来源 adapter 失败 | 记录结构化来源错误,继续执行其他来源 |
|
|
232
|
+
| arXiv API 无响应 | 记录结构化 arXiv 错误,并尝试 OpenAlex fallback |
|
|
233
|
+
| WebSearch 无结果 | 跳过该查询,继续 |
|
|
234
|
+
| 配置解析失败 | 报错并提示具体问题 |
|
|
235
|
+
| 所有来源均失败 | 不生成周报,报告失败原因 |
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
# Setup Mode Guide
|
|
2
|
+
|
|
3
|
+
Use this flow when the user first runs `/digest` or explicitly asks for `/digest setup`.
|
|
4
|
+
|
|
5
|
+
## Trigger Conditions
|
|
6
|
+
|
|
7
|
+
- no `.md` config files exist under `{system directory}/{digest subdirectory}/`
|
|
8
|
+
- the user explicitly runs `/digest setup` or `/digest setup <topic>`
|
|
9
|
+
|
|
10
|
+
## Conversation Flow
|
|
11
|
+
|
|
12
|
+
### Step 1: Define the Topic
|
|
13
|
+
|
|
14
|
+
If the user did not provide a topic name:
|
|
15
|
+
|
|
16
|
+
```text
|
|
17
|
+
What area do you want to track with a weekly digest?
|
|
18
|
+
|
|
19
|
+
Give me a topic name (for example "LLM Agent", "Spatial AI", "Rust ecosystem", or "quant investing"),
|
|
20
|
+
plus the 2-3 subareas you care about most.
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
If the user already supplied a topic name (for example `/digest setup LLM-Agent`), skip this step and go straight to Step 2.
|
|
24
|
+
|
|
25
|
+
**Output:** decide `topic_name` (English filename) and `topic_display` (user-facing display name).
|
|
26
|
+
|
|
27
|
+
### Step 2: Understand Preferences
|
|
28
|
+
|
|
29
|
+
```text
|
|
30
|
+
For "{topic_display}", help me understand a few preferences:
|
|
31
|
+
|
|
32
|
+
1. Content type: more academic papers, more industry updates, or both?
|
|
33
|
+
2. Must-read sources: are there blogs, newsletters, or accounts you already follow closely?
|
|
34
|
+
3. Focus areas: which subtopics matter most? These will shape the digest categories.
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Step 3: Generate the Config
|
|
38
|
+
|
|
39
|
+
Based on the topic and preferences, use agent capabilities to recommend sources and produce a full config note.
|
|
40
|
+
|
|
41
|
+
**Generation strategy:**
|
|
42
|
+
|
|
43
|
+
1. **RSS / Newsletter**
|
|
44
|
+
- verify URLs with WebSearch
|
|
45
|
+
- recommend 5-15 high-quality sources
|
|
46
|
+
- prefer sources that expose RSS feeds
|
|
47
|
+
|
|
48
|
+
2. **Paper Sources**
|
|
49
|
+
- recommend explicit source rows instead of assuming arXiv-only defaults
|
|
50
|
+
- use `bioRxiv` / `medRxiv` for biomedical topics
|
|
51
|
+
- use `ChemRxiv` for chemistry topics
|
|
52
|
+
- use `arXiv` for technical / AI topics
|
|
53
|
+
- generate a small number of concrete `Source Type | Query | Scope | Notes` rows
|
|
54
|
+
- keep `Query` values searchable and source-specific, and write a short note when a source needs
|
|
55
|
+
special handling
|
|
56
|
+
- disable paper sources by default for non-academic topics unless the user explicitly wants
|
|
57
|
+
preprints
|
|
58
|
+
|
|
59
|
+
3. **Web search**
|
|
60
|
+
- design 3-5 query templates for important sources without RSS
|
|
61
|
+
- add 5-10 supplemental sites
|
|
62
|
+
|
|
63
|
+
4. **HuggingFace**
|
|
64
|
+
- generate filtering keywords for AI / ML topics
|
|
65
|
+
- disable by default for non-AI / ML topics
|
|
66
|
+
|
|
67
|
+
5. **GitHub Trending**
|
|
68
|
+
- generate filtering keywords for technical topics
|
|
69
|
+
- disable by default for non-technical topics
|
|
70
|
+
|
|
71
|
+
6. **Category system**
|
|
72
|
+
- generate 5-8 categories from the chosen subareas
|
|
73
|
+
- fix the first category as "Key Papers / Key Articles"
|
|
74
|
+
- fix the last category as "Industry Updates"
|
|
75
|
+
|
|
76
|
+
**Config note template:**
|
|
77
|
+
|
|
78
|
+
```markdown
|
|
79
|
+
---
|
|
80
|
+
title: "{topic_display} Digest"
|
|
81
|
+
type: system
|
|
82
|
+
created: "{YYYY-MM-DD}"
|
|
83
|
+
tags: [digest, subscription]
|
|
84
|
+
aliases: []
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
# {topic_display} Digest
|
|
88
|
+
|
|
89
|
+
## Basic Info
|
|
90
|
+
|
|
91
|
+
| Field | Value |
|
|
92
|
+
|-------|-------|
|
|
93
|
+
| Topic | {topic_display} |
|
|
94
|
+
| Cadence | Weekly |
|
|
95
|
+
| Language | English |
|
|
96
|
+
|
|
97
|
+
## Sources
|
|
98
|
+
|
|
99
|
+
### RSS Feeds
|
|
100
|
+
|
|
101
|
+
- [x] Enabled
|
|
102
|
+
|
|
103
|
+
| Name | URL | Focus |
|
|
104
|
+
|------|-----|-------|
|
|
105
|
+
| {name} | {url} | {description} |
|
|
106
|
+
...
|
|
107
|
+
|
|
108
|
+
### Paper Sources
|
|
109
|
+
|
|
110
|
+
- [x] Enabled
|
|
111
|
+
|
|
112
|
+
| Source Type | Query | Scope | Notes |
|
|
113
|
+
|-------------|-------|-------|-------|
|
|
114
|
+
| arXiv | {query} | {scope} | {notes} |
|
|
115
|
+
| bioRxiv | {query} | {scope} | {notes} |
|
|
116
|
+
| SocArXiv | {query} | {scope} | {notes} |
|
|
117
|
+
| SSRN | {query} | {scope} | {notes} |
|
|
118
|
+
...
|
|
119
|
+
|
|
120
|
+
> Legacy compatibility: old notes may still use `### arXiv Search`. New setups should prefer
|
|
121
|
+
> `Paper Sources`, but existing arXiv-only configs remain valid.
|
|
122
|
+
|
|
123
|
+
### Web Search
|
|
124
|
+
|
|
125
|
+
- [x] Enabled
|
|
126
|
+
|
|
127
|
+
| Query Template | Coverage |
|
|
128
|
+
|----------------|----------|
|
|
129
|
+
| {query_template} | {target} |
|
|
130
|
+
...
|
|
131
|
+
|
|
132
|
+
**Supplemental Sites (covered via Web search):**
|
|
133
|
+
|
|
134
|
+
| Name | URL | Focus |
|
|
135
|
+
|------|-----|-------|
|
|
136
|
+
| {name} | {url} | {description} |
|
|
137
|
+
...
|
|
138
|
+
|
|
139
|
+
### HuggingFace Papers
|
|
140
|
+
|
|
141
|
+
- [{x_or_space}] Enabled
|
|
142
|
+
|
|
143
|
+
**Filter keywords:** {keyword1}, {keyword2}, ...
|
|
144
|
+
|
|
145
|
+
### GitHub Trending
|
|
146
|
+
|
|
147
|
+
- [{x_or_space}] Enabled
|
|
148
|
+
|
|
149
|
+
**Filter keywords:** {keyword1}, {keyword2}, ...
|
|
150
|
+
|
|
151
|
+
## Categories
|
|
152
|
+
|
|
153
|
+
The digest is organized by the following categories. Omit empty categories:
|
|
154
|
+
|
|
155
|
+
| Category | Coverage |
|
|
156
|
+
|----------|----------|
|
|
157
|
+
| {category} | {scope} |
|
|
158
|
+
...
|
|
159
|
+
|
|
160
|
+
## Source List
|
|
161
|
+
|
|
162
|
+
Automatically appended at the end of each digest.
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### Step 4: User Review
|
|
166
|
+
|
|
167
|
+
Write the config note to `{system directory}/{digest subdirectory}/{topic_name}.md`.
|
|
168
|
+
|
|
169
|
+
```text
|
|
170
|
+
Config note created: {system directory}/{digest subdirectory}/{topic_name}.md
|
|
171
|
+
|
|
172
|
+
Ask the user to review it in Obsidian:
|
|
173
|
+
- disable modules they do not want with checkboxes
|
|
174
|
+
- keep paper-source queries searchable, then add or remove RSS feeds, Paper Sources rows, and Web
|
|
175
|
+
search targets
|
|
176
|
+
- adjust the category system
|
|
177
|
+
|
|
178
|
+
After review, they can run `/digest {topic_name}` to generate the first digest.
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
## Notes
|
|
182
|
+
|
|
183
|
+
- keep the setup conversation within 3 rounds whenever possible
|
|
184
|
+
- source recommendations should include concrete URLs, not only names
|
|
185
|
+
- any must-read source mentioned by the user must appear in the config
|
|
186
|
+
- non-technical topics such as finance or history should disable arXiv, HuggingFace, and GitHub by default
|
|
187
|
+
- biomedical topics should usually prioritize `bioRxiv` / `medRxiv`, chemistry should prioritize
|
|
188
|
+
`ChemRxiv`, social-science topics should usually prioritize `SocArXiv` / `SSRN`, and
|
|
189
|
+
technical / AI topics should prioritize `arXiv`
|
|
190
|
+
- `SocArXiv` papers may resolve to `OSF` landing pages because that is the source-hosted record
|
|
191
|
+
- paper-source fetching stays intentionally low-budget: one primary request per source and no
|
|
192
|
+
pagination
|