scientify 1.7.1 → 1.7.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 +312 -189
- package/README.zh.md +312 -189
- package/dist/src/hooks/research-mode.d.ts +4 -6
- package/dist/src/hooks/research-mode.d.ts.map +1 -1
- package/dist/src/hooks/research-mode.js +12 -129
- package/dist/src/hooks/research-mode.js.map +1 -1
- package/package.json +1 -1
- package/skills/install-scientify/SKILL.md +31 -19
- package/skills/research-pipeline/SKILL.md +7 -1
|
@@ -1,137 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* Reminds the agent to use research skills for academic tasks.
|
|
2
|
+
* Concise research mode prompt.
|
|
3
|
+
* Injected only on session first message; persists via message history.
|
|
4
|
+
* Complements <available_skills> XML (which already lists skill descriptions).
|
|
6
5
|
*/
|
|
7
|
-
const RESEARCH_MODE_PROMPT = `
|
|
8
|
-
# 🔬 Scientify Research Assistant
|
|
9
|
-
|
|
10
|
-
You have access to specialized research workflows (skills) for academic tasks.
|
|
11
|
-
|
|
12
|
-
## Available Research Skills (For You to Use)
|
|
13
|
-
|
|
14
|
-
When the user requests research work, use these skills:
|
|
15
|
-
|
|
16
|
-
### literature-survey
|
|
17
|
-
Search & download academic papers from arXiv, OpenAlex, and GitHub repositories.
|
|
18
|
-
|
|
19
|
-
**When to use**: User asks for literature review, paper search, related work survey.
|
|
20
|
-
|
|
21
|
-
**How to use**:
|
|
22
|
-
1. Find skill path in <available_skills>
|
|
23
|
-
2. Read the SKILL.md: read({ file_path: "<path-from-available_skills>" })
|
|
24
|
-
3. Follow every step exactly
|
|
25
|
-
|
|
26
|
-
### research-pipeline
|
|
27
|
-
Complete end-to-end research pipeline: literature survey → deep analysis → planning → implementation → review → experiments.
|
|
28
|
-
|
|
29
|
-
**When to use**: User wants full research workflow from papers to final results.
|
|
30
|
-
|
|
31
|
-
**How to use**:
|
|
32
|
-
1. Find skill path in <available_skills>
|
|
33
|
-
2. Read the SKILL.md: read({ file_path: "<path-from-available_skills>" })
|
|
34
|
-
3. Follow the orchestration steps (this skill will spawn sub-agents for each phase)
|
|
35
|
-
|
|
36
|
-
**Important**: research-pipeline uses sessions_spawn to create specialized sub-agents. You don't need to manually run research-survey, research-plan, etc. - the pipeline handles that internally.
|
|
37
|
-
|
|
38
|
-
## When NOT to Use Skills
|
|
39
|
-
|
|
40
|
-
Handle these normally without skills:
|
|
41
|
-
- General programming questions
|
|
42
|
-
- File operations, debugging
|
|
43
|
-
- Casual conversation
|
|
44
|
-
- Non-academic queries
|
|
45
|
-
|
|
46
|
-
## How to Use Skills (IMPORTANT)
|
|
47
|
-
|
|
48
|
-
When you identify a research task:
|
|
49
|
-
|
|
50
|
-
1. **Identify** the matching skill from the list above
|
|
51
|
-
2. **Locate** the skill file path from \`<available_skills>\` in your system prompt
|
|
52
|
-
3. **Read** the skill file completely: \`read({ file_path: "<skill-path-from-available_skills>" })\`
|
|
53
|
-
4. **Execute** every step in the SKILL.md exactly as written
|
|
54
|
-
|
|
55
|
-
**Do NOT**:
|
|
56
|
-
- ❌ Skip reading the skill file
|
|
57
|
-
- ❌ Improvise your own workflow
|
|
58
|
-
- ❌ Assume you remember the steps from previous sessions
|
|
59
|
-
|
|
60
|
-
## Project Management (You Handle This)
|
|
61
|
-
|
|
62
|
-
For research tasks, you automatically manage project structure:
|
|
63
|
-
|
|
64
|
-
1. **Check** if project exists: \`read({ file_path: "$W/projects/<topic>/task.json" })\`
|
|
65
|
-
2. **Create** if needed: Use \`write\` to create directory structure and task.json
|
|
66
|
-
3. **Load** context: Read existing task.json to understand current status
|
|
67
|
-
4. **Continue** work: Resume from the last completed phase
|
|
68
|
-
|
|
69
|
-
User doesn't need to run commands. You create and manage projects automatically.
|
|
70
|
-
|
|
71
|
-
### Example Project Structure
|
|
72
|
-
|
|
73
|
-
\`\`\`
|
|
74
|
-
$W/projects/<topic>/
|
|
75
|
-
├── task.json # Project metadata & status
|
|
76
|
-
├── papers/ # Downloaded papers
|
|
77
|
-
│ └── _meta/ # Paper metadata
|
|
78
|
-
├── repos/ # Reference code repositories
|
|
79
|
-
├── survey_res.md # Literature survey results
|
|
80
|
-
├── plan_res.md # Implementation plan
|
|
81
|
-
├── project/ # Your implementation
|
|
82
|
-
└── experiment_res.md # Experiment results
|
|
83
|
-
\`\`\`
|
|
84
|
-
|
|
85
|
-
## Example Workflows
|
|
86
|
-
|
|
87
|
-
### Example 1: Literature Survey Only
|
|
88
|
-
|
|
89
|
-
\`\`\`
|
|
90
|
-
User: "Survey recent papers on Vision Transformers"
|
|
91
|
-
|
|
92
|
-
You:
|
|
93
|
-
1. Identify: Literature survey task
|
|
94
|
-
2. Skill: literature-survey
|
|
95
|
-
3. Read: literature-survey/SKILL.md from <available_skills>
|
|
96
|
-
4. Project: Create $W/projects/vision-transformer-survey/
|
|
97
|
-
5. Execute: Follow search → download → categorize steps
|
|
98
|
-
6. Output: survey_res.md with categorized papers
|
|
99
|
-
\`\`\`
|
|
100
|
-
|
|
101
|
-
### Example 2: Complete Research Pipeline
|
|
102
|
-
|
|
103
|
-
\`\`\`
|
|
104
|
-
User: "I want to implement Vision Transformer on MNIST, from literature survey to experiments"
|
|
105
|
-
|
|
106
|
-
You:
|
|
107
|
-
1. Identify: Full research workflow
|
|
108
|
-
2. Skill: research-pipeline
|
|
109
|
-
3. Read: research-pipeline/SKILL.md from <available_skills>
|
|
110
|
-
4. Project: Create $W/projects/vit-mnist/
|
|
111
|
-
5. Execute: Follow orchestration steps
|
|
112
|
-
- Pipeline spawns sub-agents for survey, analysis, planning, coding, review, experiments
|
|
113
|
-
- You don't manually read research-survey, research-implement, etc.
|
|
114
|
-
6. Output: Complete research project with all deliverables
|
|
115
|
-
\`\`\`
|
|
116
|
-
|
|
117
|
-
---
|
|
118
|
-
|
|
119
|
-
**Remember**: Skills contain precise workflows tested in production. Read them before acting, don't guess.
|
|
120
|
-
`;
|
|
6
|
+
const RESEARCH_MODE_PROMPT = `[Scientify] For academic research tasks, match a skill from <available_skills> and read its SKILL.md before acting. Research projects are managed under $W/projects/<topic>/.`;
|
|
121
7
|
/**
|
|
122
|
-
* Creates the research mode hook
|
|
123
|
-
*
|
|
124
|
-
*
|
|
125
|
-
* This ensures agents are always aware of available research skills
|
|
126
|
-
* and know how to use them properly.
|
|
8
|
+
* Creates the research mode hook.
|
|
9
|
+
* Only injects on the first message of a session (messages array empty).
|
|
10
|
+
* Subsequent messages retain it via conversation history.
|
|
127
11
|
*/
|
|
128
12
|
export function createResearchModeHook() {
|
|
129
|
-
return (
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
};
|
|
13
|
+
return (event, _context) => {
|
|
14
|
+
if (!event.messages || event.messages.length === 0) {
|
|
15
|
+
return { prependContext: RESEARCH_MODE_PROMPT };
|
|
16
|
+
}
|
|
17
|
+
return {};
|
|
135
18
|
};
|
|
136
19
|
}
|
|
137
20
|
//# sourceMappingURL=research-mode.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"research-mode.js","sourceRoot":"","sources":["../../../src/hooks/research-mode.ts"],"names":[],"mappings":"AAmBA
|
|
1
|
+
{"version":3,"file":"research-mode.js","sourceRoot":"","sources":["../../../src/hooks/research-mode.ts"],"names":[],"mappings":"AAmBA;;;;GAIG;AACH,MAAM,oBAAoB,GAAG,+KAA+K,CAAC;AAE7M;;;;GAIG;AACH,MAAM,UAAU,sBAAsB;IACpC,OAAO,CAAC,KAAgB,EAAE,QAAqB,EAAc,EAAE;QAC7D,IAAI,CAAC,KAAK,CAAC,QAAQ,IAAI,KAAK,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACnD,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,CAAC;QAClD,CAAC;QACD,OAAO,EAAE,CAAC;IACZ,CAAC,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "scientify",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.3",
|
|
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",
|
|
@@ -31,31 +31,37 @@ metadata:
|
|
|
31
31
|
|
|
32
32
|
| Skill | Description |
|
|
33
33
|
|-------|-------------|
|
|
34
|
-
| **research-pipeline** |
|
|
35
|
-
| **
|
|
36
|
-
| **research-
|
|
37
|
-
| **research-
|
|
38
|
-
| **research-
|
|
39
|
-
| **research-
|
|
40
|
-
| **
|
|
41
|
-
| **idea-generation** | Generate research ideas
|
|
34
|
+
| **research-pipeline** | End-to-end orchestrator. Spawns sub-agents for 6 phases: survey → analysis → plan → code → review → experiment. |
|
|
35
|
+
| **literature-survey** | Search arXiv + OpenAlex → filter → download .tex sources → cluster → generate survey report. |
|
|
36
|
+
| **research-survey** | Deep analysis of papers: extract formulas, map to code, produce method comparison table. |
|
|
37
|
+
| **research-plan** | Create 4-part implementation plan (Dataset/Model/Training/Testing) from survey results. |
|
|
38
|
+
| **research-implement** | Implement ML code from plan, run 2-epoch validation with `uv` venv isolation. |
|
|
39
|
+
| **research-review** | Review implementation. Iterates fix → rerun → review up to 3 times. |
|
|
40
|
+
| **research-experiment** | Full training + ablation experiments. Requires review PASS. |
|
|
41
|
+
| **idea-generation** | Generate 5 innovative research ideas, score on novelty/feasibility/impact, enhance the best one. |
|
|
42
|
+
| **write-review-paper** | Draft a review/survey paper from project research outputs. |
|
|
42
43
|
|
|
43
44
|
### Commands (Direct, no LLM)
|
|
44
45
|
|
|
45
46
|
| Command | Description |
|
|
46
47
|
|---------|-------------|
|
|
47
|
-
| `/research-status` | Show workspace status |
|
|
48
|
-
| `/papers` | List downloaded papers |
|
|
48
|
+
| `/research-status` | Show workspace status and active project |
|
|
49
|
+
| `/papers` | List downloaded papers with metadata |
|
|
49
50
|
| `/ideas` | List generated ideas |
|
|
50
51
|
| `/projects` | List all projects |
|
|
51
|
-
| `/project-switch <id>` | Switch project |
|
|
52
|
-
| `/project-delete <id>` | Delete project |
|
|
52
|
+
| `/project-switch <id>` | Switch active project |
|
|
53
|
+
| `/project-delete <id>` | Delete a project |
|
|
53
54
|
|
|
54
55
|
### Tools
|
|
55
56
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
| Tool | Description |
|
|
58
|
+
|------|-------------|
|
|
59
|
+
| `arxiv_search` | Search arXiv papers. Returns metadata (title, authors, abstract, ID). Supports sorting by relevance/date. |
|
|
60
|
+
| `arxiv_download` | Batch download papers by arXiv ID. Prefers .tex source (PDF fallback). |
|
|
61
|
+
| `openalex_search` | Search cross-disciplinary papers via OpenAlex API. Returns DOI, authors, citation count, OA status. |
|
|
62
|
+
| `unpaywall_download` | Download open access PDFs by DOI via Unpaywall. Non-OA papers silently skipped. |
|
|
63
|
+
| `github_search` | Search GitHub repositories. Returns name, description, stars, URL. Supports language filtering. |
|
|
64
|
+
| `paper_browser` | Paginated browsing of large paper files (.tex/.md) to avoid context overflow. |
|
|
59
65
|
|
|
60
66
|
## Installation
|
|
61
67
|
|
|
@@ -69,16 +75,22 @@ Or let OpenClaw install it automatically when you use this skill.
|
|
|
69
75
|
|
|
70
76
|
## Usage Examples
|
|
71
77
|
|
|
78
|
+
### End-to-End Research
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
Research scaling laws for classical ML classifiers on Fashion-MNIST
|
|
82
|
+
```
|
|
83
|
+
|
|
72
84
|
### Generate Research Ideas
|
|
73
85
|
|
|
74
86
|
```
|
|
75
|
-
|
|
87
|
+
Explore recent advances in protein folding and generate innovative research ideas
|
|
76
88
|
```
|
|
77
89
|
|
|
78
|
-
###
|
|
90
|
+
### Literature Survey Only
|
|
79
91
|
|
|
80
92
|
```
|
|
81
|
-
|
|
93
|
+
Survey the latest papers on vision-language models for medical imaging
|
|
82
94
|
```
|
|
83
95
|
|
|
84
96
|
### Check Workspace
|
|
@@ -90,5 +102,5 @@ Or let OpenClaw install it automatically when you use this skill.
|
|
|
90
102
|
## Links
|
|
91
103
|
|
|
92
104
|
- npm: https://www.npmjs.com/package/scientify
|
|
93
|
-
- GitHub: https://github.com/tsingyuai/
|
|
105
|
+
- GitHub: https://github.com/tsingyuai/scientify
|
|
94
106
|
- Author: tsingyuai
|
|
@@ -79,7 +79,7 @@ metadata:
|
|
|
79
79
|
| `task` | string | 是 | 子 agent 的完整任务描述 |
|
|
80
80
|
| `label` | string | 否 | 显示标签(如 "Deep Survey") |
|
|
81
81
|
| `model` | string | 否 | 模型覆盖(如 `tsingyu/gemini-3-flash-preview`) |
|
|
82
|
-
| `runTimeoutSeconds` | number | 否 |
|
|
82
|
+
| `runTimeoutSeconds` | number | 否 | 超时秒数(**必须设置,推荐 1800**) |
|
|
83
83
|
|
|
84
84
|
**task 字段格式**(子 agent 是独立 session,看不到当前上下文):
|
|
85
85
|
|
|
@@ -124,6 +124,7 @@ ACTIVE=$(cat ~/.openclaw/workspace/projects/.active 2>/dev/null)
|
|
|
124
124
|
**如果缺失,调用 sessions_spawn 工具(然后停止,等待完成通知):**
|
|
125
125
|
- task: `"/literature-survey\n工作目录: {$W绝对路径}\n研究主题: {从task.json提取}\n请搜索、筛选、下载论文到工作目录的 papers/ 下。"`
|
|
126
126
|
- label: `"Literature Survey"`
|
|
127
|
+
- runTimeoutSeconds: `1800`
|
|
127
128
|
|
|
128
129
|
**验证:** `ls $W/papers/_meta/*.json` 至少有 3 个文件
|
|
129
130
|
|
|
@@ -136,6 +137,7 @@ ACTIVE=$(cat ~/.openclaw/workspace/projects/.active 2>/dev/null)
|
|
|
136
137
|
**如果缺失,先读取 Phase 1 摘要(论文数量、方向),然后调用 sessions_spawn 工具(然后停止,等待完成通知):**
|
|
137
138
|
- task: `"/research-survey\n工作目录: {$W绝对路径}\n上下文: 已下载 {N} 篇论文,方向包括 {directions}。\n重点论文: {top 3 arxiv_id 和标题}\n请深度分析论文、提取公式,写入 survey_res.md。"`
|
|
138
139
|
- label: `"Deep Survey"`
|
|
140
|
+
- runTimeoutSeconds: `1800`
|
|
139
141
|
|
|
140
142
|
**验证:** `$W/survey_res.md` 存在且包含"核心方法对比"表格
|
|
141
143
|
|
|
@@ -148,6 +150,7 @@ ACTIVE=$(cat ~/.openclaw/workspace/projects/.active 2>/dev/null)
|
|
|
148
150
|
**如果缺失,读取 survey_res.md 摘要,然后调用 sessions_spawn 工具(然后停止,等待完成通知):**
|
|
149
151
|
- task: `"/research-plan\n工作目录: {$W绝对路径}\n上下文: 调研发现核心方法是 {method},推荐技术路线 {route}。\n关键公式: {1-2个公式}\n请制定实现计划到 plan_res.md。"`
|
|
150
152
|
- label: `"Research Plan"`
|
|
153
|
+
- runTimeoutSeconds: `1800`
|
|
151
154
|
|
|
152
155
|
**验证:** `$W/plan_res.md` 存在且包含 4 个 section(Dataset/Model/Training/Testing)
|
|
153
156
|
|
|
@@ -160,6 +163,7 @@ ACTIVE=$(cat ~/.openclaw/workspace/projects/.active 2>/dev/null)
|
|
|
160
163
|
**如果缺失,读取 plan_res.md 要点,然后调用 sessions_spawn 工具(然后停止,等待完成通知):**
|
|
161
164
|
- task: `"/research-implement\n工作目录: {$W绝对路径}\n上下文:\n- 计划包含 {N} 个组件: {list}\n- 数据集: {dataset}\n- 框架: PyTorch\n请实现代码到 project/,运行 2 epoch 验证,写入 ml_res.md。"`
|
|
162
165
|
- label: `"Research Implement"`
|
|
166
|
+
- runTimeoutSeconds: `1800`
|
|
163
167
|
|
|
164
168
|
**验证:**
|
|
165
169
|
- `$W/project/run.py` 存在
|
|
@@ -175,6 +179,7 @@ ACTIVE=$(cat ~/.openclaw/workspace/projects/.active 2>/dev/null)
|
|
|
175
179
|
**如果没有 PASS,调用 sessions_spawn 工具(然后停止,等待完成通知):**
|
|
176
180
|
- task: `"/research-review\n工作目录: {$W绝对路径}\n上下文:\n- ml_res.md 显示 train_loss={value}\n- 计划在 plan_res.md\n请审查代码,如需修改则迭代修复(最多 3 轮)。"`
|
|
177
181
|
- label: `"Research Review"`
|
|
182
|
+
- runTimeoutSeconds: `1800`
|
|
178
183
|
|
|
179
184
|
**验证:** 最新 `judge_v*.md` 中 `verdict: PASS` 或 `verdict: BLOCKED`
|
|
180
185
|
|
|
@@ -189,6 +194,7 @@ ACTIVE=$(cat ~/.openclaw/workspace/projects/.active 2>/dev/null)
|
|
|
189
194
|
**如果缺失,调用 sessions_spawn 工具(然后停止,等待完成通知):**
|
|
190
195
|
- task: `"/research-experiment\n工作目录: {$W绝对路径}\n上下文:\n- Review PASS,代码已验证\n- plan_res.md 中指定 full epochs\n请执行完整训练 + 消融实验,写入 experiment_res.md。"`
|
|
191
196
|
- label: `"Research Experiment"`
|
|
197
|
+
- runTimeoutSeconds: `1800`
|
|
192
198
|
|
|
193
199
|
**验证:** `$W/experiment_res.md` 包含 `[RESULT]` 行和消融表格
|
|
194
200
|
|