research-copilot 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 (395) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +190 -0
  3. package/app/build/icon.icns +0 -0
  4. package/app/build/icon.ico +0 -0
  5. package/app/build/icon.png +0 -0
  6. package/app/out/main/index.mjs +6719 -0
  7. package/app/out/preload/index.js +141 -0
  8. package/app/out/renderer/assets/Inter-Variable-Latin-8kRkwJBP.woff2 +0 -0
  9. package/app/out/renderer/assets/Inter-Variable-LatinExt-B_-bZUTo.woff2 +0 -0
  10. package/app/out/renderer/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
  11. package/app/out/renderer/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
  12. package/app/out/renderer/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
  13. package/app/out/renderer/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
  14. package/app/out/renderer/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
  15. package/app/out/renderer/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
  16. package/app/out/renderer/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
  17. package/app/out/renderer/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
  18. package/app/out/renderer/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
  19. package/app/out/renderer/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
  20. package/app/out/renderer/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
  21. package/app/out/renderer/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
  22. package/app/out/renderer/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
  23. package/app/out/renderer/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
  24. package/app/out/renderer/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
  25. package/app/out/renderer/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
  26. package/app/out/renderer/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
  27. package/app/out/renderer/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
  28. package/app/out/renderer/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
  29. package/app/out/renderer/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
  30. package/app/out/renderer/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
  31. package/app/out/renderer/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
  32. package/app/out/renderer/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
  33. package/app/out/renderer/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
  34. package/app/out/renderer/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
  35. package/app/out/renderer/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
  36. package/app/out/renderer/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
  37. package/app/out/renderer/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
  38. package/app/out/renderer/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
  39. package/app/out/renderer/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
  40. package/app/out/renderer/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
  41. package/app/out/renderer/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
  42. package/app/out/renderer/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
  43. package/app/out/renderer/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
  44. package/app/out/renderer/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
  45. package/app/out/renderer/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
  46. package/app/out/renderer/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
  47. package/app/out/renderer/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
  48. package/app/out/renderer/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
  49. package/app/out/renderer/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
  50. package/app/out/renderer/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
  51. package/app/out/renderer/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
  52. package/app/out/renderer/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
  53. package/app/out/renderer/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
  54. package/app/out/renderer/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
  55. package/app/out/renderer/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
  56. package/app/out/renderer/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
  57. package/app/out/renderer/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
  58. package/app/out/renderer/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
  59. package/app/out/renderer/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
  60. package/app/out/renderer/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
  61. package/app/out/renderer/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
  62. package/app/out/renderer/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
  63. package/app/out/renderer/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
  64. package/app/out/renderer/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
  65. package/app/out/renderer/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
  66. package/app/out/renderer/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
  67. package/app/out/renderer/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
  68. package/app/out/renderer/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
  69. package/app/out/renderer/assets/MilkdownMarkdownEditor-bLPxrCVb.js +89821 -0
  70. package/app/out/renderer/assets/MilkdownMarkdownEditor-tTNRIB2K.css +2555 -0
  71. package/app/out/renderer/assets/Tableau10-BqnYsPR6.js +9 -0
  72. package/app/out/renderer/assets/apl-fqmucPXA.js +140 -0
  73. package/app/out/renderer/assets/arc-J47ePHZ2.js +132 -0
  74. package/app/out/renderer/assets/array-DgktLKBx.js +6 -0
  75. package/app/out/renderer/assets/asciiarmor-DucZyvP0.js +56 -0
  76. package/app/out/renderer/assets/asn1-BnOEsgAm.js +144 -0
  77. package/app/out/renderer/assets/asterisk-QAlztEwS.js +345 -0
  78. package/app/out/renderer/assets/blockDiagram-c4efeb88-5uRQXgQJ.js +1817 -0
  79. package/app/out/renderer/assets/brainfuck-DZVCuF_t.js +53 -0
  80. package/app/out/renderer/assets/c4Diagram-c83219d4-C4iCTPEL.js +2464 -0
  81. package/app/out/renderer/assets/channel-ZAmhHE3g.js +7 -0
  82. package/app/out/renderer/assets/classDiagram-beda092f-7NOZxq_W.js +357 -0
  83. package/app/out/renderer/assets/classDiagram-v2-2358418a-5fPT-cUH.js +291 -0
  84. package/app/out/renderer/assets/clike-xqXYL6ge.js +805 -0
  85. package/app/out/renderer/assets/clojure-BhXMqnxz.js +849 -0
  86. package/app/out/renderer/assets/clone-CsnzsYXQ.js +8 -0
  87. package/app/out/renderer/assets/cmake-BGaNd9E7.js +71 -0
  88. package/app/out/renderer/assets/cobol-4yqQntpt.js +120 -0
  89. package/app/out/renderer/assets/coffeescript-D2dXvhEc.js +308 -0
  90. package/app/out/renderer/assets/commonlisp-CF_VNHQR.js +130 -0
  91. package/app/out/renderer/assets/createText-1719965b-Cji7KN4K.js +4904 -0
  92. package/app/out/renderer/assets/crystal-DyuLTqLs.js +398 -0
  93. package/app/out/renderer/assets/css-c-jst79C.js +1783 -0
  94. package/app/out/renderer/assets/cypher-Dlu_3r4V.js +121 -0
  95. package/app/out/renderer/assets/d-UURgV0Ux.js +179 -0
  96. package/app/out/renderer/assets/diff-B_Bi2Crb.js +25 -0
  97. package/app/out/renderer/assets/dockerfile-Bvk733Ga.js +201 -0
  98. package/app/out/renderer/assets/dtd-Dy74G54E.js +114 -0
  99. package/app/out/renderer/assets/dylan-TSb-Nfix.js +314 -0
  100. package/app/out/renderer/assets/ebnf-DAomQUbD.js +139 -0
  101. package/app/out/renderer/assets/ecl-B59qGGVg.js +178 -0
  102. package/app/out/renderer/assets/edges-96097737-CD0EvAZQ.js +1844 -0
  103. package/app/out/renderer/assets/eiffel-Dze7nlu3.js +134 -0
  104. package/app/out/renderer/assets/elm-DG7jkhNZ.js +176 -0
  105. package/app/out/renderer/assets/erDiagram-0228fc6a-DRYXBpi7.js +1321 -0
  106. package/app/out/renderer/assets/erlang-BO6gOnGA.js +674 -0
  107. package/app/out/renderer/assets/factor-CMxFHDqz.js +65 -0
  108. package/app/out/renderer/assets/fcl-CDDUNjTj.js +141 -0
  109. package/app/out/renderer/assets/flowDb-c6c81e3f-CuoIN-Cy.js +1713 -0
  110. package/app/out/renderer/assets/flowDiagram-50d868cf-CPWPLOml.js +1272 -0
  111. package/app/out/renderer/assets/flowDiagram-v2-4f6560a1-C_R12s4S.js +33 -0
  112. package/app/out/renderer/assets/flowchart-elk-definition-6af322e1-BdKUSFpi.js +92921 -0
  113. package/app/out/renderer/assets/forth-B9D2JCeE.js +116 -0
  114. package/app/out/renderer/assets/fortran-CAG2BFbe.js +467 -0
  115. package/app/out/renderer/assets/ganttDiagram-a2739b55-ygqT5HlG.js +3399 -0
  116. package/app/out/renderer/assets/gas-d3KEcW3x.js +294 -0
  117. package/app/out/renderer/assets/gherkin-DhZlEZiy.js +115 -0
  118. package/app/out/renderer/assets/gitGraphDiagram-82fe8481-D97GT4iA.js +1791 -0
  119. package/app/out/renderer/assets/graph-DpC13d95.js +1237 -0
  120. package/app/out/renderer/assets/groovy-CpwJiBl7.js +223 -0
  121. package/app/out/renderer/assets/haskell-BlGBCCe3.js +459 -0
  122. package/app/out/renderer/assets/haxe-7MlzfeYV.js +514 -0
  123. package/app/out/renderer/assets/http-BqypyemW.js +79 -0
  124. package/app/out/renderer/assets/idl-4HIGJlDI.js +985 -0
  125. package/app/out/renderer/assets/index-4-ziknCv.js +292 -0
  126. package/app/out/renderer/assets/index-5325376f-Bbs7Fbqr.js +663 -0
  127. package/app/out/renderer/assets/index-B2jip-rk.js +2489 -0
  128. package/app/out/renderer/assets/index-BKTVfokE.js +312 -0
  129. package/app/out/renderer/assets/index-BiJbFgVG.js +118 -0
  130. package/app/out/renderer/assets/index-Bn433Fat.js +83 -0
  131. package/app/out/renderer/assets/index-BqDyyRCx.js +39679 -0
  132. package/app/out/renderer/assets/index-BzFMeMPn.js +158 -0
  133. package/app/out/renderer/assets/index-C-_uCjZJ.css +2701 -0
  134. package/app/out/renderer/assets/index-C1ithNW1.js +1765 -0
  135. package/app/out/renderer/assets/index-CAJkRYkO.js +407 -0
  136. package/app/out/renderer/assets/index-CleO0-yj.js +690 -0
  137. package/app/out/renderer/assets/index-Cq4MH3sY.js +1020 -0
  138. package/app/out/renderer/assets/index-CtA0Xj22.js +705 -0
  139. package/app/out/renderer/assets/index-CvAZkqBZ.js +83 -0
  140. package/app/out/renderer/assets/index-D3UDN-5c.js +152 -0
  141. package/app/out/renderer/assets/index-D4F9R5ao.js +179 -0
  142. package/app/out/renderer/assets/index-D6RguhZ5.js +328 -0
  143. package/app/out/renderer/assets/index-DnEowqXv.js +386 -0
  144. package/app/out/renderer/assets/index-K8c8Mqdy.js +98 -0
  145. package/app/out/renderer/assets/index-Kh14gO6K.js +62 -0
  146. package/app/out/renderer/assets/index-WFd2jRnA.js +333 -0
  147. package/app/out/renderer/assets/index-WgMfkRFp.js +313 -0
  148. package/app/out/renderer/assets/index-Y4lKyF6t.js +1042 -0
  149. package/app/out/renderer/assets/index-fx307_f1.js +643 -0
  150. package/app/out/renderer/assets/infoDiagram-8eee0895-ptaVSwzq.js +511 -0
  151. package/app/out/renderer/assets/init-ZxktEp_H.js +16 -0
  152. package/app/out/renderer/assets/javascript-C3MnDRiU.js +994 -0
  153. package/app/out/renderer/assets/journeyDiagram-c64418c1-aloEGOQp.js +1184 -0
  154. package/app/out/renderer/assets/julia-Bs6JJhYG.js +407 -0
  155. package/app/out/renderer/assets/layout-ZeuHE_aY.js +2217 -0
  156. package/app/out/renderer/assets/line-CAgaGl-S.js +45 -0
  157. package/app/out/renderer/assets/linear-DIg7lTe1.js +539 -0
  158. package/app/out/renderer/assets/livescript-DmzgM3Yt.js +296 -0
  159. package/app/out/renderer/assets/lua-8cJgIlqe.js +256 -0
  160. package/app/out/renderer/assets/mathematica-DNLOL9PQ.js +110 -0
  161. package/app/out/renderer/assets/mbox-Ga7d4MMN.js +117 -0
  162. package/app/out/renderer/assets/mindmap-definition-8da855dc-B8XVoUxz.js +36054 -0
  163. package/app/out/renderer/assets/mirc-Dma3B8rS.js +107 -0
  164. package/app/out/renderer/assets/mllike-DHn7xckP.js +334 -0
  165. package/app/out/renderer/assets/modelica-0d55jYY0.js +147 -0
  166. package/app/out/renderer/assets/mscgen-DdqZYINH.js +135 -0
  167. package/app/out/renderer/assets/mumps-Btr8VblO.js +93 -0
  168. package/app/out/renderer/assets/nginx-DTDtBDVN.js +141 -0
  169. package/app/out/renderer/assets/nsis-3zG7tgur.js +62 -0
  170. package/app/out/renderer/assets/ntriples-CvgOYMpL.js +153 -0
  171. package/app/out/renderer/assets/octave-DYBj3-tl.js +200 -0
  172. package/app/out/renderer/assets/ordinal-DSZU4PqD.js +76 -0
  173. package/app/out/renderer/assets/oz-R_e8WMIi.js +231 -0
  174. package/app/out/renderer/assets/pascal-GD8iposT.js +105 -0
  175. package/app/out/renderer/assets/path-Cp2qmpkd.js +109 -0
  176. package/app/out/renderer/assets/perl-DL9mHpoi.js +1105 -0
  177. package/app/out/renderer/assets/pieDiagram-a8764435-DlwoeBU2.js +770 -0
  178. package/app/out/renderer/assets/pig-C_4T4YIV.js +101 -0
  179. package/app/out/renderer/assets/powershell-B0suO7Vd.js +328 -0
  180. package/app/out/renderer/assets/properties-BR-vP1aU.js +58 -0
  181. package/app/out/renderer/assets/protobuf-BxgpyhoW.js +77 -0
  182. package/app/out/renderer/assets/pug-By0kVCfm.js +405 -0
  183. package/app/out/renderer/assets/puppet-Bdao66PW.js +137 -0
  184. package/app/out/renderer/assets/python-CvWbmiX4.js +427 -0
  185. package/app/out/renderer/assets/q-CrbCVq4a.js +131 -0
  186. package/app/out/renderer/assets/quadrantDiagram-1e28029f-BaSi1XB4.js +1200 -0
  187. package/app/out/renderer/assets/r-V7nswm59.js +170 -0
  188. package/app/out/renderer/assets/requirementDiagram-08caed73-D3EFyegZ.js +1092 -0
  189. package/app/out/renderer/assets/rpm-C-DLY-If.js +109 -0
  190. package/app/out/renderer/assets/ruby-JDKLJNK0.js +330 -0
  191. package/app/out/renderer/assets/sankeyDiagram-a04cb91d-Cv44AsnM.js +1174 -0
  192. package/app/out/renderer/assets/sas-D2UG-yhZ.js +207 -0
  193. package/app/out/renderer/assets/scheme-BKzrkGJD.js +222 -0
  194. package/app/out/renderer/assets/sequenceDiagram-c5b8d532-CuUBu-x4.js +3337 -0
  195. package/app/out/renderer/assets/shell-BlsXDxCn.js +222 -0
  196. package/app/out/renderer/assets/sieve-CjwBwOY5.js +135 -0
  197. package/app/out/renderer/assets/simple-mode-DMneyfDu.js +130 -0
  198. package/app/out/renderer/assets/smalltalk-BOIGQuhN.js +121 -0
  199. package/app/out/renderer/assets/solr-CwD7U71z.js +69 -0
  200. package/app/out/renderer/assets/sparql-DYskk2vE.js +249 -0
  201. package/app/out/renderer/assets/spreadsheet-Bgtt3oLP.js +87 -0
  202. package/app/out/renderer/assets/sql-BSrOzCRI.js +354 -0
  203. package/app/out/renderer/assets/stateDiagram-1ecb1508-BOU34Zp4.js +454 -0
  204. package/app/out/renderer/assets/stateDiagram-v2-c2b004d7-BgRoffou.js +326 -0
  205. package/app/out/renderer/assets/stex-B6LNC55o.js +231 -0
  206. package/app/out/renderer/assets/styles-b4e223ce-BMr9TPuj.js +1483 -0
  207. package/app/out/renderer/assets/styles-ca3715f6-DgbNw99p.js +1363 -0
  208. package/app/out/renderer/assets/styles-d45a18b0-DtRYKYKf.js +574 -0
  209. package/app/out/renderer/assets/stylus-BkS-boTH.js +565 -0
  210. package/app/out/renderer/assets/svgDrawCommon-b86b1483-Bein03PD.js +100 -0
  211. package/app/out/renderer/assets/swift-FRZi1uvB.js +291 -0
  212. package/app/out/renderer/assets/tcl-CUcaCdmq.js +114 -0
  213. package/app/out/renderer/assets/textile-BnFpjsrl.js +414 -0
  214. package/app/out/renderer/assets/tiddlywiki-CjprD-Qp.js +218 -0
  215. package/app/out/renderer/assets/tiki-B4EPSQ1G.js +265 -0
  216. package/app/out/renderer/assets/timeline-definition-faaaa080-BlWpLE_4.js +1212 -0
  217. package/app/out/renderer/assets/toml-BOuWGMcf.js +76 -0
  218. package/app/out/renderer/assets/troff-E1bJ0PPL.js +61 -0
  219. package/app/out/renderer/assets/ttcn-cfg-Dc39-fIP.js +133 -0
  220. package/app/out/renderer/assets/ttcn-tKd4HLu4.js +192 -0
  221. package/app/out/renderer/assets/turtle-Dq7-1WAf.js +124 -0
  222. package/app/out/renderer/assets/vb-Dp90gtsv.js +196 -0
  223. package/app/out/renderer/assets/vbscript-CI6_mxxU.js +479 -0
  224. package/app/out/renderer/assets/velocity-BwIZK1TH.js +149 -0
  225. package/app/out/renderer/assets/verilog-DDCYnHN8.js +430 -0
  226. package/app/out/renderer/assets/vhdl-DCkMIyT9.js +158 -0
  227. package/app/out/renderer/assets/webidl-BTLTThCm.js +204 -0
  228. package/app/out/renderer/assets/xquery-BgiOC5Ce.js +525 -0
  229. package/app/out/renderer/assets/xychartDiagram-f5964ef8-Bhga-YXm.js +1799 -0
  230. package/app/out/renderer/assets/yacas-b5lAVEIl.js +130 -0
  231. package/app/out/renderer/assets/z80-BZV19vqv.js +93 -0
  232. package/app/out/renderer/index.html +13 -0
  233. package/app/out/skills/community-builtin/README.md +29 -0
  234. package/app/out/skills/community-builtin/document-docx/SKILL.md +44 -0
  235. package/app/out/skills/community-builtin/document-docx/scripts/docx-to-markdown.sh +20 -0
  236. package/app/out/skills/community-builtin/document-docx/scripts/extract-docx-text.sh +28 -0
  237. package/app/out/skills/community-builtin/document-docx/scripts/init-docx-template.sh +32 -0
  238. package/app/out/skills/community-builtin/document-docx/scripts/setup-docx-tools.sh +10 -0
  239. package/app/out/skills/community-builtin/markitdown/SKILL.md +105 -0
  240. package/app/out/skills/community-builtin/markitdown/scripts/batch-convert.sh +40 -0
  241. package/app/out/skills/community-builtin/markitdown/scripts/convert-file.sh +24 -0
  242. package/app/out/skills/community-builtin/markitdown/scripts/setup-markitdown.sh +10 -0
  243. package/app/out/skills/community-builtin/repo-quick-audit/SKILL.md +27 -0
  244. package/app/out/skills/community-builtin/repo-quick-audit/scripts/audit-basics.sh +19 -0
  245. package/app/out/skills/research-pilot-default-project-skills/README.md +23 -0
  246. package/app/out/skills/research-pilot-default-project-skills/citation-management/SKILL.md +39 -0
  247. package/app/out/skills/research-pilot-default-project-skills/citation-management/scripts/doi-to-bibtex.sh +25 -0
  248. package/app/out/skills/research-pilot-default-project-skills/citation-management/scripts/normalize-bibtex-keys.sh +51 -0
  249. package/app/out/skills/research-pilot-default-project-skills/citation-management/scripts/setup-citation-tools.sh +10 -0
  250. package/app/out/skills/research-pilot-default-project-skills/citation-management/scripts/validate-bib.sh +31 -0
  251. package/app/out/skills/research-pilot-default-project-skills/matplotlib/SKILL.md +34 -0
  252. package/app/out/skills/research-pilot-default-project-skills/matplotlib/references/api_reference.md +412 -0
  253. package/app/out/skills/research-pilot-default-project-skills/matplotlib/references/common_issues.md +563 -0
  254. package/app/out/skills/research-pilot-default-project-skills/matplotlib/references/plot_types.md +476 -0
  255. package/app/out/skills/research-pilot-default-project-skills/matplotlib/references/styling_guide.md +589 -0
  256. package/app/out/skills/research-pilot-default-project-skills/matplotlib/references/subagent_quickstart.md +30 -0
  257. package/app/out/skills/research-pilot-default-project-skills/matplotlib/scripts/plot_template.py +401 -0
  258. package/app/out/skills/research-pilot-default-project-skills/matplotlib/scripts/style_configurator.py +409 -0
  259. package/app/out/skills/research-pilot-default-project-skills/research-grants/SKILL.md +38 -0
  260. package/app/out/skills/research-pilot-default-project-skills/research-grants/scripts/check-grant-compliance.sh +40 -0
  261. package/app/out/skills/research-pilot-default-project-skills/research-grants/scripts/grant-summary-card.sh +32 -0
  262. package/app/out/skills/research-pilot-default-project-skills/research-grants/scripts/init-grant-structure.sh +70 -0
  263. package/app/package.json +77 -0
  264. package/bin/cli.mjs +56 -0
  265. package/lib/README.md +145 -0
  266. package/lib/skills/_generated.ts +13 -0
  267. package/lib/skills/builtin/brainstorming-research-ideas/SKILL.md +280 -0
  268. package/lib/skills/builtin/coding/SKILL.md +114 -0
  269. package/lib/skills/builtin/creative-thinking-for-research/SKILL.md +273 -0
  270. package/lib/skills/builtin/matplotlib/SKILL.md +361 -0
  271. package/lib/skills/builtin/matplotlib/references/api_reference.md +412 -0
  272. package/lib/skills/builtin/matplotlib/references/common_issues.md +563 -0
  273. package/lib/skills/builtin/matplotlib/references/plot_types.md +476 -0
  274. package/lib/skills/builtin/matplotlib/references/styling_guide.md +589 -0
  275. package/lib/skills/builtin/matplotlib/scripts/plot_template.py +401 -0
  276. package/lib/skills/builtin/matplotlib/scripts/style_configurator.py +409 -0
  277. package/lib/skills/builtin/paper-writing/SKILL.md +554 -0
  278. package/lib/skills/builtin/paper-writing/references/checklists.md +524 -0
  279. package/lib/skills/builtin/paper-writing/references/citation-workflow.md +562 -0
  280. package/lib/skills/builtin/paper-writing/references/reviewer-guidelines.md +462 -0
  281. package/lib/skills/builtin/paper-writing/references/sources.md +189 -0
  282. package/lib/skills/builtin/paper-writing/references/systems-conferences.md +260 -0
  283. package/lib/skills/builtin/paper-writing/references/writing-guide.md +476 -0
  284. package/lib/skills/builtin/paper-writing/templates/README.md +408 -0
  285. package/lib/skills/builtin/paper-writing/templates/aaai2026/README.md +534 -0
  286. package/lib/skills/builtin/paper-writing/templates/aaai2026/aaai2026-unified-supp.tex +144 -0
  287. package/lib/skills/builtin/paper-writing/templates/aaai2026/aaai2026-unified-template.tex +952 -0
  288. package/lib/skills/builtin/paper-writing/templates/aaai2026/aaai2026.bib +111 -0
  289. package/lib/skills/builtin/paper-writing/templates/aaai2026/aaai2026.bst +1493 -0
  290. package/lib/skills/builtin/paper-writing/templates/aaai2026/aaai2026.sty +315 -0
  291. package/lib/skills/builtin/paper-writing/templates/acl/README.md +50 -0
  292. package/lib/skills/builtin/paper-writing/templates/acl/acl.sty +312 -0
  293. package/lib/skills/builtin/paper-writing/templates/acl/acl_latex.tex +377 -0
  294. package/lib/skills/builtin/paper-writing/templates/acl/acl_lualatex.tex +101 -0
  295. package/lib/skills/builtin/paper-writing/templates/acl/acl_natbib.bst +1940 -0
  296. package/lib/skills/builtin/paper-writing/templates/acl/anthology.bib.txt +26 -0
  297. package/lib/skills/builtin/paper-writing/templates/acl/custom.bib +70 -0
  298. package/lib/skills/builtin/paper-writing/templates/acl/formatting.md +326 -0
  299. package/lib/skills/builtin/paper-writing/templates/asplos2027/main.tex +459 -0
  300. package/lib/skills/builtin/paper-writing/templates/asplos2027/references.bib +135 -0
  301. package/lib/skills/builtin/paper-writing/templates/colm2025/README.md +3 -0
  302. package/lib/skills/builtin/paper-writing/templates/colm2025/colm2025_conference.bib +11 -0
  303. package/lib/skills/builtin/paper-writing/templates/colm2025/colm2025_conference.bst +1440 -0
  304. package/lib/skills/builtin/paper-writing/templates/colm2025/colm2025_conference.pdf +0 -0
  305. package/lib/skills/builtin/paper-writing/templates/colm2025/colm2025_conference.sty +218 -0
  306. package/lib/skills/builtin/paper-writing/templates/colm2025/colm2025_conference.tex +305 -0
  307. package/lib/skills/builtin/paper-writing/templates/colm2025/fancyhdr.sty +485 -0
  308. package/lib/skills/builtin/paper-writing/templates/colm2025/math_commands.tex +508 -0
  309. package/lib/skills/builtin/paper-writing/templates/colm2025/natbib.sty +1246 -0
  310. package/lib/skills/builtin/paper-writing/templates/iclr2026/fancyhdr.sty +485 -0
  311. package/lib/skills/builtin/paper-writing/templates/iclr2026/iclr2026_conference.bib +24 -0
  312. package/lib/skills/builtin/paper-writing/templates/iclr2026/iclr2026_conference.bst +1440 -0
  313. package/lib/skills/builtin/paper-writing/templates/iclr2026/iclr2026_conference.pdf +0 -0
  314. package/lib/skills/builtin/paper-writing/templates/iclr2026/iclr2026_conference.sty +246 -0
  315. package/lib/skills/builtin/paper-writing/templates/iclr2026/iclr2026_conference.tex +414 -0
  316. package/lib/skills/builtin/paper-writing/templates/iclr2026/math_commands.tex +508 -0
  317. package/lib/skills/builtin/paper-writing/templates/iclr2026/natbib.sty +1246 -0
  318. package/lib/skills/builtin/paper-writing/templates/icml2026/algorithm.sty +79 -0
  319. package/lib/skills/builtin/paper-writing/templates/icml2026/algorithmic.sty +201 -0
  320. package/lib/skills/builtin/paper-writing/templates/icml2026/example_paper.bib +75 -0
  321. package/lib/skills/builtin/paper-writing/templates/icml2026/example_paper.pdf +0 -0
  322. package/lib/skills/builtin/paper-writing/templates/icml2026/example_paper.tex +662 -0
  323. package/lib/skills/builtin/paper-writing/templates/icml2026/fancyhdr.sty +864 -0
  324. package/lib/skills/builtin/paper-writing/templates/icml2026/icml2026.bst +1443 -0
  325. package/lib/skills/builtin/paper-writing/templates/icml2026/icml2026.sty +767 -0
  326. package/lib/skills/builtin/paper-writing/templates/icml2026/icml_numpapers.pdf +0 -0
  327. package/lib/skills/builtin/paper-writing/templates/neurips2025/Makefile +36 -0
  328. package/lib/skills/builtin/paper-writing/templates/neurips2025/extra_pkgs.tex +53 -0
  329. package/lib/skills/builtin/paper-writing/templates/neurips2025/main.tex +38 -0
  330. package/lib/skills/builtin/paper-writing/templates/neurips2025/neurips.sty +382 -0
  331. package/lib/skills/builtin/paper-writing/templates/nsdi2027/main.tex +426 -0
  332. package/lib/skills/builtin/paper-writing/templates/nsdi2027/references.bib +151 -0
  333. package/lib/skills/builtin/paper-writing/templates/nsdi2027/usenix-2020-09.sty +83 -0
  334. package/lib/skills/builtin/paper-writing/templates/osdi2026/main.tex +429 -0
  335. package/lib/skills/builtin/paper-writing/templates/osdi2026/references.bib +150 -0
  336. package/lib/skills/builtin/paper-writing/templates/osdi2026/usenix-2020-09.sty +83 -0
  337. package/lib/skills/builtin/paper-writing/templates/sosp2026/main.tex +532 -0
  338. package/lib/skills/builtin/paper-writing/templates/sosp2026/references.bib +148 -0
  339. package/lib/skills/builtin/research-grants/SKILL.md +958 -0
  340. package/lib/skills/builtin/research-grants/assets/budget_justification_template.md +453 -0
  341. package/lib/skills/builtin/research-grants/assets/nih_specific_aims_template.md +166 -0
  342. package/lib/skills/builtin/research-grants/assets/nsf_project_summary_template.md +92 -0
  343. package/lib/skills/builtin/research-grants/references/README.md +285 -0
  344. package/lib/skills/builtin/research-grants/references/broader_impacts.md +392 -0
  345. package/lib/skills/builtin/research-grants/references/darpa_guidelines.md +636 -0
  346. package/lib/skills/builtin/research-grants/references/doe_guidelines.md +586 -0
  347. package/lib/skills/builtin/research-grants/references/nih_guidelines.md +851 -0
  348. package/lib/skills/builtin/research-grants/references/nsf_guidelines.md +570 -0
  349. package/lib/skills/builtin/research-grants/references/nstc_guidelines.md +733 -0
  350. package/lib/skills/builtin/research-grants/references/specific_aims_guide.md +458 -0
  351. package/lib/skills/builtin/rewrite-humanize/SKILL.md +116 -0
  352. package/lib/skills/builtin/rewrite-humanize/references/cs-venue-tone.md +57 -0
  353. package/lib/skills/builtin/rewrite-humanize/references/lexicon.md +50 -0
  354. package/lib/skills/builtin/scholar-evaluation/SKILL.md +300 -0
  355. package/lib/skills/builtin/scholar-evaluation/references/evaluation_framework.md +663 -0
  356. package/lib/skills/builtin/scholar-evaluation/scripts/calculate_scores.py +379 -0
  357. package/lib/skills/builtin/scientific-schematics/SKILL.md +603 -0
  358. package/lib/skills/builtin/scientific-schematics/references/QUICK_REFERENCE.md +182 -0
  359. package/lib/skills/builtin/scientific-schematics/references/README.md +292 -0
  360. package/lib/skills/builtin/scientific-schematics/references/best_practices.md +560 -0
  361. package/lib/skills/builtin/scientific-schematics/scripts/__pycache__/generate_schematic.cpython-312.pyc +0 -0
  362. package/lib/skills/builtin/scientific-schematics/scripts/__pycache__/generate_schematic_ai.cpython-312.pyc +0 -0
  363. package/lib/skills/builtin/scientific-schematics/scripts/example_usage.sh +85 -0
  364. package/lib/skills/builtin/scientific-schematics/scripts/generate_schematic.py +141 -0
  365. package/lib/skills/builtin/scientific-schematics/scripts/generate_schematic_ai.py +910 -0
  366. package/lib/skills/builtin/scientific-visualization/SKILL.md +749 -0
  367. package/lib/skills/builtin/scientific-visualization/assets/color_palettes.py +197 -0
  368. package/lib/skills/builtin/scientific-visualization/assets/nature.mplstyle +63 -0
  369. package/lib/skills/builtin/scientific-visualization/assets/presentation.mplstyle +61 -0
  370. package/lib/skills/builtin/scientific-visualization/assets/publication.mplstyle +68 -0
  371. package/lib/skills/builtin/scientific-visualization/references/color_palettes.md +348 -0
  372. package/lib/skills/builtin/scientific-visualization/references/journal_requirements.md +320 -0
  373. package/lib/skills/builtin/scientific-visualization/references/matplotlib_examples.md +620 -0
  374. package/lib/skills/builtin/scientific-visualization/references/publication_guidelines.md +205 -0
  375. package/lib/skills/builtin/scientific-visualization/scripts/figure_export.py +343 -0
  376. package/lib/skills/builtin/scientific-visualization/scripts/style_presets.py +416 -0
  377. package/lib/skills/builtin/scientific-writing/SKILL.md +745 -0
  378. package/lib/skills/builtin/scientific-writing/assets/REPORT_FORMATTING_GUIDE.md +574 -0
  379. package/lib/skills/builtin/scientific-writing/assets/scientific_report.sty +606 -0
  380. package/lib/skills/builtin/scientific-writing/assets/scientific_report_template.tex +449 -0
  381. package/lib/skills/builtin/scientific-writing/references/citation_styles.md +720 -0
  382. package/lib/skills/builtin/scientific-writing/references/figures_tables.md +806 -0
  383. package/lib/skills/builtin/scientific-writing/references/imrad_structure.md +686 -0
  384. package/lib/skills/builtin/scientific-writing/references/professional_report_formatting.md +664 -0
  385. package/lib/skills/builtin/scientific-writing/references/reporting_guidelines.md +748 -0
  386. package/lib/skills/builtin/scientific-writing/references/writing_principles.md +824 -0
  387. package/lib/skills/builtin/seaborn/SKILL.md +674 -0
  388. package/lib/skills/builtin/seaborn/references/examples.md +822 -0
  389. package/lib/skills/builtin/seaborn/references/function_reference.md +770 -0
  390. package/lib/skills/builtin/seaborn/references/objects_interface.md +964 -0
  391. package/lib/skills/data-analysis/SKILL.md +285 -0
  392. package/lib/skills/generate-skill-content.mjs +58 -0
  393. package/lib/skills/index.ts +34 -0
  394. package/lib/skills/loader.ts +452 -0
  395. package/package.json +62 -0
package/bin/cli.mjs ADDED
@@ -0,0 +1,56 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * CLI entry point for Research Copilot.
5
+ *
6
+ * Usage:
7
+ * npx research-copilot # Run directly
8
+ * npm i -g research-copilot # Install globally
9
+ * research-copilot # Then run anywhere
10
+ */
11
+
12
+ import { spawn } from 'child_process'
13
+ import { createRequire } from 'module'
14
+ import { fileURLToPath } from 'url'
15
+ import { dirname, join } from 'path'
16
+ import { existsSync } from 'fs'
17
+
18
+ const __filename = fileURLToPath(import.meta.url)
19
+ const __dirname = dirname(__filename)
20
+ const require = createRequire(import.meta.url)
21
+
22
+ // Resolve the Electron binary from this package's node_modules
23
+ let electronPath
24
+ try {
25
+ electronPath = require('electron')
26
+ } catch {
27
+ console.error(
28
+ 'Error: Electron is not installed.\n' +
29
+ 'Run: npm install\n'
30
+ )
31
+ process.exit(1)
32
+ }
33
+
34
+ // The app entry is at ../app/ (has package.json with "main" pointing to built output)
35
+ const appDir = join(__dirname, '..', 'app')
36
+ const mainEntry = join(appDir, 'out', 'main', 'index.mjs')
37
+
38
+ if (!existsSync(mainEntry)) {
39
+ console.error(
40
+ 'Error: App has not been built yet.\n' +
41
+ 'Run: npm run build\n'
42
+ )
43
+ process.exit(1)
44
+ }
45
+
46
+ // Launch Electron with the app directory
47
+ const child = spawn(String(electronPath), [appDir], {
48
+ stdio: 'inherit',
49
+ env: { ...process.env },
50
+ })
51
+
52
+ child.on('close', (code) => process.exit(code ?? 0))
53
+ child.on('error', (err) => {
54
+ console.error('Failed to start Electron:', err.message)
55
+ process.exit(1)
56
+ })
package/lib/README.md ADDED
@@ -0,0 +1,145 @@
1
+ # Research Pilot (Current Design)
2
+
3
+ This README documents the current runtime architecture in `examples/research-pilot` after simplifying memory management.
4
+
5
+ ## 1. Design Direction
6
+
7
+ The project has moved away from complex in-prompt memory objects (`Fact`, `Focus`, `TaskAnchor`) and now uses:
8
+
9
+ - durable **Artifacts** on disk as the source of truth
10
+ - lightweight **Session Summary** for cross-turn continuity
11
+
12
+ In short: persist only what matters, keep chat context lean, and recover continuity via periodic summaries.
13
+
14
+ Runtime profile:
15
+
16
+ - `kernelV2.profile = "minimal"` (no task anchor / facts / evidence cards scaffolding)
17
+
18
+ ## 2. Memory Model
19
+
20
+ ### 2.1 Durable memory: Artifact only
21
+
22
+ Primary persistence is the artifact surface:
23
+
24
+ - `artifact-create`
25
+ - `artifact-update`
26
+ - `artifact-search`
27
+
28
+ Legacy `save-paper` / `save-data` wrappers have been removed from the runtime path.
29
+
30
+ Implemented in:
31
+
32
+ - `examples/research-pilot/tools/entity-tools.ts`
33
+ - `examples/research-pilot/memory-v2/store.ts`
34
+
35
+ Artifact files are stored under:
36
+
37
+ - `.research-pilot/artifacts/notes`
38
+ - `.research-pilot/artifacts/papers`
39
+ - `.research-pilot/artifacts/data`
40
+ - `.research-pilot/artifacts/web-content`
41
+ - `.research-pilot/artifacts/tool-output`
42
+
43
+ ### 2.2 Cross-turn continuity: Session Summary
44
+
45
+ Session summaries are stored under:
46
+
47
+ - `.research-pilot/memory-v2/session-summaries/<sessionId>/<timestamp>.json`
48
+
49
+ Type definition:
50
+
51
+ - `SessionSummary` in `examples/research-pilot/types.ts`
52
+
53
+ Store/load functions:
54
+
55
+ - `writeSessionSummary(...)`
56
+ - `readLatestSessionSummary(...)`
57
+
58
+ Both in `examples/research-pilot/memory-v2/store.ts`.
59
+
60
+ ### 2.4 Legacy artifact migration
61
+
62
+ On project init / coordinator startup, legacy artifact payloads are migrated in place:
63
+
64
+ - `type: "literature"` -> `type: "paper"`
65
+ - `data.name` -> `data.title` (then remove `data.name`)
66
+
67
+ Implemented in `migrateLegacyArtifacts(...)` in `examples/research-pilot/memory-v2/store.ts`.
68
+
69
+ ### 2.3 Debug explain snapshots
70
+
71
+ Per-turn explain snapshots are written to:
72
+
73
+ - `.research-pilot/memory-v2/explain/*.turn.json`
74
+
75
+ Used by command/UI debugging (`memoryExplainTurn`).
76
+
77
+ ## 3. Coordinator Flow
78
+
79
+ Main entry:
80
+
81
+ - `createCoordinator(...)` in `examples/research-pilot/agents/coordinator.ts`
82
+
83
+ Per user message:
84
+
85
+ 1. Detect intent (rules first, then lightweight router model fallback).
86
+ 2. Preload relevant non-script skills for the detected intent.
87
+ 3. Build selected context from:
88
+ - mention selections
89
+ - latest session summary (if any)
90
+ - no legacy task/facts/evidence injection in minimal profile
91
+ 4. Run agent with additional intent module instructions.
92
+ 5. Write turn explain snapshot.
93
+ 6. Append turn history and trigger `maybeGenerateSummary()`.
94
+
95
+ ## 4. Session Summary Generation Strategy
96
+
97
+ `maybeGenerateSummary()` runs only when trigger conditions are met:
98
+
99
+ - every 5 turns, or
100
+ - heavy tool usage in recent turns, or
101
+ - large recent response volume
102
+
103
+ It asks a small model for JSON:
104
+
105
+ ```json
106
+ {"summary":"...","topicsDiscussed":["..."],"openQuestions":["..."]}
107
+ ```
108
+
109
+ Then persists a `SessionSummary` record to disk.
110
+
111
+ ## 5. Persistence Policy
112
+
113
+ Coordinator prompt and routing logic bias toward **ephemeral responses by default**.
114
+ Artifacts are created/updated only when persistence is justified (user asks, reusable output, traceability, etc.).
115
+
116
+ Relevant files:
117
+
118
+ - `examples/research-pilot/agents/prompts/index.ts`
119
+ - `examples/research-pilot/agents/coordinator.ts` (`classifyPersistenceDecision`)
120
+
121
+ ## 6. Document Conversion + Skills
122
+
123
+ `convert_to_markdown` is now a wrapper that dynamically discovers conversion scripts from installed skills and executes them via:
124
+
125
+ - `skill-script-run`
126
+
127
+ It records which skill/script was used in the tool result (`converterSkill`, `converterScript`) for UI transparency.
128
+
129
+ Builtin skills are shipped under `lib/skills/builtin/` and discovered at runtime by the skill loader.
130
+
131
+ ## 7. Public API Surface
132
+
133
+ Library exports are centralized in:
134
+
135
+ - `examples/research-pilot/index.ts`
136
+
137
+ Important commands:
138
+
139
+ - artifact CRUD/search commands
140
+ - `sessionSummaryGet`
141
+ - `memoryExplainTurn`
142
+
143
+ ## 8. Notes / Known Gaps
144
+
145
+ - Legacy comments/docs may still mention `Fact/Focus/TaskAnchor`; current behavior is Artifact + Session Summary.
@@ -0,0 +1,13 @@
1
+ /**
2
+ * AUTO-GENERATED — do not edit manually.
3
+ * Run: node examples/research-pilot/skills/generate-skill-content.mjs
4
+ *
5
+ * Source of truth: SKILL.md files in sibling directories.
6
+ */
7
+
8
+ export const dataAnalysisContent = "---\nid: data-analysis-skill\nname: Data Analysis\nshortDescription: Python data analysis, visualization, statistics, and ML modeling\ncategory: Data & Analysis\ntools: [data-analyze]\nloadingStrategy: lazy\ntags: [data, analysis, python, visualization, statistics, ml]\n---\n\nPython data analysis guidance:\n- **Runtime Variables**: Use DATA_FILE, FIGURES_DIR, TABLES_DIR, DATA_DIR, RESULTS_FILE (pre-defined)\n- **STRICT OUTPUT RULE**: Generate ONLY what user requested (count nouns = count outputs)\n- **Results Manifest**: Always call write_results() at end with outputs and summary\n- **No Extras**: No bonus plots, summary tables, or supplementary files unless explicitly requested\n\n## Procedures\n\n### Critical Path Rules\n\n#### Pre-defined Runtime Variables\nThe following variables are defined BEFORE your code runs:\n```python\nDATA_FILE # Absolute path to input data file\nFIGURES_DIR # Absolute path for saving figures\nTABLES_DIR # Absolute path for saving CSV tables\nDATA_DIR # Absolute path for transformed data\nRESULTS_FILE # Absolute path for results manifest JSON\n```\n\n#### Path Usage Rules (MUST FOLLOW)\n- Use `DATA_FILE` to read input: `pd.read_csv(DATA_FILE)`\n- Use `os.path.join(FIGURES_DIR, \"name.png\")` for outputs\n- Do NOT compute or derive paths\n- Do NOT use `os.path.dirname(__file__)`\n- Do NOT hardcode any file paths\n- Do NOT save to directories other than the pre-defined ones\n\n### STRICT MINIMAL OUTPUT RULE\n\n**This is critical—violation is a failure.**\n\n1. Count the nouns in user request:\n - \"a plot\" = 1 figure\n - \"two charts\" = 2 figures\n - \"statistics\" = 1 summary table\n\n2. Generate EXACTLY that many outputs:\n - User asks for \"a plot\" → produce 1 PNG, not 2, not 5\n - User asks for \"statistics\" → produce 1 CSV, not 10\n\n3. Before every `plt.savefig()` or `df.to_csv()`:\n - Ask: \"Did the user request THIS specific output?\"\n - If NO → DELETE that code\n\n4. Do NOT create:\n - Summary tables unless requested\n - Intermediate DataFrames as CSV\n - \"Bonus\" outputs like activity plots\n - Supplementary analyses\n\n### Results Manifest\n\nAlways call `write_results()` at the end:\n\n```python\nwrite_results(\n outputs=[\n {\n \"path\": os.path.join(FIGURES_DIR, \"scatter.png\"),\n \"type\": \"figure\",\n \"title\": \"X vs Y Scatter Plot\",\n \"description\": \"Correlation visualization\", # optional\n \"tags\": [\"correlation\", \"scatter\"] # optional\n },\n {\n \"path\": os.path.join(TABLES_DIR, \"stats.csv\"),\n \"type\": \"table\",\n \"title\": \"Summary Statistics\"\n }\n ],\n summary={\n \"correlation\": 0.85,\n \"n_rows\": 1000,\n \"key_finding\": \"Strong positive correlation\"\n }\n)\n```\n\n### Analysis Tasks\n\n#### analyze (Statistical Analysis)\n- Compute only the statistics explicitly requested by the user\n- Identify correlations/outliers only when requested\n- Print key findings to stdout\n- Save summary as CSV table only if the user asked for file output\n\n#### visualize (Data Visualization)\n- Create appropriate plots for data types\n- Use matplotlib + seaborn for publication quality\n- Add titles, axis labels, legends\n- Use clean style (seaborn whitegrid)\n- Save as PNG (never plt.show())\n\n#### transform (Data Transformation)\n- Clean, reshape, or transform data\n- Handle missing values, type conversions\n- Save transformed dataset as CSV only when requested\n- Print summary of changes\n\n#### model (Statistical Modeling)\n- Build statistical/ML models (sklearn, statsmodels)\n- Report performance metrics\n- Save results summary as CSV only when requested\n- Print key metrics to stdout\n\n### Code Standards\n\n#### Required Setup\n```python\nimport os\nimport json\nimport pandas as pd\nimport numpy as np\nimport matplotlib\nmatplotlib.use('Agg') # Non-interactive backend\nimport matplotlib.pyplot as plt\nimport seaborn as sns\nimport warnings\nwarnings.filterwarnings('ignore')\n```\n\n#### Figure Best Practices\n```python\nplt.figure(figsize=(10, 6), dpi=150)\n# ... plotting code ...\nplt.tight_layout()\nplt.savefig(os.path.join(FIGURES_DIR, \"name.png\"))\nplt.close() # Always close after saving\n```\n\n#### Data Quality Checks\n```python\n# Check for missing values\nprint(f\"Missing values: {df.isnull().sum().sum()}\")\n\n# Check data types\nprint(df.dtypes)\n\n# Basic statistics\nprint(df.describe())\n```\n\n## Examples\n\n### Single Plot Request\n\nUser: \"Create a scatter plot of column A vs column B\"\n\n```python\nimport os\nimport pandas as pd\nimport matplotlib\nmatplotlib.use('Agg')\nimport matplotlib.pyplot as plt\nimport seaborn as sns\n\n# Read data\ndf = pd.read_csv(DATA_FILE)\n\n# Create the ONE requested plot\nplt.figure(figsize=(10, 6), dpi=150)\nsns.scatterplot(data=df, x='A', y='B')\nplt.title('A vs B')\nplt.xlabel('A')\nplt.ylabel('B')\nplt.tight_layout()\nplt.savefig(os.path.join(FIGURES_DIR, 'scatter_a_vs_b.png'))\nplt.close()\n\n# Write results manifest\nwrite_results(\n outputs=[\n {\"path\": os.path.join(FIGURES_DIR, 'scatter_a_vs_b.png'), \"type\": \"figure\", \"title\": \"A vs B Scatter\"}\n ],\n summary={\"correlation\": df['A'].corr(df['B'])}\n)\n```\n\n### Statistics Request\n\nUser: \"Calculate summary statistics for the dataset\"\n\n```python\nimport os\nimport pandas as pd\n\ndf = pd.read_csv(DATA_FILE)\n\n# Calculate statistics\nstats = df.describe()\nstats.to_csv(os.path.join(TABLES_DIR, 'summary_stats.csv'))\n\n# Print to stdout\nprint(\"Summary Statistics:\")\nprint(stats)\n\nwrite_results(\n outputs=[\n {\"path\": os.path.join(TABLES_DIR, 'summary_stats.csv'), \"type\": \"table\", \"title\": \"Summary Statistics\"}\n ],\n summary={\"n_rows\": len(df), \"n_cols\": len(df.columns)}\n)\n```\n\n### Anti-Pattern: Over-Generation\n\nUser: \"Create a histogram of values\"\n\nBAD (creates 5 outputs for 1 request):\n```python\n# Histogram\nplt.savefig('histogram.png')\n# Box plot (NOT REQUESTED)\nplt.savefig('boxplot.png')\n# Summary stats (NOT REQUESTED)\nstats.to_csv('stats.csv')\n# Data sample (NOT REQUESTED)\ndf.head(100).to_csv('sample.csv')\n# Correlation matrix (NOT REQUESTED)\nplt.savefig('correlation.png')\n```\n\nGOOD (creates exactly 1 output):\n```python\nplt.figure(figsize=(10, 6), dpi=150)\nplt.hist(df['values'], bins=30, edgecolor='black')\nplt.title('Distribution of Values')\nplt.xlabel('Value')\nplt.ylabel('Frequency')\nplt.tight_layout()\nplt.savefig(os.path.join(FIGURES_DIR, 'histogram.png'))\nplt.close()\n\nwrite_results(\n outputs=[{\"path\": os.path.join(FIGURES_DIR, 'histogram.png'), \"type\": \"figure\", \"title\": \"Value Distribution\"}]\n)\n```\n\n## Troubleshooting\n\n### \"FileNotFoundError for data file\"\n- Use DATA_FILE variable, not hardcoded path\n- Check: `print(DATA_FILE)` to verify path\n- Ensure file exists before reading\n\n### \"Permission denied saving figure\"\n- Use FIGURES_DIR, TABLES_DIR, DATA_DIR only\n- Do not save to arbitrary directories\n- Check directory exists: `os.makedirs(FIGURES_DIR, exist_ok=True)`\n\n### \"Figure not appearing in results\"\n- Call `plt.close()` after `plt.savefig()`\n- Use `matplotlib.use('Agg')` before importing pyplot\n- Include figure in write_results() outputs list\n\n### \"Results manifest missing\"\n- Always call write_results() at end of script\n- Check RESULTS_FILE path is used correctly\n- Ensure outputs list includes all generated files\n\n### \"Too many outputs generated\"\n- Re-read user request: count the nouns\n- Delete any code that creates unrequested outputs\n- Ask: \"Did user ask for THIS?\" for each savefig/to_csv\n\n### \"Plot quality issues\"\n- Set `dpi=150` for good resolution\n- Use `plt.tight_layout()` to prevent clipping\n- Add proper titles and labels\n\n### \"Memory issues with large data\"\n- Use chunked reading: `pd.read_csv(DATA_FILE, chunksize=10000)`\n- Select only needed columns\n- Use appropriate dtypes: `dtype={'col': 'category'}`\n"
9
+
10
+ /** All skill content keyed by directory name */
11
+ export const skillContent: Record<string, string> = {
12
+ 'data-analysis': dataAnalysisContent,
13
+ }
@@ -0,0 +1,280 @@
1
+ ---
2
+ name: brainstorming-research-ideas
3
+ description: Structured ideation frameworks for discovering high-impact research directions. Use when exploring new topics, pivoting research focus, or when current investigation yields diminishing returns.
4
+ category: Research Ideation
5
+ depends: []
6
+ tags: [Research Ideation, Brainstorming, Problem Discovery, Research Strategy]
7
+ triggers: [brainstorm, research ideas, new direction, explore topics, ideation, pivot research, research questions, 头脑风暴, 研究方向, 选题]
8
+ ---
9
+
10
+ # Research Idea Brainstorming
11
+
12
+ Ten complementary ideation lenses for moving from vague curiosity to concrete, defensible research proposals. Each framework targets a different cognitive mode — use them individually or combine them via the Integrated Workflow below for a full diverge-converge cycle.
13
+
14
+ ## Overview
15
+
16
+ This skill provides structured frameworks for generating and evaluating research directions. It is most valuable during the exploratory phase of research — when you need to identify promising questions, broaden your scope, or escape a local optimum in your thinking.
17
+
18
+ ## When to Use This Skill
19
+
20
+ - You need to explore new research directions or pivot from a current topic.
21
+ - Your current line of investigation has stalled or yields diminishing returns.
22
+ - The user asks for new research ideas and you need to generate and rank candidates.
23
+ - You have a vague area of interest but no specific research question yet.
24
+
25
+ **Do NOT use this skill when**:
26
+ - You already have a well-defined research question and need execution guidance — proceed with normal task execution.
27
+ - You need a literature survey — use the `literature-search` tool directly.
28
+ - You are mid-task with productive work in progress — finish current work first.
29
+
30
+ ---
31
+
32
+ ## Core Ideation Frameworks
33
+
34
+ ### 1. Problem-First vs. Solution-First Thinking
35
+
36
+ Research ideas originate from two distinct modes. Knowing which mode you are in prevents building solutions that lack real problems, or chasing problems without feasible approaches.
37
+
38
+ **Problem-First** (pain point → method):
39
+ - Start with a concrete failure, bottleneck, or unmet need
40
+ - Naturally yields impactful work because the motivation is intrinsic
41
+ - Risk: may converge on incremental fixes rather than paradigm shifts
42
+
43
+ **Solution-First** (new capability → application):
44
+ - Start with a new tool, insight, or technique seeking application
45
+ - Often drives breakthroughs by unlocking previously impossible approaches
46
+ - Risk: "hammer looking for a nail" — solution may lack genuine demand
47
+
48
+ **Application**: When generating candidate directions, classify each as problem-first or solution-first. Problem-first candidates need a feasibility check; solution-first candidates need at least two genuine problems they address.
49
+
50
+ ---
51
+
52
+ ### 2. The Abstraction Ladder
53
+
54
+ Every research problem sits at a particular level of abstraction. Deliberately moving up or down reveals ideas invisible at your current level.
55
+
56
+ | Direction | Action | Outcome |
57
+ |-----------|--------|---------|
58
+ | **Move Up** (generalize) | Turn a specific result into a broader principle | Framework papers, theoretical contributions |
59
+ | **Move Down** (instantiate) | Test a general paradigm under concrete constraints | Empirical papers, surprising failure analyses |
60
+ | **Move Sideways** (analogize) | Apply same abstraction level to adjacent domain | Cross-pollination, transfer papers |
61
+
62
+ **Application**: For any candidate direction, generate the up/down/sideways variants. Each variant is a potential research topic. Use the `literature-search` tool to validate the most promising variants.
63
+
64
+ ---
65
+
66
+ ### 3. Tension and Contradiction Hunting
67
+
68
+ Breakthroughs often come from resolving tensions between widely accepted but seemingly conflicting goals. These contradictions are the research opportunity.
69
+
70
+ **Common Research Tensions**:
71
+
72
+ | Tension Pair | Research Opportunity |
73
+ |-------------|---------------------|
74
+ | Performance ↔ Efficiency | Can we match SOTA with 10x less compute? |
75
+ | Privacy ↔ Utility | Can federated/encrypted methods close the accuracy gap? |
76
+ | Generality ↔ Specialization | When does fine-tuning beat prompting, and why? |
77
+ | Safety ↔ Capability | Can alignment improve rather than tax capability? |
78
+ | Interpretability ↔ Performance | Do mechanistic insights enable better architectures? |
79
+ | Scale ↔ Accessibility | Can small models replicate emergent behaviors? |
80
+
81
+ **Application**: List the top 3-5 desiderata in your research area. Identify pairs treated as trade-offs. For each pair: is the trade-off fundamental or an artifact of current methods? If artifact → the reconciliation IS the research direction. If fundamental → characterizing the Pareto frontier is itself valuable.
82
+
83
+ ---
84
+
85
+ ### 4. Cross-Pollination (Analogy Transfer)
86
+
87
+ Borrowing structural ideas from other disciplines is one of the most generative research heuristics. Attention mechanisms from cognitive science, genetic algorithms from biology, adversarial training from game theory.
88
+
89
+ **Requirements for a Valid Analogy**:
90
+ - **Structural fidelity**: The mapping must hold at the level of underlying mechanisms, not just surface similarity
91
+ - **Non-obvious connection**: If the link is well-known, the novelty is gone
92
+ - **Testable predictions**: The analogy should generate concrete hypotheses
93
+
94
+ **High-Yield Source Fields**:
95
+
96
+ | Source Field | Transferable Concepts |
97
+ |-------------|----------------------|
98
+ | Neuroscience | Attention, memory consolidation, hierarchical processing |
99
+ | Physics | Energy-based models, phase transitions, renormalization |
100
+ | Economics | Mechanism design, auction theory, incentive alignment |
101
+ | Ecology | Population dynamics, niche competition, co-evolution |
102
+ | Linguistics | Compositionality, pragmatics, grammatical induction |
103
+ | Control Theory | Feedback loops, stability, adaptive regulation |
104
+
105
+ **Application**: Describe the problem in domain-agnostic language (strip jargon). Identify which other field solves a structurally similar problem. Use the `literature-search` tool to search that field's solution at the mechanism level. Save the analogy as a note artifact before building on it.
106
+
107
+ ---
108
+
109
+ ### 5. The "What Changed?" Principle
110
+
111
+ Strong ideas often come from revisiting old problems under new conditions. Advances in hardware, scale, data availability, or regulations can invalidate prior assumptions.
112
+
113
+ **Categories of Change to Monitor**:
114
+
115
+ | Change Type | Example | Research Implication |
116
+ |------------|---------|---------------------|
117
+ | **Compute** | GPUs 10x faster | Methods dismissed as too expensive become feasible |
118
+ | **Scale** | Trillion-token datasets | Statistical arguments that failed at small scale may now hold |
119
+ | **Regulation** | EU AI Act, GDPR | Creates demand for compliant alternatives |
120
+ | **Tooling** | New frameworks, APIs | Reduces implementation barrier for complex methods |
121
+ | **Failure** | High-profile system failures | Exposes gaps in existing approaches |
122
+ | **Cultural** | New user behaviors | Shifts what problems matter most |
123
+
124
+ **Application**: Pick a well-known negative result or abandoned approach (3-10 years old) from the literature. List the assumptions that led to its rejection. For each: is this still true today? If any assumption is invalidated → frame the direction as "X was previously impractical because Y, but Z has changed." Use `literature-search` to check whether anyone already revisited it.
125
+
126
+ ---
127
+
128
+ ### 6. Failure Analysis and Boundary Probing
129
+
130
+ Understanding where a method breaks is often as valuable as showing where it works. Boundary probing systematically exposes the conditions under which accepted techniques fail.
131
+
132
+ **Types of Boundaries to Probe**:
133
+ - **Distributional**: What happens with out-of-distribution inputs?
134
+ - **Scale**: Does the method degrade at 10x or 0.1x the typical scale?
135
+ - **Adversarial**: Can the method be deliberately broken?
136
+ - **Compositional**: Does performance hold when combining multiple capabilities?
137
+ - **Temporal**: Does the method degrade over time (concept drift)?
138
+
139
+ **Application**: Select a widely-used method in your research area. Identify the implicit assumptions in its evaluation. Design experiments that systematically violate each assumption. The failure mode often reveals both the root cause and a constructive path forward.
140
+
141
+ ---
142
+
143
+ ### 7. The Simplicity Test
144
+
145
+ Before accepting complexity, ask whether a simpler approach suffices. Fields sometimes over-index on elaborate solutions when a streamlined baseline performs competitively.
146
+
147
+ **Warning Signs of Unnecessary Complexity**:
148
+ - The method has many hyperparameters with narrow optimal ranges
149
+ - Ablations show most components contribute marginally
150
+ - A simple baseline was never properly tuned or evaluated
151
+ - The improvement over baselines is within noise on most benchmarks
152
+
153
+ **Application**: For any research direction, strip the current approach to its simplest core. If the gap vs. full method is small → the contribution is the simplicity itself. If the gap is large → you now understand what the complexity buys. Either outcome sharpens the direction.
154
+
155
+ ---
156
+
157
+ ### 8. Stakeholder Rotation
158
+
159
+ Viewing a system from multiple perspectives reveals distinct classes of research questions.
160
+
161
+ | Stakeholder | Key Questions |
162
+ |-------------|---------------|
163
+ | **End User** | Is this usable? What errors are unacceptable? What is the latency tolerance? |
164
+ | **Developer** | Is this debuggable? What is the maintenance burden? How does it compose? |
165
+ | **Theorist** | Why does this work? What are the formal guarantees? Where are the gaps? |
166
+ | **Adversary** | How can this be exploited? What are the attack surfaces? |
167
+ | **Ethicist** | Who is harmed? What biases are embedded? Who is excluded? |
168
+ | **Regulator** | Is this auditable? Can decisions be explained? Is there accountability? |
169
+ | **Operator** | What is the cost? How does it scale? What is the failure mode? |
170
+
171
+ **Application**: When evaluating candidate directions, cycle through at least 3 stakeholder perspectives. Unaddressed concerns with broad impact are high-value research questions.
172
+
173
+ ---
174
+
175
+ ### 9. Composition and Decomposition
176
+
177
+ Novelty often emerges from recombination or modularization.
178
+
179
+ **Composition** (combining existing techniques):
180
+ - Identify two methods that solve complementary subproblems
181
+ - Ask: What emergent capability arises from combining them?
182
+
183
+ **Decomposition** (breaking apart monolithic systems):
184
+ - Identify a complex system with entangled components
185
+ - Ask: Which component is the actual bottleneck?
186
+
187
+ **Application**: List the 5-10 key techniques in your research area. For compositions: pick pairs and hypothesize emergent capabilities. For decompositions: isolate each component's contribution. Save promising combinations as note artifacts for further exploration.
188
+
189
+ ---
190
+
191
+ ### 10. The Two-Sentence Pitch Test
192
+
193
+ A strong research direction should be defensible in two sentences.
194
+
195
+ **Template**:
196
+ > **Sentence 1** (Problem): "[Domain] currently struggles with [specific problem], which matters because [concrete consequence]."
197
+ > **Sentence 2** (Insight): "We [approach] by [key mechanism], which works because [reason]."
198
+
199
+ **If you cannot fill this template**:
200
+ - Problem not well-defined → return to Framework 1
201
+ - Insight not clear → return to Framework 7 (simplify)
202
+ - Significance not established → return to Framework 3 (find the tension)
203
+
204
+ ---
205
+
206
+ ## Integrated Workflow: Diverge → Converge → Refine
207
+
208
+ Use this when a full exploration cycle is needed to generate and rank multiple candidate directions.
209
+
210
+ ### Phase 1: Diverge (Generate Candidates)
211
+
212
+ **Goal**: Produce 10-20 candidate directions without filtering.
213
+
214
+ 1. **Scan for tensions** (F3): List 5 trade-offs in the research area
215
+ 2. **Check what changed** (F5): Use `literature-search` to identify 3 recent shifts
216
+ 3. **Probe boundaries** (F6): Pick 2 popular methods and find where they break
217
+ 4. **Cross-pollinate** (F4): Pick 1 idea from an adjacent field
218
+ 5. **Compose/decompose** (F9): Combine 2 existing techniques or split 1 apart
219
+ 6. **Climb the abstraction ladder** (F2): For each candidate, generate up/down/sideways variants
220
+
221
+ Save the full candidate list as a note artifact so it persists across sessions.
222
+
223
+ ### Phase 2: Converge (Filter and Rank)
224
+
225
+ **Goal**: Narrow to 3-5 strongest candidates.
226
+
227
+ Apply these filters to each candidate:
228
+
229
+ | Filter | Question | Kill Criterion |
230
+ |--------|----------|----------------|
231
+ | **Two-Sentence Test** (F10) | Can you state this in two sentences? | If no → idea is not yet clear enough |
232
+ | **Problem-First Check** (F1) | Is the problem genuine and important? | If no one suffers from this → drop it |
233
+ | **Simplicity Test** (F7) | Is the complexity justified? | If a simpler approach works → simplify or drop |
234
+ | **Stakeholder Check** (F8) | Who benefits? Who might object? | If no clear beneficiary → drop it |
235
+ | **Feasibility** | Can this be executed within project constraints? | If clearly infeasible given budget/compute → park it |
236
+
237
+ ### Phase 3: Refine (Sharpen the Winner)
238
+
239
+ **Goal**: Turn the top candidate into a concrete research plan.
240
+
241
+ 1. Write the two-sentence pitch (F10)
242
+ 2. Identify the core tension being resolved (F3)
243
+ 3. Specify the abstraction level (F2)
244
+ 4. Draft 3 concrete validation questions that would confirm or refute the direction
245
+ 5. Anticipate the strongest objection and prepare a response
246
+ 6. Present the refined direction to the user for approval
247
+
248
+ **Output mapping**:
249
+ - Winning direction → concrete research plan for the user
250
+ - Top 3 candidates → literature search tasks to validate each
251
+ - Validation questions → next steps for the research
252
+ - Full candidate list + analysis → saved as note artifact for future reference
253
+
254
+ ---
255
+
256
+ ## Framework Selection Guide
257
+
258
+ | Your Situation | Start With |
259
+ |---------------|------------|
260
+ | No clear area, exploring broadly | Tension Hunting (F3) → What Changed (F5) |
261
+ | Vague area but no specific direction | Abstraction Ladder (F2) → Failure Analysis (F6) |
262
+ | Have a direction but unsure of its value | Two-Sentence Test (F10) → Simplicity Test (F7) |
263
+ | Good direction but need a fresh angle | Cross-Pollination (F4) → Stakeholder Rotation (F8) |
264
+ | Want to combine existing findings | Composition/Decomposition (F9) |
265
+ | Found a technique, seeking application | Problem-First Check (F1) → Stakeholder Rotation (F8) |
266
+ | Want to challenge current approach | Failure Analysis (F6) → Simplicity Test (F7) |
267
+
268
+ ---
269
+
270
+ ## Common Pitfalls in Research Ideation
271
+
272
+ | Pitfall | Symptom | Fix |
273
+ |---------|---------|-----|
274
+ | **Novelty without impact** | "No one has done X" but no one needs X | Apply Problem-First Check (F1) |
275
+ | **Incremental by default** | Idea is +2% on a benchmark | Climb the Abstraction Ladder (F2) |
276
+ | **Complexity worship** | Method has 8 components, each helping marginally | Apply Simplicity Test (F7) |
277
+ | **Echo chamber** | All ideas come from the same literature cluster | Use Cross-Pollination (F4) with `literature-search` on adjacent fields |
278
+ | **Stale assumptions** | "This was tried and didn't work" (years ago) | Apply What Changed (F5) |
279
+ | **Single-perspective bias** | Only considering one stakeholder | Use Stakeholder Rotation (F8) |
280
+ | **Premature convergence** | Committed to first idea without exploring | Run full Diverge phase |
@@ -0,0 +1,114 @@
1
+ ---
2
+ name: coding
3
+ description: Systematic coding workflow for implementing, debugging, and refactoring code. Covers test-first development, 300-line generation limits, edit-over-rewrite, error-feedback loops, and incremental verification patterns.
4
+ category: General
5
+ depends: []
6
+ tags: [code, programming, development, debugging, refactoring, testing]
7
+ triggers: [write code, implement, fix bug, debug, refactor, add feature, unit test, coding, code review, build error, test failure, programming, develop, 写代码, 编程, 调试, 重构]
8
+ allowed-tools: [Read, Write, Edit, Bash, Grep, Find, Ls]
9
+ ---
10
+
11
+ # Coding
12
+
13
+ ## Overview
14
+
15
+ This skill provides a disciplined workflow for writing, modifying, and debugging code inside the workspace. The core principle is **small verified steps**: never generate large blocks without running tests, never rewrite a file when a targeted edit suffices, and always close the feedback loop by checking the result of every change.
16
+
17
+ ## When to Use This Skill
18
+
19
+ - Implementing a new feature, function, or module
20
+ - Fixing a bug or build error
21
+ - Refactoring existing code
22
+ - Adding or updating tests
23
+ - Reviewing code and suggesting improvements
24
+ - Any task that involves reading, writing, or running code in the workspace
25
+
26
+ ## Core Principles
27
+
28
+ ### 1. Understand Before Changing
29
+
30
+ Before writing any code:
31
+ 1. Use `grep` and `find` to locate relevant files and understand the existing structure.
32
+ 2. Use `read` with offset+limit to inspect specific sections — avoid reading entire large files.
33
+ 3. Identify existing patterns, conventions, naming schemes, and test styles in the project.
34
+ 4. Check for existing tests related to the area you are changing.
35
+
36
+ ### 2. Test-First Development
37
+
38
+ When the project has a test framework:
39
+ 1. **Write or update the test first** that captures the expected behavior.
40
+ 2. Run the test to confirm it fails (red).
41
+ 3. Implement the minimal code to make the test pass (green).
42
+ 4. Run the test again to confirm it passes.
43
+ 5. Refactor if needed, re-running tests after each change.
44
+
45
+ When there is no test framework or when writing a quick script, verify by running the code and checking output instead.
46
+
47
+ ### 3. Small Generation Limit
48
+
49
+ - **Never generate more than 300 lines of code in a single write/edit operation.** If the task requires more, break it into multiple steps, verifying each step before proceeding.
50
+ - Prefer multiple small, tested increments over one large generation.
51
+ - Each increment should leave the codebase in a working state.
52
+
53
+ ### 4. Edit Over Rewrite
54
+
55
+ - **Use `edit` (oldText/newText) for targeted changes** to existing files. Do not rewrite an entire file when only a few lines need to change.
56
+ - Use `write` only for new files or when the majority of a file must change.
57
+ - Before editing, `read` the relevant section to get the exact `oldText` — do not guess.
58
+
59
+ ### 5. Error-Feedback Loop
60
+
61
+ After every code change:
62
+ 1. **Run the relevant command** (build, test, lint, or the script itself) using `bash`.
63
+ 2. **Read the error output carefully.** Do not guess what went wrong.
64
+ 3. If the command fails, diagnose the root cause from the actual error message.
65
+ 4. Fix the specific issue. Do not make speculative bulk changes.
66
+ 5. Re-run to confirm the fix. Repeat until green.
67
+
68
+ Never move on to the next step while the current step has failing tests or build errors.
69
+
70
+ ### 6. Iteration Awareness
71
+
72
+ For multi-step tasks:
73
+ - Plan the sequence of changes before starting.
74
+ - After each step, verify the codebase is in a clean state (tests pass, no lint errors).
75
+ - If you discover that your plan needs adjustment, state the revised plan before continuing.
76
+ - Keep the user informed of progress: what was done, what comes next.
77
+
78
+ ## Workflow
79
+
80
+ ### New Feature Implementation
81
+
82
+ 1. **Locate**: `grep`/`find` to understand where the feature fits.
83
+ 2. **Read**: Inspect related modules, interfaces, and existing tests.
84
+ 3. **Plan**: State the files to create/modify and the order.
85
+ 4. **Test**: Write the test(s) first.
86
+ 5. **Implement**: Write code in increments of <=300 lines per operation.
87
+ 6. **Verify**: Run tests after each increment.
88
+ 7. **Clean up**: Remove dead code, add comments where non-obvious.
89
+
90
+ ### Bug Fix
91
+
92
+ 1. **Reproduce**: Run the failing test or command; read the error.
93
+ 2. **Locate**: Use `grep` to find the relevant code path.
94
+ 3. **Diagnose**: Read the code and identify the root cause.
95
+ 4. **Test**: Write a test that reproduces the bug (if one doesn't exist).
96
+ 5. **Fix**: Make the minimal targeted edit.
97
+ 6. **Verify**: Run tests to confirm the fix and no regressions.
98
+
99
+ ### Refactoring
100
+
101
+ 1. **Ensure coverage**: Confirm existing tests pass before refactoring.
102
+ 2. **Change incrementally**: One refactoring step at a time.
103
+ 3. **Verify after each step**: Run tests between every change.
104
+ 4. **Do not change behavior**: If tests break, the refactoring introduced a bug — fix it before continuing.
105
+
106
+ ## Anti-Patterns to Avoid
107
+
108
+ - Generating an entire file from scratch when only a few lines need changing.
109
+ - Writing code without checking existing patterns/conventions in the project.
110
+ - Making multiple changes before running any verification.
111
+ - Ignoring test failures and continuing to the next step.
112
+ - Guessing at file contents instead of reading them.
113
+ - Using `bash cat` or `bash grep` when the built-in `read`/`grep`/`find` tools are available.
114
+ - Generating more than 300 lines in a single operation.