scientify 1.13.6 → 2.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 (100) hide show
  1. package/README.en.md +350 -0
  2. package/README.md +148 -358
  3. package/dist/index.d.ts +8 -2
  4. package/dist/index.d.ts.map +1 -1
  5. package/dist/index.js +131 -122
  6. package/dist/index.js.map +1 -1
  7. package/dist/src/cli/research.d.ts +1 -6
  8. package/dist/src/cli/research.d.ts.map +1 -1
  9. package/dist/src/cli/research.js +227 -123
  10. package/dist/src/cli/research.js.map +1 -1
  11. package/dist/src/commands/metabolism-status.d.ts +3 -3
  12. package/dist/src/commands/metabolism-status.d.ts.map +1 -1
  13. package/dist/src/commands/metabolism-status.js +72 -75
  14. package/dist/src/commands/metabolism-status.js.map +1 -1
  15. package/dist/src/commands.d.ts +1 -1
  16. package/dist/src/commands.d.ts.map +1 -1
  17. package/dist/src/commands.js +0 -55
  18. package/dist/src/commands.js.map +1 -1
  19. package/dist/src/hooks/cron-skill-inject.d.ts +6 -7
  20. package/dist/src/hooks/cron-skill-inject.d.ts.map +1 -1
  21. package/dist/src/hooks/cron-skill-inject.js +6 -15
  22. package/dist/src/hooks/cron-skill-inject.js.map +1 -1
  23. package/dist/src/hooks/research-mode.d.ts +1 -1
  24. package/dist/src/hooks/research-mode.d.ts.map +1 -1
  25. package/dist/src/hooks/research-mode.js +24 -101
  26. package/dist/src/hooks/research-mode.js.map +1 -1
  27. package/dist/src/hooks/scientify-signature.d.ts +1 -1
  28. package/dist/src/hooks/scientify-signature.d.ts.map +1 -1
  29. package/dist/src/hooks/scientify-signature.js +2 -5
  30. package/dist/src/hooks/scientify-signature.js.map +1 -1
  31. package/dist/src/knowledge-state/render.d.ts +1 -9
  32. package/dist/src/knowledge-state/render.d.ts.map +1 -1
  33. package/dist/src/knowledge-state/render.js +33 -187
  34. package/dist/src/knowledge-state/render.js.map +1 -1
  35. package/dist/src/knowledge-state/store.d.ts.map +1 -1
  36. package/dist/src/knowledge-state/store.js +65 -1100
  37. package/dist/src/knowledge-state/store.js.map +1 -1
  38. package/dist/src/knowledge-state/types.d.ts +0 -76
  39. package/dist/src/knowledge-state/types.d.ts.map +1 -1
  40. package/dist/src/literature/subscription-state.d.ts +0 -2
  41. package/dist/src/literature/subscription-state.d.ts.map +1 -1
  42. package/dist/src/literature/subscription-state.js +7 -1375
  43. package/dist/src/literature/subscription-state.js.map +1 -1
  44. package/dist/src/research-subscriptions/constants.d.ts +1 -1
  45. package/dist/src/research-subscriptions/constants.js +1 -1
  46. package/dist/src/research-subscriptions/cron-client.d.ts +1 -1
  47. package/dist/src/research-subscriptions/cron-client.d.ts.map +1 -1
  48. package/dist/src/research-subscriptions/delivery.d.ts +1 -1
  49. package/dist/src/research-subscriptions/delivery.d.ts.map +1 -1
  50. package/dist/src/research-subscriptions/handlers.d.ts +1 -1
  51. package/dist/src/research-subscriptions/handlers.d.ts.map +1 -1
  52. package/dist/src/research-subscriptions/handlers.js +10 -20
  53. package/dist/src/research-subscriptions/handlers.js.map +1 -1
  54. package/dist/src/research-subscriptions/parse.d.ts.map +1 -1
  55. package/dist/src/research-subscriptions/parse.js +0 -25
  56. package/dist/src/research-subscriptions/parse.js.map +1 -1
  57. package/dist/src/research-subscriptions/prompt.d.ts +1 -1
  58. package/dist/src/research-subscriptions/prompt.d.ts.map +1 -1
  59. package/dist/src/research-subscriptions/prompt.js +195 -244
  60. package/dist/src/research-subscriptions/prompt.js.map +1 -1
  61. package/dist/src/research-subscriptions/types.d.ts +1 -3
  62. package/dist/src/research-subscriptions/types.d.ts.map +1 -1
  63. package/dist/src/templates/bootstrap.d.ts.map +1 -1
  64. package/dist/src/templates/bootstrap.js +32 -19
  65. package/dist/src/templates/bootstrap.js.map +1 -1
  66. package/dist/src/tools/arxiv-download.d.ts +1 -2
  67. package/dist/src/tools/arxiv-download.d.ts.map +1 -1
  68. package/dist/src/tools/arxiv-search.d.ts +1 -2
  69. package/dist/src/tools/arxiv-search.d.ts.map +1 -1
  70. package/dist/src/tools/github-search-tool.d.ts +1 -2
  71. package/dist/src/tools/github-search-tool.d.ts.map +1 -1
  72. package/dist/src/tools/openalex-search.d.ts +1 -2
  73. package/dist/src/tools/openalex-search.d.ts.map +1 -1
  74. package/dist/src/tools/openreview-lookup.d.ts +1 -2
  75. package/dist/src/tools/openreview-lookup.d.ts.map +1 -1
  76. package/dist/src/tools/paper-browser.d.ts +1 -2
  77. package/dist/src/tools/paper-browser.d.ts.map +1 -1
  78. package/dist/src/tools/result.d.ts +3 -5
  79. package/dist/src/tools/result.d.ts.map +1 -1
  80. package/dist/src/tools/result.js +5 -7
  81. package/dist/src/tools/result.js.map +1 -1
  82. package/dist/src/tools/scientify-cron.d.ts +4 -11
  83. package/dist/src/tools/scientify-cron.d.ts.map +1 -1
  84. package/dist/src/tools/scientify-cron.js +19 -524
  85. package/dist/src/tools/scientify-cron.js.map +1 -1
  86. package/dist/src/tools/scientify-literature-state.d.ts +1 -76
  87. package/dist/src/tools/scientify-literature-state.d.ts.map +1 -1
  88. package/dist/src/tools/scientify-literature-state.js +46 -363
  89. package/dist/src/tools/scientify-literature-state.js.map +1 -1
  90. package/dist/src/tools/unpaywall-download.d.ts +1 -2
  91. package/dist/src/tools/unpaywall-download.d.ts.map +1 -1
  92. package/dist/src/types.d.ts +16 -0
  93. package/dist/src/types.d.ts.map +1 -0
  94. package/dist/src/types.js +2 -0
  95. package/dist/src/types.js.map +1 -0
  96. package/openclaw.plugin.json +4 -2
  97. package/package.json +1 -1
  98. package/skills/metabolism/SKILL.md +2 -0
  99. package/skills/research-subscription/SKILL.md +1 -29
  100. package/README.zh.md +0 -494
package/README.en.md ADDED
@@ -0,0 +1,350 @@
1
+ <h1 align="center">Scientify</h1>
2
+ <p align="center">
3
+ <em>Continuous Knowledge Metabolism for AI Research</em>
4
+ </p>
5
+
6
+ <p align="center">
7
+ <a href="https://www.npmjs.com/package/scientify"><img src="https://img.shields.io/npm/v/scientify?style=for-the-badge&logo=npm&logoColor=white" alt="npm version"></a>
8
+ <a href="https://github.com/tsingyuai/scientify"><img src="https://img.shields.io/github/stars/tsingyuai/scientify?style=for-the-badge&logo=github" alt="GitHub stars"></a>
9
+ <a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-blue.svg?style=for-the-badge" alt="MIT License"></a>
10
+ <a href="https://github.com/openclaw/openclaw"><img src="https://img.shields.io/badge/OpenClaw-plugin-00FF9F?style=for-the-badge" alt="OpenClaw plugin"></a>
11
+ </p>
12
+
13
+ <p align="center">
14
+ <a href="https://scientify.tech">Website</a> · <a href="./README.md">中文</a> · <a href="https://github.com/tsingyuai/scientify/issues">Issues</a>
15
+ </p>
16
+
17
+ ---
18
+
19
+ ## What It Does
20
+
21
+ > [!IMPORTANT]
22
+ > Scientify is not another "ask once, answer once" AI tool. It acts like a real research partner — **continuously thinking, accumulating, and delivering**.
23
+
24
+ ### 1. Metabolism: Continuous Thinking, Not One-Shot Answers
25
+
26
+ Existing AI research tools work in **batch mode** — give it a question, run a pipeline, get a report, done. Ask the same direction next time, it starts from scratch. Running 10 times is no different from running once.
27
+
28
+ But human researchers don't work this way. You read, run experiments, and think every day. Yesterday's failure changes today's reading; last week's conversation changes this week's experiment design.
29
+
30
+ Scientify adopts a **metabolism mode** — continuously ingesting, digesting, accumulating, and re-ingesting:
31
+
32
+ - **Continuous ingestion**: Automatically tracks frontier papers daily, no manual trigger needed
33
+ - **Digestion & accumulation**: Links new knowledge with existing accumulation, writes to persistent knowledge base
34
+ - **Hypothesis evolution**: Discards ineffective hypotheses, evolves effective paths — every failure feeds the next round
35
+ - **Proactive delivery**: Automatically verifies noteworthy findings and pushes results to you
36
+
37
+ The longer you use it, the deeper its research goes.
38
+
39
+ <p align="center">
40
+ <img src="docs/assets/showcase/3.png" width="50%" alt="Scientify proactively pushes research progress via Feishu">
41
+ <br>
42
+ <sub>Scientify proactively pushes latest findings to researchers via Feishu, with insights drawn from its knowledge base</sub>
43
+ </p>
44
+
45
+ ### 2. End-to-End Autonomous Research: Achieving SOTA-Level Results
46
+
47
+ Give it a research topic, and it completes the entire study — producing new algorithms that outperform existing literature.
48
+
49
+ Driven by multi-agent iteration: the orchestrator holds hypotheses and all accumulated knowledge, only dispatching — never writing code itself; each round spawns independent sub-agents for implementation, review, and experimentation; every failure is distilled into experience for the next round, refining hypotheses until a superior method is discovered.
50
+
51
+ ### Showcase: Autonomously Discovered the KV2 Algorithm with Field-Leading Performance
52
+
53
+ > **Objective**: For long-context LLM inference, design a strategy that simultaneously reduces time-to-first-token latency and per-request communication volume.
54
+ >
55
+ > Scientify autonomously completed literature survey, hypothesis generation, code implementation, and experimental validation, proposing the **KV2 algorithm**. Compared to existing research, both TTFT p95 and bytes/request were reduced to varying degrees, achieving SOTA-level performance.
56
+
57
+ <p align="center">
58
+ <img src="docs/assets/showcase/1.png" width="80%" alt="KV2 algorithm experimental results">
59
+ <br>
60
+ <sub>KV2 algorithm experimental results on first-token latency and communication volume</sub>
61
+ </p>
62
+
63
+ <p align="center">
64
+ <img src="docs/assets/showcase/2.png" width="80%" alt="KV2 comparison with existing methods">
65
+ <br>
66
+ <sub>KV2 SOTA comparison with existing methods</sub>
67
+ </p>
68
+
69
+ ---
70
+
71
+ ## Architecture
72
+
73
+ ```
74
+ ┌─────────────────────────────────────────────────────────────┐
75
+ │ Researcher │
76
+ │ Conversation · Feed materials · Judge hypotheses │
77
+ └──────────────┬──────────────────────────────┬───────────────┘
78
+ ↓ ↓
79
+ ┌──────────────────────────┐ ┌──────────────────────────────┐
80
+ │ Agent Layer │ │ Knowledge Base (persistent) │
81
+ │ │ │ │
82
+ │ Heartbeat Daily wakeup │←→│ _index.md │
83
+ │ Reflection Cross-domain │ │ topic-*.md │
84
+ │ Pipeline Hypothesis │ │ hypotheses/ │
85
+ │ verification │ │ experiments/ │
86
+ └──────────┬───────────────┘ │ conversations/ │
87
+ ↓ │ │
88
+ ┌──────────────────────────┐ │ Markdown files · Git-managed│
89
+ │ Tool Layer │ │ Fully auditable · You can │
90
+ │ │──→│ edit them too │
91
+ │ arxiv_search │ └──────────────────────────────┘
92
+ │ openalex_search │
93
+ │ github_search │
94
+ │ paper_browser │
95
+ │ code_executor │
96
+ └──────────────────────────┘
97
+ ```
98
+
99
+ Four components, each with a clear role:
100
+
101
+ ### Researcher
102
+
103
+ You are part of the system. Inject judgment through conversation, feed materials, confirm or reject hypotheses. Your participation makes the metabolism direction more accurate and research hypotheses more precise.
104
+
105
+ ### Agent Layer
106
+
107
+ Three loops drive the metabolism:
108
+
109
+ | Agent | What it does | Trigger |
110
+ |-------|-------------|---------|
111
+ | **Heartbeat** | Tracks frontier papers daily; when it finds relevant work, autonomously verifies and pushes results to you | Scheduled auto-wakeup |
112
+ | **Reflection** | Cross-domain exploration — connects knowledge across different topics, discovers unexpected links | Heartbeat / Researcher |
113
+ | **Pipeline** | End-to-end research execution — literature survey → deep analysis → implementation → review → experiment | Researcher / Reflection |
114
+
115
+ Pipeline internally uses multi-agent iteration: the orchestrator holds hypotheses and spawns sub-agents for implementation (`implement`), review (`review`), and experimentation (`experiment`). Each failure is distilled into experience; hypotheses are refined with each round.
116
+
117
+ ### Tool Layer
118
+
119
+ The agents' hands and eyes:
120
+
121
+ | Tool | Capability |
122
+ |------|-----------|
123
+ | `arxiv_search` / `openalex_search` | Search academic papers (arXiv + cross-disciplinary) |
124
+ | `github_search` | Search open-source code implementations |
125
+ | `paper_browser` | Paginated paper reading, avoids context overflow |
126
+ | `code_executor` | Execute experiment code in `uv`-isolated environment |
127
+
128
+ > Scientify runs on [OpenClaw](https://github.com/openclaw/openclaw), natively leveraging the platform's MCP servers (Slack / Feishu push), browser automation (paywalled paper downloads), multi-session concurrency (parallel multi-direction research), and more.
129
+
130
+ ### Knowledge Base
131
+
132
+ All accumulation is persisted as Markdown files, Git-managed, every change is traceable. You and the agents read and write the same files:
133
+
134
+ ```
135
+ knowledge_state/
136
+ ├── _index.md # Global research index
137
+ ├── topic-*.md # Knowledge organized by topic
138
+ ├── hypotheses/ # Hypothesis evolution records
139
+ ├── experiments/ # Experiment results & analysis
140
+ ├── paper_notes/ # Per-paper deep reading records
141
+ └── logs/ # Metabolism run logs
142
+ ```
143
+
144
+ ---
145
+
146
+ ## Prerequisites
147
+
148
+ - **Node.js** >= 18
149
+ - **Python 3** + **uv** (for ML code execution)
150
+ - **git**
151
+
152
+ ---
153
+
154
+ ## Install OpenClaw
155
+
156
+ ```bash
157
+ # Install OpenClaw globally
158
+ pnpm add -g openclaw # or: npm install -g openclaw
159
+
160
+ # Run onboarding wizard (configures model provider, API key, workspace)
161
+ openclaw onboard
162
+
163
+ # Start the gateway (runs the WebUI server)
164
+ openclaw gateway
165
+ ```
166
+
167
+ After `openclaw gateway`, the WebUI is available at **http://127.0.0.1:18789/** (default port).
168
+
169
+ > **Proxy users:** If you have `http_proxy` set, access the WebUI with `--noproxy 127.0.0.1` or configure your browser accordingly.
170
+
171
+ ---
172
+
173
+ ## Install Scientify
174
+
175
+ ### From npm (recommended)
176
+
177
+ ```bash
178
+ openclaw plugins install scientify
179
+ ```
180
+
181
+ The plugin installs to `~/.openclaw/extensions/scientify/` and is automatically enabled.
182
+
183
+ ### From source (development)
184
+
185
+ ```bash
186
+ git clone https://github.com/tsingyuai/scientify.git
187
+ cd scientify && pnpm install && pnpm build
188
+
189
+ # Link as dev plugin
190
+ openclaw plugins install -l ./
191
+ ```
192
+
193
+ ### Verify installation
194
+
195
+ ```bash
196
+ openclaw plugins list
197
+ # Should show: scientify (enabled)
198
+ ```
199
+
200
+ After installation, **restart the gateway** to load the plugin:
201
+
202
+ ```bash
203
+ # Stop the running gateway (Ctrl+C), then:
204
+ openclaw gateway
205
+ ```
206
+
207
+ ---
208
+
209
+ ## Usage via WebUI
210
+
211
+ ### 1. Open the WebUI
212
+
213
+ Navigate to **http://127.0.0.1:18789/** in your browser.
214
+
215
+ ### 2. Start a research task
216
+
217
+ Type a research prompt in the chat. Scientify skills are auto-matched by the LLM:
218
+
219
+ ```
220
+ Research "transformer efficiency" and generate some innovative ideas
221
+ ```
222
+
223
+ Or invoke a specific skill directly with a slash command:
224
+
225
+ ```
226
+ /research-pipeline
227
+ /research-collect
228
+ /idea-generation
229
+ ```
230
+
231
+ ### 3. Monitor sub-agent progress
232
+
233
+ When the orchestrator spawns sub-agents, you'll see:
234
+ - **Spawn notification** — "Phase 1: Literature Survey started"
235
+ - **Completion announcement** — automatic message when the sub-agent finishes
236
+ - **Progress updates** — the orchestrator verifies outputs and advances to the next phase
237
+
238
+ Check status anytime:
239
+
240
+ ```
241
+ /research-status
242
+ ```
243
+
244
+ ### 4. Manage projects
245
+
246
+ ```
247
+ /projects # List all projects
248
+ /project-switch <id> # Switch to a different project
249
+ /papers # List downloaded papers
250
+ /ideas # List generated ideas
251
+ ```
252
+
253
+ ---
254
+
255
+ ## Skills & Tools
256
+
257
+ <details>
258
+ <summary><b>Pipeline Skills (LLM-powered)</b></summary>
259
+
260
+ | Skill | Slash Command | Description |
261
+ |-------|---------------|-------------|
262
+ | **research-pipeline** | `/research-pipeline` | Orchestrator. Spawns sub-agents for each phase, verifies outputs between steps. |
263
+ | **research-collect** | `/research-collect` | Search arXiv → filter → download .tex sources → cluster → generate survey report. |
264
+ | **research-survey** | `/research-survey` | Deep analysis of papers: extract formulas, map to code, produce method comparison table. |
265
+ | **research-plan** | `/research-plan` | Create 4-part implementation plan (Dataset/Model/Training/Testing) from survey results. |
266
+ | **research-implement** | `/research-implement` | Implement ML code from plan, run 2-epoch validation with `uv` venv isolation. |
267
+ | **research-review** | `/research-review` | Review implementation. Iterates fix → rerun → review up to 3 times. |
268
+ | **research-experiment** | `/research-experiment` | Full training + ablation experiments. Requires review PASS. |
269
+ | **idea-generation** | `/idea-generation` | Generate 5 innovative research ideas from a topic, select and enhance the best one. |
270
+
271
+ </details>
272
+
273
+ <details>
274
+ <summary><b>Standalone Skills</b></summary>
275
+
276
+ | Skill | Description |
277
+ |-------|-------------|
278
+ | **write-review-paper** | Draft a review/survey paper from project research outputs. |
279
+ | **research-subscription** | Create/list/remove scheduled Scientify jobs via `scientify_cron_job` (research digests or plain reminders). |
280
+
281
+ </details>
282
+
283
+ <details>
284
+ <summary><b>Tools (available to LLM)</b></summary>
285
+
286
+ | Tool | Description |
287
+ |------|-------------|
288
+ | `arxiv_search` | Search arXiv papers. Returns metadata (title, authors, abstract, ID). Supports sorting by relevance/date and date filtering. |
289
+ | `arxiv_download` | Batch download papers by arXiv ID. Prefers .tex source files (PDF fallback). |
290
+ | `openalex_search` | Search cross-disciplinary academic papers via OpenAlex API. Returns DOI, authors, citation count, OA status. |
291
+ | `openreview_lookup` | Lookup OpenReview evidence by title/ID/forum. Returns decision, review rating/confidence aggregates, and review summaries. |
292
+ | `unpaywall_download` | Download open access PDFs by DOI via Unpaywall API. Non-OA papers are silently skipped. |
293
+ | `github_search` | Search GitHub repositories. Returns repo name, description, stars, URL. Supports language filtering and sorting. |
294
+ | `paper_browser` | Paginated browsing of large paper files (.tex/.md) to avoid context overflow. |
295
+ | `scientify_cron_job` | Manage scheduled Scientify jobs (`upsert`/`list`/`remove`). |
296
+ | `scientify_literature_state` | Persistent incremental state for subscriptions: dedupe, record, feedback, and status inspection. |
297
+
298
+ </details>
299
+
300
+ <details>
301
+ <summary><b>Commands (direct, no LLM)</b></summary>
302
+
303
+ | Command | Description |
304
+ |---------|-------------|
305
+ | `/research-status` | Show workspace status and active project |
306
+ | `/papers` | List downloaded papers with metadata |
307
+ | `/ideas` | List generated ideas |
308
+ | `/projects` | List all projects |
309
+ | `/project-switch <id>` | Switch active project |
310
+ | `/project-delete <id>` | Delete a project |
311
+ | `/research-subscribe ...` | Create/update scheduled Scientify jobs |
312
+ | `/research-subscriptions` | Show your scheduled Scientify jobs |
313
+ | `/research-unsubscribe [job-id]` | Remove your scheduled Scientify jobs |
314
+
315
+ </details>
316
+
317
+ ---
318
+
319
+ ## Known Limitations
320
+
321
+ - **Sub-agent timeout**: Each sub-agent has a 30-minute timeout. Complex literature surveys may need longer.
322
+ - **GPU/Sandbox**: Code execution runs on host by default. OpenClaw sandbox does not support GPU passthrough yet.
323
+ - **Model dependency**: Research quality depends heavily on the LLM model used. Claude Opus 4.5+ or GPT-5+ recommended.
324
+
325
+ ---
326
+
327
+ ## Development
328
+
329
+ ```bash
330
+ git clone https://github.com/tsingyuai/scientify.git
331
+ cd scientify
332
+ pnpm install
333
+ pnpm build # Build TypeScript
334
+ pnpm dev # Watch mode
335
+
336
+ # Link to OpenClaw for testing
337
+ openclaw plugins install -l ./
338
+ ```
339
+
340
+ See [CLAUDE.md](./CLAUDE.md) for version update SOP and contribution guide.
341
+
342
+ ---
343
+
344
+ ## License
345
+
346
+ MIT
347
+
348
+ ## Author
349
+
350
+ tsingyuai