Skip to content
Open
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ node_modules/
dist/
*.log
.DS_Store
.omx/
12 changes: 7 additions & 5 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@
Scientify 是一个 OpenClaw 插件,提供 AI 驱动的科研工作流自动化功能。

**核心组件:**
- `src/tools/` - 工具实现(arxiv_search, arxiv_download, openalex_search, unpaywall_download, github_search, paper_browser
- `src/tools/` - 当前运行时工具实现(`arxiv_search`, `openalex_search`
- `src/commands.ts` - 聊天命令处理
- `skills/` - 技能定义(随 npm 包发布)
- `index.ts` - 插件入口
- `openclaw.plugin.json` - 插件注册(skills 列表)

历史上存在但已下沉到 skill / shell / OpenClaw 平台能力的工具,请看 `docs/historical-tools.md`。

## 版本更新 SOP

### 1. 代码修改
Expand Down Expand Up @@ -122,11 +124,11 @@ scientify/
│ ├── openclaw.d.ts # 类型声明
│ └── tools/
│ ├── arxiv-search.ts # ArXiv 搜索工具
│ ├── arxiv-download.ts # ArXiv 下载工具(含速率限制)
│ ├── openalex-search.ts # OpenAlex 跨学科搜索
│ ├── unpaywall-download.ts # Unpaywall OA PDF 下载
│ ├── github-search-tool.ts # GitHub 搜索工具
│ └── paper-browser.ts # 论文分页浏览工具
│ └── result.ts # Tool result helpers
├── docs/
│ ├── current-capability-map.md # 当前工具 / skill / 工作流能力地图
│ └── historical-tools.md # 历史 tool 考据
├── skills/
│ ├── idea-generation/
│ │ ├── SKILL.md
Expand Down
46 changes: 24 additions & 22 deletions README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,8 @@ Driven by multi-agent iteration: the orchestrator holds hypotheses and all accum
│ │──→│ edit them too │
│ arxiv_search │ └──────────────────────────────┘
│ openalex_search │
│ github_search │
│ paper_browser │
│ code_executor │
│ platform / local exec │
│ / skill steps │
└──────────────────────────┘
```

Expand All @@ -116,14 +115,25 @@ Pipeline internally uses multi-agent iteration: the orchestrator holds hypothese

### Tool Layer

The agents' hands and eyes:
Scientify organizes research capabilities as a unified semantic layer spanning the runtime registration surface and the workflow execution surface:

| Tool | Capability |
|------|-----------|
| `arxiv_search` / `openalex_search` | Search academic papers (arXiv + cross-disciplinary) |
| `github_search` | Search open-source code implementations |
| `paper_browser` | Paginated paper reading, avoids context overflow |
| `code_executor` | Execute experiment code in `uv`-isolated environment |
| Capability semantic | Primary carrier | Typical target | Execution path | Typical outputs |
|---------------------|-----------------|----------------|----------------|-----------------|
| `arxiv_search`-like capability | Runtime-registered tool | arXiv metadata and candidate paper sets | Registered in the plugin entrypoint and invoked through standard tool calls | search results, candidate paper lists, survey inputs |
| `openalex_search`-like capability | Runtime-registered tool | cross-disciplinary metadata, DOI, citation, and OA signals | Registered in the plugin entrypoint and invoked through standard tool calls | search results, complementary literature sources, survey inputs |
| `github_search`-like capability | Workflow execution step | open-source implementations, baseline repos, reproduction leads | carried out through OpenClaw platform capabilities, local environment commands, or steps defined inside skills | `survey_res.md`, implementation references, repo links |
| `paper_browser`-like capability | Workflow execution step | `.md`, `.tex`, long papers, and drafts | carried out through OpenClaw platform capabilities, local environment commands, or steps defined inside skills | chunked reading results, local excerpts, structured notes |
| `code_executor`-like capability | Workflow execution step | workspace training, evaluation, scripts, and experiment runs | carried out through OpenClaw platform capabilities, local environment commands, or steps defined inside skills | run logs, validation outputs, experiment artifacts |
| `arxiv_download`-like capability | Workflow execution step | arXiv source or PDF acquisition | carried out through OpenClaw platform capabilities, local environment commands, or steps defined inside skills | paper files under `papers/` |
| `openreview_lookup`-like capability | Workflow execution step | reviews, decisions, and forum context | carried out through OpenClaw platform capabilities, local environment commands, or steps defined inside skills | review evidence, comparison notes, review summaries |
| `unpaywall_download`-like capability | Workflow execution step | OA PDF acquisition by DOI | carried out through OpenClaw platform capabilities, local environment commands, or steps defined inside skills | downloaded PDFs and provenance records |

At the implementation boundary:
- the `tool registry` exposes stable, named, directly invokable runtime interfaces
- `skills` define stage ordering, input/output contracts, and artifact materialization
- file reads, command execution, downloads, and external-site interactions are carried out through OpenClaw platform capabilities, local environment commands, or steps defined inside skills

For the current capability map, see [docs/current-capability-map.md](./docs/current-capability-map.md). For historical tool notes, see [docs/historical-tools.md](./docs/historical-tools.md).

> 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.

Expand Down Expand Up @@ -294,25 +304,19 @@ Check status anytime:

| Skill | Description |
|-------|-------------|
| **paper-download** | Acquire paper files into the project workspace for downstream reading and analysis. |
| **metabolism** | Run day-0 bootstrapping or day-N daily knowledge metabolism for a research topic. |
| **write-review-paper** | Draft a review/survey paper from project research outputs. |
| **research-subscription** | Create/list/remove scheduled Scientify jobs via `scientify_cron_job` (research digests or plain reminders). |

</details>

<details>
<summary><b>Tools (available to LLM)</b></summary>
<summary><b>Runtime-registered Tools</b></summary>

| Tool | Description |
|------|-------------|
| `arxiv_search` | Search arXiv papers. Returns metadata (title, authors, abstract, ID). Supports sorting by relevance/date and date filtering. |
| `arxiv_download` | Batch download papers by arXiv ID. Prefers .tex source files (PDF fallback). |
| `openalex_search` | Search cross-disciplinary academic papers via OpenAlex API. Returns DOI, authors, citation count, OA status. |
| `openreview_lookup` | Lookup OpenReview evidence by title/ID/forum. Returns decision, review rating/confidence aggregates, and review summaries. |
| `unpaywall_download` | Download open access PDFs by DOI via Unpaywall API. Non-OA papers are silently skipped. |
| `github_search` | Search GitHub repositories. Returns repo name, description, stars, URL. Supports language filtering and sorting. |
| `paper_browser` | Paginated browsing of large paper files (.tex/.md) to avoid context overflow. |
| `scientify_cron_job` | Manage scheduled Scientify jobs (`upsert`/`list`/`remove`). |
| `scientify_literature_state` | Persistent incremental state for subscriptions: dedupe, record, feedback, and status inspection. |

</details>

Expand All @@ -326,9 +330,7 @@ Check status anytime:
| `/ideas` | List generated ideas |
| `/projects` | List all projects |
| `/project-delete <id>` | Delete a project |
| `/research-subscribe ...` | Create/update scheduled Scientify jobs |
| `/research-subscriptions` | Show your scheduled Scientify jobs |
| `/research-unsubscribe [job-id]` | Remove your scheduled Scientify jobs |
| `/metabolism-status` | Show knowledge metabolism status for the active project |

</details>

Expand Down
32 changes: 21 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,8 @@ Scientify 采用**新陈代谢模式**——持续地摄入、消化、沉淀、
│ │──→│ │
│ arxiv_search │ └──────────────────────────────┘
│ openalex_search │
│ github_search │
│ paper_browser │
│ code_executor │
│ 平台能力 / 本地命令 │
│ / skill 执行步骤 │
└──────────────────────────┘
```

Expand All @@ -116,14 +115,25 @@ Pipeline 内部是多 Agent 迭代:编排器持有假设,spawn 子 agent 执

### 工具层

Agent 的手和眼:

| 工具 | 能力 |
|------|------|
| `arxiv_search` / `openalex_search` | 搜索学术论文(arXiv + 跨学科) |
| `github_search` | 搜索开源代码实现 |
| `paper_browser` | 分页精读论文,避免上下文溢出 |
| `code_executor` | 在 `uv` 隔离环境中执行实验代码 |
Scientify 将研究能力组织为统一的能力语义层,并分别落在运行时注册面与工作流执行面中:

| 能力语义 | 主要载体 | 典型对象 | 执行路径 | 典型产物 |
|---------|----------|----------|----------|----------|
| `arxiv_search` 类能力 | 运行时注册 tool | arXiv 论文元数据、候选论文集合 | 由插件入口注册,并通过标准 tool call 调用 | 检索结果、候选论文列表、survey 输入 |
| `openalex_search` 类能力 | 运行时注册 tool | 跨学科论文元数据、DOI、引用与 OA 信息 | 由插件入口注册,并通过标准 tool call 调用 | 检索结果、补充文献来源、survey 输入 |
| `github_search` 类能力 | 工作流执行步骤 | 开源实现、baseline 仓库、复现线索 | 由 OpenClaw 平台能力、本地环境命令或 skill 内步骤来完成 | `survey_res.md`、实现参考、仓库链接 |
| `paper_browser` 类能力 | 工作流执行步骤 | `.md`、`.tex`、长论文文本、草稿 | 由 OpenClaw 平台能力、本地环境命令或 skill 内步骤来完成 | 分段阅读结果、局部摘录、结构化笔记 |
| `code_executor` 类能力 | 工作流执行步骤 | 工作区中的训练、评测、脚本与实验运行 | 由 OpenClaw 平台能力、本地环境命令或 skill 内步骤来完成 | 运行日志、验证结果、实验产物 |
| `arxiv_download` 类能力 | 工作流执行步骤 | arXiv source / PDF 获取 | 由 OpenClaw 平台能力、本地环境命令或 skill 内步骤来完成 | `papers/` 下的论文文件 |
| `openreview_lookup` 类能力 | 工作流执行步骤 | review、decision、forum 上下文 | 由 OpenClaw 平台能力、本地环境命令或 skill 内步骤来完成 | 评审证据、对比说明、review notes |
| `unpaywall_download` 类能力 | 工作流执行步骤 | DOI 对应的 OA PDF 获取 | 由 OpenClaw 平台能力、本地环境命令或 skill 内步骤来完成 | 下载后的 PDF、来源记录 |

从实现边界看:
- `tool registry` 提供稳定、命名、可直接调用的运行时接口
- `skill` 负责编排研究阶段中的执行顺序、输入输出契约与产物落盘
- 文件读取、命令执行、下载与外部站点交互由 OpenClaw 平台能力、本地环境命令或 skill 内步骤来完成

当前能力地图见 [docs/current-capability-map.md](./docs/current-capability-map.md);历史 tool 考据见 [docs/historical-tools.md](./docs/historical-tools.md)。

> Scientify 运行在 [OpenClaw](https://github.com/openclaw/openclaw) 之上,天然可调用平台的 MCP 服务器(Slack / 飞书推送)、浏览器自动化(付费文献下载)、多会话并发(多方向并行研究)等能力。

Expand Down
104 changes: 104 additions & 0 deletions docs/current-capability-map.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# Scientify Current Capability Map

This note is a local maintainer-facing map of the current Scientify capability surface. It complements the README and the historical tools note; it does not replace either.

## Current Runtime Tools

Scientify currently registers two runtime tools from the plugin entrypoint:

- `arxiv_search`: arXiv metadata search for candidate papers and survey inputs.
- `openalex_search`: cross-disciplinary academic metadata search with DOI, citation, and open-access signals.

Everything else described below is a workflow capability implemented through skills, OpenClaw platform capabilities, local shell commands, or project files.

## Workflow Skills

### Discovery and Knowledge

- `/research-collect`: search, filter, download, and organize papers plus implementation references.
- `/research-survey`: read collected papers and produce structured notes plus `survey_res.md`.
- `/idea-generation`: generate grounded research ideas from collected literature.
- `/metabolism`: maintain an ongoing knowledge loop for configured research projects.
- `/paper-download`: acquire arXiv source/PDF and DOI open-access PDFs into `papers/`.

### Planning and Midstream Quality

- `/algorithm-selection`: choose one route, record rejected routes, and keep a fallback.
- `/research-plan`: produce `plan_res.md`; supports ML and non-ML four-part plan shapes.
- `/dataset-validate`: audit data reality, split correctness, leakage risk, labels, and mock-data disclosure.
- `/baseline-runner`: run or document matched baselines before headline comparisons.

### Execution and Verification

- `/research-implement`: create runnable project code from `plan_res.md` and produce `ml_res.md`.
- `/research-review`: inspect implementation against survey concepts, formulas, data, and plan.
- `/research-experiment`: run full experiments, ablations, and supplementary analysis after review passes.

### Writing and Release

- `/write-paper`: create claim-bounded paper artifacts from existing evidence.
- `/write-review-paper`: write literature reviews or survey chapters from collected papers.
- `/figure-standardize`: polish existing figures without changing the scientific claim or source data.
- `/artifact-review`: review papers, figures, README/docs, and release pages before sharing.
- `/release-layout`: improve README/docs/release surfaces after evidence and release gate status are clear.

## Historical Tool Capabilities

Several capabilities used to be dedicated TypeScript tools and are now workflow-level capabilities. See `docs/historical-tools.md` for commit-level details.

| Capability | Current home |
| --- | --- |
| GitHub implementation search | skill steps, OpenClaw platform abilities, `gh`, shell, or browser |
| Long paper / draft browsing | direct file reads and structured skill reading |
| arXiv source/PDF download | `/paper-download` and shell workflow |
| OpenReview lookup | browser/API/shell workflow when needed |
| DOI open-access PDF download | `/paper-download` and Unpaywall-style shell workflow |
| Code execution | OpenClaw/local runtime and project scripts, not a Scientify runtime tool |

## Recommended Default Flow

For a fresh experiment-driven project:

```text
/research-collect
/research-survey
/algorithm-selection
/research-plan
/dataset-validate
/baseline-runner
/research-implement
/research-review
/research-experiment
/write-paper
/artifact-review
```

For an existing project, start from `/research-status` and follow the `Next` recommendation. The status command detects the main artifact checkpoints:

```text
survey -> selection -> plan -> data_validation -> baseline -> implement -> review -> experiment -> paper -> artifact_review
```

## Non-ML Project Guidance

Do not force non-ML projects into fake datasets or training loops. Keep the same artifact names when possible, but adapt the four-part plan shape.

Examples:

| Project type | Planning sections |
| --- | --- |
| ML / benchmark | Dataset, Model, Training, Testing |
| Theory / numerics | Input or Parameter Plan, Model or Formula Plan, Numerical Execution Plan, Testing or Review Plan |
| Literature review | Corpus Plan, Reading or Extraction Plan, Synthesis Plan, Validation or Citation Audit Plan |

The standard remains the same: concrete inputs, traceable evidence, reproducible execution steps, and explicit validation.

## Release Readiness

A paper PDF, figure bundle, or polished README is not automatically share-ready. Release-facing artifacts should pass `/artifact-review`, producing:

- `review/artifact_review.md`
- `review/release_checklist.md`
- `review/release_gate.json`

If any reviewed artifact changes after the gate, rerun `/artifact-review` before treating the bundle as ready.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"files": [
"dist",
"skills",
"docs",
"openclaw.plugin.json"
],
"keywords": [
Expand Down
4 changes: 4 additions & 0 deletions skills/artifact-review/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ metadata:

This is a release-readiness review skill. It does **not** invent new claims or run new experiments. It checks whether the current artifacts are safe to share.

For README, docs, figure bundles, and papers, review the same claim boundary across every surface. A claim that is cautious in `paper/claim_inventory.md` must not become stronger in a README headline, figure caption, abstract, or release page.

## Required Outputs

- `review/artifact_review.md`
Expand Down Expand Up @@ -51,6 +53,8 @@ Review the artifact set in one or more of these modes:

List the files being reviewed, the headline claims they appear to make, the source artifact path for each headline claim when available, which figures or tables support them, and which review mode applies to each file (`paper review`, `figure review`, `release page review`, or `style review`).

When README or docs are in scope, map their first-screen claims back to the same evidence inventory used by the paper or experiment report. When figures are in scope, map each caption takeaway to the figure data source and to `supports_claim_ids` when a paper manifest exists.

### Step 2: Review Findings First

Write `artifact_review.md` as a findings-first review using severity levels:
Expand Down
3 changes: 3 additions & 0 deletions skills/figure-standardize/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ Use this skill to turn one-off Scientify charts into release-ready figures.

**Do not run new experiments here.** Work from existing results, plotting scripts, and figure bundles. If the source data is missing or inconsistent, report that explicitly instead of smoothing it over.

This skill may regenerate figures only from existing scripts and existing result data. It must not change metrics, filters, baselines, sample sets, or experimental conclusions. If a visual improvement would require new evidence, stop and ask for `/research-experiment` or the relevant project workflow instead.

## Required Outputs

1. Updated plotting script(s) or a shared style helper
Expand Down Expand Up @@ -108,3 +110,4 @@ Keep filenames stable unless the user explicitly asked for a new release bundle.
5. Do not change the scientific claim. This skill improves packaging, not evidence.
6. If a figure is paper-facing, produce both a long caption and a first-use callout sentence.
7. If a figure supports a claim, the manifest must name that claim in `supports_claim_ids`.
8. Do not silently change source data, metric definitions, or baseline membership while polishing a figure.
Loading
Loading