brainx-skill 1.0.13 → 1.0.14
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 +26 -0
- package/installation/lib/cli.js +16 -4
- package/installation/lib/literature-mcp.js +536 -0
- package/manifest.json +2 -0
- package/mcp-servers/codex/README.md +24 -4
- package/mcp-servers/codex/UPSTREAM.md +3 -1
- package/mcp-servers/codex/server.mjs +2 -0
- package/mcp-servers/codex/system-prompt.md +30 -19
- package/mcp-servers/codex/test/server.test.mjs +12 -1
- package/mcp-servers/fulltext-resolver/README.md +136 -0
- package/mcp-servers/fulltext-resolver/REUSE.md +32 -0
- package/mcp-servers/fulltext-resolver/THIRD_PARTY_NOTICES.md +57 -0
- package/mcp-servers/fulltext-resolver/server.mjs +128 -0
- package/mcp-servers/fulltext-resolver/src/document.mjs +253 -0
- package/mcp-servers/fulltext-resolver/src/http.mjs +173 -0
- package/mcp-servers/fulltext-resolver/src/identifiers.mjs +123 -0
- package/mcp-servers/fulltext-resolver/src/model.mjs +105 -0
- package/mcp-servers/fulltext-resolver/src/resolver.mjs +305 -0
- package/mcp-servers/fulltext-resolver/src/sources/biorxiv.mjs +135 -0
- package/mcp-servers/fulltext-resolver/src/sources/europe-pmc.mjs +132 -0
- package/mcp-servers/fulltext-resolver/src/sources/openalex.mjs +165 -0
- package/mcp-servers/fulltext-resolver/test/document.test.mjs +82 -0
- package/mcp-servers/fulltext-resolver/test/resolver.test.mjs +287 -0
- package/mcp-servers/fulltext-resolver/test/server.test.mjs +63 -0
- package/mcp-servers/fulltext-resolver/test/sources.test.mjs +229 -0
- package/package.json +10 -3
- package/skills/bio-neuro-lit/SKILL.md +206 -0
- package/skills/bio-neuro-lit/THIRD_PARTY_NOTICES.md +34 -0
- package/skills/bio-neuro-lit/agents/openai.yaml +4 -0
- package/skills/bio-neuro-lit/references/tool-contracts.md +73 -0
- package/skills/bio-neuro-lit/scripts/deepxiv_fetch.py +110 -0
- package/skills/bio-neuro-lit/scripts/exa_search.py +190 -0
- package/skills/brainx-general-guard/SKILL.md +17 -0
- package/skills/brainx-modeling-loop/SKILL.md +33 -20
- package/skills/brainx-modeling-loop/references/parameter-fitting-workflow.md +47 -7
- package/skills/brainx-visualization/SKILL.md +157 -0
- package/skills/brainx-visualization/agents/openai.yaml +4 -0
- package/skills/brainx-visualization/references/interactive-and-visualization-styling.md +155 -0
- package/skills/brainx-visualization/references/neural-data-visualization.md +141 -0
- package/skills/brainx-visualization/references/statistical-and-model-visualization.md +133 -0
- package/skills/package-skills/braincell/SKILL.md +16 -6
- package/skills/package-skills/braincell/references/braintools/input-current.md +200 -0
- package/skills/package-skills/braincell/references/braintools/metric.md +152 -0
- package/skills/package-skills/braincell/references/braintools/optimizer.md +179 -0
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
import assert from 'node:assert/strict';
|
|
2
|
+
import test from 'node:test';
|
|
3
|
+
import { FullTextResolver } from '../src/resolver.mjs';
|
|
4
|
+
import { BiorxivSource } from '../src/sources/biorxiv.mjs';
|
|
5
|
+
import { EuropePmcSource } from '../src/sources/europe-pmc.mjs';
|
|
6
|
+
import { OpenAlexSource } from '../src/sources/openalex.mjs';
|
|
7
|
+
|
|
8
|
+
const request = {
|
|
9
|
+
doi: '10.1000/requested',
|
|
10
|
+
pmid: '',
|
|
11
|
+
pmcid: '',
|
|
12
|
+
title: '',
|
|
13
|
+
authors: [],
|
|
14
|
+
year: undefined,
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
test('Europe PMC maps an author manuscript to an accepted JATS candidate', async () => {
|
|
18
|
+
let calledUrl = '';
|
|
19
|
+
const http = {
|
|
20
|
+
async json(url) {
|
|
21
|
+
calledUrl = url;
|
|
22
|
+
return {
|
|
23
|
+
resultList: {
|
|
24
|
+
result: [{
|
|
25
|
+
title: 'Accepted <i>paper</i>',
|
|
26
|
+
doi: '10.1000/requested',
|
|
27
|
+
pmid: '123',
|
|
28
|
+
pmcid: 'PMC123',
|
|
29
|
+
pubYear: '2026',
|
|
30
|
+
epmcAuthMan: 'Y',
|
|
31
|
+
authorString: 'Researcher A, Researcher B',
|
|
32
|
+
journalInfo: { journal: { title: 'Neuron' } },
|
|
33
|
+
}],
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
const result = await new EuropePmcSource(http).lookup(request);
|
|
39
|
+
assert.match(decodeURIComponent(calledUrl), /DOI:"10\.1000\\\/requested"/);
|
|
40
|
+
assert.equal(result.metadata.title, 'Accepted paper');
|
|
41
|
+
assert.equal(result.candidates[0].version, 'acceptedVersion');
|
|
42
|
+
assert.equal(result.candidates[0].original_format, 'jats_xml');
|
|
43
|
+
assert.equal(result.candidates[0].pmcid, 'PMC123');
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
test('direct PMCID fallback survives Europe PMC metadata failure and records the error', async () => {
|
|
47
|
+
const metadataError = Object.assign(new Error('Europe PMC metadata unavailable'), {
|
|
48
|
+
status: 503,
|
|
49
|
+
retryable: true,
|
|
50
|
+
});
|
|
51
|
+
let calledUrl = '';
|
|
52
|
+
const http = {
|
|
53
|
+
async json(url) {
|
|
54
|
+
calledUrl = url;
|
|
55
|
+
throw metadataError;
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
const emptySource = { lookup: async () => ({ metadata: {}, candidates: [] }) };
|
|
59
|
+
const resolver = new FullTextResolver({
|
|
60
|
+
http,
|
|
61
|
+
europePmc: new EuropePmcSource(http),
|
|
62
|
+
openAlex: emptySource,
|
|
63
|
+
biorxiv: emptySource,
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
const result = await resolver.resolve({ pmcid: '123' });
|
|
67
|
+
|
|
68
|
+
assert.equal(result.resolved, true);
|
|
69
|
+
assert.equal(result.resolved_document.pmcid, 'PMC123');
|
|
70
|
+
assert.equal(result.resolved_document.version, 'unknown');
|
|
71
|
+
assert.equal(result.source_errors[0].source, 'PMC');
|
|
72
|
+
assert.equal(result.source_errors[0].status, 503);
|
|
73
|
+
assert.match(decodeURIComponent(calledUrl), /PMCID:PMC123/);
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
test('OpenAlex preserves location versions and excludes duplicate PMC locations', async () => {
|
|
77
|
+
const http = {
|
|
78
|
+
async json() {
|
|
79
|
+
return {
|
|
80
|
+
id: 'https://openalex.org/W123',
|
|
81
|
+
doi: 'https://doi.org/10.1000/requested',
|
|
82
|
+
display_name: 'Resolved work',
|
|
83
|
+
publication_year: 2026,
|
|
84
|
+
authorships: [{ author: { display_name: 'Researcher A' } }],
|
|
85
|
+
primary_location: { source: { display_name: 'Neuron' } },
|
|
86
|
+
locations: [
|
|
87
|
+
{
|
|
88
|
+
is_oa: true,
|
|
89
|
+
version: 'publishedVersion',
|
|
90
|
+
landing_page_url: 'https://publisher.example/article',
|
|
91
|
+
pdf_url: 'https://publisher.example/article.pdf',
|
|
92
|
+
license: 'cc-by',
|
|
93
|
+
source: { display_name: 'Neuron', type: 'journal' },
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
is_oa: true,
|
|
97
|
+
version: 'acceptedVersion',
|
|
98
|
+
landing_page_url: 'https://repository.example/manuscript',
|
|
99
|
+
source: { display_name: 'University Repository', type: 'repository' },
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
is_oa: true,
|
|
103
|
+
version: 'publishedVersion',
|
|
104
|
+
landing_page_url: 'https://europepmc.org/articles/PMC123',
|
|
105
|
+
source: { display_name: 'Europe PMC (PubMed Central)', type: 'repository' },
|
|
106
|
+
},
|
|
107
|
+
],
|
|
108
|
+
};
|
|
109
|
+
},
|
|
110
|
+
};
|
|
111
|
+
const result = await new OpenAlexSource(http).lookup(request);
|
|
112
|
+
assert.deepEqual(result.candidates.map((candidate) => candidate.version), [
|
|
113
|
+
'publishedVersion',
|
|
114
|
+
'acceptedVersion',
|
|
115
|
+
]);
|
|
116
|
+
assert.equal(result.candidates[0].original_format, 'pdf');
|
|
117
|
+
assert.equal(result.candidates[1].provider_name, 'University Repository');
|
|
118
|
+
});
|
|
119
|
+
test('OpenAlex retains a direct accepted repository PDF when its OA flag is stale', async () => {
|
|
120
|
+
const http = {
|
|
121
|
+
async json() {
|
|
122
|
+
return {
|
|
123
|
+
id: 'https://openalex.org/W2551595439',
|
|
124
|
+
doi: 'https://doi.org/10.1016/j.neuron.2016.10.030',
|
|
125
|
+
display_name: 'Neural Architecture of Hunger-Dependent Multisensory Decision Making in C. elegans',
|
|
126
|
+
publication_year: 2016,
|
|
127
|
+
locations: [{
|
|
128
|
+
is_oa: false,
|
|
129
|
+
version: 'acceptedVersion',
|
|
130
|
+
landing_page_url: 'http://eprints.whiterose.ac.uk/109026/1/NEURON-Ghosh2016--pre-proof.pdf',
|
|
131
|
+
pdf_url: 'http://eprints.whiterose.ac.uk/109026/1/NEURON-Ghosh2016--pre-proof.pdf',
|
|
132
|
+
source: {
|
|
133
|
+
display_name: 'White Rose Research Online',
|
|
134
|
+
type: 'repository',
|
|
135
|
+
},
|
|
136
|
+
}],
|
|
137
|
+
};
|
|
138
|
+
},
|
|
139
|
+
};
|
|
140
|
+
const result = await new OpenAlexSource(http).lookup({
|
|
141
|
+
...request,
|
|
142
|
+
doi: '10.1016/j.neuron.2016.10.030',
|
|
143
|
+
});
|
|
144
|
+
|
|
145
|
+
assert.equal(result.candidates[0].provider_name, 'White Rose Research Online');
|
|
146
|
+
assert.equal(result.candidates[0].version, 'acceptedVersion');
|
|
147
|
+
assert.equal(result.candidates[0].original_format, 'pdf');
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
test('OpenAlex keeps bioRxiv DOI locations as submitted versions', async () => {
|
|
151
|
+
const preprintRequest = { ...request, doi: '10.1101/2024.07.15.603498' };
|
|
152
|
+
const http = {
|
|
153
|
+
async json() {
|
|
154
|
+
return {
|
|
155
|
+
id: 'https://openalex.org/WPREPRINT',
|
|
156
|
+
doi: 'https://doi.org/10.1101/2024.07.15.603498',
|
|
157
|
+
display_name: 'Modeling <i>C. elegans</i> muscle cells',
|
|
158
|
+
publication_year: 2024,
|
|
159
|
+
locations: [{
|
|
160
|
+
is_oa: true,
|
|
161
|
+
version: 'acceptedVersion',
|
|
162
|
+
landing_page_url: 'https://doi.org/10.1101/2024.07.15.603498',
|
|
163
|
+
pdf_url: 'https://www.biorxiv.org/content/10.1101/2024.07.15.603498v1.full.pdf',
|
|
164
|
+
source: { display_name: 'bioRxiv', type: 'repository' },
|
|
165
|
+
}],
|
|
166
|
+
};
|
|
167
|
+
},
|
|
168
|
+
};
|
|
169
|
+
const result = await new OpenAlexSource(http).lookup(preprintRequest);
|
|
170
|
+
|
|
171
|
+
assert.equal(result.metadata.title, 'Modeling C. elegans muscle cells');
|
|
172
|
+
assert.equal(result.candidates[0].version, 'submittedVersion');
|
|
173
|
+
assert.equal(result.candidates[0].resolved_doi, '10.1101/2024.07.15.603498');
|
|
174
|
+
assert.equal(result.candidates[0].relationship, 'same_work');
|
|
175
|
+
});
|
|
176
|
+
|
|
177
|
+
test('bioRxiv crosswalk resolves a published DOI to a submitted JATS manuscript', async () => {
|
|
178
|
+
const calls = [];
|
|
179
|
+
const http = {
|
|
180
|
+
async json(url) {
|
|
181
|
+
calls.push(url);
|
|
182
|
+
if (url.includes('/pubs/biorxiv/')) {
|
|
183
|
+
return {
|
|
184
|
+
collection: [{
|
|
185
|
+
preprint_doi: '10.1101/2026.01.01.123456',
|
|
186
|
+
published_doi: '10.1000/requested',
|
|
187
|
+
published_journal: 'Nature Neuroscience',
|
|
188
|
+
}],
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
if (url.includes('/details/biorxiv/')) {
|
|
192
|
+
return {
|
|
193
|
+
collection: [{
|
|
194
|
+
doi: '10.1101/2026.01.01.123456',
|
|
195
|
+
title: 'Preprint title',
|
|
196
|
+
authors: 'Researcher A; Researcher B',
|
|
197
|
+
version: '2',
|
|
198
|
+
date: '2026-02-03',
|
|
199
|
+
license: 'cc_by',
|
|
200
|
+
jatsxml: 'https://www.biorxiv.org/content/early/2026/02/03/2026.01.01.123456.source.xml',
|
|
201
|
+
published: '10.1000/requested',
|
|
202
|
+
}],
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
return { collection: [] };
|
|
206
|
+
},
|
|
207
|
+
};
|
|
208
|
+
const result = await new BiorxivSource(http).lookup(request);
|
|
209
|
+
assert.equal(result.candidates.length, 1);
|
|
210
|
+
assert.equal(result.candidates[0].source, 'bioRxiv');
|
|
211
|
+
assert.equal(result.candidates[0].version, 'submittedVersion');
|
|
212
|
+
assert.equal(result.candidates[0].relationship, 'preprint_of_requested_work');
|
|
213
|
+
assert.equal(result.candidates[0].resolved_doi, '10.1101/2026.01.01.123456');
|
|
214
|
+
assert.equal(result.candidates[0].preprint_revision, '2');
|
|
215
|
+
assert.ok(calls.some((url) => url.includes('/pubs/biorxiv/10.1000/requested/na/json')));
|
|
216
|
+
});
|
|
217
|
+
|
|
218
|
+
test('bioRxiv rejects a crosswalk whose published DOI does not match', async () => {
|
|
219
|
+
const http = {
|
|
220
|
+
async json(url) {
|
|
221
|
+
if (url.includes('/pubs/biorxiv/')) {
|
|
222
|
+
return { collection: [{ preprint_doi: '10.1101/example', published_doi: '10.1000/other' }] };
|
|
223
|
+
}
|
|
224
|
+
return { collection: [] };
|
|
225
|
+
},
|
|
226
|
+
};
|
|
227
|
+
const result = await new BiorxivSource(http).lookup(request);
|
|
228
|
+
assert.deepEqual(result.candidates, []);
|
|
229
|
+
});
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "brainx-skill",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.14",
|
|
4
4
|
"description": "Portable BrainX Agent Skills for Claude Code, Codex, Cursor, Windsurf, Gemini CLI, Antigravity, and OpenCode",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "commonjs",
|
|
7
7
|
"scripts": {
|
|
8
|
-
"test": "node --test .github/scripts/*.test.mjs mcp-servers/codex/test/*.test.mjs",
|
|
8
|
+
"test": "node --test .github/scripts/*.test.mjs mcp-servers/codex/test/*.test.mjs mcp-servers/fulltext-resolver/test/*.test.mjs",
|
|
9
9
|
"prepublishOnly": "npm test"
|
|
10
10
|
},
|
|
11
11
|
"bin": {
|
|
@@ -15,11 +15,14 @@
|
|
|
15
15
|
"adapters/",
|
|
16
16
|
"installation/",
|
|
17
17
|
"mcp-servers/codex/",
|
|
18
|
+
"mcp-servers/fulltext-resolver/",
|
|
18
19
|
"skills/package-skills/",
|
|
19
20
|
"skills/brainx-modeling-loop/",
|
|
21
|
+
"skills/brainx-visualization/",
|
|
20
22
|
"skills/brainx-acceleration/",
|
|
21
23
|
"skills/brainx-install/",
|
|
22
24
|
"skills/brainx-general-guard/",
|
|
25
|
+
"skills/bio-neuro-lit/",
|
|
23
26
|
"manifest.json",
|
|
24
27
|
"README.md",
|
|
25
28
|
"LICENSE"
|
|
@@ -28,7 +31,11 @@
|
|
|
28
31
|
"node": ">=18"
|
|
29
32
|
},
|
|
30
33
|
"dependencies": {
|
|
31
|
-
"
|
|
34
|
+
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
35
|
+
"enquirer": "^2.4.1",
|
|
36
|
+
"linkedom": "^0.18.13",
|
|
37
|
+
"turndown": "^7.2.4",
|
|
38
|
+
"zod": "^4.5.4"
|
|
32
39
|
},
|
|
33
40
|
"repository": {
|
|
34
41
|
"type": "git",
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: bio-neuro-lit
|
|
3
|
+
description: Review biology, neuroscience, and computational-neuroscience literature with Europe PMC as the primary discovery source, the BrainX Full-Text Resolver as the default reader, Exa for optional recall expansion, and DeepXiv for optional progressive reading of arXiv-compatible computational papers. Use for finding papers, related-work reviews, evidence synthesis, or explaining a bio/neuro research area; do not use as a generic clinical-medicine or computer-science search workflow.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Bio-neuro literature review
|
|
7
|
+
|
|
8
|
+
## Purpose and boundary
|
|
9
|
+
|
|
10
|
+
Use this skill to answer a biology, neuroscience, or computational-neuroscience question from literature evidence. Keep the canonical path:
|
|
11
|
+
|
|
12
|
+
`interpret question -> decompose terminology -> search Europe PMC -> optionally expand with Exa -> normalize, deduplicate, and rank -> deep-read selected papers -> compare evidence -> persist modeling-relevant evidence when applicable -> answer the question`
|
|
13
|
+
|
|
14
|
+
Use Europe PMC as the primary academic discovery database and the existing Full-Text Resolver as the default reader. Use Exa only to expand recall and DeepXiv only when progressive reading of a known arXiv-compatible paper is useful. Do not add generic arXiv, Semantic Scholar, Gemini, standalone OpenAlex, Zotero, Obsidian, or local-PDF workflows.
|
|
15
|
+
|
|
16
|
+
## Underlying mental model
|
|
17
|
+
|
|
18
|
+
Discovery and reading are separate stages. Search titles, abstracts, and metadata broadly enough to find the field, then retrieve full text only for the papers that can materially change the answer.
|
|
19
|
+
|
|
20
|
+
| Role | Interface | Decision boundary |
|
|
21
|
+
|---|---|---|
|
|
22
|
+
| Primary discovery | Europe PMC MCP | Start here for normal biology, neuroscience, and computational-neuroscience questions. Treat its structured identifiers and metadata as canonical when sources conflict. |
|
|
23
|
+
| Recall expansion | `scripts/exa_search.py` | Use when recent, preprint, project, technical-report, or cross-disciplinary work may use terminology that Europe PMC misses. Do not treat Exa as authoritative bibliographic metadata. |
|
|
24
|
+
| Default reader | Full-Text Resolver MCP | Use for selected papers by PMCID, DOI, PMID, or conservative metadata fallback. Preserve the retrieved version and relationship to the requested work. |
|
|
25
|
+
| Progressive reader | `scripts/deepxiv_fetch.py` | Use for a selected paper with an arXiv ID when `brief -> head -> section` is more efficient than loading the complete document. |
|
|
26
|
+
|
|
27
|
+
Open `references/tool-contracts.md` before the first tool call, when a tool is unavailable, or when exact arguments, namespaces, setup, or fallback behavior matter.
|
|
28
|
+
|
|
29
|
+
## Interpret and decompose the question
|
|
30
|
+
|
|
31
|
+
Translate the user's question into a small set of purposeful searches; query variation should recover domain synonyms without broadening into an unrelated medical field.
|
|
32
|
+
|
|
33
|
+
1. State the biological or computational question actually being answered.
|
|
34
|
+
2. Identify only the dimensions that change retrieval: biological entity or cell type, brain region or circuit, channel or receptor, physiological phenomenon, model, computational method, recording modality, experimental paradigm, and important abbreviation or synonym.
|
|
35
|
+
3. Generate a few complementary formulations. Keep each formulation close enough to the question that a matching paper could contribute evidence.
|
|
36
|
+
4. For mechanistic or computational questions, favor terms such as neuron, circuit, electrophysiology, neural dynamics, neural coding, biophysical model, or experimental neuroscience. Do not let diagnosis, treatment, epidemiology, patient outcome, or hospital studies dominate unless the user asks for them.
|
|
37
|
+
|
|
38
|
+
Example decomposition:
|
|
39
|
+
|
|
40
|
+
```text
|
|
41
|
+
Question: parameter fitting of conductance-based models from electrophysiology recordings
|
|
42
|
+
|
|
43
|
+
- conductance-based neuron model parameter estimation
|
|
44
|
+
- Hodgkin-Huxley parameter fitting electrophysiology
|
|
45
|
+
- ion channel conductance optimization patch clamp
|
|
46
|
+
- biophysical single-neuron model parameter inference
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Discover papers
|
|
50
|
+
|
|
51
|
+
Europe PMC supplies the initial candidate set; Exa may add recall but never replaces a failed primary academic search.
|
|
52
|
+
|
|
53
|
+
| API | Description |
|
|
54
|
+
|---|---|
|
|
55
|
+
| Europe PMC `search_articles` | Use for each targeted formulation. Request `result_type="core"` when identifiers, MeSH terms, and full-text metadata affect selection; keep relevance ordering unless recency is part of the question. Use `TITLE_ABS` on the decisive mechanistic or modeling terms when an unqualified query drifts into broad clinical results. |
|
|
56
|
+
| Europe PMC `get_article` | Use after discovery when one candidate needs complete structured metadata before normalization or identifier resolution. |
|
|
57
|
+
| `scripts/exa_search.py search` | Use optionally with `--category "research paper"` for recall expansion. Continue without Exa when its SDK or `EXA_API_KEY` is unavailable. |
|
|
58
|
+
|
|
59
|
+
```json
|
|
60
|
+
{
|
|
61
|
+
"query": "TITLE_ABS:(Hodgkin-Huxley OR conductance-based) AND TITLE_ABS:(parameter estimation OR parameter fitting) AND TITLE_ABS:(electrophysiology OR patch clamp)",
|
|
62
|
+
"result_type": "core",
|
|
63
|
+
"page_size": 25
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
If a tightly qualified query becomes too narrow, loosen one dimension at a time and compare the added candidates; do not discard the neuro-specific relevance judgment.
|
|
68
|
+
|
|
69
|
+
Use `--sources europepmc`, `--sources europepmc,exa`, or `--sources europepmc,exa,deepxiv` only when the user explicitly overrides sources. The resolver remains the reading stage and is not a discovery-source switch. Enabling `deepxiv` permits progressive reading of known arXiv IDs; it does not make DeepXiv the primary search database.
|
|
70
|
+
|
|
71
|
+
If Europe PMC is unavailable, report that primary academic discovery failed. Exa-only material may be shown as supplemental leads, but do not silently present it as an equivalent literature review.
|
|
72
|
+
|
|
73
|
+
## Normalize, deduplicate, and select
|
|
74
|
+
|
|
75
|
+
Keep one lightweight record per work and preserve provenance from every contributing source.
|
|
76
|
+
|
|
77
|
+
```text
|
|
78
|
+
title
|
|
79
|
+
authors
|
|
80
|
+
year
|
|
81
|
+
journal_or_venue
|
|
82
|
+
abstract
|
|
83
|
+
doi
|
|
84
|
+
pmid
|
|
85
|
+
pmcid
|
|
86
|
+
arxiv_id
|
|
87
|
+
source
|
|
88
|
+
url
|
|
89
|
+
full_text_status
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Merge duplicates in this order:
|
|
93
|
+
|
|
94
|
+
`PMCID -> PMID -> DOI -> arXiv ID -> normalized title`
|
|
95
|
+
|
|
96
|
+
Normalize identifier prefixes, DOI URLs, whitespace, punctuation, and title case before comparison. A title match must be conservative enough to avoid merging different works. When Europe PMC and Exa overlap, keep Europe PMC metadata and add Exa to source provenance; retain a useful Exa URL or snippet only when it adds information.
|
|
97
|
+
|
|
98
|
+
Rank by ability to answer the question, not keyword count alone. Consider biological match, represented scale, method or experiment match, data modality, directness of evidence, publication version, and recency when relevant. Distinguish foundational work from newer evidence. Search broadly, but choose only the strongest papers for deep reading.
|
|
99
|
+
|
|
100
|
+
## Read selected papers
|
|
101
|
+
|
|
102
|
+
Full text is evidence depth, not a requirement for retaining a relevant paper.
|
|
103
|
+
|
|
104
|
+
| API | Description |
|
|
105
|
+
|---|---|
|
|
106
|
+
| Full-Text Resolver `get_fulltext` | Use first for selected papers. Supply the strongest available identifier in the order `PMCID -> DOI -> PMID -> exact metadata`; it returns normalized Markdown plus source, version, relationship, and location provenance. |
|
|
107
|
+
| Full-Text Resolver `list_versions` | Use when the requested publication may have published, accepted, and submitted versions whose distinction affects interpretation. |
|
|
108
|
+
| `scripts/deepxiv_fetch.py paper-brief` | Use for a known arXiv ID to establish relevance before section reading. |
|
|
109
|
+
| `scripts/deepxiv_fetch.py paper-head` | Use after the brief to inspect the section map. |
|
|
110
|
+
| `scripts/deepxiv_fetch.py paper-section` | Use only for the section needed to answer the question, such as Methods, Results, Experiments, or Limitations. |
|
|
111
|
+
|
|
112
|
+
```json
|
|
113
|
+
{
|
|
114
|
+
"pmcid": "PMC1234567",
|
|
115
|
+
"include_raw": false
|
|
116
|
+
}
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Prefer the Full-Text Resolver for ordinary PMC and journal biology papers. Use DeepXiv mainly for computational neuroscience or ML-neuroscience papers with arXiv IDs. If the resolver returns no usable Markdown, including a PDF-only location, retain the paper's abstract and metadata, set `full_text_status` to `abstract-only`, preserve the retrieval note or source URL, and limit claims to what the abstract supports.
|
|
120
|
+
|
|
121
|
+
## Extract and compare evidence
|
|
122
|
+
|
|
123
|
+
Extract only fields that help answer the question. For experimental work, these may include biological system, species, brain region, cell type, recording modality, protocol, dataset or sample, and quantitative result. For computational work, also inspect model type or equations, represented scale, state variables, fitted parameters, objective or loss, optimizer or inference method, experimental data, validation, and modeling assumptions.
|
|
124
|
+
|
|
125
|
+
Do not force molecular, cellular, systems, and computational papers into one fixed schema. Record whether each claim comes from full text or abstract only, and distinguish a final article from an accepted manuscript or preprint.
|
|
126
|
+
|
|
127
|
+
Synthesize across papers:
|
|
128
|
+
|
|
129
|
+
1. Answer the user's research question directly.
|
|
130
|
+
2. Group evidence by mechanism, method, result, or explanatory theme.
|
|
131
|
+
3. Identify consensus, disagreement, methodological differences, important experiments or datasets, modeling assumptions, limitations, and unresolved gaps.
|
|
132
|
+
4. Compare papers rather than writing one disconnected summary per paper.
|
|
133
|
+
5. Do not infer a stronger conclusion than the retrieved evidence supports, and do not fabricate missing identifiers, metadata, results, or full text.
|
|
134
|
+
|
|
135
|
+
## Persist modeling-relevant literature
|
|
136
|
+
|
|
137
|
+
A literature review informs the modeling loop only when selected papers change a concrete modeling or validation decision.
|
|
138
|
+
|
|
139
|
+
| Artifact | Description |
|
|
140
|
+
|---|---|
|
|
141
|
+
| `brainmodeling-memory.md` | When an active BrainX project already has this file, append one `## Literature evidence` block containing only papers that materially affect the specification, mechanism, equations, parameters, inputs, controls, observables, validation, or allowed claims. Preserve identifiers, evidence depth, retrieved version, implications, and limitations. |
|
|
142
|
+
|
|
143
|
+
```markdown
|
|
144
|
+
## Literature evidence: <topic> - <YYYY-MM-DD>
|
|
145
|
+
- Research question: <question this search addressed>
|
|
146
|
+
- Review artifact: <path or stable identifier, when one exists>
|
|
147
|
+
|
|
148
|
+
### Essential papers
|
|
149
|
+
- <citation plus DOI, PMID, PMCID, or arXiv ID>
|
|
150
|
+
- Evidence: full text | abstract only; <published, accepted, or submitted version>
|
|
151
|
+
- Essential finding: <question-relevant result>
|
|
152
|
+
- Modeling implication: <specific decision this supports, constrains, or challenges>
|
|
153
|
+
- Limitation or non-claim: <what the paper does not establish>
|
|
154
|
+
|
|
155
|
+
### Cross-paper synthesis
|
|
156
|
+
- Supported decisions: <decisions supported across the selected evidence>
|
|
157
|
+
- Disagreement or uncertainty: <conflicting evidence and unresolved choices>
|
|
158
|
+
- Required tests or controls: <model checks implied by the literature>
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
Append this block without editing earlier memory and without adding or changing a `## Checkpoint`, iteration, or step. Deduplicate against earlier literature blocks by stable identifier and append only new evidence or a correction that names the earlier record it supersedes. Keep complete article summaries in the literature-review artifact; memory receives only the essential modeling consequences and evidence pointers.
|
|
162
|
+
|
|
163
|
+
Do not create `brainmodeling-memory.md` for a standalone literature request. When no active modeling memory exists, keep the synthesis in the review output and state no modeling-memory handoff was required.
|
|
164
|
+
|
|
165
|
+
## Report the review
|
|
166
|
+
|
|
167
|
+
Use this structure unless the user requests another format:
|
|
168
|
+
|
|
169
|
+
```markdown
|
|
170
|
+
# Literature review: <topic>
|
|
171
|
+
|
|
172
|
+
## Search interpretation
|
|
173
|
+
<What question and terminology were searched.>
|
|
174
|
+
|
|
175
|
+
## Main findings
|
|
176
|
+
<Evidence synthesis that answers the question.>
|
|
177
|
+
|
|
178
|
+
## Key papers
|
|
179
|
+
| Paper | Year | Why it matters | Evidence used |
|
|
180
|
+
|---|---:|---|---|
|
|
181
|
+
| ... | ... | ... | full text / abstract only |
|
|
182
|
+
|
|
183
|
+
## Comparison
|
|
184
|
+
<Methods, findings, assumptions, and disagreements.>
|
|
185
|
+
|
|
186
|
+
## Gaps and unresolved questions
|
|
187
|
+
<What remains uncertain or poorly tested.>
|
|
188
|
+
|
|
189
|
+
## Retrieval notes
|
|
190
|
+
<Only material limitations: Exa-only lead, unavailable full text, version substitution, or DeepXiv section reading.>
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
Include enough bibliographic information to identify every key paper, preferably DOI, PMID, PMCID, or canonical URL when available. Keep retrieval logs and raw API responses out of the normal answer.
|
|
194
|
+
|
|
195
|
+
## Boundaries and common failures
|
|
196
|
+
|
|
197
|
+
- Do not use broad clinical volume as a proxy for relevance to a mechanistic or computational neuroscience question.
|
|
198
|
+
- Do not retrieve full text for every candidate.
|
|
199
|
+
- Do not substitute Exa metadata for conflicting Europe PMC metadata.
|
|
200
|
+
- Do not call generic arXiv as an independent discovery source.
|
|
201
|
+
- Do not rebuild PMC, OpenAlex, bioRxiv, repository, or publisher resolution already owned by the Full-Text Resolver.
|
|
202
|
+
- Do not label a preprint or accepted manuscript as the requested final publication.
|
|
203
|
+
- Do not drop a relevant paper solely because only its abstract is accessible.
|
|
204
|
+
- Do not turn the final answer into a bibliography dump or implementation log.
|
|
205
|
+
- Do not write every relevant paper into modeling memory; persist only evidence that changes a modeling or validation decision.
|
|
206
|
+
- Do not create or advance a modeling checkpoint while appending literature evidence.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Third-party notices
|
|
2
|
+
|
|
3
|
+
## ARIS research literature workflow and helpers
|
|
4
|
+
|
|
5
|
+
The `bio-neuro-lit` workflow is derived from `skills/research-lit/SKILL.md`, and the helper scripts are adapted from `tools/exa_search.py` and `tools/deepxiv_fetch.py`, in:
|
|
6
|
+
|
|
7
|
+
- Project: `wanshuiyin/Auto-claude-code-research-in-sleep`
|
|
8
|
+
- Upstream commit: `e59008d7a42eea50a2797e55dd0d85bbbf6572f5`
|
|
9
|
+
- Copyright: Copyright (c) 2026 wanshuiyin
|
|
10
|
+
- License: MIT
|
|
11
|
+
|
|
12
|
+
The adaptation removes ARIS-specific routing, local-library integrations, generic computer-science discovery sources, and unrelated helper commands. It assigns Europe PMC to primary discovery, the BrainX Full-Text Resolver to default reading, Exa to optional recall expansion, and DeepXiv to optional progressive reading.
|
|
13
|
+
|
|
14
|
+
MIT License
|
|
15
|
+
|
|
16
|
+
Copyright (c) 2026 wanshuiyin
|
|
17
|
+
|
|
18
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
19
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
20
|
+
in the Software without restriction, including without limitation the rights
|
|
21
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
22
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
23
|
+
furnished to do so, subject to the following conditions:
|
|
24
|
+
|
|
25
|
+
The above copyright notice and this permission notice shall be included in all
|
|
26
|
+
copies or substantial portions of the Software.
|
|
27
|
+
|
|
28
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
29
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
30
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
31
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
32
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
33
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
34
|
+
SOFTWARE.
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Literature tool contracts
|
|
2
|
+
|
|
3
|
+
Open this reference before invoking the literature tools or when diagnosing availability. MCP clients may prefix a registered server name, such as `mcp__europepmc__search_articles`; the leaf tool names and input fields below are the server contracts. Inspect the available tool list rather than inventing a different leaf name.
|
|
4
|
+
|
|
5
|
+
Install and activate the bundled MCP set in Codex with `npx brainx-skill mcp install`. This registers Europe PMC as `europepmc`, the Full-Text Resolver as `fulltext_resolver`, and the BrainX reviewer as `codex`. Restart Codex or reload MCP configuration after installation. If registration fails because one of those names already exists, do not overwrite it automatically; inspect the existing user-owned configuration first.
|
|
6
|
+
|
|
7
|
+
## Europe PMC MCP
|
|
8
|
+
|
|
9
|
+
The skill uses the existing CoChatAI Europe PMC MCP interface. It requires no API key.
|
|
10
|
+
|
|
11
|
+
| Tool | Input schema | Use |
|
|
12
|
+
|---|---|---|
|
|
13
|
+
| `search_articles` | `query: str`; `result_type: str = "lite"`; `page_size: int = 25`; `cursor_mark: str = "*"`; `sort: str | null = null` | Search Lucene terms and field qualifiers. Valid result types are `lite`, `core`, and `idlist`; page size is clamped to 1-1000. Returns `hitCount`, `nextCursorMark`, and `resultList.result[]`. |
|
|
14
|
+
| `get_article` | `source: str`; `ext_id: str` | Fetch one core article record. Common sources are `MED` for PMID, `PMC` for PMCID, and `PPR` for preprint records. |
|
|
15
|
+
| `get_references` | `source: str`; `ext_id: str`; `page_size: int = 25`; `page: int = 1` | Snowball backward from a selected paper when its cited work is relevant to the question. |
|
|
16
|
+
| `get_citations` | `source: str`; `ext_id: str`; `page_size: int = 25`; `page: int = 1` | Snowball forward from a selected paper when later evidence is relevant. |
|
|
17
|
+
| `get_database_links` | `source: str`; `ext_id: str`; `db: str | null = null` | Retrieve linked biological databases only when the review needs those cross-references. |
|
|
18
|
+
| `get_fulltext_xml` | `pmcid: str` | Existing Europe PMC JATS access. In this skill, prefer the Full-Text Resolver because it normalizes Markdown and preserves cross-source version provenance. |
|
|
19
|
+
| `get_annotations` | `article_ids: list[str]`; `type: str | null = null`; `section: str | null = null` | Retrieve text-mined entities for up to eight `SOURCE:ID` values only when entity annotations help the review. |
|
|
20
|
+
|
|
21
|
+
Useful `search_articles` query fields include `TITLE_ABS`, `AUTH`, `JOURNAL`, `PUB_YEAR`, `OPEN_ACCESS`, and `HAS_FT`. Use `TITLE_ABS` to constrain decisive mechanistic or computational terms after a broad query drifts into clinical material. Use `sort: "P_PDATE_D desc"` only when the question requires newest-first retrieval; otherwise keep relevance order.
|
|
22
|
+
|
|
23
|
+
## Full-Text Resolver MCP
|
|
24
|
+
|
|
25
|
+
The bundled server registers the following exact tools.
|
|
26
|
+
|
|
27
|
+
Shared work fields:
|
|
28
|
+
|
|
29
|
+
| Field | Type | Meaning |
|
|
30
|
+
|---|---|---|
|
|
31
|
+
| `doi` | optional string | Published or preprint DOI; prefer it when available unless a PMCID is already known. |
|
|
32
|
+
| `pmid` | optional string | PubMed identifier. |
|
|
33
|
+
| `pmcid` | optional string | PubMed Central identifier, with or without `PMC`. |
|
|
34
|
+
| `title` | optional string | Exact title fallback; resolution is conservative. |
|
|
35
|
+
| `authors` | optional string or string array | Narrows title lookup. |
|
|
36
|
+
| `year` | optional integer, 1600-3000 | Narrows title lookup. |
|
|
37
|
+
|
|
38
|
+
At least one of `doi`, `pmid`, `pmcid`, or `title` is required.
|
|
39
|
+
|
|
40
|
+
| Tool | Additional input | Use |
|
|
41
|
+
|---|---|---|
|
|
42
|
+
| `resolve_fulltext` | none | Resolve the best accessible version and return provenance without downloading the document. |
|
|
43
|
+
| `list_versions` | none | List accessible `publishedVersion`, `acceptedVersion`, `submittedVersion`, or `unknown` candidates. |
|
|
44
|
+
| `get_fulltext` | `version?: publishedVersion | acceptedVersion | submittedVersion | unknown`; `source?: PMC | OpenAlex | bioRxiv | medRxiv`; `include_raw: bool = false`; `max_chars?: int` from 1000 to 2,000,000 | Retrieve JATS or HTML as normalized Markdown. PDF-only versions remain provenance-preserving links and are not parsed by resolver v1. |
|
|
45
|
+
|
|
46
|
+
For normal reading, call `get_fulltext` directly. Use `list_versions` first when version selection changes the scientific interpretation. Omit `max_chars` for a complete converted document; use it only when a bounded first pass is needed.
|
|
47
|
+
|
|
48
|
+
If the server is registered in Codex as `fulltext_resolver`, its rendered tool names are commonly `mcp__fulltext_resolver__resolve_fulltext`, `mcp__fulltext_resolver__list_versions`, and `mcp__fulltext_resolver__get_fulltext`.
|
|
49
|
+
|
|
50
|
+
## Exa helper
|
|
51
|
+
|
|
52
|
+
Resolve `scripts/exa_search.py` relative to this skill directory. Exa is optional and requires Python 3, `exa-py`, and `EXA_API_KEY`.
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
python3 <skill-directory>/scripts/exa_search.py search \
|
|
56
|
+
"QUERY" --max 10 --category "research paper" --content highlights
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Useful optional filters are `--type`, `--include-domains`, `--exclude-domains`, `--include-text`, `--exclude-text`, `--start-date`, `--end-date`, and `--max-chars`. Prefer research-paper searches. Treat lab pages, project pages, and technical reports as leads unless their claims are supported by a paper.
|
|
60
|
+
|
|
61
|
+
When `exa-py` or `EXA_API_KEY` is missing, record that recall expansion was unavailable and continue with Europe PMC.
|
|
62
|
+
|
|
63
|
+
## DeepXiv helper
|
|
64
|
+
|
|
65
|
+
Resolve `scripts/deepxiv_fetch.py` relative to this skill directory. DeepXiv is optional and requires the `deepxiv` CLI from `deepxiv-sdk`.
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
python3 <skill-directory>/scripts/deepxiv_fetch.py paper-brief ARXIV_ID
|
|
69
|
+
python3 <skill-directory>/scripts/deepxiv_fetch.py paper-head ARXIV_ID
|
|
70
|
+
python3 <skill-directory>/scripts/deepxiv_fetch.py paper-section ARXIV_ID "Methods"
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Run the commands in that order and stop as soon as the evidence is sufficient. If DeepXiv is unavailable or a section cannot be retrieved, use the Full-Text Resolver for the selected work when possible; otherwise retain abstract-only evidence.
|