@researai/deepscientist 1.5.0 → 1.5.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.
Files changed (163) hide show
  1. package/AGENTS.md +26 -0
  2. package/README.md +19 -179
  3. package/assets/connectors/lingzhu/openclaw-bridge/README.md +124 -0
  4. package/assets/connectors/lingzhu/openclaw-bridge/index.ts +162 -0
  5. package/assets/connectors/lingzhu/openclaw-bridge/openclaw.plugin.json +145 -0
  6. package/assets/connectors/lingzhu/openclaw-bridge/package.json +35 -0
  7. package/assets/connectors/lingzhu/openclaw-bridge/src/cli.ts +180 -0
  8. package/assets/connectors/lingzhu/openclaw-bridge/src/config.ts +196 -0
  9. package/assets/connectors/lingzhu/openclaw-bridge/src/debug-log.ts +111 -0
  10. package/assets/connectors/lingzhu/openclaw-bridge/src/events.ts +4 -0
  11. package/assets/connectors/lingzhu/openclaw-bridge/src/http-handler.ts +1133 -0
  12. package/assets/connectors/lingzhu/openclaw-bridge/src/image-cache.ts +75 -0
  13. package/assets/connectors/lingzhu/openclaw-bridge/src/lingzhu-tools.ts +246 -0
  14. package/assets/connectors/lingzhu/openclaw-bridge/src/transform.ts +541 -0
  15. package/assets/connectors/lingzhu/openclaw-bridge/src/types.ts +131 -0
  16. package/assets/connectors/lingzhu/openclaw-bridge/tsconfig.json +14 -0
  17. package/assets/connectors/lingzhu/openclaw.lingzhu.config.template.json +39 -0
  18. package/bin/ds.js +233 -53
  19. package/docs/en/00_QUICK_START.md +134 -0
  20. package/docs/en/01_SETTINGS_REFERENCE.md +1104 -0
  21. package/docs/en/02_START_RESEARCH_GUIDE.md +404 -0
  22. package/docs/en/03_QQ_CONNECTOR_GUIDE.md +325 -0
  23. package/docs/en/04_LINGZHU_CONNECTOR_GUIDE.md +216 -0
  24. package/docs/en/05_TUI_GUIDE.md +141 -0
  25. package/docs/en/06_RUNTIME_AND_CANVAS.md +679 -0
  26. package/docs/en/07_MEMORY_AND_MCP.md +253 -0
  27. package/docs/en/08_FIGURE_STYLE_GUIDE.md +97 -0
  28. package/docs/en/09_DOCTOR.md +108 -0
  29. package/docs/en/90_ARCHITECTURE.md +245 -0
  30. package/docs/en/91_DEVELOPMENT.md +195 -0
  31. package/docs/en/99_ACKNOWLEDGEMENTS.md +29 -0
  32. package/docs/zh/00_QUICK_START.md +134 -0
  33. package/docs/zh/01_SETTINGS_REFERENCE.md +1137 -0
  34. package/docs/zh/02_START_RESEARCH_GUIDE.md +414 -0
  35. package/docs/zh/03_QQ_CONNECTOR_GUIDE.md +324 -0
  36. package/docs/zh/04_LINGZHU_CONNECTOR_GUIDE.md +230 -0
  37. package/docs/zh/05_TUI_GUIDE.md +128 -0
  38. package/docs/zh/06_RUNTIME_AND_CANVAS.md +271 -0
  39. package/docs/zh/07_MEMORY_AND_MCP.md +235 -0
  40. package/docs/zh/08_FIGURE_STYLE_GUIDE.md +97 -0
  41. package/docs/zh/09_DOCTOR.md +112 -0
  42. package/docs/zh/99_ACKNOWLEDGEMENTS.md +29 -0
  43. package/install.sh +32 -8
  44. package/package.json +4 -2
  45. package/pyproject.toml +1 -1
  46. package/src/deepscientist/artifact/guidance.py +9 -2
  47. package/src/deepscientist/artifact/service.py +482 -22
  48. package/src/deepscientist/bash_exec/monitor.py +27 -5
  49. package/src/deepscientist/bash_exec/runtime.py +639 -0
  50. package/src/deepscientist/bash_exec/service.py +99 -16
  51. package/src/deepscientist/bridges/base.py +3 -0
  52. package/src/deepscientist/bridges/connectors.py +292 -13
  53. package/src/deepscientist/channels/qq.py +19 -2
  54. package/src/deepscientist/channels/relay.py +1 -0
  55. package/src/deepscientist/cli.py +32 -25
  56. package/src/deepscientist/config/models.py +28 -2
  57. package/src/deepscientist/config/service.py +201 -6
  58. package/src/deepscientist/connector_runtime.py +2 -0
  59. package/src/deepscientist/daemon/api/handlers.py +50 -5
  60. package/src/deepscientist/daemon/api/router.py +1 -0
  61. package/src/deepscientist/daemon/app.py +442 -15
  62. package/src/deepscientist/doctor.py +444 -0
  63. package/src/deepscientist/home.py +1 -0
  64. package/src/deepscientist/latex_runtime.py +17 -4
  65. package/src/deepscientist/lingzhu_support.py +182 -0
  66. package/src/deepscientist/mcp/server.py +49 -2
  67. package/src/deepscientist/prompts/builder.py +181 -58
  68. package/src/deepscientist/quest/layout.py +1 -0
  69. package/src/deepscientist/quest/service.py +63 -2
  70. package/src/deepscientist/quest/stage_views.py +19 -1
  71. package/src/deepscientist/runtime_tools/__init__.py +16 -0
  72. package/src/deepscientist/runtime_tools/builtins.py +19 -0
  73. package/src/deepscientist/runtime_tools/models.py +29 -0
  74. package/src/deepscientist/runtime_tools/registry.py +40 -0
  75. package/src/deepscientist/runtime_tools/service.py +59 -0
  76. package/src/deepscientist/runtime_tools/tinytex.py +25 -0
  77. package/src/deepscientist/tinytex.py +276 -0
  78. package/src/prompts/connectors/lingzhu.md +12 -0
  79. package/src/prompts/connectors/qq.md +121 -0
  80. package/src/prompts/system.md +177 -33
  81. package/src/skills/analysis-campaign/SKILL.md +22 -6
  82. package/src/skills/baseline/SKILL.md +5 -4
  83. package/src/skills/decision/SKILL.md +4 -3
  84. package/src/skills/experiment/SKILL.md +5 -4
  85. package/src/skills/finalize/SKILL.md +5 -4
  86. package/src/skills/idea/SKILL.md +5 -4
  87. package/src/skills/intake-audit/SKILL.md +277 -0
  88. package/src/skills/intake-audit/references/state-audit-template.md +41 -0
  89. package/src/skills/rebuttal/SKILL.md +407 -0
  90. package/src/skills/rebuttal/references/action-plan-template.md +63 -0
  91. package/src/skills/rebuttal/references/evidence-update-template.md +30 -0
  92. package/src/skills/rebuttal/references/response-letter-template.md +113 -0
  93. package/src/skills/rebuttal/references/review-matrix-template.md +55 -0
  94. package/src/skills/review/SKILL.md +293 -0
  95. package/src/skills/review/references/experiment-todo-template.md +29 -0
  96. package/src/skills/review/references/review-report-template.md +83 -0
  97. package/src/skills/review/references/revision-log-template.md +40 -0
  98. package/src/skills/scout/SKILL.md +5 -4
  99. package/src/skills/write/SKILL.md +7 -3
  100. package/src/tui/dist/components/WelcomePanel.js +17 -43
  101. package/src/tui/dist/components/messages/BashExecOperationMessage.js +3 -2
  102. package/src/tui/package.json +1 -1
  103. package/src/ui/dist/assets/{AiManusChatView-7v-dHngU.js → AiManusChatView-w5lF2Ttt.js} +109 -575
  104. package/src/ui/dist/assets/{AnalysisPlugin-B_Xmz-KE.js → AnalysisPlugin-DJOED79I.js} +1 -1
  105. package/src/ui/dist/assets/{AutoFigurePlugin-Cko-0tm1.js → AutoFigurePlugin-DaG61Y0M.js} +63 -8
  106. package/src/ui/dist/assets/{CliPlugin-BsU0ht7q.js → CliPlugin-CV4LqUB_.js} +43 -609
  107. package/src/ui/dist/assets/{CodeEditorPlugin-DcMMP0Rt.js → CodeEditorPlugin-DylfAea4.js} +8 -8
  108. package/src/ui/dist/assets/{CodeViewerPlugin-BqoQ5QyY.js → CodeViewerPlugin-F7saY0LM.js} +5 -5
  109. package/src/ui/dist/assets/{DocViewerPlugin-D7eHNhU6.js → DocViewerPlugin-COP0c7jf.js} +3 -3
  110. package/src/ui/dist/assets/{GitDiffViewerPlugin-DLJN42T5.js → GitDiffViewerPlugin-CAS05pT9.js} +1 -1
  111. package/src/ui/dist/assets/{ImageViewerPlugin-gJMV7MOu.js → ImageViewerPlugin-Bco1CN_w.js} +5 -6
  112. package/src/ui/dist/assets/{LabCopilotPanel-B857sfxP.js → LabCopilotPanel-CvMlCD99.js} +12 -15
  113. package/src/ui/dist/assets/LabPlugin-BYankkE4.js +2676 -0
  114. package/src/ui/dist/assets/LabPlugin-D9jVIo0A.css +2698 -0
  115. package/src/ui/dist/assets/{LatexPlugin-DWKEo-Wj.js → LatexPlugin-LDSMR-t-.js} +16 -16
  116. package/src/ui/dist/assets/{MarkdownViewerPlugin-DBzoEmhv.js → MarkdownViewerPlugin-B7o80jgm.js} +4 -4
  117. package/src/ui/dist/assets/{MarketplacePlugin-DoHc-8vo.js → MarketplacePlugin-CM6ZOcpC.js} +3 -3
  118. package/src/ui/dist/assets/{NotebookEditor-CKjKH-yS.js → NotebookEditor-Dc61cXmK.js} +3 -3
  119. package/src/ui/dist/assets/{PdfLoader-zFoL0VPo.js → PdfLoader-DWowuQwx.js} +1 -1
  120. package/src/ui/dist/assets/{PdfMarkdownPlugin-DXPaL9Nt.js → PdfMarkdownPlugin-BsJM1q_a.js} +3 -3
  121. package/src/ui/dist/assets/{PdfViewerPlugin-DhK8qCFp.js → PdfViewerPlugin-DB2eEEFQ.js} +10 -10
  122. package/src/ui/dist/assets/{SearchPlugin-CdSi6krf.js → SearchPlugin-CraThSvt.js} +1 -1
  123. package/src/ui/dist/assets/{Stepper-V-WiDQJl.js → Stepper-CgocRTPq.js} +1 -1
  124. package/src/ui/dist/assets/{TextViewerPlugin-hIs1Efiu.js → TextViewerPlugin-B1JGhKtd.js} +4 -4
  125. package/src/ui/dist/assets/{VNCViewer-DG8b0q2X.js → VNCViewer-CclFC7FM.js} +9 -10
  126. package/src/ui/dist/assets/{bibtex-HDac6fVW.js → bibtex-D3IKsMl7.js} +1 -1
  127. package/src/ui/dist/assets/{code-BnBeNxBc.js → code-BP37Xx0p.js} +1 -1
  128. package/src/ui/dist/assets/{file-content-IRQ3jHb8.js → file-content-BAJSu-9r.js} +1 -1
  129. package/src/ui/dist/assets/{file-diff-panel-DZoQ9I6r.js → file-diff-panel-DUGeCTuy.js} +1 -1
  130. package/src/ui/dist/assets/{file-socket-BMCdLc-P.js → file-socket-CXc1Ojf7.js} +1 -1
  131. package/src/ui/dist/assets/{file-utils-CltILB3w.js → file-utils-2J21jt7M.js} +1 -1
  132. package/src/ui/dist/assets/{image-Boe6ffhu.js → image-CMMmgvcn.js} +1 -1
  133. package/src/ui/dist/assets/{index-BlplpvE1.js → index-BaVumsQT.js} +2 -2
  134. package/src/ui/dist/assets/{index-DZqJ-qAM.js → index-CWgMgpow.js} +60 -2154
  135. package/src/ui/dist/assets/{index-DO43pFZP.js → index-DmwmJmbW.js} +6372 -8434
  136. package/src/ui/dist/assets/{index-Bq2bvfkl.css → index-KGt-z-dD.css} +225 -2920
  137. package/src/ui/dist/assets/{index-2Zf65FZt.js → index-s7aHnNQ4.js} +1 -1
  138. package/src/ui/dist/assets/{message-square-mUHn_Ssb.js → message-square-CQRfX0Am.js} +1 -1
  139. package/src/ui/dist/assets/{monaco-fe0arNEU.js → monaco-B4TbdsrF.js} +1 -1
  140. package/src/ui/dist/assets/{popover-D_7i19qU.js → popover-B8Rokodk.js} +1 -1
  141. package/src/ui/dist/assets/{project-sync-DyVGrU7H.js → project-sync-D_i96KH4.js} +2 -8
  142. package/src/ui/dist/assets/{sigma-BzazRyxQ.js → sigma-D12PnzCN.js} +1 -1
  143. package/src/ui/dist/assets/{tooltip-DN_yjHFH.js → tooltip-B6YrI4aJ.js} +1 -1
  144. package/src/ui/dist/assets/trash-Bc8jGp0V.js +32 -0
  145. package/src/ui/dist/assets/{useCliAccess-DV2L2Qxy.js → useCliAccess-mXVCYSZ-.js} +12 -42
  146. package/src/ui/dist/assets/{useFileDiffOverlay-DyTj-p_V.js → useFileDiffOverlay-Bg6b9H9K.js} +1 -1
  147. package/src/ui/dist/assets/{wrap-text-ozYHtUwq.js → wrap-text-Drh5GEnL.js} +1 -1
  148. package/src/ui/dist/assets/{zoom-out-BN9MUyCQ.js → zoom-out-CJj9DZLn.js} +1 -1
  149. package/src/ui/dist/index.html +2 -2
  150. package/assets/fonts/Inter-Variable.ttf +0 -0
  151. package/assets/fonts/NotoSerifSC-Regular-C94HN_ZN.ttf +0 -0
  152. package/assets/fonts/NunitoSans-Variable.ttf +0 -0
  153. package/assets/fonts/Satoshi-Medium-ByP-Zb-9.woff2 +0 -0
  154. package/assets/fonts/SourceSans3-Variable.ttf +0 -0
  155. package/assets/fonts/ds-fonts.css +0 -83
  156. package/src/ui/dist/assets/Inter-Variable-VF2RPR_K.ttf +0 -0
  157. package/src/ui/dist/assets/LabPlugin-bL7rpic8.js +0 -43
  158. package/src/ui/dist/assets/NotoSerifSC-Regular-C94HN_ZN-C94HN_ZN.ttf +0 -0
  159. package/src/ui/dist/assets/NunitoSans-Variable-B_ZymHAd.ttf +0 -0
  160. package/src/ui/dist/assets/Satoshi-Medium-ByP-Zb-9-GkA34YXu.woff2 +0 -0
  161. package/src/ui/dist/assets/SourceSans3-Variable-CD-WOsSK.ttf +0 -0
  162. package/src/ui/dist/assets/info-CcsK_htA.js +0 -18
  163. package/src/ui/dist/assets/user-plus-BusDx-hF.js +0 -79
@@ -0,0 +1,404 @@
1
+ # 02 Start Research Guide: Fill the Start Research Contract
2
+
3
+ This page documents the current `Start Research` dialog and the exact startup contract it submits.
4
+
5
+ Implementation sources:
6
+
7
+ - `src/ui/src/lib/startResearch.ts`
8
+ - `src/ui/src/components/projects/CreateProjectDialog.tsx`
9
+
10
+ ## What the dialog does
11
+
12
+ `Start Research` is not only a “new quest” form. It does four things together:
13
+
14
+ 1. collects structured kickoff context
15
+ 2. compiles that context into the first quest prompt
16
+ 3. binds an optional reusable baseline
17
+ 4. persists a structured `startup_contract` for later prompt building
18
+
19
+ ## Current frontend model
20
+
21
+ ### `StartResearchTemplate`
22
+
23
+ ```ts
24
+ type StartResearchTemplate = {
25
+ title: string
26
+ quest_id: string
27
+ goal: string
28
+ baseline_id: string
29
+ baseline_variant_id: string
30
+ baseline_urls: string
31
+ paper_urls: string
32
+ runtime_constraints: string
33
+ objectives: string
34
+ need_research_paper: boolean
35
+ research_intensity: 'light' | 'balanced' | 'sprint'
36
+ decision_policy: 'autonomous' | 'user_gated'
37
+ launch_mode: 'standard' | 'custom'
38
+ custom_profile: 'continue_existing_state' | 'revision_rebuttal' | 'freeform'
39
+ entry_state_summary: string
40
+ review_summary: string
41
+ custom_brief: string
42
+ user_language: 'en' | 'zh'
43
+ }
44
+ ```
45
+
46
+ Important point: `scope`, `baseline_mode`, `resource_policy`, `time_budget_hours`, and `git_strategy` are no longer edited directly in the form. They are derived from `research_intensity` plus whether a reusable baseline is selected.
47
+
48
+ ### Derived contract fields
49
+
50
+ ```ts
51
+ type StartResearchContractFields = {
52
+ scope: 'baseline_only' | 'baseline_plus_direction' | 'full_research'
53
+ baseline_mode:
54
+ | 'existing'
55
+ | 'restore_from_url'
56
+ | 'allow_degraded_minimal_reproduction'
57
+ | 'stop_if_insufficient'
58
+ resource_policy: 'conservative' | 'balanced' | 'aggressive'
59
+ time_budget_hours: string
60
+ git_strategy:
61
+ | 'branch_per_analysis_then_paper'
62
+ | 'semantic_head_plus_controlled_integration'
63
+ | 'manual_integration_only'
64
+ }
65
+ ```
66
+
67
+ Resolution logic lives in `resolveStartResearchContractFields(...)`.
68
+
69
+ ## Backend payload
70
+
71
+ The dialog submits:
72
+
73
+ ```ts
74
+ {
75
+ title,
76
+ goal: compiled_prompt,
77
+ quest_id,
78
+ requested_baseline_ref: {
79
+ baseline_id,
80
+ variant_id
81
+ } | null,
82
+ startup_contract: {
83
+ schema_version: 3,
84
+ user_language,
85
+ need_research_paper,
86
+ research_intensity,
87
+ decision_policy,
88
+ launch_mode,
89
+ custom_profile,
90
+ scope,
91
+ baseline_mode,
92
+ resource_policy,
93
+ time_budget_hours,
94
+ git_strategy,
95
+ runtime_constraints,
96
+ objectives: string[],
97
+ baseline_urls: string[],
98
+ paper_urls: string[],
99
+ entry_state_summary,
100
+ review_summary,
101
+ custom_brief,
102
+ }
103
+ }
104
+ ```
105
+
106
+ ## Field reference
107
+
108
+ ### Core quest identity
109
+
110
+ **`title`**
111
+
112
+ - Human-readable quest title.
113
+ - Used in cards and workspace headers.
114
+ - Does not need to equal `quest_id`.
115
+
116
+ **`quest_id`**
117
+
118
+ - Stable quest identifier and directory name.
119
+ - By default the runtime suggests the next sequential id.
120
+ - Manual override is allowed.
121
+
122
+ **`goal`**
123
+
124
+ - Main scientific request.
125
+ - This becomes the central body of the compiled kickoff prompt.
126
+ - Good input: scientific question, target, success condition, boundary.
127
+ - Bad input: low-level implementation instructions with no research framing.
128
+
129
+ **`user_language`**
130
+
131
+ - Declares the preferred user-facing language for kickoff and later interaction.
132
+
133
+ ### Baseline and references
134
+
135
+ **`baseline_id`**
136
+
137
+ - Selects a reusable baseline from the registry.
138
+ - When present, derived `baseline_mode` becomes `existing`.
139
+ - Runtime should attach and verify this baseline before ordinary downstream work.
140
+
141
+ **`baseline_variant_id`**
142
+
143
+ - Optional variant selector inside a baseline entry.
144
+
145
+ **`baseline_urls`**
146
+
147
+ - Fallback source links when there is no registered reusable baseline.
148
+ - Submitted as `string[]`.
149
+
150
+ **`paper_urls`**
151
+
152
+ - Papers, repos, benchmarks, or leaderboards that shape early scouting.
153
+ - Submitted as `string[]`.
154
+
155
+ ### Constraints and objectives
156
+
157
+ **`runtime_constraints`**
158
+
159
+ - Hard constraints such as budget, hardware, privacy, storage, or deadlines.
160
+
161
+ **`objectives`**
162
+
163
+ - One goal per line.
164
+ - Submitted as `string[]`.
165
+ - This should state the next meaningful outcomes, not generic aspirations.
166
+
167
+ **`need_research_paper`**
168
+
169
+ - `true`: the quest should keep going through analysis and writing readiness.
170
+ - `false`: optimize for the strongest justified algorithmic result and avoid default paper routing.
171
+
172
+ ### High-level control knobs
173
+
174
+ **`research_intensity`**
175
+
176
+ - `light`
177
+ - derived contract: baseline-only, conservative, 8h, manual integration
178
+ - `balanced`
179
+ - derived contract: baseline-plus-direction, balanced, 24h, controlled integration
180
+ - `sprint`
181
+ - derived contract: full research, aggressive, 48h, branch-per-analysis
182
+
183
+ This is the main public knob for round depth.
184
+
185
+ **`decision_policy`**
186
+
187
+ - `autonomous`
188
+ - the agent should keep choosing ordinary routes on its own
189
+ - `user_gated`
190
+ - the agent may raise a blocking decision only when continuation truly depends on the user
191
+
192
+ ### Launch mode
193
+
194
+ **`launch_mode`**
195
+
196
+ - `standard`
197
+ - start from the ordinary canonical research loop
198
+ - `custom`
199
+ - do not assume a blank-slate launch; use the extra custom-entry fields
200
+
201
+ **`custom_profile`**
202
+
203
+ Only meaningful when `launch_mode = custom`.
204
+
205
+ - `continue_existing_state`
206
+ - start by auditing existing baselines, results, drafts, or mixed quest assets
207
+ - prompt builder should steer the agent toward `intake-audit`
208
+ - `revision_rebuttal`
209
+ - start from reviewer comments, revision packets, or a rebuttal task
210
+ - prompt builder should steer the agent toward `rebuttal`
211
+ - `freeform`
212
+ - follow a custom brief with minimal forced workflow assumptions
213
+
214
+ **`entry_state_summary`**
215
+
216
+ - Plain-language summary of what already exists.
217
+ - Typical content:
218
+ - trusted baseline exists
219
+ - main run already finished
220
+ - partial draft already exists
221
+ - supplementary figures already exist
222
+
223
+ **`review_summary`**
224
+
225
+ - Only meaningful for review-driven work.
226
+ - Summarizes reviewer requests, revision demands, or meta-review constraints.
227
+
228
+ **`custom_brief`**
229
+
230
+ - Extra launch-time instruction that can narrow or override the default blank-slate full-research path.
231
+
232
+ ## Derived contract mapping
233
+
234
+ Current preset mapping:
235
+
236
+ | `research_intensity` | `scope` | `baseline_mode` | `resource_policy` | `time_budget_hours` | `git_strategy` |
237
+ |---|---|---|---|---:|---|
238
+ | `light` | `baseline_only` | `stop_if_insufficient` | `conservative` | `8` | `manual_integration_only` |
239
+ | `balanced` | `baseline_plus_direction` | `restore_from_url` | `balanced` | `24` | `semantic_head_plus_controlled_integration` |
240
+ | `sprint` | `full_research` | `allow_degraded_minimal_reproduction` | `aggressive` | `48` | `branch_per_analysis_then_paper` |
241
+
242
+ Override rule:
243
+
244
+ - if `baseline_id` is selected, derived `baseline_mode` becomes `existing`
245
+
246
+ ## Prompt compilation behavior
247
+
248
+ `compileStartResearchPrompt(...)` writes a human-readable kickoff prompt containing:
249
+
250
+ - quest bootstrap
251
+ - primary research request
252
+ - research goals
253
+ - baseline context
254
+ - reference papers / repositories
255
+ - operational constraints
256
+ - research delivery mode
257
+ - decision handling mode
258
+ - launch mode
259
+ - research contract
260
+ - mandatory working rules
261
+
262
+ Custom launch behavior is explicit:
263
+
264
+ - `standard`
265
+ - tells the agent to use the ordinary research graph
266
+ - `custom + continue_existing_state`
267
+ - tells the agent to audit and normalize existing assets first
268
+ - explicitly prefers `intake-audit`
269
+ - `custom + revision_rebuttal`
270
+ - tells the agent to interpret reviewer comments and current paper state first
271
+ - explicitly prefers `rebuttal`
272
+ - `custom + freeform`
273
+ - tells the agent to follow the custom brief and open only the necessary skills
274
+
275
+ ## Example payloads
276
+
277
+ ### Standard launch
278
+
279
+ ```json
280
+ {
281
+ "title": "Sparse adapter robustness",
282
+ "goal": "Investigate whether sparse routing improves robustness without hurting compute efficiency.",
283
+ "quest_id": "012",
284
+ "requested_baseline_ref": {
285
+ "baseline_id": "adapter-baseline",
286
+ "variant_id": "default"
287
+ },
288
+ "startup_contract": {
289
+ "schema_version": 3,
290
+ "user_language": "en",
291
+ "need_research_paper": true,
292
+ "research_intensity": "balanced",
293
+ "decision_policy": "autonomous",
294
+ "launch_mode": "standard",
295
+ "custom_profile": "freeform",
296
+ "scope": "baseline_plus_direction",
297
+ "baseline_mode": "existing",
298
+ "resource_policy": "balanced",
299
+ "time_budget_hours": 24,
300
+ "git_strategy": "semantic_head_plus_controlled_integration",
301
+ "runtime_constraints": "One 24 GB GPU. Keep data local.",
302
+ "objectives": [
303
+ "verify the reusable baseline",
304
+ "test one justified sparse-routing direction"
305
+ ],
306
+ "baseline_urls": [],
307
+ "paper_urls": [
308
+ "https://arxiv.org/abs/2401.00001"
309
+ ],
310
+ "entry_state_summary": "",
311
+ "review_summary": "",
312
+ "custom_brief": ""
313
+ }
314
+ }
315
+ ```
316
+
317
+ ### Custom launch: continue existing state
318
+
319
+ ```json
320
+ {
321
+ "title": "Continue retrieval quest",
322
+ "goal": "Continue the existing retrieval quest and decide whether a fresh main run is still needed.",
323
+ "quest_id": "013",
324
+ "requested_baseline_ref": null,
325
+ "startup_contract": {
326
+ "schema_version": 3,
327
+ "user_language": "en",
328
+ "need_research_paper": true,
329
+ "research_intensity": "light",
330
+ "decision_policy": "autonomous",
331
+ "launch_mode": "custom",
332
+ "custom_profile": "continue_existing_state",
333
+ "scope": "baseline_only",
334
+ "baseline_mode": "stop_if_insufficient",
335
+ "resource_policy": "conservative",
336
+ "time_budget_hours": 8,
337
+ "git_strategy": "manual_integration_only",
338
+ "runtime_constraints": "Do not rerun expensive full-corpus indexing unless evidence says the old run is unusable.",
339
+ "objectives": [
340
+ "normalize current evidence",
341
+ "decide whether a new run is actually required"
342
+ ],
343
+ "baseline_urls": [],
344
+ "paper_urls": [],
345
+ "entry_state_summary": "Trusted baseline exists. One main run finished. Draft intro and method already exist.",
346
+ "review_summary": "",
347
+ "custom_brief": "Audit first. Only rerun if current metrics or artifacts are inconsistent."
348
+ }
349
+ }
350
+ ```
351
+
352
+ ### Custom launch: revision / rebuttal
353
+
354
+ ```json
355
+ {
356
+ "title": "Camera-ready revision",
357
+ "goal": "Address reviewer requests, add only the missing evidence, and revise the manuscript cleanly.",
358
+ "quest_id": "014",
359
+ "requested_baseline_ref": null,
360
+ "startup_contract": {
361
+ "schema_version": 3,
362
+ "user_language": "en",
363
+ "need_research_paper": true,
364
+ "research_intensity": "balanced",
365
+ "decision_policy": "user_gated",
366
+ "launch_mode": "custom",
367
+ "custom_profile": "revision_rebuttal",
368
+ "scope": "baseline_plus_direction",
369
+ "baseline_mode": "restore_from_url",
370
+ "resource_policy": "balanced",
371
+ "time_budget_hours": 24,
372
+ "git_strategy": "semantic_head_plus_controlled_integration",
373
+ "runtime_constraints": "Only add experiments that directly answer reviewer concerns.",
374
+ "objectives": [
375
+ "map reviewer comments to concrete actions",
376
+ "run only the necessary supplementary evidence",
377
+ "update the draft and response letter"
378
+ ],
379
+ "baseline_urls": [],
380
+ "paper_urls": [],
381
+ "entry_state_summary": "A draft and previous experiment outputs already exist.",
382
+ "review_summary": "Reviewers asked for one stronger ablation, one extra baseline, and a clearer limitation paragraph.",
383
+ "custom_brief": "Treat the current manuscript and review packet as the active contract."
384
+ }
385
+ }
386
+ ```
387
+
388
+ ## Operational implications
389
+
390
+ - The startup contract is durable quest state, not only UI state.
391
+ - Prompt building later reads `launch_mode`, `custom_profile`, and related summaries again.
392
+ - This means `Start Research` shapes not just the first turn, but later routing decisions too.
393
+
394
+ ## Validation checklist
395
+
396
+ When changing `Start Research`, update together:
397
+
398
+ - `src/ui/src/lib/startResearch.ts`
399
+ - `src/ui/src/components/projects/CreateProjectDialog.tsx`
400
+ - `src/prompts/system.md` if runtime interpretation changes
401
+ - `src/deepscientist/prompts/builder.py` if prompt routing changes
402
+ - this document
403
+ - `docs/zh/02_START_RESEARCH_GUIDE.md`
404
+ - related tests in `tests/test_prompt_builder.py` and `tests/test_stage_skills.py`