dsh-aris-panel 0.1.0

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 (442) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +98 -0
  3. package/README_CN.md +87 -0
  4. package/dsh/checkout.patch.yml +38 -0
  5. package/dsh/client.js +634 -0
  6. package/dsh/cordis.patch.yml +44 -0
  7. package/dsh/index.mjs +76 -0
  8. package/dsh/run-status.mjs +182 -0
  9. package/dsh/scope-limits.mjs +50 -0
  10. package/dsh/workbench.mjs +291 -0
  11. package/mcp-servers/claude-review/README.md +93 -0
  12. package/mcp-servers/claude-review/run_with_claude_aws.sh +49 -0
  13. package/mcp-servers/claude-review/server.py +718 -0
  14. package/mcp-servers/codex-image2/README.md +65 -0
  15. package/mcp-servers/codex-image2/server.py +893 -0
  16. package/mcp-servers/feishu-bridge/requirements.txt +1 -0
  17. package/mcp-servers/feishu-bridge/server.py +240 -0
  18. package/mcp-servers/gemini-review/README.md +171 -0
  19. package/mcp-servers/gemini-review/server.py +1856 -0
  20. package/mcp-servers/llm-chat/requirements.txt +1 -0
  21. package/mcp-servers/llm-chat/server.py +664 -0
  22. package/mcp-servers/manual-review/README.md +133 -0
  23. package/mcp-servers/manual-review/server.py +910 -0
  24. package/mcp-servers/manual-review/ui.html +279 -0
  25. package/mcp-servers/minimax-chat/requirements.txt +1 -0
  26. package/mcp-servers/minimax-chat/server.py +381 -0
  27. package/package.json +51 -0
  28. package/skills/ablation-planner/SKILL.md +123 -0
  29. package/skills/alphaxiv/SKILL.md +196 -0
  30. package/skills/analyze-results/SKILL.md +46 -0
  31. package/skills/arxiv/SKILL.md +248 -0
  32. package/skills/auto-paper-improvement-loop/SKILL.md +651 -0
  33. package/skills/auto-review-loop/SKILL.md +1137 -0
  34. package/skills/auto-review-loop-llm/SKILL.md +259 -0
  35. package/skills/auto-review-loop-minimax/SKILL.md +302 -0
  36. package/skills/citation-audit/SKILL.md +502 -0
  37. package/skills/claims-drafting/SKILL.md +227 -0
  38. package/skills/comm-lit-review/SKILL.md +297 -0
  39. package/skills/deepxiv/SKILL.md +263 -0
  40. package/skills/dse-loop/SKILL.md +296 -0
  41. package/skills/embodiment-description/SKILL.md +129 -0
  42. package/skills/exa-search/SKILL.md +205 -0
  43. package/skills/experiment-audit/SKILL.md +311 -0
  44. package/skills/experiment-bridge/SKILL.md +376 -0
  45. package/skills/experiment-plan/SKILL.md +249 -0
  46. package/skills/experiment-queue/SKILL.md +431 -0
  47. package/skills/experiment-queue/scripts/build_manifest.py +142 -0
  48. package/skills/experiment-queue/scripts/queue_manager.py +433 -0
  49. package/skills/feishu-notify/SKILL.md +156 -0
  50. package/skills/figure-description/SKILL.md +138 -0
  51. package/skills/figure-spec/SKILL.md +262 -0
  52. package/skills/figure-spec/scripts/figure_renderer.py +799 -0
  53. package/skills/formula-derivation/SKILL.md +280 -0
  54. package/skills/gemini-search/SKILL.md +231 -0
  55. package/skills/grant-proposal/SKILL.md +698 -0
  56. package/skills/idea-creator/SKILL.md +542 -0
  57. package/skills/idea-discovery/SKILL.md +521 -0
  58. package/skills/idea-discovery-robot/SKILL.md +363 -0
  59. package/skills/integrity-forensics/SKILL.md +284 -0
  60. package/skills/interview-cheatsheet/SKILL.md +245 -0
  61. package/skills/invention-structuring/SKILL.md +188 -0
  62. package/skills/jurisdiction-format/SKILL.md +192 -0
  63. package/skills/kill-argument/SKILL.md +437 -0
  64. package/skills/mermaid-diagram/SKILL.md +419 -0
  65. package/skills/meta-apply/SKILL.md +141 -0
  66. package/skills/meta-optimize/SKILL.md +437 -0
  67. package/skills/monitor-experiment/SKILL.md +140 -0
  68. package/skills/novelty-check/SKILL.md +101 -0
  69. package/skills/openalex/SKILL.md +237 -0
  70. package/skills/overleaf-sync/SKILL.md +220 -0
  71. package/skills/paper-claim-audit/SKILL.md +348 -0
  72. package/skills/paper-compile/SKILL.md +266 -0
  73. package/skills/paper-figure/SKILL.md +312 -0
  74. package/skills/paper-illustration/SKILL.md +736 -0
  75. package/skills/paper-illustration-image2/SKILL.md +391 -0
  76. package/skills/paper-illustration-image2/scripts/paper_illustration_image2.py +255 -0
  77. package/skills/paper-plan/SKILL.md +386 -0
  78. package/skills/paper-poster/SKILL.md +19 -0
  79. package/skills/paper-poster-html/DESIGN_FINAL.md +176 -0
  80. package/skills/paper-poster-html/IMPLEMENTATION_CONVENTIONS.md +161 -0
  81. package/skills/paper-poster-html/LICENSES/posterly-MIT.txt +21 -0
  82. package/skills/paper-poster-html/NOTICE.md +57 -0
  83. package/skills/paper-poster-html/SKILL.md +323 -0
  84. package/skills/paper-poster-html/scripts/_posterly/__init__.py +0 -0
  85. package/skills/paper-poster-html/scripts/_posterly/canvas.py +200 -0
  86. package/skills/paper-poster-html/scripts/_posterly/measure.py +588 -0
  87. package/skills/paper-poster-html/scripts/_posterly/polish.py +498 -0
  88. package/skills/paper-poster-html/scripts/_posterly/preflight.py +489 -0
  89. package/skills/paper-poster-html/scripts/_posterly/render.py +215 -0
  90. package/skills/paper-poster-html/scripts/_posterly/textutil.py +16 -0
  91. package/skills/paper-poster-html/scripts/_posterly/verify_final.py +171 -0
  92. package/skills/paper-poster-html/scripts/asset_check.py +897 -0
  93. package/skills/paper-poster-html/scripts/extract_pdf_figures.py +666 -0
  94. package/skills/paper-poster-html/scripts/poster_check.py +251 -0
  95. package/skills/paper-poster-html/scripts/preprocess_figures.py +238 -0
  96. package/skills/paper-poster-html/scripts/render_preview.py +217 -0
  97. package/skills/paper-poster-html/scripts/run_gates.py +556 -0
  98. package/skills/paper-poster-html/scripts/style_check.py +1324 -0
  99. package/skills/paper-poster-html/templates/COMPONENTS.md +462 -0
  100. package/skills/paper-poster-html/templates/README.md +170 -0
  101. package/skills/paper-poster-html/templates/landscape_4col.html +1032 -0
  102. package/skills/paper-poster-html/templates/landscape_hero.html +1046 -0
  103. package/skills/paper-poster-html/templates/portrait_2col.html +947 -0
  104. package/skills/paper-poster-html/templates/tokens/acl.json +9 -0
  105. package/skills/paper-poster-html/templates/tokens/cvpr.json +9 -0
  106. package/skills/paper-poster-html/templates/tokens/generic.json +9 -0
  107. package/skills/paper-poster-html/templates/tokens/iclr.json +9 -0
  108. package/skills/paper-poster-html/templates/tokens/icml.json +9 -0
  109. package/skills/paper-poster-html/templates/tokens/neurips.json +9 -0
  110. package/skills/paper-slides/SKILL.md +635 -0
  111. package/skills/paper-talk/SKILL.md +381 -0
  112. package/skills/paper-write/SKILL.md +604 -0
  113. package/skills/paper-write/templates/IEEEtran.bst +2409 -0
  114. package/skills/paper-write/templates/IEEEtran.cls +6347 -0
  115. package/skills/paper-write/templates/iclr2026.tex +84 -0
  116. package/skills/paper-write/templates/icml2025.tex +87 -0
  117. package/skills/paper-write/templates/ieee_conference.tex +89 -0
  118. package/skills/paper-write/templates/ieee_journal.tex +93 -0
  119. package/skills/paper-write/templates/math_commands.tex +48 -0
  120. package/skills/paper-write/templates/neurips2025.tex +80 -0
  121. package/skills/paper-writing/SKILL.md +916 -0
  122. package/skills/patent-novelty-check/SKILL.md +153 -0
  123. package/skills/patent-pipeline/SKILL.md +344 -0
  124. package/skills/patent-review/SKILL.md +203 -0
  125. package/skills/pixel-art/SKILL.md +137 -0
  126. package/skills/prior-art-search/SKILL.md +146 -0
  127. package/skills/proof-checker/SKILL.md +866 -0
  128. package/skills/proof-orchestrator/NOTICE.md +24 -0
  129. package/skills/proof-orchestrator/SKILL.md +254 -0
  130. package/skills/proof-orchestrator/references/audit-output-contract.md +126 -0
  131. package/skills/proof-orchestrator/references/deepseek-routing.md +74 -0
  132. package/skills/proof-orchestrator/references/dispatch-prompts.md +227 -0
  133. package/skills/proof-orchestrator/references/notation-audit.md +135 -0
  134. package/skills/proof-orchestrator/references/proof-audit-rubric.md +70 -0
  135. package/skills/proof-orchestrator/references/stress-tests.md +38 -0
  136. package/skills/proof-writer/SKILL.md +223 -0
  137. package/skills/qzcli/SKILL.md +324 -0
  138. package/skills/rebuttal/SKILL.md +376 -0
  139. package/skills/render-html/SKILL.md +316 -0
  140. package/skills/render-html/scripts/render_html.py +1006 -0
  141. package/skills/render-html/scripts/templates/academic.html +703 -0
  142. package/skills/render-html/scripts/templates/dashboard.html +333 -0
  143. package/skills/research-lit/SKILL.md +756 -0
  144. package/skills/research-pipeline/SKILL.md +384 -0
  145. package/skills/research-refine/SKILL.md +770 -0
  146. package/skills/research-refine-pipeline/SKILL.md +186 -0
  147. package/skills/research-review/SKILL.md +198 -0
  148. package/skills/research-wiki/SKILL.md +461 -0
  149. package/skills/resubmit-pipeline/SKILL.md +447 -0
  150. package/skills/result-to-claim/SKILL.md +311 -0
  151. package/skills/run-experiment/SKILL.md +313 -0
  152. package/skills/semantic-scholar/SKILL.md +236 -0
  153. package/skills/serverless-modal/SKILL.md +335 -0
  154. package/skills/shared-references/acceptance-gate.md +324 -0
  155. package/skills/shared-references/assurance-contract.md +248 -0
  156. package/skills/shared-references/capture-antipatterns.md +78 -0
  157. package/skills/shared-references/citation-discipline.md +583 -0
  158. package/skills/shared-references/compute-env-contract.md +163 -0
  159. package/skills/shared-references/effort-contract.md +183 -0
  160. package/skills/shared-references/evidence-precheck.md +65 -0
  161. package/skills/shared-references/experiment-integrity.md +49 -0
  162. package/skills/shared-references/external-cadence.md +326 -0
  163. package/skills/shared-references/fan-out-pattern.md +366 -0
  164. package/skills/shared-references/injection-hygiene.md +127 -0
  165. package/skills/shared-references/integration-contract.md +461 -0
  166. package/skills/shared-references/output-composition.md +93 -0
  167. package/skills/shared-references/output-language.md +45 -0
  168. package/skills/shared-references/output-manifest.md +49 -0
  169. package/skills/shared-references/output-versioning.md +111 -0
  170. package/skills/shared-references/patent-format-cn.md +199 -0
  171. package/skills/shared-references/patent-format-ep.md +173 -0
  172. package/skills/shared-references/patent-format-us.md +161 -0
  173. package/skills/shared-references/patent-writing-principles.md +197 -0
  174. package/skills/shared-references/prior-art-databases.md +141 -0
  175. package/skills/shared-references/resumable-runs.md +109 -0
  176. package/skills/shared-references/review-scope-limits.md +81 -0
  177. package/skills/shared-references/review-tracing.md +391 -0
  178. package/skills/shared-references/reviewer-independence.md +79 -0
  179. package/skills/shared-references/reviewer-routing.md +852 -0
  180. package/skills/shared-references/skill-governance.md +104 -0
  181. package/skills/shared-references/taste-calibration.md +85 -0
  182. package/skills/shared-references/venue-checklists.md +114 -0
  183. package/skills/shared-references/wiki-helper-resolution.md +134 -0
  184. package/skills/shared-references/writing-principles.md +525 -0
  185. package/skills/skills-codex/README.md +102 -0
  186. package/skills/skills-codex/README_CN.md +100 -0
  187. package/skills/skills-codex/ablation-planner/SKILL.md +126 -0
  188. package/skills/skills-codex/alphaxiv/SKILL.md +186 -0
  189. package/skills/skills-codex/analyze-results/SKILL.md +45 -0
  190. package/skills/skills-codex/arxiv/SKILL.md +210 -0
  191. package/skills/skills-codex/auto-paper-improvement-loop/SKILL.md +574 -0
  192. package/skills/skills-codex/auto-review-loop/SKILL.md +500 -0
  193. package/skills/skills-codex/auto-review-loop-llm/SKILL.md +247 -0
  194. package/skills/skills-codex/auto-review-loop-minimax/SKILL.md +290 -0
  195. package/skills/skills-codex/citation-audit/SKILL.md +504 -0
  196. package/skills/skills-codex/claims-drafting/SKILL.md +239 -0
  197. package/skills/skills-codex/comm-lit-review/SKILL.md +299 -0
  198. package/skills/skills-codex/comm-lit-review/references/domain-taxonomy.md +57 -0
  199. package/skills/skills-codex/comm-lit-review/references/output-template.md +37 -0
  200. package/skills/skills-codex/comm-lit-review/references/source-policy.md +99 -0
  201. package/skills/skills-codex/comm-lit-review/references/venue-tiering.md +112 -0
  202. package/skills/skills-codex/deepxiv/SKILL.md +142 -0
  203. package/skills/skills-codex/dse-loop/SKILL.md +285 -0
  204. package/skills/skills-codex/embodiment-description/SKILL.md +129 -0
  205. package/skills/skills-codex/exa-search/SKILL.md +192 -0
  206. package/skills/skills-codex/experiment-audit/SKILL.md +286 -0
  207. package/skills/skills-codex/experiment-bridge/SKILL.md +356 -0
  208. package/skills/skills-codex/experiment-plan/SKILL.md +249 -0
  209. package/skills/skills-codex/experiment-queue/SKILL.md +401 -0
  210. package/skills/skills-codex/feishu-notify/SKILL.md +155 -0
  211. package/skills/skills-codex/figure-description/SKILL.md +138 -0
  212. package/skills/skills-codex/figure-spec/SKILL.md +252 -0
  213. package/skills/skills-codex/formula-derivation/SKILL.md +280 -0
  214. package/skills/skills-codex/gemini-search/SKILL.md +205 -0
  215. package/skills/skills-codex/grant-proposal/SKILL.md +626 -0
  216. package/skills/skills-codex/idea-creator/SKILL.md +405 -0
  217. package/skills/skills-codex/idea-discovery/SKILL.md +475 -0
  218. package/skills/skills-codex/idea-discovery-robot/SKILL.md +362 -0
  219. package/skills/skills-codex/integrity-forensics/SKILL.md +106 -0
  220. package/skills/skills-codex/interview-cheatsheet/SKILL.md +245 -0
  221. package/skills/skills-codex/invention-structuring/SKILL.md +188 -0
  222. package/skills/skills-codex/jurisdiction-format/SKILL.md +192 -0
  223. package/skills/skills-codex/kill-argument/SKILL.md +403 -0
  224. package/skills/skills-codex/mermaid-diagram/SKILL.md +379 -0
  225. package/skills/skills-codex/meta-apply/SKILL.md +154 -0
  226. package/skills/skills-codex/meta-optimize/SKILL.md +348 -0
  227. package/skills/skills-codex/monitor-experiment/SKILL.md +98 -0
  228. package/skills/skills-codex/novelty-check/SKILL.md +89 -0
  229. package/skills/skills-codex/openalex/SKILL.md +228 -0
  230. package/skills/skills-codex/overleaf-sync/SKILL.md +220 -0
  231. package/skills/skills-codex/paper-claim-audit/SKILL.md +350 -0
  232. package/skills/skills-codex/paper-compile/SKILL.md +253 -0
  233. package/skills/skills-codex/paper-figure/SKILL.md +311 -0
  234. package/skills/skills-codex/paper-illustration/SKILL.md +690 -0
  235. package/skills/skills-codex/paper-illustration-image2/SKILL.md +383 -0
  236. package/skills/skills-codex/paper-illustration-image2/scripts/paper_illustration_image2.py +255 -0
  237. package/skills/skills-codex/paper-plan/SKILL.md +278 -0
  238. package/skills/skills-codex/paper-poster/SKILL.md +19 -0
  239. package/skills/skills-codex/paper-poster-html/SKILL.md +377 -0
  240. package/skills/skills-codex/paper-slides/SKILL.md +571 -0
  241. package/skills/skills-codex/paper-talk/SKILL.md +381 -0
  242. package/skills/skills-codex/paper-write/SKILL.md +411 -0
  243. package/skills/skills-codex/paper-write/templates/IEEEtran.bst +2409 -0
  244. package/skills/skills-codex/paper-write/templates/IEEEtran.cls +6347 -0
  245. package/skills/skills-codex/paper-write/templates/aaai2026.bst +1493 -0
  246. package/skills/skills-codex/paper-write/templates/aaai2026.sty +315 -0
  247. package/skills/skills-codex/paper-write/templates/aaai2026.tex +952 -0
  248. package/skills/skills-codex/paper-write/templates/acl.sty +312 -0
  249. package/skills/skills-codex/paper-write/templates/acl2026.tex +377 -0
  250. package/skills/skills-codex/paper-write/templates/acl_natbib.bst +1940 -0
  251. package/skills/skills-codex/paper-write/templates/acm.bst +3081 -0
  252. package/skills/skills-codex/paper-write/templates/acm_mm2026.tex +204 -0
  253. package/skills/skills-codex/paper-write/templates/acmart.cls +3520 -0
  254. package/skills/skills-codex/paper-write/templates/cvpr.bst +1448 -0
  255. package/skills/skills-codex/paper-write/templates/cvpr.sty +508 -0
  256. package/skills/skills-codex/paper-write/templates/cvpr2026.tex +63 -0
  257. package/skills/skills-codex/paper-write/templates/iclr2026.tex +84 -0
  258. package/skills/skills-codex/paper-write/templates/iclr2026_conference.bst +1440 -0
  259. package/skills/skills-codex/paper-write/templates/iclr2026_conference.sty +246 -0
  260. package/skills/skills-codex/paper-write/templates/icml2026.sty +767 -0
  261. package/skills/skills-codex/paper-write/templates/icml2026.tex +662 -0
  262. package/skills/skills-codex/paper-write/templates/ieee_conference.tex +89 -0
  263. package/skills/skills-codex/paper-write/templates/ieee_journal.tex +93 -0
  264. package/skills/skills-codex/paper-write/templates/math_commands.tex +48 -0
  265. package/skills/skills-codex/paper-write/templates/neurips2026.tex +493 -0
  266. package/skills/skills-codex/paper-write/templates/neurips_2026.sty +437 -0
  267. package/skills/skills-codex/paper-writing/SKILL.md +731 -0
  268. package/skills/skills-codex/patent-novelty-check/SKILL.md +153 -0
  269. package/skills/skills-codex/patent-pipeline/SKILL.md +344 -0
  270. package/skills/skills-codex/patent-review/SKILL.md +202 -0
  271. package/skills/skills-codex/pixel-art/SKILL.md +139 -0
  272. package/skills/skills-codex/prior-art-search/SKILL.md +146 -0
  273. package/skills/skills-codex/proof-checker/SKILL.md +554 -0
  274. package/skills/skills-codex/proof-orchestrator/SKILL.md +260 -0
  275. package/skills/skills-codex/proof-orchestrator/references/audit-output-contract.md +126 -0
  276. package/skills/skills-codex/proof-orchestrator/references/deepseek-routing.md +76 -0
  277. package/skills/skills-codex/proof-orchestrator/references/dispatch-prompts.md +227 -0
  278. package/skills/skills-codex/proof-orchestrator/references/notation-audit.md +135 -0
  279. package/skills/skills-codex/proof-orchestrator/references/proof-audit-rubric.md +70 -0
  280. package/skills/skills-codex/proof-orchestrator/references/stress-tests.md +38 -0
  281. package/skills/skills-codex/proof-writer/SKILL.md +222 -0
  282. package/skills/skills-codex/qzcli/SKILL.md +324 -0
  283. package/skills/skills-codex/rebuttal/SKILL.md +305 -0
  284. package/skills/skills-codex/render-html/SKILL.md +305 -0
  285. package/skills/skills-codex/render-html/scripts/__pycache__/render_html.cpython-314.pyc +0 -0
  286. package/skills/skills-codex/render-html/scripts/render_html.py +909 -0
  287. package/skills/skills-codex/render-html/scripts/templates/academic.html +342 -0
  288. package/skills/skills-codex/render-html/scripts/templates/dashboard.html +333 -0
  289. package/skills/skills-codex/research-lit/SKILL.md +464 -0
  290. package/skills/skills-codex/research-pipeline/SKILL.md +340 -0
  291. package/skills/skills-codex/research-refine/SKILL.md +721 -0
  292. package/skills/skills-codex/research-refine-pipeline/SKILL.md +186 -0
  293. package/skills/skills-codex/research-review/SKILL.md +135 -0
  294. package/skills/skills-codex/research-wiki/SKILL.md +421 -0
  295. package/skills/skills-codex/resubmit-pipeline/SKILL.md +444 -0
  296. package/skills/skills-codex/result-to-claim/SKILL.md +246 -0
  297. package/skills/skills-codex/run-experiment/SKILL.md +236 -0
  298. package/skills/skills-codex/semantic-scholar/SKILL.md +219 -0
  299. package/skills/skills-codex/serverless-modal/SKILL.md +335 -0
  300. package/skills/skills-codex/shared-references/acceptance-gate.md +336 -0
  301. package/skills/skills-codex/shared-references/assurance-contract.md +139 -0
  302. package/skills/skills-codex/shared-references/capture-antipatterns.md +84 -0
  303. package/skills/skills-codex/shared-references/citation-discipline.md +452 -0
  304. package/skills/skills-codex/shared-references/compute-env-contract.md +163 -0
  305. package/skills/skills-codex/shared-references/effort-contract.md +143 -0
  306. package/skills/skills-codex/shared-references/evidence-precheck.md +73 -0
  307. package/skills/skills-codex/shared-references/experiment-integrity.md +49 -0
  308. package/skills/skills-codex/shared-references/external-cadence.md +334 -0
  309. package/skills/skills-codex/shared-references/fan-out-pattern.md +375 -0
  310. package/skills/skills-codex/shared-references/injection-hygiene.md +132 -0
  311. package/skills/skills-codex/shared-references/integration-contract.md +372 -0
  312. package/skills/skills-codex/shared-references/output-composition.md +98 -0
  313. package/skills/skills-codex/shared-references/output-language.md +45 -0
  314. package/skills/skills-codex/shared-references/output-manifest.md +40 -0
  315. package/skills/skills-codex/shared-references/output-versioning.md +111 -0
  316. package/skills/skills-codex/shared-references/patent-format-cn.md +199 -0
  317. package/skills/skills-codex/shared-references/patent-format-ep.md +173 -0
  318. package/skills/skills-codex/shared-references/patent-format-us.md +161 -0
  319. package/skills/skills-codex/shared-references/patent-writing-principles.md +197 -0
  320. package/skills/skills-codex/shared-references/prior-art-databases.md +141 -0
  321. package/skills/skills-codex/shared-references/resumable-runs.md +125 -0
  322. package/skills/skills-codex/shared-references/review-scope-limits.md +81 -0
  323. package/skills/skills-codex/shared-references/review-tracing.md +144 -0
  324. package/skills/skills-codex/shared-references/reviewer-independence.md +66 -0
  325. package/skills/skills-codex/shared-references/reviewer-routing.md +128 -0
  326. package/skills/skills-codex/shared-references/skill-governance.md +119 -0
  327. package/skills/skills-codex/shared-references/taste-calibration.md +90 -0
  328. package/skills/skills-codex/shared-references/venue-checklists.md +73 -0
  329. package/skills/skills-codex/shared-references/wiki-helper-resolution.md +69 -0
  330. package/skills/skills-codex/shared-references/writing-principles.md +525 -0
  331. package/skills/skills-codex/slides-polish/SKILL.md +563 -0
  332. package/skills/skills-codex/specification-writing/SKILL.md +211 -0
  333. package/skills/skills-codex/system-profile/SKILL.md +103 -0
  334. package/skills/skills-codex/training-check/SKILL.md +83 -0
  335. package/skills/skills-codex/vast-gpu/SKILL.md +394 -0
  336. package/skills/skills-codex/web-debug-search/SKILL.md +334 -0
  337. package/skills/skills-codex/wiki-enrich/SKILL.md +255 -0
  338. package/skills/skills-codex/writing-systems-papers/SKILL.md +184 -0
  339. package/skills/skills-codex-claude-review/README.md +79 -0
  340. package/skills/skills-codex-claude-review/README_CN.md +78 -0
  341. package/skills/skills-codex-claude-review/auto-paper-improvement-loop/SKILL.md +581 -0
  342. package/skills/skills-codex-claude-review/auto-review-loop/SKILL.md +510 -0
  343. package/skills/skills-codex-claude-review/novelty-check/SKILL.md +102 -0
  344. package/skills/skills-codex-claude-review/paper-figure/SKILL.md +319 -0
  345. package/skills/skills-codex-claude-review/paper-plan/SKILL.md +287 -0
  346. package/skills/skills-codex-claude-review/paper-write/SKILL.md +420 -0
  347. package/skills/skills-codex-claude-review/research-refine/SKILL.md +732 -0
  348. package/skills/skills-codex-claude-review/research-review/SKILL.md +149 -0
  349. package/skills/skills-codex-gemini-review/README.md +176 -0
  350. package/skills/skills-codex-gemini-review/README_CN.md +175 -0
  351. package/skills/skills-codex-gemini-review/auto-paper-improvement-loop/SKILL.md +331 -0
  352. package/skills/skills-codex-gemini-review/auto-review-loop/SKILL.md +304 -0
  353. package/skills/skills-codex-gemini-review/grant-proposal/SKILL.md +630 -0
  354. package/skills/skills-codex-gemini-review/idea-creator/SKILL.md +263 -0
  355. package/skills/skills-codex-gemini-review/idea-discovery/SKILL.md +275 -0
  356. package/skills/skills-codex-gemini-review/idea-discovery-robot/SKILL.md +365 -0
  357. package/skills/skills-codex-gemini-review/novelty-check/SKILL.md +92 -0
  358. package/skills/skills-codex-gemini-review/paper-figure/SKILL.md +289 -0
  359. package/skills/skills-codex-gemini-review/paper-plan/SKILL.md +265 -0
  360. package/skills/skills-codex-gemini-review/paper-poster-html/SKILL.md +102 -0
  361. package/skills/skills-codex-gemini-review/paper-slides/SKILL.md +582 -0
  362. package/skills/skills-codex-gemini-review/paper-write/SKILL.md +346 -0
  363. package/skills/skills-codex-gemini-review/paper-writing/SKILL.md +312 -0
  364. package/skills/skills-codex-gemini-review/research-refine/SKILL.md +674 -0
  365. package/skills/skills-codex-gemini-review/research-review/SKILL.md +112 -0
  366. package/skills/slides-polish/SKILL.md +565 -0
  367. package/skills/specification-writing/SKILL.md +211 -0
  368. package/skills/system-profile/SKILL.md +103 -0
  369. package/skills/training-check/SKILL.md +132 -0
  370. package/skills/vast-gpu/SKILL.md +394 -0
  371. package/skills/web-debug-search/SKILL.md +334 -0
  372. package/skills/wiki-enrich/SKILL.md +257 -0
  373. package/skills/writing-systems-papers/SKILL.md +184 -0
  374. package/templates/CLAUDE_MD_TEMPLATE.md +29 -0
  375. package/templates/EXPERIMENT_LOG_TEMPLATE.md +47 -0
  376. package/templates/EXPERIMENT_PLAN_TEMPLATE.md +51 -0
  377. package/templates/EXPERIMENT_PLAN_TEMPLATE_CN.md +53 -0
  378. package/templates/FINDINGS_TEMPLATE.md +52 -0
  379. package/templates/IDEA_CANDIDATES_TEMPLATE.md +47 -0
  380. package/templates/IDEA_CANDIDATES_TEMPLATE_CN.md +47 -0
  381. package/templates/INVENTION_BRIEF_TEMPLATE.md +87 -0
  382. package/templates/MANIFEST_TEMPLATE.md +7 -0
  383. package/templates/NARRATIVE_REPORT_TEMPLATE.md +49 -0
  384. package/templates/PAPER_PLAN_TEMPLATE.md +47 -0
  385. package/templates/PATENT_CLAIMS_TEMPLATE.md +78 -0
  386. package/templates/PATENT_SPECIFICATION_TEMPLATE.md +68 -0
  387. package/templates/README.md +57 -0
  388. package/templates/RESEARCH_BRIEF_TEMPLATE.md +35 -0
  389. package/templates/RESEARCH_BRIEF_TEMPLATE_CN.md +41 -0
  390. package/templates/RESEARCH_CONTRACT_TEMPLATE.md +60 -0
  391. package/templates/claude-hooks/corpus_write_guard.json +16 -0
  392. package/templates/claude-hooks/corpus_write_guard.py +85 -0
  393. package/templates/claude-hooks/meta_logging.json +74 -0
  394. package/templates/gitignore-trace.txt +3 -0
  395. package/tools/__pycache__/check_skills_inventory.cpython-314.pyc +0 -0
  396. package/tools/arxiv_fetch.py +311 -0
  397. package/tools/capture_filter.py +126 -0
  398. package/tools/check_skills_inventory.py +273 -0
  399. package/tools/convert_skills_to_llm_chat.py +282 -0
  400. package/tools/copilot_native_evidence.py +818 -0
  401. package/tools/deepxiv_fetch.py +213 -0
  402. package/tools/evidence_check.py +212 -0
  403. package/tools/exa_search.py +425 -0
  404. package/tools/experiment_queue/README.md +118 -0
  405. package/tools/experiment_queue/build_manifest.py +44 -0
  406. package/tools/experiment_queue/queue_manager.py +44 -0
  407. package/tools/extract_paper_style.py +560 -0
  408. package/tools/figure_renderer.py +69 -0
  409. package/tools/forensics_gate.py +669 -0
  410. package/tools/generate_codex_claude_review_overrides.py +299 -0
  411. package/tools/idea_discovery_gate.py +256 -0
  412. package/tools/install_aris.ps1 +1372 -0
  413. package/tools/install_aris.sh +1370 -0
  414. package/tools/install_aris_codex.sh +1023 -0
  415. package/tools/install_aris_copilot.sh +1052 -0
  416. package/tools/iteration_log.py +143 -0
  417. package/tools/lint_skills_helpers.sh +84 -0
  418. package/tools/meta_opt/check_ready.sh +80 -0
  419. package/tools/meta_opt/log_event.sh +91 -0
  420. package/tools/meta_opt/trigger_eval.py +280 -0
  421. package/tools/meta_opt/trigger_evals.sample.json +28 -0
  422. package/tools/openalex_fetch.py +326 -0
  423. package/tools/overleaf_audit.sh +104 -0
  424. package/tools/overleaf_setup.sh +150 -0
  425. package/tools/paper_illustration_image2.py +62 -0
  426. package/tools/provenance.py +294 -0
  427. package/tools/research_wiki.py +1720 -0
  428. package/tools/review_gate.py +502 -0
  429. package/tools/run_state.py +399 -0
  430. package/tools/save_trace.sh +477 -0
  431. package/tools/semantic_scholar_fetch.py +438 -0
  432. package/tools/skill-groups.tsv +116 -0
  433. package/tools/skill_picker.py +238 -0
  434. package/tools/smart_update.ps1 +521 -0
  435. package/tools/smart_update.sh +591 -0
  436. package/tools/smart_update_codex.sh +419 -0
  437. package/tools/smart_update_copilot.sh +605 -0
  438. package/tools/threat_scan.py +222 -0
  439. package/tools/verify_paper_audits.sh +487 -0
  440. package/tools/verify_papers.py +613 -0
  441. package/tools/verify_wiki_coverage.sh +176 -0
  442. package/tools/watchdog.py +485 -0
@@ -0,0 +1,756 @@
1
+ ---
2
+ name: research-lit
3
+ description: Search and analyze research papers, find related work, summarize key ideas. Use when user says "find papers", "related work", "literature review", "what does this paper say", or needs to understand academic papers.
4
+ argument-hint: "[paper-topic-or-url]"
5
+ allowed-tools: Bash(*), Read, Glob, Grep, WebSearch, WebFetch, Write, Agent, mcp__zotero__*, mcp__obsidian-vault__*
6
+ ---
7
+
8
+ # Research Literature Review
9
+
10
+ Research topic: $ARGUMENTS
11
+
12
+ ## Constants
13
+
14
+
15
+ - **PAPER_LIBRARY** — Local directory containing user's paper collection (PDFs). Check these paths in order:
16
+ 1. `papers/` in the current project directory
17
+ 2. `literature/` in the current project directory
18
+ 3. Custom path specified by user in `CLAUDE.md` under `## Paper Library`
19
+ - **MAX_LOCAL_PAPERS = 20** — Maximum number of local PDFs to scan (read first 3 pages each). If more are found, prioritize by filename relevance to the topic.
20
+ - **SOURCES = `all`** — Which literature sources to search. Options: `zotero`, `obsidian`, `local`, `web`, `semantic-scholar`, `deepxiv`, `exa`, `gemini`, `openalex`, `all`. Full source table and selection rules: see `## Data Sources` below.
21
+ - **ARXIV_DOWNLOAD = false** — When `true`, download top 3-5 most relevant arXiv PDFs to PAPER_LIBRARY after search. When `false` (default), only fetch metadata (title, abstract, authors) via arXiv API — no files are downloaded.
22
+ - **ARXIV_MAX_DOWNLOAD = 5** — Maximum number of PDFs to download when `ARXIV_DOWNLOAD = true`.
23
+
24
+ > 💡 Overrides:
25
+ > - `/research-lit "topic" — paper library: ~/my_papers/` — custom local PDF path
26
+ > - `/research-lit "topic" — sources: zotero, local` — only search Zotero + local PDFs
27
+ > - `/research-lit "topic" — sources: web` — only search the web (skip all local)
28
+ > - `/research-lit "topic" — sources: web, semantic-scholar` — also search Semantic Scholar for published venue papers (IEEE, ACM, etc.)
29
+ > - `/research-lit "topic" — sources: all, deepxiv` — use default sources plus DeepXiv
30
+ > - `/research-lit "topic" — arxiv download: true` — download top relevant arXiv PDFs
31
+ > - `/research-lit "topic" — arxiv download: true, max download: 10` — download up to 10 PDFs
32
+
33
+ ## Data Sources
34
+
35
+ This skill checks multiple sources **in priority order**. All are optional — if a source is not configured or not requested, skip it silently.
36
+
37
+ ### Source Selection
38
+
39
+ Parse `$ARGUMENTS` for a `— sources:` directive:
40
+ - **If `— sources:` is specified**: Only search the listed sources (comma-separated). Valid values: `zotero`, `obsidian`, `local`, `web`, `semantic-scholar`, `deepxiv`, `exa`, `gemini`, `openalex`, `all`.
41
+ - **If not specified**: Default to `all` — search every available source in priority order (`semantic-scholar`, `deepxiv`, `exa`, `gemini`, and `openalex` are **excluded** from `all`; they must be explicitly listed).
42
+
43
+ Examples:
44
+ ```
45
+ /research-lit "diffusion models" → all (default, no S2)
46
+ /research-lit "diffusion models" — sources: all → all (default, no S2)
47
+ /research-lit "diffusion models" — sources: zotero → Zotero only
48
+ /research-lit "diffusion models" — sources: zotero, web → Zotero + web
49
+ /research-lit "diffusion models" — sources: local → local PDFs only
50
+ /research-lit "topic" — sources: obsidian, local, web → skip Zotero
51
+ /research-lit "topic" — sources: web, semantic-scholar → web + S2 API (IEEE/ACM venue papers)
52
+ /research-lit "topic" — sources: deepxiv → DeepXiv only
53
+ /research-lit "topic" — sources: all, deepxiv → default sources + DeepXiv
54
+ /research-lit "topic" — sources: all, semantic-scholar → all + S2 API
55
+ /research-lit "topic" — sources: exa → Exa only (broad web + content extraction)
56
+ /research-lit "topic" — sources: all, exa → default sources + Exa web search
57
+ /research-lit "topic" — sources: gemini → Gemini only (AI-powered broad discovery)
58
+ /research-lit "topic" — sources: all, gemini → default sources + Gemini discovery
59
+ /research-lit "topic" — sources: gemini, semantic-scholar → Gemini + S2 (broad discovery + venue metadata)
60
+ /research-lit "topic" — sources: openalex → OpenAlex only (open citation graph + institutions)
61
+ /research-lit "topic" — sources: semantic-scholar, openalex → S2 + OpenAlex (complementary metadata)
62
+ ```
63
+
64
+ ### Source Table
65
+
66
+ | Priority | Source | ID | How to detect | What it provides |
67
+ |----------|--------|----|---------------|-----------------|
68
+ | 1 | **Zotero** (via MCP) | `zotero` | Try calling any `mcp__zotero__*` tool — if unavailable, skip | Collections, tags, annotations, PDF highlights, BibTeX, semantic search |
69
+ | 2 | **Obsidian** (via MCP) | `obsidian` | Try calling any `mcp__obsidian-vault__*` tool — if unavailable, skip | Research notes, paper summaries, tagged references, wikilinks |
70
+ | 3 | **Local PDFs** | `local` | `Glob: papers/**/*.pdf, literature/**/*.pdf` | Raw PDF content (first 3 pages) |
71
+ | 4 | **Web search** | `web` | Always available (WebSearch) | arXiv, Semantic Scholar, Google Scholar |
72
+ | 5 | **Semantic Scholar API** | `semantic-scholar` | `$S2_FETCHER` resolves (canonical name `semantic_scholar_fetch.py`, per integration-contract §2) | Published venue papers (IEEE, ACM, Springer) with structured metadata: citation counts, venue info, TLDR. **Only runs when explicitly requested** via `— sources: semantic-scholar` or `— sources: web, semantic-scholar` |
73
+ | 6 | **DeepXiv CLI** | `deepxiv` | `$DEEPXIV_FETCHER` resolves (canonical name `deepxiv_fetch.py`, per integration-contract §2) **and** `deepxiv` CLI present (`command -v deepxiv`) | Progressive paper retrieval: search, brief, head, section, trending, web search. **Only runs when explicitly requested** via `— sources: deepxiv` or `— sources: all, deepxiv` |
74
+ | 7 | **Exa Search** | `exa` | `$EXA_FETCHER` resolves (canonical name `exa_search.py`, per integration-contract §2); fetcher handles `exa-py` SDK + API key internally | AI-powered broad web search with content extraction (highlights, text, summaries). Covers blogs, docs, news, companies, and research papers beyond arXiv/S2. **Only runs when explicitly requested** via `— sources: exa` or `— sources: all, exa` |
75
+ | 8 | **Gemini** (MCP / CLI) | `gemini` | `mcp__gemini-cli__ask-gemini` tool available, or `gemini` CLI installed | AI-powered broad literature discovery — decomposes topics into sub-problems, aliases, and variants for wider retrieval. Prefers MCP, falls back to CLI. **Only runs when explicitly requested** via `— sources: gemini` or `— sources: all, gemini` |
76
+ | 9 | **OpenAlex** | `openalex` | `$OPENALEX_FETCHER` resolves (canonical name `openalex_fetch.py`, per integration-contract §2) **and** Python `requests` module importable | Open citation graph with institutional affiliations, funding data, and comprehensive metadata across 250M+ works. Fully open API. **Only runs when explicitly requested** via `— sources: openalex` or `— sources: all, openalex` |
77
+
78
+ > **Graceful degradation**: If no MCP servers are configured, the skill works exactly as before (local PDFs + web search). Zotero and Obsidian are pure additions.
79
+
80
+ ## Workflow
81
+
82
+ ### Step 0a: Search Zotero Library (if available)
83
+
84
+ **Skip this step entirely if Zotero MCP is not configured.**
85
+
86
+ Try calling a Zotero MCP tool (e.g., search). If it succeeds:
87
+
88
+ 1. **Search by topic**: Use the Zotero search tool to find papers matching the research topic
89
+ 2. **Read collections**: Check if the user has a relevant collection/folder for this topic
90
+ 3. **Extract annotations**: For highly relevant papers, pull PDF highlights and notes — these represent what the user found important
91
+ 4. **Export BibTeX**: Get citation data for relevant papers (useful for `/paper-write` later)
92
+ 5. **Compile results**: For each relevant Zotero entry, extract:
93
+ - Title, authors, year, venue
94
+ - User's annotations/highlights (if any)
95
+ - Tags the user assigned
96
+ - Which collection it belongs to
97
+
98
+ > 📚 Zotero annotations are gold — they show what the user personally highlighted as important, which is far more valuable than generic summaries.
99
+
100
+ ### Step 0b: Search Obsidian Vault (if available)
101
+
102
+ **Skip this step entirely if Obsidian MCP is not configured.**
103
+
104
+ Try calling an Obsidian MCP tool (e.g., search). If it succeeds:
105
+
106
+ 1. **Search vault**: Search for notes related to the research topic
107
+ 2. **Check tags**: Look for notes tagged with relevant topics (e.g., `#diffusion-models`, `#paper-review`)
108
+ 3. **Read research notes**: For relevant notes, extract the user's own summaries and insights
109
+ 4. **Follow links**: If notes link to other relevant notes (wikilinks), follow them for additional context
110
+ 5. **Compile results**: For each relevant note:
111
+ - Note title and path
112
+ - User's summary/insights
113
+ - Links to other notes (research graph)
114
+ - Any frontmatter metadata (paper URL, status, rating)
115
+
116
+ > 📝 Obsidian notes represent the user's **processed understanding** — more valuable than raw paper content for understanding their perspective.
117
+
118
+ ### Step 0c: Scan Local Paper Library
119
+
120
+ Before searching online, check if the user already has relevant papers locally:
121
+
122
+ 1. **Locate library**: Check PAPER_LIBRARY paths for PDF files
123
+ ```
124
+ Glob: papers/**/*.pdf, literature/**/*.pdf
125
+ ```
126
+
127
+ 2. **De-duplicate against Zotero**: If Step 0a found papers, skip any local PDFs already covered by Zotero results (match by filename or title).
128
+
129
+ 3. **Filter by relevance**: Match filenames and first-page content against the research topic. Skip clearly unrelated papers.
130
+
131
+ 4. **Summarize relevant papers**: For each relevant local PDF (up to MAX_LOCAL_PAPERS):
132
+ - Read first 3 pages (title, abstract, intro)
133
+ - Extract: title, authors, year, core contribution, relevance to topic
134
+ - Flag papers that are directly related vs tangentially related
135
+
136
+ 5. **Build local knowledge base**: Compile summaries into a "papers you already have" section. This becomes the starting point — external search fills the gaps.
137
+
138
+ > 📚 If the user has a comprehensive local collection, the external search can be more targeted (focus on what's missing).
139
+ >
140
+ > ⚠️ **If all three PAPER_LIBRARY paths miss, say so before moving on** — do not skip silently. A user whose PDFs live in a reference manager (Zotero, Mendeley, ...) otherwise assumes `— sources: all` covered them. Emit:
141
+ >
142
+ > `WARN: local contributed nothing — no PDFs found in papers/, literature/, or a configured paper library. To include yours, add a "## Paper Library" heading to CLAUDE.md followed by the directory path.`
143
+ >
144
+ > Then continue to Step 1.
145
+
146
+ ### Step 1: Search (external)
147
+ - Use WebSearch to find recent papers on the topic
148
+ - Check arXiv, Semantic Scholar, Google Scholar
149
+ - Focus on papers from last 2 years unless studying foundational work
150
+ - **De-duplicate**: Skip papers already found in Zotero, Obsidian, or local library
151
+
152
+ **arXiv API search** (runs when `— sources:` is unset, contains `web` or `all`; no download by default — arXiv API is part of the Priority-4 Web tier, see Source Table above):
153
+
154
+ **Policy D2 tracking discipline (orchestrator-managed)**: the
155
+ executor (you, the LLM) maintains an in-context list of contributing
156
+ sources. For **helper-backed bash sources** (arxiv, semantic-scholar,
157
+ deepxiv, exa, openalex), a source contributes iff its bash block
158
+ ran its helper successfully (helper resolved AND invocation exited 0;
159
+ note: the helper exiting 0 with an empty result list still counts as
160
+ "ran" — downstream relevance ranking is what decides whether the user
161
+ actually sees content). For **non-helper sources** (zotero / obsidian /
162
+ local PDF / WebSearch / Gemini), the contribution rule is stated in
163
+ the Step-1 finalization block below — these are tracked separately
164
+ because they don't emit `D2 contribution:` log lines from bash. Sources
165
+ that were not requested via `— sources:` do not count. At the end of
166
+ Step 1 (before "Optional PDF download"), if zero sources contributed,
167
+ surface a D2 empty-aggregate error and stop. (See
168
+ integration-contract.md §2 Policy D2 — the in-context tracking
169
+ replaces a shared bash accumulator because SKILL bash blocks are
170
+ executed as separate shells; state does not survive.)
171
+
172
+ Resolve `$ARXIV_FETCHER` via the canonical chain (Policy D2 — this
173
+ source contributes to the multi-source aggregate; warn-and-continue
174
+ on failure, never abort the whole aggregate):
175
+
176
+ ```bash
177
+ # Canonical strict-safe resolver (see shared-references/integration-contract.md §2).
178
+ cd "$(git rev-parse --show-toplevel 2>/dev/null || pwd)" || exit 1
179
+ if [ -z "${ARIS_REPO:-}" ] && [ -f .aris/installed-skills.txt ]; then
180
+ ARIS_REPO=$(awk -F'\t' '$1=="repo_root"{print $2; exit}' .aris/installed-skills.txt 2>/dev/null) || true
181
+ fi
182
+ if [ -z "${ARIS_REPO:-}" ] && [ -f "$HOME/.aris/repo" ]; then
183
+ ARIS_REPO=$(cat "$HOME/.aris/repo" 2>/dev/null) || true
184
+ fi
185
+ ARXIV_FETCHER=".aris/tools/arxiv_fetch.py"
186
+ [ -f "$ARXIV_FETCHER" ] || ARXIV_FETCHER="tools/arxiv_fetch.py"
187
+ [ -f "$ARXIV_FETCHER" ] || { [ -n "${ARIS_REPO:-}" ] && ARXIV_FETCHER="$ARIS_REPO/tools/arxiv_fetch.py"; }
188
+ [ -f "$ARXIV_FETCHER" ] || ARXIV_FETCHER=""
189
+
190
+ if [ -n "$ARXIV_FETCHER" ]; then
191
+ # Search arXiv API for structured results (title, abstract, authors, categories).
192
+ # Wrap with if/then/else so set -e doesn't abort the SKILL.
193
+ if python3 "$ARXIV_FETCHER" search "QUERY" --max 10; then
194
+ echo "D2 contribution: arxiv (helper invocation exit 0)" >&2
195
+ else
196
+ echo "WARN: arxiv_fetch.py invocation failed; D2 aggregate continues with WebSearch results." >&2
197
+ fi
198
+ else
199
+ echo "WARN: arxiv_fetch.py not resolved; falling back to WebSearch for arXiv hits." >&2
200
+ fi
201
+ ```
202
+
203
+ > **Record-keeping**: track the `D2 contribution: …` lines emitted by
204
+ > each source's bash block. They form the contributing-source list
205
+ > the orchestrator uses for the Step-1 finalization gate below.
206
+ > WebSearch (Priority 4) is treated as having contributed iff
207
+ > WebSearch was requested (no `— sources:` filter, or the list
208
+ > contains `web` or `all`) AND was actually invoked; the orchestrator
209
+ > records that separately. (The finalization block below restates
210
+ > this rule canonically — both lines must stay in sync.)
211
+
212
+ If `$ARXIV_FETCHER` is empty (D2 graceful degradation), fall back to WebSearch for arXiv (same as before).
213
+
214
+ The arXiv API returns structured metadata (title, abstract, full author list, categories, dates) — richer than WebSearch snippets. Merge these results with WebSearch findings and de-duplicate.
215
+
216
+ **Semantic Scholar API search** (only when `semantic-scholar` is in sources):
217
+
218
+ When the user explicitly requests `— sources: semantic-scholar` (or `— sources: web, semantic-scholar`), search for published venue papers beyond arXiv:
219
+
220
+ ```bash
221
+ # Re-resolve $ARIS_REPO (SKILL bash blocks may run in separate shells).
222
+ cd "$(git rev-parse --show-toplevel 2>/dev/null || pwd)" || exit 1
223
+ if [ -z "${ARIS_REPO:-}" ] && [ -f .aris/installed-skills.txt ]; then
224
+ ARIS_REPO=$(awk -F'\t' '$1=="repo_root"{print $2; exit}' .aris/installed-skills.txt 2>/dev/null) || true
225
+ fi
226
+ if [ -z "${ARIS_REPO:-}" ] && [ -f "$HOME/.aris/repo" ]; then
227
+ ARIS_REPO=$(cat "$HOME/.aris/repo" 2>/dev/null) || true
228
+ fi
229
+ # Resolve $S2_FETCHER (Policy D2 — warn-and-skip on missing).
230
+ S2_FETCHER=".aris/tools/semantic_scholar_fetch.py"
231
+ [ -f "$S2_FETCHER" ] || S2_FETCHER="tools/semantic_scholar_fetch.py"
232
+ [ -f "$S2_FETCHER" ] || { [ -n "${ARIS_REPO:-}" ] && S2_FETCHER="$ARIS_REPO/tools/semantic_scholar_fetch.py"; }
233
+ [ -f "$S2_FETCHER" ] || S2_FETCHER=""
234
+
235
+ if [ -n "$S2_FETCHER" ]; then
236
+ # Search for published CS/Engineering papers with quality filters.
237
+ # Wrap with if/then/else so set -e doesn't abort the SKILL.
238
+ if python3 "$S2_FETCHER" search "QUERY" --max 10 \
239
+ --fields-of-study "Computer Science,Engineering" \
240
+ --publication-types "JournalArticle,Conference"; then
241
+ echo "D2 contribution: semantic_scholar (helper invocation exit 0)" >&2
242
+ else
243
+ echo "WARN: semantic_scholar_fetch.py invocation failed; D2 aggregate continues with remaining sources." >&2
244
+ fi
245
+ fi
246
+ ```
247
+
248
+ If `$S2_FETCHER` is empty (canonical chain exhausted), skip silently — D2 multi-source aggregate continues with the remaining resolved sources.
249
+
250
+ **Why use Semantic Scholar?** Many IEEE/ACM journal papers are NOT on arXiv. S2 fills the gap for published venue-only papers with citation counts and venue metadata.
251
+
252
+ **De-duplication between arXiv and S2**: Match by arXiv ID (S2 returns `externalIds.ArXiv`):
253
+ - If a paper appears in both: check S2's `venue`/`publicationVenue` — if it has been published in a journal/conference (e.g. IEEE TWC, JSAC), use S2's metadata (venue, citationCount, DOI) as the authoritative version, since the published version supersedes the preprint. Keep the arXiv PDF link for download.
254
+ - If the S2 match has no venue (still just a preprint indexed by S2): keep the arXiv version as-is.
255
+ - S2 results without `externalIds.ArXiv` are **venue-only papers** not on arXiv — these are the unique value of this source.
256
+
257
+ **DeepXiv search** (only when `deepxiv` is in sources):
258
+
259
+ When the user explicitly requests `— sources: deepxiv` (or includes `deepxiv` in a combined source list), use the DeepXiv adapter for progressive retrieval:
260
+
261
+ ```bash
262
+ # Re-resolve $ARIS_REPO (SKILL bash blocks may run in separate shells).
263
+ cd "$(git rev-parse --show-toplevel 2>/dev/null || pwd)" || exit 1
264
+ if [ -z "${ARIS_REPO:-}" ] && [ -f .aris/installed-skills.txt ]; then
265
+ ARIS_REPO=$(awk -F'\t' '$1=="repo_root"{print $2; exit}' .aris/installed-skills.txt 2>/dev/null) || true
266
+ fi
267
+ if [ -z "${ARIS_REPO:-}" ] && [ -f "$HOME/.aris/repo" ]; then
268
+ ARIS_REPO=$(cat "$HOME/.aris/repo" 2>/dev/null) || true
269
+ fi
270
+ # Resolve $DEEPXIV_FETCHER (Policy D2 — warn-and-skip on missing).
271
+ DEEPXIV_FETCHER=".aris/tools/deepxiv_fetch.py"
272
+ [ -f "$DEEPXIV_FETCHER" ] || DEEPXIV_FETCHER="tools/deepxiv_fetch.py"
273
+ [ -f "$DEEPXIV_FETCHER" ] || { [ -n "${ARIS_REPO:-}" ] && DEEPXIV_FETCHER="$ARIS_REPO/tools/deepxiv_fetch.py"; }
274
+ [ -f "$DEEPXIV_FETCHER" ] || DEEPXIV_FETCHER=""
275
+
276
+ if [ -n "$DEEPXIV_FETCHER" ] && command -v deepxiv >/dev/null 2>&1; then
277
+ # Wrap each adapter call so set -e doesn't abort the SKILL.
278
+ if python3 "$DEEPXIV_FETCHER" search "QUERY" --max 10; then
279
+ echo "D2 contribution: deepxiv (helper invocation exit 0)" >&2
280
+
281
+ # Then deepen only for the most relevant papers (sub-calls don't change D2 aggregate count):
282
+ python3 "$DEEPXIV_FETCHER" paper-brief ARXIV_ID \
283
+ || echo "WARN: deepxiv_fetch.py paper-brief failed; skipping deepen step." >&2
284
+ python3 "$DEEPXIV_FETCHER" paper-head ARXIV_ID \
285
+ || echo "WARN: deepxiv_fetch.py paper-head failed; skipping deepen step." >&2
286
+ python3 "$DEEPXIV_FETCHER" paper-section ARXIV_ID "Experiments" \
287
+ || echo "WARN: deepxiv_fetch.py paper-section failed; skipping deepen step." >&2
288
+ else
289
+ echo "WARN: deepxiv_fetch.py search invocation failed; D2 aggregate continues with remaining sources." >&2
290
+ fi
291
+ fi
292
+ ```
293
+
294
+ If `$DEEPXIV_FETCHER` is empty or the `deepxiv` CLI is unavailable, skip this source gracefully and continue with the remaining requested sources (Policy D2 graceful degradation).
295
+
296
+ **Why use DeepXiv?** It is useful when a broad search should be followed by staged reading rather than immediate full-paper loading. This reduces unnecessary context while still surfacing structure, TLDRs, and the most relevant sections.
297
+
298
+ **De-duplication against arXiv and S2**:
299
+ - Match by arXiv ID first, DOI second, normalized title third
300
+ - If DeepXiv and arXiv refer to the same preprint, keep one canonical paper row and record `deepxiv` as an additional source
301
+ - If DeepXiv overlaps with S2 on a published paper, prefer S2 venue/citation metadata in the final table, but keep DeepXiv-derived section notes when they add value
302
+
303
+ **Exa search** (only when `exa` is in sources):
304
+
305
+ When the user explicitly requests `— sources: exa` (or includes `exa` in a combined source list), use the Exa tool for broad AI-powered web search with content extraction:
306
+
307
+ ```bash
308
+ # Re-resolve $ARIS_REPO (SKILL bash blocks may run in separate shells).
309
+ cd "$(git rev-parse --show-toplevel 2>/dev/null || pwd)" || exit 1
310
+ if [ -z "${ARIS_REPO:-}" ] && [ -f .aris/installed-skills.txt ]; then
311
+ ARIS_REPO=$(awk -F'\t' '$1=="repo_root"{print $2; exit}' .aris/installed-skills.txt 2>/dev/null) || true
312
+ fi
313
+ if [ -z "${ARIS_REPO:-}" ] && [ -f "$HOME/.aris/repo" ]; then
314
+ ARIS_REPO=$(cat "$HOME/.aris/repo" 2>/dev/null) || true
315
+ fi
316
+ # Resolve $EXA_FETCHER (Policy D2 — warn-and-skip on missing).
317
+ EXA_FETCHER=".aris/tools/exa_search.py"
318
+ [ -f "$EXA_FETCHER" ] || EXA_FETCHER="tools/exa_search.py"
319
+ [ -f "$EXA_FETCHER" ] || { [ -n "${ARIS_REPO:-}" ] && EXA_FETCHER="$ARIS_REPO/tools/exa_search.py"; }
320
+ [ -f "$EXA_FETCHER" ] || EXA_FETCHER=""
321
+
322
+ if [ -n "$EXA_FETCHER" ]; then
323
+ # Search for research papers with highlights.
324
+ # Wrap with if/then/else so set -e doesn't abort the SKILL.
325
+ exa_contributed=false
326
+ if python3 "$EXA_FETCHER" search "QUERY" --max 10 --category "research paper" --content highlights; then
327
+ exa_contributed=true
328
+ else
329
+ echo "WARN: exa_search.py research-paper invocation failed; D2 aggregate continues." >&2
330
+ fi
331
+ # Search for broader web content (blogs, docs, news)
332
+ if python3 "$EXA_FETCHER" search "QUERY" --max 10 --content highlights; then
333
+ exa_contributed=true
334
+ else
335
+ echo "WARN: exa_search.py broad-web invocation failed; D2 aggregate continues." >&2
336
+ fi
337
+ [ "$exa_contributed" = "true" ] && echo "D2 contribution: exa (at least one invocation exit 0)" >&2
338
+ fi
339
+ ```
340
+
341
+ If `$EXA_FETCHER` is empty or the `exa-py` SDK is unavailable, skip this source gracefully and continue with the remaining requested sources (Policy D2 graceful degradation).
342
+
343
+ **Why use Exa?** Exa provides AI-powered search across the broader web (blogs, documentation, news, company pages) with built-in content extraction. It fills a gap between academic databases (arXiv, S2) and generic WebSearch by returning richer content with each result.
344
+
345
+ **De-duplication against arXiv, S2, and DeepXiv**:
346
+ - Match by URL first, then normalized title
347
+ - If Exa returns an arXiv paper already found by arXiv/S2, prefer the structured metadata from those sources
348
+ - Exa results from non-academic domains (blogs, docs, news) are unique value not covered by other sources
349
+
350
+ **Gemini search** (only when `gemini` is in sources):
351
+
352
+ When the user explicitly requests `— sources: gemini` (or includes `gemini` in a combined source list), use Gemini for AI-powered broad literature discovery.
353
+
354
+ **Priority 1 — Gemini MCP** (preferred): Call `mcp__gemini-cli__ask-gemini` with the search prompt:
355
+
356
+ ```
357
+ mcp__gemini-cli__ask-gemini({
358
+ prompt: 'You are a research literature scout. Search comprehensively for papers on: "QUERY"
359
+
360
+ IMPORTANT CONSTRAINTS:
361
+ 1. Search from MULTIPLE angles — decompose the topic into sub-problems, aliases, neighboring tasks, and common benchmark/settings variants.
362
+ 2. Prefer papers that are genuinely relevant, not merely keyword-adjacent.
363
+ 3. Include top venues, journals, surveys, recent preprints, and papers with code when available.
364
+ 4. Focus on papers from 2022 onward unless older foundational work is necessary.
365
+
366
+ For EACH paper found, provide ALL of the following:
367
+ - Title: [exact title]
368
+ - Authors: [full author list]
369
+ - Year: [publication year]
370
+ - Venue: [exact conference/journal name + year, or "arXiv preprint"]
371
+ - arXiv ID: [format 2401.12345, or "N/A"]
372
+ - DOI: [if available, or "N/A"]
373
+ - Code URL: [GitHub/GitLab link if available, or "No code"]
374
+ - Summary: [one-sentence core contribution]
375
+
376
+ Find at least 15 papers.',
377
+ model: 'auto-gemini-3'
378
+ })
379
+ ```
380
+
381
+ **Priority 2 — Gemini CLI fallback** (if MCP unavailable): Use `gemini -p "...same prompt..." 2>/dev/null` via Bash (timeout: 120s).
382
+
383
+ If both MCP and CLI are unavailable, skip this source gracefully and continue with the remaining requested sources.
384
+
385
+ **Why use Gemini?** Gemini provides AI-driven discovery that goes beyond keyword matching — it decomposes topics, explores naming variants, and surfaces papers that traditional API-based searches (arXiv, S2) may miss. It fills a different retrieval niche from structured database queries.
386
+
387
+ **De-duplication against arXiv, S2, DeepXiv, and Exa**:
388
+ - Match by arXiv ID first, DOI second, normalized title third
389
+ - If Gemini returns a paper already found by S2, prefer S2's citation count and venue metadata
390
+ - If Gemini returns a paper already found by arXiv, prefer arXiv's structured metadata
391
+ - Gemini's unique value is discovering papers that other keyword-based indexes did not surface
392
+ - **Do not use Gemini-reported citation counts** — they may be inaccurate. Use S2 for authoritative citation data.
393
+
394
+ **OpenAlex search** (only when `openalex` is in sources):
395
+
396
+ When the user explicitly requests `— sources: openalex` (or includes `openalex` in a combined source list), use OpenAlex API for comprehensive academic metadata:
397
+
398
+ ```bash
399
+ # Re-resolve $ARIS_REPO (SKILL bash blocks may run in separate shells).
400
+ cd "$(git rev-parse --show-toplevel 2>/dev/null || pwd)" || exit 1
401
+ if [ -z "${ARIS_REPO:-}" ] && [ -f .aris/installed-skills.txt ]; then
402
+ ARIS_REPO=$(awk -F'\t' '$1=="repo_root"{print $2; exit}' .aris/installed-skills.txt 2>/dev/null) || true
403
+ fi
404
+ if [ -z "${ARIS_REPO:-}" ] && [ -f "$HOME/.aris/repo" ]; then
405
+ ARIS_REPO=$(cat "$HOME/.aris/repo" 2>/dev/null) || true
406
+ fi
407
+ # Resolve $OPENALEX_FETCHER (Policy D2 — warn-and-skip on missing).
408
+ OPENALEX_FETCHER=".aris/tools/openalex_fetch.py"
409
+ [ -f "$OPENALEX_FETCHER" ] || OPENALEX_FETCHER="tools/openalex_fetch.py"
410
+ [ -f "$OPENALEX_FETCHER" ] || { [ -n "${ARIS_REPO:-}" ] && OPENALEX_FETCHER="$ARIS_REPO/tools/openalex_fetch.py"; }
411
+ [ -f "$OPENALEX_FETCHER" ] || OPENALEX_FETCHER=""
412
+
413
+ # Preflight: skip OpenAlex silently if the helper is unresolved OR the
414
+ # `requests` Python package is missing. Both checks must pass before
415
+ # the script is invoked, so users without `requests` installed never see
416
+ # a stack trace from a default `/research-lit` run.
417
+ if [ -z "$OPENALEX_FETCHER" ] || ! python3 -c "import requests" >/dev/null 2>&1; then
418
+ echo "OpenAlex source not available (openalex_fetch.py unresolved or 'requests' module missing); skipping." >&2
419
+ else
420
+ # Search for papers with comprehensive metadata.
421
+ # Wrap with if/then/else so set -e doesn't abort the SKILL.
422
+ if python3 "$OPENALEX_FETCHER" search "QUERY" --max 10 \
423
+ --year "2022-" \
424
+ --type article \
425
+ --sort relevance; then
426
+ echo "D2 contribution: openalex (helper invocation exit 0)" >&2
427
+ else
428
+ echo "WARN: openalex_fetch.py invocation failed; D2 aggregate continues with remaining sources." >&2
429
+ fi
430
+ fi
431
+ ```
432
+
433
+ If `openalex_fetch.py` is not found or `requests` module is missing, skip this source gracefully and continue with the remaining requested sources.
434
+
435
+ **Why use OpenAlex?** Fully open citation graph (no API key required), institutional affiliations, funding data (NSF, NIH), comprehensive topic/keyword metadata, and coverage across all disciplines (not just CS).
436
+
437
+ **De-duplication against arXiv, S2, DeepXiv, Exa, and Gemini**:
438
+ - Match by DOI first (OpenAlex has DOI for most works), then arXiv ID, then normalized title
439
+ - If OpenAlex and S2 both have the same paper:
440
+ - Prefer S2 for citation counts (more up-to-date)
441
+ - Prefer S2 for venue metadata (more accurate for CS/AI papers)
442
+ - Use OpenAlex for institutional affiliations and funding data (unique value)
443
+ - Merge both into a richer record
444
+ - If OpenAlex and arXiv overlap, prefer arXiv's PDF link and metadata, but keep OpenAlex's citation/institution data
445
+ - OpenAlex's unique value: institutional affiliations, funding sources, comprehensive topic classification, and cross-discipline coverage
446
+
447
+ **D2 aggregate finalization** (per integration-contract §2 Policy D2):
448
+
449
+ The orchestrator (you, the LLM) maintains an in-context list of
450
+ contributing sources by reading the `D2 contribution: <name>` log
451
+ lines emitted by each source's bash block above, plus:
452
+
453
+ - `zotero` if Step 0a returned non-empty Zotero hits.
454
+ - `obsidian` if Step 0b returned non-empty Obsidian hits.
455
+ - `local` if Step 0c found at least one relevant local PDF.
456
+ - `web` if WebSearch (Priority 4) was requested (either no `— sources:`
457
+ filter, or the list contains `web` or `all`) AND was actually invoked.
458
+ Note: `— sources: all` covers the default-on tier (zotero, obsidian,
459
+ local, web) — it does **NOT** include the opt-in fetchers
460
+ (semantic-scholar, deepxiv, exa, gemini, openalex). To enable those,
461
+ add them explicitly (e.g. `— sources: all, semantic-scholar, openalex`),
462
+ matching the existing convention at L42-43 / L51-63 of this SKILL.
463
+ - `gemini` if Gemini MCP / CLI returned at least one paper.
464
+
465
+ If the resulting contributing-source list has zero entries, surface:
466
+
467
+ > **ERROR**: D2 aggregate empty — every requested source either was
468
+ > unresolved, not invoked, failed, or (for MCP / local PDF / Gemini
469
+ > sources) returned no usable result. (Note: WebSearch contributes
470
+ > when requested and invoked, even if the result set is empty.) The
471
+ > multi-source aggregate cannot proceed. Suggest the user retry with
472
+ > a wider `— sources:` list (e.g. `web, local`) or check helper
473
+ > resolution and SDK installation.
474
+
475
+ Then stop before Step 1.5. Otherwise log the contributing-source
476
+ list to the user (e.g. "Sources contributed: arxiv, semantic_scholar,
477
+ web") and proceed.
478
+
479
+ **Optional PDF download** (only when `ARXIV_DOWNLOAD = true`):
480
+
481
+ After all sources are searched and papers are ranked by relevance:
482
+ ```bash
483
+ # Re-resolve $ARXIV_FETCHER (SKILL bash blocks may run in separate shells).
484
+ cd "$(git rev-parse --show-toplevel 2>/dev/null || pwd)" || exit 1
485
+ if [ -z "${ARIS_REPO:-}" ] && [ -f .aris/installed-skills.txt ]; then
486
+ ARIS_REPO=$(awk -F'\t' '$1=="repo_root"{print $2; exit}' .aris/installed-skills.txt 2>/dev/null) || true
487
+ fi
488
+ if [ -z "${ARIS_REPO:-}" ] && [ -f "$HOME/.aris/repo" ]; then
489
+ ARIS_REPO=$(cat "$HOME/.aris/repo" 2>/dev/null) || true
490
+ fi
491
+ ARXIV_FETCHER=".aris/tools/arxiv_fetch.py"
492
+ [ -f "$ARXIV_FETCHER" ] || ARXIV_FETCHER="tools/arxiv_fetch.py"
493
+ [ -f "$ARXIV_FETCHER" ] || { [ -n "${ARIS_REPO:-}" ] && ARXIV_FETCHER="$ARIS_REPO/tools/arxiv_fetch.py"; }
494
+ [ -f "$ARXIV_FETCHER" ] || ARXIV_FETCHER=""
495
+
496
+ # Download top N most relevant arXiv papers; skip silently if helper unresolved.
497
+ [ -n "$ARXIV_FETCHER" ] && python3 "$ARXIV_FETCHER" download ARXIV_ID --dir papers/
498
+ ```
499
+ - Only download papers ranked in the top ARXIV_MAX_DOWNLOAD by relevance
500
+ - Skip papers already in the local library
501
+ - 1-second delay between downloads (rate limiting)
502
+ - Verify each PDF > 10 KB
503
+
504
+ ### Step 1.5: Verify Candidate Papers (anti-hallucination, mandatory)
505
+
506
+ Before analysis, run pre-search verification on **all** candidate papers
507
+ collected from Steps 0a-1 to filter out LLM-fabricated arXiv IDs / DOIs /
508
+ titles. Helper: `verify_papers.py` (canonical name; resolved per
509
+ [`shared-references/integration-contract.md`](../shared-references/integration-contract.md) §2,
510
+ Policy D1 — primary helper with degraded-output fallback). If the
511
+ helper is unresolved on this machine, the SKILL emits a fallback
512
+ `verified_papers.json` tagging every candidate `[UNVERIFIED]` so
513
+ downstream analysis proceeds with audit-visible degraded output
514
+ rather than silently dropping candidates.
515
+
516
+ ```bash
517
+ # 1. Resolve $VERIFY_PAPERS via the canonical strict-safe chain (§2).
518
+ cd "$(git rev-parse --show-toplevel 2>/dev/null || pwd)" || exit 1
519
+ if [ -z "${ARIS_REPO:-}" ] && [ -f .aris/installed-skills.txt ]; then
520
+ ARIS_REPO=$(awk -F'\t' '$1=="repo_root"{print $2; exit}' .aris/installed-skills.txt 2>/dev/null) || true
521
+ fi
522
+ if [ -z "${ARIS_REPO:-}" ] && [ -f "$HOME/.aris/repo" ]; then
523
+ ARIS_REPO=$(cat "$HOME/.aris/repo" 2>/dev/null) || true
524
+ fi
525
+ VERIFY_PAPERS=".aris/tools/verify_papers.py"
526
+ [ -f "$VERIFY_PAPERS" ] || VERIFY_PAPERS="tools/verify_papers.py"
527
+ [ -f "$VERIFY_PAPERS" ] || { [ -n "${ARIS_REPO:-}" ] && VERIFY_PAPERS="$ARIS_REPO/tools/verify_papers.py"; }
528
+ [ -f "$VERIFY_PAPERS" ] || VERIFY_PAPERS=""
529
+
530
+ # 2. Emit candidates as JSON. Verification scratch lives under .aris/
531
+ # (NOT under research-wiki/ — Step 6's wiki ingest predicate is
532
+ # "research-wiki/ exists", and we must not trip it from Step 1.5).
533
+ mkdir -p .aris/verify-papers
534
+ cat > .aris/verify-papers/candidate_papers.json <<'JSON'
535
+ [
536
+ {"id": "p1", "arxiv_id": "2307.03172", "doi": null, "title": "Lost in the Middle"},
537
+ {"id": "p2", "arxiv_id": null, "doi": "10.1145/...", "title": "..."},
538
+ {"id": "p3", "arxiv_id": null, "doi": null, "title": "Some Paper Title"}
539
+ ]
540
+ JSON
541
+
542
+ # 3. Run 3-layer verification (arXiv batch → CrossRef → Semantic Scholar fuzzy).
543
+ # Policy D1: when the helper is unresolved OR its invocation fails, emit
544
+ # a degraded verified set tagging everything [UNVERIFIED] so the user
545
+ # can audit search quality. If python3 itself is missing, we BLOCK
546
+ # rather than hand-roll JSON in shell.
547
+ verify_ok=false
548
+ if [ -n "$VERIFY_PAPERS" ]; then
549
+ if python3 "$VERIFY_PAPERS" \
550
+ --input .aris/verify-papers/candidate_papers.json \
551
+ --output .aris/verify-papers/verified_papers.json; then
552
+ verify_ok=true
553
+ else
554
+ echo "WARN: verify_papers.py invocation failed (resolved at $VERIFY_PAPERS); falling back to [UNVERIFIED] tagging." >&2
555
+ fi
556
+ else
557
+ echo "WARN: verify_papers.py not resolved at .aris/tools/, tools/, \$ARIS_REPO/tools/, or via ~/.aris/repo." >&2
558
+ echo " Fix: rerun bash tools/install_aris.sh or smart_update.sh (refreshes ~/.aris/repo), export ARIS_REPO, or copy the helper to tools/." >&2
559
+ fi
560
+ if [ "$verify_ok" = "false" ]; then
561
+ if ! command -v python3 >/dev/null 2>&1; then
562
+ echo "ERROR: python3 unavailable; cannot emit fallback verified_papers.json." >&2
563
+ echo " Status: BLOCKED. Install python3 or restore the helper to proceed." >&2
564
+ exit 1
565
+ fi
566
+ echo " Emitting unverified candidate set with [UNVERIFIED] tags." >&2
567
+ python3 - <<'PY'
568
+ import json
569
+ cands = json.load(open('.aris/verify-papers/candidate_papers.json'))
570
+ out = {
571
+ 'verdict': 'WARN',
572
+ 'reason_code': 'verify_papers_unavailable',
573
+ 'summary': 'verify_papers.py helper unresolved or invocation failed; all candidates tagged [UNVERIFIED] for audit visibility.',
574
+ 'papers': [dict(p, status='unverified', method='none') for p in cands],
575
+ }
576
+ with open('.aris/verify-papers/verified_papers.json', 'w') as f:
577
+ json.dump(out, f, indent=2)
578
+ PY
579
+ fi
580
+
581
+ # 4. Read verdict + per-paper status from .aris/verify-papers/verified_papers.json;
582
+ # surface warnings to the user.
583
+ ```
584
+
585
+ **Mandatory output rules** (see
586
+ [`shared-references/citation-discipline.md`](../shared-references/citation-discipline.md)
587
+ § Pre-Search Verification Protocol for the full contract):
588
+
589
+ - Tag every paper in the analyzed list with its status: `✅ verified (via
590
+ arxiv|crossref|s2)` or `⚠️ UNVERIFIED (reason)` or `… verify_pending`.
591
+ - **Never silently drop unverified papers** — keep them in the output with the
592
+ `[UNVERIFIED]` marker so the user can audit the search quality.
593
+ - Never fabricate a DOI or arXiv ID from memory. If a field is unknown, leave
594
+ it `null` in `candidate_papers.json` — the helper will fall through to title
595
+ search.
596
+ - If the helper returns `WARN` with `high_hallucination_rate`, surface the
597
+ warning verbatim and recommend re-running with narrower queries.
598
+ - For papers tagged `verify_pending`, do not promote them to `verified` —
599
+ show the pending state to the user and retry on the next session.
600
+
601
+ Optional: set `ARIS_VERIFY_EMAIL=you@institution.edu` in your shell to lift
602
+ CrossRef rate limits to the polite pool.
603
+
604
+ ### Step 2: Analyze Each Paper
605
+
606
+ > **Fan-out (Tier-aware).** Per-paper extraction is pure breadth — each paper
607
+ > is independent — so it parallelizes cleanly. **Tier 1** (Workflow): spawn
608
+ > one Claude subagent per paper (or per small batch) to extract the fields
609
+ > below. **Tier 2** (Agent tool, no Workflow): the same per-paper subagents
610
+ > via the Agent tool. **Tier 3**: iterate sequentially. This follows the
611
+ > *extraction* shard schema from
612
+ > [`shared-references/fan-out-pattern.md`](../shared-references/fan-out-pattern.md)
613
+ > — `{shard_id: "<paper-or-batch id>", entries: [{dedup_key: "<canonical
614
+ > arXiv-id / DOI / title-hash, already assigned upstream in Step 1.5>",
615
+ > problem, method, results, relevance, source, verification_status}]}`.
616
+ >
617
+ > The "jury" here is **not a model** — it is the **deterministic**
618
+ > `verify_papers.py` gate already run in Step 1.5 (3-layer arXiv / CrossRef /
619
+ > Semantic Scholar cross-check). Because the acceptance gate is a deterministic
620
+ > verifier, not a model verdict, the cross-model-family rule is automatically
621
+ > satisfied (a process is not a model family — see
622
+ > [`acceptance-gate.md`](../shared-references/acceptance-gate.md)), so this is
623
+ > the **near-zero-risk** corner of the fan-out design space. The per-paper work
624
+ > is **extraction, not adjudication**: shards report what each paper says and
625
+ > its verification status verbatim; they do **not** decide which papers
626
+ > "count" (Step 1.5 already did, mechanically) and they do **not** drop a paper
627
+ > for any status other than `verified`. Synthesis (Step 3) is *interpretive*
628
+ > aggregation — grouping by theme, spotting gaps our work could fill — over an
629
+ > already-admitted set; it is the executor's normal job, NOT an accept/reject
630
+ > verdict on whether a paper *counts*. The cross-model-family rule governs
631
+ > admission verdicts, and here admission is the deterministic Step-1.5 gate, so
632
+ > the invariant is satisfied without a model jury.
633
+
634
+ For **every** paper in `.aris/verify-papers/verified_papers.json`
635
+ (verified, unverified, `verify_pending`, and `error` alike — see
636
+ Retention rule above), extract:
637
+ - **Problem**: What gap does it address?
638
+ - **Method**: Core technical contribution (1-2 sentences)
639
+ - **Results**: Key numbers/claims
640
+ - **Relevance**: How does it relate to our work?
641
+ - **Source**: Where we found it (Zotero/Obsidian/local/web) — helps user know what they already have vs what's new
642
+ - **Verification status** (one of):
643
+ - `✅ verified (via arxiv|crossref|s2)`
644
+ - `⚠️ UNVERIFIED (verification unavailable: helper unresolved or invocation failed)`
645
+ - `⚠️ UNVERIFIED (searched: not found in any source)`
646
+ - `… VERIFY_PENDING (transient API failure — retry next session)`
647
+ - `❌ ERROR (malformed input: no arxiv, no DOI, no title)`
648
+
649
+ Show the status in the analyzed table — never silently drop a
650
+ paper because its status is anything other than `verified`.
651
+
652
+ ### Step 3: Synthesize
653
+ - Group papers by approach/theme
654
+ - Identify consensus vs disagreements in the field
655
+ - Find gaps that our work could fill
656
+ - If Obsidian notes exist, incorporate the user's own insights into the synthesis
657
+
658
+ ### Step 4: Output
659
+ Present as a structured literature table:
660
+
661
+ ```
662
+ | Paper | Venue | Method | Key Result | Relevance to Us | Source |
663
+ |-------|-------|--------|------------|-----------------|--------|
664
+ ```
665
+
666
+ Plus a narrative summary of the landscape (3-5 paragraphs).
667
+
668
+ If Zotero BibTeX was exported, include a `references.bib` snippet for direct use in paper writing.
669
+
670
+ ### Step 5: Save (if requested)
671
+ - Save paper PDFs to `literature/` or `papers/`
672
+ - Update related work notes in project memory
673
+ - If Obsidian is available, optionally create a literature review note in the vault
674
+
675
+ > **Composed mode** — if invoked with `— composed: <canonical-report-path>` (an
676
+ > orchestrator like `/idea-discovery` passes this), do **not** write a standalone
677
+ > landscape `.md`. Return the structured table + narrative summary for the orchestrator
678
+ > to fold into its canonical report as a "Literature Landscape" section; the report
679
+ > links any saved PDFs/`references.bib`, it does not get a duplicate landscape file.
680
+ > Step 6 (research-wiki ingest) still runs — the wiki is a separate persistent store,
681
+ > not a duplicate of the report. **Default (no `— composed:` directive): behave exactly
682
+ > as above — standalone, write files as documented.** Never infer composed mode from a
683
+ > report file merely existing on disk. Full rules:
684
+ > [`shared-references/output-composition.md`](../shared-references/output-composition.md).
685
+
686
+ ### Step 6: Update Research Wiki
687
+
688
+ **Required when `research-wiki/` exists.** Skip entirely (no action, no
689
+ error) if the directory is absent. Per
690
+ [`shared-references/integration-contract.md`](../shared-references/integration-contract.md),
691
+ this step follows the canonical ingest contract — business logic lives
692
+ in `tools/research_wiki.py`, not in this prose.
693
+
694
+ When `research-wiki/` exists, resolve `$WIKI_SCRIPT` per the canonical
695
+ chain documented in
696
+ [`shared-references/wiki-helper-resolution.md`](../shared-references/wiki-helper-resolution.md)
697
+ (Variant B — warn-and-skip):
698
+
699
+ ```bash
700
+ cd "$(git rev-parse --show-toplevel 2>/dev/null || pwd)" || exit 1
701
+ ARIS_REPO="${ARIS_REPO:-$(awk -F'\t' '$1=="repo_root"{print $2; exit}' .aris/installed-skills.txt 2>/dev/null)}"
702
+ if [ -z "${ARIS_REPO:-}" ] && [ -f "$HOME/.aris/repo" ]; then
703
+ ARIS_REPO=$(cat "$HOME/.aris/repo" 2>/dev/null) || true
704
+ fi
705
+ WIKI_SCRIPT=".aris/tools/research_wiki.py"
706
+ [ -f "$WIKI_SCRIPT" ] || WIKI_SCRIPT="tools/research_wiki.py"
707
+ [ -f "$WIKI_SCRIPT" ] || { [ -n "${ARIS_REPO:-}" ] && WIKI_SCRIPT="$ARIS_REPO/tools/research_wiki.py"; }
708
+ [ -f "$WIKI_SCRIPT" ] || {
709
+ echo "WARN: research_wiki.py not found; literature synthesis will be reported but wiki ingest will be skipped. Fix: bash tools/install_aris.sh or smart_update.sh (refreshes ~/.aris/repo), export ARIS_REPO, or cp <ARIS-repo>/tools/research_wiki.py tools/." >&2
710
+ WIKI_SCRIPT=""
711
+ }
712
+ ```
713
+
714
+ ```
715
+ 📋 Research Wiki ingest (runs once, at end of research-lit):
716
+ [ ] 1. Predicate: `research-wiki/` exists? If no, skip this step.
717
+ [ ] 2. If $WIKI_SCRIPT empty (helper unreachable), skip the rest of this step
718
+ (the warning above already explains why).
719
+ [ ] 3. For each of the top 8–12 relevant papers (arxiv IDs collected above):
720
+ python3 "$WIKI_SCRIPT" ingest_paper research-wiki/ \
721
+ --arxiv-id <id> [--thesis "<one-line>"] [--tags <t1>,<t2>]
722
+ [ ] 4. For each explicit relationship to an existing wiki entity,
723
+ add an edge:
724
+ python3 "$WIKI_SCRIPT" add_edge research-wiki/ \
725
+ --from "paper:<slug>" --to "<target_node_id>" \
726
+ --type <extends|contradicts|addresses_gap|inspired_by|...> \
727
+ --evidence "<one-sentence quote or reasoning>"
728
+ [ ] 5. Confirm papers/<slug>.md files were created (helper prints
729
+ "Paper ingested: ..."); if any failed with a network error,
730
+ retry or fall back to the --title/--authors/--year manual form.
731
+ ```
732
+
733
+ `ingest_paper` handles slug generation, arXiv metadata fetch, dedup
734
+ (skips an existing paper by arXiv id), page rendering, `index.md`
735
+ rebuild, `query_pack.md` rebuild, and log append in a single call —
736
+ **do not manually write `papers/<slug>.md`**. If the helper is
737
+ unavailable (e.g., offline on a non-ARIS machine, or `$WIKI_SCRIPT`
738
+ empty), log the gap and let `/research-wiki sync --arxiv-ids …`
739
+ backfill later.
740
+
741
+ For non-arXiv sources (Semantic Scholar only, IEEE/ACM journals without
742
+ arXiv mirrors, blog posts), pass manual metadata instead:
743
+
744
+ ```bash
745
+ python3 "$WIKI_SCRIPT" ingest_paper research-wiki/ \
746
+ --title "<full title>" --authors "A, B, C" --year <yyyy> \
747
+ --venue "<venue>" [--external-id-doi "<doi>"] [--thesis "..."]
748
+ ```
749
+
750
+ ## Key Rules
751
+ - Always include paper citations (authors, year, venue)
752
+ - Distinguish between peer-reviewed and preprints
753
+ - Be honest about limitations of each paper
754
+ - Note if a paper directly competes with or supports our approach
755
+ - **Never fail because a MCP server is not configured** — always fall back gracefully to the next data source
756
+ - Zotero/Obsidian tools may have different names depending on how the user configured the MCP server (e.g., `mcp__zotero__search` or `mcp__zotero-mcp__search_items`). Try the most common patterns and adapt.