opencode-bioresearcher 1.10.0 → 1.11.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.
@@ -7,7 +7,7 @@
7
7
  "description_en": "Biomedical research plugin for OpenCode: biomcp MCP server tools for literature, clinical trials, genes, variants, drugs, diseases and patents, plus skills for publication-grade figures and deep-research subagent.",
8
8
  "source": "bioresearcher",
9
9
  "type": "plugin",
10
- "version": "1.10.0",
10
+ "version": "1.11.1",
11
11
  "harness": "opencode",
12
12
  "examples_zh": [
13
13
  "帮我做一个关于肿瘤免疫治疗的多方面文献综述并附引用",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-bioresearcher",
3
- "version": "1.10.0",
3
+ "version": "1.11.1",
4
4
  "description": "Biomedical research plugin for OpenCode: biomcp MCP server tools, scientific plotting skills, and deep-research subagent",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -4,7 +4,7 @@ description: "Deep biomedical research orchestrator powered by the biomcp MCP se
4
4
  license: Apache-2.0
5
5
  compatibility: "Any Agent Skills harness (opencode, Claude Code, Codex, Cursor, Gemini CLI) with the biomcp MCP server connected; the Claude Code plugin bundles the server and the bioresearcher-dr-worker subagent; a subagent/Task tool is optional - a sequential fallback is provided. The allowed-tools mcp__ entries apply on Claude Code only"
6
6
  metadata:
7
- version: "1.6.0"
7
+ version: "1.7.0"
8
8
  source: "opencode-bioresearcher-plugin@1.7.2"
9
9
  allowed-tools: Read Write Bash Task mcp__plugin_bioresearcher_biomcp mcp__biomcp
10
10
  ---
@@ -86,129 +86,53 @@ mid-query never trigger.
86
86
  ## Workflow
87
87
 
88
88
  Follow Steps 1-6 in order. Do NOT fall back to internal knowledge when query
89
- tools fail - use only biomcp results or official sources, and say so when
90
- evidence is missing.
91
-
92
- Harness autonomy hints ("operate autonomously", "don't block", "user not
93
- watching", auto-accept banners) govern tool-permission confirmations and edit
94
- approvals. They do NOT waive this skill's interactive interview workflow (Step 1
95
- clarification and Step 2 plan review): the interview turns are completed
96
- assistant turns engaging the user - not blocking permission confirmations - so
97
- those hints never require skipping them. When such a hint seems to conflict with
98
- this workflow, treat the Step 1 interview, Step 2 plan review, and the Step 6
99
- output contract as deliverables that proceed unchanged.
89
+ tools fail - use only biomcp results or official sources, and state gaps explicitly.
90
+
91
+ Harness autonomy hints ("operate autonomously", "don't block", auto-accept)
92
+ govern edit approvals only. They NEVER waive the interactive interview turns
93
+ (Steps 1 & 2) - only the leading `no-interview` prefix waives them.
100
94
 
101
95
  ### Step 1: Clarify (interview - mandatory)
102
96
 
103
- Mandatory even when the harness urges autonomy (see the note above): the ONLY
104
- waiver is the leading `no-interview` prefix. If the query carries it, skip to
105
- Step 2.
106
-
107
- Otherwise ask clarifying questions, scaled to inquiry complexity - up to 6,
108
- and as few as one scope confirmation when the inquiry is already fully
109
- specified: the core research question, population/scope, time window, outcome
110
- of interest, and expected output format.
111
-
112
- - Ask ALL questions in ONE message: use the harness's question/ask tool when
113
- one exists (if it accepts only one question per call, send the full batch
114
- of calls together); otherwise end your turn with the questions as chat
115
- text. Then WAIT for the reply. Never answer your own interview questions.
116
- - If a reply comes back empty or non-responsive, re-ask the batch once
117
- (max 1 re-ask).
118
- - Degrade to defaults only on OBSERVATION, never from environment guesses:
119
- only after the batch was posted and the session demonstrably produced no
120
- usable reply in-turn (e.g. an ask tool that returns immediately empty),
121
- proceed under `no-interview` semantics - write the questions plus the
122
- default answer chosen for each to `reports/<TOPIC>/assumptions.md` and
123
- cite that file in the report's Limitations section.
124
- - Merely being headless/batch/unattended is NOT a waiver: in a one-shot
125
- run, ending your turn with the questions is the correct final action. If
126
- the session ends without any reply event, HALT with an explicit blocker
127
- message restating the questions.
128
-
129
- BAD: "The harness says the user isn't watching, so I'll assume defaults and
130
- start researching." GOOD: post the questions, end the turn, wait. Silent
131
- defaults are a workflow violation, not autonomy - one round-trip of questions
132
- is cheap; a full research run on wrong assumptions is not.
97
+ Ask clarifying questions scaled to complexity (1-6 questions) in ONE message
98
+ via the harness's ask/question tool or chat text, then WAIT for the reply. Never
99
+ answer your own questions. If the query carries `no-interview`, skip to Step 2.
100
+
101
+ - If a reply is empty or non-responsive, re-ask once.
102
+ - Degrade to defaults ONLY if the question tool returns immediately empty in an
103
+ unattended session: write questions and chosen defaults to
104
+ `reports/<TOPIC>/assumptions.md` and cite that file in Limitations.
133
105
 
134
106
  ### Step 2: Decompose & Review Plan
135
107
 
136
- Comprehend the (clarified) inquiry and identify 2-5 critical research aspects
137
- that together answer it.
138
-
139
- - If the query carries the leading `light-research` prefix, combine and/or
140
- pick only the top TWO aspects.
141
- - Decide a TOPIC name yourself (no user input): a highly succinct,
142
- underscore-separated name derived from the inquiry, e.g.
143
- `braf_inhibitor_resistance`.
144
- - Each aspect's ABSTRACT (worker prompt, below) must state the aspect's
145
- INCLUSION definition and its binding EXCLUSION criteria (what matches the
146
- search terms but must NOT be admitted, with negative examples) - workers
147
- apply these per `references/analysis-methods.md` (criterion vs keyword).
148
-
149
- **Plan presentation budget:** the plan payload shown to the user stays compact
150
- in any channel - one line per aspect (title, one-line focus, primary tools);
151
- never paste ABSTRACTs, research-item lists, or full amended plans into the
152
- question UI; amended or re-confirmed plans show only the DELTA plus the
153
- compact list. The full plan (ABSTRACTs with boundaries, research items) is
154
- written to `reports/<TOPIC>/plan.md` when work starts (Step 3).
155
-
156
- **Interview waiver (`no-interview`):**
157
- If the query carries the leading `no-interview` prefix, skip the plan review
158
- turn entirely: finalize the 2-5 aspects, track them with the harness's todo
159
- mechanism if available (TodoWrite or equivalent), and proceed immediately to
160
- Step 3 and Step 4.
161
-
162
- **Plan review (interview mode - default):**
163
- When running in interview mode (without `no-interview`), present your proposed
164
- research area plan to the user before launching workers:
165
-
166
- 1. Formulate and present:
167
- - A structured list of the 2-5 research aspects (or top 2 under
168
- `light-research`), each with an aspect title, 1-2 sentence focus summary,
169
- and primary tools/evidence sources (e.g. PubMed/articles,
170
- ClinicalTrials.gov, genes, drugs, patents).
171
- - An explicit prompt inviting user feedback and adjustments on these
172
- research areas.
173
- 2. End your turn with the plan proposal (using the harness's question/ask tool
174
- when available, or chat text) and WAIT for the user's reply. Do not spawn
175
- workers or create output directories before receiving user feedback.
108
+ Comprehend the inquiry and identify 2-5 critical research aspects (top 2 under
109
+ `light-research`). Decide a TOPIC name (succinct, underscore-separated, e.g.
110
+ `braf_inhibitor_resistance`). Each aspect's ABSTRACT defines INCLUSION and binding
111
+ EXCLUSION criteria per `references/analysis-methods.md`.
112
+
113
+ **Plan presentation budget:** keep the plan compact - one line per aspect (title,
114
+ focus, primary tools); never paste raw ABSTRACTs into the question UI.
115
+
116
+ **Plan review (default mode):**
117
+ 1. Present the 2-5 aspects to the user with tools/sources and invite feedback.
118
+ 2. End your turn (via ask tool or chat) and WAIT for the reply. Do not spawn
119
+ workers or create output directories before feedback.
176
120
  3. User feedback handling:
177
- - **Case A (approval / "looks good" / "proceed"):** Proceed directly to
178
- Step 3 and Step 4.
179
- - **Case B (default feedback - modifications without re-review request):**
180
- Incorporate the user's requested adjustments, additions, drops, or scope
181
- changes into the research aspects immediately (strictly adhering to the
182
- 2-5 aspect ceiling, or top 2 under `light-research`). Then **PROCEED
183
- DIRECTLY to Step 3 and Step 4. Do NOT ask for another round of
184
- confirmation.**
185
- - **Case C (special case - explicit re-confirmation requested):** ONLY if the
186
- user explicitly asks to review or confirm the revised plan (e.g. "show me
187
- the updated plan before starting" or "revise the plan and ask me again"),
188
- present the updated plan in a new turn and wait for confirmation before
189
- dispatching subagents (limit plan re-confirmations to at most 2 rounds).
190
- - **User inquiries during review:** If the user asks a clarifying question
191
- (e.g. "can we include pediatric trials?"), answer succinctly in 1-2
192
- sentences, incorporate the suggested scope into the relevant aspect, and
193
- proceed directly to Step 3 and Step 4 unless explicit re-confirmation was
194
- demanded.
195
-
196
- **Degrade to defaults on OBSERVATION:**
197
- Like Step 1, degrade only after the plan was posted and the session
198
- demonstrably produced no usable reply in-turn (e.g. an ask tool returning
199
- immediately empty in unattended/headless runs): proceed under the initial
200
- proposed plan, record the default plan in `reports/<TOPIC>/assumptions.md`,
201
- and cite that file in the report's Limitations section.
202
-
203
- Track the finalized aspect list with the harness's todo mechanism if available
204
- (TodoWrite or equivalent); otherwise keep it in working memory.
121
+ - **Approval / "proceed":** Proceed directly to Step 3 and Step 4.
122
+ - **Feedback / modifications:** Incorporate adjustments immediately and
123
+ PROCEED DIRECTLY to Step 3 and Step 4. Do NOT ask for another confirmation.
124
+ - **Explicit re-confirmation requested:** Only if the user explicitly asks to
125
+ review the revised plan, present it in a new turn (max 2 rounds).
126
+ 4. **Waiver / Degrade:** Skip plan review turn if query has `no-interview`, or
127
+ degrade per Step 1 rules if unattended (record plan in `assumptions.md`).
128
+
129
+ Track finalized aspects in the harness's todo tool (TodoWrite or equivalent).
205
130
 
206
131
  ### Step 3: Create the output directory
207
132
 
208
133
  Write the durable research plan to `reports/<TOPIC>/plan.md` (aspect list,
209
- each aspect's ABSTRACT with inclusion/exclusion boundaries, research items) -
210
- this is the post-feedback snapshot the question UI never needs to carry. The
211
- write tool auto-creates parent directories - do NOT use bash mkdir for this.
134
+ each aspect's ABSTRACT with boundaries, research items). The Write tool
135
+ auto-creates parent directories - do NOT use bash mkdir for this.
212
136
 
213
137
  ### Step 4: Research each aspect
214
138
 
@@ -219,6 +143,13 @@ run the sequential tier below without fabrication - evidence gathering is
219
143
  unavailable until the server is wired (run the `bioresearcher-onboard`
220
144
  skill or see Prerequisites).
221
145
 
146
+ **Tier dispatch hierarchy:** When a subagent tool (`task` or `Task`) is
147
+ available in the harness, parallel worker dispatch (Tier A or Tier B) is
148
+ MANDATORY to maintain research parallelism and isolated worker contexts.
149
+ Subagents inherit all configured tools (biomcp, shell, filesystem) automatically;
150
+ do NOT dispatch exploratory probe tasks to test tool access.
151
+ Tier C is strictly a degraded fallback when no subagent tool exists.
152
+
222
153
  **Tier A - dedicated worker subagent (preferred when available):** if the
223
154
  harness offers the `bioresearcher-dr-worker` subagent type (installed with
224
155
  the bioresearcher Claude Code plugin; scoped name
@@ -243,6 +174,7 @@ TOPIC: <TOPIC>
243
174
  YOUR RESEARCH FOCUS: <RESEARCH-ASPECT>
244
175
  DESCRIPTION: <ABSTRACT>
245
176
  SKILL_DIR: <absolute path to this skill's directory> # Tier B only; a literal path string workers substitute into commands - NOT an env var
177
+ EXECUTION RULE: Do NOT read or inspect evidence-ledger.py or other skill scripts; all schemas and commands are fully specified here.
246
178
  ```
247
179
 
248
180
  ABSTRACT is <200 words describing the exact focus, a list of detailed
@@ -256,38 +188,37 @@ VERBATIM - they are binding, never loosened in translation.
256
188
 
257
189
  Record finished workers via the todo list. If subagents are stuck without
258
190
  progress for too long, prompt the user: "If subagents are stuck without
259
- progress for too long, interrupt and ask me to resume work." Restart failed
260
- workers as needed (retry <= 3 per worker); gap top-ups follow the serialized
261
- ownership-transfer protocol in `references/worker-protocol.md`.
262
-
263
- **Tier C - sequential (no subagent tool):**
264
-
265
- Process aspects one at a time in the main conversation. For each aspect, apply
266
- the same worker rules from `references/worker-protocol.md` (tool selection per
267
- `references/tool-selection.md`, citation discipline and the evidence ledger per
268
- `references/citations.md` and worker-protocol rule 8, retry <= 3, no
269
- re-delegation) and write the same per-aspect files (report + ledger). State
270
- which aspect is being worked on before starting each one.
271
-
272
- **All tiers, per aspect:**
273
-
274
- - Query biomcp tools per `references/tool-selection.md`; filter at the source
275
- (specific terms, `limit`, `sections`) rather than retrieving broadly.
276
- - Make MCP calls sequentially, not concurrently.
277
- - Collect identifiers for every source used: PMIDs/PMCIDs/DOIs (articles),
278
- NCT IDs (trials), patent IDs, accessions (GEO/SRA), database IDs
279
- (genes/drugs/variants).
280
- - Maintain the evidence ledger `reports/<TOPIC>/evidence/<ASPECT>.jsonl` per
281
- `references/worker-protocol.md` rule 8: after EACH biomcp call, append one
282
- record per potentially-citable source with fields copied verbatim from the
283
- tool result, batching all records from one tool result into a single
284
- `evidence-ledger.py add` call (never one call per record, never per-record
285
- scratch files); title-less records (LitSense hints) are enriched via
286
- `article_get(pmid)` before citing.
287
- - Write findings to `reports/<TOPIC>/<ASPECT>.md` (underscore-separated
288
- ASPECT name) citing sources with semantic cite-key markers
289
- (`[@pmid:21639808]`) - NO bibliography section; numbering and the
290
- bibliography are generated later from the ledger by `render` (Step 5b).
191
+ progress for too long, interrupt and ask me to resume work."
192
+
193
+ **Tier C - sequential (strictly when no subagent tool exists):**
194
+ If the harness has no subagent tool (`task` / `Task`), process aspects one at a
195
+ time in the main conversation per `references/worker-protocol.md`.
196
+
197
+ **Worker completion gate (all tiers):**
198
+ When each worker finishes, before marking the aspect complete in the todo list, run:
199
+ ```bash
200
+ python3 <skill_dir>/scripts/evidence-ledger.py check \
201
+ reports/<TOPIC>/evidence/<ASPECT>.jsonl \
202
+ --markers reports/<TOPIC>/<ASPECT>.md
203
+ ```
204
+ - Exit 0: mark aspect complete in todo list.
205
+ - Exit 1:
206
+ - Trivial syntax/quarantine error in ledger: fix directly using Edit/Write.
207
+ - Missing records or unresolved markers: dispatch a top-up remediation worker
208
+ with the check diagnostic output per `references/worker-protocol.md` (max 2
209
+ remediation retries). Never guess or re-point IDs.
210
+ - If retries fail: strip the unresolved marker, qualify the claim in the
211
+ report with a caution note, log the failed ID in `## Evidence Gaps` and
212
+ `reports/<TOPIC>/assumptions.md`, and proceed.
213
+ - Without Bash/Python access: re-read the aspect ledger and confirm every marker
214
+ in `<ASPECT>.md` resolves to a ledger record before marking complete.
215
+
216
+ **Worker execution rules (summary):**
217
+ Query biomcp sequentially per `references/tool-selection.md`, append records to
218
+ `reports/<TOPIC>/evidence/<ASPECT>.jsonl` after each search using `evidence-ledger.py add`
219
+ (never invent values), and write findings with `[@key]` markers to `reports/<TOPIC>/<ASPECT>.md`
220
+ (no bibliography; PDB entries follow the dual-entity rule in `references/worker-protocol.md`).
221
+ See `references/worker-protocol.md` for full schemas.
291
222
 
292
223
  ### Step 5: Synthesize (cite-key draft)
293
224
 
@@ -324,12 +255,11 @@ python3 <skill_dir>/scripts/evidence-ledger.py verify \
324
255
  reports/<TOPIC>/evidence/sources.jsonl --apply
325
256
  ```
326
257
 
327
- - `merge` unions the per-aspect JSONLs (its own output and `_`-prefixed
328
- quarantine files are excluded automatically; malformed lines are
329
- quarantined to `evidence/_invalid.jsonl`).
258
+ - `merge` unions the per-aspect JSONLs (malformed lines quarantined to `_invalid.jsonl`).
330
259
  - `verify` cross-checks article records against NCBI esummary and backfills
331
- ONLY missing fields (epub-ahead-of-print records legitimately stay
332
- locator-less). It also sets titles on title-less records.
260
+ missing fields (including authors, title, journal, locators). Records with
261
+ conflicting titles or DOIs are flagged with warnings and left unverified.
262
+ `--apply` mutates the ledger file in place; review changes via script output.
333
263
 
334
264
  ### Step 5b: Render the final report (numbering authority)
335
265
 
@@ -368,52 +298,38 @@ python3 <skill_dir>/scripts/vet-references.py reports/<TOPIC>/final_report.md --
368
298
  - Layer 2 (fail-safe): on API timeout, rate-limiting, or network failure the
369
299
  script exits 0 and keeps pre-vetting citations unchanged. Non-PMID
370
300
  citations (clinical trials, patents, genes, web URLs) are preserved.
371
- - Exit 1 means STOP: repair the draft or ledger, re-render, and re-vet - never
372
- proceed to Step 6 with a failing audit. Review printed warnings even on
373
- exit 0 (e.g. PMID/title mismatches).
301
+ - Exit 1 means STOP: repair the draft or ledger, re-render, and re-vet.
302
+ - Warning disposition: every warning emitted during `verify` or `vet-references`
303
+ must be resolved (fixed in draft/ledger and re-rendered) or explicitly
304
+ justified in Limitations before Step 6.
305
+ - `--apply` mutates `final_report.md` in place; review printed `- OLD:` / `+ NEW:`
306
+ updates (or use `--diff` for unified diffs).
374
307
  - If the script is unreachable, proceed to Step 6 with the rendered report and
375
308
  state the gap in the final summary.
376
309
 
377
310
  ### Step 6: Write final report + HTML
378
311
 
379
312
  - Ensure `reports/<TOPIC>/final_report.md` is finalized and vetted.
380
- - Then render `reports/<TOPIC>/final_report.html` - ALWAYS by default,
381
- unless the query carries the leading `no-html` prefix or the user
382
- explicitly declined HTML. The markdown report is the complete deliverable;
383
- HTML is only a rendering, so never block finishing the session on it.
384
-
385
- Replace `<skill_dir>` with the full path to this skill's directory
386
- (`${CLAUDE_PLUGIN_ROOT}/skills/bioresearcher-deep-research` on Claude Code
387
- plugin installs; in harnesses that inject SKILL.md without filesystem
388
- access the script is unreachable - go straight to the gap step below).
389
- Run from the working directory containing `reports/<TOPIC>/` and anchor
390
- the output path to the `final_report.md` location:
313
+ - Then render `reports/<TOPIC>/final_report.html` (always by default, unless
314
+ `no-html` prefix was passed or user explicitly declined HTML).
315
+ The markdown report is the deliverable; HTML is only a rendering.
316
+
317
+ Anchor the output path to the `final_report.md` location:
391
318
 
392
319
  ```bash
393
320
  uv run --with markdown python <skill_dir>/scripts/markdown-to-html.py \
394
321
  reports/<TOPIC>/final_report.md -o reports/<TOPIC>/final_report.html
395
322
  ```
396
323
 
397
- Conversion ladder - attempt in order; a rung fails if its tool is missing,
398
- its command exits non-zero, or execution is denied; one attempt per rung,
399
- then fall through:
400
-
324
+ Conversion ladder (attempt in order; fall through on failure):
401
325
  1. `uv` on PATH: the command above.
402
- 2. `python3 -c "import markdown"` succeeds: run
403
- `python3 <skill_dir>/scripts/markdown-to-html.py` with the same args.
404
- 3. `pandoc` on PATH: `pandoc reports/<TOPIC>/final_report.md -o
405
- reports/<TOPIC>/final_report.html --standalone` (its styling differs
406
- from the script's GitHub-like CSS - that is not a failure).
407
- 4. No rung succeeded: keep markdown-only and state the gap explicitly in
408
- the final summary (the reason + the `bioresearcher-python-setup-uv`
409
- skill as remediation).
410
-
411
- Never install converters into the environment (no apt/pip/npm installs);
412
- `uv run --with` ephemeral overlays are the sanctioned exception. After a
413
- successful rung, verify `final_report.html` exists and is non-empty before
414
- declaring success. Do NOT read the full markdown into memory for the
415
- conversion - pass the file path. The final summary must name which
416
- artifacts exist and, when HTML is absent, why.
326
+ 2. `python3 -c "import markdown"` succeeds: run `python3 <skill_dir>/scripts/markdown-to-html.py reports/<TOPIC>/final_report.md -o reports/<TOPIC>/final_report.html`.
327
+ 3. `pandoc` on PATH: `pandoc reports/<TOPIC>/final_report.md -o reports/<TOPIC>/final_report.html --standalone`.
328
+ 4. None succeeded: keep markdown-only; state reason in summary and Limitations.
329
+
330
+ Never run apt/pip/npm installs; `uv run --with` ephemeral overlays are the
331
+ sanctioned exception. Verify `final_report.html` exists and is non-empty before
332
+ declaring success.
417
333
 
418
334
  ## Output layout
419
335
 
@@ -23,8 +23,8 @@ Multiple: Several studies confirm the association [@pmid:21639808; @nct:NCT0428
23
23
  - Keys are the ledger's derived canonical keys (the `add` banner echoes
24
24
  them): `pmid:` > `doi:` > `pmcid:` for articles, `nct:` for trials,
25
25
  `patent:`, `gene:`, `clinvar:`, `chembl:`/`chebi:`/`unii:` for drugs,
26
- ontology ids for diseases, accessions for datasets, `url:`/`title:` for
27
- web/other. A `doi:`/`pmcid:` marker whose record was promoted to a `pmid:`
26
+ ontology ids for diseases, accessions/PDB for datasets (`geo:`, `sra:`, `gb:`, `pdb:`),
27
+ `url:`/`title:` for web/other. A `doi:`/`pmcid:` marker whose record was promoted to a `pmid:`
28
28
  key by merge still resolves.
29
29
  - A bracket whose tokens are not namespace+shape-valid cite-keys (prose like
30
30
  `[@home]`, pandoc-style `[@Chapman2011]`) is left verbatim.
@@ -136,9 +136,10 @@ Example:
136
136
  [7] Cutaneous melanoma. MONDO:0002025. https://monarchinitiative.org/MONDO:0002025
137
137
  ```
138
138
 
139
- ### Datasets / sequences (geo_get / sra_get / genbank_get)
139
+ ### Datasets / structures / sequences (pdb / geo_get / sra_get / genbank_get)
140
140
 
141
141
  ```
142
+ [N] PDB structure [PDB_ID]: [title]. [[method]] Resolution: [res]. https://www.rcsb.org/structure/[PDB_ID]
142
143
  [N] GEO series GSEXXXXXX: [title]. [organism]. https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSEXXXXXX
143
144
  [N] SRA run SRRXXXXXXX: [experiment description]. https://trace.ncbi.nlm.nih.gov/Traces/?run=SRRXXXXXXX
144
145
  [N] GenBank accession XXXXXXXX.X: [definition]. https://www.ncbi.nlm.nih.gov/nuccore/XXXXXXXX.X
@@ -132,3 +132,5 @@ Structure workflow:
132
132
  the workspace matters.
133
133
  - Chain ensembl_lookup -> gene_get for human annotation; ensembl_region ->
134
134
  variant_get for variant detail; pdb citation sections -> article_get.
135
+ Never copy `summary.title` (structure title) or `summary.authors` (depositors)
136
+ into `article` records; deposition titles and authors belong to the coordinate entry.
@@ -68,6 +68,8 @@ QUESTION TYPE
68
68
  ├─ Orthologues / consequences / regions / structures
69
69
  │ → ensembl_lookup / ensembl_homology / ensembl_consequence / ensembl_region
70
70
  │ → pdb (query | pdb_id | pdb_id+download)
71
+ │ - Cite structure: dataset [@pdb:XXXX]
72
+ │ - Cite paper: chain summary.pmid -> article_get(pmid) -> article [@pmid:XXXX]
71
73
  │ → details: references/ensembl-pdb.md
72
74
 
73
75
  ├─ Ambiguous / multi-entity free text ("BRAF V600E melanoma")
@@ -18,6 +18,7 @@ TOPIC: <TOPIC>
18
18
  YOUR RESEARCH FOCUS: <RESEARCH-ASPECT>
19
19
  DESCRIPTION: <ABSTRACT>
20
20
  SKILL_DIR: <absolute skill dir> # Tier B only; resolve before dispatch
21
+ EXECUTION RULE: Do NOT read or inspect evidence-ledger.py or other skill scripts; all schemas and commands are fully specified here.
21
22
  ```
22
23
 
23
24
  - ABSTRACT: <200 words describing the exact focus, a list of detailed
@@ -101,9 +102,10 @@ SKILL_DIR: <absolute skill dir> # Tier B only; resolve before dispatch
101
102
  {"schema":"bioresearcher-evidence/1","type":"gene","ids":{"ncbi_gene":"673","hgnc":"HGNC:1097"},"title":"B-Raf proto-oncogene, serine/threonine kinase","meta":{"symbol":"BRAF"},"url":"https://www.ncbi.nlm.nih.gov/gene/673","provenance":[...]}
102
103
  {"schema":"bioresearcher-evidence/1","type":"variant","ids":{"clinvar":"13961","rs":"rs113488022"},"title":"NM_004333.6(BRAF):c.1799T>A","meta":{"gene":"BRAF","protein_change":"V600E","significance":"Pathogenic"},"provenance":[...]}
103
104
  {"schema":"bioresearcher-evidence/1","type":"drug","ids":{"chembl":"CHEMBL1229517"},"title":"vemurafenib","meta":{"indication":"BRAF V600E-mutant melanoma","source_section":"FDA label (drug_get safety section)"},"provenance":[...]}
104
- {"schema":"bioresearcher-evidence/1","type":"disease","ids":{"mondo":"MONDO:0002025"},"title":"Cutaneous melanoma","url":"https://monarchinitiative.org/MONDO:0002025","provenance":[...]}
105
- {"schema":"bioresearcher-evidence/1","type":"dataset","ids":{"geo":"GSE12345"},"title":"Series title","provenance":[...]}
106
- {"schema":"bioresearcher-evidence/1","type":"web","ids":{"url":"https://..."},"title":"Page Title","meta":{"organization":"FDA","accessed":"2026-09-10"},"provenance":[...]}
105
+ {"schema":"bioresearcher-evidence/1","type":"disease","ids":{"mondo":"MONDO:0002025"},"title":"Cutaneous melanoma","url":"https://monarchinitiative.org/MONDO:0002025","provenance":[...]}
106
+ {"schema":"bioresearcher-evidence/1","type":"dataset","ids":{"geo":"GSE12345"},"title":"Series title","provenance":[...]}
107
+ {"schema":"bioresearcher-evidence/1","type":"dataset","ids":{"pdb":"6N65"},"title":"KRAS G-quadruplex G16T mutant","meta":{"method":"X-RAY DIFFRACTION","resolution":"1.6 Å"},"url":"https://www.rcsb.org/structure/6N65","provenance":[...]}
108
+ {"schema":"bioresearcher-evidence/1","type":"web","ids":{"url":"https://..."},"title":"Page Title","meta":{"organization":"FDA","accessed":"2026-09-10"},"provenance":[...]}
107
109
  {"schema":"bioresearcher-evidence/1","type":"other","ids":{"url":"https://..."},"title":"Any other citable source (FDA page, guideline, ...)","provenance":[...]}
108
110
  ```
109
111
 
@@ -115,15 +117,32 @@ SKILL_DIR: <absolute skill dir> # Tier B only; resolve before dispatch
115
117
  take the standard retry ladder (rule 6), then leave the record in the
116
118
  ledger with a gap note in the aspect file - the orchestrator's verify
117
119
  step backfills what it can.
120
+ - PDB dual-entity discipline: when querying `pdb`, distinguish between
121
+ citing the macromolecular structure and citing the associated publication:
122
+ - To cite the published paper: set `type: "article"` with `ids.pmid` (or
123
+ `ids.doi`). NEVER copy `summary.title` (structure title) or
124
+ `summary.authors` (deposition list) from the PDB result into the
125
+ article record. Enrich via `article_get(pmid)` for canonical article
126
+ metadata, or leave title/authors null for orchestrator verification.
127
+ - To cite the 3D structure itself: set `type: "dataset"` with `ids.pdb:
128
+ "<PDB_ID>"` and `title: summary.title`. Canonical key derived:
129
+ `pdb:<PDB_ID>`. Marker: `[@pdb:<PDB_ID>]`.
118
130
  - With Bash available (the orchestrator provides `SKILL_DIR` in the
119
131
  prompt): append with
120
132
  `python3 <SKILL_DIR>/scripts/evidence-ledger.py add <file> --stdin`,
121
133
  substituting the SKILL_DIR value from your prompt LITERALLY - it is a
122
134
  path string, NOT an environment variable (`$SKILL_DIR` in a shell
123
- resolves to nothing and breaks the call). Pass a JSON ARRAY of the
124
- batch's records (a heredoc works well), or equivalently
125
- `add <file> @<batch.json>` with an array file. Both validate,
126
- normalize, and accept every record in one call, and the banner echoes
135
+ resolves to nothing and breaks the call). Pass records via a shell heredoc
136
+ or with an array/JSONL file (`add <file> @<batch.json>`):
137
+ ```bash
138
+ python3 <SKILL_DIR>/scripts/evidence-ledger.py add reports/<TOPIC>/evidence/<YOUR-FOCUS>.jsonl --stdin << 'EOF'
139
+ [
140
+ {"schema":"bioresearcher-evidence/1","type":"article","ids":{"pmid":"..."},"title":"...","provenance":[{"aspect":"<YOUR-FOCUS>","tool":"article_search","args":{},"retrieved_at":"<ISO>"}]}
141
+ ]
142
+ EOF
143
+ ```
144
+ (A JSON array `[...]`, a single JSON object `{...}`, or newline-delimited JSONL lines are all accepted by `--stdin` or `@<file>`).
145
+ Both validate, normalize, and accept every record in one call, and the banner echoes
127
146
  the derived canonical keys - cite those keys. Re-adding the same key
128
147
  MERGES fill-only (never overwrites a non-null value): later adds for
129
148
  the same source are safe and expected (e.g. enriching a record after a
@@ -136,9 +155,13 @@ SKILL_DIR: <absolute skill dir> # Tier B only; resolve before dispatch
136
155
  timestamp. Fields the tool did not return stay null; values inferred
137
156
  from your own query parameters (e.g. a phase filter) may enter `meta`
138
157
  ONLY with the filter captured in `provenance.args` and the inference
139
- disclosed in the report. Without Bash ONLY (e.g. the Claude plugin
140
- worker): write raw JSONL lines with the Write tool; the orchestrator's
141
- merge validates them.
158
+ disclosed in the report. When querying ClinicalTrials.gov
159
+ (`trial_search` / `biomcp_trial_search`), use exact uppercase underscore
160
+ enum values for `status`: `RECRUITING`, `ACTIVE_NOT_RECRUITING`,
161
+ `COMPLETED`, `TERMINATED` (commas or spaces in status trigger HTTP 400
162
+ Bad Request from ClinicalTrials.gov). Without Bash ONLY (e.g. the Claude
163
+ plugin worker): write raw JSONL lines with the Write tool and re-read the
164
+ ledger to match markers; the orchestrator validates via `check` upon return.
142
165
  - BEFORE reporting completion, run
143
166
  `python3 <SKILL_DIR>/scripts/evidence-ledger.py check <file> --markers <YOUR-FOCUS>.md` -
144
167
  it must exit 0: no quarantined lines, and every `[@key]` marker in
@@ -155,14 +178,29 @@ SKILL_DIR: <absolute skill dir> # Tier B only; resolve before dispatch
155
178
 
156
179
  Aspect-file ownership is SERIALIZED, never concurrent: a top-up worker
157
180
  adopts the original worker's contract only after that worker has terminated.
158
- The orchestrator dispatches it with the prior worker's evidence-gaps list:
181
+ The orchestrator dispatches it when `evidence-ledger.py check` fails or for evidence gaps:
159
182
 
160
- - Append to the SAME per-aspect ledger via `add` (upsert merge is safe).
161
- - Update the SAME aspect .md via read-then-targeted edits confined to the
162
- gap sections - never rewrite unrelated content, other aspects, or the
163
- orchestrator's draft.
183
+ - Target scope: touch ONLY `reports/<TOPIC>/<ASPECT>.md` and
184
+ `reports/<TOPIC>/evidence/<ASPECT>.jsonl`. Never edit other aspects or the
185
+ synthesis draft.
186
+ - For unresolved markers: fetch canonical metadata via biomcp (`article_get`,
187
+ `trial_get`) and append via `add`. If no valid source exists, remove or
188
+ qualify the claim in `<ASPECT>.md` and document the gap under `## Evidence Gaps`.
189
+ Never invent or guess cite-keys.
190
+ - For quarantined lines: fix the JSON formatting in the ledger.
164
191
  - End with `check <file> --markers <aspect>.md` (exit 0) before reporting.
165
192
 
193
+ ### Remediation worker prompt template
194
+
195
+ ```md
196
+ TOPIC: <TOPIC>
197
+ YOUR RESEARCH FOCUS: <RESEARCH-ASPECT> (REMEDIATION)
198
+ DIAGNOSTIC OUTPUT:
199
+ <stdout and stderr from: evidence-ledger.py check reports/<TOPIC>/evidence/<ASPECT>.jsonl --markers reports/<TOPIC>/<ASPECT>.md>
200
+ TASK: Resolve quarantined lines in reports/<TOPIC>/evidence/<ASPECT>.jsonl and fetch canonical metadata for unresolved markers via biomcp. Touch no other aspects or synthesis files. End with `evidence-ledger.py check` (must exit 0).
201
+ SKILL_DIR: <absolute path to this skill's directory>
202
+ ```
203
+
166
204
  ## Retry ladder (per query)
167
205
 
168
206
  ```