@bastani/atomic 0.5.11 → 0.5.12-0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (506) hide show
  1. package/.agents/skills/adapt/SKILL.md +199 -0
  2. package/.agents/skills/advanced-evaluation/SKILL.md +402 -0
  3. package/.agents/skills/advanced-evaluation/references/bias-mitigation.md +288 -0
  4. package/.agents/skills/advanced-evaluation/references/evaluation-pipeline.md +43 -0
  5. package/.agents/skills/advanced-evaluation/references/implementation-patterns.md +315 -0
  6. package/.agents/skills/advanced-evaluation/references/metrics-guide.md +331 -0
  7. package/.agents/skills/advanced-evaluation/scripts/evaluation_example.py +392 -0
  8. package/.agents/skills/animate/SKILL.md +175 -0
  9. package/.agents/skills/arrange/SKILL.md +124 -0
  10. package/.agents/skills/audit/SKILL.md +148 -0
  11. package/.agents/skills/bdi-mental-states/SKILL.md +311 -0
  12. package/.agents/skills/bdi-mental-states/references/bdi-ontology-core.md +207 -0
  13. package/.agents/skills/bdi-mental-states/references/framework-integration.md +582 -0
  14. package/.agents/skills/bdi-mental-states/references/rdf-examples.md +315 -0
  15. package/.agents/skills/bdi-mental-states/references/sparql-competency.md +420 -0
  16. package/.agents/skills/bolder/SKILL.md +117 -0
  17. package/.agents/skills/bun/SKILL.md +199 -0
  18. package/.agents/skills/clarify/SKILL.md +183 -0
  19. package/.agents/skills/colorize/SKILL.md +143 -0
  20. package/.agents/skills/context-compression/SKILL.md +272 -0
  21. package/.agents/skills/context-compression/references/evaluation-framework.md +213 -0
  22. package/.agents/skills/context-compression/scripts/compression_evaluator.py +862 -0
  23. package/.agents/skills/context-compression/tests/test_compression_evaluator.py +56 -0
  24. package/.agents/skills/context-degradation/SKILL.md +206 -0
  25. package/.agents/skills/context-degradation/references/patterns.md +314 -0
  26. package/.agents/skills/context-degradation/scripts/degradation_detector.py +614 -0
  27. package/.agents/skills/context-fundamentals/SKILL.md +201 -0
  28. package/.agents/skills/context-fundamentals/references/context-components.md +283 -0
  29. package/.agents/skills/context-fundamentals/scripts/context_manager.py +533 -0
  30. package/.agents/skills/context-optimization/SKILL.md +195 -0
  31. package/.agents/skills/context-optimization/references/optimization_techniques.md +272 -0
  32. package/.agents/skills/context-optimization/scripts/compaction.py +562 -0
  33. package/.agents/skills/create-spec/SKILL.md +244 -0
  34. package/.agents/skills/critique/SKILL.md +225 -0
  35. package/.agents/skills/critique/reference/cognitive-load.md +106 -0
  36. package/.agents/skills/critique/reference/heuristics-scoring.md +234 -0
  37. package/.agents/skills/critique/reference/personas.md +178 -0
  38. package/.agents/skills/delight/SKILL.md +304 -0
  39. package/.agents/skills/distill/SKILL.md +122 -0
  40. package/.agents/skills/docx/LICENSE.txt +30 -0
  41. package/.agents/skills/docx/SKILL.md +590 -0
  42. package/.agents/skills/docx/scripts/__init__.py +1 -0
  43. package/.agents/skills/docx/scripts/accept_changes.py +135 -0
  44. package/.agents/skills/docx/scripts/comment.py +318 -0
  45. package/.agents/skills/docx/scripts/office/helpers/__init__.py +0 -0
  46. package/.agents/skills/docx/scripts/office/helpers/merge_runs.py +199 -0
  47. package/.agents/skills/docx/scripts/office/helpers/simplify_redlines.py +197 -0
  48. package/.agents/skills/docx/scripts/office/pack.py +159 -0
  49. package/.agents/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
  50. package/.agents/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
  51. package/.agents/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
  52. package/.agents/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
  53. package/.agents/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
  54. package/.agents/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
  55. package/.agents/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
  56. package/.agents/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
  57. package/.agents/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
  58. package/.agents/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
  59. package/.agents/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
  60. package/.agents/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
  61. package/.agents/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
  62. package/.agents/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
  63. package/.agents/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
  64. package/.agents/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
  65. package/.agents/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
  66. package/.agents/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
  67. package/.agents/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
  68. package/.agents/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
  69. package/.agents/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
  70. package/.agents/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
  71. package/.agents/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
  72. package/.agents/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
  73. package/.agents/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
  74. package/.agents/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
  75. package/.agents/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
  76. package/.agents/skills/docx/scripts/office/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
  77. package/.agents/skills/docx/scripts/office/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
  78. package/.agents/skills/docx/scripts/office/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
  79. package/.agents/skills/docx/scripts/office/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
  80. package/.agents/skills/docx/scripts/office/schemas/mce/mc.xsd +75 -0
  81. package/.agents/skills/docx/scripts/office/schemas/microsoft/wml-2010.xsd +560 -0
  82. package/.agents/skills/docx/scripts/office/schemas/microsoft/wml-2012.xsd +67 -0
  83. package/.agents/skills/docx/scripts/office/schemas/microsoft/wml-2018.xsd +14 -0
  84. package/.agents/skills/docx/scripts/office/schemas/microsoft/wml-cex-2018.xsd +20 -0
  85. package/.agents/skills/docx/scripts/office/schemas/microsoft/wml-cid-2016.xsd +13 -0
  86. package/.agents/skills/docx/scripts/office/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
  87. package/.agents/skills/docx/scripts/office/schemas/microsoft/wml-symex-2015.xsd +8 -0
  88. package/.agents/skills/docx/scripts/office/soffice.py +183 -0
  89. package/.agents/skills/docx/scripts/office/unpack.py +132 -0
  90. package/.agents/skills/docx/scripts/office/validate.py +111 -0
  91. package/.agents/skills/docx/scripts/office/validators/__init__.py +15 -0
  92. package/.agents/skills/docx/scripts/office/validators/base.py +847 -0
  93. package/.agents/skills/docx/scripts/office/validators/docx.py +446 -0
  94. package/.agents/skills/docx/scripts/office/validators/pptx.py +275 -0
  95. package/.agents/skills/docx/scripts/office/validators/redlining.py +247 -0
  96. package/.agents/skills/docx/scripts/templates/comments.xml +3 -0
  97. package/.agents/skills/docx/scripts/templates/commentsExtended.xml +3 -0
  98. package/.agents/skills/docx/scripts/templates/commentsExtensible.xml +3 -0
  99. package/.agents/skills/docx/scripts/templates/commentsIds.xml +3 -0
  100. package/.agents/skills/docx/scripts/templates/people.xml +3 -0
  101. package/.agents/skills/evaluation/SKILL.md +251 -0
  102. package/.agents/skills/evaluation/references/metrics.md +339 -0
  103. package/.agents/skills/evaluation/scripts/evaluator.py +627 -0
  104. package/.agents/skills/explain-code/SKILL.md +230 -0
  105. package/.agents/skills/extract/SKILL.md +91 -0
  106. package/.agents/skills/filesystem-context/SKILL.md +287 -0
  107. package/.agents/skills/filesystem-context/references/implementation-patterns.md +549 -0
  108. package/.agents/skills/filesystem-context/scripts/filesystem_context.py +425 -0
  109. package/.agents/skills/find-skills/SKILL.md +142 -0
  110. package/.agents/skills/frontend-design/SKILL.md +147 -0
  111. package/.agents/skills/frontend-design/reference/color-and-contrast.md +132 -0
  112. package/.agents/skills/frontend-design/reference/interaction-design.md +195 -0
  113. package/.agents/skills/frontend-design/reference/motion-design.md +99 -0
  114. package/.agents/skills/frontend-design/reference/responsive-design.md +114 -0
  115. package/.agents/skills/frontend-design/reference/spatial-design.md +100 -0
  116. package/.agents/skills/frontend-design/reference/typography.md +133 -0
  117. package/.agents/skills/frontend-design/reference/ux-writing.md +107 -0
  118. package/.agents/skills/gh-commit/SKILL.md +243 -0
  119. package/.agents/skills/gh-create-pr/SKILL.md +93 -0
  120. package/.agents/skills/harden/SKILL.md +354 -0
  121. package/.agents/skills/hosted-agents/SKILL.md +260 -0
  122. package/.agents/skills/hosted-agents/references/infrastructure-patterns.md +700 -0
  123. package/.agents/skills/hosted-agents/scripts/sandbox_manager.py +590 -0
  124. package/.agents/skills/impeccable/SKILL.md +365 -0
  125. package/.agents/skills/impeccable/reference/color-and-contrast.md +105 -0
  126. package/.agents/skills/impeccable/reference/craft.md +70 -0
  127. package/.agents/skills/impeccable/reference/extract.md +70 -0
  128. package/.agents/skills/impeccable/reference/interaction-design.md +195 -0
  129. package/.agents/skills/impeccable/reference/motion-design.md +99 -0
  130. package/.agents/skills/impeccable/reference/responsive-design.md +114 -0
  131. package/.agents/skills/impeccable/reference/spatial-design.md +100 -0
  132. package/.agents/skills/impeccable/reference/typography.md +142 -0
  133. package/.agents/skills/impeccable/reference/ux-writing.md +107 -0
  134. package/.agents/skills/impeccable/scripts/cleanup-deprecated.mjs +214 -0
  135. package/.agents/skills/init/SKILL.md +138 -0
  136. package/.agents/skills/layout/SKILL.md +125 -0
  137. package/.agents/skills/liteparse/SKILL.md +222 -0
  138. package/.agents/skills/memory-systems/SKILL.md +219 -0
  139. package/.agents/skills/memory-systems/references/implementation.md +551 -0
  140. package/.agents/skills/memory-systems/scripts/memory_store.py +616 -0
  141. package/.agents/skills/multi-agent-patterns/SKILL.md +257 -0
  142. package/.agents/skills/multi-agent-patterns/references/frameworks.md +433 -0
  143. package/.agents/skills/multi-agent-patterns/scripts/coordination.py +613 -0
  144. package/.agents/skills/normalize/SKILL.md +70 -0
  145. package/.agents/skills/onboard/SKILL.md +245 -0
  146. package/.agents/skills/opentui/SKILL.md +201 -0
  147. package/.agents/skills/opentui/references/animation/REFERENCE.md +431 -0
  148. package/.agents/skills/opentui/references/components/REFERENCE.md +144 -0
  149. package/.agents/skills/opentui/references/components/code-diff.md +672 -0
  150. package/.agents/skills/opentui/references/components/containers.md +417 -0
  151. package/.agents/skills/opentui/references/components/inputs.md +531 -0
  152. package/.agents/skills/opentui/references/components/text-display.md +386 -0
  153. package/.agents/skills/opentui/references/core/REFERENCE.md +145 -0
  154. package/.agents/skills/opentui/references/core/api.md +543 -0
  155. package/.agents/skills/opentui/references/core/configuration.md +168 -0
  156. package/.agents/skills/opentui/references/core/gotchas.md +393 -0
  157. package/.agents/skills/opentui/references/core/patterns.md +449 -0
  158. package/.agents/skills/opentui/references/keyboard/REFERENCE.md +617 -0
  159. package/.agents/skills/opentui/references/layout/REFERENCE.md +337 -0
  160. package/.agents/skills/opentui/references/layout/patterns.md +444 -0
  161. package/.agents/skills/opentui/references/react/REFERENCE.md +174 -0
  162. package/.agents/skills/opentui/references/react/api.md +436 -0
  163. package/.agents/skills/opentui/references/react/configuration.md +302 -0
  164. package/.agents/skills/opentui/references/react/gotchas.md +443 -0
  165. package/.agents/skills/opentui/references/react/patterns.md +501 -0
  166. package/.agents/skills/opentui/references/solid/REFERENCE.md +201 -0
  167. package/.agents/skills/opentui/references/solid/api.md +564 -0
  168. package/.agents/skills/opentui/references/solid/configuration.md +316 -0
  169. package/.agents/skills/opentui/references/solid/gotchas.md +427 -0
  170. package/.agents/skills/opentui/references/solid/patterns.md +560 -0
  171. package/.agents/skills/opentui/references/testing/REFERENCE.md +614 -0
  172. package/.agents/skills/optimize/SKILL.md +266 -0
  173. package/.agents/skills/overdrive/SKILL.md +142 -0
  174. package/.agents/skills/pdf/LICENSE.txt +30 -0
  175. package/.agents/skills/pdf/SKILL.md +314 -0
  176. package/.agents/skills/pdf/forms.md +294 -0
  177. package/.agents/skills/pdf/reference.md +612 -0
  178. package/.agents/skills/pdf/scripts/check_bounding_boxes.py +65 -0
  179. package/.agents/skills/pdf/scripts/check_fillable_fields.py +11 -0
  180. package/.agents/skills/pdf/scripts/convert_pdf_to_images.py +33 -0
  181. package/.agents/skills/pdf/scripts/create_validation_image.py +37 -0
  182. package/.agents/skills/pdf/scripts/extract_form_field_info.py +122 -0
  183. package/.agents/skills/pdf/scripts/extract_form_structure.py +115 -0
  184. package/.agents/skills/pdf/scripts/fill_fillable_fields.py +98 -0
  185. package/.agents/skills/pdf/scripts/fill_pdf_form_with_annotations.py +107 -0
  186. package/.agents/skills/playwright-cli/SKILL.md +344 -0
  187. package/.agents/skills/playwright-cli/references/element-attributes.md +23 -0
  188. package/.agents/skills/playwright-cli/references/playwright-tests.md +39 -0
  189. package/.agents/skills/playwright-cli/references/request-mocking.md +87 -0
  190. package/.agents/skills/playwright-cli/references/running-code.md +231 -0
  191. package/.agents/skills/playwright-cli/references/session-management.md +169 -0
  192. package/.agents/skills/playwright-cli/references/storage-state.md +275 -0
  193. package/.agents/skills/playwright-cli/references/test-generation.md +88 -0
  194. package/.agents/skills/playwright-cli/references/tracing.md +139 -0
  195. package/.agents/skills/playwright-cli/references/video-recording.md +143 -0
  196. package/.agents/skills/polish/SKILL.md +224 -0
  197. package/.agents/skills/pptx/LICENSE.txt +30 -0
  198. package/.agents/skills/pptx/SKILL.md +232 -0
  199. package/.agents/skills/pptx/editing.md +205 -0
  200. package/.agents/skills/pptx/pptxgenjs.md +420 -0
  201. package/.agents/skills/pptx/scripts/__init__.py +0 -0
  202. package/.agents/skills/pptx/scripts/add_slide.py +195 -0
  203. package/.agents/skills/pptx/scripts/clean.py +286 -0
  204. package/.agents/skills/pptx/scripts/office/helpers/__init__.py +0 -0
  205. package/.agents/skills/pptx/scripts/office/helpers/merge_runs.py +199 -0
  206. package/.agents/skills/pptx/scripts/office/helpers/simplify_redlines.py +197 -0
  207. package/.agents/skills/pptx/scripts/office/pack.py +159 -0
  208. package/.agents/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
  209. package/.agents/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
  210. package/.agents/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
  211. package/.agents/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
  212. package/.agents/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
  213. package/.agents/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
  214. package/.agents/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
  215. package/.agents/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
  216. package/.agents/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
  217. package/.agents/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
  218. package/.agents/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
  219. package/.agents/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
  220. package/.agents/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
  221. package/.agents/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
  222. package/.agents/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
  223. package/.agents/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
  224. package/.agents/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
  225. package/.agents/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
  226. package/.agents/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
  227. package/.agents/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
  228. package/.agents/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
  229. package/.agents/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
  230. package/.agents/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
  231. package/.agents/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
  232. package/.agents/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
  233. package/.agents/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
  234. package/.agents/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
  235. package/.agents/skills/pptx/scripts/office/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
  236. package/.agents/skills/pptx/scripts/office/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
  237. package/.agents/skills/pptx/scripts/office/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
  238. package/.agents/skills/pptx/scripts/office/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
  239. package/.agents/skills/pptx/scripts/office/schemas/mce/mc.xsd +75 -0
  240. package/.agents/skills/pptx/scripts/office/schemas/microsoft/wml-2010.xsd +560 -0
  241. package/.agents/skills/pptx/scripts/office/schemas/microsoft/wml-2012.xsd +67 -0
  242. package/.agents/skills/pptx/scripts/office/schemas/microsoft/wml-2018.xsd +14 -0
  243. package/.agents/skills/pptx/scripts/office/schemas/microsoft/wml-cex-2018.xsd +20 -0
  244. package/.agents/skills/pptx/scripts/office/schemas/microsoft/wml-cid-2016.xsd +13 -0
  245. package/.agents/skills/pptx/scripts/office/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
  246. package/.agents/skills/pptx/scripts/office/schemas/microsoft/wml-symex-2015.xsd +8 -0
  247. package/.agents/skills/pptx/scripts/office/soffice.py +183 -0
  248. package/.agents/skills/pptx/scripts/office/unpack.py +132 -0
  249. package/.agents/skills/pptx/scripts/office/validate.py +111 -0
  250. package/.agents/skills/pptx/scripts/office/validators/__init__.py +15 -0
  251. package/.agents/skills/pptx/scripts/office/validators/base.py +847 -0
  252. package/.agents/skills/pptx/scripts/office/validators/docx.py +446 -0
  253. package/.agents/skills/pptx/scripts/office/validators/pptx.py +275 -0
  254. package/.agents/skills/pptx/scripts/office/validators/redlining.py +247 -0
  255. package/.agents/skills/pptx/scripts/thumbnail.py +289 -0
  256. package/.agents/skills/project-development/SKILL.md +291 -0
  257. package/.agents/skills/project-development/references/case-studies.md +388 -0
  258. package/.agents/skills/project-development/references/pipeline-patterns.md +610 -0
  259. package/.agents/skills/project-development/scripts/pipeline_template.py +796 -0
  260. package/.agents/skills/prompt-engineer/SKILL.md +263 -0
  261. package/.agents/skills/prompt-engineer/references/advanced_patterns.md +271 -0
  262. package/.agents/skills/prompt-engineer/references/core_prompting.md +137 -0
  263. package/.agents/skills/prompt-engineer/references/quality_improvement.md +193 -0
  264. package/.agents/skills/quieter/SKILL.md +103 -0
  265. package/.agents/skills/research-codebase/SKILL.md +227 -0
  266. package/.agents/skills/shape/SKILL.md +96 -0
  267. package/.agents/skills/skill-creator/LICENSE.txt +202 -0
  268. package/.agents/skills/skill-creator/SKILL.md +485 -0
  269. package/.agents/skills/skill-creator/agents/analyzer.md +274 -0
  270. package/.agents/skills/skill-creator/agents/comparator.md +202 -0
  271. package/.agents/skills/skill-creator/agents/grader.md +223 -0
  272. package/.agents/skills/skill-creator/assets/eval_review.html +146 -0
  273. package/.agents/skills/skill-creator/eval-viewer/generate_review.py +471 -0
  274. package/.agents/skills/skill-creator/eval-viewer/viewer.html +1325 -0
  275. package/.agents/skills/skill-creator/references/schemas.md +430 -0
  276. package/.agents/skills/skill-creator/scripts/__init__.py +0 -0
  277. package/.agents/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
  278. package/.agents/skills/skill-creator/scripts/generate_report.py +326 -0
  279. package/.agents/skills/skill-creator/scripts/improve_description.py +247 -0
  280. package/.agents/skills/skill-creator/scripts/package_skill.py +136 -0
  281. package/.agents/skills/skill-creator/scripts/quick_validate.py +103 -0
  282. package/.agents/skills/skill-creator/scripts/run_eval.py +310 -0
  283. package/.agents/skills/skill-creator/scripts/run_loop.py +328 -0
  284. package/.agents/skills/skill-creator/scripts/utils.py +47 -0
  285. package/.agents/skills/sl-commit/SKILL.md +51 -0
  286. package/.agents/skills/sl-submit-diff/SKILL.md +55 -0
  287. package/.agents/skills/teach-impeccable/SKILL.md +71 -0
  288. package/.agents/skills/test-driven-development/SKILL.md +371 -0
  289. package/.agents/skills/test-driven-development/testing-anti-patterns.md +299 -0
  290. package/.agents/skills/tool-design/SKILL.md +271 -0
  291. package/.agents/skills/tool-design/references/architectural_reduction.md +210 -0
  292. package/.agents/skills/tool-design/references/best_practices.md +176 -0
  293. package/.agents/skills/tool-design/scripts/description_generator.py +528 -0
  294. package/.agents/skills/typescript-advanced-types/SKILL.md +719 -0
  295. package/.agents/skills/typescript-expert/SKILL.md +428 -0
  296. package/.agents/skills/typescript-expert/references/tsconfig-strict.json +92 -0
  297. package/.agents/skills/typescript-expert/references/typescript-cheatsheet.md +383 -0
  298. package/.agents/skills/typescript-expert/references/utility-types.ts +335 -0
  299. package/.agents/skills/typescript-expert/scripts/ts_diagnostic.py +203 -0
  300. package/.agents/skills/typescript-react-reviewer/SKILL.md +200 -0
  301. package/.agents/skills/typescript-react-reviewer/references/antipatterns.md +510 -0
  302. package/.agents/skills/typescript-react-reviewer/references/checklist.md +267 -0
  303. package/.agents/skills/typescript-react-reviewer/references/react19-patterns.md +305 -0
  304. package/.agents/skills/typeset/SKILL.md +116 -0
  305. package/.agents/skills/workflow-creator/SKILL.md +337 -0
  306. package/.agents/skills/workflow-creator/references/agent-sessions.md +789 -0
  307. package/.agents/skills/workflow-creator/references/computation-and-validation.md +224 -0
  308. package/.agents/skills/workflow-creator/references/control-flow.md +450 -0
  309. package/.agents/skills/workflow-creator/references/discovery-and-verification.md +156 -0
  310. package/.agents/skills/workflow-creator/references/failure-modes.md +732 -0
  311. package/.agents/skills/workflow-creator/references/getting-started.md +289 -0
  312. package/.agents/skills/workflow-creator/references/session-config.md +355 -0
  313. package/.agents/skills/workflow-creator/references/state-and-data-flow.md +374 -0
  314. package/.agents/skills/workflow-creator/references/user-input.md +206 -0
  315. package/.agents/skills/workflow-creator/references/workflow-inputs.md +274 -0
  316. package/.agents/skills/xlsx/LICENSE.txt +30 -0
  317. package/.agents/skills/xlsx/SKILL.md +292 -0
  318. package/.agents/skills/xlsx/scripts/office/helpers/__init__.py +0 -0
  319. package/.agents/skills/xlsx/scripts/office/helpers/merge_runs.py +199 -0
  320. package/.agents/skills/xlsx/scripts/office/helpers/simplify_redlines.py +197 -0
  321. package/.agents/skills/xlsx/scripts/office/pack.py +159 -0
  322. package/.agents/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
  323. package/.agents/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
  324. package/.agents/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
  325. package/.agents/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
  326. package/.agents/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
  327. package/.agents/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
  328. package/.agents/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
  329. package/.agents/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
  330. package/.agents/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
  331. package/.agents/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
  332. package/.agents/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
  333. package/.agents/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
  334. package/.agents/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
  335. package/.agents/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
  336. package/.agents/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
  337. package/.agents/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
  338. package/.agents/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
  339. package/.agents/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
  340. package/.agents/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
  341. package/.agents/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
  342. package/.agents/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
  343. package/.agents/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
  344. package/.agents/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
  345. package/.agents/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
  346. package/.agents/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
  347. package/.agents/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
  348. package/.agents/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
  349. package/.agents/skills/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
  350. package/.agents/skills/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
  351. package/.agents/skills/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
  352. package/.agents/skills/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
  353. package/.agents/skills/xlsx/scripts/office/schemas/mce/mc.xsd +75 -0
  354. package/.agents/skills/xlsx/scripts/office/schemas/microsoft/wml-2010.xsd +560 -0
  355. package/.agents/skills/xlsx/scripts/office/schemas/microsoft/wml-2012.xsd +67 -0
  356. package/.agents/skills/xlsx/scripts/office/schemas/microsoft/wml-2018.xsd +14 -0
  357. package/.agents/skills/xlsx/scripts/office/schemas/microsoft/wml-cex-2018.xsd +20 -0
  358. package/.agents/skills/xlsx/scripts/office/schemas/microsoft/wml-cid-2016.xsd +13 -0
  359. package/.agents/skills/xlsx/scripts/office/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
  360. package/.agents/skills/xlsx/scripts/office/schemas/microsoft/wml-symex-2015.xsd +8 -0
  361. package/.agents/skills/xlsx/scripts/office/soffice.py +183 -0
  362. package/.agents/skills/xlsx/scripts/office/unpack.py +132 -0
  363. package/.agents/skills/xlsx/scripts/office/validate.py +111 -0
  364. package/.agents/skills/xlsx/scripts/office/validators/__init__.py +15 -0
  365. package/.agents/skills/xlsx/scripts/office/validators/base.py +847 -0
  366. package/.agents/skills/xlsx/scripts/office/validators/docx.py +446 -0
  367. package/.agents/skills/xlsx/scripts/office/validators/pptx.py +275 -0
  368. package/.agents/skills/xlsx/scripts/office/validators/redlining.py +247 -0
  369. package/.agents/skills/xlsx/scripts/recalc.py +184 -0
  370. package/.claude/agents/reviewer.md +1 -0
  371. package/.github/agents/reviewer.md +1 -0
  372. package/.opencode/agents/reviewer.md +1 -0
  373. package/README.md +274 -169
  374. package/package.json +6 -7
  375. package/src/commands/cli/init/index.ts +2 -2
  376. package/src/commands/cli/init/scm.ts +7 -8
  377. package/src/commands/cli/workflow-command.test.ts +74 -0
  378. package/src/commands/cli/workflow.ts +7 -2
  379. package/src/scripts/bundle-configs.ts +128 -0
  380. package/src/sdk/components/compact-switcher.tsx +1 -1
  381. package/src/sdk/components/orchestrator-panel-store.ts +13 -0
  382. package/src/sdk/components/orchestrator-panel.tsx +10 -0
  383. package/src/sdk/components/statusline.tsx +13 -1
  384. package/src/sdk/providers/claude.ts +42 -0
  385. package/src/sdk/runtime/executor.ts +111 -32
  386. package/src/sdk/types.ts +7 -0
  387. package/src/sdk/workflows/builtin/ralph/claude/index.ts +132 -76
  388. package/src/sdk/workflows/builtin/ralph/copilot/index.ts +129 -71
  389. package/src/sdk/workflows/builtin/ralph/helpers/git.ts +184 -17
  390. package/src/sdk/workflows/builtin/ralph/helpers/prompts.ts +463 -79
  391. package/src/sdk/workflows/builtin/ralph/opencode/index.ts +124 -80
  392. package/src/services/system/auto-sync.ts +31 -51
  393. package/src/services/system/skills.ts +56 -60
  394. package/dist/lib/path-root-guard.d.ts +0 -4
  395. package/dist/lib/path-root-guard.d.ts.map +0 -1
  396. package/dist/sdk/components/color-utils.d.ts +0 -4
  397. package/dist/sdk/components/color-utils.d.ts.map +0 -1
  398. package/dist/sdk/components/compact-switcher.d.ts +0 -10
  399. package/dist/sdk/components/compact-switcher.d.ts.map +0 -1
  400. package/dist/sdk/components/connectors.d.ts +0 -15
  401. package/dist/sdk/components/connectors.d.ts.map +0 -1
  402. package/dist/sdk/components/connectors.test.d.ts +0 -2
  403. package/dist/sdk/components/connectors.test.d.ts.map +0 -1
  404. package/dist/sdk/components/edge.d.ts +0 -4
  405. package/dist/sdk/components/edge.d.ts.map +0 -1
  406. package/dist/sdk/components/error-boundary.d.ts +0 -23
  407. package/dist/sdk/components/error-boundary.d.ts.map +0 -1
  408. package/dist/sdk/components/graph-theme.d.ts +0 -17
  409. package/dist/sdk/components/graph-theme.d.ts.map +0 -1
  410. package/dist/sdk/components/header.d.ts +0 -3
  411. package/dist/sdk/components/header.d.ts.map +0 -1
  412. package/dist/sdk/components/hooks.d.ts +0 -15
  413. package/dist/sdk/components/hooks.d.ts.map +0 -1
  414. package/dist/sdk/components/layout.d.ts +0 -27
  415. package/dist/sdk/components/layout.d.ts.map +0 -1
  416. package/dist/sdk/components/layout.test.d.ts +0 -2
  417. package/dist/sdk/components/layout.test.d.ts.map +0 -1
  418. package/dist/sdk/components/node-card.d.ts +0 -10
  419. package/dist/sdk/components/node-card.d.ts.map +0 -1
  420. package/dist/sdk/components/orchestrator-panel-contexts.d.ts +0 -16
  421. package/dist/sdk/components/orchestrator-panel-contexts.d.ts.map +0 -1
  422. package/dist/sdk/components/orchestrator-panel-store.d.ts +0 -46
  423. package/dist/sdk/components/orchestrator-panel-store.d.ts.map +0 -1
  424. package/dist/sdk/components/orchestrator-panel-store.test.d.ts +0 -2
  425. package/dist/sdk/components/orchestrator-panel-store.test.d.ts.map +0 -1
  426. package/dist/sdk/components/orchestrator-panel-types.d.ts +0 -18
  427. package/dist/sdk/components/orchestrator-panel-types.d.ts.map +0 -1
  428. package/dist/sdk/components/orchestrator-panel.d.ts +0 -52
  429. package/dist/sdk/components/orchestrator-panel.d.ts.map +0 -1
  430. package/dist/sdk/components/session-graph-panel.d.ts +0 -7
  431. package/dist/sdk/components/session-graph-panel.d.ts.map +0 -1
  432. package/dist/sdk/components/status-helpers.d.ts +0 -6
  433. package/dist/sdk/components/status-helpers.d.ts.map +0 -1
  434. package/dist/sdk/components/statusline.d.ts +0 -7
  435. package/dist/sdk/components/statusline.d.ts.map +0 -1
  436. package/dist/sdk/components/workflow-picker-panel.d.ts +0 -123
  437. package/dist/sdk/components/workflow-picker-panel.d.ts.map +0 -1
  438. package/dist/sdk/define-workflow.d.ts +0 -78
  439. package/dist/sdk/define-workflow.d.ts.map +0 -1
  440. package/dist/sdk/define-workflow.test.d.ts +0 -2
  441. package/dist/sdk/define-workflow.test.d.ts.map +0 -1
  442. package/dist/sdk/errors.d.ts +0 -24
  443. package/dist/sdk/errors.d.ts.map +0 -1
  444. package/dist/sdk/errors.test.d.ts +0 -2
  445. package/dist/sdk/errors.test.d.ts.map +0 -1
  446. package/dist/sdk/index.d.ts +0 -13
  447. package/dist/sdk/index.d.ts.map +0 -1
  448. package/dist/sdk/providers/claude.d.ts +0 -170
  449. package/dist/sdk/providers/claude.d.ts.map +0 -1
  450. package/dist/sdk/providers/copilot.d.ts +0 -11
  451. package/dist/sdk/providers/copilot.d.ts.map +0 -1
  452. package/dist/sdk/providers/opencode.d.ts +0 -11
  453. package/dist/sdk/providers/opencode.d.ts.map +0 -1
  454. package/dist/sdk/runtime/discovery.d.ts +0 -86
  455. package/dist/sdk/runtime/discovery.d.ts.map +0 -1
  456. package/dist/sdk/runtime/executor-entry.d.ts +0 -11
  457. package/dist/sdk/runtime/executor-entry.d.ts.map +0 -1
  458. package/dist/sdk/runtime/executor.d.ts +0 -72
  459. package/dist/sdk/runtime/executor.d.ts.map +0 -1
  460. package/dist/sdk/runtime/executor.test.d.ts +0 -2
  461. package/dist/sdk/runtime/executor.test.d.ts.map +0 -1
  462. package/dist/sdk/runtime/graph-inference.d.ts +0 -35
  463. package/dist/sdk/runtime/graph-inference.d.ts.map +0 -1
  464. package/dist/sdk/runtime/loader.d.ts +0 -70
  465. package/dist/sdk/runtime/loader.d.ts.map +0 -1
  466. package/dist/sdk/runtime/panel.d.ts +0 -9
  467. package/dist/sdk/runtime/panel.d.ts.map +0 -1
  468. package/dist/sdk/runtime/theme.d.ts +0 -28
  469. package/dist/sdk/runtime/theme.d.ts.map +0 -1
  470. package/dist/sdk/runtime/tmux.d.ts +0 -297
  471. package/dist/sdk/runtime/tmux.d.ts.map +0 -1
  472. package/dist/sdk/types.d.ts +0 -295
  473. package/dist/sdk/types.d.ts.map +0 -1
  474. package/dist/sdk/workflows/builtin/deep-research-codebase/claude/index.d.ts +0 -62
  475. package/dist/sdk/workflows/builtin/deep-research-codebase/claude/index.d.ts.map +0 -1
  476. package/dist/sdk/workflows/builtin/deep-research-codebase/copilot/index.d.ts +0 -46
  477. package/dist/sdk/workflows/builtin/deep-research-codebase/copilot/index.d.ts.map +0 -1
  478. package/dist/sdk/workflows/builtin/deep-research-codebase/helpers/heuristic.d.ts +0 -26
  479. package/dist/sdk/workflows/builtin/deep-research-codebase/helpers/heuristic.d.ts.map +0 -1
  480. package/dist/sdk/workflows/builtin/deep-research-codebase/helpers/prompts.d.ts +0 -92
  481. package/dist/sdk/workflows/builtin/deep-research-codebase/helpers/prompts.d.ts.map +0 -1
  482. package/dist/sdk/workflows/builtin/deep-research-codebase/helpers/scout.d.ts +0 -57
  483. package/dist/sdk/workflows/builtin/deep-research-codebase/helpers/scout.d.ts.map +0 -1
  484. package/dist/sdk/workflows/builtin/deep-research-codebase/opencode/index.d.ts +0 -49
  485. package/dist/sdk/workflows/builtin/deep-research-codebase/opencode/index.d.ts.map +0 -1
  486. package/dist/sdk/workflows/builtin/ralph/claude/index.d.ts +0 -14
  487. package/dist/sdk/workflows/builtin/ralph/claude/index.d.ts.map +0 -1
  488. package/dist/sdk/workflows/builtin/ralph/copilot/index.d.ts +0 -14
  489. package/dist/sdk/workflows/builtin/ralph/copilot/index.d.ts.map +0 -1
  490. package/dist/sdk/workflows/builtin/ralph/helpers/git.d.ts +0 -17
  491. package/dist/sdk/workflows/builtin/ralph/helpers/git.d.ts.map +0 -1
  492. package/dist/sdk/workflows/builtin/ralph/helpers/prompts.d.ts +0 -119
  493. package/dist/sdk/workflows/builtin/ralph/helpers/prompts.d.ts.map +0 -1
  494. package/dist/sdk/workflows/builtin/ralph/helpers/review.d.ts +0 -20
  495. package/dist/sdk/workflows/builtin/ralph/helpers/review.d.ts.map +0 -1
  496. package/dist/sdk/workflows/builtin/ralph/opencode/index.d.ts +0 -14
  497. package/dist/sdk/workflows/builtin/ralph/opencode/index.d.ts.map +0 -1
  498. package/dist/sdk/workflows/index.d.ts +0 -24
  499. package/dist/sdk/workflows/index.d.ts.map +0 -1
  500. package/dist/services/config/definitions.d.ts +0 -85
  501. package/dist/services/config/definitions.d.ts.map +0 -1
  502. package/dist/services/system/copy.d.ts +0 -77
  503. package/dist/services/system/copy.d.ts.map +0 -1
  504. package/dist/services/system/detect.d.ts +0 -75
  505. package/dist/services/system/detect.d.ts.map +0 -1
  506. package/tsconfig.json +0 -33
@@ -0,0 +1,271 @@
1
+ ---
2
+ name: tool-design
3
+ description: This skill should be used when the user asks to "design agent tools", "create tool descriptions", "reduce tool complexity", "implement MCP tools", or mentions tool consolidation, architectural reduction, tool naming conventions, or agent-tool interfaces. Part of the context engineering skill suite — also activates when the user mentions "context engineering" or "context-engineering" in the context of designing tools that shape how agents receive and process context.
4
+ ---
5
+
6
+ # Tool Design for Agents
7
+
8
+ Design every tool as a contract between a deterministic system and a non-deterministic agent. Unlike human-facing APIs, agent-facing tools must make the contract unambiguous through the description alone -- agents infer intent from descriptions and generate calls that must match expected formats. Every ambiguity becomes a potential failure mode that no amount of prompt engineering can fix.
9
+
10
+ ## When to Activate
11
+
12
+ Activate this skill when:
13
+ - Creating new tools for agent systems
14
+ - Debugging tool-related failures or misuse
15
+ - Optimizing existing tool sets for better agent performance
16
+ - Designing tool APIs from scratch
17
+ - Evaluating third-party tools for agent integration
18
+ - Standardizing tool conventions across a codebase
19
+
20
+ ## Core Concepts
21
+
22
+ Design tools around the consolidation principle: if a human engineer cannot definitively say which tool should be used in a given situation, an agent cannot be expected to do better. Reduce the tool set until each tool has one unambiguous purpose, because agents select tools by comparing descriptions and any overlap introduces selection errors.
23
+
24
+ Treat every tool description as prompt engineering that shapes agent behavior. The description is not documentation for humans -- it is injected into the agent's context and directly steers reasoning. Write descriptions that answer what the tool does, when to use it, and what it returns, because these three questions are exactly what agents evaluate during tool selection.
25
+
26
+ ## Detailed Topics
27
+
28
+ ### The Tool-Agent Interface
29
+
30
+ **Tools as Contracts**
31
+ Design each tool as a self-contained contract. When humans call APIs, they read docs, understand conventions, and make appropriate requests. Agents must infer the entire contract from a single description block. Make the contract unambiguous by including format examples, expected patterns, and explicit constraints. Omit nothing that a caller needs to know, because agents cannot ask clarifying questions before making a call.
32
+
33
+ **Tool Description as Prompt**
34
+ Write tool descriptions knowing they load directly into agent context and collectively steer behavior. A vague description like "Search the database" with cryptic parameter names forces the agent to guess -- and guessing produces incorrect calls. Instead, include usage context, parameter format examples, and sensible defaults. Every word in the description either helps or hurts tool selection accuracy.
35
+
36
+ **Namespacing and Organization**
37
+ Namespace tools under common prefixes as the collection grows, because agents benefit from hierarchical grouping. When an agent needs database operations, it routes to the `db_*` namespace; when it needs web interactions, it routes to `web_*`. Without namespacing, agents must evaluate every tool in a flat list, which degrades selection accuracy as the count grows.
38
+
39
+ ### The Consolidation Principle
40
+
41
+ **Single Comprehensive Tools**
42
+ Build single comprehensive tools instead of multiple narrow tools that overlap. Rather than implementing `list_users`, `list_events`, and `create_event` separately, implement `schedule_event` that finds availability and schedules in one call. The comprehensive tool handles the full workflow internally, removing the agent's burden of chaining calls in the correct order.
43
+
44
+ **Why Consolidation Works**
45
+ Apply consolidation because agents have limited context and attention. Each tool in the collection competes for attention during tool selection, each description consumes context budget tokens, and overlapping functionality creates ambiguity. Consolidation eliminates redundant descriptions, removes selection ambiguity, and shrinks the effective tool set. Vercel demonstrated this principle by reducing their agent from 17 specialized tools to 2 general-purpose tools and achieving better performance -- fewer tools meant less confusion and more reliable tool selection.
46
+
47
+ **When Not to Consolidate**
48
+ Keep tools separate when they have fundamentally different behaviors, serve different contexts, or must be callable independently. Over-consolidation creates a different problem: a single tool with too many parameters and modes becomes hard for agents to parameterize correctly.
49
+
50
+ ### Architectural Reduction
51
+
52
+ Push the consolidation principle to its logical extreme by removing most specialized tools in favor of primitive, general-purpose capabilities. Production evidence shows this approach can outperform sophisticated multi-tool architectures.
53
+
54
+ **The File System Agent Pattern**
55
+ Provide direct file system access through a single command execution tool instead of building custom tools for data exploration, schema lookup, and query validation. The agent uses standard Unix utilities (grep, cat, find, ls) to explore and operate on the system. This works because file systems are a proven abstraction that models understand deeply, standard tools have predictable behavior, agents can chain primitives flexibly rather than being constrained to predefined workflows, and good documentation in files replaces summarization tools.
56
+
57
+ **When Reduction Outperforms Complexity**
58
+ Choose reduction when the data layer is well-documented and consistently structured, the model has sufficient reasoning capability, specialized tools were constraining rather than enabling the model, or more time is spent maintaining scaffolding than improving outcomes. Avoid reduction when underlying data is messy or poorly documented, the domain requires specialized knowledge the model lacks, safety constraints must limit agent actions, or operations genuinely benefit from structured workflows.
59
+
60
+ **Build for Future Models**
61
+ Design minimal architectures that benefit from model improvements rather than sophisticated architectures that lock in current limitations. Ask whether each tool enables new capabilities or constrains reasoning the model could handle on its own -- tools built as "guardrails" often become liabilities as models improve.
62
+
63
+ See [Architectural Reduction Case Study](./references/architectural_reduction.md) for production evidence.
64
+
65
+ ### Tool Description Engineering
66
+
67
+ **Description Structure**
68
+ Structure every tool description to answer four questions:
69
+
70
+ 1. What does the tool do? State exactly what the tool accomplishes -- avoid vague language like "helps with" or "can be used for."
71
+ 2. When should it be used? Specify direct triggers ("User asks about pricing") and indirect signals ("Need current market rates").
72
+ 3. What inputs does it accept? Describe each parameter with types, constraints, defaults, and format examples.
73
+ 4. What does it return? Document the output format, structure, successful response examples, and error conditions.
74
+
75
+ **Default Parameter Selection**
76
+ Set defaults to reflect common use cases. Defaults reduce agent burden by eliminating unnecessary parameter specification and prevent errors from omitted parameters. Choose defaults that produce useful results without requiring the agent to understand every option.
77
+
78
+ ### Response Format Optimization
79
+
80
+ Offer response format options (concise vs. detailed) because tool response size significantly impacts context usage. Concise format returns essential fields only, suitable for confirmations. Detailed format returns complete objects, suitable when full context drives decisions. Document when to use each format in the tool description so agents learn to select appropriately.
81
+
82
+ ### Error Message Design
83
+
84
+ Design error messages for two audiences: developers debugging issues and agents recovering from failures. For agents, every error message must be actionable -- it must state what went wrong and how to correct it. Include retry guidance for retryable errors, corrected format examples for input errors, and specific missing fields for incomplete requests. An error that says only "failed" provides zero recovery signal.
85
+
86
+ ### Tool Definition Schema
87
+
88
+ Establish a consistent schema across all tools. Use verb-noun pattern for tool names (`get_customer`, `create_order`), consistent parameter names across tools (always `customer_id`, never sometimes `id` and sometimes `identifier`), and consistent return field names. Consistency reduces the cognitive load on agents and improves cross-tool generalization.
89
+
90
+ ### Tool Collection Design
91
+
92
+ Limit tool collections to 10-20 tools for most applications, because research shows description overlap causes model confusion and more tools do not always lead to better outcomes. When more tools are genuinely needed, use namespacing to create logical groupings. Implement selection mechanisms: tool grouping by domain, example-based selection hints, and umbrella tools that route to specialized sub-tools.
93
+
94
+ ### MCP Tool Naming Requirements
95
+
96
+ Always use fully qualified tool names with MCP (Model Context Protocol) to avoid "tool not found" errors.
97
+
98
+ Format: `ServerName:tool_name`
99
+
100
+ ```python
101
+ # Correct: Fully qualified names
102
+ "Use the BigQuery:bigquery_schema tool to retrieve table schemas."
103
+ "Use the GitHub:create_issue tool to create issues."
104
+
105
+ # Incorrect: Unqualified names
106
+ "Use the bigquery_schema tool..." # May fail with multiple servers
107
+ ```
108
+
109
+ Without the server prefix, agents may fail to locate tools when multiple MCP servers are available. Establish naming conventions that include server context in all tool references.
110
+
111
+ ### Using Agents to Optimize Tools
112
+
113
+ Feed observed tool failures back to an agent to diagnose issues and improve descriptions. Production testing shows this approach achieves 40% reduction in task completion time by helping future agents avoid mistakes.
114
+
115
+ **The Tool-Testing Agent Pattern**:
116
+
117
+ ```python
118
+ def optimize_tool_description(tool_spec, failure_examples):
119
+ """
120
+ Use an agent to analyze tool failures and improve descriptions.
121
+
122
+ Process:
123
+ 1. Agent attempts to use tool across diverse tasks
124
+ 2. Collect failure modes and friction points
125
+ 3. Agent analyzes failures and proposes improvements
126
+ 4. Test improved descriptions against same tasks
127
+ """
128
+ prompt = f"""
129
+ Analyze this tool specification and the observed failures.
130
+
131
+ Tool: {tool_spec}
132
+
133
+ Failures observed:
134
+ {failure_examples}
135
+
136
+ Identify:
137
+ 1. Why agents are failing with this tool
138
+ 2. What information is missing from the description
139
+ 3. What ambiguities cause incorrect usage
140
+
141
+ Propose an improved tool description that addresses these issues.
142
+ """
143
+
144
+ return get_agent_response(prompt)
145
+ ```
146
+
147
+ This creates a feedback loop: agents using tools generate failure data, which agents then use to improve tool descriptions, which reduces future failures.
148
+
149
+ ### Testing Tool Design
150
+
151
+ Evaluate tool designs against five criteria: unambiguity, completeness, recoverability, efficiency, and consistency. Test by presenting representative agent requests and evaluating the resulting tool calls against expected behavior.
152
+
153
+ ## Practical Guidance
154
+
155
+ ### Tool Selection Framework
156
+
157
+ When designing tool collections:
158
+ 1. Identify distinct workflows agents must accomplish
159
+ 2. Group related actions into comprehensive tools
160
+ 3. Ensure each tool has a clear, unambiguous purpose
161
+ 4. Document error cases and recovery paths
162
+ 5. Test with actual agent interactions
163
+
164
+ ## Examples
165
+
166
+ **Example 1: Well-Designed Tool**
167
+ ```python
168
+ def get_customer(customer_id: str, format: str = "concise"):
169
+ """
170
+ Retrieve customer information by ID.
171
+
172
+ Use when:
173
+ - User asks about specific customer details
174
+ - Need customer context for decision-making
175
+ - Verifying customer identity
176
+
177
+ Args:
178
+ customer_id: Format "CUST-######" (e.g., "CUST-000001")
179
+ format: "concise" for key fields, "detailed" for complete record
180
+
181
+ Returns:
182
+ Customer object with requested fields
183
+
184
+ Errors:
185
+ NOT_FOUND: Customer ID not found
186
+ INVALID_FORMAT: ID must match CUST-###### pattern
187
+ """
188
+ ```
189
+
190
+ **Example 2: Poor Tool Design**
191
+
192
+ This example demonstrates several tool design anti-patterns:
193
+
194
+ ```python
195
+ def search(query):
196
+ """Search the database."""
197
+ pass
198
+ ```
199
+
200
+ **Problems with this design:**
201
+
202
+ 1. **Vague name**: "search" is ambiguous - search what, for what purpose?
203
+ 2. **Missing parameters**: What database? What format should query take?
204
+ 3. **No return description**: What does this function return? A list? A string? Error handling?
205
+ 4. **No usage context**: When should an agent use this versus other tools?
206
+ 5. **No error handling**: What happens if the database is unavailable?
207
+
208
+ **Failure modes:**
209
+ - Agents may call this tool when they should use a more specific tool
210
+ - Agents cannot determine correct query format
211
+ - Agents cannot interpret results
212
+ - Agents cannot recover from failures
213
+
214
+ ## Guidelines
215
+
216
+ 1. Write descriptions that answer what, when, and what returns
217
+ 2. Use consolidation to reduce ambiguity
218
+ 3. Implement response format options for token efficiency
219
+ 4. Design error messages for agent recovery
220
+ 5. Establish and follow consistent naming conventions
221
+ 6. Limit tool count and use namespacing for organization
222
+ 7. Test tool designs with actual agent interactions
223
+ 8. Iterate based on observed failure modes
224
+ 9. Question whether each tool enables or constrains the model
225
+ 10. Prefer primitive, general-purpose tools over specialized wrappers
226
+ 11. Invest in documentation quality over tooling sophistication
227
+ 12. Build minimal architectures that benefit from model improvements
228
+
229
+ ## Gotchas
230
+
231
+ 1. **Vague descriptions**: Descriptions like "Search the database for customer information" leave too many questions unanswered. State the exact database, query format, and return shape.
232
+ 2. **Cryptic parameter names**: Parameters named `x`, `val`, or `param1` force agents to guess meaning. Use descriptive names that convey purpose without reading further documentation.
233
+ 3. **Missing error recovery guidance**: Tools that fail with generic messages like "Error occurred" provide no recovery signal. Every error response must tell the agent what went wrong and what to try next.
234
+ 4. **Inconsistent naming across tools**: Using `id` in one tool, `identifier` in another, and `customer_id` in a third creates confusion. Standardize parameter names across the entire tool collection.
235
+ 5. **MCP namespace collisions**: When multiple MCP tool providers register tools with similar names (e.g., two servers both exposing `search`), agents cannot disambiguate. Always use fully qualified `ServerName:tool_name` format and audit for collisions when adding new providers.
236
+ 6. **Tool description rot**: Descriptions become inaccurate as underlying APIs evolve -- parameters get added, return formats change, error codes shift. Treat descriptions as code: version them, review them during API changes, and test them against current behavior.
237
+ 7. **Over-consolidation**: Making a single tool handle too many workflows produces parameter lists so large that agents struggle to select the right combination. If a tool requires more than 8-10 parameters or serves fundamentally different use cases, split it.
238
+ 8. **Parameter explosion**: Too many optional parameters overwhelm agent decision-making. Each parameter the agent must evaluate adds cognitive load. Provide sensible defaults, group related options into format presets, and move rarely-used parameters into an `options` object.
239
+ 9. **Missing error context**: Error messages that say only "failed" or "invalid input" without specifying which input, why it failed, or what a valid input looks like leave agents unable to self-correct. Include the invalid value, the expected format, and a concrete example in every error response.
240
+
241
+ ## Integration
242
+
243
+ This skill connects to:
244
+ - context-fundamentals - How tools interact with context
245
+ - multi-agent-patterns - Specialized tools per agent
246
+ - evaluation - Evaluating tool effectiveness
247
+
248
+ ## References
249
+
250
+ Internal references:
251
+ - [Best Practices Reference](./references/best_practices.md) - Read when: designing a new tool from scratch or auditing an existing tool collection for quality gaps
252
+ - [Architectural Reduction Case Study](./references/architectural_reduction.md) - Read when: considering removing specialized tools in favor of primitives, or evaluating whether a complex tool architecture is justified
253
+
254
+ Related skills in this collection:
255
+ - context-fundamentals - Tool context interactions
256
+ - evaluation - Tool testing patterns
257
+
258
+ External resources:
259
+ - MCP (Model Context Protocol) documentation - Read when: implementing tools for multi-server agent environments or debugging tool routing failures
260
+ - Framework tool conventions - Read when: adopting a new agent framework and need to map tool design principles to framework-specific APIs
261
+ - API design best practices for agents - Read when: translating existing human-facing APIs into agent-facing tool interfaces
262
+ - Vercel d0 agent architecture case study - Read when: evaluating whether to consolidate tools or seeking production evidence for architectural reduction
263
+
264
+ ---
265
+
266
+ ## Skill Metadata
267
+
268
+ **Created**: 2025-12-20
269
+ **Last Updated**: 2026-03-17
270
+ **Author**: Agent Skills for Context Engineering Contributors
271
+ **Version**: 2.0.0
@@ -0,0 +1,210 @@
1
+ # Architectural Reduction: Production Evidence
2
+
3
+ This document provides detailed evidence and implementation patterns for the architectural reduction approach to agent tool design.
4
+
5
+ ## Case Study: Text-to-SQL Agent
6
+
7
+ A production text-to-SQL agent was rebuilt using architectural reduction principles. The original architecture used specialized tools with heavy prompt engineering and careful context management. The reduced architecture used a single bash command execution tool.
8
+
9
+ ### Original Architecture (Many Specialized Tools)
10
+
11
+ The original system included:
12
+ - GetEntityJoins: Find relationships between entities
13
+ - LoadCatalog: Load data catalog information
14
+ - RecallContext: Retrieve previous context
15
+ - LoadEntityDetails: Get entity specifications
16
+ - SearchCatalog: Search data catalog
17
+ - ClarifyIntent: Clarify user intent
18
+ - SearchSchema: Search database schema
19
+ - GenerateAnalysisPlan: Create query plan
20
+ - FinalizeQueryPlan: Complete query plan
21
+ - FinalizeNoData: Handle no-data cases
22
+ - JoinPathFinder: Find join paths
23
+ - SyntaxValidator: Validate SQL syntax
24
+ - FinalizeBuild: Complete query build
25
+ - ExecuteSQL: Run SQL queries
26
+ - FormatResults: Format query results
27
+ - VisualizeData: Create visualizations
28
+ - ExplainResults: Explain query results
29
+
30
+ Each tool solved a specific problem the team anticipated the model would face. The assumption was that the model would get lost in complex schemas, make bad joins, or hallucinate table names.
31
+
32
+ ### Reduced Architecture (Two Primitive Tools)
33
+
34
+ The reduced system included:
35
+ - ExecuteCommand: Run arbitrary bash commands in a sandbox
36
+ - ExecuteSQL: Run SQL queries against the database
37
+
38
+ The agent explores the semantic layer using standard Unix tools:
39
+
40
+ ```python
41
+ from vercel_sandbox import Sandbox
42
+
43
+ sandbox = Sandbox.create()
44
+ await sandbox.write_files(semantic_layer_files)
45
+
46
+ def execute_command(command: str):
47
+ """Execute arbitrary bash command in sandbox."""
48
+ result = sandbox.exec(command)
49
+ return {
50
+ "stdout": result.stdout,
51
+ "stderr": result.stderr,
52
+ "exit_code": result.exit_code
53
+ }
54
+ ```
55
+
56
+ The agent now uses `grep`, `cat`, `find`, and `ls` to navigate YAML, Markdown, and JSON files containing dimension definitions, measure calculations, and join relationships.
57
+
58
+ ### Comparative Results
59
+
60
+ | Metric | Original (17 tools) | Reduced (2 tools) | Change |
61
+ |--------|---------------------|-------------------|--------|
62
+ | Average execution time | 274.8s | 77.4s | 3.5x faster |
63
+ | Success rate | 80% (4/5) | 100% (5/5) | +20% |
64
+ | Average token usage | ~102k tokens | ~61k tokens | 37% fewer |
65
+ | Average steps | ~12 steps | ~7 steps | 42% fewer |
66
+
67
+ The worst case in the original architecture: 724 seconds, 100 steps, 145,463 tokens, and a failure. The reduced architecture completed the same query in 141 seconds with 19 steps and 67,483 tokens, successfully.
68
+
69
+ ## Why Reduction Works
70
+
71
+ ### File Systems Are Powerful Abstractions
72
+
73
+ File systems have 50+ years of refinement. Standard Unix tools like `grep` are well-documented, predictable, and understood by models. Building custom tools for what Unix already solves adds complexity without value.
74
+
75
+ ### Tools Were Constraining Reasoning
76
+
77
+ The specialized tools were solving problems the model could handle on its own:
78
+ - Pre-filtering context the model could navigate
79
+ - Constraining options the model could evaluate
80
+ - Wrapping interactions in validation logic the model didn't need
81
+
82
+ Each guardrail became a maintenance burden. Each model update required recalibrating constraints. The team spent more time maintaining scaffolding than improving the agent.
83
+
84
+ ### Good Documentation Replaces Tool Sophistication
85
+
86
+ The semantic layer was already well-documented:
87
+ - Dimension definitions in structured YAML
88
+ - Measure calculations with clear naming
89
+ - Join relationships in navigable files
90
+
91
+ The custom tools were summarizing what was already legible. The model needed access to read the documentation directly, not abstractions on top of it.
92
+
93
+ ## Implementation Pattern
94
+
95
+ ### The File System Agent
96
+
97
+ ```python
98
+ from ai import ToolLoopAgent, tool
99
+ from sandbox import Sandbox
100
+
101
+ # Create sandboxed environment with your data layer
102
+ sandbox = Sandbox.create()
103
+ await sandbox.write_files(data_layer_files)
104
+
105
+ # Single primitive tool
106
+ def create_execute_tool(sandbox):
107
+ return tool(
108
+ name="execute_command",
109
+ description="""
110
+ Execute a bash command in the sandbox environment.
111
+
112
+ Use standard Unix tools to explore and understand the data layer:
113
+ - ls: List directory contents
114
+ - cat: Read file contents
115
+ - grep: Search for patterns
116
+ - find: Locate files
117
+
118
+ The sandbox contains the semantic layer documentation:
119
+ - /data/entities/*.yaml: Entity definitions
120
+ - /data/measures/*.yaml: Measure calculations
121
+ - /data/joins/*.yaml: Join relationships
122
+ - /docs/*.md: Additional documentation
123
+ """,
124
+ execute=lambda command: sandbox.exec(command)
125
+ )
126
+
127
+ # Minimal agent
128
+ agent = ToolLoopAgent(
129
+ model="claude-opus-4.5",
130
+ tools={
131
+ "execute_command": create_execute_tool(sandbox),
132
+ "execute_sql": sql_tool,
133
+ }
134
+ )
135
+ ```
136
+
137
+ ### Prerequisites for Success
138
+
139
+ This pattern works when:
140
+
141
+ 1. **Documentation quality is high**: Files are well-structured, consistently named, and contain clear definitions.
142
+
143
+ 2. **Model capability is sufficient**: The model can reason through complexity without hand-holding.
144
+
145
+ 3. **Safety constraints permit**: The sandbox limits what the agent can access and modify.
146
+
147
+ 4. **Domain is navigable**: The problem space can be explored through file inspection.
148
+
149
+ ### When Not to Use
150
+
151
+ Reduction fails when:
152
+
153
+ 1. **Data layer is messy**: Legacy naming conventions, undocumented joins, inconsistent structure. The model will produce faster bad queries.
154
+
155
+ 2. **Specialized knowledge is required**: Domain expertise that can't be documented in files.
156
+
157
+ 3. **Safety requires restrictions**: Operations that must be constrained for security or compliance.
158
+
159
+ 4. **Workflows are genuinely complex**: Multi-step processes that benefit from structured orchestration.
160
+
161
+ ## Design Principles
162
+
163
+ ### Addition by Subtraction
164
+
165
+ The best agents may be the ones with the fewest tools. Every tool is a choice made for the model. Sometimes the model makes better choices when given primitive capabilities rather than constrained workflows.
166
+
167
+ ### Trust Model Reasoning
168
+
169
+ Modern models can handle complexity. Constraining reasoning because you don't trust the model to reason is often counterproductive. Test what the model can actually do before building guardrails.
170
+
171
+ ### Invest in Context, Not Tooling
172
+
173
+ The foundation matters more than clever tooling:
174
+ - Clear file naming conventions
175
+ - Well-structured documentation
176
+ - Consistent data organization
177
+ - Legible relationship definitions
178
+
179
+ ### Build for Future Models
180
+
181
+ Models improve faster than tooling can keep up. An architecture optimized for today's model limitations may be over-constrained for tomorrow's model capabilities. Build minimal architectures that benefit from model improvements.
182
+
183
+ ## Evaluation Framework
184
+
185
+ When considering architectural reduction, evaluate:
186
+
187
+ 1. **Maintenance overhead**: How much time is spent maintaining tools vs. improving outcomes?
188
+
189
+ 2. **Failure analysis**: Are failures caused by model limitations or tool constraints?
190
+
191
+ 3. **Documentation quality**: Could the model navigate your data layer directly if given access?
192
+
193
+ 4. **Constraint necessity**: Are guardrails protecting against real risks or hypothetical concerns?
194
+
195
+ 5. **Model capability**: Has the model improved since tools were designed?
196
+
197
+ ## Conclusion
198
+
199
+ Architectural reduction is not universally applicable, but the principle challenges a common assumption: that more sophisticated tooling leads to better outcomes. Sometimes the opposite is true. Start with the simplest possible architecture, add complexity only when proven necessary, and continuously question whether tools are enabling or constraining model capabilities.
200
+
201
+ ## References
202
+
203
+ - Vercel Engineering: "We removed 80% of our agent's tools" (December 2025)
204
+ - AI SDK ToolLoopAgent documentation
205
+ - Vercel Sandbox documentation
206
+
207
+
208
+
209
+
210
+
@@ -0,0 +1,176 @@
1
+ # Tool Design Best Practices
2
+
3
+ This document provides additional best practices and guidelines for designing tools for agent systems.
4
+
5
+ ## Tool Philosophy
6
+
7
+ Tools are the primary interface between agents and the world. Unlike traditional APIs designed for developers who understand underlying systems, tools must be designed for language models that infer intent from descriptions and generate calls from natural language requests. This fundamental difference requires rethinking how we design and document tool interfaces.
8
+
9
+ The goal is to create tools that agents can discover, understand, and use correctly without extensive trial and error. Every ambiguity in tool definitions becomes a potential failure mode. Every unclear parameter name forces the agent to guess. Every missing example leaves the agent without guidance for edge cases.
10
+
11
+ ## Description Engineering Principles
12
+
13
+ ### Principle 1: Answer the Fundamental Questions
14
+
15
+ Every tool description should clearly answer four questions. What does the tool do? State exactly what the tool accomplishes in specific terms, avoiding vague language like "helps with" or "can be used for." When should it be used? Provide specific triggers and contexts, including both direct triggers and indirect signals that indicate the tool's applicability. What inputs does it accept? Document parameters with types, constraints, and defaults, explaining what each parameter controls. What does it return? Describe output format and structure, including examples of successful responses and error conditions.
16
+
17
+ ### Principle 2: Use Consistent Structure
18
+
19
+ Maintain consistent structure across all tool descriptions in your codebase. When agents encounter a new tool, they should be able to predict where to find specific information based on patterns learned from other tools. This reduces cognitive overhead and prevents errors caused by inconsistent formatting.
20
+
21
+ A recommended structure includes a brief description in the first sentence, a detailed explanation with usage context, a parameters section with clear type information, a returns section describing output structure, and an errors section listing possible failure modes with recovery guidance.
22
+
23
+ ### Principle 3: Include Concrete Examples
24
+
25
+ Examples bridge the gap between abstract description and actual usage. Include examples of typical calls showing common parameter combinations, examples of edge cases and how to handle them, and examples of error responses and appropriate recovery actions.
26
+
27
+ Good examples are specific rather than generic. Instead of "Use an ID like '123'", use "Use format: 'CUST-######' (e.g., 'CUST-000001')". Instead of "Provide a date", use "Format: 'YYYY-MM-DD' (e.g., '2024-01-15')".
28
+
29
+ ## Naming Conventions
30
+
31
+ ### Parameter Naming
32
+
33
+ Parameter names should be self-documenting. Use names that clearly indicate purpose without requiring additional explanation. Prefer full words over abbreviations except for widely understood acronyms like "id" or "url". Use consistent naming across tools for similar concepts.
34
+
35
+ Good parameter names include customer_id, search_query, output_format, max_results, and include_details. Poor parameter names include x, val, param1, and info.
36
+
37
+ ### Enumeration Values
38
+
39
+ When parameters accept enumerated values, use consistent naming across all tools. For boolean-style options, use prefix patterns like "include_" for affirmative options (include_history, include_metadata) and "exclude_" for negative options (exclude_archived, exclude_inactive). For categorical values, use consistent terminology like "format": "concise" | "detailed" rather than mixing "format": "short" | "long" in some tools and "format": "brief" | "complete" in others.
40
+
41
+ ## Error Message Design
42
+
43
+ ### The Dual Audience
44
+
45
+ Error messages serve two audiences with different needs. Developers debugging issues need detailed technical information including stack traces and internal state. Agents recovering from failures need actionable guidance that tells them what went wrong and how to correct it.
46
+
47
+ Design error messages with agent recovery as the primary consideration. Include what specifically went wrong in clear language. Provide resolution guidance describing what the agent should do next. Include corrected format for input errors. Add examples of valid input.
48
+
49
+ ### Error Message Structure
50
+
51
+ ```json
52
+ {
53
+ "error": {
54
+ "code": "INVALID_CUSTOMER_ID",
55
+ "category": "validation",
56
+ "message": "Customer ID 'CUST-123' does not match required format",
57
+ "expected_format": {
58
+ "description": "Customer ID must be 9 characters",
59
+ "pattern": "CUST-######",
60
+ "example": "CUST-000001"
61
+ },
62
+ "resolution": "Provide a customer ID matching pattern CUST-######",
63
+ "retryable": true
64
+ }
65
+ }
66
+ ```
67
+
68
+ ### Common Error Patterns
69
+
70
+ Validation errors should specify what was received, what format was expected, and how to correct it. Rate limit errors should specify wait time and retry guidance. Not found errors should suggest alternative approaches or verification steps. System errors should indicate whether retry is appropriate and suggest alternatives.
71
+
72
+ ## Response Format Optimization
73
+
74
+ ### The Token-Accuracy Trade-off
75
+
76
+ Verbose responses provide comprehensive information but consume significant context tokens. Concise responses minimize token usage but may lack necessary detail. The optimal approach provides format options that allow agents to request appropriate verbosity for their needs.
77
+
78
+ ### Format Options Pattern
79
+
80
+ ```python
81
+ def get_customer_response(format: str = "concise"):
82
+ """
83
+ Retrieve customer information.
84
+
85
+ Args:
86
+ format: Response format - 'concise' for key fields only,
87
+ 'detailed' for complete customer record
88
+ """
89
+ if format == "concise":
90
+ return {
91
+ "id": customer.id,
92
+ "name": customer.name,
93
+ "status": customer.status
94
+ }
95
+ else: # detailed
96
+ return {
97
+ "id": customer.id,
98
+ "name": customer.name,
99
+ "email": customer.email,
100
+ "phone": customer.phone,
101
+ "address": customer.address,
102
+ "status": customer.status,
103
+ "created_at": customer.created_at,
104
+ "history": customer.history,
105
+ "preferences": customer.preferences
106
+ }
107
+ ```
108
+
109
+ ### When to Use Each Format
110
+
111
+ Use concise format for quick verification or simple lookups, when only confirmation is needed, and in subsequent tool calls after initial retrieval. Use detailed format when making decisions based on customer data, when output becomes input for other processing, and when complete context is necessary for correctness.
112
+
113
+ ## Tool Collection Design
114
+
115
+ ### Managing Tool Proliferation
116
+
117
+ As agent systems grow, tool collections tend to proliferate. More tools can enable more capabilities but create selection challenges. Research shows that tool description overlap causes model confusion. The key insight is that if a human engineer cannot definitively say which tool should be used in a given situation, an agent cannot be expected to do better.
118
+
119
+ ### Consolidation Guidelines
120
+
121
+ Consolidate tools that represent sequential steps in a single workflow into a single tool that handles the entire workflow. For example, instead of list_users, list_events, and create_event, implement schedule_event that finds availability and schedules in one call.
122
+
123
+ Keep separate tools that have fundamentally different behaviors even if they share some functionality. Tools used in different contexts should maintain separation to prevent confusion.
124
+
125
+ Maintain clear boundaries between tools even when they operate in similar domains. Overlapping functionality should be minimized through careful design.
126
+
127
+ ### Tool Selection Guidance
128
+
129
+ When designing tool collections, consider what information an agent needs to make correct selections. If multiple tools could apply to a situation, clarify the distinction in descriptions. Use namespacing to create logical groupings that help agents navigate the tool space.
130
+
131
+ ## Testing Tool Design
132
+
133
+ ### Evaluation Criteria
134
+
135
+ Evaluate tool designs against clarity, completeness, recoverability, efficiency, and consistency criteria. Clarity measures whether agents can determine when to use the tool. Completeness measures whether descriptions include all necessary information. Recoverability measures whether agents can recover from errors. Efficiency measures whether tools support appropriate response formats. Consistency measures whether tools follow naming and schema conventions.
136
+
137
+ ### Agent Testing Pattern
138
+
139
+ Test tools by presenting representative agent requests and evaluating the resulting tool calls:
140
+
141
+ 1. Prepare test cases with diverse agent requests
142
+ 2. Have an agent formulate tool calls for each request
143
+ 3. Evaluate call correctness against expected patterns
144
+ 4. Identify common failure modes
145
+ 5. Refine tool definitions based on findings
146
+
147
+ ## Anti-Patterns to Avoid
148
+
149
+ ### Vague Descriptions
150
+
151
+ Bad: "Search the database for customer information." This leaves too many questions unanswered. What database? What information is available? What format should queries take?
152
+
153
+ Good: "Retrieve customer information by ID or email. Use when user asks about specific customer details, history, or status. Returns customer object with id, name, email, account_status, and optional order history."
154
+
155
+ ### Cryptic Parameter Names
156
+
157
+ Bad: Parameters named x, val, or param1 force agents to guess meaning.
158
+
159
+ Good: Parameters named customer_id, max_results, or include_history are self-documenting.
160
+
161
+ ### Missing Error Handling
162
+
163
+ Bad: Tools that fail with generic errors or no error handling.
164
+
165
+ Good: Tools that provide specific error types, messages, and resolution guidance.
166
+
167
+ ### Inconsistent Naming
168
+
169
+ Bad: Using id in some tools, identifier in others, customer_id in some and user_id in others for similar concepts.
170
+
171
+ Good: Maintaining consistent naming patterns across all tools for similar concepts.
172
+
173
+ ## Checklist for Tool Design
174
+
175
+ Before deploying a new tool, verify that the description clearly states what the tool does and when to use it. Verify that all parameters have descriptive names and clear type information. Verify that return values are documented with structure and examples. Verify that error cases are covered with actionable messages. Verify that the tool follows naming conventions used elsewhere. Verify that examples demonstrate common usage patterns. Verify that format options are available if response size varies significantly.
176
+