scientify 1.1.5 → 1.2.1

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.
@@ -6,7 +6,7 @@
6
6
  "skills": [
7
7
  "skills/idea-generation",
8
8
  "skills/research-pipeline",
9
- "skills/literature-review",
10
- "skills/arxiv"
9
+ "skills/literature-survey",
10
+ "skills/write-review-paper"
11
11
  ]
12
12
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scientify",
3
- "version": "1.1.5",
3
+ "version": "1.2.1",
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",
@@ -32,13 +32,16 @@
32
32
  "scripts": {
33
33
  "build": "tsc",
34
34
  "clean": "rm -rf dist",
35
+ "dev": "tsc --watch",
36
+ "dev:reload": "nodemon --watch src --watch skills --ext ts,md,json --exec \"npm run build && pkill -USR1 -f 'openclaw.mjs gateway' || true\" --delay 500ms",
35
37
  "prepublishOnly": "npm run clean && npm run build"
36
38
  },
37
39
  "devDependencies": {
38
40
  "@sinclair/typebox": "^0.32.0",
41
+ "@types/node": "^20.0.0",
42
+ "nodemon": "^3.1.11",
39
43
  "tar": "^7.0.0",
40
- "typescript": "^5.3.0",
41
- "@types/node": "^20.0.0"
44
+ "typescript": "^5.3.0"
42
45
  },
43
46
  "peerDependencies": {
44
47
  "openclaw": ">=2024.0.0"
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: idea-generation
3
- description: "Generate innovative research ideas from a topic. SEARCHES arXiv/GitHub automatically, downloads papers, analyzes literature, and outputs 5 novel research ideas with arXiv citations. Use for: 找研究方向, 生成创新点, find research gaps, propose new methods. NOT for summarizing existing papers (use literature-review instead)."
3
+ description: "Generate innovative research ideas from a topic. SEARCHES arXiv/GitHub automatically, downloads papers, analyzes literature, outputs 5 novel ideas with citations. Use for: 找研究方向, 生成创新点, find research gaps, propose new methods. NOT for: summarizing papers (use /write-review-paper), literature survey (use /literature-survey)."
4
4
  metadata:
5
5
  {
6
6
  "openclaw":
@@ -93,67 +93,14 @@ End-to-end workflow for generating innovative research ideas from a research top
93
93
 
94
94
  ## Step 0: Auto Project Management (REQUIRED)
95
95
 
96
- **Agent autonomously manages projects. DO NOT ask user for confirmation.**
96
+ **Autonomous - DO NOT ask user for confirmation.**
97
97
 
98
- ### 0.1 Extract Topic from User Query
98
+ 1. Extract topic from user query → convert to kebab-case ID
99
+ 2. Check `~/.openclaw/workspace/projects/` for existing match
100
+ 3. Use existing or create new: `mkdir -p $PROJECT_ID/{papers,repos,ideas}`
101
+ 4. Update `.active` file and set `$WORKSPACE` path
99
102
 
100
- Analyze the user's message to identify the research topic. Examples:
101
- - "帮我调研文本摘要方法" → topic: `text-summarization`
102
- - "推荐系统的深度学习方法" → topic: `rec-deep-learning`
103
- - "transformer attention optimization" → topic: `transformer-attention`
104
-
105
- Convert to kebab-case ID: lowercase, spaces/special chars → hyphens.
106
-
107
- ### 0.2 Check Existing Projects
108
-
109
- ```bash
110
- ls ~/.openclaw/workspace/projects/ 2>/dev/null | grep -v "^\.active$"
111
- ```
112
-
113
- Read each `project.json` to check if topic matches:
114
- ```bash
115
- cat ~/.openclaw/workspace/projects/*/project.json 2>/dev/null
116
- ```
117
-
118
- ### 0.3 Select or Create Project
119
-
120
- **If matching project exists**: Use it, update `.active`
121
- ```bash
122
- echo "{project_id}" > ~/.openclaw/workspace/projects/.active
123
- ```
124
-
125
- **If no match**: Create new project
126
- ```bash
127
- PROJECT_ID="{topic-as-kebab-case}"
128
- mkdir -p ~/.openclaw/workspace/projects/$PROJECT_ID/{papers,repos,ideas}
129
- echo "$PROJECT_ID" > ~/.openclaw/workspace/projects/.active
130
-
131
- # Create project.json
132
- cat > ~/.openclaw/workspace/projects/$PROJECT_ID/project.json << 'EOF'
133
- {
134
- "id": "{project_id}",
135
- "name": "{Human readable name}",
136
- "created": "{ISO date}",
137
- "topics": ["{keyword1}", "{keyword2}"]
138
- }
139
- EOF
140
- ```
141
-
142
- ### 0.4 Set Working Paths
143
-
144
- After project selection, ALL subsequent paths use:
145
- ```
146
- WORKSPACE=~/.openclaw/workspace/projects/{project_id}
147
- $WORKSPACE/task.json
148
- $WORKSPACE/search_results.md
149
- $WORKSPACE/papers/
150
- $WORKSPACE/repos/
151
- $WORKSPACE/ideas/
152
- $WORKSPACE/prepare_res.md
153
- ```
154
-
155
- **Log project selection** (inform user briefly):
156
- > 📁 Using project: `{project_id}` ({new/existing})
103
+ > 📁 Using project: `{project_id}` (new/existing)
157
104
 
158
105
  ---
159
106
 
@@ -415,55 +362,7 @@ For each paper in `papers/`:
415
362
  2. Extract: core contribution, math formulas, limitations, future work
416
363
  3. Note connections to other papers
417
364
 
418
- **⚠️ Handling Long Papers (>50KB or >15k tokens):**
419
-
420
- If a .tex file is too long to read in one pass:
421
-
422
- 1. **First pass - Structure scan:**
423
- ```bash
424
- # List all .tex files and their sizes
425
- ls -la $WORKSPACE/papers/{arxiv_id}/
426
- # Check line count
427
- wc -l $WORKSPACE/papers/{arxiv_id}/*.tex
428
- ```
429
-
430
- 2. **Chunked reading strategy:**
431
- - Read `abstract` section first (usually in main.tex, first 200 lines)
432
- - Read `\section{Introduction}` or `\section{Method}` separately
433
- - Read `\section{Experiments}` or `\section{Results}` separately
434
- - Read `\section{Conclusion}` and `\section{Related Work}` last
435
-
436
- Use the Read tool with `offset` and `limit` parameters:
437
- ```
438
- Tool: Read
439
- Arguments:
440
- file_path: "$WORKSPACE/papers/2404.04429/main.tex"
441
- offset: 1
442
- limit: 500 # First 500 lines (abstract + intro)
443
- ```
444
-
445
- Then continue:
446
- ```
447
- Tool: Read
448
- Arguments:
449
- file_path: "$WORKSPACE/papers/2404.04429/main.tex"
450
- offset: 500
451
- limit: 500 # Lines 500-1000 (method section)
452
- ```
453
-
454
- 3. **Priority sections for idea generation:**
455
- | Priority | Section | Why |
456
- |----------|---------|-----|
457
- | 1 | Abstract | Core contribution |
458
- | 2 | Method/Approach | Technical details, formulas |
459
- | 3 | Experiments | What works, what doesn't |
460
- | 4 | Conclusion/Future Work | Limitations, open problems |
461
- | 5 | Related Work | Connections to other papers |
462
-
463
- 4. **Skip if context-limited:**
464
- - Appendix (proofs, supplementary)
465
- - Acknowledgments
466
- - Detailed hyperparameter tables
365
+ **Long Papers (>50KB):** See `references/reading-long-papers.md` for chunked reading strategy.
467
366
 
468
367
  For each repo in `repos/`:
469
368
  1. Understand structure: `gen_code_tree_structure` equivalent
@@ -478,38 +377,15 @@ Look for:
478
377
  - Scalability issues
479
378
  - Assumptions that could be relaxed
480
379
 
481
- ### 5.3 Generate Idea 1
482
-
483
- Create `$WORKSPACE/ideas/idea_1.md` using the template in `references/idea-template.md`.
380
+ ### 5.3 Generate 5 Ideas
484
381
 
485
- **MUST include (with actual citations from your research):**
486
- - One-line summary
487
- - Challenges addressed
488
- - **Existing methods & limitations (cite specific papers by arXiv ID)**
489
- - Example: "Method A [arXiv:2301.12345] achieves X but fails at Y"
490
- - Example: "Method B [arXiv:2302.67890] proposes Z but has limitation W"
491
- - Motivation (why this gap matters)
492
- - Proposed method (with math formulas)
493
- - **How this improves on cited papers**
494
- - Expected advantages
495
- - Evaluation plan (datasets, baselines from the papers you read)
496
- - Novelty/Feasibility/Impact scores
382
+ Create `$WORKSPACE/ideas/idea_1.md` through `idea_5.md` using template in `references/idea-template.md`.
497
383
 
498
- **❌ REJECTED if:** No arXiv IDs cited, or ideas not connected to searched literature
384
+ **Key requirements:**
385
+ - Each idea must cite ≥2 papers by arXiv ID
386
+ - Use different strategies (see template): combination, simplification, generalization, constraint relaxation, architecture innovation
499
387
 
500
- ### 5.4 Generate Ideas 2-5
501
-
502
- For each subsequent idea, explicitly try a **different strategy**:
503
-
504
- | Idea | Strategy |
505
- |------|----------|
506
- | 1 | Combination - merge techniques from 2+ papers |
507
- | 2 | Simplification - simplify complex method |
508
- | 3 | Generalization - extend to new domain/task |
509
- | 4 | Constraint relaxation - remove limiting assumption |
510
- | 5 | Architecture innovation - novel model design |
511
-
512
- Create `idea_2.md`, `idea_3.md`, `idea_4.md`, `idea_5.md`.
388
+ **❌ REJECTED if:** No arXiv IDs cited, or ideas not grounded in literature
513
389
 
514
390
  **Output:** `$WORKSPACE/ideas/idea_1.md` through `idea_5.md`
515
391
 
@@ -519,36 +395,16 @@ Create `idea_2.md`, `idea_3.md`, `idea_4.md`, `idea_5.md`.
519
395
 
520
396
  ### 6.1 Evaluate All Ideas
521
397
 
522
- Create evaluation matrix:
523
-
524
- ```markdown
525
- # Idea Evaluation
526
-
527
- | Idea | Title | Novelty | Feasibility | Impact | Total |
528
- |------|-------|---------|-------------|--------|-------|
529
- | 1 | ... | 4 | 3 | 4 | 11 |
530
- | 2 | ... | 5 | 4 | 5 | 14 |
531
- | 3 | ... | 3 | 5 | 3 | 11 |
532
- | 4 | ... | 4 | 4 | 4 | 12 |
533
- | 5 | ... | 3 | 3 | 4 | 10 |
534
-
535
- **Selected: Idea 2**
536
-
537
- ## Selection Rationale
538
- [Why this idea is most promising - technical innovation, feasibility, impact]
539
- ```
398
+ Score each idea on Novelty/Feasibility/Impact (1-5). Select highest total.
540
399
 
541
400
  ### 6.2 Enhance Selected Idea
542
401
 
543
- Take the winning idea and create `$WORKSPACE/ideas/selected_idea.md`:
544
-
545
- **Enhancements to add:**
546
- 1. More detailed math formulations (complete loss functions, gradients)
547
- 2. Specific architecture choices (layer sizes, activations)
548
- 3. Hyperparameter recommendations
549
- 4. Implementation roadmap
550
- 5. Potential failure modes and mitigations
551
- 6. Detailed experiment design
402
+ Create `$WORKSPACE/ideas/selected_idea.md` with:
403
+ - Detailed math (loss functions, gradients)
404
+ - Architecture choices
405
+ - Hyperparameters
406
+ - Implementation roadmap
407
+ - Failure modes & mitigations
552
408
 
553
409
  **Output:** `$WORKSPACE/ideas/selected_idea.md`
554
410
 
@@ -556,91 +412,14 @@ Take the winning idea and create `$WORKSPACE/ideas/selected_idea.md`:
556
412
 
557
413
  ## Step 7: Code Survey - Map Idea to Implementations
558
414
 
559
- This step bridges theory and code. For each **atomic concept** in the selected idea, find corresponding implementations in the reference repos.
415
+ Map each **atomic concept** in the selected idea to code in reference repos.
560
416
 
561
- ### 7.1 Extract Atomic Concepts
417
+ See `references/code-mapping.md` for detailed template.
562
418
 
563
- From selected_idea.md, list all concepts needing implementation:
564
-
565
- ```markdown
566
- ## Atomic Concepts to Implement
567
-
568
- 1. Multi-head Self-Attention
569
- 2. Graph Message Passing
570
- 3. Energy-based Diffusion
571
- 4. Adaptive Diffusivity Function
572
- 5. ...
573
- ```
574
-
575
- ### 7.2 Survey Codebases
576
-
577
- For each concept:
578
-
579
- 1. Search repos for relevant code:
580
- ```bash
581
- grep -r "class.*Attention" $WORKSPACE/repos/
582
- grep -r "def forward" $WORKSPACE/repos/
583
- ```
584
-
585
- 2. Read and understand the implementation
586
-
587
- 3. Document the mapping
588
-
589
- ### 7.3 Create Implementation Report
590
-
591
- Write to `$WORKSPACE/ideas/implementation_report.md`:
592
-
593
- ```markdown
594
- # Implementation Report
595
-
596
- ## Selected Idea Summary
597
- [One paragraph summary]
598
-
599
- ## Concept-to-Code Mapping
600
-
601
- ### Concept 1: Multi-head Self-Attention
602
-
603
- **Math Formula:**
604
- $$
605
- \text{Attention}(Q,K,V) = \text{softmax}\left(\frac{QK^T}{\sqrt{d_k}}\right)V
606
- $$
607
-
608
- **Reference Implementation:**
609
- - File: `repos/transformer/attention.py`
610
- - Class: `MultiHeadAttention`
611
- - Key code:
612
- ```python
613
- class MultiHeadAttention(nn.Module):
614
- def __init__(self, d_model, n_heads):
615
- self.d_k = d_model // n_heads
616
- self.W_q = nn.Linear(d_model, d_model)
617
- # ...
618
-
619
- def forward(self, x):
620
- Q = self.W_q(x)
621
- # ...
622
- ```
623
-
624
- **Adaptation needed:**
625
- - [What to modify for our idea]
626
-
627
- ---
628
-
629
- ### Concept 2: Graph Message Passing
630
- ...
631
-
632
- ---
633
-
634
- ## Implementation Roadmap
635
-
636
- 1. [ ] Start with Concept X (foundational)
637
- 2. [ ] Build Concept Y on top
638
- 3. [ ] Integrate with Concept Z
639
- 4. [ ] Add training loop from repo W
640
-
641
- ## Recommended Starting Point
642
- [Which repo to fork/use as base]
643
- ```
419
+ **Quick steps:**
420
+ 1. Extract atomic concepts from `selected_idea.md`
421
+ 2. Search repos: `grep -r "class.*Attention" $WORKSPACE/repos/`
422
+ 3. Document mapping to `$WORKSPACE/ideas/implementation_report.md`
644
423
 
645
424
  **Output:** `$WORKSPACE/ideas/implementation_report.md`
646
425
 
@@ -648,53 +427,12 @@ class MultiHeadAttention(nn.Module):
648
427
 
649
428
  ## Step 8: Final Summary
650
429
 
651
- Create `$WORKSPACE/ideas/summary.md`:
652
-
653
- ```markdown
654
- # Research Idea Generation Report
655
-
656
- ## Task
657
- - Domain: {domain}
658
- - Focus: {focus}
659
- - Date: {date}
660
-
661
- ## Resources Gathered
662
- - Papers analyzed: X
663
- - Repositories cloned: Y
664
- - Key techniques identified: Z
665
-
666
- ## Ideas Generated
667
- 1. **[Idea 1 title]** - Score: 11
668
- 2. **[Idea 2 title]** - Score: 14 ⭐ SELECTED
669
- 3. **[Idea 3 title]** - Score: 11
670
- 4. **[Idea 4 title]** - Score: 12
671
- 5. **[Idea 5 title]** - Score: 10
672
-
673
- ## Selected Idea
674
- **{Title}**
675
-
676
- {One paragraph description}
677
-
678
- ### Key Innovation
679
- {What makes this novel}
680
-
681
- ### Implementation Ready
682
- - Math formulas: ✓ Complete
683
- - Code references: ✓ Mapped
684
- - Evaluation plan: ✓ Defined
685
-
686
- ## Next Steps
687
- 1. Run `/research-pipeline` with `selected_idea.md` as input
688
- 2. Or manually implement following `implementation_report.md`
689
-
690
- ## Files Generated
691
- - `task.json` - Task definition
692
- - `search_results.md` - Search results
693
- - `prepare_res.md` - Selected repos
694
- - `ideas/idea_*.md` - 5 generated ideas
695
- - `ideas/selected_idea.md` - Enhanced best idea
696
- - `ideas/implementation_report.md` - Code mapping
697
- ```
430
+ Create `$WORKSPACE/ideas/summary.md` with:
431
+ - Task overview (domain, focus)
432
+ - Resources gathered (papers, repos count)
433
+ - All 5 ideas with scores
434
+ - Selected idea details
435
+ - Next steps: `/research-pipeline` or manual implementation
698
436
 
699
437
  **Output:** `$WORKSPACE/ideas/summary.md`
700
438
 
@@ -717,15 +455,11 @@ Before completing, verify:
717
455
  ## Integration with Other Skills
718
456
 
719
457
  **After idea-generation:**
720
- ```
721
- /research-pipeline → Implement the selected idea
722
- ```
458
+ - `/research-pipeline` → Implement the selected idea
723
459
 
724
460
  **To gather more resources:**
725
- ```
726
- /arxiv "specific topic" Search more papers
727
- /literature-review → Deep dive into papers
728
- ```
461
+ - `/literature-survey` → Comprehensive paper collection
462
+ - `/write-review-paper`Synthesize into review
729
463
 
730
464
  ---
731
465
 
@@ -0,0 +1,51 @@
1
+ # Code Survey & Implementation Mapping
2
+
3
+ Map selected idea concepts to actual code implementations.
4
+
5
+ ## Step 1: Extract Atomic Concepts
6
+
7
+ From `selected_idea.md`, list concepts needing implementation.
8
+
9
+ ## Step 2: Survey Codebases
10
+
11
+ ```bash
12
+ grep -r "class.*Attention" $WORKSPACE/repos/
13
+ grep -r "def forward" $WORKSPACE/repos/
14
+ ```
15
+
16
+ ## Step 3: Implementation Report
17
+
18
+ Write to `$WORKSPACE/ideas/implementation_report.md`:
19
+
20
+ ```markdown
21
+ # Implementation Report
22
+
23
+ ## Concept-to-Code Mapping
24
+
25
+ ### Concept 1: [Name]
26
+
27
+ **Math:**
28
+ $$\text{Formula}$$
29
+
30
+ **Reference:**
31
+ - File: `repos/<repo>/path/to/file.py`
32
+ - Class: `ClassName`
33
+
34
+ **Adaptation needed:**
35
+ - [Modifications for our idea]
36
+
37
+ ## Implementation Roadmap
38
+
39
+ 1. [ ] Concept X (foundational)
40
+ 2. [ ] Concept Y
41
+ 3. [ ] Integration
42
+
43
+ ## Recommended Base Repository
44
+ [repo_name] - [reason]
45
+ ```
46
+
47
+ ## Quality Checklist
48
+
49
+ - [ ] Every concept has code reference
50
+ - [ ] No placeholders
51
+ - [ ] Clear roadmap order