flowjet-agent 1.0.19__py3-none-any.whl

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 (322) hide show
  1. fj_ai/__init__.py +12 -0
  2. fj_ai/__main__.py +7 -0
  3. fj_ai/agent.py +260 -0
  4. fj_ai/builtin_skills/README.md +10 -0
  5. fj_ai/builtin_skills/brainstorming/SKILL.md +159 -0
  6. fj_ai/builtin_skills/brainstorming/scripts/frame-template.html +213 -0
  7. fj_ai/builtin_skills/brainstorming/scripts/helper.js +167 -0
  8. fj_ai/builtin_skills/brainstorming/scripts/server.cjs +723 -0
  9. fj_ai/builtin_skills/brainstorming/scripts/start-server.sh +209 -0
  10. fj_ai/builtin_skills/brainstorming/scripts/stop-server.sh +120 -0
  11. fj_ai/builtin_skills/brainstorming/spec-document-reviewer-prompt.md +49 -0
  12. fj_ai/builtin_skills/brainstorming/visual-companion.md +291 -0
  13. fj_ai/builtin_skills/dispatching-parallel-agents/SKILL.md +185 -0
  14. fj_ai/builtin_skills/docx/LICENSE.txt +30 -0
  15. fj_ai/builtin_skills/docx/SKILL.md +91 -0
  16. fj_ai/builtin_skills/docx/scripts/__init__.py +1 -0
  17. fj_ai/builtin_skills/docx/scripts/accept_changes.py +131 -0
  18. fj_ai/builtin_skills/docx/scripts/comment.py +410 -0
  19. fj_ai/builtin_skills/docx/scripts/merge_runs.py +304 -0
  20. fj_ai/builtin_skills/docx/scripts/office/helpers/__init__.py +109 -0
  21. fj_ai/builtin_skills/docx/scripts/office/helpers/pptx_chart.py +189 -0
  22. fj_ai/builtin_skills/docx/scripts/office/helpers/pptx_slide.py +59 -0
  23. fj_ai/builtin_skills/docx/scripts/office/helpers/pptx_theme.py +110 -0
  24. fj_ai/builtin_skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
  25. fj_ai/builtin_skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
  26. fj_ai/builtin_skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
  27. fj_ai/builtin_skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
  28. fj_ai/builtin_skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
  29. fj_ai/builtin_skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
  30. fj_ai/builtin_skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
  31. fj_ai/builtin_skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
  32. fj_ai/builtin_skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
  33. fj_ai/builtin_skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
  34. fj_ai/builtin_skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
  35. fj_ai/builtin_skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
  36. fj_ai/builtin_skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
  37. fj_ai/builtin_skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
  38. fj_ai/builtin_skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
  39. fj_ai/builtin_skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
  40. fj_ai/builtin_skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
  41. fj_ai/builtin_skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
  42. fj_ai/builtin_skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
  43. fj_ai/builtin_skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
  44. fj_ai/builtin_skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
  45. fj_ai/builtin_skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
  46. fj_ai/builtin_skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
  47. fj_ai/builtin_skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
  48. fj_ai/builtin_skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
  49. fj_ai/builtin_skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
  50. fj_ai/builtin_skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
  51. fj_ai/builtin_skills/docx/scripts/office/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
  52. fj_ai/builtin_skills/docx/scripts/office/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
  53. fj_ai/builtin_skills/docx/scripts/office/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
  54. fj_ai/builtin_skills/docx/scripts/office/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
  55. fj_ai/builtin_skills/docx/scripts/office/schemas/mce/mc.xsd +75 -0
  56. fj_ai/builtin_skills/docx/scripts/office/schemas/microsoft/wml-2010.xsd +560 -0
  57. fj_ai/builtin_skills/docx/scripts/office/schemas/microsoft/wml-2012.xsd +67 -0
  58. fj_ai/builtin_skills/docx/scripts/office/schemas/microsoft/wml-2018.xsd +14 -0
  59. fj_ai/builtin_skills/docx/scripts/office/schemas/microsoft/wml-cex-2018.xsd +20 -0
  60. fj_ai/builtin_skills/docx/scripts/office/schemas/microsoft/wml-cid-2016.xsd +13 -0
  61. fj_ai/builtin_skills/docx/scripts/office/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
  62. fj_ai/builtin_skills/docx/scripts/office/schemas/microsoft/wml-symex-2015.xsd +8 -0
  63. fj_ai/builtin_skills/docx/scripts/office/soffice.py +190 -0
  64. fj_ai/builtin_skills/docx/scripts/office/validate.py +173 -0
  65. fj_ai/builtin_skills/docx/scripts/office/validators/__init__.py +15 -0
  66. fj_ai/builtin_skills/docx/scripts/office/validators/base.py +826 -0
  67. fj_ai/builtin_skills/docx/scripts/office/validators/docx.py +445 -0
  68. fj_ai/builtin_skills/docx/scripts/office/validators/pptx.py +428 -0
  69. fj_ai/builtin_skills/docx/scripts/office/validators/redlining.py +288 -0
  70. fj_ai/builtin_skills/docx/scripts/templates/comments.xml +3 -0
  71. fj_ai/builtin_skills/docx/scripts/templates/commentsExtended.xml +3 -0
  72. fj_ai/builtin_skills/docx/scripts/templates/commentsExtensible.xml +3 -0
  73. fj_ai/builtin_skills/docx/scripts/templates/commentsIds.xml +3 -0
  74. fj_ai/builtin_skills/docx/scripts/templates/people.xml +3 -0
  75. fj_ai/builtin_skills/drawio-skill/SKILL.md +353 -0
  76. fj_ai/builtin_skills/drawio-skill/data/SHAPE-INDEX-NOTICE.md +17 -0
  77. fj_ai/builtin_skills/drawio-skill/data/lobe-icons.json +878 -0
  78. fj_ai/builtin_skills/drawio-skill/data/shape-index.json.gz +0 -0
  79. fj_ai/builtin_skills/drawio-skill/references/autolayout.md +173 -0
  80. fj_ai/builtin_skills/drawio-skill/references/derasterize.md +54 -0
  81. fj_ai/builtin_skills/drawio-skill/references/diagram-types.md +205 -0
  82. fj_ai/builtin_skills/drawio-skill/references/live-infra.md +71 -0
  83. fj_ai/builtin_skills/drawio-skill/references/mermaid-authoring.md +56 -0
  84. fj_ai/builtin_skills/drawio-skill/references/pr-bot.md +73 -0
  85. fj_ai/builtin_skills/drawio-skill/references/shapes.md +151 -0
  86. fj_ai/builtin_skills/drawio-skill/references/style-extraction.md +255 -0
  87. fj_ai/builtin_skills/drawio-skill/references/style-presets.md +115 -0
  88. fj_ai/builtin_skills/drawio-skill/references/toolbox.md +107 -0
  89. fj_ai/builtin_skills/drawio-skill/references/troubleshooting.md +63 -0
  90. fj_ai/builtin_skills/drawio-skill/references/tubemap.md +67 -0
  91. fj_ai/builtin_skills/drawio-skill/references/xml-authoring.md +205 -0
  92. fj_ai/builtin_skills/drawio-skill/scripts/aiicons.py +204 -0
  93. fj_ai/builtin_skills/drawio-skill/scripts/autolayout.py +410 -0
  94. fj_ai/builtin_skills/drawio-skill/scripts/buildup.py +331 -0
  95. fj_ai/builtin_skills/drawio-skill/scripts/c4.py +163 -0
  96. fj_ai/builtin_skills/drawio-skill/scripts/ciimports.py +182 -0
  97. fj_ai/builtin_skills/drawio-skill/scripts/composeimports.py +118 -0
  98. fj_ai/builtin_skills/drawio-skill/scripts/compress.py +257 -0
  99. fj_ai/builtin_skills/drawio-skill/scripts/dockerimports.py +144 -0
  100. fj_ai/builtin_skills/drawio-skill/scripts/drawio2mermaid.py +153 -0
  101. fj_ai/builtin_skills/drawio-skill/scripts/drawio2pptx.py +112 -0
  102. fj_ai/builtin_skills/drawio-skill/scripts/drawiodiff.py +164 -0
  103. fj_ai/builtin_skills/drawio-skill/scripts/drawiohtml.py +229 -0
  104. fj_ai/builtin_skills/drawio-skill/scripts/encode_drawio_url.py +58 -0
  105. fj_ai/builtin_skills/drawio-skill/scripts/explain.py +156 -0
  106. fj_ai/builtin_skills/drawio-skill/scripts/goimports.py +141 -0
  107. fj_ai/builtin_skills/drawio-skill/scripts/heatmap.py +226 -0
  108. fj_ai/builtin_skills/drawio-skill/scripts/jsimports.py +162 -0
  109. fj_ai/builtin_skills/drawio-skill/scripts/k8simports.py +242 -0
  110. fj_ai/builtin_skills/drawio-skill/scripts/openapiimports.py +165 -0
  111. fj_ai/builtin_skills/drawio-skill/scripts/prdiff.py +191 -0
  112. fj_ai/builtin_skills/drawio-skill/scripts/pyclasses.py +156 -0
  113. fj_ai/builtin_skills/drawio-skill/scripts/pyimports.py +153 -0
  114. fj_ai/builtin_skills/drawio-skill/scripts/raster2drawio.py +196 -0
  115. fj_ai/builtin_skills/drawio-skill/scripts/relabel.py +102 -0
  116. fj_ai/builtin_skills/drawio-skill/scripts/repair_png.py +37 -0
  117. fj_ai/builtin_skills/drawio-skill/scripts/restyle.py +161 -0
  118. fj_ai/builtin_skills/drawio-skill/scripts/runbook.py +241 -0
  119. fj_ai/builtin_skills/drawio-skill/scripts/rustimports.py +203 -0
  120. fj_ai/builtin_skills/drawio-skill/scripts/seqlayout.py +222 -0
  121. fj_ai/builtin_skills/drawio-skill/scripts/shapesearch.py +162 -0
  122. fj_ai/builtin_skills/drawio-skill/scripts/sqlerd.py +167 -0
  123. fj_ai/builtin_skills/drawio-skill/scripts/svgflow.py +85 -0
  124. fj_ai/builtin_skills/drawio-skill/scripts/tfimports.py +262 -0
  125. fj_ai/builtin_skills/drawio-skill/scripts/tfstate.py +128 -0
  126. fj_ai/builtin_skills/drawio-skill/scripts/timelapse.py +251 -0
  127. fj_ai/builtin_skills/drawio-skill/scripts/tubemap.py +177 -0
  128. fj_ai/builtin_skills/drawio-skill/scripts/validate.py +340 -0
  129. fj_ai/builtin_skills/drawio-skill/styles/built-in/colorblind-safe.json +49 -0
  130. fj_ai/builtin_skills/drawio-skill/styles/built-in/corporate.json +49 -0
  131. fj_ai/builtin_skills/drawio-skill/styles/built-in/dark.json +52 -0
  132. fj_ai/builtin_skills/drawio-skill/styles/built-in/default.json +49 -0
  133. fj_ai/builtin_skills/drawio-skill/styles/built-in/handdrawn.json +49 -0
  134. fj_ai/builtin_skills/drawio-skill/styles/schema.json +264 -0
  135. fj_ai/builtin_skills/executing-plans/SKILL.md +70 -0
  136. fj_ai/builtin_skills/finishing-a-development-branch/SKILL.md +241 -0
  137. fj_ai/builtin_skills/mcp-builder/LICENSE.txt +202 -0
  138. fj_ai/builtin_skills/mcp-builder/SKILL.md +236 -0
  139. fj_ai/builtin_skills/mcp-builder/reference/evaluation.md +602 -0
  140. fj_ai/builtin_skills/mcp-builder/reference/mcp_best_practices.md +249 -0
  141. fj_ai/builtin_skills/mcp-builder/reference/node_mcp_server.md +970 -0
  142. fj_ai/builtin_skills/mcp-builder/reference/python_mcp_server.md +719 -0
  143. fj_ai/builtin_skills/mcp-builder/scripts/connections.py +151 -0
  144. fj_ai/builtin_skills/mcp-builder/scripts/evaluation.py +408 -0
  145. fj_ai/builtin_skills/mcp-builder/scripts/example_evaluation.xml +22 -0
  146. fj_ai/builtin_skills/mcp-builder/scripts/requirements.txt +2 -0
  147. fj_ai/builtin_skills/pdf/LICENSE.txt +30 -0
  148. fj_ai/builtin_skills/pdf/SKILL.md +314 -0
  149. fj_ai/builtin_skills/pdf/forms.md +294 -0
  150. fj_ai/builtin_skills/pdf/reference.md +612 -0
  151. fj_ai/builtin_skills/pdf/scripts/check_bounding_boxes.py +72 -0
  152. fj_ai/builtin_skills/pdf/scripts/check_fillable_fields.py +11 -0
  153. fj_ai/builtin_skills/pdf/scripts/convert_pdf_to_images.py +31 -0
  154. fj_ai/builtin_skills/pdf/scripts/create_validation_image.py +37 -0
  155. fj_ai/builtin_skills/pdf/scripts/extract_form_field_info.py +128 -0
  156. fj_ai/builtin_skills/pdf/scripts/extract_form_structure.py +115 -0
  157. fj_ai/builtin_skills/pdf/scripts/fill_fillable_fields.py +102 -0
  158. fj_ai/builtin_skills/pdf/scripts/fill_pdf_form_with_annotations.py +106 -0
  159. fj_ai/builtin_skills/pptx/LICENSE.txt +30 -0
  160. fj_ai/builtin_skills/pptx/SKILL.md +238 -0
  161. fj_ai/builtin_skills/pptx/scripts/__init__.py +0 -0
  162. fj_ai/builtin_skills/pptx/scripts/add_slide.py +377 -0
  163. fj_ai/builtin_skills/pptx/scripts/clean.py +303 -0
  164. fj_ai/builtin_skills/pptx/scripts/office/helpers/__init__.py +109 -0
  165. fj_ai/builtin_skills/pptx/scripts/office/helpers/pptx_chart.py +189 -0
  166. fj_ai/builtin_skills/pptx/scripts/office/helpers/pptx_slide.py +59 -0
  167. fj_ai/builtin_skills/pptx/scripts/office/helpers/pptx_theme.py +110 -0
  168. fj_ai/builtin_skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
  169. fj_ai/builtin_skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
  170. fj_ai/builtin_skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
  171. fj_ai/builtin_skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
  172. fj_ai/builtin_skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
  173. fj_ai/builtin_skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
  174. fj_ai/builtin_skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
  175. fj_ai/builtin_skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
  176. fj_ai/builtin_skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
  177. fj_ai/builtin_skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
  178. fj_ai/builtin_skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
  179. fj_ai/builtin_skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
  180. fj_ai/builtin_skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
  181. fj_ai/builtin_skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
  182. fj_ai/builtin_skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
  183. fj_ai/builtin_skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
  184. fj_ai/builtin_skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
  185. fj_ai/builtin_skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
  186. fj_ai/builtin_skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
  187. fj_ai/builtin_skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
  188. fj_ai/builtin_skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
  189. fj_ai/builtin_skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
  190. fj_ai/builtin_skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
  191. fj_ai/builtin_skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
  192. fj_ai/builtin_skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
  193. fj_ai/builtin_skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
  194. fj_ai/builtin_skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
  195. fj_ai/builtin_skills/pptx/scripts/office/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
  196. fj_ai/builtin_skills/pptx/scripts/office/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
  197. fj_ai/builtin_skills/pptx/scripts/office/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
  198. fj_ai/builtin_skills/pptx/scripts/office/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
  199. fj_ai/builtin_skills/pptx/scripts/office/schemas/mce/mc.xsd +75 -0
  200. fj_ai/builtin_skills/pptx/scripts/office/schemas/microsoft/wml-2010.xsd +560 -0
  201. fj_ai/builtin_skills/pptx/scripts/office/schemas/microsoft/wml-2012.xsd +67 -0
  202. fj_ai/builtin_skills/pptx/scripts/office/schemas/microsoft/wml-2018.xsd +14 -0
  203. fj_ai/builtin_skills/pptx/scripts/office/schemas/microsoft/wml-cex-2018.xsd +20 -0
  204. fj_ai/builtin_skills/pptx/scripts/office/schemas/microsoft/wml-cid-2016.xsd +13 -0
  205. fj_ai/builtin_skills/pptx/scripts/office/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
  206. fj_ai/builtin_skills/pptx/scripts/office/schemas/microsoft/wml-symex-2015.xsd +8 -0
  207. fj_ai/builtin_skills/pptx/scripts/office/soffice.py +190 -0
  208. fj_ai/builtin_skills/pptx/scripts/office/validate.py +173 -0
  209. fj_ai/builtin_skills/pptx/scripts/office/validators/__init__.py +15 -0
  210. fj_ai/builtin_skills/pptx/scripts/office/validators/base.py +826 -0
  211. fj_ai/builtin_skills/pptx/scripts/office/validators/docx.py +445 -0
  212. fj_ai/builtin_skills/pptx/scripts/office/validators/pptx.py +428 -0
  213. fj_ai/builtin_skills/pptx/scripts/office/validators/redlining.py +288 -0
  214. fj_ai/builtin_skills/pptx/scripts/thumbnail.py +307 -0
  215. fj_ai/builtin_skills/receiving-code-review/SKILL.md +213 -0
  216. fj_ai/builtin_skills/requesting-code-review/SKILL.md +103 -0
  217. fj_ai/builtin_skills/requesting-code-review/code-reviewer.md +172 -0
  218. fj_ai/builtin_skills/subagent-driven-development/SKILL.md +418 -0
  219. fj_ai/builtin_skills/subagent-driven-development/implementer-prompt.md +139 -0
  220. fj_ai/builtin_skills/subagent-driven-development/scripts/review-package +44 -0
  221. fj_ai/builtin_skills/subagent-driven-development/scripts/sdd-workspace +22 -0
  222. fj_ai/builtin_skills/subagent-driven-development/scripts/task-brief +40 -0
  223. fj_ai/builtin_skills/subagent-driven-development/task-reviewer-prompt.md +188 -0
  224. fj_ai/builtin_skills/systematic-debugging/CREATION-LOG.md +119 -0
  225. fj_ai/builtin_skills/systematic-debugging/SKILL.md +296 -0
  226. fj_ai/builtin_skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
  227. fj_ai/builtin_skills/systematic-debugging/condition-based-waiting.md +115 -0
  228. fj_ai/builtin_skills/systematic-debugging/defense-in-depth.md +122 -0
  229. fj_ai/builtin_skills/systematic-debugging/find-polluter.sh +63 -0
  230. fj_ai/builtin_skills/systematic-debugging/root-cause-tracing.md +169 -0
  231. fj_ai/builtin_skills/systematic-debugging/test-academic.md +14 -0
  232. fj_ai/builtin_skills/systematic-debugging/test-pressure-1.md +58 -0
  233. fj_ai/builtin_skills/systematic-debugging/test-pressure-2.md +68 -0
  234. fj_ai/builtin_skills/systematic-debugging/test-pressure-3.md +69 -0
  235. fj_ai/builtin_skills/test-driven-development/SKILL.md +371 -0
  236. fj_ai/builtin_skills/test-driven-development/testing-anti-patterns.md +299 -0
  237. fj_ai/builtin_skills/using-git-worktrees/SKILL.md +202 -0
  238. fj_ai/builtin_skills/using-superpowers/SKILL.md +62 -0
  239. fj_ai/builtin_skills/using-superpowers/references/antigravity-tools.md +23 -0
  240. fj_ai/builtin_skills/using-superpowers/references/codex-tools.md +39 -0
  241. fj_ai/builtin_skills/using-superpowers/references/pi-tools.md +16 -0
  242. fj_ai/builtin_skills/verification-before-completion/SKILL.md +139 -0
  243. fj_ai/builtin_skills/writing-plans/SKILL.md +174 -0
  244. fj_ai/builtin_skills/writing-plans/plan-document-reviewer-prompt.md +49 -0
  245. fj_ai/builtin_skills/writing-skills/SKILL.md +689 -0
  246. fj_ai/builtin_skills/writing-skills/anthropic-best-practices.md +1150 -0
  247. fj_ai/builtin_skills/writing-skills/examples/CLAUDE_MD_TESTING.md +189 -0
  248. fj_ai/builtin_skills/writing-skills/graphviz-conventions.dot +172 -0
  249. fj_ai/builtin_skills/writing-skills/persuasion-principles.md +187 -0
  250. fj_ai/builtin_skills/writing-skills/render-graphs.js +168 -0
  251. fj_ai/builtin_skills/writing-skills/testing-skills-with-subagents.md +384 -0
  252. fj_ai/builtin_skills/xlsx/LICENSE.txt +30 -0
  253. fj_ai/builtin_skills/xlsx/SKILL.md +99 -0
  254. fj_ai/builtin_skills/xlsx/scripts/office/helpers/__init__.py +109 -0
  255. fj_ai/builtin_skills/xlsx/scripts/office/helpers/pptx_chart.py +189 -0
  256. fj_ai/builtin_skills/xlsx/scripts/office/helpers/pptx_slide.py +59 -0
  257. fj_ai/builtin_skills/xlsx/scripts/office/helpers/pptx_theme.py +110 -0
  258. fj_ai/builtin_skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
  259. fj_ai/builtin_skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
  260. fj_ai/builtin_skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
  261. fj_ai/builtin_skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
  262. fj_ai/builtin_skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
  263. fj_ai/builtin_skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
  264. fj_ai/builtin_skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
  265. fj_ai/builtin_skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
  266. fj_ai/builtin_skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
  267. fj_ai/builtin_skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
  268. fj_ai/builtin_skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
  269. fj_ai/builtin_skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
  270. fj_ai/builtin_skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
  271. fj_ai/builtin_skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
  272. fj_ai/builtin_skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
  273. fj_ai/builtin_skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
  274. fj_ai/builtin_skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
  275. fj_ai/builtin_skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
  276. fj_ai/builtin_skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
  277. fj_ai/builtin_skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
  278. fj_ai/builtin_skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
  279. fj_ai/builtin_skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
  280. fj_ai/builtin_skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
  281. fj_ai/builtin_skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
  282. fj_ai/builtin_skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
  283. fj_ai/builtin_skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
  284. fj_ai/builtin_skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
  285. fj_ai/builtin_skills/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
  286. fj_ai/builtin_skills/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
  287. fj_ai/builtin_skills/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
  288. fj_ai/builtin_skills/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
  289. fj_ai/builtin_skills/xlsx/scripts/office/schemas/mce/mc.xsd +75 -0
  290. fj_ai/builtin_skills/xlsx/scripts/office/schemas/microsoft/wml-2010.xsd +560 -0
  291. fj_ai/builtin_skills/xlsx/scripts/office/schemas/microsoft/wml-2012.xsd +67 -0
  292. fj_ai/builtin_skills/xlsx/scripts/office/schemas/microsoft/wml-2018.xsd +14 -0
  293. fj_ai/builtin_skills/xlsx/scripts/office/schemas/microsoft/wml-cex-2018.xsd +20 -0
  294. fj_ai/builtin_skills/xlsx/scripts/office/schemas/microsoft/wml-cid-2016.xsd +13 -0
  295. fj_ai/builtin_skills/xlsx/scripts/office/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
  296. fj_ai/builtin_skills/xlsx/scripts/office/schemas/microsoft/wml-symex-2015.xsd +8 -0
  297. fj_ai/builtin_skills/xlsx/scripts/office/soffice.py +190 -0
  298. fj_ai/builtin_skills/xlsx/scripts/office/validate.py +173 -0
  299. fj_ai/builtin_skills/xlsx/scripts/office/validators/__init__.py +15 -0
  300. fj_ai/builtin_skills/xlsx/scripts/office/validators/base.py +826 -0
  301. fj_ai/builtin_skills/xlsx/scripts/office/validators/docx.py +445 -0
  302. fj_ai/builtin_skills/xlsx/scripts/office/validators/pptx.py +428 -0
  303. fj_ai/builtin_skills/xlsx/scripts/office/validators/redlining.py +288 -0
  304. fj_ai/builtin_skills/xlsx/scripts/recalc.py +302 -0
  305. fj_ai/cli.py +513 -0
  306. fj_ai/completion/__init__.py +7 -0
  307. fj_ai/completion/context.py +250 -0
  308. fj_ai/completion/engine.py +471 -0
  309. fj_ai/doctor_cmd.py +198 -0
  310. fj_ai/progress.py +805 -0
  311. fj_ai/setup_cmd.py +531 -0
  312. fj_ai/shell/__init__.py +0 -0
  313. fj_ai/shell/_fj.zsh +74 -0
  314. fj_ai/shell/fj.bash +68 -0
  315. fj_ai/stream.py +453 -0
  316. fj_ai/threads.py +360 -0
  317. fj_ai/tool_stream.py +246 -0
  318. flowjet_agent-1.0.19.dist-info/METADATA +197 -0
  319. flowjet_agent-1.0.19.dist-info/RECORD +322 -0
  320. flowjet_agent-1.0.19.dist-info/WHEEL +4 -0
  321. flowjet_agent-1.0.19.dist-info/entry_points.txt +4 -0
  322. flowjet_agent-1.0.19.dist-info/licenses/LICENSE +21 -0
fj_ai/__init__.py ADDED
@@ -0,0 +1,12 @@
1
+ """FlowJet (flowjet-agent) — thin CLI over soothe-nano."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import importlib.metadata
6
+
7
+ try:
8
+ __version__ = importlib.metadata.version("flowjet-agent")
9
+ except importlib.metadata.PackageNotFoundError: # pragma: no cover
10
+ __version__ = "0.0.0"
11
+
12
+ __all__ = ["__version__"]
fj_ai/__main__.py ADDED
@@ -0,0 +1,7 @@
1
+ """Allow ``python -m fj_ai``."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from fj_ai.cli import main
6
+
7
+ raise SystemExit(main())
fj_ai/agent.py ADDED
@@ -0,0 +1,260 @@
1
+ """Agent bootstrap, config load, builtin skills, and quiet CLI logging."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import logging
6
+ import os
7
+ import sys
8
+ from collections.abc import AsyncIterator
9
+ from contextlib import asynccontextmanager
10
+ from logging.handlers import RotatingFileHandler
11
+ from pathlib import Path
12
+ from typing import Any
13
+
14
+ from soothe_nano import SootheNanoAgent, create_nano_agent
15
+ from soothe_nano.config import SOOTHE_HOME, SootheConfig
16
+ from soothe_nano.resolve import resolve_checkpointer
17
+
18
+ logger = logging.getLogger(__name__)
19
+
20
+ # ---------------------------------------------------------------------------
21
+ # Config
22
+ # ---------------------------------------------------------------------------
23
+
24
+
25
+ def default_config_path() -> Path:
26
+ """Return ``~/.soothe/config/nano.yml`` (respects ``SOOTHE_HOME``)."""
27
+ return SOOTHE_HOME / "config" / "nano.yml"
28
+
29
+
30
+ def load_config(config_path: str | Path | None = None) -> SootheConfig:
31
+ """Load ``SootheConfig`` from YAML, or bootstrap from env when missing.
32
+
33
+ Resolution order:
34
+ 1. Explicit ``config_path``
35
+ 2. ``SOOTHE_HOME / config / nano.yml`` (default ``~/.soothe/config/nano.yml``)
36
+ 3. ``SootheConfig()`` zero-config from ``OPENAI_API_KEY`` / ``ANTHROPIC_API_KEY``
37
+ """
38
+ path = Path(config_path).expanduser() if config_path else default_config_path()
39
+ if path.is_file():
40
+ return SootheConfig.from_yaml_file(str(path))
41
+ if config_path is not None:
42
+ raise FileNotFoundError(f"Config not found: {path}")
43
+ return SootheConfig()
44
+
45
+
46
+ # ---------------------------------------------------------------------------
47
+ # Builtin skills
48
+ # ---------------------------------------------------------------------------
49
+
50
+ _REGISTERED = False
51
+
52
+ BUILTIN_SKILLS_DIR = Path(__file__).resolve().parent / "builtin_skills"
53
+
54
+ # fj-only additions on top of soothe-nano's DEFAULT_CORE_SKILL_NAMES.
55
+ # Nano defaults (weather, github, clawhub, skill-creator) come from nano itself.
56
+ FJ_CORE_SKILL_NAMES: tuple[str, ...] = (
57
+ "brainstorming",
58
+ "requesting-code-review",
59
+ "systematic-debugging",
60
+ "using-superpowers",
61
+ )
62
+
63
+
64
+ def fj_core_skill_names() -> list[str]:
65
+ """Nano default core skills plus fj high-traffic workflow skills."""
66
+ from soothe_nano.skills.registry import DEFAULT_CORE_SKILL_NAMES
67
+
68
+ return sorted(DEFAULT_CORE_SKILL_NAMES | {n.lower() for n in FJ_CORE_SKILL_NAMES})
69
+
70
+
71
+ def register_fj_builtin_skills() -> None:
72
+ """Register ``fj_ai/builtin_skills`` as a soothe-nano builtin skill root.
73
+
74
+ Idempotent — safe to call from multiple entry points. Requires
75
+ ``soothe-nano>=0.9.9`` (``register_builtin_skill_root``).
76
+ """
77
+ global _REGISTERED
78
+ if _REGISTERED:
79
+ return
80
+ if not BUILTIN_SKILLS_DIR.is_dir():
81
+ return
82
+ from soothe_nano.skills import register_builtin_skill_root
83
+
84
+ register_builtin_skill_root(BUILTIN_SKILLS_DIR, source="builtin")
85
+ _REGISTERED = True
86
+
87
+
88
+ # ---------------------------------------------------------------------------
89
+ # CLI logging
90
+ # ---------------------------------------------------------------------------
91
+
92
+ _BROWSER_USE_SETUP_LOGGING = "BROWSER_USE_SETUP_LOGGING"
93
+ _FJ_CONSOLE_HANDLER = "fj-console"
94
+
95
+
96
+ class _CompactConsoleFormatter(logging.Formatter):
97
+ """One-line console records without exception tracebacks."""
98
+
99
+ def formatException(self, ei: object) -> str: # noqa: N802 - logging API
100
+ return ""
101
+
102
+ def format(self, record: logging.LogRecord) -> str:
103
+ # logger.exception sets exc_info; drop it so format() stays one line.
104
+ record.exc_info = None
105
+ record.exc_text = None
106
+ return super().format(record)
107
+
108
+
109
+ def configure_cli_logging(*, verbose: bool = False) -> None:
110
+ """Quiet the console for one-shot CLI use.
111
+
112
+ - Opt out of ``browser_use`` import-time root logger setup when unset.
113
+ - Remove existing root stream handlers (stderr/stdout) so init INFO
114
+ lines do not interleave with the agent answer.
115
+ - Prevent ``lastResort`` traceback dumps from soothe tool failures.
116
+ - When ``verbose``, show WARNING+ as single-line messages on stderr.
117
+ """
118
+ os.environ.setdefault(_BROWSER_USE_SETUP_LOGGING, "false")
119
+ _remove_root_console_handlers()
120
+ root = logging.getLogger()
121
+ if verbose:
122
+ handler = logging.StreamHandler(sys.stderr)
123
+ handler.set_name(_FJ_CONSOLE_HANDLER)
124
+ handler.setLevel(logging.WARNING)
125
+ handler.setFormatter(_CompactConsoleFormatter("%(message)s"))
126
+ root.addHandler(handler)
127
+ elif not root.handlers:
128
+ null = logging.NullHandler()
129
+ null.set_name(_FJ_CONSOLE_HANDLER)
130
+ root.addHandler(null)
131
+ if root.level < logging.WARNING:
132
+ root.setLevel(logging.WARNING)
133
+
134
+
135
+ def silence_after_plugins(*, verbose: bool = False) -> None:
136
+ """Re-apply quieting after plugin imports (belt-and-suspenders)."""
137
+ configure_cli_logging(verbose=verbose)
138
+
139
+
140
+ def _remove_root_console_handlers() -> None:
141
+ root = logging.getLogger()
142
+ for handler in list(root.handlers):
143
+ if isinstance(handler, RotatingFileHandler):
144
+ continue
145
+ if isinstance(handler, logging.FileHandler):
146
+ continue
147
+ if isinstance(handler, logging.StreamHandler) or isinstance(handler, logging.NullHandler):
148
+ root.removeHandler(handler)
149
+ try:
150
+ handler.close()
151
+ except Exception: # pragma: no cover - defensive
152
+ pass
153
+
154
+
155
+ # ---------------------------------------------------------------------------
156
+ # Agent build
157
+ # ---------------------------------------------------------------------------
158
+
159
+
160
+ def ensure_workspace(workspace: Path | None = None) -> Path:
161
+ """Use ``workspace`` or cwd as ``SOOTHE_WORKSPACE`` for file/shell tools."""
162
+ root = (workspace or Path.cwd()).resolve()
163
+ os.environ.setdefault("SOOTHE_WORKSPACE", str(root))
164
+ try:
165
+ from soothe_nano.workspace import FrameworkFilesystem
166
+
167
+ FrameworkFilesystem.set_current_workspace(root)
168
+ except Exception: # pragma: no cover - optional API surface
169
+ logger.debug("Could not set FrameworkFilesystem workspace", exc_info=True)
170
+ return root
171
+
172
+
173
+ def apply_fj_defaults(config: SootheConfig) -> SootheConfig:
174
+ """Apply fj CLI defaults without requiring them in ``nano.yml``.
175
+
176
+ - SQLite checkpointer / durability
177
+ - Disable soothe virtual mode (allow paths outside workspace)
178
+ - Register fj package builtin skills
179
+ - Core listing = nano defaults + a few fj workflow skills (rest deferred)
180
+ """
181
+ register_fj_builtin_skills()
182
+ durability = config.agent.protocols.durability.model_copy(
183
+ update={"backend": "sqlite", "checkpointer": "sqlite"}
184
+ )
185
+ protocols = config.agent.protocols.model_copy(update={"durability": durability})
186
+ agent = config.agent.model_copy(update={"protocols": protocols})
187
+ security = config.security.model_copy(update={"allow_paths_outside_workspace": True})
188
+ persistence = config.persistence.model_copy(update={"default_backend": "sqlite"})
189
+ progressive_skills = config.progressive_skills
190
+ if progressive_skills.core_skills is None:
191
+ progressive_skills = progressive_skills.model_copy(
192
+ update={"core_skills": fj_core_skill_names()}
193
+ )
194
+ return config.model_copy(
195
+ update={
196
+ "agent": agent,
197
+ "security": security,
198
+ "persistence": persistence,
199
+ "progressive_skills": progressive_skills,
200
+ }
201
+ )
202
+
203
+
204
+ # Backward-compatible alias used by older tests / imports.
205
+ _sqlite_config = apply_fj_defaults
206
+
207
+
208
+ @asynccontextmanager
209
+ async def open_sqlite_checkpointer(
210
+ config: SootheConfig,
211
+ ) -> AsyncIterator[Any | None]:
212
+ """Yield an ``AsyncSqliteSaver`` using nano's default sqlite data path.
213
+
214
+ Path: ``$SOOTHE_DATA_DIR/soothe_checkpoints.db`` (default ``~/.soothe/data/``).
215
+ fj always uses sqlite for CLI threads, even if ``nano.yml`` prefers postgres.
216
+ """
217
+ sqlite_cfg = apply_fj_defaults(config)
218
+ result = resolve_checkpointer(sqlite_cfg)
219
+ db_path: str | None = None
220
+ if isinstance(result, tuple):
221
+ _placeholder, pool_or_path = result
222
+ if isinstance(pool_or_path, str):
223
+ db_path = pool_or_path
224
+
225
+ if not db_path:
226
+ logger.warning("SQLite checkpointer path unresolved; running without persistence")
227
+ yield None
228
+ return
229
+
230
+ import aiosqlite
231
+ from langgraph.checkpoint.sqlite.aio import AsyncSqliteSaver
232
+ from soothe_sdk.utils.serde import create_soothe_serde
233
+
234
+ Path(db_path).parent.mkdir(parents=True, exist_ok=True)
235
+ conn = await aiosqlite.connect(db_path)
236
+ checkpointer = AsyncSqliteSaver(conn, serde=create_soothe_serde())
237
+ await checkpointer.setup()
238
+ logger.debug("SQLite checkpointer ready at %s", db_path)
239
+ try:
240
+ yield checkpointer
241
+ finally:
242
+ await conn.close()
243
+
244
+
245
+ async def build_agent(
246
+ config: SootheConfig,
247
+ *,
248
+ workspace: Path | None = None,
249
+ checkpointer: Any | None = None,
250
+ verbose: bool = False,
251
+ ) -> SootheNanoAgent:
252
+ """Build a full nano coding agent for the current workspace."""
253
+ configure_cli_logging(verbose=verbose)
254
+ ensure_workspace(workspace)
255
+ agent = create_nano_agent(apply_fj_defaults(config))
256
+ # Plugin imports (e.g. browser_use) may still attach root console handlers.
257
+ silence_after_plugins(verbose=verbose)
258
+ if checkpointer is not None:
259
+ agent.graph.checkpointer = checkpointer
260
+ return agent
@@ -0,0 +1,10 @@
1
+ # fj Builtin Skills
2
+
3
+ Skills shipped with the **fj** CLI. Registered automatically via
4
+ ``register_builtin_skill_root`` when the agent starts.
5
+
6
+ Includes workflow skills (planning, TDD, debugging, code review, git worktrees)
7
+ and document skills (`docx`, `pptx`, `xlsx`, `pdf`, `mcp-builder`).
8
+
9
+ Add a new skill as ``<name>/SKILL.md`` under this directory (AgentSkills format).
10
+ Skill scripts under this tree are excluded from package ruff lint.
@@ -0,0 +1,159 @@
1
+ ---
2
+ name: brainstorming
3
+ description: "You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation."
4
+ ---
5
+
6
+ # Brainstorming Ideas Into Designs
7
+
8
+ Help turn ideas into fully formed designs and specs through natural collaborative dialogue.
9
+
10
+ Start by understanding the current project context, then ask questions one at a time to refine the idea. Once you understand what you're building, present the design and get user approval.
11
+
12
+ <HARD-GATE>
13
+ Do NOT invoke any implementation skill, write any code, scaffold any project, or take any implementation action until you have presented a design and the user has approved it. This applies to EVERY project regardless of perceived simplicity.
14
+ </HARD-GATE>
15
+
16
+ ## Anti-Pattern: "This Is Too Simple To Need A Design"
17
+
18
+ Every project goes through this process. A todo list, a single-function utility, a config change — all of them. "Simple" projects are where unexamined assumptions cause the most wasted work. The design can be short (a few sentences for truly simple projects), but you MUST present it and get approval.
19
+
20
+ ## Checklist
21
+
22
+ You MUST create a task for each of these items and complete them in order:
23
+
24
+ 1. **Explore project context** — check files, docs, recent commits
25
+ 2. **Offer the visual companion just-in-time** — NOT upfront. The first time a question would genuinely be clearer shown than described, offer it then (its own message); on approval its browser tab opens for you. If no visual question ever arises, never offer it. See the Visual Companion section below.
26
+ 3. **Ask clarifying questions** — one at a time, understand purpose/constraints/success criteria
27
+ 4. **Propose 2-3 approaches** — with trade-offs and your recommendation
28
+ 5. **Present design** — in sections scaled to their complexity, get user approval after each section
29
+ 6. **Write design doc** — save to `docs/superpowers/specs/YYYY-MM-DD-<topic>-design.md` and commit
30
+ 7. **Spec self-review** — quick inline check for placeholders, contradictions, ambiguity, scope (see below)
31
+ 8. **User reviews written spec** — ask user to review the spec file before proceeding
32
+ 9. **Transition to implementation** — invoke writing-plans skill to create implementation plan
33
+
34
+ ## Process Flow
35
+
36
+ ```dot
37
+ digraph brainstorming {
38
+ "Explore project context" [shape=box];
39
+ "Ask clarifying questions" [shape=box];
40
+ "Propose 2-3 approaches" [shape=box];
41
+ "Present design sections" [shape=box];
42
+ "User approves design?" [shape=diamond];
43
+ "Write design doc" [shape=box];
44
+ "Spec self-review\n(fix inline)" [shape=box];
45
+ "User reviews spec?" [shape=diamond];
46
+ "Invoke writing-plans skill" [shape=doublecircle];
47
+
48
+ "Explore project context" -> "Ask clarifying questions";
49
+ "Ask clarifying questions" -> "Propose 2-3 approaches";
50
+ "Propose 2-3 approaches" -> "Present design sections";
51
+ "Present design sections" -> "User approves design?";
52
+ "User approves design?" -> "Present design sections" [label="no, revise"];
53
+ "User approves design?" -> "Write design doc" [label="yes"];
54
+ "Write design doc" -> "Spec self-review\n(fix inline)";
55
+ "Spec self-review\n(fix inline)" -> "User reviews spec?";
56
+ "User reviews spec?" -> "Write design doc" [label="changes requested"];
57
+ "User reviews spec?" -> "Invoke writing-plans skill" [label="approved"];
58
+ }
59
+ ```
60
+
61
+ **The terminal state is invoking writing-plans.** Do NOT invoke frontend-design, mcp-builder, or any other implementation skill. The ONLY skill you invoke after brainstorming is writing-plans.
62
+
63
+ ## The Process
64
+
65
+ **Understanding the idea:**
66
+
67
+ - Check out the current project state first (files, docs, recent commits)
68
+ - Before asking detailed questions, assess scope: if the request describes multiple independent subsystems (e.g., "build a platform with chat, file storage, billing, and analytics"), flag this immediately. Don't spend questions refining details of a project that needs to be decomposed first.
69
+ - If the project is too large for a single spec, help the user decompose into sub-projects: what are the independent pieces, how do they relate, what order should they be built? Then brainstorm the first sub-project through the normal design flow. Each sub-project gets its own spec → plan → implementation cycle.
70
+ - For appropriately-scoped projects, ask questions one at a time to refine the idea
71
+ - Prefer multiple choice questions when possible, but open-ended is fine too
72
+ - Only one question per message - if a topic needs more exploration, break it into multiple questions
73
+ - Focus on understanding: purpose, constraints, success criteria
74
+
75
+ **Exploring approaches:**
76
+
77
+ - Propose 2-3 different approaches with trade-offs
78
+ - Present options conversationally with your recommendation and reasoning
79
+ - Lead with your recommended option and explain why
80
+
81
+ **Presenting the design:**
82
+
83
+ - Once you believe you understand what you're building, present the design
84
+ - Scale each section to its complexity: a few sentences if straightforward, up to 200-300 words if nuanced
85
+ - Ask after each section whether it looks right so far
86
+ - Cover: architecture, components, data flow, error handling, testing
87
+ - Be ready to go back and clarify if something doesn't make sense
88
+
89
+ **Design for isolation and clarity:**
90
+
91
+ - Break the system into smaller units that each have one clear purpose, communicate through well-defined interfaces, and can be understood and tested independently
92
+ - For each unit, you should be able to answer: what does it do, how do you use it, and what does it depend on?
93
+ - Can someone understand what a unit does without reading its internals? Can you change the internals without breaking consumers? If not, the boundaries need work.
94
+ - Smaller, well-bounded units are also easier for you to work with - you reason better about code you can hold in context at once, and your edits are more reliable when files are focused. When a file grows large, that's often a signal that it's doing too much.
95
+
96
+ **Working in existing codebases:**
97
+
98
+ - Explore the current structure before proposing changes. Follow existing patterns.
99
+ - Where existing code has problems that affect the work (e.g., a file that's grown too large, unclear boundaries, tangled responsibilities), include targeted improvements as part of the design - the way a good developer improves code they're working in.
100
+ - Don't propose unrelated refactoring. Stay focused on what serves the current goal.
101
+
102
+ ## After the Design
103
+
104
+ **Documentation:**
105
+
106
+ - Write the validated design (spec) to `docs/superpowers/specs/YYYY-MM-DD-<topic>-design.md`
107
+ - (User preferences for spec location override this default)
108
+ - Use elements-of-style:writing-clearly-and-concisely skill if available
109
+ - Commit the design document to git
110
+
111
+ **Spec Self-Review:**
112
+ After writing the spec document, look at it with fresh eyes:
113
+
114
+ 1. **Placeholder scan:** Any "TBD", "TODO", incomplete sections, or vague requirements? Fix them.
115
+ 2. **Internal consistency:** Do any sections contradict each other? Does the architecture match the feature descriptions?
116
+ 3. **Scope check:** Is this focused enough for a single implementation plan, or does it need decomposition?
117
+ 4. **Ambiguity check:** Could any requirement be interpreted two different ways? If so, pick one and make it explicit.
118
+
119
+ Fix any issues inline. No need to re-review — just fix and move on.
120
+
121
+ **User Review Gate:**
122
+ After the spec review loop passes, ask the user to review the written spec before proceeding:
123
+
124
+ > "Spec written and committed to `<path>`. Please review it and let me know if you want to make any changes before we start writing out the implementation plan."
125
+
126
+ Wait for the user's response. If they request changes, make them and re-run the spec review loop. Only proceed once the user approves.
127
+
128
+ **Implementation:**
129
+
130
+ - Invoke the writing-plans skill to create a detailed implementation plan
131
+ - Do NOT invoke any other skill. writing-plans is the next step.
132
+
133
+ ## Key Principles
134
+
135
+ - **One question at a time** - Don't overwhelm with multiple questions
136
+ - **Multiple choice preferred** - Easier to answer than open-ended when possible
137
+ - **YAGNI ruthlessly** - Remove unnecessary features from all designs
138
+ - **Explore alternatives** - Always propose 2-3 approaches before settling
139
+ - **Incremental validation** - Present design, get approval before moving on
140
+ - **Be flexible** - Go back and clarify when something doesn't make sense
141
+
142
+ ## Visual Companion
143
+
144
+ A browser-based companion for showing mockups, diagrams, and visual options during brainstorming. Available as a tool — not a mode. Accepting the companion means it's available for questions that benefit from visual treatment; it does NOT mean every question goes through the browser.
145
+
146
+ **Offering the companion (just-in-time):** Do NOT offer it upfront. Wait until a question would genuinely be clearer shown than told — a real mockup / layout / diagram question, not merely a UI *topic*. The first time that happens, offer it then, as its own message:
147
+ > "This next part might be easier if I show you — I can put together mockups, diagrams, and comparisons in a browser tab as we go. It's still new and can be token-intensive. Want me to? I'll open it for you."
148
+
149
+ **This offer MUST be its own message.** Only the offer — no clarifying question, summary, or other content. Wait for the user's response. If they accept, start the server with `--open` so their browser opens to the first screen automatically. If they decline, continue text-only and don't offer again unless they raise it.
150
+
151
+ **Per-question decision:** Even after the user accepts, decide FOR EACH QUESTION whether to use the browser or the terminal. The test: **would the user understand this better by seeing it than reading it?**
152
+
153
+ - **Use the browser** for content that IS visual — mockups, wireframes, layout comparisons, architecture diagrams, side-by-side visual designs
154
+ - **Use the terminal** for content that is text — requirements questions, conceptual choices, tradeoff lists, A/B/C/D text options, scope decisions
155
+
156
+ A question about a UI topic is not automatically a visual question. "What does personality mean in this context?" is a conceptual question — use the terminal. "Which wizard layout works better?" is a visual question — use the browser.
157
+
158
+ If they agree to the companion, read the detailed guide before proceeding:
159
+ `skills/brainstorming/visual-companion.md`
@@ -0,0 +1,213 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <title>Superpowers Brainstorming</title>
6
+ <style>
7
+ /*
8
+ * BRAINSTORM COMPANION FRAME TEMPLATE
9
+ *
10
+ * This template provides a consistent frame with:
11
+ * - OS-aware light/dark theming
12
+ * - Header branding and connection status
13
+ * - Scrollable main content area
14
+ * - CSS helpers for common UI patterns
15
+ *
16
+ * Content is injected via placeholder comment in #frame-content.
17
+ */
18
+
19
+ * { box-sizing: border-box; margin: 0; padding: 0; }
20
+ html, body { height: 100%; overflow: hidden; }
21
+
22
+ /* ===== THEME VARIABLES ===== */
23
+ :root {
24
+ --bg-primary: #f5f5f7;
25
+ --bg-secondary: #ffffff;
26
+ --bg-tertiary: #e5e5e7;
27
+ --border: #d1d1d6;
28
+ --text-primary: #1d1d1f;
29
+ --text-secondary: #86868b;
30
+ --text-tertiary: #aeaeb2;
31
+ --accent: #0071e3;
32
+ --accent-hover: #0077ed;
33
+ --success: #34c759;
34
+ --warning: #ff9f0a;
35
+ --error: #ff3b30;
36
+ --selected-bg: #e8f4fd;
37
+ --selected-border: #0071e3;
38
+ }
39
+
40
+ @media (prefers-color-scheme: dark) {
41
+ :root {
42
+ --bg-primary: #1d1d1f;
43
+ --bg-secondary: #2d2d2f;
44
+ --bg-tertiary: #3d3d3f;
45
+ --border: #424245;
46
+ --text-primary: #f5f5f7;
47
+ --text-secondary: #86868b;
48
+ --text-tertiary: #636366;
49
+ --accent: #0a84ff;
50
+ --accent-hover: #409cff;
51
+ --selected-bg: rgba(10, 132, 255, 0.15);
52
+ --selected-border: #0a84ff;
53
+ }
54
+ }
55
+
56
+ body {
57
+ font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
58
+ background: var(--bg-primary);
59
+ color: var(--text-primary);
60
+ display: flex;
61
+ flex-direction: column;
62
+ line-height: 1.5;
63
+ }
64
+
65
+ /* ===== FRAME STRUCTURE ===== */
66
+ .brand { display: flex; align-items: center; min-width: 0; overflow: hidden; color: var(--text-secondary); line-height: 1; }
67
+ .brand a { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 0.5rem; min-width: 0; max-width: 100%; line-height: 1; }
68
+ .brand-copy { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1; transform: translateY(-1px); }
69
+ .brand-logo { display: block; height: 1em; width: auto; max-width: 180px; flex-shrink: 0; filter: invert(1); }
70
+ @media (prefers-color-scheme: dark) {
71
+ .brand-logo { filter: none; }
72
+ }
73
+ .status { font-size: 0.7rem; color: var(--status-color, var(--success)); display: flex; align-items: center; gap: 0.4rem; justify-self: end; white-space: nowrap; line-height: 1; }
74
+ .status::before { content: ''; width: 6px; height: 6px; background: var(--status-color, var(--success)); border-radius: 50%; }
75
+
76
+ .main { flex: 1; overflow-y: auto; }
77
+ #frame-content { padding: 2rem; min-height: 100%; }
78
+
79
+ .header {
80
+ background: var(--bg-secondary);
81
+ border-bottom: 1px solid var(--border);
82
+ padding: 0.5rem 1.5rem;
83
+ flex-shrink: 0;
84
+ display: grid;
85
+ grid-template-columns: minmax(0, 1fr) auto;
86
+ align-items: center;
87
+ gap: 1rem;
88
+ min-height: 42px;
89
+ }
90
+ .header .brand { justify-self: start; width: 100%; font-size: 0.75rem; line-height: 1; }
91
+ .header .status { grid-column: 2; line-height: 1; }
92
+ .header span {
93
+ font-size: 0.75rem;
94
+ color: var(--text-secondary);
95
+ }
96
+ .header .selected-text {
97
+ color: var(--accent);
98
+ font-weight: 500;
99
+ }
100
+
101
+ /* ===== TYPOGRAPHY ===== */
102
+ h2 { font-size: 1.5rem; font-weight: 600; margin-bottom: 0.5rem; }
103
+ h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.25rem; }
104
+ .subtitle { color: var(--text-secondary); margin-bottom: 1.5rem; }
105
+ .section { margin-bottom: 2rem; }
106
+ .label { font-size: 0.7rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.5rem; }
107
+
108
+ /* ===== OPTIONS (for A/B/C choices) ===== */
109
+ .options { display: flex; flex-direction: column; gap: 0.75rem; }
110
+ .option {
111
+ background: var(--bg-secondary);
112
+ border: 2px solid var(--border);
113
+ border-radius: 12px;
114
+ padding: 1rem 1.25rem;
115
+ cursor: pointer;
116
+ transition: all 0.15s ease;
117
+ display: flex;
118
+ align-items: flex-start;
119
+ gap: 1rem;
120
+ }
121
+ .option:hover { border-color: var(--accent); }
122
+ .option.selected { background: var(--selected-bg); border-color: var(--selected-border); }
123
+ .option .letter {
124
+ background: var(--bg-tertiary);
125
+ color: var(--text-secondary);
126
+ width: 1.75rem; height: 1.75rem;
127
+ border-radius: 6px;
128
+ display: flex; align-items: center; justify-content: center;
129
+ font-weight: 600; font-size: 0.85rem; flex-shrink: 0;
130
+ }
131
+ .option.selected .letter { background: var(--accent); color: white; }
132
+ .option .content { flex: 1; }
133
+ .option .content h3 { font-size: 0.95rem; margin-bottom: 0.15rem; }
134
+ .option .content p { color: var(--text-secondary); font-size: 0.85rem; margin: 0; }
135
+
136
+ /* ===== CARDS (for showing designs/mockups) ===== */
137
+ .cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }
138
+ .card {
139
+ background: var(--bg-secondary);
140
+ border: 1px solid var(--border);
141
+ border-radius: 12px;
142
+ overflow: hidden;
143
+ cursor: pointer;
144
+ transition: all 0.15s ease;
145
+ }
146
+ .card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
147
+ .card.selected { border-color: var(--selected-border); border-width: 2px; }
148
+ .card-image { background: var(--bg-tertiary); aspect-ratio: 16/10; display: flex; align-items: center; justify-content: center; }
149
+ .card-body { padding: 1rem; }
150
+ .card-body h3 { margin-bottom: 0.25rem; }
151
+ .card-body p { color: var(--text-secondary); font-size: 0.85rem; }
152
+
153
+ /* ===== MOCKUP CONTAINER ===== */
154
+ .mockup {
155
+ background: var(--bg-secondary);
156
+ border: 1px solid var(--border);
157
+ border-radius: 12px;
158
+ overflow: hidden;
159
+ margin-bottom: 1.5rem;
160
+ }
161
+ .mockup-header {
162
+ background: var(--bg-tertiary);
163
+ padding: 0.5rem 1rem;
164
+ font-size: 0.75rem;
165
+ color: var(--text-secondary);
166
+ border-bottom: 1px solid var(--border);
167
+ }
168
+ .mockup-body { padding: 1.5rem; }
169
+
170
+ /* ===== SPLIT VIEW (side-by-side comparison) ===== */
171
+ .split { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
172
+ @media (max-width: 700px) { .split { grid-template-columns: 1fr; } }
173
+
174
+ /* ===== PROS/CONS ===== */
175
+ .pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1rem 0; }
176
+ .pros, .cons { background: var(--bg-secondary); border-radius: 8px; padding: 1rem; }
177
+ .pros h4 { color: var(--success); font-size: 0.85rem; margin-bottom: 0.5rem; }
178
+ .cons h4 { color: var(--error); font-size: 0.85rem; margin-bottom: 0.5rem; }
179
+ .pros ul, .cons ul { margin-left: 1.25rem; font-size: 0.85rem; color: var(--text-secondary); }
180
+ .pros li, .cons li { margin-bottom: 0.25rem; }
181
+
182
+ /* ===== PLACEHOLDER (for mockup areas) ===== */
183
+ .placeholder {
184
+ background: var(--bg-tertiary);
185
+ border: 2px dashed var(--border);
186
+ border-radius: 8px;
187
+ padding: 2rem;
188
+ text-align: center;
189
+ color: var(--text-tertiary);
190
+ }
191
+
192
+ /* ===== INLINE MOCKUP ELEMENTS ===== */
193
+ .mock-nav { background: var(--accent); color: white; padding: 0.75rem 1rem; display: flex; gap: 1.5rem; font-size: 0.9rem; }
194
+ .mock-sidebar { background: var(--bg-tertiary); padding: 1rem; min-width: 180px; }
195
+ .mock-content { padding: 1.5rem; flex: 1; }
196
+ .mock-button { background: var(--accent); color: white; border: none; padding: 0.5rem 1rem; border-radius: 6px; font-size: 0.85rem; }
197
+ .mock-input { background: var(--bg-primary); border: 1px solid var(--border); border-radius: 6px; padding: 0.5rem; width: 100%; }
198
+ </style>
199
+ </head>
200
+ <body>
201
+ <div class="header">
202
+ <!-- BRANDING -->
203
+ <div class="status">Connecting…</div>
204
+ </div>
205
+
206
+ <div class="main">
207
+ <div id="frame-content">
208
+ <!-- CONTENT -->
209
+ </div>
210
+ </div>
211
+
212
+ </body>
213
+ </html>