@wentorai/research-plugins 1.0.0 → 1.2.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 (415) hide show
  1. package/README.md +22 -22
  2. package/curated/analysis/README.md +82 -56
  3. package/curated/domains/README.md +225 -69
  4. package/curated/literature/README.md +115 -46
  5. package/curated/research/README.md +106 -58
  6. package/curated/tools/README.md +107 -87
  7. package/curated/writing/README.md +92 -45
  8. package/mcp-configs/academic-db/alphafold-mcp.json +20 -0
  9. package/mcp-configs/academic-db/brightspace-mcp.json +21 -0
  10. package/mcp-configs/academic-db/climatiq-mcp.json +20 -0
  11. package/mcp-configs/academic-db/gibs-mcp.json +20 -0
  12. package/mcp-configs/academic-db/gis-mcp-server.json +22 -0
  13. package/mcp-configs/academic-db/google-earth-engine-mcp.json +21 -0
  14. package/mcp-configs/academic-db/m4-clinical-mcp.json +21 -0
  15. package/mcp-configs/academic-db/medical-mcp.json +21 -0
  16. package/mcp-configs/academic-db/nexonco-mcp.json +20 -0
  17. package/mcp-configs/academic-db/omop-mcp.json +20 -0
  18. package/mcp-configs/academic-db/onekgpd-mcp.json +20 -0
  19. package/mcp-configs/academic-db/openedu-mcp.json +20 -0
  20. package/mcp-configs/academic-db/opengenes-mcp.json +20 -0
  21. package/mcp-configs/academic-db/openstax-mcp.json +21 -0
  22. package/mcp-configs/academic-db/openstreetmap-mcp.json +21 -0
  23. package/mcp-configs/academic-db/opentargets-mcp.json +21 -0
  24. package/mcp-configs/academic-db/pdb-mcp.json +21 -0
  25. package/mcp-configs/academic-db/smithsonian-mcp.json +20 -0
  26. package/mcp-configs/ai-platform/magi-researchers.json +21 -0
  27. package/mcp-configs/ai-platform/mcp-academic-researcher.json +22 -0
  28. package/mcp-configs/ai-platform/open-paper-machine.json +21 -0
  29. package/mcp-configs/ai-platform/paper-intelligence.json +21 -0
  30. package/mcp-configs/ai-platform/paper-reader.json +21 -0
  31. package/mcp-configs/ai-platform/paperdebugger.json +21 -0
  32. package/mcp-configs/browser/exa-mcp.json +20 -0
  33. package/mcp-configs/browser/mcp-searxng.json +21 -0
  34. package/mcp-configs/browser/mcp-webresearch.json +20 -0
  35. package/mcp-configs/cloud-docs/confluence-mcp.json +37 -0
  36. package/mcp-configs/cloud-docs/google-drive-mcp.json +35 -0
  37. package/mcp-configs/cloud-docs/notion-mcp.json +29 -0
  38. package/mcp-configs/communication/discord-mcp.json +29 -0
  39. package/mcp-configs/communication/discourse-mcp.json +21 -0
  40. package/mcp-configs/communication/slack-mcp.json +29 -0
  41. package/mcp-configs/communication/telegram-mcp.json +28 -0
  42. package/mcp-configs/data-platform/automl-stat-mcp.json +21 -0
  43. package/mcp-configs/data-platform/jefferson-stats-mcp.json +22 -0
  44. package/mcp-configs/data-platform/mcp-excel-server.json +21 -0
  45. package/mcp-configs/data-platform/mcp-stata.json +21 -0
  46. package/mcp-configs/data-platform/mcpstack-jupyter.json +21 -0
  47. package/mcp-configs/data-platform/ml-mcp.json +21 -0
  48. package/mcp-configs/data-platform/nasdaq-data-link-mcp.json +20 -0
  49. package/mcp-configs/data-platform/numpy-mcp.json +21 -0
  50. package/mcp-configs/database/neo4j-mcp.json +37 -0
  51. package/mcp-configs/database/postgres-mcp.json +28 -0
  52. package/mcp-configs/database/sqlite-mcp.json +29 -0
  53. package/mcp-configs/dev-platform/geogebra-mcp.json +21 -0
  54. package/mcp-configs/dev-platform/github-mcp.json +31 -0
  55. package/mcp-configs/dev-platform/gitlab-mcp.json +34 -0
  56. package/mcp-configs/dev-platform/latex-mcp-server.json +21 -0
  57. package/mcp-configs/dev-platform/manim-mcp.json +20 -0
  58. package/mcp-configs/dev-platform/mcp-echarts.json +20 -0
  59. package/mcp-configs/dev-platform/panel-viz-mcp.json +20 -0
  60. package/mcp-configs/dev-platform/paperbanana.json +20 -0
  61. package/mcp-configs/dev-platform/texflow-mcp.json +20 -0
  62. package/mcp-configs/dev-platform/texmcp.json +20 -0
  63. package/mcp-configs/dev-platform/typst-mcp.json +21 -0
  64. package/mcp-configs/dev-platform/vizro-mcp.json +20 -0
  65. package/mcp-configs/email/email-mcp.json +40 -0
  66. package/mcp-configs/email/gmail-mcp.json +37 -0
  67. package/mcp-configs/note-knowledge/local-faiss-mcp.json +21 -0
  68. package/mcp-configs/note-knowledge/mcp-memory-service.json +21 -0
  69. package/mcp-configs/note-knowledge/mcp-obsidian.json +23 -0
  70. package/mcp-configs/note-knowledge/mcp-ragdocs.json +20 -0
  71. package/mcp-configs/note-knowledge/mcp-summarizer.json +21 -0
  72. package/mcp-configs/note-knowledge/mediawiki-mcp.json +21 -0
  73. package/mcp-configs/note-knowledge/openzim-mcp.json +20 -0
  74. package/mcp-configs/note-knowledge/zettelkasten-mcp.json +21 -0
  75. package/mcp-configs/reference-mgr/academic-paper-mcp-http.json +20 -0
  76. package/mcp-configs/reference-mgr/academix.json +20 -0
  77. package/mcp-configs/reference-mgr/arxiv-research-mcp.json +21 -0
  78. package/mcp-configs/reference-mgr/google-scholar-abstract-mcp.json +19 -0
  79. package/mcp-configs/reference-mgr/google-scholar-mcp.json +20 -0
  80. package/mcp-configs/reference-mgr/mcp-paperswithcode.json +21 -0
  81. package/mcp-configs/reference-mgr/mcp-scholarly.json +20 -0
  82. package/mcp-configs/reference-mgr/mcp-simple-arxiv.json +20 -0
  83. package/mcp-configs/reference-mgr/mcp-simple-pubmed.json +20 -0
  84. package/mcp-configs/reference-mgr/mcp-zotero.json +21 -0
  85. package/mcp-configs/reference-mgr/mendeley-mcp.json +20 -0
  86. package/mcp-configs/reference-mgr/ncbi-mcp-server.json +22 -0
  87. package/mcp-configs/reference-mgr/onecite.json +21 -0
  88. package/mcp-configs/reference-mgr/paper-search-mcp.json +21 -0
  89. package/mcp-configs/reference-mgr/pubmed-search-mcp.json +21 -0
  90. package/mcp-configs/reference-mgr/scholar-mcp.json +21 -0
  91. package/mcp-configs/reference-mgr/scholar-multi-mcp.json +21 -0
  92. package/mcp-configs/reference-mgr/seerai.json +21 -0
  93. package/mcp-configs/reference-mgr/semantic-scholar-fastmcp.json +21 -0
  94. package/mcp-configs/reference-mgr/sourcelibrary.json +20 -0
  95. package/mcp-configs/registry.json +178 -149
  96. package/mcp-configs/repository/dataverse-mcp.json +33 -0
  97. package/mcp-configs/repository/huggingface-mcp.json +29 -0
  98. package/openclaw.plugin.json +2 -2
  99. package/package.json +2 -2
  100. package/skills/analysis/dataviz/algorithm-visualizer-guide/SKILL.md +259 -0
  101. package/skills/analysis/dataviz/bokeh-visualization-guide/SKILL.md +270 -0
  102. package/skills/analysis/dataviz/chart-image-generator/SKILL.md +229 -0
  103. package/skills/analysis/dataviz/citation-map-guide/SKILL.md +184 -0
  104. package/skills/analysis/dataviz/d3-visualization-guide/SKILL.md +281 -0
  105. package/skills/analysis/dataviz/data-visualization-principles/SKILL.md +171 -0
  106. package/skills/analysis/dataviz/echarts-visualization-guide/SKILL.md +250 -0
  107. package/skills/analysis/dataviz/metabase-analytics-guide/SKILL.md +242 -0
  108. package/skills/analysis/dataviz/plotly-interactive-guide/SKILL.md +266 -0
  109. package/skills/analysis/dataviz/redash-analytics-guide/SKILL.md +284 -0
  110. package/skills/analysis/econometrics/econml-causal-guide/SKILL.md +163 -0
  111. package/skills/analysis/econometrics/empirical-paper-analysis/SKILL.md +192 -0
  112. package/skills/analysis/econometrics/mostly-harmless-guide/SKILL.md +139 -0
  113. package/skills/analysis/econometrics/panel-data-analyst/SKILL.md +259 -0
  114. package/skills/analysis/econometrics/panel-data-regression-workflow/SKILL.md +267 -0
  115. package/skills/analysis/econometrics/python-causality-guide/SKILL.md +134 -0
  116. package/skills/analysis/econometrics/stata-accounting-guide/SKILL.md +269 -0
  117. package/skills/analysis/econometrics/stata-analyst-guide/SKILL.md +245 -0
  118. package/skills/analysis/econometrics/stata-reference-guide/SKILL.md +293 -0
  119. package/skills/analysis/statistics/data-anomaly-detection/SKILL.md +157 -0
  120. package/skills/analysis/statistics/general-statistics-guide/SKILL.md +226 -0
  121. package/skills/analysis/statistics/infiagent-benchmark-guide/SKILL.md +106 -0
  122. package/skills/analysis/statistics/ml-experiment-tracker/SKILL.md +212 -0
  123. package/skills/analysis/statistics/pywayne-statistics-guide/SKILL.md +192 -0
  124. package/skills/analysis/statistics/quantitative-methods-guide/SKILL.md +193 -0
  125. package/skills/analysis/statistics/senior-data-scientist-guide/SKILL.md +223 -0
  126. package/skills/analysis/wrangling/claude-data-analysis-guide/SKILL.md +100 -0
  127. package/skills/analysis/wrangling/csv-data-analyzer/SKILL.md +170 -0
  128. package/skills/analysis/wrangling/data-cleaning-pipeline/SKILL.md +266 -0
  129. package/skills/analysis/wrangling/data-cog-guide/SKILL.md +178 -0
  130. package/skills/analysis/wrangling/open-data-scientist-guide/SKILL.md +197 -0
  131. package/skills/analysis/wrangling/stata-data-cleaning/SKILL.md +276 -0
  132. package/skills/analysis/wrangling/streamline-analyst-guide/SKILL.md +119 -0
  133. package/skills/analysis/wrangling/survey-data-processing/SKILL.md +298 -0
  134. package/skills/domains/ai-ml/ai-agent-papers-guide/SKILL.md +146 -0
  135. package/skills/domains/ai-ml/ai-model-benchmarking/SKILL.md +209 -0
  136. package/skills/domains/ai-ml/annotated-dl-papers-guide/SKILL.md +159 -0
  137. package/skills/domains/ai-ml/anomaly-detection-papers-guide/SKILL.md +167 -0
  138. package/skills/domains/ai-ml/autonomous-agents-papers-guide/SKILL.md +178 -0
  139. package/skills/domains/ai-ml/dl-transformer-finetune/SKILL.md +239 -0
  140. package/skills/domains/ai-ml/domain-adaptation-papers-guide/SKILL.md +173 -0
  141. package/skills/domains/ai-ml/generative-ai-guide/SKILL.md +146 -0
  142. package/skills/domains/ai-ml/graph-learning-papers-guide/SKILL.md +125 -0
  143. package/skills/domains/ai-ml/huggingface-inference-guide/SKILL.md +196 -0
  144. package/skills/domains/ai-ml/keras-deep-learning/SKILL.md +210 -0
  145. package/skills/domains/ai-ml/kolmogorov-arnold-networks-guide/SKILL.md +185 -0
  146. package/skills/domains/ai-ml/llm-from-scratch-guide/SKILL.md +124 -0
  147. package/skills/domains/ai-ml/ml-pipeline-guide/SKILL.md +295 -0
  148. package/skills/domains/ai-ml/nlp-toolkit-guide/SKILL.md +247 -0
  149. package/skills/domains/ai-ml/npcpy-research-guide/SKILL.md +137 -0
  150. package/skills/domains/ai-ml/pytorch-guide/SKILL.md +281 -0
  151. package/skills/domains/ai-ml/pytorch-lightning-guide/SKILL.md +244 -0
  152. package/skills/domains/ai-ml/responsible-ai-guide/SKILL.md +126 -0
  153. package/skills/domains/ai-ml/tensorflow-guide/SKILL.md +241 -0
  154. package/skills/domains/ai-ml/vmas-simulator-guide/SKILL.md +129 -0
  155. package/skills/domains/biomedical/bioagents-guide/SKILL.md +308 -0
  156. package/skills/domains/biomedical/clawbio-guide/SKILL.md +167 -0
  157. package/skills/domains/biomedical/clinical-dialogue-agents-guide/SKILL.md +145 -0
  158. package/skills/domains/biomedical/ena-sequence-api/SKILL.md +175 -0
  159. package/skills/domains/biomedical/genomas-guide/SKILL.md +126 -0
  160. package/skills/domains/biomedical/genotex-benchmark-guide/SKILL.md +125 -0
  161. package/skills/domains/biomedical/med-researcher-guide/SKILL.md +161 -0
  162. package/skills/domains/biomedical/med-researcher-r1-guide/SKILL.md +146 -0
  163. package/skills/domains/biomedical/medgeclaw-guide/SKILL.md +345 -0
  164. package/skills/domains/biomedical/medical-imaging-guide/SKILL.md +305 -0
  165. package/skills/domains/biomedical/ncbi-blast-api/SKILL.md +195 -0
  166. package/skills/domains/biomedical/ncbi-datasets-api/SKILL.md +220 -0
  167. package/skills/domains/biomedical/quickgo-api/SKILL.md +181 -0
  168. package/skills/domains/business/architecture-design-guide/SKILL.md +279 -0
  169. package/skills/domains/business/innovation-management-guide/SKILL.md +257 -0
  170. package/skills/domains/business/operations-research-guide/SKILL.md +258 -0
  171. package/skills/domains/business/xpert-bi-guide/SKILL.md +84 -0
  172. package/skills/domains/chemistry/cactus-cheminformatics-guide/SKILL.md +89 -0
  173. package/skills/domains/chemistry/chemeagle-guide/SKILL.md +147 -0
  174. package/skills/domains/chemistry/chemgraph-agent-guide/SKILL.md +120 -0
  175. package/skills/domains/chemistry/molecular-dynamics-guide/SKILL.md +237 -0
  176. package/skills/domains/chemistry/pubchem-api-guide/SKILL.md +180 -0
  177. package/skills/domains/chemistry/spectroscopy-analysis-guide/SKILL.md +290 -0
  178. package/skills/domains/cs/ai-security-papers-guide/SKILL.md +103 -0
  179. package/skills/domains/cs/code-llm-papers-guide/SKILL.md +131 -0
  180. package/skills/domains/cs/distributed-systems-guide/SKILL.md +268 -0
  181. package/skills/domains/cs/formal-verification-guide/SKILL.md +298 -0
  182. package/skills/domains/cs/gaussian-splatting-papers-guide/SKILL.md +158 -0
  183. package/skills/domains/cs/llm-aiops-guide/SKILL.md +70 -0
  184. package/skills/domains/cs/software-heritage-api/SKILL.md +200 -0
  185. package/skills/domains/ecology/species-distribution-guide/SKILL.md +343 -0
  186. package/skills/domains/economics/imf-data-api-guide/SKILL.md +174 -0
  187. package/skills/domains/economics/nber-working-papers-api/SKILL.md +177 -0
  188. package/skills/domains/economics/post-labor-economics/SKILL.md +254 -0
  189. package/skills/domains/economics/pricing-psychology-guide/SKILL.md +273 -0
  190. package/skills/domains/economics/repec-economics-api/SKILL.md +188 -0
  191. package/skills/domains/economics/world-bank-data-guide/SKILL.md +179 -0
  192. package/skills/domains/education/academic-study-methods/SKILL.md +228 -0
  193. package/skills/domains/education/assessment-design-guide/SKILL.md +213 -0
  194. package/skills/domains/education/educational-research-methods/SKILL.md +179 -0
  195. package/skills/domains/education/edumcp-guide/SKILL.md +74 -0
  196. package/skills/domains/education/mooc-analytics-guide/SKILL.md +206 -0
  197. package/skills/domains/education/open-syllabus-api/SKILL.md +171 -0
  198. package/skills/domains/finance/akshare-finance-data/SKILL.md +207 -0
  199. package/skills/domains/finance/finsight-research-guide/SKILL.md +113 -0
  200. package/skills/domains/finance/options-analytics-agent-guide/SKILL.md +117 -0
  201. package/skills/domains/finance/portfolio-optimization-guide/SKILL.md +279 -0
  202. package/skills/domains/finance/risk-modeling-guide/SKILL.md +260 -0
  203. package/skills/domains/finance/stata-accounting-research/SKILL.md +372 -0
  204. package/skills/domains/geoscience/climate-modeling-guide/SKILL.md +215 -0
  205. package/skills/domains/geoscience/pangaea-data-api/SKILL.md +197 -0
  206. package/skills/domains/geoscience/satellite-remote-sensing/SKILL.md +193 -0
  207. package/skills/domains/geoscience/seismology-data-guide/SKILL.md +208 -0
  208. package/skills/domains/humanities/digital-humanities-methods/SKILL.md +232 -0
  209. package/skills/domains/humanities/ethical-philosophy-guide/SKILL.md +244 -0
  210. package/skills/domains/humanities/history-research-guide/SKILL.md +260 -0
  211. package/skills/domains/humanities/political-history-guide/SKILL.md +241 -0
  212. package/skills/domains/law/caselaw-access-api/SKILL.md +149 -0
  213. package/skills/domains/law/legal-agent-skills-guide/SKILL.md +132 -0
  214. package/skills/domains/law/legal-nlp-guide/SKILL.md +236 -0
  215. package/skills/domains/law/legal-research-methods/SKILL.md +190 -0
  216. package/skills/domains/law/opencontracts-guide/SKILL.md +168 -0
  217. package/skills/domains/law/patent-analysis-guide/SKILL.md +257 -0
  218. package/skills/domains/law/regulatory-compliance-guide/SKILL.md +267 -0
  219. package/skills/domains/math/lean-theorem-proving-guide/SKILL.md +140 -0
  220. package/skills/domains/math/symbolic-computation-guide/SKILL.md +263 -0
  221. package/skills/domains/math/topology-data-analysis/SKILL.md +305 -0
  222. package/skills/domains/pharma/clinical-trial-design-guide/SKILL.md +271 -0
  223. package/skills/domains/pharma/drug-target-interaction/SKILL.md +242 -0
  224. package/skills/domains/pharma/madd-drug-discovery-guide/SKILL.md +153 -0
  225. package/skills/domains/pharma/pharmacovigilance-guide/SKILL.md +216 -0
  226. package/skills/domains/physics/astrophysics-data-guide/SKILL.md +305 -0
  227. package/skills/domains/physics/particle-physics-guide/SKILL.md +287 -0
  228. package/skills/domains/social-science/ipums-microdata-api/SKILL.md +211 -0
  229. package/skills/domains/social-science/network-analysis-guide/SKILL.md +310 -0
  230. package/skills/domains/social-science/psychology-research-guide/SKILL.md +270 -0
  231. package/skills/domains/social-science/sociology-research-guide/SKILL.md +238 -0
  232. package/skills/domains/social-science/sociology-research-methods/SKILL.md +181 -0
  233. package/skills/literature/discovery/arxiv-paper-monitoring/SKILL.md +233 -0
  234. package/skills/literature/discovery/paper-recommendation-guide/SKILL.md +120 -0
  235. package/skills/literature/discovery/papers-we-love-guide/SKILL.md +169 -0
  236. package/skills/literature/discovery/semantic-paper-radar/SKILL.md +144 -0
  237. package/skills/literature/discovery/zotero-arxiv-daily-guide/SKILL.md +94 -0
  238. package/skills/literature/fulltext/bioc-pmc-api/SKILL.md +146 -0
  239. package/skills/literature/fulltext/core-api-guide/SKILL.md +144 -0
  240. package/skills/literature/fulltext/dataverse-api/SKILL.md +215 -0
  241. package/skills/literature/fulltext/hal-archive-api/SKILL.md +218 -0
  242. package/skills/literature/fulltext/institutional-repository-guide/SKILL.md +212 -0
  243. package/skills/literature/fulltext/open-access-mining-guide/SKILL.md +341 -0
  244. package/skills/literature/fulltext/osf-api/SKILL.md +212 -0
  245. package/skills/literature/fulltext/pmc-ftp-bulk-download/SKILL.md +182 -0
  246. package/skills/literature/fulltext/zotero-ai-butler-guide/SKILL.md +166 -0
  247. package/skills/literature/fulltext/zotero-scihub-guide/SKILL.md +168 -0
  248. package/skills/literature/metadata/academic-paper-summarizer/SKILL.md +101 -0
  249. package/skills/literature/metadata/bibliometrix-guide/SKILL.md +164 -0
  250. package/skills/literature/metadata/crossref-event-data-api/SKILL.md +183 -0
  251. package/skills/literature/metadata/doi-content-negotiation/SKILL.md +202 -0
  252. package/skills/literature/metadata/orkg-api/SKILL.md +153 -0
  253. package/skills/literature/metadata/plumx-metrics-api/SKILL.md +188 -0
  254. package/skills/literature/metadata/ror-organization-api/SKILL.md +208 -0
  255. package/skills/literature/metadata/sophosia-reference-guide/SKILL.md +110 -0
  256. package/skills/literature/metadata/viaf-authority-api/SKILL.md +209 -0
  257. package/skills/literature/metadata/wikidata-api-guide/SKILL.md +156 -0
  258. package/skills/literature/metadata/zoplicate-dedup-guide/SKILL.md +147 -0
  259. package/skills/literature/metadata/zotero-actions-tags-guide/SKILL.md +212 -0
  260. package/skills/literature/metadata/zotmoov-guide/SKILL.md +120 -0
  261. package/skills/literature/metadata/zutilo-guide/SKILL.md +140 -0
  262. package/skills/literature/search/arxiv-batch-reporting/SKILL.md +133 -0
  263. package/skills/literature/search/arxiv-cli-tools/SKILL.md +172 -0
  264. package/skills/literature/search/arxiv-osiris/SKILL.md +199 -0
  265. package/skills/literature/search/arxiv-paper-processor/SKILL.md +141 -0
  266. package/skills/literature/search/baidu-scholar-guide/SKILL.md +110 -0
  267. package/skills/literature/search/base-academic-search/SKILL.md +196 -0
  268. package/skills/literature/search/chatpaper-guide/SKILL.md +122 -0
  269. package/skills/literature/search/citeseerx-api/SKILL.md +183 -0
  270. package/skills/literature/search/deep-literature-search/SKILL.md +149 -0
  271. package/skills/literature/search/deepgit-search-guide/SKILL.md +147 -0
  272. package/skills/literature/search/eric-education-api/SKILL.md +199 -0
  273. package/skills/literature/search/findpapers-guide/SKILL.md +177 -0
  274. package/skills/literature/search/ieee-xplore-api/SKILL.md +177 -0
  275. package/skills/literature/search/lens-scholarly-api/SKILL.md +211 -0
  276. package/skills/literature/search/multi-database-literature-search/SKILL.md +198 -0
  277. package/skills/literature/search/open-library-api/SKILL.md +196 -0
  278. package/skills/literature/search/open-semantic-search-guide/SKILL.md +190 -0
  279. package/skills/literature/search/openaire-api/SKILL.md +141 -0
  280. package/skills/literature/search/paper-search-mcp-guide/SKILL.md +107 -0
  281. package/skills/literature/search/papers-chat-guide/SKILL.md +194 -0
  282. package/skills/literature/search/pasa-paper-search-guide/SKILL.md +138 -0
  283. package/skills/literature/search/plos-open-access-api/SKILL.md +203 -0
  284. package/skills/literature/search/scielo-api/SKILL.md +182 -0
  285. package/skills/literature/search/share-research-api/SKILL.md +129 -0
  286. package/skills/literature/search/worldcat-search-api/SKILL.md +224 -0
  287. package/skills/research/automation/ai-scientist-v2-guide/SKILL.md +284 -0
  288. package/skills/research/automation/aim-experiment-guide/SKILL.md +234 -0
  289. package/skills/research/automation/claude-academic-workflow-guide/SKILL.md +202 -0
  290. package/skills/research/automation/coexist-ai-guide/SKILL.md +149 -0
  291. package/skills/research/automation/datagen-research-guide/SKILL.md +131 -0
  292. package/skills/research/automation/foam-agent-guide/SKILL.md +203 -0
  293. package/skills/research/automation/kedro-pipeline-guide/SKILL.md +216 -0
  294. package/skills/research/automation/mle-agent-guide/SKILL.md +139 -0
  295. package/skills/research/automation/paper-to-agent-guide/SKILL.md +116 -0
  296. package/skills/research/automation/rd-agent-guide/SKILL.md +246 -0
  297. package/skills/research/automation/research-paper-orchestrator/SKILL.md +254 -0
  298. package/skills/research/deep-research/academic-deep-research/SKILL.md +190 -0
  299. package/skills/research/deep-research/auto-deep-research-guide/SKILL.md +141 -0
  300. package/skills/research/deep-research/cognitive-kernel-guide/SKILL.md +200 -0
  301. package/skills/research/deep-research/corvus-research-guide/SKILL.md +132 -0
  302. package/skills/research/deep-research/deep-research-pro/SKILL.md +213 -0
  303. package/skills/research/deep-research/deep-research-work/SKILL.md +204 -0
  304. package/skills/research/deep-research/deep-searcher-guide/SKILL.md +253 -0
  305. package/skills/research/deep-research/gpt-researcher-guide/SKILL.md +191 -0
  306. package/skills/research/deep-research/in-depth-research-guide/SKILL.md +205 -0
  307. package/skills/research/deep-research/khoj-research-guide/SKILL.md +200 -0
  308. package/skills/research/deep-research/kosmos-scientist-guide/SKILL.md +185 -0
  309. package/skills/research/deep-research/llm-scientific-discovery-guide/SKILL.md +178 -0
  310. package/skills/research/deep-research/local-deep-research-guide/SKILL.md +253 -0
  311. package/skills/research/deep-research/open-researcher-guide/SKILL.md +138 -0
  312. package/skills/research/deep-research/tongyi-deep-research-guide/SKILL.md +217 -0
  313. package/skills/research/funding/eu-horizon-guide/SKILL.md +244 -0
  314. package/skills/research/funding/grant-budget-guide/SKILL.md +284 -0
  315. package/skills/research/funding/nih-reporter-api-guide/SKILL.md +166 -0
  316. package/skills/research/funding/nsf-award-api-guide/SKILL.md +133 -0
  317. package/skills/research/methodology/academic-mentor-guide/SKILL.md +169 -0
  318. package/skills/research/methodology/claude-scientific-guide/SKILL.md +122 -0
  319. package/skills/research/methodology/deep-innovator-guide/SKILL.md +242 -0
  320. package/skills/research/methodology/osf-api-guide/SKILL.md +165 -0
  321. package/skills/research/methodology/parsifal-slr-guide/SKILL.md +154 -0
  322. package/skills/research/methodology/research-paper-kb/SKILL.md +263 -0
  323. package/skills/research/methodology/research-pipeline-units-guide/SKILL.md +169 -0
  324. package/skills/research/methodology/research-town-guide/SKILL.md +263 -0
  325. package/skills/research/methodology/slr-automation-guide/SKILL.md +235 -0
  326. package/skills/research/paper-review/automated-review-guide/SKILL.md +281 -0
  327. package/skills/research/paper-review/latte-review-guide/SKILL.md +175 -0
  328. package/skills/research/paper-review/paper-compare-guide/SKILL.md +238 -0
  329. package/skills/research/paper-review/paper-critique-framework/SKILL.md +181 -0
  330. package/skills/research/paper-review/paper-digest-guide/SKILL.md +240 -0
  331. package/skills/research/paper-review/paper-research-assistant/SKILL.md +231 -0
  332. package/skills/research/paper-review/research-quality-filter/SKILL.md +261 -0
  333. package/skills/research/paper-review/review-response-guide/SKILL.md +275 -0
  334. package/skills/tools/code-exec/contextplus-mcp-guide/SKILL.md +110 -0
  335. package/skills/tools/code-exec/google-colab-guide/SKILL.md +276 -0
  336. package/skills/tools/code-exec/kaggle-api-guide/SKILL.md +216 -0
  337. package/skills/tools/code-exec/overleaf-cli-guide/SKILL.md +279 -0
  338. package/skills/tools/diagram/clawphd-guide/SKILL.md +149 -0
  339. package/skills/tools/diagram/code-flow-visualizer/SKILL.md +197 -0
  340. package/skills/tools/diagram/excalidraw-diagram-guide/SKILL.md +170 -0
  341. package/skills/tools/diagram/json-data-visualizer/SKILL.md +270 -0
  342. package/skills/tools/diagram/kroki-diagram-api/SKILL.md +198 -0
  343. package/skills/tools/diagram/mermaid-architect-guide/SKILL.md +219 -0
  344. package/skills/tools/diagram/scientific-graphical-abstract/SKILL.md +201 -0
  345. package/skills/tools/diagram/tldraw-whiteboard-guide/SKILL.md +397 -0
  346. package/skills/tools/document/docsgpt-guide/SKILL.md +130 -0
  347. package/skills/tools/document/large-document-reader/SKILL.md +202 -0
  348. package/skills/tools/document/md2pdf-xelatex/SKILL.md +212 -0
  349. package/skills/tools/document/openpaper-guide/SKILL.md +232 -0
  350. package/skills/tools/document/paper-parse-guide/SKILL.md +243 -0
  351. package/skills/tools/document/weknora-guide/SKILL.md +216 -0
  352. package/skills/tools/document/zotero-addon-market-guide/SKILL.md +108 -0
  353. package/skills/tools/document/zotero-night-theme-guide/SKILL.md +142 -0
  354. package/skills/tools/document/zotero-style-guide/SKILL.md +217 -0
  355. package/skills/tools/knowledge-graph/citation-network-builder/SKILL.md +244 -0
  356. package/skills/tools/knowledge-graph/concept-map-generator/SKILL.md +284 -0
  357. package/skills/tools/knowledge-graph/graphiti-guide/SKILL.md +219 -0
  358. package/skills/tools/knowledge-graph/mimir-memory-guide/SKILL.md +135 -0
  359. package/skills/tools/knowledge-graph/notero-zotero-notion-guide/SKILL.md +187 -0
  360. package/skills/tools/knowledge-graph/open-webui-tools-guide/SKILL.md +156 -0
  361. package/skills/tools/knowledge-graph/openspg-guide/SKILL.md +210 -0
  362. package/skills/tools/knowledge-graph/paperpile-notion-guide/SKILL.md +84 -0
  363. package/skills/tools/knowledge-graph/zotero-markdb-connect-guide/SKILL.md +162 -0
  364. package/skills/tools/ocr-translate/latex-translation-guide/SKILL.md +176 -0
  365. package/skills/tools/ocr-translate/math-equation-renderer/SKILL.md +198 -0
  366. package/skills/tools/ocr-translate/pdf-math-translate-guide/SKILL.md +141 -0
  367. package/skills/tools/ocr-translate/zotero-pdf-translate-guide/SKILL.md +95 -0
  368. package/skills/tools/ocr-translate/zotero-pdf2zh-guide/SKILL.md +143 -0
  369. package/skills/tools/scraping/dataset-finder-guide/SKILL.md +253 -0
  370. package/skills/tools/scraping/easy-spider-guide/SKILL.md +250 -0
  371. package/skills/tools/scraping/google-scholar-scraper/SKILL.md +255 -0
  372. package/skills/tools/scraping/repository-harvesting-guide/SKILL.md +310 -0
  373. package/skills/writing/citation/academic-citation-manager/SKILL.md +314 -0
  374. package/skills/writing/citation/academic-citation-manager-guide/SKILL.md +182 -0
  375. package/skills/writing/citation/citation-assistant-skill/SKILL.md +192 -0
  376. package/skills/writing/citation/jabref-reference-guide/SKILL.md +127 -0
  377. package/skills/writing/citation/jasminum-zotero-guide/SKILL.md +103 -0
  378. package/skills/writing/citation/mendeley-api/SKILL.md +231 -0
  379. package/skills/writing/citation/obsidian-citation-guide/SKILL.md +164 -0
  380. package/skills/writing/citation/obsidian-zotero-guide/SKILL.md +137 -0
  381. package/skills/writing/citation/onecite-reference-guide/SKILL.md +168 -0
  382. package/skills/writing/citation/papersgpt-zotero-guide/SKILL.md +132 -0
  383. package/skills/writing/citation/papis-cli-guide/SKILL.md +213 -0
  384. package/skills/writing/citation/zotero-better-bibtex-guide/SKILL.md +107 -0
  385. package/skills/writing/citation/zotero-better-notes-guide/SKILL.md +121 -0
  386. package/skills/writing/citation/zotero-gpt-guide/SKILL.md +111 -0
  387. package/skills/writing/citation/zotero-mcp-guide/SKILL.md +164 -0
  388. package/skills/writing/citation/zotero-mdnotes-guide/SKILL.md +162 -0
  389. package/skills/writing/citation/zotero-reference-guide/SKILL.md +139 -0
  390. package/skills/writing/citation/zotero-scholar-guide/SKILL.md +294 -0
  391. package/skills/writing/citation/zotfile-attachment-guide/SKILL.md +140 -0
  392. package/skills/writing/composition/ml-paper-writing/SKILL.md +163 -0
  393. package/skills/writing/composition/opendraft-thesis-guide/SKILL.md +200 -0
  394. package/skills/writing/composition/paper-debugger-guide/SKILL.md +143 -0
  395. package/skills/writing/composition/paperforge-guide/SKILL.md +205 -0
  396. package/skills/writing/composition/research-paper-writer/SKILL.md +226 -0
  397. package/skills/writing/composition/scientific-writing-resources/SKILL.md +151 -0
  398. package/skills/writing/composition/scientific-writing-wrapper/SKILL.md +153 -0
  399. package/skills/writing/latex/academic-writing-latex/SKILL.md +285 -0
  400. package/skills/writing/latex/latex-drawing-collection/SKILL.md +154 -0
  401. package/skills/writing/latex/latex-templates-collection/SKILL.md +159 -0
  402. package/skills/writing/latex/md-to-pdf-academic/SKILL.md +230 -0
  403. package/skills/writing/latex/tex-render-guide/SKILL.md +243 -0
  404. package/skills/writing/polish/academic-tone-guide/SKILL.md +209 -0
  405. package/skills/writing/polish/chinese-text-humanizer/SKILL.md +140 -0
  406. package/skills/writing/polish/conciseness-editing-guide/SKILL.md +225 -0
  407. package/skills/writing/polish/paper-polish-guide/SKILL.md +160 -0
  408. package/skills/writing/templates/arxiv-preprint-template/SKILL.md +184 -0
  409. package/skills/writing/templates/elegant-paper-template/SKILL.md +141 -0
  410. package/skills/writing/templates/graphical-abstract-guide/SKILL.md +183 -0
  411. package/skills/writing/templates/novathesis-guide/SKILL.md +152 -0
  412. package/skills/writing/templates/scientific-article-pdf/SKILL.md +261 -0
  413. package/skills/writing/templates/sjtuthesis-guide/SKILL.md +197 -0
  414. package/skills/writing/templates/thuthesis-guide/SKILL.md +181 -0
  415. package/skills/literature/fulltext/repository-harvesting-guide/SKILL.md +0 -207
@@ -0,0 +1,268 @@
1
+ ---
2
+ name: distributed-systems-guide
3
+ description: "Distributed systems design patterns and analysis for CS research"
4
+ metadata:
5
+ openclaw:
6
+ emoji: "globe-with-meridians"
7
+ category: "domains"
8
+ subcategory: "cs"
9
+ keywords: ["distributed-systems", "consensus", "replication", "fault-tolerance", "scalability", "cap-theorem"]
10
+ source: "wentor"
11
+ ---
12
+
13
+ # Distributed Systems Guide
14
+
15
+ A skill for researching and designing distributed systems, covering consensus algorithms, replication strategies, consistency models, fault tolerance, and performance analysis. Provides theoretical foundations and practical implementations relevant to systems research.
16
+
17
+ ## Consistency Models
18
+
19
+ ### Consistency Hierarchy
20
+
21
+ ```
22
+ Strongest
23
+ | Linearizability (atomic, real-time ordering)
24
+ | Sequential consistency (program order respected)
25
+ | Causal consistency (causally related ops ordered)
26
+ | PRAM / FIFO consistency (per-process order)
27
+ | Eventual consistency (converges if updates stop)
28
+ Weakest
29
+ ```
30
+
31
+ ### CAP Theorem and PACELC
32
+
33
+ The CAP theorem states that during a network partition, a distributed system must choose between consistency and availability:
34
+
35
+ | System | Partition Behavior | Normal Behavior | Classification |
36
+ |--------|-------------------|----------------|----------------|
37
+ | ZooKeeper | Consistent (sacrifice A) | Low latency, consistent | CP / PC/EC |
38
+ | Cassandra | Available (sacrifice C) | Low latency, eventual | AP / PA/EL |
39
+ | Spanner | Consistent (sacrifice A) | Higher latency, consistent | CP / PC/EC |
40
+ | DynamoDB | Configurable per-read | Tunable consistency | AP or CP |
41
+ | CockroachDB | Consistent (sacrifice A) | Serializable | CP / PC/EC |
42
+
43
+ ## Consensus Algorithms
44
+
45
+ ### Raft Implementation Sketch
46
+
47
+ ```python
48
+ from enum import Enum
49
+ from dataclasses import dataclass, field
50
+ import random
51
+
52
+ class NodeState(Enum):
53
+ FOLLOWER = "follower"
54
+ CANDIDATE = "candidate"
55
+ LEADER = "leader"
56
+
57
+ @dataclass
58
+ class LogEntry:
59
+ term: int
60
+ index: int
61
+ command: str
62
+
63
+ @dataclass
64
+ class RaftNode:
65
+ """
66
+ Simplified Raft consensus node for educational purposes.
67
+ Implements leader election and log replication state machine.
68
+ """
69
+ node_id: str
70
+ state: NodeState = NodeState.FOLLOWER
71
+ current_term: int = 0
72
+ voted_for: str = None
73
+ log: list = field(default_factory=list)
74
+ commit_index: int = 0
75
+ last_applied: int = 0
76
+
77
+ # Leader state
78
+ next_index: dict = field(default_factory=dict)
79
+ match_index: dict = field(default_factory=dict)
80
+
81
+ def start_election(self, peers: list[str]) -> dict:
82
+ """Transition to candidate and request votes."""
83
+ self.state = NodeState.CANDIDATE
84
+ self.current_term += 1
85
+ self.voted_for = self.node_id
86
+
87
+ last_log_index = len(self.log) - 1 if self.log else -1
88
+ last_log_term = self.log[-1].term if self.log else 0
89
+
90
+ return {
91
+ "type": "RequestVote",
92
+ "term": self.current_term,
93
+ "candidate_id": self.node_id,
94
+ "last_log_index": last_log_index,
95
+ "last_log_term": last_log_term,
96
+ }
97
+
98
+ def handle_vote_request(self, term: int, candidate_id: str,
99
+ last_log_index: int,
100
+ last_log_term: int) -> dict:
101
+ """Process a RequestVote RPC."""
102
+ if term < self.current_term:
103
+ return {"term": self.current_term, "vote_granted": False}
104
+
105
+ if term > self.current_term:
106
+ self.current_term = term
107
+ self.state = NodeState.FOLLOWER
108
+ self.voted_for = None
109
+
110
+ # Check if candidate's log is at least as up-to-date
111
+ my_last_term = self.log[-1].term if self.log else 0
112
+ my_last_index = len(self.log) - 1 if self.log else -1
113
+
114
+ log_ok = (last_log_term > my_last_term or
115
+ (last_log_term == my_last_term and
116
+ last_log_index >= my_last_index))
117
+
118
+ vote_granted = (
119
+ (self.voted_for is None or self.voted_for == candidate_id)
120
+ and log_ok
121
+ )
122
+
123
+ if vote_granted:
124
+ self.voted_for = candidate_id
125
+
126
+ return {"term": self.current_term, "vote_granted": vote_granted}
127
+
128
+ def append_entry(self, command: str) -> LogEntry:
129
+ """Leader appends a new entry to its log."""
130
+ entry = LogEntry(
131
+ term=self.current_term,
132
+ index=len(self.log),
133
+ command=command,
134
+ )
135
+ self.log.append(entry)
136
+ return entry
137
+ ```
138
+
139
+ ### Paxos vs Raft vs PBFT Comparison
140
+
141
+ | Algorithm | Fault Model | Tolerance | Rounds | Complexity |
142
+ |-----------|-------------|-----------|--------|------------|
143
+ | Paxos | Crash faults | f < n/2 | 2 (normal) | Difficult to implement correctly |
144
+ | Raft | Crash faults | f < n/2 | 2 (normal) | Designed for understandability |
145
+ | PBFT | Byzantine faults | f < n/3 | 3 | O(n^2) message complexity |
146
+ | HotStuff | Byzantine faults | f < n/3 | 3 | O(n) with pipelining |
147
+
148
+ ## Replication Strategies
149
+
150
+ ### State Machine Replication
151
+
152
+ ```python
153
+ class ReplicatedStateMachine:
154
+ """
155
+ State machine replication with configurable consistency.
156
+ Demonstrates read/write quorum intersection for correctness.
157
+ """
158
+
159
+ def __init__(self, n_replicas: int, read_quorum: int = None,
160
+ write_quorum: int = None):
161
+ self.n = n_replicas
162
+ self.R = read_quorum or (n_replicas // 2 + 1)
163
+ self.W = write_quorum or (n_replicas // 2 + 1)
164
+
165
+ # Quorum intersection guarantees: R + W > N
166
+ assert self.R + self.W > self.n, (
167
+ f"Quorum intersection violated: R({self.R}) + W({self.W}) "
168
+ f"must be > N({self.n})"
169
+ )
170
+
171
+ self.replicas = [{} for _ in range(n_replicas)]
172
+ self.version_clock = 0
173
+
174
+ def write(self, key: str, value: str) -> dict:
175
+ """Write to W replicas."""
176
+ self.version_clock += 1
177
+ # Select W replicas (in practice, based on availability)
178
+ targets = random.sample(range(self.n), self.W)
179
+ for i in targets:
180
+ self.replicas[i][key] = (value, self.version_clock)
181
+
182
+ return {
183
+ "key": key,
184
+ "version": self.version_clock,
185
+ "acked_by": len(targets),
186
+ "quorum_met": True,
187
+ }
188
+
189
+ def read(self, key: str) -> dict:
190
+ """Read from R replicas, return latest version."""
191
+ targets = random.sample(range(self.n), self.R)
192
+ responses = []
193
+ for i in targets:
194
+ if key in self.replicas[i]:
195
+ responses.append(self.replicas[i][key])
196
+
197
+ if not responses:
198
+ return {"key": key, "value": None, "found": False}
199
+
200
+ # Return the value with the highest version
201
+ latest = max(responses, key=lambda x: x[1])
202
+ return {
203
+ "key": key,
204
+ "value": latest[0],
205
+ "version": latest[1],
206
+ "found": True,
207
+ }
208
+ ```
209
+
210
+ ## Clock Synchronization and Ordering
211
+
212
+ ### Vector Clocks
213
+
214
+ ```python
215
+ class VectorClock:
216
+ """Vector clock for tracking causality in distributed systems."""
217
+
218
+ def __init__(self, process_id: str, processes: list[str]):
219
+ self.pid = process_id
220
+ self.clock = {p: 0 for p in processes}
221
+
222
+ def increment(self):
223
+ """Local event: increment own counter."""
224
+ self.clock[self.pid] += 1
225
+
226
+ def send(self) -> dict:
227
+ """Prepare clock for sending with a message."""
228
+ self.increment()
229
+ return dict(self.clock)
230
+
231
+ def receive(self, other_clock: dict):
232
+ """Merge received clock: element-wise max, then increment."""
233
+ for p in self.clock:
234
+ self.clock[p] = max(self.clock[p], other_clock.get(p, 0))
235
+ self.increment()
236
+
237
+ def happened_before(self, other: dict) -> bool:
238
+ """Check if this clock happened-before other (causal ordering)."""
239
+ return (all(self.clock[p] <= other.get(p, 0) for p in self.clock) and
240
+ any(self.clock[p] < other.get(p, 0) for p in self.clock))
241
+ ```
242
+
243
+ ## Performance Analysis
244
+
245
+ ### Latency and Throughput Modeling
246
+
247
+ Key metrics for evaluating distributed systems:
248
+
249
+ - **Tail latency (p99, p999)**: Critical for real-world SLAs; often dominated by slow replicas
250
+ - **Throughput under contention**: How performance degrades with conflict rate
251
+ - **Scalability**: Linear vs sub-linear throughput increase with added nodes
252
+ - **Recovery time**: Time to restore consistency after node failure
253
+
254
+ ## Key Research Papers
255
+
256
+ - Lamport, L. (1998). The Part-Time Parliament (Paxos). *ACM TOCS*.
257
+ - Ongaro, D. and Ousterhout, J. (2014). In Search of an Understandable Consensus Algorithm (Raft). *USENIX ATC*.
258
+ - Corbett, J. et al. (2013). Spanner: Google's Globally-Distributed Database. *ACM TOCS*.
259
+ - DeCandia, G. et al. (2007). Dynamo: Amazon's Highly Available Key-value Store. *SOSP*.
260
+
261
+ ## Tools and Frameworks
262
+
263
+ - **etcd / ZooKeeper**: Production consensus stores for coordination
264
+ - **Jepsen**: Distributed systems correctness testing framework
265
+ - **TLA+ / PlusCal**: Formal specification and model checking
266
+ - **ns-3 / OMNeT++**: Network simulation for distributed protocols
267
+ - **gRPC / Cap'n Proto**: High-performance RPC frameworks
268
+ - **FoundationDB**: Multi-model distributed database with strong consistency
@@ -0,0 +1,298 @@
1
+ ---
2
+ name: formal-verification-guide
3
+ description: "Formal methods, theorem proving, and model checking for CS research"
4
+ metadata:
5
+ openclaw:
6
+ emoji: "check-mark"
7
+ category: "domains"
8
+ subcategory: "cs"
9
+ keywords: ["formal-verification", "theorem-proving", "model-checking", "tla-plus", "coq", "isabelle"]
10
+ source: "wentor"
11
+ ---
12
+
13
+ # Formal Verification Guide
14
+
15
+ A skill for applying formal methods to verify software and hardware correctness. Covers model checking, interactive theorem proving, specification languages, and practical verification workflows used in systems and programming language research.
16
+
17
+ ## Verification Approaches Overview
18
+
19
+ ### Methods Comparison
20
+
21
+ | Approach | Technique | Strengths | Limitations |
22
+ |----------|-----------|-----------|-------------|
23
+ | Model checking | Exhaustive state exploration | Fully automatic, produces counterexamples | State space explosion |
24
+ | Theorem proving | Interactive proof construction | Handles infinite state | Requires expert effort |
25
+ | Abstract interpretation | Sound static analysis | Automatic, scales well | May report false positives |
26
+ | SMT solving | Constraint satisfiability | Powerful automation | Limited to decidable theories |
27
+ | Runtime verification | Execution monitoring | Low barrier, practical | Only checks observed runs |
28
+
29
+ ## TLA+ Specification
30
+
31
+ ### Specifying Distributed Protocols
32
+
33
+ TLA+ is the standard specification language for distributed systems:
34
+
35
+ ```tla
36
+ --------------------------- MODULE TwoPhaseCommit -------------------------
37
+ EXTENDS Integers, Sequences, FiniteSets
38
+
39
+ CONSTANTS RM \* Set of resource managers
40
+
41
+ VARIABLES
42
+ rmState, \* rmState[r] is the state of resource manager r
43
+ tmState, \* State of the transaction manager
44
+ tmPrepared, \* Set of RMs that have sent "Prepared"
45
+ msgs \* Set of messages sent
46
+
47
+ vars == <<rmState, tmState, tmPrepared, msgs>>
48
+
49
+ Init ==
50
+ /\ rmState = [r \in RM |-> "working"]
51
+ /\ tmState = "init"
52
+ /\ tmPrepared = {}
53
+ /\ msgs = {}
54
+
55
+ \* RM r prepares to commit
56
+ RMPrepare(r) ==
57
+ /\ rmState[r] = "working"
58
+ /\ rmState' = [rmState EXCEPT ![r] = "prepared"]
59
+ /\ msgs' = msgs \union {[type |-> "Prepared", rm |-> r]}
60
+ /\ UNCHANGED <<tmState, tmPrepared>>
61
+
62
+ \* TM receives a Prepared message from RM r
63
+ TMRcvPrepared(r) ==
64
+ /\ tmState = "init"
65
+ /\ [type |-> "Prepared", rm |-> r] \in msgs
66
+ /\ tmPrepared' = tmPrepared \union {r}
67
+ /\ UNCHANGED <<rmState, tmState, msgs>>
68
+
69
+ \* TM commits (all RMs have prepared)
70
+ TMCommit ==
71
+ /\ tmState = "init"
72
+ /\ tmPrepared = RM
73
+ /\ tmState' = "committed"
74
+ /\ msgs' = msgs \union {[type |-> "Commit"]}
75
+ /\ UNCHANGED <<rmState, tmPrepared>>
76
+
77
+ \* Safety property: No RM commits unless TM has committed
78
+ Consistency ==
79
+ \A r \in RM : rmState[r] = "committed" => tmState = "committed"
80
+ ========================================================================
81
+ ```
82
+
83
+ ### Running the TLC Model Checker
84
+
85
+ ```bash
86
+ # Install TLA+ Toolbox or use command-line TLC
87
+ # Define model with specific constants
88
+ # RM = {"rm1", "rm2", "rm3"}
89
+ java -jar tla2tools.jar -config TwoPhaseCommit.cfg TwoPhaseCommit.tla
90
+
91
+ # TLC will explore all reachable states and verify:
92
+ # - No deadlocks (unless specified)
93
+ # - Safety properties (invariants)
94
+ # - Liveness properties (temporal formulas)
95
+ ```
96
+
97
+ ## Interactive Theorem Proving
98
+
99
+ ### Coq Proof Assistant
100
+
101
+ ```coq
102
+ (* Example: Proving properties of a simple functional program *)
103
+
104
+ (* Define natural number addition *)
105
+ Fixpoint add (n m : nat) : nat :=
106
+ match n with
107
+ | O => m
108
+ | S n' => S (add n' m)
109
+ end.
110
+
111
+ (* Prove: 0 + n = n (left identity) *)
112
+ Theorem add_0_l : forall n : nat, add 0 n = n.
113
+ Proof.
114
+ intro n.
115
+ simpl. (* simplification reduces add 0 n to n *)
116
+ reflexivity.
117
+ Qed.
118
+
119
+ (* Prove: n + 0 = n (right identity, requires induction) *)
120
+ Theorem add_0_r : forall n : nat, add n 0 = n.
121
+ Proof.
122
+ intro n.
123
+ induction n as [| n' IHn'].
124
+ - (* Base case: n = 0 *)
125
+ simpl. reflexivity.
126
+ - (* Inductive step: n = S n' *)
127
+ simpl. (* add (S n') 0 = S (add n' 0) *)
128
+ rewrite IHn'. (* apply induction hypothesis *)
129
+ reflexivity.
130
+ Qed.
131
+
132
+ (* Prove associativity of addition *)
133
+ Theorem add_assoc : forall a b c : nat,
134
+ add a (add b c) = add (add a b) c.
135
+ Proof.
136
+ intros a b c.
137
+ induction a as [| a' IHa'].
138
+ - simpl. reflexivity.
139
+ - simpl. rewrite IHa'. reflexivity.
140
+ Qed.
141
+ ```
142
+
143
+ ### Isabelle/HOL
144
+
145
+ ```isabelle
146
+ theory SimpleVerification
147
+ imports Main
148
+ begin
149
+
150
+ (* Define a recursive function *)
151
+ fun fib :: "nat => nat" where
152
+ "fib 0 = 0"
153
+ | "fib (Suc 0) = 1"
154
+ | "fib (Suc (Suc n)) = fib (Suc n) + fib n"
155
+
156
+ (* Prove a property *)
157
+ lemma fib_positive: "0 < fib (Suc n)"
158
+ by (induction n rule: fib.induct) auto
159
+
160
+ (* Verify a sorting algorithm *)
161
+ fun insert :: "nat => nat list => nat list" where
162
+ "insert x [] = [x]"
163
+ | "insert x (y # ys) = (if x <= y then x # y # ys else y # insert x ys)"
164
+
165
+ fun isort :: "nat list => nat list" where
166
+ "isort [] = []"
167
+ | "isort (x # xs) = insert x (isort xs)"
168
+
169
+ (* Prove the output is sorted *)
170
+ lemma sorted_insert: "sorted (insert x xs) = sorted xs"
171
+ sorry (* full proof requires additional lemmas *)
172
+
173
+ end
174
+ ```
175
+
176
+ ## SMT Solving
177
+
178
+ ### Z3 for Program Verification
179
+
180
+ ```python
181
+ from z3 import Solver, Int, Bool, And, Or, Not, Implies, ForAll, sat, unsat
182
+
183
+ def verify_array_bounds():
184
+ """
185
+ Verify that an array access is always within bounds.
186
+ Model a loop: for i = 0 to n-1, access a[i].
187
+ """
188
+ s = Solver()
189
+ n = Int("n")
190
+ i = Int("i")
191
+
192
+ # Precondition: n > 0
193
+ s.add(n > 0)
194
+
195
+ # Loop invariant: 0 <= i < n at each access
196
+ s.add(i >= 0)
197
+ s.add(i < n)
198
+
199
+ # Verify: the access a[i] is within bounds [0, n)
200
+ s.add(Not(And(i >= 0, i < n))) # try to find a violation
201
+
202
+ result = s.check()
203
+ if result == unsat:
204
+ return "VERIFIED: array access is always within bounds"
205
+ else:
206
+ return f"COUNTEREXAMPLE: {s.model()}"
207
+
208
+ def verify_integer_overflow():
209
+ """
210
+ Check if integer addition can overflow for given constraints.
211
+ """
212
+ from z3 import BitVec, BitVecVal
213
+
214
+ s = Solver()
215
+ # 32-bit signed integers
216
+ x = BitVec("x", 32)
217
+ y = BitVec("y", 32)
218
+
219
+ # Preconditions: both positive
220
+ s.add(x > 0)
221
+ s.add(y > 0)
222
+
223
+ # Check: can x + y wrap around to negative?
224
+ s.add(x + y < 0)
225
+
226
+ if s.check() == sat:
227
+ m = s.model()
228
+ return {
229
+ "overflow_possible": True,
230
+ "x": m[x].as_long(),
231
+ "y": m[y].as_long(),
232
+ }
233
+ return {"overflow_possible": False}
234
+ ```
235
+
236
+ ## Model Checking with SPIN
237
+
238
+ ### Promela Specification
239
+
240
+ ```promela
241
+ /* Mutual exclusion with Peterson's algorithm */
242
+ bool flag[2] = false;
243
+ byte turn = 0;
244
+ byte critical = 0; /* count of processes in critical section */
245
+
246
+ active [2] proctype process() {
247
+ byte me = _pid;
248
+ byte other = 1 - _pid;
249
+
250
+ do
251
+ :: /* Entry protocol */
252
+ flag[me] = true;
253
+ turn = other;
254
+ (flag[other] == false || turn == me);
255
+
256
+ /* Critical section */
257
+ critical++;
258
+ assert(critical == 1); /* mutual exclusion */
259
+ critical--;
260
+
261
+ /* Exit protocol */
262
+ flag[me] = false;
263
+ od
264
+ }
265
+
266
+ /* LTL property: mutual exclusion always holds */
267
+ ltl mutex { [] (critical <= 1) }
268
+ ```
269
+
270
+ ## Verification Workflow
271
+
272
+ ### Practical Verification Strategy
273
+
274
+ 1. **Specify**: Write a formal specification of the desired property
275
+ 2. **Model**: Create an abstract model of the system
276
+ 3. **Verify**: Run model checker or construct proof
277
+ 4. **Refine**: If counterexample found, fix the design or refine the model
278
+ 5. **Extract**: Generate verified code from the proof (Coq extraction, Isabelle code generation)
279
+
280
+ ### Common Properties to Verify
281
+
282
+ | Property Type | Example | Specification Pattern |
283
+ |--------------|---------|----------------------|
284
+ | Safety | "No two processes in critical section" | `[] (count <= 1)` |
285
+ | Liveness | "Every request is eventually served" | `[] (request -> <> response)` |
286
+ | Deadlock freedom | "System always has an enabled transition" | `[] <> enabled` |
287
+ | Termination | "Program always halts" | Well-founded ordering |
288
+
289
+ ## Tools and Resources
290
+
291
+ - **TLA+ Toolbox**: IDE for TLA+ with integrated TLC model checker
292
+ - **Coq**: Interactive theorem prover with program extraction
293
+ - **Isabelle/HOL**: Higher-order logic prover with Sledgehammer automation
294
+ - **Z3 / CVC5**: SMT solvers for automated reasoning
295
+ - **SPIN**: Model checker for concurrent systems (Promela)
296
+ - **CBMC**: Bounded model checker for C programs
297
+ - **Dafny**: Verification-aware programming language (Microsoft)
298
+ - **Lean 4**: Modern theorem prover and programming language