dsh-molbio-tools 0.27.1 → 0.28.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.
- package/CHANGELOG.md +139 -0
- package/README.md +39 -14
- package/benchmark/README.md +7 -7
- package/benchmark/_probe-v28.mjs +60 -0
- package/benchmark/harness.mjs +11 -3
- package/benchmark/profile.mjs +2 -2
- package/benchmark/run.mjs +3 -1
- package/benchmark/sequences.mjs +16 -0
- package/benchmark/tasks/01-core.json +1 -1
- package/benchmark/tasks/02-primers.json +1 -5
- package/benchmark/tasks/09-formats.json +1 -1
- package/benchmark/tasks/10-v28.json +300 -0
- package/benchmark/verifications.mjs +44 -1
- package/cordis.patch.yml +2 -2
- package/docs/capability-gap-survey.md +1 -1
- package/docs/client-panel.md +2 -2
- package/docs/history.md +47 -0
- package/docs/maintainer.md +9 -6
- package/docs/roadmap.md +26 -4
- package/docs/rules.md +24 -0
- package/docs/v28-plan.md +227 -0
- package/docs/workflow.md +5 -5
- package/index.mjs +782 -70
- package/package.json +7 -3
- package/preset/molbio-lab/agent.cordis.yml +2 -2
- package/preset/molbio-lab/preset.yml +1 -1
- package/protein-annotate.mjs +525 -0
- package/sequence-ops.mjs +203 -0
- package/sequencing.mjs +517 -0
- package/test/contract.mjs +2 -2
- package/test/prompt.mjs +149 -0
- package/test/smoke.mjs +200 -4
- package/test/svgpng.mjs +2 -0
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$comment": [
|
|
3
|
+
"v0.28.0 tool surface: protein annotation (#13/#14/#21), format interchange (#10),",
|
|
4
|
+
"and sequencing read sets (#27/#31).",
|
|
5
|
+
"",
|
|
6
|
+
"Each task pins RENDERED text the tool actually produces, not only 'it ran': the",
|
|
7
|
+
"instability index and its stable/unstable call, the von Heijne cleavage site, the",
|
|
8
|
+
"two coordinate conventions (1-based GFF3 vs 0-based BED is covered offline in",
|
|
9
|
+
"smoke), read placement/orientation in the contig, and allele frequencies with their",
|
|
10
|
+
"CDS effects. The editing task's frequency is a fraction of ALIGNED reads — the",
|
|
11
|
+
"task says so because a model that reports TIDE-style efficiency would be wrong."
|
|
12
|
+
],
|
|
13
|
+
"tasks": [
|
|
14
|
+
{
|
|
15
|
+
"id": "protein-features",
|
|
16
|
+
"category": "protein",
|
|
17
|
+
"tier": "full",
|
|
18
|
+
"covers": [
|
|
19
|
+
"molbio_protein_features"
|
|
20
|
+
],
|
|
21
|
+
"instruction": "Before I express this peptide I want its annotation: which PTM motifs are present, whether there is a low-complexity region, and whether the instability index calls it stable. Use the defaults.\n\nProtein: AANASWAAWGEASTALKAERRASAAEAAAAAAAAAAAAAAAA",
|
|
22
|
+
"timeout_ms": 240000,
|
|
23
|
+
"expect_tools": [
|
|
24
|
+
"molbio_protein_features"
|
|
25
|
+
],
|
|
26
|
+
"assertions": [
|
|
27
|
+
{
|
|
28
|
+
"where": "tool",
|
|
29
|
+
"pattern": "42 aa · 5 PTM",
|
|
30
|
+
"note": "length and motif count"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"where": "tool",
|
|
34
|
+
"pattern": "3: N-glycosylation",
|
|
35
|
+
"note": "N-glycosylation motif at residue 3"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"where": "tool",
|
|
39
|
+
"pattern": "17: SUMOylation",
|
|
40
|
+
"note": "SUMOylation motif at residue 17"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"where": "tool",
|
|
44
|
+
"pattern": "17-42 \\(26 aa, entropy 1\\.222 bits\\)",
|
|
45
|
+
"note": "the low-complexity region at the C-terminus"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"where": "tool",
|
|
49
|
+
"pattern": "instability index 13\\.54 \\(stable",
|
|
50
|
+
"note": "Guruprasad instability index and its call"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"where": "answer",
|
|
54
|
+
"pattern": "glycosylation|SUMO|instability",
|
|
55
|
+
"note": "the model reports annotation content, not only a count"
|
|
56
|
+
}
|
|
57
|
+
]
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"id": "signal-peptide",
|
|
61
|
+
"category": "protein",
|
|
62
|
+
"tier": "full",
|
|
63
|
+
"covers": [
|
|
64
|
+
"molbio_signal_peptide"
|
|
65
|
+
],
|
|
66
|
+
"instruction": "Does this protein have a cleavable signal peptide? Give the cleavage position, the signal-peptide sequence and any candidate transmembrane segment.\n\nProtein: MALWMRLLPLLALLALWGPDPAAAFVNQHLCGSHLVEALY",
|
|
67
|
+
"timeout_ms": 240000,
|
|
68
|
+
"expect_tools": [
|
|
69
|
+
"molbio_signal_peptide"
|
|
70
|
+
],
|
|
71
|
+
"assertions": [
|
|
72
|
+
{
|
|
73
|
+
"where": "tool",
|
|
74
|
+
"pattern": "candidate signal peptide: cleavage after residue 24",
|
|
75
|
+
"note": "the von Heijne score peaks at the preproinsulin cleavage site"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"where": "tool",
|
|
79
|
+
"pattern": "score 6\\.852, window 12-26",
|
|
80
|
+
"note": "the score and the -13..+2 window"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"where": "tool",
|
|
84
|
+
"pattern": "signal peptide \\(24 aa\\): MALWMRLLPLLALLALWGPDPAAA",
|
|
85
|
+
"note": "the cleaved signal peptide"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"where": "tool",
|
|
89
|
+
"pattern": "candidate transmembrane segments: 2-9",
|
|
90
|
+
"note": "the hydropathy run is reported as a candidate, not a topology"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"where": "answer",
|
|
94
|
+
"pattern": "24|MALWMRLL",
|
|
95
|
+
"note": "the model reports the position/sequence"
|
|
96
|
+
}
|
|
97
|
+
]
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"id": "antigenicity",
|
|
101
|
+
"category": "protein",
|
|
102
|
+
"tier": "full",
|
|
103
|
+
"covers": [
|
|
104
|
+
"molbio_antigenicity"
|
|
105
|
+
],
|
|
106
|
+
"instruction": "Which regions of proinsulin look surface-exposed by the Kolaskar-Tongaonkar propensity? Use the defaults and tell me the top region.\n\nProtein: MALWMRLLPLLALLALWGPDPAAAFVNQHLCGSHLVEALYLVCGERGFFYTPKTRREAEDLQVGQVELGGGPGAGSLQPLALEGSLQKRGIVEQCCTSICSLYQLENYCN",
|
|
107
|
+
"timeout_ms": 240000,
|
|
108
|
+
"expect_tools": [
|
|
109
|
+
"molbio_antigenicity"
|
|
110
|
+
],
|
|
111
|
+
"assertions": [
|
|
112
|
+
{
|
|
113
|
+
"where": "tool",
|
|
114
|
+
"pattern": "mean A\\(p\\) 1\\.065",
|
|
115
|
+
"note": "the protein mean propensity"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"where": "tool",
|
|
119
|
+
"pattern": "5 candidate region",
|
|
120
|
+
"note": "region count at the default 6-residue minimum"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"where": "tool",
|
|
124
|
+
"pattern": "5-19 \\(15 aa, peak 1\\.197",
|
|
125
|
+
"note": "the first region and its peak"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"where": "tool",
|
|
129
|
+
"pattern": "21-46 \\(26 aa, peak 1\\.199",
|
|
130
|
+
"note": "the highest-peak region"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"where": "answer",
|
|
134
|
+
"pattern": "5-19|21-46|1\\.19",
|
|
135
|
+
"note": "the model reports a region, not only a count"
|
|
136
|
+
}
|
|
137
|
+
]
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"id": "feature-export",
|
|
141
|
+
"category": "formats",
|
|
142
|
+
"tier": "full",
|
|
143
|
+
"covers": [
|
|
144
|
+
"molbio_feature_export"
|
|
145
|
+
],
|
|
146
|
+
"instruction": "Export this toy annotation as GFF3 and tell me which coordinate convention the file uses. Sequence ACGTACGTAC, one CDS at 2-6 on the forward strand labelled gene1.",
|
|
147
|
+
"timeout_ms": 240000,
|
|
148
|
+
"expect_tools": [
|
|
149
|
+
"molbio_feature_export"
|
|
150
|
+
],
|
|
151
|
+
"assertions": [
|
|
152
|
+
{
|
|
153
|
+
"where": "tool",
|
|
154
|
+
"pattern": "1-based inclusive",
|
|
155
|
+
"note": "the coordinate convention is stated"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"where": "tool",
|
|
159
|
+
"pattern": "CDS\\s+2\\s+6",
|
|
160
|
+
"note": "the 1-based inclusive span"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"where": "tool",
|
|
164
|
+
"pattern": "ID=CDS_1;Name=gene1",
|
|
165
|
+
"note": "the GFF3 attributes"
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"where": "tool",
|
|
169
|
+
"pattern": "phase column is '\\.'",
|
|
170
|
+
"note": "CDS phase is not invented"
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"where": "answer",
|
|
174
|
+
"pattern": "GFF3|1-based",
|
|
175
|
+
"note": "the model names the format/convention"
|
|
176
|
+
}
|
|
177
|
+
]
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
"id": "sequence-edit",
|
|
181
|
+
"category": "formats",
|
|
182
|
+
"tier": "full",
|
|
183
|
+
"covers": [
|
|
184
|
+
"molbio_sequence_edit"
|
|
185
|
+
],
|
|
186
|
+
"instruction": "Rotate the sequence AACCGGTT so that base 3 becomes base 1, and show me the result.",
|
|
187
|
+
"timeout_ms": 240000,
|
|
188
|
+
"expect_tools": [
|
|
189
|
+
"molbio_sequence_edit"
|
|
190
|
+
],
|
|
191
|
+
"assertions": [
|
|
192
|
+
{
|
|
193
|
+
"where": "tool",
|
|
194
|
+
"pattern": "rotate: 8 bp",
|
|
195
|
+
"note": "the operation and length are reported"
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"where": "tool",
|
|
199
|
+
"pattern": "CCGGTTAA",
|
|
200
|
+
"note": "the rotated sequence"
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"where": "tool",
|
|
204
|
+
"pattern": "original base 3 is now base 1",
|
|
205
|
+
"note": "the coordinate note"
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
"where": "answer",
|
|
209
|
+
"pattern": "CCGGTTAA",
|
|
210
|
+
"note": "the model reports the sequence"
|
|
211
|
+
}
|
|
212
|
+
]
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
"id": "sanger-assemble",
|
|
216
|
+
"category": "sequencing",
|
|
217
|
+
"tier": "full",
|
|
218
|
+
"covers": [
|
|
219
|
+
"molbio_sanger_assemble"
|
|
220
|
+
],
|
|
221
|
+
"instruction": "Assemble these three Sanger reads into one contig (minimum overlap 40, no quality trimming) and tell me the coverage and whether every read placed.\n\nr1: GCGTGGTTATAATACAAGTTGAGCATATAAGGTTTGACAGCCTCTGACGCCTGCGGCGAAGGCCCATAATGGTACCGGAAGACTTCCGCCTCGATGCATCACTCACATCGGTGTCACCTGTTGTCGTCCGTTAACAAGTAGCAGGTTAGATCCGATCCGCGTCTAGGAGTGATCCTTATCAAATTGACTCAAAGGCGATATACAGCGAAAACATCAACCG\n\nr2: TCCGATCCGCGTCTAGGAGTGATCCTTATCAAATTGACTCAAAGGCGATATACAGCGAAAACATCAACCGTGGACTTCAGGAACACGGTGTGAGGGTTGGTCTCTTTTGAGAGATATTACAGACACTTTCTGGAGGACAACCGTGGTTTGGAACTGAATTGTCAAGGCGACATTACCTTAAAGCGTAGTTGGGTGGTGACTTTGAGCTGATGATAACGTA\n\nr3: TCCATGTTCGGTATAAACATTGCTGGTCCCTACGTTATCATCAGCTCAAAGTCACCACCCAACTACGCTTTAAGGTAATGTCGCCTTGACAATTCAGTTCCAAACCACGGTTGTCCTCCA",
|
|
222
|
+
"timeout_ms": 300000,
|
|
223
|
+
"expect_tools": [
|
|
224
|
+
"molbio_sanger_assemble"
|
|
225
|
+
],
|
|
226
|
+
"assertions": [
|
|
227
|
+
{
|
|
228
|
+
"where": "tool",
|
|
229
|
+
"pattern": "400 bp from 3/3 read",
|
|
230
|
+
"note": "the full contig from all three reads"
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
"where": "tool",
|
|
234
|
+
"pattern": "coverage 1\\.4× \\(min 1×\\)",
|
|
235
|
+
"note": "the depth summary"
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
"where": "tool",
|
|
239
|
+
"pattern": "r3 reverse 281-400",
|
|
240
|
+
"note": "the reverse-complement read is placed and oriented"
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
"where": "tool",
|
|
244
|
+
"pattern": "0 conflict",
|
|
245
|
+
"note": "no base conflicts"
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
"where": "answer",
|
|
249
|
+
"pattern": "400|1\\.4|reverse",
|
|
250
|
+
"note": "the model reports length/coverage, not only success"
|
|
251
|
+
}
|
|
252
|
+
]
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
"id": "editing-outcome",
|
|
256
|
+
"category": "sequencing",
|
|
257
|
+
"tier": "full",
|
|
258
|
+
"covers": [
|
|
259
|
+
"molbio_editing_outcome"
|
|
260
|
+
],
|
|
261
|
+
"instruction": "These four Sanger reads come from editing a 96 bp reference (ATG + 30×GCT + TAA). They are in the file `reads.fa` (FASTA) in your working directory — pass that file to the tool instead of retyping the sequences. Cluster them into alleles, and give each frequency and protein effect inside the CDS 1-96. Treat the reference as linear.\\n\\n\\n\\nThe reference is ATG + 30×GCT + TAA (96 bp).",
|
|
262
|
+
"timeout_ms": 300000,
|
|
263
|
+
"expect_tools": [
|
|
264
|
+
"molbio_editing_outcome"
|
|
265
|
+
],
|
|
266
|
+
"assertions": [
|
|
267
|
+
{
|
|
268
|
+
"where": "tool",
|
|
269
|
+
"pattern": "4/4 read\\(s\\) aligned",
|
|
270
|
+
"note": "every read aligned"
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
"where": "tool",
|
|
274
|
+
"pattern": "50\\.0% \\(2\\) wild type",
|
|
275
|
+
"note": "the wild-type allele frequency"
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
"where": "tool",
|
|
279
|
+
"pattern": "25\\.0% \\(1\\).*in_frame_indel",
|
|
280
|
+
"note": "the 3 bp deletion is in frame"
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"where": "tool",
|
|
284
|
+
"pattern": "missense A2T",
|
|
285
|
+
"note": "the substitution's protein effect"
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
"where": "tool",
|
|
289
|
+
"pattern": "not TIDE",
|
|
290
|
+
"note": "the method boundary is stated"
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
"where": "answer",
|
|
294
|
+
"pattern": "50%|A2T|in frame|in-frame",
|
|
295
|
+
"note": "the model reports allele frequencies and effects"
|
|
296
|
+
}
|
|
297
|
+
]
|
|
298
|
+
}
|
|
299
|
+
]
|
|
300
|
+
}
|
|
@@ -24,7 +24,7 @@ import { join } from 'node:path';
|
|
|
24
24
|
import { readFileSync } from 'node:fs';
|
|
25
25
|
import { fileURLToPath } from 'node:url';
|
|
26
26
|
|
|
27
|
-
import { FIXTURES, NAMED_SEQUENCES, QPCR_TEMPLATE, makeTemplate, reverseComplementOf } from './sequences.mjs';
|
|
27
|
+
import { FIXTURES, V28_EDIT_READS, V28_EDIT_REF, NAMED_SEQUENCES, QPCR_TEMPLATE, makeTemplate, reverseComplementOf } from './sequences.mjs';
|
|
28
28
|
|
|
29
29
|
/** The committed GenBank fixture's text, read once at module scope. */
|
|
30
30
|
const GENBANK_TEXT = readFileSync(
|
|
@@ -34,6 +34,16 @@ const GENBANK_TEXT = readFileSync(
|
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
|
|
37
|
+
|
|
38
|
+
/** Inputs behind the v0.28.0 tasks; the same literals the task instructions carry. */
|
|
39
|
+
const V28_INSULIN = 'MALWMRLLPLLALLALWGPDPAAAFVNQHLCGSHLVEALYLVCGERGFFYTPKTRREAEDLQVGQVELGGGPGAGSLQPLALEGSLQKRGIVEQCCTSICSLYQLENYCN';
|
|
40
|
+
const V28_ASSEMBLY_REF = 'GCGTGGTTATAATACAAGTTGAGCATATAAGGTTTGACAGCCTCTGACGCCTGCGGCGAAGGCCCATAATGGTACCGGAAGACTTCCGCCTCGATGCATCACTCACATCGGTGTCACCTGTTGTCGTCCGTTAACAAGTAGCAGGTTAGATCCGATCCGCGTCTAGGAGTGATCCTTATCAAATTGACTCAAAGGCGATATACAGCGAAAACATCAACCGTGGACTTCAGGAACACGGTGTGAGGGTTGGTCTCTTTTGAGAGATATTACAGACACTTTCTGGAGGACAACCGTGGTTTGGAACTGAATTGTCAAGGCGACATTACCTTAAAGCGTAGTTGGGTGGTGACTTTGAGCTGATGATAACGTAGGGACCAGCAATGTTTATACCGAACATGGA';
|
|
41
|
+
const V28_ASSEMBLY_READS = [
|
|
42
|
+
{ name: 'r1', sequence: V28_ASSEMBLY_REF.slice(0, 220) },
|
|
43
|
+
{ name: 'r2', sequence: V28_ASSEMBLY_REF.slice(150, 370) },
|
|
44
|
+
{ name: 'r3', sequence: 'TCCATGTTCGGTATAAACATTGCTGGTCCCTACGTTATCATCAGCTCAAAGTCACCACCCAACTACGCTTTAAGGTAATGTCGCCTTGACAATTCAGTTCCAAACCACGGTTGTCCTCCA' },
|
|
45
|
+
];
|
|
46
|
+
|
|
37
47
|
/** The plasmid sequence, loaded once per offline run. */
|
|
38
48
|
let puc118;
|
|
39
49
|
|
|
@@ -391,6 +401,39 @@ export function invocationsFor(task) {
|
|
|
391
401
|
{ tool: 'molbio_parse_snapgene', args: { path: at('pUC118.dna') } },
|
|
392
402
|
],
|
|
393
403
|
|
|
404
|
+
// v0.28.0
|
|
405
|
+
'protein-features': () => [
|
|
406
|
+
{ tool: 'molbio_protein_features', args: { sequence: 'AANASWAAWGEASTALKAERRASAAE' + 'A'.repeat(16) } },
|
|
407
|
+
],
|
|
408
|
+
'signal-peptide': () => [
|
|
409
|
+
{ tool: 'molbio_signal_peptide', args: { sequence: V28_INSULIN.slice(0, 40) } },
|
|
410
|
+
],
|
|
411
|
+
'antigenicity': () => [
|
|
412
|
+
{ tool: 'molbio_antigenicity', args: { sequence: V28_INSULIN } },
|
|
413
|
+
],
|
|
414
|
+
'feature-export': () => [
|
|
415
|
+
{
|
|
416
|
+
tool: 'molbio_feature_export',
|
|
417
|
+
args: {
|
|
418
|
+
sequence: 'ACGTACGTAC',
|
|
419
|
+
features: [{ type: 'CDS', start: 2, end: 6, strand: 1, label: 'gene1' }],
|
|
420
|
+
format: 'gff3',
|
|
421
|
+
},
|
|
422
|
+
},
|
|
423
|
+
],
|
|
424
|
+
'sequence-edit': () => [
|
|
425
|
+
{ tool: 'molbio_sequence_edit', args: { sequence: 'AACCGGTT', operation: 'rotate', position: 3 } },
|
|
426
|
+
],
|
|
427
|
+
'sanger-assemble': () => [
|
|
428
|
+
{ tool: 'molbio_sanger_assemble', args: { reads: V28_ASSEMBLY_READS, min_overlap: 40, trim_quality: 0 } },
|
|
429
|
+
],
|
|
430
|
+
'editing-outcome': () => [
|
|
431
|
+
{
|
|
432
|
+
tool: 'molbio_editing_outcome',
|
|
433
|
+
args: { reads: V28_EDIT_READS, reference: V28_EDIT_REF, circular: false, cds_start: 1, cds_end: V28_EDIT_REF.length },
|
|
434
|
+
},
|
|
435
|
+
],
|
|
436
|
+
|
|
394
437
|
// network (see NETWORK_TASKS: online-only assertions, `where: "answer"`)
|
|
395
438
|
'literature-search': () => [
|
|
396
439
|
{ tool: 'molbio_pubmed_search', args: { query: 'CRISPR base editing', max_results: 5 } },
|
package/cordis.patch.yml
CHANGED
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
id: molbio-lab
|
|
48
48
|
order: 5
|
|
49
49
|
name: Molecular Biology Lab
|
|
50
|
-
description: "分子生物学专属模式:标准编码能力 +
|
|
50
|
+
description: "分子生物学专属模式:标准编码能力 + 72 个 molbio_* 工具(序列分析、引物设计(含跨内含子 qPCR、盐/浓度旋钮与目标位置偏好)、TaqMan 水解探针(含 MGB 与订购 CSV)与多重 PCR 互扰/退火温度/浓度建议、克隆模拟与选酶(含 Golden Gate)、酶目录查询、甲基化敏感位点与双酶切 buffer 兼容检查、多序列比对(每个输入残基都会进比对结果)、保守性分析与比对后处理(共识/缺口修剪/同一性矩阵/逐列覆盖度,含 sequence logo 图)、CRISPR gRNA 设计(SpCas9/SaCas9/Cas12a/Cas13,家族特定 PAM/PFS/种子)与脱靶搜索、SnapGene/GenBank 解析与质粒图谱、Sanger 测序验证、蛋白性质/电荷-pH 曲线/密码子优化/螺旋轮投影与疏水性图、qPCR 与绘图、虚拟凝胶、实验台分析(FASTQ 质控、密码子使用、系统发生树(长叶名自动折行)、in-silico PCR、CpG/GC 组成、序列 dotplot、载体/接头污染筛查、FASTQ 修剪/过滤、批量文件分析/CSV)、静默酶切位点突变设计、蛋白注释(PTM 基序/低复杂度/不稳定指数、von Heijne 信号肽与跨膜段、Kolaskar-Tongaonkar 抗原性)、注释格式导出(GFF3/BED/CSV)与序列编辑(rotate/insert/delete/replace/split/join)、Sanger 读段组装与编辑结果归类——生成的 SVG 图片自动用系统默认应用打开,文献/协议/实验记录)。"
|
|
51
51
|
plugins:
|
|
52
52
|
- id: persona
|
|
53
53
|
name: '@deepseek-ai/dsh-persona'
|
|
@@ -181,7 +181,7 @@
|
|
|
181
181
|
name: '@deepseek-ai/dsh-plugin-market/tools'
|
|
182
182
|
disabled: true
|
|
183
183
|
|
|
184
|
-
# dsh-molbio-tools: molecular-biology toolset (
|
|
184
|
+
# dsh-molbio-tools: molecular-biology toolset (72 tools across sequence
|
|
185
185
|
# analysis, primers (incl. TaqMan probes and multiplex compatibility),
|
|
186
186
|
# in-silico PCR, cloning (incl. Golden Gate), enzyme catalog, methylation-aware
|
|
187
187
|
# and double digests, plasmids, Sanger verification, proteins (incl. helical
|
|
@@ -6,7 +6,7 @@ mainstream bioinformatics landscape offer that this toolset does **not**, and wh
|
|
|
6
6
|
deterministic algorithms in a few hundred lines of dependency-free JS with **no external data files,
|
|
7
7
|
binaries, network, or reference databases**?
|
|
8
8
|
|
|
9
|
-
> **Status note (0.
|
|
9
|
+
> **Status note (0.28.0).** Rows 10, 13, 14, 21, 27 and 31 shipped in 0.28.0 (feature export + sequence editing, protein feature suite, antigenicity, signal peptide + TM segments, Sanger assembly, editing-outcome clustering). The note below records the 0.24.0 baseline. The baseline below is the 52-tool package this survey was written
|
|
10
10
|
> against. Since then rows 1–9, 11, 12, 23, 30, 34, 40 and the Cas-family half of row 20 have shipped
|
|
11
11
|
> (row 9, duplex thermodynamics, shipped as `molbio_duplex_thermo` in 0.27.0).
|
|
12
12
|
> (see [history.md](history.md) and the roadmap); the remaining rows are still candidates unless
|
package/docs/client-panel.md
CHANGED
|
@@ -51,7 +51,7 @@ SVG 随 meta 传输有上限(256 KB):真实载体的图谱 20-60 KB,但
|
|
|
51
51
|
| `build/panel-core.mjs` | 面板的数据通路(分类/解码/解析/渲染/文献库投影),不含 React,可在 Node 里单测 |
|
|
52
52
|
| `build/client-entry.mjs` | 浏览器半本体:两个 tab 类型的注册、正文、标题 chip,两个 map 工具与两个 figure 工具的调用卡,以及插件详情页的 key 配置段 |
|
|
53
53
|
| `lib/client.js` | **构建产物**(`exports["./client"]` 指向它;由 `npm run build:client` 生成) |
|
|
54
|
-
| `packages/molbio-panel/` | 面板专用包(宿主半边空实现),面板与
|
|
54
|
+
| `packages/molbio-panel/` | 面板专用包(宿主半边空实现),面板与 72 个工具解耦的交付通道 |
|
|
55
55
|
| `test/client.mjs` | 按加载器的方式执行产物 + 驱动两条数据通路(含真实 pUC118 夹具) |
|
|
56
56
|
| `test/map-card.mjs` | 调用卡的**跨界**检查:地图卡与图形卡(logo/gRNA)的真实投影 → 卡片读取 → 渲染出 SVG(含降级、超限、坏 meta 路径) |
|
|
57
57
|
| `test/client-mount.mjs` | 复刻宿主侧图扫描,证明两个包都能挂上、依赖可解析 |
|
|
@@ -245,7 +245,7 @@ dsh plugin --profile <profile> add dsh-molbio-tools # 或 npm 包
|
|
|
245
245
|
`/plugins/dsh-molbio-tools/client.js?rev=<hash>` → 页面刷新时按需拉取、物化、执行
|
|
246
246
|
`apply`。**不需要重建 Web 应用**(这正是客户端模块体系的设计目的)。
|
|
247
247
|
|
|
248
|
-
与 preset 渠道共存时:preset 提供
|
|
248
|
+
与 preset 渠道共存时:preset 提供 72 个工具,bundle 提供面板;同名工具由 preset 层
|
|
249
249
|
shadow(无冲突),面板的 `remote`/`slot` 服务不受影响。
|
|
250
250
|
|
|
251
251
|
## 7. 下一步
|
package/docs/history.md
CHANGED
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
| 包版本 | preset 版本 | 内容 | 工具数 |
|
|
18
18
|
| --- | --- | --- | --- |
|
|
19
|
+
| 0.28.0 | — | **蛋白注释 + 格式互操作 + 测序判读**:新增 `molbio_protein_features` / `molbio_signal_peptide` / `molbio_antigenicity`(#13/#21/#14)、`molbio_feature_export` / `molbio_sequence_edit`(#10)、`molbio_sanger_assemble` / `molbio_editing_outcome`(#27/#31);GFF3 与 BED 两套坐标各自显式转换,编辑结果频率明确不是 TIDE | 65 → 72 |
|
|
19
20
|
| 0.27.1 | — | **DSH 0.2.3-alpha.2 适配**:上游 `standard` 两处变更(新增 `tool-cordis`、`tool-plugin-manager` 改条件禁用);面板改读 `workingDirectory` projection(`selectSessionDirectory`,旧版回退 `cwd`);守卫改用 Include 的 `parseEntryYaml`;工具数不变 | 65 |
|
|
20
21
|
| 0.27.0 | — | **双链热力学(survey #9)**:新增 `molbio_duplex_thermo`(ΔH/ΔS/ΔG°37/Tm + 3' 端稳定性、发夹、二聚体;错配双链拒绝估算);NN 计算提成可复用函数;工具 64 → 65,benchmark 66 题(65/65 覆盖) | 65 |
|
|
21
22
|
| 0.26.0 | — | **PubMed key 常驻标志**:Papers tab 顶部 key 状态徽标(绿/灰/红点,跟随凭据事件刷新)、检索结果标注凭据通道、详情页状态改徽标;工具数不变 | 64 |
|
|
@@ -57,6 +58,52 @@
|
|
|
57
58
|
|
|
58
59
|
---
|
|
59
60
|
|
|
61
|
+
## v0.28.0(2026-11-26,包 0.28.0)
|
|
62
|
+
|
|
63
|
+
三条候选线一次交付:蛋白注释、注释格式/序列编辑、Sanger 读段判读。没有上游可跟(`0.2.3-alpha.2`
|
|
64
|
+
仍是 npm `alpha` 的最新),所以这一版全部是工具行为,preset 行清单与 `dshReleases` 都没有改。
|
|
65
|
+
|
|
66
|
+
### 三条边界是这一版真正的设计工作
|
|
67
|
+
|
|
68
|
+
- **大表只从可复核的来源转录。** DIWV(400 个数)、Parker/Emini/Vihinen、Kolaskar–Tongaonkar
|
|
69
|
+
A(p)、两套 von Heijne 计数表全部抄自 Biopython 1.88 与 EMBOSS 6.6.0 的**数据文件**,并在源码
|
|
70
|
+
注释里写明出处;测试用手算值钉住(`AAAA` → 7.5、20×A → A(p) 区间 4-17、胰岛素原切割位点 24)。
|
|
71
|
+
抄错一个数不会报错,只会给出“看起来合理”的错答案——所以表的来源必须可追溯,而不是“记得是这样”。
|
|
72
|
+
- **信号肽只扫 N 端 50 个残基。** 第一版沿用 EMBOSS sigcleave 的“全序列扫描”,绿色荧光蛋白片段
|
|
73
|
+
在残基 70 处拿到 4.787 分,被判成有信号肽。信号肽是 N 端特征,因此扫描范围本身就是一个参数
|
|
74
|
+
(`max_cleavage`),默认 50;阴性对照随之写进 smoke(同一片段现在不报)。
|
|
75
|
+
- **编辑结果的移码用净长度变化判定,不用单个 indel 的长度。** 一个 3 bp 缺失会被局部比对拆成
|
|
76
|
+
“删 2 + 删 1”两段,逐段判 %3 会误报 frameshift;而同一段序列又确实是从第 3 位到第 6 位少 3 个碱基。
|
|
77
|
+
改成比较突变 CDS 与参考 CDS 的**净长度差**后,判定与生物学一致。
|
|
78
|
+
|
|
79
|
+
### benchmark 抓到的第一条可用性问题
|
|
80
|
+
|
|
81
|
+
`editing-outcome` 的首次真实模型跑(2026-11-26)花了 **10 次工具调用 / 107 s**:模型先把 96 bp 参考
|
|
82
|
+
抄成了 93 bp 的 read(于是 3 条 read 看起来都带 3 bp 缺失),随后逐条单 read 重跑、用 `pwsh` 核对长度、
|
|
83
|
+
再用 `translate` 复核蛋白效应,最后才用正确的输入一次成功。三项判分一直是过的——它暴露的是**可用性**,
|
|
84
|
+
不是正确性。
|
|
85
|
+
|
|
86
|
+
据此做了两件事:
|
|
87
|
+
|
|
88
|
+
1. 工具描述写明**一次调用传全部 reads**、`reference` 是**完整分子**(不是 CDS,也不是其中一条 read)、
|
|
89
|
+
`cds_start/end` 是参考上的坐标,并明确“结果已带蛋白效应,不要再用 shell/translate 重算”。
|
|
90
|
+
2. 结果在**没有任何 read 与参考完全一致**时加一条诊断:这可能是全编辑样本(合法),也可能是参考抄错
|
|
91
|
+
(本 case)。措辞是“检查”,不是报错。
|
|
92
|
+
|
|
93
|
+
同题重跑:**27 s / 4 次调用 / 180,845 tokens,仍 PASS**。`translate` 与 `pwsh` 仍各出现一次(模型想
|
|
94
|
+
自己核对蛋白与长度),但不再逐条重试;进一步的空间在“让结果直接给出突变后蛋白”,而不是继续加描述。
|
|
95
|
+
|
|
96
|
+
### 两个“看起来能用、其实会误收”的输入边界
|
|
97
|
+
|
|
98
|
+
- `molbio_editing_outcome` 最初只按 identity 过滤,一段 60 nt 的纯 C 读段能在参考里找到一小段
|
|
99
|
+
100% 相同的局部比对,于是被收成 wild type 等位基因。现在还必须**至少比对到读长的一半(最少 20 bp)**。
|
|
100
|
+
- `molbio_feature_export` 的 strand 来自解析器的 `1/-1`,而 GFF3/BED 要 `+/-/.`;silver bullet 是
|
|
101
|
+
smoke 里一条 `CDS\t2\t6\t.\t+` 断言——它第一次运行就抓到了 `.`。
|
|
102
|
+
|
|
103
|
+
### 与 benchmark 的关系
|
|
104
|
+
|
|
105
|
+
七条新任务全部带 `where: "tool"` 断言,`bench --offline` 是零成本门;`--changed` 在沙箱内读不到
|
|
106
|
+
git(管道捕获被拒),会回落全量,这是沙箱边界而不是回归。发布守卫的 npm 版本探测同样如此(0.28.0 验收时在沙箱外实跑:`release` 13/13、`preflight` 通过)。
|
|
60
107
|
## v0.25.0(2026-11-10,包 0.25.0)
|
|
61
108
|
|
|
62
109
|
**三条教训,关于“看得见”“同一份源码”和“产物真的能跑”。**
|
package/docs/maintainer.md
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
| [benchmark/README.md](../benchmark/README.md) | 性能/可用性评估:模型能不能找到并用对工具 |
|
|
22
22
|
| [client-panel.md](client-panel.md) | 浏览器内面板:产物格式、服务契约、上限、验证方式、已知限制 |
|
|
23
23
|
| [capability-gap-survey.md](capability-gap-survey.md) | 能力缺口调查:40 条排序候选、必做 top-5、以及"想做但不可行"的确切阻断原因 |
|
|
24
|
-
| [v20-plan.md](v20-plan.md) / [v19-plan.md](v19-plan.md) | 当时的施工设计文档,保留原样以便对照"计划 vs 落地" |
|
|
24
|
+
| [v28-plan.md](v28-plan.md) / [v24-plan.md](v24-plan.md) / [v20-plan.md](v20-plan.md) / [v19-plan.md](v19-plan.md) | 当时的施工设计文档,保留原样以便对照"计划 vs 落地"(v28 在第 9 节记录偏差) |
|
|
25
25
|
| [route-b.md](route-b.md) | 安装渠道 B 的历史记录(0.1.7-alpha.1 起该渠道已废弃) |
|
|
26
26
|
| [client-pipeline-exploration.md](client-pipeline-exploration.md) | 浏览器内面板的可行性与实现路径调研 |
|
|
27
27
|
| [CHANGELOG.md](../CHANGELOG.md) | 变更日志(包版本 ↔ 历史 preset 版本目录对照) |
|
|
@@ -30,13 +30,13 @@
|
|
|
30
30
|
|
|
31
31
|
## 60 秒速览
|
|
32
32
|
|
|
33
|
-
- **包**:`dsh-molbio-tools`,零依赖 DSH 插件包,**
|
|
33
|
+
- **包**:`dsh-molbio-tools`,零依赖 DSH 插件包,**72 个 `molbio_*` 工具**(其中
|
|
34
34
|
`molbio_plot` 一个工具承载 8 种图表)。
|
|
35
|
-
- **基线**:DSH **0.2.3-alpha.2**;`package.json` 版本 0.
|
|
35
|
+
- **基线**:DSH **0.2.3-alpha.2**;`package.json` 版本 0.28.0(DSH 桌面版内嵌 Node 24.22.3 / Electron 44.11.5)。
|
|
36
36
|
- **两条分发渠道**:根包(工具 + 面板)与 `packages/molbio-panel`(只面板),
|
|
37
37
|
**两个独立的 npm 条目、两条独立的版本线**,必须分别发布。
|
|
38
38
|
- **工具只在专属模式里出现**(设计如此):bundle 的 `cordis.patch.yml` 只插一行**惰性宿主锚点**
|
|
39
|
-
(`molbio-client` → `./host.mjs`),
|
|
39
|
+
(`molbio-client` → `./host.mjs`),72 个工具由同文件里的 preset insert 承载,
|
|
40
40
|
只会挂进 "Molecular Biology Lab" 模式。
|
|
41
41
|
- **测试**:`npm test` = 插件(`smoke`)+ 画面(`svgpng`/`svgio`/`charts`)+ 客户端四套件 +
|
|
42
42
|
DSH 契约(`contract`)+ 组合(`preset-health`)+ 漂移守卫(`drift-probe`)+
|
|
@@ -45,14 +45,14 @@
|
|
|
45
45
|
`build/release-preflight.mjs`,然后用 **OIDC 可信发布**(仓库里没有任何长期 token)分两步发
|
|
46
46
|
两个 npm 条目,最后用 CHANGELOG 该版本段落建 GitHub Release。**首次发布必须手动做一次**
|
|
47
47
|
(可信发布要求包已存在),完整步骤见 [workflow.md](workflow.md) 第 4 节的 CD 段。
|
|
48
|
-
- **benchmark**:`npm run bench` 用真实模型跑 core 档 14 题(`bench:full` 全部
|
|
48
|
+
- **benchmark**:`npm run bench` 用真实模型跑 core 档 14 题(`bench:full` 全部 73 题),分
|
|
49
49
|
`tools_ok` / `args_ok` / `answer_ok` 三项判分;`npm run bench:offline` 零成本校验期望值。
|
|
50
50
|
|
|
51
51
|
包内目录结构:
|
|
52
52
|
|
|
53
53
|
```
|
|
54
54
|
dsh-molbio-tools/
|
|
55
|
-
├── index.mjs # 插件入口:export { name, inject, apply },注册
|
|
55
|
+
├── index.mjs # 插件入口:export { name, inject, apply },注册 72 个工具
|
|
56
56
|
├── lib.mjs # 基础库:IUPAC、翻译、酶表、NN 热力学、qPCR、lab math、甲基化/buffer 参考表
|
|
57
57
|
├── design.mjs # 引物自动设计(含跨内含子 qPCR)
|
|
58
58
|
├── taqman.mjs # TaqMan 水解探针设计(复用 design.mjs 的引物引擎)
|
|
@@ -61,6 +61,9 @@ dsh-molbio-tools/
|
|
|
61
61
|
├── protein.mjs # 蛋白性质 / 肽段酶切 / 密码子优化
|
|
62
62
|
├── protein-structure.mjs # 螺旋轮与疏水性图
|
|
63
63
|
├── protein-charge.mjs # 电荷-pH 滴定曲线 + pI(两套 pK 表)
|
|
64
|
+
├── protein-annotate.mjs # 蛋白注释:PTM/低复杂度/不稳定指数、信号肽与跨膜段、抗原性
|
|
65
|
+
├── sequence-ops.mjs # 注释导出(GFF3/BED/CSV)与序列编辑(rotate/insert/delete/replace/split/join)
|
|
66
|
+
├── sequencing.mjs # Sanger 读段组装与编辑结果归类
|
|
64
67
|
├── contamination.mjs # 内置载体/接头短签名 + 双链污染筛查
|
|
65
68
|
├── fastq-trim.mjs # FASTQ 修剪/过滤(质量/接头/引物/poly/N/长度)
|
|
66
69
|
├── genbank.mjs # GenBank flatfile 解析器
|
package/docs/roadmap.md
CHANGED
|
@@ -10,9 +10,10 @@ L = 需要新机制或外部资源)。
|
|
|
10
10
|
|
|
11
11
|
---
|
|
12
12
|
|
|
13
|
-
## 1. 当前状态(0.
|
|
13
|
+
## 1. 当前状态(0.28.0)
|
|
14
14
|
|
|
15
|
-
-
|
|
15
|
+
- 72 个 `molbio_*` 工具,零依赖,随 preset 分发(见 [README](../README.md))。
|
|
16
|
+
- **0.28.0 交付 survey #13 / #21 / #14 / #10 / #27 / #31**:蛋白注释(PTM/低复杂度/不稳定指数、von Heijne 信号肽与跨膜段、Kolaskar-Tongaonkar 抗原性)、注释导出(GFF3/BED/CSV)与序列编辑、Sanger 读段组装与编辑结果归类。工具 65 → 72,benchmark 66 → 73;面板产物未变(三个新模块只在宿主半)。
|
|
16
17
|
- **0.27.0 交付 survey #9 双链热力学**:新增 `molbio_duplex_thermo` —— ΔH/ΔS(原始与盐校正)/ΔG°37/Tm,外加 3' 端稳定性、发夹与同源/异源二聚体;`partner` 不是精确反向互补时**拒绝估算**(Allawi 错配参数集未实现)。工具 64 → 65。
|
|
17
18
|
- PubMed API key 在 **Papers** tab 顶部有常驻状态徽标(已配置/未配置/不可读),检索结果也标注凭据通道。
|
|
18
19
|
- 离线测试金字塔 + 组合漂移守卫全绿;`benchmark/` 提供**模型使用**维度的评估
|
|
@@ -218,6 +219,27 @@ v16 的 CRISPR 已有订购 CSV 先例,可直接复用格式。
|
|
|
218
219
|
会"看起来合理但差几 kcal/mol"。DMSO/甲酰胺同样没有建模,文档里写明。工具 64 → 65,
|
|
219
220
|
benchmark 65 → 66 题(65/65 覆盖)。
|
|
220
221
|
|
|
222
|
+
### 2.12 ✅ 已做(0.28.0)蛋白注释 / 格式互操作 / 测序判读
|
|
223
|
+
|
|
224
|
+
一次交付 survey 的六条候选:
|
|
225
|
+
|
|
226
|
+
- **#13 蛋白特征**(`molbio_protein_features`):PTM 线性基序、SEG 风格熵窗口低复杂度、芳香性、
|
|
227
|
+
Guruprasad 不稳定指数。大表(DIWV 20×20)转录自 Biopython 1.88,用手算值钉住。
|
|
228
|
+
- **#21 信号肽与跨膜段**(`molbio_signal_peptide`):von Heijne 1986 的 −13..+2 权重(EMBOSS
|
|
229
|
+
sigcleave 的真核/革兰阴性两套),只扫 N 端前 50 个残基;跨膜段复用 hydropathy 的窗口/阈值,
|
|
230
|
+
所以两个工具不会给出两套数。**第一版全序列扫描把 GFP 片段误判成信号肽**——N 端范围本身是参数。
|
|
231
|
+
- **#14 抗原性**(`molbio_antigenicity`):Kolaskar–Tongaonkar 7-mer A(p) 倾向;Parker/Emini/
|
|
232
|
+
Vihinen 只作区间均值并列,不合成单一分数。
|
|
233
|
+
- **#10 注释导出与序列编辑**(`molbio_feature_export` / `molbio_sequence_edit`):GFF3 1-based
|
|
234
|
+
闭区间与 BED 0-based 半开逐格式转换并写明;CDS phase 不建模,写 `.`;编辑不重映射特征。
|
|
235
|
+
- **#27 Sanger 组装**(`molbio_sanger_assemble`):贪心 OLC、双朝向、Phred 末端修剪、质量加权共识、
|
|
236
|
+
覆盖度/冲突/未放置读、可选精确环化。
|
|
237
|
+
- **#31 编辑结果归类**(`molbio_editing_outcome`):精确变异签名聚类,频率是已比对 reads 的比例,
|
|
238
|
+
不是 TIDE;移码用净长度变化判定(被比对拆开的 3 bp 缺失仍判 in-frame);短局部匹配不算比对。
|
|
239
|
+
|
|
240
|
+
**这一版留下的两条新规则**:①发表表格的转录必须给出处,并用可手算的已知值钉住;
|
|
241
|
+
②任何“是否算比对成功”的判据,除 identity 之外还要有**跨度**下界(这里是读长一半、最少 20 bp)。
|
|
242
|
+
|
|
221
243
|
---
|
|
222
244
|
|
|
223
245
|
## 3. 技术债(明确的"欠着")
|
|
@@ -236,7 +258,7 @@ v18 想做"工具写一个工作区 PNG 文件"而**不能**:`dsh-fs` 明文
|
|
|
236
258
|
|
|
237
259
|
### 3.2 benchmark 的覆盖面
|
|
238
260
|
|
|
239
|
-
-
|
|
261
|
+
- 73 条任务覆盖 **72/72 个工具**(0.15.0 起由 `test/benchmark-coverage.mjs` 机器断言;
|
|
240
262
|
core 档 14 题)。**但多数工具只出现在一条任务里,覆盖是浅的**——见
|
|
241
263
|
[benchmark/README.md](../benchmark/README.md) 的"What this benchmark does NOT measure"。
|
|
242
264
|
- 没有断言 **`attach_image` 交付的图片内容**(只当参数用),也不加载客户端产物。
|
|
@@ -336,7 +358,7 @@ Node 做路径运算(Windows 是 `<prefix>/node_modules`,POSIX 是 `<prefix>
|
|
|
336
358
|
- **agent 驱动浏览器终端**:无 `dsh-tool-terminal`,且面板明确不把输出转给模型。
|
|
337
359
|
`ctx.computerUse`/`ctx.browserUse` 这类 seam 只允许**一个** provider 注册,
|
|
338
360
|
第三方插件即便在未来版本也不能自带一个并行实现去抢。
|
|
339
|
-
- **把
|
|
361
|
+
- **把 72 个工具做成全局可见**:bundle 安装 ≠ 工具全局可见是**设计如此**(工具多了会占
|
|
340
362
|
提示预算)。真要全局可见需要自己加一层宿主行,而那会让专属模式里的同一行变成死行。
|
|
341
363
|
- **持久 shell 进 preset**:收益有限、风险明确(工具名冲突要 disable 一次性那行,
|
|
342
364
|
且需要未经验证的 `isolate: { terminals: true }` 分组),详见
|
package/docs/rules.md
CHANGED
|
@@ -217,3 +217,27 @@ ctx.effect(() => ctx.slots.inject(座位, () => ctx.slots.register({name: 座位
|
|
|
217
217
|
出处:0.1.6-alpha.1 的旧 drift 检查只比 id、对真故障只打印 note 并退出 0;
|
|
218
218
|
`contract.mjs` 曾把断言绑在 minifier 的空格上,放宽成"不绑格式"时如果没有自检,
|
|
219
219
|
下一次修改就会退化成"什么都不检查"。
|
|
220
|
+
---
|
|
221
|
+
|
|
222
|
+
## 10. 提示面是受测产物(预算 / 覆盖 / 去重)
|
|
223
|
+
|
|
224
|
+
`ctx.systemPrompt.section` 那一段,加上 72 条工具 `description`,随**每个请求**发送;
|
|
225
|
+
模型决定“调哪个工具”时读到的就是它们。它们和产物一样有预算、也会腐坏,所以由
|
|
226
|
+
`test/prompt.mjs` 看守五条不变量:
|
|
227
|
+
|
|
228
|
+
1. **预算**:段落 ≤ 6000 字符(0.28.0 实测 11,185,重排后 5,708);
|
|
229
|
+
2. **行宽**:单行 ≤ 400 字符(旧段落最长 1,408,禁令埋在千字符单行里没人读得到);
|
|
230
|
+
3. **无版本标记**:模型可见文本不写 `(v19)` / `(v0.28)`——版本史属于 CHANGELOG;
|
|
231
|
+
4. **覆盖**:每个已注册工具都必须在这段里被点名,反向也查:不许点名不存在的工具;
|
|
232
|
+
5. **去重**:段落与任一工具描述不得有 ≥60 字符逐字重合——一条规则只能有一个归属地。
|
|
233
|
+
|
|
234
|
+
分工是硬约定:**描述**说“这是什么 / 参数什么意思 / 用哪个模型”,**段落**说“什么时候用 /
|
|
235
|
+
跨工具纪律 / 共同约定”。想让模型照做,写进规则段并编号,别塞进描述句末。
|
|
236
|
+
|
|
237
|
+
按规则 9,`test/prompt.mjs` 自带五个突变实验:删一个工具名、塞一个 `(v19)`、抄一段描述、
|
|
238
|
+
拉长一行、撑爆预算——五种改动都必须被它抓红。
|
|
239
|
+
|
|
240
|
+
出处:0.28.0 的 editing-outcome 基准题跑出 10 次调用(5×`editing_outcome` + 2×`translate` +
|
|
241
|
+
1×`pwsh`),而该工具描述早已写着“不要用 translate / shell 重算”——1,067 字符单行末尾的禁令
|
|
242
|
+
没有生效;同一时期 `molbio_protein_charge`、`molbio_dotplot`、`molbio_alignment_postprocess`
|
|
243
|
+
三个工具从未在段落里出现。
|