@preapexis/piexis 0.1.2

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 (348) hide show
  1. package/.github/workflows/npm-publish.yml +63 -0
  2. package/AGENTS.md +58 -0
  3. package/PERMISSION_MODES_PLAN.md +279 -0
  4. package/README.md +207 -0
  5. package/WHAT_YOU_GET.md +153 -0
  6. package/eval/README.md +72 -0
  7. package/eval/permission-cases.json +28 -0
  8. package/eval/permissions.mjs +103 -0
  9. package/extensions/ask-question.ts +111 -0
  10. package/extensions/background-tasks.ts +433 -0
  11. package/extensions/background-worker.ts +50 -0
  12. package/extensions/glob.ts +32 -0
  13. package/extensions/mode.ts +397 -0
  14. package/extensions/ui.ts +134 -0
  15. package/lib/bash-approvals.ts +113 -0
  16. package/lib/bash-policy.ts +164 -0
  17. package/lib/mode-policy.ts +174 -0
  18. package/lib/path-policy.ts +182 -0
  19. package/lib/permission-classifier.ts +128 -0
  20. package/lib/permission-config.ts +91 -0
  21. package/lib/permission-denials.ts +32 -0
  22. package/lib/permission-intent.ts +128 -0
  23. package/lib/permission-taxonomy.ts +15 -0
  24. package/lib/task-broker.ts +65 -0
  25. package/lib/task-checkout.ts +39 -0
  26. package/lib/task-git.ts +44 -0
  27. package/lib/task-patch.ts +106 -0
  28. package/lib/task-permissions.ts +51 -0
  29. package/lib/task-report.ts +62 -0
  30. package/lib/task-worktree-policy.ts +56 -0
  31. package/package.json +51 -0
  32. package/prompts/commit.md +7 -0
  33. package/prompts/init.md +66 -0
  34. package/prompts/summary.md +14 -0
  35. package/skills/claude-api/LICENSE.txt +202 -0
  36. package/skills/claude-api/SKILL.md +572 -0
  37. package/skills/claude-api/csharp/claude-api/README.md +362 -0
  38. package/skills/claude-api/csharp/claude-api/batches.md +14 -0
  39. package/skills/claude-api/csharp/claude-api/files-api.md +25 -0
  40. package/skills/claude-api/csharp/claude-api/streaming.md +28 -0
  41. package/skills/claude-api/csharp/claude-api/tool-use.md +164 -0
  42. package/skills/claude-api/curl/examples.md +256 -0
  43. package/skills/claude-api/curl/managed-agents.md +371 -0
  44. package/skills/claude-api/go/claude-api/README.md +188 -0
  45. package/skills/claude-api/go/claude-api/files-api.md +23 -0
  46. package/skills/claude-api/go/claude-api/streaming.md +43 -0
  47. package/skills/claude-api/go/claude-api/tool-use.md +220 -0
  48. package/skills/claude-api/go/managed-agents/README.md +564 -0
  49. package/skills/claude-api/java/claude-api/README.md +238 -0
  50. package/skills/claude-api/java/claude-api/files-api.md +27 -0
  51. package/skills/claude-api/java/claude-api/streaming.md +24 -0
  52. package/skills/claude-api/java/claude-api/tool-use.md +228 -0
  53. package/skills/claude-api/java/managed-agents/README.md +443 -0
  54. package/skills/claude-api/php/claude-api/README.md +174 -0
  55. package/skills/claude-api/php/claude-api/batches.md +15 -0
  56. package/skills/claude-api/php/claude-api/files-api.md +13 -0
  57. package/skills/claude-api/php/claude-api/streaming.md +27 -0
  58. package/skills/claude-api/php/claude-api/tool-use.md +253 -0
  59. package/skills/claude-api/php/managed-agents/README.md +443 -0
  60. package/skills/claude-api/python/claude-api/README.md +565 -0
  61. package/skills/claude-api/python/claude-api/batches.md +198 -0
  62. package/skills/claude-api/python/claude-api/files-api.md +170 -0
  63. package/skills/claude-api/python/claude-api/sdk-upgrade.md +286 -0
  64. package/skills/claude-api/python/claude-api/streaming.md +179 -0
  65. package/skills/claude-api/python/claude-api/tool-use.md +627 -0
  66. package/skills/claude-api/python/managed-agents/README.md +335 -0
  67. package/skills/claude-api/ruby/claude-api/README.md +134 -0
  68. package/skills/claude-api/ruby/claude-api/streaming.md +16 -0
  69. package/skills/claude-api/ruby/claude-api/tool-use.md +41 -0
  70. package/skills/claude-api/ruby/managed-agents/README.md +394 -0
  71. package/skills/claude-api/shared/admin-api.md +179 -0
  72. package/skills/claude-api/shared/agent-design.md +101 -0
  73. package/skills/claude-api/shared/anthropic-cli.md +269 -0
  74. package/skills/claude-api/shared/claude-platform-on-aws.md +59 -0
  75. package/skills/claude-api/shared/cost-optimization.md +233 -0
  76. package/skills/claude-api/shared/error-codes.md +262 -0
  77. package/skills/claude-api/shared/live-sources.md +166 -0
  78. package/skills/claude-api/shared/managed-agents-api-reference.md +455 -0
  79. package/skills/claude-api/shared/managed-agents-client-patterns.md +220 -0
  80. package/skills/claude-api/shared/managed-agents-core.md +359 -0
  81. package/skills/claude-api/shared/managed-agents-environments.md +226 -0
  82. package/skills/claude-api/shared/managed-agents-events.md +290 -0
  83. package/skills/claude-api/shared/managed-agents-memory.md +201 -0
  84. package/skills/claude-api/shared/managed-agents-multiagent.md +260 -0
  85. package/skills/claude-api/shared/managed-agents-onboarding.md +82 -0
  86. package/skills/claude-api/shared/managed-agents-outcomes.md +108 -0
  87. package/skills/claude-api/shared/managed-agents-overview.md +77 -0
  88. package/skills/claude-api/shared/managed-agents-scheduled-deployments.md +156 -0
  89. package/skills/claude-api/shared/managed-agents-self-hosted-sandboxes.md +282 -0
  90. package/skills/claude-api/shared/managed-agents-tools.md +504 -0
  91. package/skills/claude-api/shared/managed-agents-webhooks.md +143 -0
  92. package/skills/claude-api/shared/model-migration.md +1872 -0
  93. package/skills/claude-api/shared/models.md +142 -0
  94. package/skills/claude-api/shared/platform-availability.md +53 -0
  95. package/skills/claude-api/shared/prompt-audit.md +223 -0
  96. package/skills/claude-api/shared/prompt-caching.md +292 -0
  97. package/skills/claude-api/shared/token-counting.md +56 -0
  98. package/skills/claude-api/shared/tool-use-concepts.md +526 -0
  99. package/skills/claude-api/typescript/claude-api/README.md +405 -0
  100. package/skills/claude-api/typescript/claude-api/batches.md +106 -0
  101. package/skills/claude-api/typescript/claude-api/files-api.md +98 -0
  102. package/skills/claude-api/typescript/claude-api/streaming.md +178 -0
  103. package/skills/claude-api/typescript/claude-api/tool-use.md +586 -0
  104. package/skills/claude-api/typescript/managed-agents/README.md +359 -0
  105. package/skills/code-review/SKILL.md +34 -0
  106. package/skills/code-review/agents/openai.yaml +3 -0
  107. package/skills/codebase-design/DEEPENING.md +37 -0
  108. package/skills/codebase-design/DESIGN-IT-TWICE.md +44 -0
  109. package/skills/codebase-design/SKILL.md +40 -0
  110. package/skills/diagnosing-bugs/SKILL.md +38 -0
  111. package/skills/diagnosing-bugs/agents/openai.yaml +3 -0
  112. package/skills/diagnosing-bugs/scripts/hitl-loop.template.sh +44 -0
  113. package/skills/docx/LICENSE.txt +30 -0
  114. package/skills/docx/SKILL.md +93 -0
  115. package/skills/docx/scripts/__init__.py +1 -0
  116. package/skills/docx/scripts/accept_changes.py +135 -0
  117. package/skills/docx/scripts/comment.py +368 -0
  118. package/skills/docx/scripts/merge_runs.py +310 -0
  119. package/skills/docx/scripts/office/helpers/__init__.py +111 -0
  120. package/skills/docx/scripts/office/helpers/pptx_chart.py +170 -0
  121. package/skills/docx/scripts/office/helpers/pptx_slide.py +60 -0
  122. package/skills/docx/scripts/office/helpers/pptx_theme.py +114 -0
  123. package/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
  124. package/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
  125. package/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
  126. package/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
  127. package/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
  128. package/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
  129. package/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
  130. package/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
  131. package/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
  132. package/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
  133. package/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
  134. package/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
  135. package/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
  136. package/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
  137. package/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
  138. package/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
  139. package/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
  140. package/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
  141. package/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
  142. package/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
  143. package/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
  144. package/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
  145. package/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
  146. package/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
  147. package/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
  148. package/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
  149. package/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
  150. package/skills/docx/scripts/office/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
  151. package/skills/docx/scripts/office/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
  152. package/skills/docx/scripts/office/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
  153. package/skills/docx/scripts/office/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
  154. package/skills/docx/scripts/office/schemas/mce/mc.xsd +75 -0
  155. package/skills/docx/scripts/office/schemas/microsoft/wml-2010.xsd +560 -0
  156. package/skills/docx/scripts/office/schemas/microsoft/wml-2012.xsd +67 -0
  157. package/skills/docx/scripts/office/schemas/microsoft/wml-2018.xsd +14 -0
  158. package/skills/docx/scripts/office/schemas/microsoft/wml-cex-2018.xsd +20 -0
  159. package/skills/docx/scripts/office/schemas/microsoft/wml-cid-2016.xsd +13 -0
  160. package/skills/docx/scripts/office/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
  161. package/skills/docx/scripts/office/schemas/microsoft/wml-symex-2015.xsd +8 -0
  162. package/skills/docx/scripts/office/soffice.py +192 -0
  163. package/skills/docx/scripts/office/validate.py +173 -0
  164. package/skills/docx/scripts/office/validators/__init__.py +15 -0
  165. package/skills/docx/scripts/office/validators/base.py +875 -0
  166. package/skills/docx/scripts/office/validators/docx.py +466 -0
  167. package/skills/docx/scripts/office/validators/pptx.py +441 -0
  168. package/skills/docx/scripts/office/validators/redlining.py +299 -0
  169. package/skills/docx/scripts/templates/comments.xml +3 -0
  170. package/skills/docx/scripts/templates/commentsExtended.xml +3 -0
  171. package/skills/docx/scripts/templates/commentsExtensible.xml +3 -0
  172. package/skills/docx/scripts/templates/commentsIds.xml +3 -0
  173. package/skills/docx/scripts/templates/people.xml +3 -0
  174. package/skills/frontend-design/LICENSE.txt +177 -0
  175. package/skills/frontend-design/SKILL.md +27 -0
  176. package/skills/grilling/SKILL.md +41 -0
  177. package/skills/lean-build/SKILL.md +22 -0
  178. package/skills/lean-build/agents/openai.yaml +4 -0
  179. package/skills/mcp-builder/LICENSE.txt +202 -0
  180. package/skills/mcp-builder/SKILL.md +235 -0
  181. package/skills/mcp-builder/reference/evaluation.md +602 -0
  182. package/skills/mcp-builder/reference/mcp_best_practices.md +249 -0
  183. package/skills/mcp-builder/reference/node_mcp_server.md +970 -0
  184. package/skills/mcp-builder/reference/python_mcp_server.md +719 -0
  185. package/skills/mcp-builder/scripts/connections.py +151 -0
  186. package/skills/mcp-builder/scripts/evaluation.py +373 -0
  187. package/skills/mcp-builder/scripts/example_evaluation.xml +22 -0
  188. package/skills/mcp-builder/scripts/requirements.txt +2 -0
  189. package/skills/migration/SKILL.md +17 -0
  190. package/skills/migration/agents/openai.yaml +4 -0
  191. package/skills/pdf/LICENSE.txt +30 -0
  192. package/skills/pdf/SKILL.md +27 -0
  193. package/skills/pdf/forms.md +294 -0
  194. package/skills/pdf/reference.md +612 -0
  195. package/skills/pdf/scripts/check_bounding_boxes.py +65 -0
  196. package/skills/pdf/scripts/check_fillable_fields.py +11 -0
  197. package/skills/pdf/scripts/convert_pdf_to_images.py +33 -0
  198. package/skills/pdf/scripts/create_validation_image.py +37 -0
  199. package/skills/pdf/scripts/extract_form_field_info.py +122 -0
  200. package/skills/pdf/scripts/extract_form_structure.py +115 -0
  201. package/skills/pdf/scripts/fill_fillable_fields.py +98 -0
  202. package/skills/pdf/scripts/fill_pdf_form_with_annotations.py +107 -0
  203. package/skills/pptx/LICENSE.txt +30 -0
  204. package/skills/pptx/SKILL.md +240 -0
  205. package/skills/pptx/scripts/__init__.py +0 -0
  206. package/skills/pptx/scripts/add_slide.py +367 -0
  207. package/skills/pptx/scripts/clean.py +309 -0
  208. package/skills/pptx/scripts/office/helpers/__init__.py +111 -0
  209. package/skills/pptx/scripts/office/helpers/pptx_chart.py +170 -0
  210. package/skills/pptx/scripts/office/helpers/pptx_slide.py +60 -0
  211. package/skills/pptx/scripts/office/helpers/pptx_theme.py +114 -0
  212. package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
  213. package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
  214. package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
  215. package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
  216. package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
  217. package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
  218. package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
  219. package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
  220. package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
  221. package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
  222. package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
  223. package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
  224. package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
  225. package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
  226. package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
  227. package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
  228. package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
  229. package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
  230. package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
  231. package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
  232. package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
  233. package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
  234. package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
  235. package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
  236. package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
  237. package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
  238. package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
  239. package/skills/pptx/scripts/office/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
  240. package/skills/pptx/scripts/office/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
  241. package/skills/pptx/scripts/office/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
  242. package/skills/pptx/scripts/office/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
  243. package/skills/pptx/scripts/office/schemas/mce/mc.xsd +75 -0
  244. package/skills/pptx/scripts/office/schemas/microsoft/wml-2010.xsd +560 -0
  245. package/skills/pptx/scripts/office/schemas/microsoft/wml-2012.xsd +67 -0
  246. package/skills/pptx/scripts/office/schemas/microsoft/wml-2018.xsd +14 -0
  247. package/skills/pptx/scripts/office/schemas/microsoft/wml-cex-2018.xsd +20 -0
  248. package/skills/pptx/scripts/office/schemas/microsoft/wml-cid-2016.xsd +13 -0
  249. package/skills/pptx/scripts/office/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
  250. package/skills/pptx/scripts/office/schemas/microsoft/wml-symex-2015.xsd +8 -0
  251. package/skills/pptx/scripts/office/soffice.py +192 -0
  252. package/skills/pptx/scripts/office/validate.py +173 -0
  253. package/skills/pptx/scripts/office/validators/__init__.py +15 -0
  254. package/skills/pptx/scripts/office/validators/base.py +875 -0
  255. package/skills/pptx/scripts/office/validators/docx.py +466 -0
  256. package/skills/pptx/scripts/office/validators/pptx.py +441 -0
  257. package/skills/pptx/scripts/office/validators/redlining.py +299 -0
  258. package/skills/pptx/scripts/thumbnail.py +311 -0
  259. package/skills/safe-refactor/SKILL.md +16 -0
  260. package/skills/safe-refactor/agents/openai.yaml +4 -0
  261. package/skills/tdd/SKILL.md +18 -0
  262. package/skills/tdd/agents/openai.yaml +3 -0
  263. package/skills/tdd/mocking.md +59 -0
  264. package/skills/tdd/tests.md +77 -0
  265. package/skills/verify-and-stop/SKILL.md +16 -0
  266. package/skills/verify-and-stop/agents/openai.yaml +4 -0
  267. package/skills/webapp-testing/LICENSE.txt +202 -0
  268. package/skills/webapp-testing/SKILL.md +96 -0
  269. package/skills/webapp-testing/examples/console_logging.py +35 -0
  270. package/skills/webapp-testing/examples/element_discovery.py +40 -0
  271. package/skills/webapp-testing/examples/static_html_automation.py +33 -0
  272. package/skills/webapp-testing/scripts/with_server.py +106 -0
  273. package/skills/writing-for-agents/SKILL-MECHANICS.md +22 -0
  274. package/skills/writing-for-agents/SKILL.md +28 -0
  275. package/skills/writing-for-agents/agents/openai.yaml +3 -0
  276. package/skills/xlsx/LICENSE.txt +30 -0
  277. package/skills/xlsx/SKILL.md +101 -0
  278. package/skills/xlsx/scripts/office/helpers/__init__.py +111 -0
  279. package/skills/xlsx/scripts/office/helpers/pptx_chart.py +170 -0
  280. package/skills/xlsx/scripts/office/helpers/pptx_slide.py +60 -0
  281. package/skills/xlsx/scripts/office/helpers/pptx_theme.py +114 -0
  282. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
  283. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
  284. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
  285. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
  286. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
  287. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
  288. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
  289. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
  290. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
  291. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
  292. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
  293. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
  294. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
  295. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
  296. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
  297. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
  298. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
  299. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
  300. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
  301. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
  302. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
  303. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
  304. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
  305. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
  306. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
  307. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
  308. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
  309. package/skills/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
  310. package/skills/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
  311. package/skills/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
  312. package/skills/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
  313. package/skills/xlsx/scripts/office/schemas/mce/mc.xsd +75 -0
  314. package/skills/xlsx/scripts/office/schemas/microsoft/wml-2010.xsd +560 -0
  315. package/skills/xlsx/scripts/office/schemas/microsoft/wml-2012.xsd +67 -0
  316. package/skills/xlsx/scripts/office/schemas/microsoft/wml-2018.xsd +14 -0
  317. package/skills/xlsx/scripts/office/schemas/microsoft/wml-cex-2018.xsd +20 -0
  318. package/skills/xlsx/scripts/office/schemas/microsoft/wml-cid-2016.xsd +13 -0
  319. package/skills/xlsx/scripts/office/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
  320. package/skills/xlsx/scripts/office/schemas/microsoft/wml-symex-2015.xsd +8 -0
  321. package/skills/xlsx/scripts/office/soffice.py +192 -0
  322. package/skills/xlsx/scripts/office/validate.py +173 -0
  323. package/skills/xlsx/scripts/office/validators/__init__.py +15 -0
  324. package/skills/xlsx/scripts/office/validators/base.py +875 -0
  325. package/skills/xlsx/scripts/office/validators/docx.py +466 -0
  326. package/skills/xlsx/scripts/office/validators/pptx.py +441 -0
  327. package/skills/xlsx/scripts/office/validators/redlining.py +299 -0
  328. package/skills/xlsx/scripts/recalc.py +308 -0
  329. package/skills-lock.json +359 -0
  330. package/tests/auto-permissions.test.mjs +315 -0
  331. package/tests/background-tasks.test.mjs +27 -0
  332. package/tests/background-worker.test.mjs +60 -0
  333. package/tests/bash-permissions.test.mjs +276 -0
  334. package/tests/glob.test.mjs +31 -0
  335. package/tests/mode.test.mjs +62 -0
  336. package/tests/permission-evaluation.test.mjs +70 -0
  337. package/tests/permission-foundation.test.mjs +194 -0
  338. package/tests/permission-policy.test.mjs +158 -0
  339. package/tests/runtime/README.md +51 -0
  340. package/tests/runtime/harness.mjs +190 -0
  341. package/tests/runtime/permissions.test.mjs +192 -0
  342. package/tests/runtime/tui.test.mjs +60 -0
  343. package/tests/skills-routing.test.mjs +51 -0
  344. package/tests/task-integration.test.mjs +324 -0
  345. package/tests/task-permissions.test.mjs +178 -0
  346. package/tests/task-worktree-policy.test.mjs +53 -0
  347. package/themes/orange.json +82 -0
  348. package/tsconfig.json +13 -0
@@ -0,0 +1,359 @@
1
+ # Managed Agents - TypeScript
2
+
3
+ > **Bindings not shown here:** This README covers the most common managed-agents flows for TypeScript. If you need a class, method, namespace, field, or behavior that isn't shown, WebFetch the TypeScript SDK repo **or the relevant docs page** from `shared/live-sources.md` rather than guess. Do not extrapolate from cURL shapes or another language's SDK.
4
+
5
+ > **Agents are persistent - create once, reference by ID.** Store the agent ID returned by `agents.create` and pass it to every subsequent `sessions.create`; do not call `agents.create` in the request path. **Recommended:** define agents and environments as version-controlled YAML applied with the `ant` CLI - see `shared/anthropic-cli.md` (its live-docs URL is in `shared/live-sources.md`). The CLI owns the control plane (create/update); your code owns the data plane (sessions with the stored ID). The examples below show in-code creation for when you must provision programmatically; in production the create call belongs in setup, not in the request path.
6
+
7
+ ## Installation
8
+
9
+ ```bash
10
+ npm install @anthropic-ai/sdk
11
+ ```
12
+
13
+ ## Client Initialization
14
+
15
+ ```typescript
16
+ import Anthropic from "@anthropic-ai/sdk";
17
+
18
+ // Default - resolves credentials from the environment:
19
+ // ANTHROPIC_API_KEY, or ANTHROPIC_AUTH_TOKEN, or an `ant auth login` profile.
20
+ // Prefer this for local dev; don't hardcode a key.
21
+ const client = new Anthropic();
22
+
23
+ // Explicit API key (only when you must inject a specific key)
24
+ const client = new Anthropic({ apiKey: "your-api-key" });
25
+ ```
26
+
27
+ ---
28
+
29
+ ## Create an Environment
30
+
31
+ ```typescript
32
+ const environment = await client.beta.environments.create(
33
+ {
34
+ name: "my-dev-env",
35
+ config: {
36
+ type: "cloud",
37
+ networking: { type: "unrestricted" },
38
+ },
39
+ },
40
+ );
41
+ console.log(environment.id); // env_...
42
+ ```
43
+
44
+ ---
45
+
46
+ ## Create an Agent (required first step)
47
+
48
+ > Warning: **There is no inline agent config.** `model`/`system`/`tools` live on the agent object, not the session. Always start with `agents.create()` - the session only takes `agent: { type: "agent", id: agent.id }`.
49
+
50
+ ### Minimal
51
+
52
+ ```typescript
53
+ // 1. Create the agent (reusable, versioned)
54
+ const agent = await client.beta.agents.create(
55
+ {
56
+ name: "Coding Assistant",
57
+ model: "claude-opus-5",
58
+ tools: [{ type: "agent_toolset_20260401", default_config: { enabled: true } }],
59
+ },
60
+ );
61
+
62
+ // 2. Start a session
63
+ const session = await client.beta.sessions.create(
64
+ {
65
+ agent: { type: "agent", id: agent.id, version: agent.version },
66
+ environment_id: environment.id,
67
+ },
68
+ );
69
+ console.log(session.id, session.status);
70
+ console.log(`Trace: https://platform.claude.com/workspaces/default/sessions/${session.id}`); // swap 'default' for your workspace ID if the API key is not in the Default workspace
71
+ ```
72
+
73
+ ### With system prompt and custom tools
74
+
75
+ ```typescript
76
+ const agent = await client.beta.agents.create(
77
+ {
78
+ name: "Code Reviewer",
79
+ model: "claude-opus-5",
80
+ system: "You are a senior code reviewer.",
81
+ tools: [
82
+ { type: "agent_toolset_20260401", default_config: { enabled: true } },
83
+ {
84
+ type: "custom",
85
+ name: "run_tests",
86
+ description: "Run the test suite",
87
+ input_schema: {
88
+ type: "object",
89
+ properties: {
90
+ test_path: { type: "string", description: "Path to test file" },
91
+ },
92
+ required: ["test_path"],
93
+ },
94
+ },
95
+ ],
96
+ },
97
+ );
98
+
99
+ const session = await client.beta.sessions.create(
100
+ {
101
+ agent: { type: "agent", id: agent.id, version: agent.version },
102
+ environment_id: environment.id,
103
+ title: "Code review session",
104
+ resources: [
105
+ {
106
+ type: "github_repository",
107
+ url: "https://github.com/owner/repo",
108
+ mount_path: "/workspace/repo",
109
+ authorization_token: process.env.GITHUB_TOKEN,
110
+ branch: "main",
111
+ },
112
+ ],
113
+ },
114
+ );
115
+ ```
116
+
117
+ ---
118
+
119
+ ## Send a User Message
120
+
121
+ ```typescript
122
+ await client.beta.sessions.events.send(
123
+ session.id,
124
+ {
125
+ events: [
126
+ {
127
+ type: "user.message",
128
+ content: [{ type: "text", text: "Review the auth module" }],
129
+ },
130
+ ],
131
+ },
132
+ );
133
+ ```
134
+
135
+ > Tip: **Stream-first:** Open the stream *before* (or concurrently with) sending the message. The stream only delivers events that occur after it opens - stream-after-send means early events arrive buffered in one batch. See [Steering Patterns](../../shared/managed-agents-events.md#steering-patterns).
136
+
137
+ ---
138
+
139
+ ## Stream Events (SSE)
140
+
141
+ ```typescript
142
+ // Stream-first: open stream and send concurrently
143
+ const [events] = await Promise.all([
144
+ collectStream(session.id),
145
+ client.beta.sessions.events.send(
146
+ session.id,
147
+ { events: [{ type: "user.message", content: [{ type: "text", text: "..." }] }] },
148
+ ),
149
+ ]);
150
+
151
+ // Standalone stream iteration:
152
+ const stream = await client.beta.sessions.events.stream(
153
+ session.id,
154
+ );
155
+
156
+ for await (const event of stream) {
157
+ switch (event.type) {
158
+ case "agent.message":
159
+ for (const block of event.content) {
160
+ if (block.type === "text") {
161
+ process.stdout.write(block.text);
162
+ }
163
+ }
164
+ break;
165
+ case "agent.custom_tool_use":
166
+ // Custom tool invocation - session is now idle
167
+ console.log(`\nCustom tool call: ${event.name}`);
168
+ console.log(`Input: ${JSON.stringify(event.input)}`);
169
+ break;
170
+ case "session.status_idle":
171
+ console.log("\n--- Agent idle ---");
172
+ break;
173
+ case "session.status_terminated":
174
+ console.log("\n--- Session terminated ---");
175
+ break;
176
+ }
177
+ }
178
+ ```
179
+
180
+ ---
181
+
182
+ ## Provide Custom Tool Result
183
+
184
+ ```typescript
185
+ await client.beta.sessions.events.send(
186
+ session.id,
187
+ {
188
+ events: [
189
+ {
190
+ type: "user.custom_tool_result",
191
+ custom_tool_use_id: "sevt_abc123",
192
+ content: [{ type: "text", text: "All 42 tests passed." }],
193
+ },
194
+ ],
195
+ },
196
+ );
197
+ ```
198
+
199
+ ---
200
+
201
+ ## Poll Events
202
+
203
+ ```typescript
204
+ const events = await client.beta.sessions.events.list(
205
+ session.id,
206
+ );
207
+ for (const event of events.data) {
208
+ console.log(`${event.type}: ${event.id}`);
209
+ }
210
+ ```
211
+
212
+ ---
213
+
214
+ ## Full Streaming Loop with Custom Tools
215
+
216
+ ```typescript
217
+ function runCustomTool(toolName: string, toolInput: unknown): string {
218
+ if (toolName === "run_tests") {
219
+ // Your tool implementation here
220
+ return "All tests passed.";
221
+ }
222
+ return `Unknown tool: ${toolName}`;
223
+ }
224
+
225
+ async function runSession(client: Anthropic, sessionId: string) {
226
+ while (true) {
227
+ const stream = await client.beta.sessions.events.stream(
228
+ sessionId,
229
+ );
230
+
231
+ const toolCalls: Anthropic.Beta.Sessions.BetaManagedAgentsAgentCustomToolUseEvent[] = [];
232
+
233
+ for await (const event of stream) {
234
+ if (event.type === "agent.message") {
235
+ for (const block of event.content) {
236
+ if (block.type === "text") {
237
+ process.stdout.write(block.text);
238
+ }
239
+ }
240
+ } else if (event.type === "agent.custom_tool_use") {
241
+ toolCalls.push(event);
242
+ } else if (event.type === "session.status_idle") {
243
+ break;
244
+ } else if (event.type === "session.status_terminated") {
245
+ return;
246
+ }
247
+ }
248
+
249
+ if (toolCalls.length === 0) break;
250
+
251
+ // Process custom tool calls
252
+ const results = toolCalls.map((call) => ({
253
+ type: "user.custom_tool_result" as const,
254
+ custom_tool_use_id: call.id,
255
+ content: [{ type: "text" as const, text: runCustomTool(call.name, call.input) }],
256
+ }));
257
+
258
+ await client.beta.sessions.events.send(
259
+ sessionId,
260
+ { events: results },
261
+ );
262
+ }
263
+ }
264
+ ```
265
+
266
+ ---
267
+
268
+ ## Upload a File
269
+
270
+ ```typescript
271
+ import fs from "fs";
272
+
273
+ const file = await client.beta.files.upload({
274
+ file: fs.createReadStream("data.csv"),
275
+ purpose: "agent",
276
+ });
277
+
278
+ // Use in a session
279
+ const session = await client.beta.sessions.create(
280
+ {
281
+ agent: { type: "agent", id: agent.id, version: agent.version },
282
+ environment_id: environment.id,
283
+ resources: [{ type: "file", file_id: file.id, mount_path: "/workspace/data.csv" }],
284
+ },
285
+ );
286
+ ```
287
+
288
+ ---
289
+
290
+ ## List and Download Session Files
291
+
292
+ List files the agent wrote to `/mnt/session/outputs/` during a session, then download them.
293
+
294
+ ```typescript
295
+ import fs from "fs";
296
+
297
+ // List files associated with a session
298
+ const files = await client.beta.files.list({
299
+ scope_id: session.id,
300
+ betas: ["managed-agents-2026-04-01"],
301
+ });
302
+ for (const f of files.data) {
303
+ console.log(f.filename, f.size_bytes);
304
+
305
+ // Download and save to disk
306
+ const resp = await client.beta.files.download(f.id);
307
+ const buffer = Buffer.from(await resp.arrayBuffer());
308
+ fs.writeFileSync(f.filename, buffer);
309
+ }
310
+ ```
311
+
312
+ > Tip: There's a brief indexing lag (~1-3s) between `session.status_idle` and output files appearing in `files.list`. Retry once or twice if the list is empty.
313
+
314
+ ---
315
+
316
+ ## Session Management
317
+
318
+ ```typescript
319
+ // Get session details
320
+ const session = await client.beta.sessions.retrieve("sesn_011CZxAbc123Def456");
321
+ console.log(session.status, session.usage);
322
+
323
+ // List sessions
324
+ const sessions = await client.beta.sessions.list();
325
+
326
+ // Delete a session
327
+ await client.beta.sessions.delete("sesn_011CZxAbc123Def456");
328
+
329
+ // Archive a session
330
+ await client.beta.sessions.archive("sesn_011CZxAbc123Def456");
331
+ ```
332
+
333
+ ---
334
+
335
+ ## MCP Server Integration
336
+
337
+ ```typescript
338
+ // Agent declares MCP server (no auth here - auth goes in a vault)
339
+ const agent = await client.beta.agents.create({
340
+ name: "MCP Agent",
341
+ model: "claude-opus-5",
342
+ mcp_servers: [
343
+ { type: "url", name: "my-tools", url: "https://my-mcp-server.example.com/sse" },
344
+ ],
345
+ tools: [
346
+ { type: "agent_toolset_20260401", default_config: { enabled: true } },
347
+ { type: "mcp_toolset", mcp_server_name: "my-tools" },
348
+ ],
349
+ });
350
+
351
+ // Session attaches vault(s) containing credentials for those MCP server URLs
352
+ const session = await client.beta.sessions.create({
353
+ agent: agent.id,
354
+ environment_id: environment.id,
355
+ vault_ids: [vault.id],
356
+ });
357
+ ```
358
+
359
+ See `shared/managed-agents-tools.md` §Vaults for creating vaults and adding credentials.
@@ -0,0 +1,34 @@
1
+ ---
2
+ name: code-review
3
+ description: Review a diff, branch, pull request, or repository. Default to correctness, repository standards, and any supplied spec; use simplicity mode when asked about complexity or over-engineering; use repository-audit mode when asked to review the whole codebase. Do not use for implementation or architecture design.
4
+ ---
5
+
6
+ # Code Review
7
+
8
+ Review evidence, not intentions. Report actionable findings with file and line references. Do not modify code unless the user asks.
9
+
10
+ ## Select scope and mode
11
+
12
+ - **Diff review:** use the user-supplied ref, PR diff, working tree, or merge-base. If no scope is available, ask for one.
13
+ - **Correctness mode:** find behavior, error handling, compatibility, security, and test gaps.
14
+ - **Standards/spec mode:** compare the diff with repository instructions and a user-supplied, linked, or discoverable spec. If no spec exists, say so; do not require an issue tracker or setup workflow.
15
+ - **Simplicity mode:** find dead code, speculative abstraction, unnecessary dependencies, hand-rolled platform/standard-library behavior, and avoidable indirection.
16
+ - **Repository-audit mode:** inspect the whole repository for the highest-value architecture or simplification findings. Keep correctness and security out of scope unless requested.
17
+
18
+ ## Process
19
+
20
+ 1. Establish the exact files and baseline. Read relevant repository standards, tests, and spec material.
21
+ 2. Inspect the changed behavior and its callers, not only individual lines.
22
+ 3. Separate confirmed defects from risks, judgement calls, and missing context. A repository convention overrides a generic heuristic.
23
+ 4. In simplicity mode, use one of: `delete`, `stdlib`, `native`, `yagni`, or `shrink`. Do not flag requested validation, error handling, or meaningful regression tests as bloat.
24
+ 5. Prioritize findings by impact. Omit praise, restatement, and speculative nits.
25
+
26
+ ## Output
27
+
28
+ Use this concise format unless the user requests a narrative:
29
+
30
+ ```text
31
+ path:line[-line] [severity] problem. Consequence. Concrete fix.
32
+ ```
33
+
34
+ Use `bug`, `risk`, `nit`, or `question` as the severity. For a clean review, state what scope and modes were checked. Summarize findings by mode without inventing a global pass/fail verdict.
@@ -0,0 +1,3 @@
1
+ interface:
2
+ display_name: "Code Review"
3
+ short_description: "Review a diff on standards and spec"
@@ -0,0 +1,37 @@
1
+ # Deepening
2
+
3
+ How to deepen a cluster of shallow modules safely, given its dependencies. Assumes the vocabulary in [SKILL.md](SKILL.md): **module**, **interface**, **seam**, **adapter**.
4
+
5
+ ## Dependency categories
6
+
7
+ When assessing a candidate for deepening, classify its dependencies. The category determines how the deepened module is tested across its seam.
8
+
9
+ ### 1. In-process
10
+
11
+ Pure computation, in-memory state, no I/O. Always deepenable: merge the modules and test through the new interface directly. No adapter needed.
12
+
13
+ ### 2. Local-substitutable
14
+
15
+ Dependencies that have local test stand-ins (PGLite for Postgres, in-memory filesystem). Deepenable if the stand-in exists. The deepened module is tested with the stand-in running in the test suite. The seam is internal; no port at the module's external interface.
16
+
17
+ ### 3. Remote but owned (Ports & Adapters)
18
+
19
+ Your own services across a network boundary (microservices, internal APIs). Define a **port** (interface) at the seam. The deep module owns the logic; the transport is injected as an **adapter**. Tests use an in-memory adapter. Production uses an HTTP/gRPC/queue adapter.
20
+
21
+ Recommendation shape: *"Define a port at the seam, implement an HTTP adapter for production and an in-memory adapter for testing, so the logic sits in one deep module even though it's deployed across a network."*
22
+
23
+ ### 4. True external (Mock)
24
+
25
+ Third-party services (Stripe, Twilio, etc.) you don't control. The deepened module takes the external dependency as an injected port; tests provide a mock adapter.
26
+
27
+ ## Seam discipline
28
+
29
+ - **One adapter means a hypothetical seam. Two adapters means a real one.** Don't introduce a port unless at least two adapters are justified (typically production + test). A single-adapter seam is just indirection.
30
+ - **Internal seams vs external seams.** A deep module can have internal seams (private to its implementation, used by its own tests) as well as the external seam at its interface. Don't expose internal seams through the interface just because tests use them.
31
+
32
+ ## Testing strategy: replace, don't layer
33
+
34
+ - Old unit tests on shallow modules become waste once tests at the deepened module's interface exist; delete them.
35
+ - Write new tests at the deepened module's interface. The **interface is the test surface**.
36
+ - Tests assert on observable outcomes through the interface, not internal state.
37
+ - Tests should survive internal refactors, since they describe behaviour, not implementation. If a test has to change when the implementation changes, it's testing past the interface.
@@ -0,0 +1,44 @@
1
+ # Design It Twice
2
+
3
+ When the user wants to explore alternative interfaces for a chosen deepening candidate, use this parallel sub-agent pattern. Based on "Design It Twice" (Ousterhout): your first idea is unlikely to be the best.
4
+
5
+ Uses the vocabulary in [SKILL.md](SKILL.md): **module**, **interface**, **seam**, **adapter**, **leverage**.
6
+
7
+ ## Process
8
+
9
+ ### 1. Frame the problem space
10
+
11
+ Before spawning sub-agents, write a user-facing explanation of the problem space for the chosen candidate:
12
+
13
+ - The constraints any new interface would need to satisfy
14
+ - The dependencies it would rely on, and which category they fall into (see [DEEPENING.md](DEEPENING.md))
15
+ - A rough illustrative code sketch to ground the constraints, not a proposal, just a way to make the constraints concrete
16
+
17
+ Show this to the user, then immediately proceed to Step 2. The user reads and thinks while the sub-agents work in parallel.
18
+
19
+ ### 2. Spawn sub-agents
20
+
21
+ Spawn 3+ sub-agents in parallel. Each must produce a **radically different** interface for the deepened module.
22
+
23
+ Prompt each sub-agent with a separate technical brief (file paths, coupling details, dependency category from [DEEPENING.md](DEEPENING.md), what sits behind the seam). The brief is independent of the user-facing problem-space explanation in Step 1. Give each agent a different design constraint:
24
+
25
+ - Agent 1: "Minimize the interface: aim for 1–3 entry points max. Maximise leverage per entry point."
26
+ - Agent 2: "Maximise flexibility: support many use cases and extension."
27
+ - Agent 3: "Optimise for the most common caller: make the default case trivial."
28
+ - Agent 4 (if applicable): "Design around ports & adapters for cross-seam dependencies."
29
+
30
+ Include both [SKILL.md](SKILL.md) vocabulary and CONTEXT.md vocabulary in the brief so each sub-agent names things consistently with the architecture language and the project's domain language.
31
+
32
+ Each sub-agent outputs:
33
+
34
+ 1. Interface (types, methods, params, plus invariants, ordering, error modes)
35
+ 2. Usage example showing how callers use it
36
+ 3. What the implementation hides behind the seam
37
+ 4. Dependency strategy and adapters (see [DEEPENING.md](DEEPENING.md))
38
+ 5. Trade-offs: where leverage is high, where it's thin
39
+
40
+ ### 3. Present and compare
41
+
42
+ Present designs sequentially so the user can absorb each one, then compare them in prose. Contrast by **depth** (leverage at the interface), **locality** (where change concentrates), and **seam placement**.
43
+
44
+ After comparing, give your own recommendation: which design you think is strongest and why. If elements from different designs would combine well, propose a hybrid. Be opinionated: the user wants a strong read, not a menu.
@@ -0,0 +1,40 @@
1
+ ---
2
+ name: codebase-design
3
+ description: "Design or improve module and service architecture: interfaces, ownership, seams, dependencies, testability, domain vocabulary, and ADR-worthy decisions. Also use for an explicit architecture audit or deepening review. Do not use for implementation, generic code review, or requirement interviews."
4
+ ---
5
+
6
+ # Codebase Design
7
+
8
+ Design modules that give callers useful behavior through a small, understandable interface while keeping ownership and verification local.
9
+
10
+ ## Core ideas
11
+
12
+ - A **module** may be a function, package, component, service, or vertical slice.
13
+ - Its **interface** includes types plus invariants, errors, ordering, configuration, and performance facts callers need.
14
+ - A **seam** is where behavior can vary without changing callers. Add one only for a real variation, typically production and test adapters.
15
+ - **Depth** is leverage: useful behavior behind an interface simpler than the implementation it hides.
16
+ - The interface is normally the highest-value test surface.
17
+
18
+ Use this vocabulary when it clarifies a decision; do not police ordinary engineering language.
19
+
20
+ ## Design workflow
21
+
22
+ 1. Read the relevant code, tests, project terminology, and existing decisions. Separate observed constraints from assumptions.
23
+ 2. Identify ownership, callers, data flow, invariants, and the change pressure motivating the design.
24
+ 3. Prefer a small interface with clear responsibility. Apply the deletion test: if removing a module merely removes indirection, collapse it; if complexity would spread across callers, it earns its place.
25
+ 4. For external dependencies, inject an adapter only when a real boundary varies. Keep internal testing seams private when possible.
26
+ 5. Test behavior through the interface rather than internal collaboration. Replace obsolete shallow-module tests when a higher seam makes them redundant.
27
+ 6. Record domain terms only when they are project-specific and contested. Record an ADR only for a hard-to-reverse, non-obvious trade-off with real alternatives.
28
+
29
+ ## Architecture-audit mode
30
+
31
+ When explicitly asked to audit architecture:
32
+
33
+ 1. Scope the review to a named subsystem or recent change hotspots.
34
+ 2. Identify a small ranked set of concrete ownership, interface, coupling, or testability problems.
35
+ 3. For each, state current friction, evidence, proposed seam or consolidation, expected leverage/locality, risks, and the smallest next experiment.
36
+ 4. Do not require an HTML report, subagents, or a refactor proposal before the user chooses a candidate.
37
+
38
+ ## Completion
39
+
40
+ Present the recommended design, alternatives only where they are materially different, invariants, test strategy, migration/compatibility implications, and unresolved decisions.
@@ -0,0 +1,38 @@
1
+ ---
2
+ name: diagnosing-bugs
3
+ description: Diagnose unknown bugs, regressions, intermittent failures, slow paths, unexpected results, or server errors before changing code. Also use for a known-cause small fix when the user wants a narrow patch with regression proof. Do not use for new feature implementation.
4
+ ---
5
+
6
+ # Diagnose and Patch Bugs
7
+
8
+ Use the lightest path that establishes enough evidence for the request. Redact secrets from commands, logs, traces, and captured artifacts.
9
+
10
+ ## Choose a path
11
+
12
+ - **Unknown cause, intermittent failure, or performance regression:** investigate first.
13
+ - **Known cause and small requested fix:** use the narrow-patch path.
14
+ - **New behavior rather than incorrect behavior:** use `lean-build`.
15
+
16
+ ## Investigation path
17
+
18
+ 1. State the observed symptom separately from possible causes. Read relevant project context, ADRs, callers, tests, and failure output.
19
+ 2. Build the strongest practical feedback loop: an existing failing test, focused new test, CLI fixture, HTTP request, browser automation, trace replay, timing harness, or bisection. Prefer a fast, deterministic signal that exercises the reported symptom.
20
+ 3. If a tight repro is unavailable, gather the strongest available evidence and state the blocker. Do not present an inferred cause as confirmed.
21
+ 4. Minimize a reproducible case when doing so will materially reduce the hypothesis space.
22
+ 5. Rank plausible, falsifiable mechanisms. Test the cheapest discriminating probe first; change one variable at a time.
23
+ 6. Fix the responsible mechanism, not a symptom at one caller. Add a regression test at the highest seam that reproduces the real failure when such a seam exists.
24
+ 7. Re-run the original feedback loop, focused regression proof, and nearest affected check. Remove temporary instrumentation and report evidence, cause, fix, and remaining uncertainty.
25
+
26
+ For performance work, establish a comparable baseline and measure the affected path; do not substitute log volume for a performance measurement.
27
+
28
+ ## Known-cause narrow-patch path
29
+
30
+ 1. Confirm the reported cause against the affected code and callers.
31
+ 2. Change the narrowest layer that owns the incorrect behavior. Preserve unrelated behavior, user changes, and public contracts.
32
+ 3. Avoid cleanup, renaming, abstractions, and unrelated tests.
33
+ 4. Add or update the smallest relevant regression proof when economical; otherwise state the evidence that substitutes for it.
34
+ 5. Run the focused proof plus the nearest affected gate. Stop when the requested behavior is fixed.
35
+
36
+ ## Completion
37
+
38
+ Report the observed symptom, evidence, confirmed or suspected cause, proof run, and any unresolved limitation. Do not claim diagnosis certainty without supporting evidence.
@@ -0,0 +1,3 @@
1
+ interface:
2
+ display_name: "Diagnosing Bugs"
3
+ short_description: "Diagnose hard bugs and regressions"
@@ -0,0 +1,44 @@
1
+ #!/usr/bin/env bash
2
+ # Human-in-the-loop reproduction loop.
3
+ # Copy this file, edit the steps below, and run it.
4
+ # The agent runs the script; the user follows prompts in their terminal.
5
+ #
6
+ # Usage:
7
+ # bash hitl-loop.template.sh
8
+ #
9
+ # Two helpers:
10
+ # step "<instruction>" → show instruction, wait for Enter
11
+ # capture VAR "<question>" → show question, read response into VAR
12
+ #
13
+ # At the end, captured values are printed as KEY=VALUE for the agent to parse.
14
+ #
15
+ # `capture` prints its value back to the terminal, where the agent reads it,
16
+ # so capture observations, and leave signing in to the user as a `step`.
17
+
18
+ set -euo pipefail
19
+
20
+ step() {
21
+ printf '\n>>> %s\n' "$1"
22
+ read -r -p " [Enter when done] " _
23
+ }
24
+
25
+ capture() {
26
+ local var="$1" question="$2" answer
27
+ printf '\n>>> %s\n' "$question"
28
+ read -r -p " > " answer
29
+ printf -v "$var" '%s' "$answer"
30
+ }
31
+
32
+ # --- edit below ---------------------------------------------------------
33
+
34
+ step "Open the app at http://localhost:3000 and sign in."
35
+
36
+ capture ERRORED "Click the 'Export' button. Did it throw an error? (y/n)"
37
+
38
+ capture ERROR_MSG "Paste the error message (or 'none'):"
39
+
40
+ # --- edit above ---------------------------------------------------------
41
+
42
+ printf '\n--- Captured ---\n'
43
+ printf 'ERRORED=%s\n' "$ERRORED"
44
+ printf 'ERROR_MSG=%s\n' "$ERROR_MSG"
@@ -0,0 +1,30 @@
1
+ © 2025 Anthropic, PBC. All rights reserved.
2
+
3
+ LICENSE: Use of these materials (including all code, prompts, assets, files,
4
+ and other components of this Skill) is governed by your agreement with
5
+ Anthropic regarding use of Anthropic's services. If no separate agreement
6
+ exists, use is governed by Anthropic's Consumer Terms of Service or
7
+ Commercial Terms of Service, as applicable:
8
+ https://www.anthropic.com/legal/consumer-terms
9
+ https://www.anthropic.com/legal/commercial-terms
10
+ Your applicable agreement is referred to as the "Agreement." "Services" are
11
+ as defined in the Agreement.
12
+
13
+ ADDITIONAL RESTRICTIONS: Notwithstanding anything in the Agreement to the
14
+ contrary, users may not:
15
+
16
+ - Extract these materials from the Services or retain copies of these
17
+ materials outside the Services
18
+ - Reproduce or copy these materials, except for temporary copies created
19
+ automatically during authorized use of the Services
20
+ - Create derivative works based on these materials
21
+ - Distribute, sublicense, or transfer these materials to any third party
22
+ - Make, offer to sell, sell, or import any inventions embodied in these
23
+ materials
24
+ - Reverse engineer, decompile, or disassemble these materials
25
+
26
+ The receipt, viewing, or possession of these materials does not convey or
27
+ imply any license or right beyond those expressly granted above.
28
+
29
+ Anthropic retains all right, title, and interest in these materials,
30
+ including all copyrights, patents, and other intellectual property rights.