@yeyuan98/opencode-bioresearcher-plugin 1.4.0 → 1.4.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.
@@ -1,210 +1,210 @@
1
- # BioResearcher Core
2
-
3
- Core library skill providing reusable patterns and utilities for BioResearcher skills.
4
-
5
- ## Overview
6
-
7
- BioResearcher Core provides:
8
- - **Workflow patterns** for common operations (retry, progress, subagent waves)
9
- - **Data handling patterns** for JSON and table operations
10
- - **Python utilities** for template generation
11
- - **Tool-first architecture** using existing plugin tools
12
-
13
- ## Installation
14
-
15
- No installation required. This skill uses only:
16
- - Existing plugin tools (jsonExtract, jsonValidate, etc.)
17
- - Python standard library
18
-
19
- ## Quick Start
20
-
21
- ### Load the Skill
22
-
23
- ```
24
- skill bioresearcher-core
25
- ```
26
-
27
- ### Extract Skill Path
28
-
29
- From the `<skill_files>` section in the skill tool output, extract the `<skill_path>` value for use in commands.
30
-
31
- ### Use a Pattern
32
-
33
- ```
34
- Read <skill_path>/patterns/retry.md
35
- ```
36
-
37
- ### Run Python Script
38
-
39
- ```bash
40
- uv run python <skill_path>/python/template.py generate-batches \
41
- --template template.md \
42
- --contexts contexts.json \
43
- --output-dir ./outputs
44
- ```
45
-
46
- ## Available Patterns
47
-
48
- ### Workflow Control
49
-
50
- | Pattern | Description | File |
51
- |---------|-------------|------|
52
- | Retry | Retry with backoff using blockingTimer | `patterns/retry.md` |
53
- | Progress | Track and report batch progress | `patterns/progress.md` |
54
- | Subagent Waves | Parallel subagent processing | `patterns/subagent-waves.md` |
55
- | Shell Commands | Cross-platform command generation | `patterns/shell-commands.md` |
56
- | User Confirmation | Request user confirmation | `patterns/user-confirmation.md` |
57
-
58
- ### Data Handling
59
-
60
- | Pattern | Description | File |
61
- |---------|-------------|------|
62
- | JSON Tools | jsonExtract/jsonValidate/jsonInfer | `patterns/json-tools.md` |
63
- | Table Tools | Combine outputs with table tools | `patterns/table-tools.md` |
64
- | Data Exchange | Main/subagent communication | `patterns/data-exchange.md` |
65
- | Calculator | In-workflow calculations | `patterns/calculator.md` |
66
-
67
- ## Available Tools
68
-
69
- These tools are always available without loading pattern files:
70
-
71
- ### JSON Tools
72
-
73
- | Tool | Description |
74
- |------|-------------|
75
- | `jsonExtract` | Extract JSON from files |
76
- | `jsonValidate` | Validate JSON against schemas |
77
- | `jsonInfer` | Infer schemas from data |
78
-
79
- ### Utility Tools
80
-
81
- | Tool | Description |
82
- |------|-------------|
83
- | `blockingTimer` | Blocking delays (0-300 seconds) |
84
- | `calculator` | Mathematical expressions |
85
-
86
- ### Table Tools
87
-
88
- | Tool | Description |
89
- |------|-------------|
90
- | `tableCreateFile` | Create Excel/CSV from data |
91
- | `tableAppendRows` | Append rows to tables |
92
-
93
- ## Python Utilities
94
-
95
- ### Template Engine
96
-
97
- Location: `python/template.py`
98
-
99
- Commands:
100
- - `fill` - Generate single file from template
101
- - `generate-batches` - Generate multiple files from template
102
- - `escape` - Escape text for markdown
103
-
104
- See `python/template.md` for full documentation.
105
-
106
- ## Examples
107
-
108
- ### Example Files
109
-
110
- | File | Description |
111
- |------|-------------|
112
- | `examples/template.md` | Example template with placeholders |
113
- | `examples/contexts.json` | Example contexts for batch generation |
114
- | `examples/data-exchange-example.md` | Complete data exchange workflow |
115
-
116
- ## Architecture
117
-
118
- ### Tool-First Design
119
-
120
- This skill maximizes use of existing plugin tools:
121
-
122
- ```
123
- ┌─────────────────────────────────────────────────┐
124
- │ BioResearcher Core │
125
- ├─────────────────────────────────────────────────┤
126
- │ Patterns (markdown) │ Python Utilities │
127
- │ - retry.md │ - template.py │
128
- │ - progress.md │ │
129
- │ - subagent-waves.md │ │
130
- │ - json-tools.md │ │
131
- │ - table-tools.md │ │
132
- │ - data-exchange.md │ │
133
- │ - calculator.md │ │
134
- │ - shell-commands.md │ │
135
- │ - user-confirmation.md │ │
136
- ├─────────────────────────┴───────────────────────┤
137
- │ Plugin Tools │
138
- │ jsonExtract │ jsonValidate │ jsonInfer │
139
- │ blockingTimer │ calculator │
140
- │ tableCreateFile │ tableAppendRows │
141
- └─────────────────────────────────────────────────┘
142
- ```
143
-
144
- ### Pattern Modules
145
-
146
- Each pattern is a self-contained markdown file:
147
- - Independent (no dependencies on other patterns)
148
- - Self-documenting (explains itself)
149
- - Minimal loading (agent reads only what it needs)
150
-
151
- ## Integration with Other Skills
152
-
153
- ### long-table-summary
154
-
155
- BioResearcher Core can be used by long-table-summary:
156
- - Use `jsonExtract` instead of manual JSON parsing
157
- - Use `jsonValidate` for schema validation
158
- - Apply retry/progress patterns
159
- - Use template.py for prompt generation
160
-
161
- ### pubmed-weekly
162
-
163
- BioResearcher Core can be used by pubmed-weekly:
164
- - Apply retry pattern for download failures
165
- - Use shell-commands pattern for cross-platform support
166
-
167
- ## Design Principles
168
-
169
- 1. **Tool-first**: Use existing tools before creating Python scripts
170
- 2. **Self-contained**: Each pattern is independent
171
- 3. **Minimal dependencies**: Only Python standard library
172
- 4. **Clear documentation**: Every file documents itself
173
- 5. **Standard protocols**: JSON for data exchange
174
-
175
- ## Directory Structure
176
-
177
- ```
178
- plugin/skills/bioresearcher-core/
179
- ├── SKILL.md # Routing document
180
- ├── README.md # This file
181
- ├── patterns/ # Workflow patterns
182
- │ ├── retry.md
183
- │ ├── progress.md
184
- │ ├── subagent-waves.md
185
- │ ├── shell-commands.md
186
- │ ├── user-confirmation.md
187
- │ ├── json-tools.md
188
- │ ├── table-tools.md
189
- │ ├── data-exchange.md
190
- │ └── calculator.md
191
- ├── python/ # Python utilities
192
- │ ├── template.py
193
- │ └── template.md
194
- └── examples/ # Example files
195
- ├── template.md
196
- ├── contexts.json
197
- └── data-exchange-example.md
198
- ```
199
-
200
- ## Contributing
201
-
202
- When adding new patterns:
203
- 1. Create self-contained markdown file in `patterns/`
204
- 2. Follow existing pattern structure
205
- 3. Include examples and error handling
206
- 4. Update SKILL.md with new pattern reference
207
-
208
- ## License
209
-
210
- Part of the BioResearcher plugin ecosystem.
1
+ # BioResearcher Core
2
+
3
+ Core library skill providing reusable patterns and utilities for BioResearcher skills.
4
+
5
+ ## Overview
6
+
7
+ BioResearcher Core provides:
8
+ - **Workflow patterns** for common operations (retry, progress, subagent waves)
9
+ - **Data handling patterns** for JSON and table operations
10
+ - **Python utilities** for template generation
11
+ - **Tool-first architecture** using existing plugin tools
12
+
13
+ ## Installation
14
+
15
+ No installation required. This skill uses only:
16
+ - Existing plugin tools (jsonExtract, jsonValidate, etc.)
17
+ - Python standard library
18
+
19
+ ## Quick Start
20
+
21
+ ### Load the Skill
22
+
23
+ ```
24
+ skill bioresearcher-core
25
+ ```
26
+
27
+ ### Extract Skill Path
28
+
29
+ From the `<skill_files>` section in the skill tool output, extract the `<skill_path>` value for use in commands.
30
+
31
+ ### Use a Pattern
32
+
33
+ ```
34
+ Read <skill_path>/patterns/retry.md
35
+ ```
36
+
37
+ ### Run Python Script
38
+
39
+ ```bash
40
+ uv run python <skill_path>/python/template.py generate-batches \
41
+ --template template.md \
42
+ --contexts contexts.json \
43
+ --output-dir ./outputs
44
+ ```
45
+
46
+ ## Available Patterns
47
+
48
+ ### Workflow Control
49
+
50
+ | Pattern | Description | File |
51
+ |---------|-------------|------|
52
+ | Retry | Retry with backoff using blockingTimer | `patterns/retry.md` |
53
+ | Progress | Track and report batch progress | `patterns/progress.md` |
54
+ | Subagent Waves | Parallel subagent processing | `patterns/subagent-waves.md` |
55
+ | Shell Commands | Cross-platform command generation | `patterns/shell-commands.md` |
56
+ | User Confirmation | Request user confirmation | `patterns/user-confirmation.md` |
57
+
58
+ ### Data Handling
59
+
60
+ | Pattern | Description | File |
61
+ |---------|-------------|------|
62
+ | JSON Tools | jsonExtract/jsonValidate/jsonInfer | `patterns/json-tools.md` |
63
+ | Table Tools | Combine outputs with table tools | `patterns/table-tools.md` |
64
+ | Data Exchange | Main/subagent communication | `patterns/data-exchange.md` |
65
+ | Calculator | In-workflow calculations | `patterns/calculator.md` |
66
+
67
+ ## Available Tools
68
+
69
+ These tools are always available without loading pattern files:
70
+
71
+ ### JSON Tools
72
+
73
+ | Tool | Description |
74
+ |------|-------------|
75
+ | `jsonExtract` | Extract JSON from files |
76
+ | `jsonValidate` | Validate JSON against schemas |
77
+ | `jsonInfer` | Infer schemas from data |
78
+
79
+ ### Utility Tools
80
+
81
+ | Tool | Description |
82
+ |------|-------------|
83
+ | `blockingTimer` | Blocking delays (0-300 seconds) |
84
+ | `calculator` | Mathematical expressions |
85
+
86
+ ### Table Tools
87
+
88
+ | Tool | Description |
89
+ |------|-------------|
90
+ | `tableCreateFile` | Create Excel/CSV from data |
91
+ | `tableAppendRows` | Append rows to tables |
92
+
93
+ ## Python Utilities
94
+
95
+ ### Template Engine
96
+
97
+ Location: `python/template.py`
98
+
99
+ Commands:
100
+ - `fill` - Generate single file from template
101
+ - `generate-batches` - Generate multiple files from template
102
+ - `escape` - Escape text for markdown
103
+
104
+ See `python/template.md` for full documentation.
105
+
106
+ ## Examples
107
+
108
+ ### Example Files
109
+
110
+ | File | Description |
111
+ |------|-------------|
112
+ | `examples/template.md` | Example template with placeholders |
113
+ | `examples/contexts.json` | Example contexts for batch generation |
114
+ | `examples/data-exchange-example.md` | Complete data exchange workflow |
115
+
116
+ ## Architecture
117
+
118
+ ### Tool-First Design
119
+
120
+ This skill maximizes use of existing plugin tools:
121
+
122
+ ```
123
+ ┌─────────────────────────────────────────────────┐
124
+ │ BioResearcher Core │
125
+ ├─────────────────────────────────────────────────┤
126
+ │ Patterns (markdown) │ Python Utilities │
127
+ │ - retry.md │ - template.py │
128
+ │ - progress.md │ │
129
+ │ - subagent-waves.md │ │
130
+ │ - json-tools.md │ │
131
+ │ - table-tools.md │ │
132
+ │ - data-exchange.md │ │
133
+ │ - calculator.md │ │
134
+ │ - shell-commands.md │ │
135
+ │ - user-confirmation.md │ │
136
+ ├─────────────────────────┴───────────────────────┤
137
+ │ Plugin Tools │
138
+ │ jsonExtract │ jsonValidate │ jsonInfer │
139
+ │ blockingTimer │ calculator │
140
+ │ tableCreateFile │ tableAppendRows │
141
+ └─────────────────────────────────────────────────┘
142
+ ```
143
+
144
+ ### Pattern Modules
145
+
146
+ Each pattern is a self-contained markdown file:
147
+ - Independent (no dependencies on other patterns)
148
+ - Self-documenting (explains itself)
149
+ - Minimal loading (agent reads only what it needs)
150
+
151
+ ## Integration with Other Skills
152
+
153
+ ### long-table-summary
154
+
155
+ BioResearcher Core can be used by long-table-summary:
156
+ - Use `jsonExtract` instead of manual JSON parsing
157
+ - Use `jsonValidate` for schema validation
158
+ - Apply retry/progress patterns
159
+ - Use template.py for prompt generation
160
+
161
+ ### pubmed-weekly
162
+
163
+ BioResearcher Core can be used by pubmed-weekly:
164
+ - Apply retry pattern for download failures
165
+ - Use shell-commands pattern for cross-platform support
166
+
167
+ ## Design Principles
168
+
169
+ 1. **Tool-first**: Use existing tools before creating Python scripts
170
+ 2. **Self-contained**: Each pattern is independent
171
+ 3. **Minimal dependencies**: Only Python standard library
172
+ 4. **Clear documentation**: Every file documents itself
173
+ 5. **Standard protocols**: JSON for data exchange
174
+
175
+ ## Directory Structure
176
+
177
+ ```
178
+ plugin/skills/bioresearcher-core/
179
+ ├── SKILL.md # Routing document
180
+ ├── README.md # This file
181
+ ├── patterns/ # Workflow patterns
182
+ │ ├── retry.md
183
+ │ ├── progress.md
184
+ │ ├── subagent-waves.md
185
+ │ ├── shell-commands.md
186
+ │ ├── user-confirmation.md
187
+ │ ├── json-tools.md
188
+ │ ├── table-tools.md
189
+ │ ├── data-exchange.md
190
+ │ └── calculator.md
191
+ ├── python/ # Python utilities
192
+ │ ├── template.py
193
+ │ └── template.md
194
+ └── examples/ # Example files
195
+ ├── template.md
196
+ ├── contexts.json
197
+ └── data-exchange-example.md
198
+ ```
199
+
200
+ ## Contributing
201
+
202
+ When adding new patterns:
203
+ 1. Create self-contained markdown file in `patterns/`
204
+ 2. Follow existing pattern structure
205
+ 3. Include examples and error handling
206
+ 4. Update SKILL.md with new pattern reference
207
+
208
+ ## License
209
+
210
+ Part of the BioResearcher plugin ecosystem.
@@ -1,128 +1,128 @@
1
- ---
2
- name: bioresearcher-core
3
- description: Core patterns and utilities for BioResearcher skills
4
- allowedTools:
5
- - Read
6
- - Write
7
- - Bash
8
- - jsonExtract
9
- - jsonValidate
10
- - jsonInfer
11
- - blockingTimer
12
- - calculator
13
- - tableCreateFile
14
- - tableAppendRows
15
- - Question
16
- - Task
17
- ---
18
-
19
- # BioResearcher Core
20
-
21
- This skill provides reusable patterns and utilities for BioResearcher skills.
22
-
23
- ## Quick Start
24
-
25
- ### Step 1: Load This Skill
26
- ```
27
- skill bioresearcher-core
28
- ```
29
-
30
- ### Step 2: Extract Skill Path
31
- From the `<skill_files>` section in the skill tool output, extract the `<skill_path>` value.
32
-
33
- ### Step 3: Use Resources
34
- - Read pattern: `Read <skill_path>/patterns/retry.md`
35
- - Run script: `uv run python <skill_path>/python/template.py ...`
36
-
37
- ## Available Patterns
38
-
39
- ### Workflow Control
40
- - `patterns/retry.md` - Retry with backoff using blockingTimer
41
- - `patterns/progress.md` - Progress tracking
42
- - `patterns/subagent-waves.md` - Parallel subagent processing
43
- - `patterns/shell-commands.md` - Unix/Windows command generation
44
- - `patterns/user-confirmation.md` - User confirmation
45
-
46
- ### Data Handling
47
- - `patterns/json-tools.md` - Using jsonExtract/jsonValidate/jsonInfer
48
- - `patterns/table-tools.md` - Combining outputs with table tools
49
- - `patterns/data-exchange.md` - Main/subagent data exchange protocol
50
- - `patterns/calculator.md` - In-workflow calculations
51
-
52
- ## Python Utilities
53
- - `python/template.md` - Template generation documentation
54
-
55
- ## Direct Tools (No Loading Needed)
56
-
57
- These tools are always available without loading pattern files:
58
-
59
- ### JSON Tools
60
- - `jsonExtract` - Extract JSON from files (handles markdown code blocks, raw JSON)
61
- - `jsonValidate` - Validate JSON against schemas (Draft-4, Draft-7, Draft-2020-12)
62
- - `jsonInfer` - Infer schemas from JSON data
63
-
64
- ### Utility Tools
65
- - `blockingTimer` - Blocking delays (0-300 seconds)
66
- - `calculator` - Mathematical expressions (+, -, *, /, ^, brackets)
67
-
68
- ### Table Tools
69
- - `tableCreateFile` - Create Excel/CSV files from data
70
- - `tableAppendRows` - Append rows to existing tables
71
-
72
- ## Tool Signatures
73
-
74
- ### jsonExtract
75
- ```
76
- jsonExtract(file_path: string, return_all: boolean = false)
77
- Returns: { success, data, metadata: { method, dataType, fileSize } }
78
- ```
79
-
80
- ### jsonValidate
81
- ```
82
- jsonValidate(data: string, schema: string)
83
- Returns: { success, valid, errors?, metadata: { errorCount, schemaFeatures } }
84
- ```
85
-
86
- ### jsonInfer
87
- ```
88
- jsonInfer(data: string, strict: boolean = false)
89
- Returns: { success, data: JSONSchema, metadata: { inferredType, strictMode } }
90
- ```
91
-
92
- ### blockingTimer
93
- ```
94
- blockingTimer(delay: number)
95
- Returns: "Timer completed: waited X seconds (actual elapsed: Ys)"
96
- ```
97
-
98
- ### calculator
99
- ```
100
- calculator(formula: string, precision: number = 3)
101
- Returns: { formula, result }
102
- ```
103
-
104
- ### tableCreateFile
105
- ```
106
- tableCreateFile(file_path: string, sheet_name: string = "Sheet1", data: array)
107
- Returns: { success, file_path, sheet_name, rows_created }
108
- ```
109
-
110
- ### tableAppendRows
111
- ```
112
- tableAppendRows(file_path: string, sheet_name: string?, rows: array)
113
- Returns: { success, rows_appended }
114
- ```
115
-
116
- ## When to Use Each Pattern
117
-
118
- | Use Case | Pattern File |
119
- |----------|-------------|
120
- | Network/API failures | `patterns/retry.md` |
121
- | Batch processing progress | `patterns/progress.md` |
122
- | Parallel subagent execution | `patterns/subagent-waves.md` |
123
- | Cross-platform commands | `patterns/shell-commands.md` |
124
- | Destructive operations | `patterns/user-confirmation.md` |
125
- | JSON data extraction | `patterns/json-tools.md` |
126
- | Combining batch outputs | `patterns/table-tools.md` |
127
- | Subagent communication | `patterns/data-exchange.md` |
128
- | Progress calculations | `patterns/calculator.md` |
1
+ ---
2
+ name: bioresearcher-core
3
+ description: Core patterns and utilities for BioResearcher skills
4
+ allowedTools:
5
+ - Read
6
+ - Write
7
+ - Bash
8
+ - jsonExtract
9
+ - jsonValidate
10
+ - jsonInfer
11
+ - blockingTimer
12
+ - calculator
13
+ - tableCreateFile
14
+ - tableAppendRows
15
+ - Question
16
+ - Task
17
+ ---
18
+
19
+ # BioResearcher Core
20
+
21
+ This skill provides reusable patterns and utilities for BioResearcher skills.
22
+
23
+ ## Quick Start
24
+
25
+ ### Step 1: Load This Skill
26
+ ```
27
+ skill bioresearcher-core
28
+ ```
29
+
30
+ ### Step 2: Extract Skill Path
31
+ From the `<skill_files>` section in the skill tool output, extract the `<skill_path>` value.
32
+
33
+ ### Step 3: Use Resources
34
+ - Read pattern: `Read <skill_path>/patterns/retry.md`
35
+ - Run script: `uv run python <skill_path>/python/template.py ...`
36
+
37
+ ## Available Patterns
38
+
39
+ ### Workflow Control
40
+ - `patterns/retry.md` - Retry with backoff using blockingTimer
41
+ - `patterns/progress.md` - Progress tracking
42
+ - `patterns/subagent-waves.md` - Parallel subagent processing
43
+ - `patterns/shell-commands.md` - Unix/Windows command generation
44
+ - `patterns/user-confirmation.md` - User confirmation
45
+
46
+ ### Data Handling
47
+ - `patterns/json-tools.md` - Using jsonExtract/jsonValidate/jsonInfer
48
+ - `patterns/table-tools.md` - Combining outputs with table tools
49
+ - `patterns/data-exchange.md` - Main/subagent data exchange protocol
50
+ - `patterns/calculator.md` - In-workflow calculations
51
+
52
+ ## Python Utilities
53
+ - `python/template.md` - Template generation documentation
54
+
55
+ ## Direct Tools (No Loading Needed)
56
+
57
+ These tools are always available without loading pattern files:
58
+
59
+ ### JSON Tools
60
+ - `jsonExtract` - Extract JSON from files (handles markdown code blocks, raw JSON)
61
+ - `jsonValidate` - Validate JSON against schemas (Draft-4, Draft-7, Draft-2020-12)
62
+ - `jsonInfer` - Infer schemas from JSON data
63
+
64
+ ### Utility Tools
65
+ - `blockingTimer` - Blocking delays (0-300 seconds)
66
+ - `calculator` - Mathematical expressions (+, -, *, /, ^, brackets)
67
+
68
+ ### Table Tools
69
+ - `tableCreateFile` - Create Excel/CSV files from data
70
+ - `tableAppendRows` - Append rows to existing tables
71
+
72
+ ## Tool Signatures
73
+
74
+ ### jsonExtract
75
+ ```
76
+ jsonExtract(file_path: string, return_all: boolean = false)
77
+ Returns: { success, data, metadata: { method, dataType, fileSize } }
78
+ ```
79
+
80
+ ### jsonValidate
81
+ ```
82
+ jsonValidate(data: string, schema: string)
83
+ Returns: { success, valid, errors?, metadata: { errorCount, schemaFeatures } }
84
+ ```
85
+
86
+ ### jsonInfer
87
+ ```
88
+ jsonInfer(data: string, strict: boolean = false)
89
+ Returns: { success, data: JSONSchema, metadata: { inferredType, strictMode } }
90
+ ```
91
+
92
+ ### blockingTimer
93
+ ```
94
+ blockingTimer(delay: number)
95
+ Returns: "Timer completed: waited X seconds (actual elapsed: Ys)"
96
+ ```
97
+
98
+ ### calculator
99
+ ```
100
+ calculator(formula: string, precision: number = 3)
101
+ Returns: { formula, result }
102
+ ```
103
+
104
+ ### tableCreateFile
105
+ ```
106
+ tableCreateFile(file_path: string, sheet_name: string = "Sheet1", data: array)
107
+ Returns: { success, file_path, sheet_name, rows_created }
108
+ ```
109
+
110
+ ### tableAppendRows
111
+ ```
112
+ tableAppendRows(file_path: string, sheet_name: string?, rows: array)
113
+ Returns: { success, rows_appended }
114
+ ```
115
+
116
+ ## When to Use Each Pattern
117
+
118
+ | Use Case | Pattern File |
119
+ |----------|-------------|
120
+ | Network/API failures | `patterns/retry.md` |
121
+ | Batch processing progress | `patterns/progress.md` |
122
+ | Parallel subagent execution | `patterns/subagent-waves.md` |
123
+ | Cross-platform commands | `patterns/shell-commands.md` |
124
+ | Destructive operations | `patterns/user-confirmation.md` |
125
+ | JSON data extraction | `patterns/json-tools.md` |
126
+ | Combining batch outputs | `patterns/table-tools.md` |
127
+ | Subagent communication | `patterns/data-exchange.md` |
128
+ | Progress calculations | `patterns/calculator.md` |