@researai/deepscientist 1.5.14 → 1.5.15

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 (119) hide show
  1. package/README.md +8 -0
  2. package/assets/branding/logo-raster.png +0 -0
  3. package/bin/ds.js +134 -49
  4. package/docs/en/00_QUICK_START.md +2 -2
  5. package/docs/en/01_SETTINGS_REFERENCE.md +20 -4
  6. package/docs/en/03_QQ_CONNECTOR_GUIDE.md +19 -0
  7. package/docs/en/10_WEIXIN_CONNECTOR_GUIDE.md +20 -0
  8. package/docs/en/14_PROMPT_SKILLS_AND_MCP_GUIDE.md +2 -0
  9. package/docs/en/16_TELEGRAM_CONNECTOR_GUIDE.md +134 -0
  10. package/docs/en/17_WHATSAPP_CONNECTOR_GUIDE.md +126 -0
  11. package/docs/en/18_FEISHU_CONNECTOR_GUIDE.md +136 -0
  12. package/docs/en/README.md +6 -0
  13. package/docs/zh/00_QUICK_START.md +2 -2
  14. package/docs/zh/01_SETTINGS_REFERENCE.md +20 -4
  15. package/docs/zh/03_QQ_CONNECTOR_GUIDE.md +19 -0
  16. package/docs/zh/10_WEIXIN_CONNECTOR_GUIDE.md +20 -0
  17. package/docs/zh/14_PROMPT_SKILLS_AND_MCP_GUIDE.md +2 -0
  18. package/docs/zh/16_TELEGRAM_CONNECTOR_GUIDE.md +134 -0
  19. package/docs/zh/17_WHATSAPP_CONNECTOR_GUIDE.md +126 -0
  20. package/docs/zh/18_FEISHU_CONNECTOR_GUIDE.md +136 -0
  21. package/docs/zh/README.md +6 -0
  22. package/install.sh +2 -0
  23. package/package.json +1 -1
  24. package/pyproject.toml +1 -1
  25. package/src/deepscientist/__init__.py +1 -1
  26. package/src/deepscientist/artifact/charts.py +567 -0
  27. package/src/deepscientist/artifact/guidance.py +50 -10
  28. package/src/deepscientist/artifact/metrics.py +228 -5
  29. package/src/deepscientist/artifact/schemas.py +3 -0
  30. package/src/deepscientist/artifact/service.py +3534 -191
  31. package/src/deepscientist/bash_exec/models.py +23 -0
  32. package/src/deepscientist/bash_exec/monitor.py +147 -67
  33. package/src/deepscientist/bash_exec/runtime.py +218 -156
  34. package/src/deepscientist/bash_exec/service.py +79 -64
  35. package/src/deepscientist/bash_exec/shells.py +87 -0
  36. package/src/deepscientist/bridges/connectors.py +51 -2
  37. package/src/deepscientist/config/models.py +6 -3
  38. package/src/deepscientist/config/service.py +7 -2
  39. package/src/deepscientist/connector/weixin_support.py +122 -1
  40. package/src/deepscientist/daemon/api/handlers.py +75 -4
  41. package/src/deepscientist/daemon/api/router.py +1 -0
  42. package/src/deepscientist/daemon/app.py +758 -206
  43. package/src/deepscientist/doctor.py +51 -0
  44. package/src/deepscientist/file_lock.py +48 -0
  45. package/src/deepscientist/gitops/diff.py +167 -1
  46. package/src/deepscientist/mcp/server.py +173 -5
  47. package/src/deepscientist/process_control.py +161 -0
  48. package/src/deepscientist/prompts/builder.py +267 -442
  49. package/src/deepscientist/quest/service.py +2255 -163
  50. package/src/deepscientist/quest/stage_views.py +171 -0
  51. package/src/deepscientist/runners/base.py +2 -0
  52. package/src/deepscientist/runners/codex.py +88 -5
  53. package/src/deepscientist/runners/runtime_overrides.py +17 -1
  54. package/src/prompts/contracts/shared_interaction.md +13 -4
  55. package/src/prompts/system.md +916 -72
  56. package/src/skills/analysis-campaign/SKILL.md +31 -2
  57. package/src/skills/analysis-campaign/references/artifact-orchestration.md +1 -1
  58. package/src/skills/analysis-campaign/references/writing-facing-slice-examples.md +65 -0
  59. package/src/skills/baseline/SKILL.md +2 -0
  60. package/src/skills/decision/SKILL.md +19 -2
  61. package/src/skills/experiment/SKILL.md +8 -2
  62. package/src/skills/finalize/SKILL.md +18 -0
  63. package/src/skills/idea/SKILL.md +78 -0
  64. package/src/skills/idea/references/idea-generation-playbook.md +100 -0
  65. package/src/skills/idea/references/outline-seeding-example.md +60 -0
  66. package/src/skills/intake-audit/SKILL.md +1 -1
  67. package/src/skills/optimize/SKILL.md +1644 -0
  68. package/src/skills/rebuttal/SKILL.md +2 -1
  69. package/src/skills/review/SKILL.md +2 -1
  70. package/src/skills/write/SKILL.md +80 -12
  71. package/src/skills/write/references/outline-evidence-contract-example.md +107 -0
  72. package/src/tui/dist/app/AppContainer.js +3 -0
  73. package/src/tui/package.json +1 -1
  74. package/src/ui/dist/assets/{AiManusChatView-DaF9Nge_.js → AiManusChatView-DDjbFnbt.js} +12 -12
  75. package/src/ui/dist/assets/{AnalysisPlugin-BSVx6dXE.js → AnalysisPlugin-Yb5IdmaU.js} +1 -1
  76. package/src/ui/dist/assets/CliPlugin-e64sreyu.js +31037 -0
  77. package/src/ui/dist/assets/{CodeEditorPlugin-DU9G0Tox.js → CodeEditorPlugin-C4D2TIkU.js} +8 -8
  78. package/src/ui/dist/assets/{CodeViewerPlugin-DoX_fI9l.js → CodeViewerPlugin-BVoNZIvC.js} +5 -5
  79. package/src/ui/dist/assets/{DocViewerPlugin-C4FWIXuU.js → DocViewerPlugin-CLChbllo.js} +3 -3
  80. package/src/ui/dist/assets/{GitDiffViewerPlugin-BgfFMgtf.js → GitDiffViewerPlugin-C4xeFyFQ.js} +20 -20
  81. package/src/ui/dist/assets/{ImageViewerPlugin-tcPkfY_x.js → ImageViewerPlugin-OiMUAcLi.js} +5 -5
  82. package/src/ui/dist/assets/{LabCopilotPanel-_dKV60Bf.js → LabCopilotPanel-BjD2ThQF.js} +11 -11
  83. package/src/ui/dist/assets/{LabPlugin-Bje0ayoC.js → LabPlugin-DQPg-NrB.js} +2 -2
  84. package/src/ui/dist/assets/{LatexPlugin-CVsBzAln.js → LatexPlugin-CI05XAV9.js} +7 -7
  85. package/src/ui/dist/assets/{MarkdownViewerPlugin-xjmrqv_8.js → MarkdownViewerPlugin-DpeBLYZf.js} +4 -4
  86. package/src/ui/dist/assets/{MarketplacePlugin-mMM2A8wP.js → MarketplacePlugin-DolE58Q2.js} +3 -3
  87. package/src/ui/dist/assets/{NotebookEditor-3kVDSOBo.js → NotebookEditor-7Qm2rSWD.js} +11 -11
  88. package/src/ui/dist/assets/{NotebookEditor-SoJ8X-MO.js → NotebookEditor-C1kWaxKi.js} +1 -1
  89. package/src/ui/dist/assets/{PdfLoader-DElVuHl9.js → PdfLoader-BfOHw8Zw.js} +1 -1
  90. package/src/ui/dist/assets/{PdfMarkdownPlugin-Bq88XT4G.js → PdfMarkdownPlugin-BulDREv1.js} +2 -2
  91. package/src/ui/dist/assets/{PdfViewerPlugin-CsCXMo9S.js → PdfViewerPlugin-C-daaOaL.js} +10 -10
  92. package/src/ui/dist/assets/{SearchPlugin-oUPvy19k.js → SearchPlugin-CjpaiJ3A.js} +1 -1
  93. package/src/ui/dist/assets/{TextViewerPlugin-CRkT9yNy.js → TextViewerPlugin-BxIyqPQC.js} +5 -5
  94. package/src/ui/dist/assets/{VNCViewer-BgbuvWhR.js → VNCViewer-HAg9mF7M.js} +10 -10
  95. package/src/ui/dist/assets/{bot-v_RASACv.js → bot-0DYntytV.js} +1 -1
  96. package/src/ui/dist/assets/{code-5hC9d0VH.js → code-B20Slj_w.js} +1 -1
  97. package/src/ui/dist/assets/{file-content-D1PxfOrp.js → file-content-DT24KFma.js} +1 -1
  98. package/src/ui/dist/assets/{file-diff-panel-DG1oT_Hj.js → file-diff-panel-DK13YPql.js} +1 -1
  99. package/src/ui/dist/assets/{file-socket-BmdFYQlk.js → file-socket-B4T2o4nR.js} +1 -1
  100. package/src/ui/dist/assets/{image-Dqe2X2tW.js → image-DSeR_sDS.js} +1 -1
  101. package/src/ui/dist/assets/{index-RDlNXXx1.js → index-BrFje2Uk.js} +2 -2
  102. package/src/ui/dist/assets/{index-DVsMKK_y.js → index-BwRJaoTl.js} +1 -1
  103. package/src/ui/dist/assets/{index-Nt9hS4ck.js → index-D_E4281X.js} +5007 -28514
  104. package/src/ui/dist/assets/{index-Duvz8Ip0.js → index-DnYB3xb1.js} +12 -12
  105. package/src/ui/dist/assets/{index-BQG-1s2o.css → index-G7AcWcMu.css} +43 -2
  106. package/src/ui/dist/assets/{monaco-DIXge1CP.js → monaco-LExaAN3Y.js} +1 -1
  107. package/src/ui/dist/assets/{pdf-effect-queue-BBTTQaO-.js → pdf-effect-queue-BJk5okWJ.js} +1 -1
  108. package/src/ui/dist/assets/{popover-BWlolyxo.js → popover-D3Gg_FoV.js} +1 -1
  109. package/src/ui/dist/assets/{project-sync-BM5PkFH4.js → project-sync-C_ygLlVU.js} +1 -1
  110. package/src/ui/dist/assets/{select-D4dAtrA8.js → select-CpAK6uWm.js} +2 -2
  111. package/src/ui/dist/assets/{sigma-CKbE5jJT.js → sigma-DEccaSgk.js} +1 -1
  112. package/src/ui/dist/assets/{square-check-big-CZNGMgiB.js → square-check-big-uUfyVsbD.js} +1 -1
  113. package/src/ui/dist/assets/{trash-DaB37xAz.js → trash-CXvwwSe8.js} +1 -1
  114. package/src/ui/dist/assets/{useCliAccess-C2OmAcWe.js → useCliAccess-Bnop4mgR.js} +1 -1
  115. package/src/ui/dist/assets/{useFileDiffOverlay-Dowd1Ij4.js → useFileDiffOverlay-B8eUAX0I.js} +1 -1
  116. package/src/ui/dist/assets/{wrap-text-BGjAhAUq.js → wrap-text-9vbOBpkW.js} +1 -1
  117. package/src/ui/dist/assets/{zoom-out-dMZQMXzc.js → zoom-out-BgVMmOW4.js} +1 -1
  118. package/src/ui/dist/index.html +2 -2
  119. package/src/ui/dist/assets/CliPlugin-C9gzJX41.js +0 -5905
@@ -18,6 +18,7 @@ The task is “respond to concrete reviewer pressure with the smallest honest se
18
18
  - Message templates are references only. Adapt to the actual context and vary wording so updates feel natural and non-robotic.
19
19
  - If a threaded user reply arrives, interpret it relative to the latest rebuttal progress update before assuming the task changed completely.
20
20
  - When the rebuttal plan, the main supplementary-evidence package, or the final response bundle becomes durable, send one richer `artifact.interact(kind='milestone', reply_mode='threaded', ...)` update that says what reviewer concerns are now addressed, what still remains open, and what happens next.
21
+ - Hard execution rule: if this stage needs terminal work such as manuscript builds, scripted checks, Git inspection, or reviewer-linked experiment launches, every such command must go through `bash_exec`.
21
22
 
22
23
  ## Purpose
23
24
 
@@ -423,7 +424,7 @@ Open additional skills only when the rebuttal workflow requires them:
423
424
 
424
425
  Use these tools deliberately:
425
426
 
426
- - `artifact.record(kind='decision', ...)`
427
+ - `artifact.record(payload={'kind': 'decision', ...})`
427
428
  - route choice, claim downgrade, literature-audit launch, baseline-recovery launch, supplementary-experiment launch, rebuttal completion recommendation
428
429
  - `artifact.create_analysis_campaign(...)`
429
430
  - multi-slice reviewer-driven supplementary work
@@ -19,6 +19,7 @@ It is also not the same as `rebuttal`.
19
19
  - Follow the shared interaction contract injected by the system prompt.
20
20
  - For ordinary active work, prefer a concise progress update once work has crossed roughly 6 tool calls with a human-meaningful delta, and do not drift beyond roughly 12 tool calls or about 8 minutes without a user-visible update.
21
21
  - When the review report, revision plan, or follow-up experiment TODO list becomes durable, send a richer `artifact.interact(kind='milestone', reply_mode='threaded', ...)` update that says what the main risks are, what should be fixed next, and whether the next route is writing, experiment, or claim downgrade.
22
+ - Hard execution rule: if this stage needs terminal work such as document builds, scripted checks, Git inspection, or file inspection, every such command must go through `bash_exec`.
22
23
 
23
24
  ## Purpose
24
25
 
@@ -356,7 +357,7 @@ Open additional skills only when the review workflow requires them:
356
357
 
357
358
  Use these tools deliberately:
358
359
 
359
- - `artifact.record(kind='decision', ...)`
360
+ - `artifact.record(payload={'kind': 'decision', ...})`
360
361
  - review conclusion, claim downgrade recommendation, route choice, stop/go recommendation
361
362
  - `artifact.create_analysis_campaign(...)`
362
363
  - when the experiment TODO list should become concrete follow-up slices
@@ -21,6 +21,7 @@ This skill intentionally absorbs the strongest old DeepScientist writing discipl
21
21
 
22
22
  - Follow the shared interaction contract injected by the system prompt.
23
23
  - For ordinary active work, prefer a concise progress update once work has crossed roughly 6 tool calls with a human-meaningful delta, and do not drift beyond roughly 12 tool calls or about 8 minutes without a user-visible update.
24
+ - Hard execution rule: every terminal command in this stage must go through `bash_exec`; do not use any other terminal path for LaTeX builds, figure generation, scripted export, Git, Python, package-manager, or file-inspection commands.
24
25
  - Prefer `bash_exec` for durable document-build commands such as LaTeX compilation, figure regeneration, and scripted export steps so logs remain quest-local and reviewable.
25
26
  - Keep ordinary subtask completions concise. When a paper/draft milestone is actually completed, upgrade to a richer `artifact.interact(kind='milestone', reply_mode='threaded', ...)` report instead of another short progress update.
26
27
  - That richer writing-stage milestone report should normally cover: which draft, section, or outline milestone finished, what is now supportable, what is still missing, and the exact recommended next revision or route decision.
@@ -63,6 +64,7 @@ It exists to test whether the current evidence can support a stable narrative.
63
64
  Writing should happen on a dedicated `paper/*` branch/worktree derived from the source main-experiment `run/*` branch.
64
65
  Treat that paper branch as the writing surface, and treat the parent run branch as the evidence source that writing must faithfully reflect.
65
66
  Do not run new main experiments from the paper branch; if writing exposes a missing evidence requirement, route back through `decision`, `activate_branch`, `experiment`, or `analysis-campaign`.
67
+ Once an outline is selected, treat that branch/worktree as an active paper line with its own contract, not just as a late draft folder.
66
68
 
67
69
  If the evidence is incomplete, contradictory, or too weak, the correct output is:
68
70
 
@@ -85,6 +87,17 @@ The approved outline should be a real structured object, typically containing:
85
87
  - `experimental_designs`
86
88
  - `contributions`
87
89
 
90
+ Treat the approved outline as the paper contract, not just a narrative sketch.
91
+ It should decide:
92
+
93
+ - which sections exist
94
+ - which experiments or analysis items each section depends on
95
+ - which evidence belongs in main text, appendix, or reference-only support
96
+
97
+ If the selected outline is missing those links, repair the outline and matrix before further drafting.
98
+ Prefer an author-facing outline folder under `paper/outline/` with section-level files, and treat `paper/selected_outline.json` as the compiled compatibility view of that contract.
99
+ `paper/evidence_ledger.json` remains the runtime truth of what evidence actually exists and where it maps.
100
+
88
101
  ## Writing mental guardrails
89
102
 
90
103
  - Writing starts when the claim and evidence structure are stable enough, not when prose feels easy.
@@ -120,8 +133,27 @@ Before writing seriously, confirm:
120
133
  - the claims you intend to write are backed by durable artifacts
121
134
  - the code/diff path is available for method fidelity checks
122
135
  - the evaluation contract is explicit
136
+ - the active paper line is known
137
+ - the selected outline is present and reflects the current evidence line
138
+ - `paper/outline/manifest.json` and any relevant section files are present when the outline folder flow is enabled
139
+ - `paper/evidence_ledger.json` or `paper/evidence_ledger.md` reflects the current mapped paper evidence set
140
+ - `paper/paper_experiment_matrix.md` reflects the current paper-facing experiment and analysis frontier when that planning surface is in use
141
+ - completed relevant analysis results under `experiments/analysis-results/` are mapped into the selected outline or matrix rather than floating only as standalone reports
123
142
 
124
143
  If major claims lack evidence, surface the gap first.
144
+ If the selected outline, outline folder, evidence ledger, or matrix feels underspecified, read `references/outline-evidence-contract-example.md` before drafting further.
145
+ For paper-facing work, use this hard order instead of drifting between surfaces:
146
+
147
+ 1. refresh the active outline folder section files first when they exist
148
+ 2. sync the compiled `paper/selected_outline.json`
149
+ 3. confirm `paper/evidence_ledger.json` reflects the same mapped evidence set
150
+ 4. only then draft, revise, review, or bundle prose
151
+
152
+ Do not draft first and promise to repair the paper contract later.
153
+ If the current blocker set is not obvious from files, call `artifact.get_paper_contract_health(detail='full')` before deciding whether to keep writing or to return to contract repair / supplementary work.
154
+ If the active quest status, current workspace, recent durable runs, or pending interaction state is unclear after a restart, call `artifact.get_quest_state(detail='summary')` first.
155
+ If the exact current brief/plan/status/summary wording matters for the current drafting decision, call `artifact.read_quest_documents(...)` instead of relying on prompt-injected excerpts.
156
+ If you need earlier user/assistant continuity to interpret the current writing request, call `artifact.get_conversation_context(...)` before changing the route.
125
157
 
126
158
  ## Truth sources
127
159
 
@@ -139,12 +171,19 @@ Use these as the canonical evidence base:
139
171
 
140
172
  Do not rely on memory alone for numbers.
141
173
  Always prefer direct artifact paths for claims.
174
+ Do not keep drafting from remembered storyline summaries if the active paper line already has a stricter durable contract in its outline folder, selected outline, evidence ledger, experiment matrix, or paper-facing analysis mirrors.
142
175
 
143
176
  ## Required durable outputs
144
177
 
145
178
  The write stage should usually produce most of the following:
146
179
 
147
- - `paper/outline.md` or equivalent outline
180
+ - `paper/outline/manifest.json`
181
+ - `paper/outline/sections/<section_id>/section.md`
182
+ - `paper/outline/sections/<section_id>/result_table.json`
183
+ - `paper/outline/sections/<section_id>/experiment_setup.md`
184
+ - `paper/outline/sections/<section_id>/findings.md`
185
+ - `paper/outline/sections/<section_id>/impact.md`
186
+ - `paper/outline.md` or equivalent outline view
148
187
  - `paper/selected_outline.json`
149
188
  - `paper/paper_experiment_matrix.md`
150
189
  - `paper/paper_experiment_matrix.json`
@@ -172,7 +211,8 @@ The write stage should usually produce most of the following:
172
211
 
173
212
  The exact paths may vary, but the structure and meaning should remain clear.
174
213
 
175
- Treat the approved outline as the authoritative blueprint for the draft.
214
+ Treat the author-facing outline folder and compiled selected outline together as the authoritative blueprint for the draft.
215
+ If both exist, update the outline folder first and then keep `paper/selected_outline.json` synchronized as the compiled compatibility output.
176
216
  Treat `paper/draft.md` or the equivalent working note as the running evidence ledger where useful findings, citation notes, and writing decisions are accumulated as work proceeds.
177
217
  After every significant search, plot, paragraph, revision pass, or claim downgrade, update the working note and writing plan immediately so important writing state is not trapped in transient chat output.
178
218
  For any substantial paper-writing line, keep `paper/writing_plan.md` or an equivalent durable plan detailed enough that another agent could resume from it without reconstructing the full logic from chat alone.
@@ -212,8 +252,10 @@ For any paper-like writing line that has more than a trivial single-result story
212
252
  - `paper/paper_experiment_matrix.json`
213
253
 
214
254
  Use `references/paper-experiment-matrix-template.md` when helpful.
255
+ Use `references/outline-evidence-contract-example.md` when the paper line needs a concrete example of section binding, `required_items`, and `result_table` updates.
215
256
 
216
- The paper experiment matrix is the durable experiment-control surface for the paper line.
257
+ The paper experiment matrix is the planning and reporting surface for the paper line.
258
+ It is not the master truth when it disagrees with the selected outline contract or `paper/evidence_ledger.json`.
217
259
  It exists to prevent two common failures:
218
260
 
219
261
  - an outline that overweights post-hoc analysis and under-specifies paper-typical experiments
@@ -231,6 +273,18 @@ It should cover the full paper-facing experiment program beyond the already-fini
231
273
  - failure-boundary or limitation-surface analyses
232
274
  - case study or trace walkthrough rows as optional supporting material rather than mandatory core evidence
233
275
 
276
+ The matrix should also act as the ingestion gate for completed follow-up analysis:
277
+
278
+ - if a completed analysis campaign or slice is relevant to a paper claim, it must appear in the matrix as `main_required`, `appendix`, `reference_only`, or be excluded with a written reason
279
+ - do not allow completed analysis results to remain paper-invisible
280
+
281
+ The outline should be revised in lockstep with that matrix:
282
+
283
+ - before analysis begins, seed the section structure and expected evidence items
284
+ - after each completed slice, update the matching section's `result_table`
285
+ - if the outline folder exists, update the section's `experiment_setup.md`, `findings.md`, and `impact.md` instead of leaving those changes only in prose notes
286
+ - if a result weakens the claim, downgrade the section contract before polishing prose
287
+
234
288
  Case study is usually optional.
235
289
  Do not let it displace stronger quantitative evidence.
236
290
  Efficiency or cost experiments are not mandatory in every paper, but they should be added whenever:
@@ -342,6 +396,15 @@ After every meaningful experiment outcome, even a null result or exclusion:
342
396
  Do not decide the next supplementary experiment from memory alone when the matrix exists.
343
397
  The matrix should be the authoritative experiment-routing surface for the paper line, and the selected outline's `experimental_designs` should stay consistent with that matrix rather than drifting away from it.
344
398
 
399
+ Before drafting any section, verify all of the following:
400
+
401
+ - the section exists in the selected outline
402
+ - the section's required experiment or analysis items are present in `paper/paper_experiment_matrix.*`
403
+ - every main-text-required item for that section is already completed or honestly blocked
404
+ - no completed relevant analysis slice remains unmapped
405
+
406
+ If any of those checks fails, stop drafting and repair the paper contract first.
407
+
345
408
  ## Venue template selection
346
409
 
347
410
  For paper-like writing, use a real venue template rather than improvising a blank LaTeX tree.
@@ -385,14 +448,18 @@ For paper-like deliverables, the safest default order is:
385
448
  2. activate or create the dedicated `paper/*` branch/worktree derived from the source run branch before durable outline selection or drafting
386
449
  3. choose the venue template from `templates/`, copy it into `paper/latex/`, and default general ML work to `templates/iclr2026/` unless a stronger venue target exists
387
450
  4. if the line benefits from an explicit outline contract, record one or more outline candidates with `artifact.submit_paper_outline(mode='candidate', ...)`
388
- 5. if one outline should become the durable paper contract, select or revise it with `artifact.submit_paper_outline(mode='select'|'revise', ...)`
389
- 6. create or refresh `paper/paper_experiment_matrix.md` and `paper/paper_experiment_matrix.json` before stabilizing the experiments section
390
- 7. if the selected outline or matrix still exposes evidence gaps, launch an outline-bound and matrix-bound `artifact.create_analysis_campaign(...)` before drafting the experiments section as if it were settled
391
- 8. plan and generate decisive figures or tables
392
- 9. draft sections directly from the evidence and the current working outline; do not force extra outline rounds when direct drafting is clearer and safer
393
- 10. run harsh review and revision cycles
394
- 11. proof, package, submit `artifact.submit_paper_bundle(...)` when the bundle is ready, and then pass to `finalize`
395
- 12. if the final paper PDF exists and QQ milestone media is enabled in config, the bundle-ready milestone may attach that PDF once
451
+ 5. if one outline should become the durable paper contract, select or revise it with `artifact.submit_paper_outline(mode='select'|'revise', ...)`; that selection should be treated as opening or refreshing the active paper line
452
+ 6. if the outline folder flow is enabled, create or refresh `paper/outline/manifest.json` and the relevant section files before stabilizing the experiments section
453
+ 7. create or refresh `paper/paper_experiment_matrix.md` and `paper/paper_experiment_matrix.json` before stabilizing the experiments section
454
+ 8. if the selected outline or matrix still exposes evidence gaps, launch an outline-bound and matrix-bound `artifact.create_analysis_campaign(...)` before drafting the experiments section as if it were settled
455
+ 9. after every completed follow-up slice, reopen the selected outline and confirm the corresponding `result_table` row now reflects the real result rather than a placeholder
456
+ 10. if the outline folder exists, immediately sync the affected section files so experiment setup, findings, and impact stay current on the paper line
457
+ 11. after that sync, confirm `paper/evidence_ledger.json` and the paper line summary still agree before continuing prose work
458
+ 12. plan and generate decisive figures or tables
459
+ 13. draft sections directly from the evidence and the current working outline; do not force extra outline rounds when direct drafting is clearer and safer
460
+ 14. run harsh review and revision cycles
461
+ 15. proof, package, submit `artifact.submit_paper_bundle(...)` when the bundle is ready, and then pass to `finalize`
462
+ 16. if the final paper PDF exists and QQ milestone media is enabled in config, the bundle-ready milestone may attach that PDF once
396
463
 
397
464
  Before real drafting, force one explicit planning pass that stabilizes at least:
398
465
 
@@ -1202,6 +1269,7 @@ Preferred artifact choices:
1202
1269
  - draft readiness when a user-facing checkpoint helps
1203
1270
  - use `approval` when the user explicitly confirms a submission-critical choice
1204
1271
  - use `artifact.submit_paper_outline(mode='candidate'|'select'|'revise', ...)` for the real outline lifecycle instead of leaving outline choice only in prose
1272
+ - when `mode='select'`, treat the selected outline as the activation point of the active paper line and keep its folder/json contract synchronized
1205
1273
  - use `artifact.submit_paper_bundle(...)` before leaving the writing stage when the draft, plan, references, and packaging evidence are durable enough
1206
1274
  - continue writing on the dedicated `paper/*` branch/worktree after analysis slices finish; treat the parent run or idea branch as the evidence source, not the drafting surface
1207
1275
 
@@ -1239,7 +1307,7 @@ Use these references when the deliverable is paper-like and you need a denser op
1239
1307
 
1240
1308
  Exit the write stage only when one of the following is durably true:
1241
1309
 
1242
- - the current draft is evidence-complete enough for `finalize`, including a selected outline and a durable paper bundle manifest when the deliverable is paper-like
1310
+ - the current draft is evidence-complete enough for `finalize`, including an active paper line, a selected outline, synchronized outline contract files, and a durable paper bundle manifest when the deliverable is paper-like
1243
1311
  - a clear evidence gap has been recorded and the quest is routed backward
1244
1312
  - a packaging or proofing blocker has been recorded and the next action is explicit
1245
1313
 
@@ -0,0 +1,107 @@
1
+ # Outline-Centered Paper Contract Example
2
+
3
+ Use this reference when the paper line needs a concrete example of:
4
+
5
+ - what a selected outline should look like before follow-up analysis
6
+ - how completed evidence should be written back into the outline
7
+ - what should block further drafting
8
+
9
+ ## Minimal selected outline shape
10
+
11
+ ```json
12
+ {
13
+ "outline_id": "outline-002",
14
+ "title": "Truth-Preserving Collaboration under Mixed Signals",
15
+ "story": "Motivation -> bottleneck -> remedy -> evidence -> boundary",
16
+ "detailed_outline": {
17
+ "research_questions": [
18
+ "RQ1: Does the method improve the main benchmark under the accepted protocol?",
19
+ "RQ2: Which component actually causes the gain?",
20
+ "RQ3: Where does the method fail or regress?"
21
+ ],
22
+ "experimental_designs": [
23
+ "Main benchmark comparison",
24
+ "Component ablation",
25
+ "Boundary / failure analysis"
26
+ ],
27
+ "contributions": [
28
+ "A new route for source-aware collaboration",
29
+ "A controlled decomposition of the gain",
30
+ "A clearer limitation boundary"
31
+ ]
32
+ },
33
+ "evidence_contract": {
34
+ "main_text_items_must_be_ready": true,
35
+ "appendix_items_may_be_ready_or_reference_only": true,
36
+ "record_results_back_into_outline": true,
37
+ "result_table_required": true
38
+ },
39
+ "sections": [
40
+ {
41
+ "section_id": "results-main",
42
+ "title": "Main Results",
43
+ "paper_role": "main_text",
44
+ "claims": ["C1"],
45
+ "required_items": ["run-main-001"],
46
+ "optional_items": [],
47
+ "status": "pending",
48
+ "result_table": []
49
+ },
50
+ {
51
+ "section_id": "analysis-mechanism",
52
+ "title": "Mechanism Analysis",
53
+ "paper_role": "main_text",
54
+ "claims": ["C2"],
55
+ "required_items": ["AN-ABL-001"],
56
+ "optional_items": [],
57
+ "status": "pending",
58
+ "result_table": []
59
+ },
60
+ {
61
+ "section_id": "analysis-boundary",
62
+ "title": "Boundary and Failure Analysis",
63
+ "paper_role": "appendix",
64
+ "claims": ["C3"],
65
+ "required_items": [],
66
+ "optional_items": ["AN-BND-001"],
67
+ "status": "planned",
68
+ "result_table": []
69
+ }
70
+ ]
71
+ }
72
+ ```
73
+
74
+ ## After one completed analysis slice
75
+
76
+ Write the result back into the matching `section.result_table`.
77
+
78
+ ```json
79
+ {
80
+ "item_id": "AN-ABL-001",
81
+ "title": "Remove corroboration module",
82
+ "kind": "analysis_slice",
83
+ "paper_role": "main_text",
84
+ "status": "completed",
85
+ "claim_links": ["C2"],
86
+ "metric_summary": "acc=0.811; delta=-0.046",
87
+ "result_summary": "Removing the corroboration module eliminates most of the measured gain.",
88
+ "source_paths": [
89
+ "experiments/analysis/analysis-1234/ablation/RESULT.md",
90
+ "experiments/analysis-results/analysis-1234/ablation.md"
91
+ ],
92
+ "updated_at": "2026-03-28T00:00:00Z"
93
+ }
94
+ ```
95
+
96
+ The matching section should then move from `pending` to:
97
+
98
+ - `ready` if every required item is ready
99
+ - `partial` if some required items are ready
100
+ - `pending` if the row exists but the result is not ready
101
+
102
+ ## Drafting rules by case
103
+
104
+ - If a section has missing required items, stop prose expansion and repair the evidence contract first.
105
+ - If an analysis slice is completed but has no `section_id` or `item_id`, do not summarize it in the paper yet; map it first.
106
+ - If a result is only useful as support, keep it in `appendix` or `reference_only` instead of inflating the main text.
107
+ - If the result weakens the claim, record that downgrade in the outline before rewriting the section prose.
@@ -1604,6 +1604,9 @@ export const AppContainer = ({ baseUrl, initialQuestId = null, }) => {
1604
1604
  setInput('');
1605
1605
  setStatusLine(nextStatus);
1606
1606
  }, []);
1607
+ const openConfigBrowser = useCallback((nextStatus) => {
1608
+ openConfigRoot(nextStatus);
1609
+ }, [openConfigRoot]);
1607
1610
  const openConnectorBrowser = useCallback(async (targetConnector) => {
1608
1611
  try {
1609
1612
  const document = await loadConnectorsDocument();
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deepscientist-tui",
3
- "version": "1.5.14",
3
+ "version": "1.5.15",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1,14 +1,14 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-RDlNXXx1.js","assets/index-Nt9hS4ck.js","assets/index-BQG-1s2o.css","assets/useCliAccess-C2OmAcWe.js","assets/VNCViewer-BgbuvWhR.js","assets/file-content-D1PxfOrp.js","assets/select-D4dAtrA8.js","assets/index-DVsMKK_y.js","assets/file-jump-queue-r5XKgJEV.js","assets/pdf-effect-queue-BBTTQaO-.js","assets/file-diff-panel-DG1oT_Hj.js","assets/bot-v_RASACv.js","assets/NotebookEditor-SoJ8X-MO.js","assets/NotebookEditor-C3VQ7ylN.css","assets/trash-DaB37xAz.js"])))=>i.map(i=>d[i]);
2
- import { w as createLucideIcon, r as reactExports, ce as useIsomorphicLayoutEffect, cg as frame_1, d8 as LayoutGroupContext, d9 as nodeGroup_1, j as jsxRuntimeExports, cj as useConstant, t as apiClient, bE as isQuestRuntimeSurface, da as shouldUseQuestProject, bF as getApiBaseUrl, db as deriveMcpIdentity, dc as supportsProductApis, cV as axios, dd as getCachedValue, de as setCachedValue, df as recordRequestEvent, dg as redactSensitive, dh as sanitizeUrl, di as refreshAccessToken, aV as useChatSessionStore, cF as getMyToken, bG as redirectToLanding, Q as create$1, aA as useLabCopilotStore, bH as useCliStore, dj as EXPLORER_REFRESH_EVENT, n as useTabsStore, cX as buildCliFileId, dk as getCliFileName, cY as toCliResourcePath, aM as getPluginIdFromExtension, v as BUILTIN_PLUGINS, b as cn, dl as GripVertical, f as useFileTreeStore, W as toFilesResourcePath, aL as getPluginIdFromMimeType, T as TriangleAlert, dm as resolveMcpIdentity, dn as getToolArgsRecord, dp as getToolResultRecord, dq as getToolResultValue, dr as asString$2, ds as asRecord$4, dt as asStringArray, du as extractPathEntries, dv as BookOpenText, dw as Clock3, dx as truncateText, dy as ArrowUpRight, l as Search, dz as Database, dA as ArrowRightLeft, N as Sparkles, k as FileText, by as GitBranch, dB as asBoolean, dC as asNumber, dD as BASH_CARRIAGE_RETURN_PREFIX, aN as useQuery, br as CircleHelp, dE as Activity, bt as Clock, dF as truncateText$1, dG as listLabPendingQuestions, dH as listLabQuestionHistory, af as BookOpen, dI as ExternalLink, u as useI18n, dJ as GraduationCap, dK as normalizeWebSearchPayload, dL as WebSearchQueryPills, dM as WebSearchResults, P as EnhancedTerminal, h as dynamic, _ as __vitePreload, dN as BashToolView, ac as Terminal, o as useToast, dO as getMimeTypeFromExtension, dP as getFileTextPreview, c2 as createFileObjectUrl, c as copyToClipboard, cp as ChevronLeft, cs as Folder, m as ChevronDown, X as X$1, L as LoaderCircle, aJ as FileIcon, dQ as formatFileSize, E as Eye, e as Copy, ba as Dialog, bb as DialogContent, co as ChevronRight, dR as ConfirmModal, dS as RotatingText, d as Check, aS as useReducedMotion, dT as useTokenStream, dU as McpBashExecView, dV as PngIcon, dW as Brain, dX as BRAND_LOGO_SMALL_SRC, dY as BRAND_LOGO_SMALL_SRC_INVERTED, dZ as CircleX, b0 as motion, bd as DialogTitle, ct as DialogDescription, bT as DropdownMenu, bU as DropdownMenuTrigger, b8 as Ellipsis, bV as DropdownMenuContent, bX as DropdownMenuItem, cB as DropdownMenuSeparator, cq as GlareHover, cA as SpotlightCard, d4 as Noise, b9 as Plus, ai as Info, a2 as Play, d_ as getWorkspaceContentTone, a$ as AnimatePresence, ab as useOpenFile, a as useWorkspaceSurfaceStore, z as useAuthStore, d$ as useSearchParams, e0 as useAgentRegistryStore, e1 as PanelLeft, e2 as parseCliFileId, c0 as getFile, bL as getProject, cI as refreshCliServerStatus, e3 as COPILOT_FILES_ENABLED, a0 as listLatexBuilds, a6 as getLatexBuildLogText, $ as compileLatex, e4 as ThinkingIndicator, e5 as assetUrl, e6 as VariableSizeList, bs as OrbitLogoStatus, aR as reactDomExports, e7 as ChatScrollProvider, bc as DialogHeader, be as DialogFooter } from './index-Nt9hS4ck.js';
3
- import { u as useFileContentStore } from './file-content-D1PxfOrp.js';
4
- import { n as normalizePath$1, j as joinPath, s as splitPath, e as Server, L as Layers, S as Select, a as SelectTrigger, c as SelectContent, d as SelectItem } from './select-D4dAtrA8.js';
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-BrFje2Uk.js","assets/index-D_E4281X.js","assets/index-G7AcWcMu.css","assets/useCliAccess-Bnop4mgR.js","assets/VNCViewer-HAg9mF7M.js","assets/file-content-DT24KFma.js","assets/select-CpAK6uWm.js","assets/index-BwRJaoTl.js","assets/file-jump-queue-r5XKgJEV.js","assets/pdf-effect-queue-BJk5okWJ.js","assets/file-diff-panel-DK13YPql.js","assets/bot-0DYntytV.js","assets/NotebookEditor-C1kWaxKi.js","assets/NotebookEditor-C3VQ7ylN.css","assets/trash-CXvwwSe8.js"])))=>i.map(i=>d[i]);
2
+ import { w as createLucideIcon, r as reactExports, cg as useIsomorphicLayoutEffect, ch as frame_1, ci as LayoutGroupContext, cj as nodeGroup_1, j as jsxRuntimeExports, ck as useConstant, t as apiClient, bE as isQuestRuntimeSurface, cl as shouldUseQuestProject, bF as getApiBaseUrl, cm as deriveMcpIdentity, cn as supportsProductApis, co as axios, cp as getCachedValue, cq as setCachedValue, cr as recordRequestEvent, cs as redactSensitive, ct as sanitizeUrl, cu as refreshAccessToken, aV as useChatSessionStore, cv as getMyToken, bG as redirectToLanding, Q as create$1, aA as useLabCopilotStore, bH as useCliStore, cw as EXPLORER_REFRESH_EVENT, n as useTabsStore, cx as buildCliFileId, cy as getCliFileName, cz as toCliResourcePath, aM as getPluginIdFromExtension, v as BUILTIN_PLUGINS, b as cn, cA as GripVertical, f as useFileTreeStore, W as toFilesResourcePath, aL as getPluginIdFromMimeType, T as TriangleAlert, cB as resolveMcpIdentity, cC as getToolArgsRecord, cD as getToolResultRecord, cE as getToolResultValue, cF as asString$2, cG as asRecord$4, cH as asStringArray, cI as extractPathEntries, cJ as BookOpenText, cK as Clock3, cL as truncateText, cM as ArrowUpRight, l as Search, cN as Database, cO as ArrowRightLeft, N as Sparkles, k as FileText, by as GitBranch, cP as asBoolean, cQ as asNumber, cR as BASH_CARRIAGE_RETURN_PREFIX, aN as useQuery, br as CircleHelp, cS as Activity, bt as Clock, cT as truncateText$1, cU as listLabPendingQuestions, cV as listLabQuestionHistory, af as BookOpen, cW as ExternalLink, u as useI18n, cX as GraduationCap, cY as normalizeWebSearchPayload, cZ as WebSearchQueryPills, c_ as WebSearchResults, P as EnhancedTerminal, h as dynamic, _ as __vitePreload, c$ as BashToolView, ac as Terminal, o as useToast, d0 as getMimeTypeFromExtension, d1 as getFileTextPreview, c2 as createFileObjectUrl, c as copyToClipboard, d2 as ChevronLeft, d3 as Folder, m as ChevronDown, X as X$1, L as LoaderCircle, aJ as FileIcon, d4 as formatFileSize, E as Eye, e as Copy, ba as Dialog, bb as DialogContent, d5 as ChevronRight, d6 as ConfirmModal, d7 as RotatingText, d as Check, aS as useReducedMotion, d8 as useTokenStream, d9 as McpBashExecView, da as PngIcon, db as Brain, dc as BRAND_LOGO_SMALL_SRC, dd as BRAND_LOGO_SMALL_SRC_INVERTED, de as CircleX, b0 as motion, bd as DialogTitle, df as DialogDescription, bT as DropdownMenu, bU as DropdownMenuTrigger, b8 as Ellipsis, bV as DropdownMenuContent, bX as DropdownMenuItem, dg as DropdownMenuSeparator, dh as GlareHover, di as SpotlightCard, dj as Noise, b9 as Plus, ai as Info, a2 as Play, dk as getWorkspaceContentTone, a$ as AnimatePresence, ab as useOpenFile, a as useWorkspaceSurfaceStore, z as useAuthStore, dl as useSearchParams, dm as useAgentRegistryStore, dn as PanelLeft, dp as parseCliFileId, c0 as getFile, bL as getProject, dq as refreshCliServerStatus, dr as COPILOT_FILES_ENABLED, a0 as listLatexBuilds, a6 as getLatexBuildLogText, $ as compileLatex, ds as ThinkingIndicator, dt as assetUrl, du as VariableSizeList, bs as OrbitLogoStatus, aR as reactDomExports, dv as ChatScrollProvider, bc as DialogHeader, be as DialogFooter } from './index-D_E4281X.js';
3
+ import { u as useFileContentStore } from './file-content-DT24KFma.js';
4
+ import { n as normalizePath$1, j as joinPath, s as splitPath, e as Server, L as Layers, S as Select, a as SelectTrigger, c as SelectContent, d as SelectItem } from './select-CpAK6uWm.js';
5
5
  import { q as queueFileJumpEffect } from './file-jump-queue-r5XKgJEV.js';
6
- import { q as queuePdfEffect, M as MessageSquare } from './pdf-effect-queue-BBTTQaO-.js';
7
- import { F as FileDiffPanel } from './file-diff-panel-DG1oT_Hj.js';
8
- import { B as Bot } from './bot-v_RASACv.js';
9
- import { C as ChevronUp } from './index-DVsMKK_y.js';
10
- import { v as ve$2, d as defaultExtensions, g as getEditorMarkdown, s as setEditorMarkdown, U as U$2, I as I$1 } from './NotebookEditor-SoJ8X-MO.js';
11
- import { T as Trash, A as ArrowDown } from './trash-DaB37xAz.js';
6
+ import { q as queuePdfEffect, M as MessageSquare } from './pdf-effect-queue-BJk5okWJ.js';
7
+ import { F as FileDiffPanel } from './file-diff-panel-DK13YPql.js';
8
+ import { B as Bot } from './bot-0DYntytV.js';
9
+ import { C as ChevronUp } from './index-BwRJaoTl.js';
10
+ import { v as ve$2, d as defaultExtensions, g as getEditorMarkdown, s as setEditorMarkdown, U as U$2, I as I$1 } from './NotebookEditor-C1kWaxKi.js';
11
+ import { T as Trash, A as ArrowDown } from './trash-CXvwwSe8.js';
12
12
 
13
13
  /**
14
14
  * @license lucide-react v0.511.0 - ISC
@@ -11538,7 +11538,7 @@ function SearchToolView({ toolContent, panelMode }) {
11538
11538
  }
11539
11539
 
11540
11540
  const CliToolTerminal = dynamic(
11541
- () => __vitePreload(() => import('./index-RDlNXXx1.js'),true?__vite__mapDeps([0,1,2,3]):void 0).then((mod) => mod.CliToolTerminal),
11541
+ () => __vitePreload(() => import('./index-BrFje2Uk.js'),true?__vite__mapDeps([0,1,2,3]):void 0).then((mod) => mod.CliToolTerminal),
11542
11542
  {
11543
11543
  loading: () => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex h-full items-center justify-center text-xs text-[var(--text-tertiary)]", children: "Loading terminal..." })
11544
11544
  }
@@ -18501,7 +18501,7 @@ function pickGreetingTemplate() {
18501
18501
  return GREETING_TEMPLATES[index];
18502
18502
  }
18503
18503
  const VNCViewer = dynamic(
18504
- () => __vitePreload(() => import('./VNCViewer-BgbuvWhR.js'),true?__vite__mapDeps([4,1,2,5,6,7,8,9,10,11,12,13,14]):void 0).then((mod) => mod.VNCViewer),
18504
+ () => __vitePreload(() => import('./VNCViewer-HAg9mF7M.js'),true?__vite__mapDeps([4,1,2,5,6,7,8,9,10,11,12,13,14]):void 0).then((mod) => mod.VNCViewer),
18505
18505
  {
18506
18506
  loading: () => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex h-full w-full items-center justify-center text-sm text-[var(--text-tertiary)]", children: "Loading sandbox view..." })
18507
18507
  }
@@ -1,4 +1,4 @@
1
- import { r as reactExports, c as copyToClipboard, j as jsxRuntimeExports, k as FileText, l as Search, K as ChartColumn, N as Sparkles, d as Check, e as Copy, b as cn } from './index-Nt9hS4ck.js';
1
+ import { r as reactExports, c as copyToClipboard, j as jsxRuntimeExports, k as FileText, l as Search, K as ChartColumn, N as Sparkles, d as Check, e as Copy, b as cn } from './index-D_E4281X.js';
2
2
 
3
3
  const actions = [
4
4
  {