agent-devkit 0.1.6 → 0.3.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 (691) hide show
  1. package/README.md +59 -5
  2. package/bin/agent.mjs +133 -7
  3. package/package.json +1 -1
  4. package/runtime/README.md +239 -5
  5. package/runtime/agent +36 -5
  6. package/runtime/agents/README.md +44 -0
  7. package/runtime/agents/agent-devkit-agent-builder/AGENTS.md +24 -0
  8. package/runtime/agents/agent-devkit-agent-builder/README.md +37 -0
  9. package/runtime/agents/agent-devkit-agent-builder/agent.yaml +46 -0
  10. package/runtime/agents/agent-devkit-agent-builder/capabilities/plan-agent/capability.yaml +29 -0
  11. package/runtime/agents/agent-devkit-agent-builder/capabilities/plan-agent/decision-rules.md +7 -0
  12. package/runtime/agents/agent-devkit-agent-builder/capabilities/plan-agent/runner.py +33 -0
  13. package/runtime/agents/agent-devkit-agent-builder/capabilities/plan-agent/workflow.md +8 -0
  14. package/runtime/agents/agent-devkit-agent-builder/capabilities/scaffold-agent/capability.yaml +31 -0
  15. package/runtime/agents/agent-devkit-agent-builder/capabilities/scaffold-agent/decision-rules.md +9 -0
  16. package/runtime/agents/agent-devkit-agent-builder/capabilities/scaffold-agent/runner.py +39 -0
  17. package/runtime/agents/agent-devkit-agent-builder/capabilities/scaffold-agent/workflow.md +8 -0
  18. package/runtime/agents/agent-devkit-agent-builder/capabilities/validate-agent-contract/capability.yaml +28 -0
  19. package/runtime/agents/agent-devkit-agent-builder/capabilities/validate-agent-contract/decision-rules.md +6 -0
  20. package/runtime/agents/agent-devkit-agent-builder/capabilities/validate-agent-contract/runner.py +33 -0
  21. package/runtime/agents/agent-devkit-agent-builder/capabilities/validate-agent-contract/workflow.md +7 -0
  22. package/runtime/agents/agent-devkit-agent-builder/infra/integrations/agent-devkit/agent_builder_repository.py +527 -0
  23. package/runtime/agents/agent-devkit-agent-builder/knowledge/context.md +15 -0
  24. package/runtime/agents/agent-devkit-agent-builder/knowledge/policies.yaml +11 -0
  25. package/runtime/agents/agent-devkit-agent-builder/knowledge/system.md +11 -0
  26. package/runtime/agents/agent-devkit-agent-builder/templates/agent-plan-output.md +20 -0
  27. package/runtime/agents/agent-devkit-agent-builder/templates/scaffold-plan-output.md +13 -0
  28. package/runtime/agents/agent-devkit-agent-builder/templates/validation-report-output.md +13 -0
  29. package/runtime/agents/agent-devkit-agent-builder/tests/test_runners.py +188 -0
  30. package/runtime/agents/automation-architect/AGENTS.md +11 -0
  31. package/runtime/agents/automation-architect/README.md +27 -0
  32. package/runtime/agents/automation-architect/agent.yaml +57 -0
  33. package/runtime/agents/automation-architect/capabilities/classify-automation-request/capability.yaml +35 -0
  34. package/runtime/agents/automation-architect/capabilities/classify-automation-request/decision-rules.md +10 -0
  35. package/runtime/agents/automation-architect/capabilities/classify-automation-request/runner.py +37 -0
  36. package/runtime/agents/automation-architect/capabilities/classify-automation-request/workflow.md +7 -0
  37. package/runtime/agents/automation-architect/capabilities/delegate-automation-build/capability.yaml +34 -0
  38. package/runtime/agents/automation-architect/capabilities/delegate-automation-build/decision-rules.md +7 -0
  39. package/runtime/agents/automation-architect/capabilities/delegate-automation-build/runner.py +37 -0
  40. package/runtime/agents/automation-architect/capabilities/delegate-automation-build/workflow.md +6 -0
  41. package/runtime/agents/automation-architect/capabilities/plan-automation-solution/capability.yaml +35 -0
  42. package/runtime/agents/automation-architect/capabilities/plan-automation-solution/decision-rules.md +7 -0
  43. package/runtime/agents/automation-architect/capabilities/plan-automation-solution/runner.py +37 -0
  44. package/runtime/agents/automation-architect/capabilities/plan-automation-solution/workflow.md +7 -0
  45. package/runtime/agents/automation-architect/capabilities/review-automation-solution/capability.yaml +36 -0
  46. package/runtime/agents/automation-architect/capabilities/review-automation-solution/decision-rules.md +7 -0
  47. package/runtime/agents/automation-architect/capabilities/review-automation-solution/runner.py +39 -0
  48. package/runtime/agents/automation-architect/capabilities/review-automation-solution/workflow.md +7 -0
  49. package/runtime/agents/automation-architect/infra/integrations/automation-architecture/automation_architecture_repository.py +481 -0
  50. package/runtime/agents/automation-architect/knowledge/context.md +22 -0
  51. package/runtime/agents/automation-architect/knowledge/policies.yaml +20 -0
  52. package/runtime/agents/automation-architect/knowledge/system.md +8 -0
  53. package/runtime/agents/automation-architect/templates/automation-classification.md +6 -0
  54. package/runtime/agents/automation-architect/templates/automation-plan.md +5 -0
  55. package/runtime/agents/automation-architect/tests/test_runners.py +135 -0
  56. package/runtime/agents/aws-architecture-analyst/agent.yaml +17 -4
  57. package/runtime/agents/aws-cloudwatch-log-analyzer/agent.yaml +12 -2
  58. package/runtime/agents/aws-cloudwatch-log-analyzer/capabilities/analyze-service-error/capability.yaml +16 -0
  59. package/runtime/agents/aws-lambda-builder/AGENTS.md +27 -0
  60. package/runtime/agents/aws-lambda-builder/README.md +21 -0
  61. package/runtime/agents/aws-lambda-builder/agent.yaml +46 -0
  62. package/runtime/agents/aws-lambda-builder/capabilities/deploy-lambda-plan/capability.yaml +18 -0
  63. package/runtime/agents/aws-lambda-builder/capabilities/deploy-lambda-plan/decision-rules.md +6 -0
  64. package/runtime/agents/aws-lambda-builder/capabilities/deploy-lambda-plan/runner.py +33 -0
  65. package/runtime/agents/aws-lambda-builder/capabilities/deploy-lambda-plan/workflow.md +6 -0
  66. package/runtime/agents/aws-lambda-builder/capabilities/generate-lambda-project/capability.yaml +20 -0
  67. package/runtime/agents/aws-lambda-builder/capabilities/generate-lambda-project/decision-rules.md +6 -0
  68. package/runtime/agents/aws-lambda-builder/capabilities/generate-lambda-project/runner.py +39 -0
  69. package/runtime/agents/aws-lambda-builder/capabilities/generate-lambda-project/workflow.md +7 -0
  70. package/runtime/agents/aws-lambda-builder/capabilities/package-lambda/capability.yaml +22 -0
  71. package/runtime/agents/aws-lambda-builder/capabilities/package-lambda/decision-rules.md +6 -0
  72. package/runtime/agents/aws-lambda-builder/capabilities/package-lambda/runner.py +41 -0
  73. package/runtime/agents/aws-lambda-builder/capabilities/package-lambda/workflow.md +6 -0
  74. package/runtime/agents/aws-lambda-builder/capabilities/plan-lambda/capability.yaml +18 -0
  75. package/runtime/agents/aws-lambda-builder/capabilities/plan-lambda/decision-rules.md +7 -0
  76. package/runtime/agents/aws-lambda-builder/capabilities/plan-lambda/runner.py +33 -0
  77. package/runtime/agents/aws-lambda-builder/capabilities/plan-lambda/workflow.md +6 -0
  78. package/runtime/agents/aws-lambda-builder/capabilities/review-lambda-security/capability.yaml +18 -0
  79. package/runtime/agents/aws-lambda-builder/capabilities/review-lambda-security/decision-rules.md +7 -0
  80. package/runtime/agents/aws-lambda-builder/capabilities/review-lambda-security/runner.py +33 -0
  81. package/runtime/agents/aws-lambda-builder/capabilities/review-lambda-security/workflow.md +5 -0
  82. package/runtime/agents/aws-lambda-builder/infra/integrations/aws-lambda/aws_lambda_repository.py +688 -0
  83. package/runtime/agents/aws-lambda-builder/knowledge/context.md +12 -0
  84. package/runtime/agents/aws-lambda-builder/knowledge/policies.yaml +23 -0
  85. package/runtime/agents/aws-lambda-builder/knowledge/system.md +10 -0
  86. package/runtime/agents/aws-lambda-builder/templates/lambda-deploy-plan.md +3 -0
  87. package/runtime/agents/aws-lambda-builder/templates/lambda-package.md +3 -0
  88. package/runtime/agents/aws-lambda-builder/templates/lambda-plan.md +3 -0
  89. package/runtime/agents/aws-lambda-builder/templates/lambda-readme.md +3 -0
  90. package/runtime/agents/aws-lambda-builder/templates/lambda-security-review.md +3 -0
  91. package/runtime/agents/aws-lambda-builder/tests/test_runners.py +355 -0
  92. package/runtime/agents/aws-operations-operator/agent.yaml +18 -6
  93. package/runtime/agents/aws-security-governance-auditor/agent.yaml +17 -5
  94. package/runtime/agents/azure-devops-orchestrator/agent.yaml +15 -2
  95. package/runtime/agents/azure-devops-orchestrator/capabilities/read-card/capability.yaml +29 -0
  96. package/runtime/agents/bpo-analyser/agent.yaml +12 -2
  97. package/runtime/agents/bpo-analyser/knowledge/policies.yaml +2 -2
  98. package/runtime/agents/contribution-reviewer/AGENTS.md +8 -0
  99. package/runtime/agents/contribution-reviewer/README.md +8 -0
  100. package/runtime/agents/contribution-reviewer/agent.yaml +40 -0
  101. package/runtime/agents/contribution-reviewer/capabilities/plan-contribution-pr/capability.yaml +27 -0
  102. package/runtime/agents/contribution-reviewer/capabilities/plan-contribution-pr/decision-rules.md +5 -0
  103. package/runtime/agents/contribution-reviewer/capabilities/plan-contribution-pr/workflow.md +6 -0
  104. package/runtime/agents/contribution-reviewer/capabilities/review-contribution/capability.yaml +25 -0
  105. package/runtime/agents/contribution-reviewer/capabilities/review-contribution/decision-rules.md +5 -0
  106. package/runtime/agents/contribution-reviewer/capabilities/review-contribution/workflow.md +5 -0
  107. package/runtime/agents/contribution-reviewer/capabilities/validate-local-contribution/capability.yaml +26 -0
  108. package/runtime/agents/contribution-reviewer/capabilities/validate-local-contribution/decision-rules.md +5 -0
  109. package/runtime/agents/contribution-reviewer/capabilities/validate-local-contribution/workflow.md +6 -0
  110. package/runtime/agents/contribution-reviewer/infra/README.md +6 -0
  111. package/runtime/agents/contribution-reviewer/knowledge/context.md +8 -0
  112. package/runtime/agents/contribution-reviewer/knowledge/system.md +8 -0
  113. package/runtime/agents/contribution-reviewer/templates/README.md +3 -0
  114. package/runtime/agents/data-scientist-analyst/agent.yaml +16 -4
  115. package/runtime/agents/data-scientist-analyst/capabilities/generate-data-report/capability.yaml +1 -1
  116. package/runtime/agents/data-scientist-analyst/capabilities/generate-reconciliation-report/capability.yaml +1 -1
  117. package/runtime/agents/data-scientist-analyst/capabilities/run-data-pipeline/capability.yaml +1 -1
  118. package/runtime/agents/data-scientist-analyst/infra/integrations/agent-bridge/methods/analyze-sql-source.yaml +1 -1
  119. package/runtime/agents/data-scientist-analyst/knowledge/policies.yaml +4 -4
  120. package/runtime/agents/data-scientist-analyst/knowledge/system.md +1 -1
  121. package/runtime/agents/data-scientist-analyst/tests/test_runners.py +1 -1
  122. package/runtime/agents/database-change-operator/agent.yaml +12 -1
  123. package/runtime/agents/docker-container-builder/AGENTS.md +27 -0
  124. package/runtime/agents/docker-container-builder/README.md +21 -0
  125. package/runtime/agents/docker-container-builder/agent.yaml +52 -0
  126. package/runtime/agents/docker-container-builder/capabilities/analyze-containerization-target/capability.yaml +18 -0
  127. package/runtime/agents/docker-container-builder/capabilities/analyze-containerization-target/decision-rules.md +6 -0
  128. package/runtime/agents/docker-container-builder/capabilities/analyze-containerization-target/runner.py +32 -0
  129. package/runtime/agents/docker-container-builder/capabilities/analyze-containerization-target/workflow.md +6 -0
  130. package/runtime/agents/docker-container-builder/capabilities/generate-compose/capability.yaml +18 -0
  131. package/runtime/agents/docker-container-builder/capabilities/generate-compose/decision-rules.md +7 -0
  132. package/runtime/agents/docker-container-builder/capabilities/generate-compose/runner.py +32 -0
  133. package/runtime/agents/docker-container-builder/capabilities/generate-compose/workflow.md +6 -0
  134. package/runtime/agents/docker-container-builder/capabilities/generate-container-project-files/capability.yaml +20 -0
  135. package/runtime/agents/docker-container-builder/capabilities/generate-container-project-files/decision-rules.md +7 -0
  136. package/runtime/agents/docker-container-builder/capabilities/generate-container-project-files/runner.py +38 -0
  137. package/runtime/agents/docker-container-builder/capabilities/generate-container-project-files/workflow.md +7 -0
  138. package/runtime/agents/docker-container-builder/capabilities/generate-dockerfile/capability.yaml +18 -0
  139. package/runtime/agents/docker-container-builder/capabilities/generate-dockerfile/decision-rules.md +6 -0
  140. package/runtime/agents/docker-container-builder/capabilities/generate-dockerfile/runner.py +32 -0
  141. package/runtime/agents/docker-container-builder/capabilities/generate-dockerfile/workflow.md +7 -0
  142. package/runtime/agents/docker-container-builder/capabilities/plan-image-build/capability.yaml +18 -0
  143. package/runtime/agents/docker-container-builder/capabilities/plan-image-build/decision-rules.md +6 -0
  144. package/runtime/agents/docker-container-builder/capabilities/plan-image-build/runner.py +32 -0
  145. package/runtime/agents/docker-container-builder/capabilities/plan-image-build/workflow.md +6 -0
  146. package/runtime/agents/docker-container-builder/capabilities/review-docker-security/capability.yaml +21 -0
  147. package/runtime/agents/docker-container-builder/capabilities/review-docker-security/decision-rules.md +6 -0
  148. package/runtime/agents/docker-container-builder/capabilities/review-docker-security/runner.py +43 -0
  149. package/runtime/agents/docker-container-builder/capabilities/review-docker-security/workflow.md +5 -0
  150. package/runtime/agents/docker-container-builder/infra/integrations/docker-container/docker_container_repository.py +837 -0
  151. package/runtime/agents/docker-container-builder/knowledge/context.md +21 -0
  152. package/runtime/agents/docker-container-builder/knowledge/policies.yaml +13 -0
  153. package/runtime/agents/docker-container-builder/knowledge/system.md +21 -0
  154. package/runtime/agents/docker-container-builder/templates/container-plan.md +4 -0
  155. package/runtime/agents/docker-container-builder/templates/container-review.md +4 -0
  156. package/runtime/agents/docker-container-builder/templates/docker-compose.md +5 -0
  157. package/runtime/agents/docker-container-builder/templates/docker-readme.md +3 -0
  158. package/runtime/agents/docker-container-builder/templates/dockerfile.md +5 -0
  159. package/runtime/agents/docker-container-builder/tests/test_runners.py +255 -0
  160. package/runtime/agents/drawio-diagram-builder/agent.yaml +11 -2
  161. package/runtime/agents/drawio-diagram-builder/capabilities/execute-diagram-delivery/capability.yaml +1 -1
  162. package/runtime/agents/drawio-diagram-builder/capabilities/read-azure-card-context/capability.yaml +1 -1
  163. package/runtime/agents/elasticsearch-log-analyzer/agent.yaml +14 -2
  164. package/runtime/agents/elasticsearch-log-analyzer/capabilities/analyze-service-errors/capability.yaml +14 -0
  165. package/runtime/agents/excel-workbook-builder/agent.yaml +10 -0
  166. package/runtime/agents/excel-workbook-builder/capabilities/create-template/capability.yaml +1 -1
  167. package/runtime/agents/excel-workbook-builder/capabilities/create-template/workflow.md +1 -1
  168. package/runtime/agents/excel-workbook-builder/capabilities/create-template-version/capability.yaml +1 -1
  169. package/runtime/agents/excel-workbook-builder/capabilities/generate-template-input-file/capability.yaml +1 -2
  170. package/runtime/agents/excel-workbook-builder/capabilities/refine-template/capability.yaml +1 -1
  171. package/runtime/agents/excel-workbook-builder/capabilities/register-template/capability.yaml +1 -2
  172. package/runtime/agents/excel-workbook-builder/capabilities/register-template/workflow.md +1 -1
  173. package/runtime/agents/execution-loop-builder/AGENTS.md +24 -0
  174. package/runtime/agents/execution-loop-builder/README.md +19 -0
  175. package/runtime/agents/execution-loop-builder/agent.yaml +49 -0
  176. package/runtime/agents/execution-loop-builder/capabilities/generate-loop-project-files/capability.yaml +20 -0
  177. package/runtime/agents/execution-loop-builder/capabilities/generate-loop-project-files/decision-rules.md +6 -0
  178. package/runtime/agents/execution-loop-builder/capabilities/generate-loop-project-files/runner.py +38 -0
  179. package/runtime/agents/execution-loop-builder/capabilities/generate-loop-project-files/workflow.md +7 -0
  180. package/runtime/agents/execution-loop-builder/capabilities/generate-loop-runner/capability.yaml +18 -0
  181. package/runtime/agents/execution-loop-builder/capabilities/generate-loop-runner/decision-rules.md +5 -0
  182. package/runtime/agents/execution-loop-builder/capabilities/generate-loop-runner/runner.py +32 -0
  183. package/runtime/agents/execution-loop-builder/capabilities/generate-loop-runner/workflow.md +6 -0
  184. package/runtime/agents/execution-loop-builder/capabilities/plan-execution-loop/capability.yaml +18 -0
  185. package/runtime/agents/execution-loop-builder/capabilities/plan-execution-loop/decision-rules.md +6 -0
  186. package/runtime/agents/execution-loop-builder/capabilities/plan-execution-loop/runner.py +32 -0
  187. package/runtime/agents/execution-loop-builder/capabilities/plan-execution-loop/workflow.md +6 -0
  188. package/runtime/agents/execution-loop-builder/capabilities/register-loop-task/capability.yaml +19 -0
  189. package/runtime/agents/execution-loop-builder/capabilities/register-loop-task/decision-rules.md +6 -0
  190. package/runtime/agents/execution-loop-builder/capabilities/register-loop-task/runner.py +36 -0
  191. package/runtime/agents/execution-loop-builder/capabilities/register-loop-task/workflow.md +6 -0
  192. package/runtime/agents/execution-loop-builder/capabilities/review-loop-safety/capability.yaml +19 -0
  193. package/runtime/agents/execution-loop-builder/capabilities/review-loop-safety/decision-rules.md +6 -0
  194. package/runtime/agents/execution-loop-builder/capabilities/review-loop-safety/runner.py +39 -0
  195. package/runtime/agents/execution-loop-builder/capabilities/review-loop-safety/workflow.md +5 -0
  196. package/runtime/agents/execution-loop-builder/infra/integrations/execution-loop/execution_loop_repository.py +608 -0
  197. package/runtime/agents/execution-loop-builder/knowledge/context.md +26 -0
  198. package/runtime/agents/execution-loop-builder/knowledge/policies.yaml +13 -0
  199. package/runtime/agents/execution-loop-builder/knowledge/system.md +19 -0
  200. package/runtime/agents/execution-loop-builder/templates/loop-plan.md +3 -0
  201. package/runtime/agents/execution-loop-builder/templates/loop-readme.md +3 -0
  202. package/runtime/agents/execution-loop-builder/templates/loop-review.md +3 -0
  203. package/runtime/agents/execution-loop-builder/templates/loop-runner.py +2 -0
  204. package/runtime/agents/execution-loop-builder/tests/test_runners.py +274 -0
  205. package/runtime/agents/execution-reviewer/agent.yaml +6 -4
  206. package/runtime/agents/execution-reviewer/capabilities/review-agent-result/capability.yaml +1 -2
  207. package/runtime/agents/execution-reviewer/capabilities/review-final-output/capability.yaml +1 -2
  208. package/runtime/agents/execution-reviewer/capabilities/review-plan/capability.yaml +1 -2
  209. package/runtime/agents/figma-ui-ux-product-designer/agent.yaml +17 -5
  210. package/runtime/agents/figma-ui-ux-product-designer/capabilities/analyze-product-context/capability.yaml +1 -1
  211. package/runtime/agents/figma-ui-ux-product-designer/capabilities/conduct-design-interview/capability.yaml +1 -1
  212. package/runtime/agents/figma-ui-ux-product-designer/capabilities/conduct-design-review-session/capability.yaml +1 -1
  213. package/runtime/agents/figma-ui-ux-product-designer/capabilities/generate-dev-handoff/capability.yaml +1 -1
  214. package/runtime/agents/figma-ui-ux-product-designer/capabilities/generate-user-journey-diagram/capability.yaml +1 -1
  215. package/runtime/agents/figma-ui-ux-product-designer/capabilities/ingest-design-source/capability.yaml +1 -1
  216. package/runtime/agents/figma-ui-ux-product-designer/capabilities/triage-design-feedback/capability.yaml +1 -1
  217. package/runtime/agents/generic-agent-builder/AGENTS.md +20 -0
  218. package/runtime/agents/generic-agent-builder/README.md +40 -0
  219. package/runtime/agents/generic-agent-builder/agent.yaml +43 -0
  220. package/runtime/agents/generic-agent-builder/capabilities/generate-agent-instructions/capability.yaml +18 -0
  221. package/runtime/agents/generic-agent-builder/capabilities/generate-agent-instructions/decision-rules.md +5 -0
  222. package/runtime/agents/generic-agent-builder/capabilities/generate-agent-instructions/runner.py +33 -0
  223. package/runtime/agents/generic-agent-builder/capabilities/generate-agent-instructions/workflow.md +6 -0
  224. package/runtime/agents/generic-agent-builder/capabilities/generate-project-agent-files/capability.yaml +20 -0
  225. package/runtime/agents/generic-agent-builder/capabilities/generate-project-agent-files/decision-rules.md +6 -0
  226. package/runtime/agents/generic-agent-builder/capabilities/generate-project-agent-files/runner.py +39 -0
  227. package/runtime/agents/generic-agent-builder/capabilities/generate-project-agent-files/workflow.md +7 -0
  228. package/runtime/agents/generic-agent-builder/capabilities/generate-skill/capability.yaml +18 -0
  229. package/runtime/agents/generic-agent-builder/capabilities/generate-skill/decision-rules.md +5 -0
  230. package/runtime/agents/generic-agent-builder/capabilities/generate-skill/runner.py +33 -0
  231. package/runtime/agents/generic-agent-builder/capabilities/generate-skill/workflow.md +5 -0
  232. package/runtime/agents/generic-agent-builder/capabilities/plan-generic-agent/capability.yaml +18 -0
  233. package/runtime/agents/generic-agent-builder/capabilities/plan-generic-agent/decision-rules.md +6 -0
  234. package/runtime/agents/generic-agent-builder/capabilities/plan-generic-agent/runner.py +33 -0
  235. package/runtime/agents/generic-agent-builder/capabilities/plan-generic-agent/workflow.md +6 -0
  236. package/runtime/agents/generic-agent-builder/capabilities/review-generic-agent/capability.yaml +20 -0
  237. package/runtime/agents/generic-agent-builder/capabilities/review-generic-agent/decision-rules.md +6 -0
  238. package/runtime/agents/generic-agent-builder/capabilities/review-generic-agent/runner.py +40 -0
  239. package/runtime/agents/generic-agent-builder/capabilities/review-generic-agent/workflow.md +7 -0
  240. package/runtime/agents/generic-agent-builder/infra/integrations/generic-agent/generic_agent_repository.py +445 -0
  241. package/runtime/agents/generic-agent-builder/knowledge/context.md +11 -0
  242. package/runtime/agents/generic-agent-builder/knowledge/policies.yaml +12 -0
  243. package/runtime/agents/generic-agent-builder/knowledge/system.md +17 -0
  244. package/runtime/agents/generic-agent-builder/templates/generic-agent-instructions.md +17 -0
  245. package/runtime/agents/generic-agent-builder/templates/generic-review-report.md +13 -0
  246. package/runtime/agents/generic-agent-builder/templates/generic-skill.md +14 -0
  247. package/runtime/agents/generic-agent-builder/tests/test_runners.py +220 -0
  248. package/runtime/agents/github-pr-reviewer/agent.yaml +17 -5
  249. package/runtime/agents/github-pr-reviewer/capabilities/create-review-automation/capability.yaml +1 -1
  250. package/runtime/agents/github-pr-reviewer/capabilities/inspect-pr/capability.yaml +1 -1
  251. package/runtime/agents/github-pr-reviewer/capabilities/list-review-requests/capability.yaml +1 -1
  252. package/runtime/agents/github-pr-reviewer/capabilities/review-pr-diff/capability.yaml +1 -1
  253. package/runtime/agents/knowledge-author/AGENTS.md +7 -0
  254. package/runtime/agents/knowledge-author/README.md +7 -0
  255. package/runtime/agents/knowledge-author/agent.yaml +37 -0
  256. package/runtime/agents/knowledge-author/capabilities/create-knowledge-snapshot/capability.yaml +30 -0
  257. package/runtime/agents/knowledge-author/capabilities/create-knowledge-snapshot/decision-rules.md +6 -0
  258. package/runtime/agents/knowledge-author/capabilities/create-knowledge-snapshot/workflow.md +7 -0
  259. package/runtime/agents/knowledge-author/infra/.gitkeep +1 -0
  260. package/runtime/agents/knowledge-author/knowledge/context.md +4 -0
  261. package/runtime/agents/knowledge-author/knowledge/system.md +4 -0
  262. package/runtime/agents/knowledge-author/templates/.gitkeep +1 -0
  263. package/runtime/agents/knowledge-curator/AGENTS.md +7 -0
  264. package/runtime/agents/knowledge-curator/README.md +6 -0
  265. package/runtime/agents/knowledge-curator/agent.yaml +37 -0
  266. package/runtime/agents/knowledge-curator/capabilities/curate-knowledge-base/capability.yaml +29 -0
  267. package/runtime/agents/knowledge-curator/capabilities/curate-knowledge-base/decision-rules.md +6 -0
  268. package/runtime/agents/knowledge-curator/capabilities/curate-knowledge-base/workflow.md +7 -0
  269. package/runtime/agents/knowledge-curator/infra/.gitkeep +1 -0
  270. package/runtime/agents/knowledge-curator/knowledge/context.md +4 -0
  271. package/runtime/agents/knowledge-curator/knowledge/system.md +4 -0
  272. package/runtime/agents/knowledge-curator/templates/.gitkeep +1 -0
  273. package/runtime/agents/knowledge-generator/agent.yaml +13 -3
  274. package/runtime/agents/knowledge-generator/capabilities/generate-knowledge/capability.yaml +1 -1
  275. package/runtime/agents/knowledge-infra-builder/AGENTS.md +8 -0
  276. package/runtime/agents/knowledge-infra-builder/README.md +8 -0
  277. package/runtime/agents/knowledge-infra-builder/agent.yaml +38 -0
  278. package/runtime/agents/knowledge-infra-builder/capabilities/create-knowledge-base/capability.yaml +30 -0
  279. package/runtime/agents/knowledge-infra-builder/capabilities/create-knowledge-base/decision-rules.md +6 -0
  280. package/runtime/agents/knowledge-infra-builder/capabilities/create-knowledge-base/workflow.md +7 -0
  281. package/runtime/agents/knowledge-infra-builder/infra/.gitkeep +1 -0
  282. package/runtime/agents/knowledge-infra-builder/knowledge/context.md +4 -0
  283. package/runtime/agents/knowledge-infra-builder/knowledge/system.md +4 -0
  284. package/runtime/agents/knowledge-infra-builder/templates/.gitkeep +1 -0
  285. package/runtime/agents/knowledge-owner/AGENTS.md +7 -0
  286. package/runtime/agents/knowledge-owner/README.md +6 -0
  287. package/runtime/agents/knowledge-owner/agent.yaml +37 -0
  288. package/runtime/agents/knowledge-owner/capabilities/publish-knowledge-snapshot/capability.yaml +28 -0
  289. package/runtime/agents/knowledge-owner/capabilities/publish-knowledge-snapshot/decision-rules.md +6 -0
  290. package/runtime/agents/knowledge-owner/capabilities/publish-knowledge-snapshot/workflow.md +7 -0
  291. package/runtime/agents/knowledge-owner/infra/.gitkeep +1 -0
  292. package/runtime/agents/knowledge-owner/knowledge/context.md +4 -0
  293. package/runtime/agents/knowledge-owner/knowledge/system.md +4 -0
  294. package/runtime/agents/knowledge-owner/templates/.gitkeep +1 -0
  295. package/runtime/agents/knowledge-reviewer/AGENTS.md +7 -0
  296. package/runtime/agents/knowledge-reviewer/README.md +7 -0
  297. package/runtime/agents/knowledge-reviewer/agent.yaml +36 -0
  298. package/runtime/agents/knowledge-reviewer/capabilities/review-knowledge-snapshot/capability.yaml +26 -0
  299. package/runtime/agents/knowledge-reviewer/capabilities/review-knowledge-snapshot/decision-rules.md +6 -0
  300. package/runtime/agents/knowledge-reviewer/capabilities/review-knowledge-snapshot/workflow.md +7 -0
  301. package/runtime/agents/knowledge-reviewer/infra/.gitkeep +1 -0
  302. package/runtime/agents/knowledge-reviewer/knowledge/context.md +4 -0
  303. package/runtime/agents/knowledge-reviewer/knowledge/system.md +4 -0
  304. package/runtime/agents/knowledge-reviewer/templates/.gitkeep +1 -0
  305. package/runtime/agents/local-llm-operator/agent.yaml +6 -4
  306. package/runtime/agents/local-llm-operator/capabilities/delegate-operational-task/capability.yaml +1 -2
  307. package/runtime/agents/local-llm-operator/capabilities/inspect-local-models/capability.yaml +1 -2
  308. package/runtime/agents/local-llm-operator/capabilities/select-local-worker/capability.yaml +1 -2
  309. package/runtime/agents/local-memory-manager/AGENTS.md +5 -0
  310. package/runtime/agents/local-memory-manager/README.md +7 -0
  311. package/runtime/agents/local-memory-manager/agent.yaml +38 -0
  312. package/runtime/agents/local-memory-manager/capabilities/curate-local-memory/capability.yaml +19 -0
  313. package/runtime/agents/local-memory-manager/capabilities/curate-local-memory/decision-rules.md +5 -0
  314. package/runtime/agents/local-memory-manager/capabilities/curate-local-memory/workflow.md +6 -0
  315. package/runtime/agents/local-memory-manager/capabilities/inspect-local-memory/capability.yaml +19 -0
  316. package/runtime/agents/local-memory-manager/capabilities/inspect-local-memory/decision-rules.md +5 -0
  317. package/runtime/agents/local-memory-manager/capabilities/inspect-local-memory/workflow.md +5 -0
  318. package/runtime/agents/local-memory-manager/infra/.gitkeep +1 -0
  319. package/runtime/agents/local-memory-manager/knowledge/context.md +4 -0
  320. package/runtime/agents/local-memory-manager/knowledge/system.md +4 -0
  321. package/runtime/agents/local-memory-manager/templates/.gitkeep +1 -0
  322. package/runtime/agents/memory-sync-manager/AGENTS.md +7 -0
  323. package/runtime/agents/memory-sync-manager/README.md +7 -0
  324. package/runtime/agents/memory-sync-manager/agent.yaml +37 -0
  325. package/runtime/agents/memory-sync-manager/capabilities/plan-memory-backup/capability.yaml +29 -0
  326. package/runtime/agents/memory-sync-manager/capabilities/plan-memory-backup/decision-rules.md +6 -0
  327. package/runtime/agents/memory-sync-manager/capabilities/plan-memory-backup/workflow.md +7 -0
  328. package/runtime/agents/memory-sync-manager/infra/.gitkeep +1 -0
  329. package/runtime/agents/memory-sync-manager/knowledge/context.md +4 -0
  330. package/runtime/agents/memory-sync-manager/knowledge/system.md +4 -0
  331. package/runtime/agents/memory-sync-manager/templates/.gitkeep +1 -0
  332. package/runtime/agents/n1-support-agent/agent.yaml +40 -1
  333. package/runtime/agents/n2-support-agent/agent.yaml +41 -2
  334. package/runtime/agents/n2-support-agent/knowledge/policies.yaml +2 -2
  335. package/runtime/agents/notification-operator/AGENTS.md +11 -0
  336. package/runtime/agents/notification-operator/README.md +15 -0
  337. package/runtime/agents/notification-operator/agent.yaml +43 -0
  338. package/runtime/agents/notification-operator/capabilities/configure-notification-channel/capability.yaml +19 -0
  339. package/runtime/agents/notification-operator/capabilities/configure-notification-channel/decision-rules.md +6 -0
  340. package/runtime/agents/notification-operator/capabilities/configure-notification-channel/runner.py +33 -0
  341. package/runtime/agents/notification-operator/capabilities/configure-notification-channel/workflow.md +6 -0
  342. package/runtime/agents/notification-operator/capabilities/format-task-completion-notification/capability.yaml +25 -0
  343. package/runtime/agents/notification-operator/capabilities/format-task-completion-notification/decision-rules.md +7 -0
  344. package/runtime/agents/notification-operator/capabilities/format-task-completion-notification/runner.py +49 -0
  345. package/runtime/agents/notification-operator/capabilities/format-task-completion-notification/workflow.md +6 -0
  346. package/runtime/agents/notification-operator/capabilities/send-task-completion-notification/capability.yaml +27 -0
  347. package/runtime/agents/notification-operator/capabilities/send-task-completion-notification/decision-rules.md +6 -0
  348. package/runtime/agents/notification-operator/capabilities/send-task-completion-notification/runner.py +68 -0
  349. package/runtime/agents/notification-operator/capabilities/send-task-completion-notification/workflow.md +7 -0
  350. package/runtime/agents/notification-operator/infra/README.md +6 -0
  351. package/runtime/agents/notification-operator/knowledge/context.md +10 -0
  352. package/runtime/agents/notification-operator/knowledge/policies.yaml +9 -0
  353. package/runtime/agents/notification-operator/knowledge/system.md +7 -0
  354. package/runtime/agents/notification-operator/templates/README.md +6 -0
  355. package/runtime/agents/notification-operator/tests/test_runners.py +108 -0
  356. package/runtime/agents/playwright-automation-builder/AGENTS.md +23 -0
  357. package/runtime/agents/playwright-automation-builder/README.md +43 -0
  358. package/runtime/agents/playwright-automation-builder/agent.yaml +48 -0
  359. package/runtime/agents/playwright-automation-builder/capabilities/generate-playwright-project-files/capability.yaml +20 -0
  360. package/runtime/agents/playwright-automation-builder/capabilities/generate-playwright-project-files/decision-rules.md +6 -0
  361. package/runtime/agents/playwright-automation-builder/capabilities/generate-playwright-project-files/runner.py +38 -0
  362. package/runtime/agents/playwright-automation-builder/capabilities/generate-playwright-project-files/workflow.md +6 -0
  363. package/runtime/agents/playwright-automation-builder/capabilities/generate-playwright-script/capability.yaml +18 -0
  364. package/runtime/agents/playwright-automation-builder/capabilities/generate-playwright-script/decision-rules.md +6 -0
  365. package/runtime/agents/playwright-automation-builder/capabilities/generate-playwright-script/runner.py +32 -0
  366. package/runtime/agents/playwright-automation-builder/capabilities/generate-playwright-script/workflow.md +6 -0
  367. package/runtime/agents/playwright-automation-builder/capabilities/plan-playwright-automation/capability.yaml +18 -0
  368. package/runtime/agents/playwright-automation-builder/capabilities/plan-playwright-automation/decision-rules.md +6 -0
  369. package/runtime/agents/playwright-automation-builder/capabilities/plan-playwright-automation/runner.py +32 -0
  370. package/runtime/agents/playwright-automation-builder/capabilities/plan-playwright-automation/workflow.md +6 -0
  371. package/runtime/agents/playwright-automation-builder/capabilities/review-playwright-artifacts/capability.yaml +19 -0
  372. package/runtime/agents/playwright-automation-builder/capabilities/review-playwright-artifacts/decision-rules.md +6 -0
  373. package/runtime/agents/playwright-automation-builder/capabilities/review-playwright-artifacts/runner.py +33 -0
  374. package/runtime/agents/playwright-automation-builder/capabilities/review-playwright-artifacts/workflow.md +6 -0
  375. package/runtime/agents/playwright-automation-builder/capabilities/run-playwright-check/capability.yaml +22 -0
  376. package/runtime/agents/playwright-automation-builder/capabilities/run-playwright-check/decision-rules.md +6 -0
  377. package/runtime/agents/playwright-automation-builder/capabilities/run-playwright-check/runner.py +40 -0
  378. package/runtime/agents/playwright-automation-builder/capabilities/run-playwright-check/workflow.md +6 -0
  379. package/runtime/agents/playwright-automation-builder/capabilities/wrap-playwright-as-capability/capability.yaml +22 -0
  380. package/runtime/agents/playwright-automation-builder/capabilities/wrap-playwright-as-capability/decision-rules.md +6 -0
  381. package/runtime/agents/playwright-automation-builder/capabilities/wrap-playwright-as-capability/runner.py +42 -0
  382. package/runtime/agents/playwright-automation-builder/capabilities/wrap-playwright-as-capability/workflow.md +6 -0
  383. package/runtime/agents/playwright-automation-builder/infra/integrations/playwright-automation/playwright_automation_repository.py +865 -0
  384. package/runtime/agents/playwright-automation-builder/knowledge/context.md +19 -0
  385. package/runtime/agents/playwright-automation-builder/knowledge/policies.yaml +25 -0
  386. package/runtime/agents/playwright-automation-builder/knowledge/system.md +19 -0
  387. package/runtime/agents/playwright-automation-builder/templates/capability-wrapper.md +4 -0
  388. package/runtime/agents/playwright-automation-builder/templates/playwright-automation.py +12 -0
  389. package/runtime/agents/playwright-automation-builder/templates/playwright-readme.md +13 -0
  390. package/runtime/agents/playwright-automation-builder/templates/playwright-review-report.md +9 -0
  391. package/runtime/agents/playwright-automation-builder/templates/playwright-test.py +2 -0
  392. package/runtime/agents/playwright-automation-builder/tests/test_runners.py +261 -0
  393. package/runtime/agents/postgres-data-analyzer/agent.yaml +13 -2
  394. package/runtime/agents/presentation-deck-builder/agent.yaml +14 -3
  395. package/runtime/agents/presentation-deck-builder/capabilities/create-template/capability.yaml +1 -1
  396. package/runtime/agents/presentation-deck-builder/capabilities/create-template-version/capability.yaml +1 -1
  397. package/runtime/agents/presentation-deck-builder/capabilities/generate-template-input-file/capability.yaml +1 -1
  398. package/runtime/agents/presentation-deck-builder/capabilities/refine-template/capability.yaml +1 -1
  399. package/runtime/agents/presentation-deck-builder/capabilities/register-template/capability.yaml +1 -1
  400. package/runtime/agents/presentation-deck-builder/knowledge/prompts/create-template.md +1 -1
  401. package/runtime/agents/presentation-deck-builder/knowledge/prompts/generate-template-input-file.md +1 -1
  402. package/runtime/agents/provider-configurator/agent.yaml +6 -4
  403. package/runtime/agents/provider-configurator/capabilities/collect-provider-credentials/capability.yaml +1 -2
  404. package/runtime/agents/provider-configurator/capabilities/configure-provider-source/capability.yaml +1 -2
  405. package/runtime/agents/provider-configurator/capabilities/validate-provider-readiness/capability.yaml +1 -2
  406. package/runtime/agents/pyautogui-automation-builder/AGENTS.md +32 -0
  407. package/runtime/agents/pyautogui-automation-builder/README.md +44 -0
  408. package/runtime/agents/pyautogui-automation-builder/agent.yaml +45 -0
  409. package/runtime/agents/pyautogui-automation-builder/capabilities/generate-pyautogui-project-files/capability.yaml +20 -0
  410. package/runtime/agents/pyautogui-automation-builder/capabilities/generate-pyautogui-project-files/decision-rules.md +6 -0
  411. package/runtime/agents/pyautogui-automation-builder/capabilities/generate-pyautogui-project-files/runner.py +39 -0
  412. package/runtime/agents/pyautogui-automation-builder/capabilities/generate-pyautogui-project-files/workflow.md +7 -0
  413. package/runtime/agents/pyautogui-automation-builder/capabilities/generate-pyautogui-script/capability.yaml +18 -0
  414. package/runtime/agents/pyautogui-automation-builder/capabilities/generate-pyautogui-script/decision-rules.md +7 -0
  415. package/runtime/agents/pyautogui-automation-builder/capabilities/generate-pyautogui-script/runner.py +33 -0
  416. package/runtime/agents/pyautogui-automation-builder/capabilities/generate-pyautogui-script/workflow.md +7 -0
  417. package/runtime/agents/pyautogui-automation-builder/capabilities/plan-desktop-automation/capability.yaml +18 -0
  418. package/runtime/agents/pyautogui-automation-builder/capabilities/plan-desktop-automation/decision-rules.md +8 -0
  419. package/runtime/agents/pyautogui-automation-builder/capabilities/plan-desktop-automation/runner.py +33 -0
  420. package/runtime/agents/pyautogui-automation-builder/capabilities/plan-desktop-automation/workflow.md +9 -0
  421. package/runtime/agents/pyautogui-automation-builder/capabilities/review-pyautogui-script/capability.yaml +20 -0
  422. package/runtime/agents/pyautogui-automation-builder/capabilities/review-pyautogui-script/decision-rules.md +8 -0
  423. package/runtime/agents/pyautogui-automation-builder/capabilities/review-pyautogui-script/runner.py +43 -0
  424. package/runtime/agents/pyautogui-automation-builder/capabilities/review-pyautogui-script/workflow.md +7 -0
  425. package/runtime/agents/pyautogui-automation-builder/capabilities/wrap-pyautogui-as-capability/capability.yaml +22 -0
  426. package/runtime/agents/pyautogui-automation-builder/capabilities/wrap-pyautogui-as-capability/decision-rules.md +6 -0
  427. package/runtime/agents/pyautogui-automation-builder/capabilities/wrap-pyautogui-as-capability/runner.py +43 -0
  428. package/runtime/agents/pyautogui-automation-builder/capabilities/wrap-pyautogui-as-capability/workflow.md +7 -0
  429. package/runtime/agents/pyautogui-automation-builder/infra/integrations/pyautogui-automation/pyautogui_automation_repository.py +856 -0
  430. package/runtime/agents/pyautogui-automation-builder/knowledge/context.md +17 -0
  431. package/runtime/agents/pyautogui-automation-builder/knowledge/policies.yaml +24 -0
  432. package/runtime/agents/pyautogui-automation-builder/knowledge/system.md +13 -0
  433. package/runtime/agents/pyautogui-automation-builder/templates/capability-wrapper.md +3 -0
  434. package/runtime/agents/pyautogui-automation-builder/templates/pyautogui-automation.py +12 -0
  435. package/runtime/agents/pyautogui-automation-builder/templates/pyautogui-readme.md +3 -0
  436. package/runtime/agents/pyautogui-automation-builder/templates/pyautogui-review-report.md +3 -0
  437. package/runtime/agents/pyautogui-automation-builder/templates/pyautogui-test.py +2 -0
  438. package/runtime/agents/pyautogui-automation-builder/tests/test_runners.py +376 -0
  439. package/runtime/agents/python-automation-builder/AGENTS.md +25 -0
  440. package/runtime/agents/python-automation-builder/README.md +43 -0
  441. package/runtime/agents/python-automation-builder/agent.yaml +45 -0
  442. package/runtime/agents/python-automation-builder/capabilities/generate-automation-project-files/capability.yaml +20 -0
  443. package/runtime/agents/python-automation-builder/capabilities/generate-automation-project-files/decision-rules.md +6 -0
  444. package/runtime/agents/python-automation-builder/capabilities/generate-automation-project-files/runner.py +39 -0
  445. package/runtime/agents/python-automation-builder/capabilities/generate-automation-project-files/workflow.md +7 -0
  446. package/runtime/agents/python-automation-builder/capabilities/generate-python-automation/capability.yaml +18 -0
  447. package/runtime/agents/python-automation-builder/capabilities/generate-python-automation/decision-rules.md +5 -0
  448. package/runtime/agents/python-automation-builder/capabilities/generate-python-automation/runner.py +33 -0
  449. package/runtime/agents/python-automation-builder/capabilities/generate-python-automation/workflow.md +5 -0
  450. package/runtime/agents/python-automation-builder/capabilities/plan-python-automation/capability.yaml +18 -0
  451. package/runtime/agents/python-automation-builder/capabilities/plan-python-automation/decision-rules.md +6 -0
  452. package/runtime/agents/python-automation-builder/capabilities/plan-python-automation/runner.py +33 -0
  453. package/runtime/agents/python-automation-builder/capabilities/plan-python-automation/workflow.md +6 -0
  454. package/runtime/agents/python-automation-builder/capabilities/review-python-automation/capability.yaml +20 -0
  455. package/runtime/agents/python-automation-builder/capabilities/review-python-automation/decision-rules.md +6 -0
  456. package/runtime/agents/python-automation-builder/capabilities/review-python-automation/runner.py +43 -0
  457. package/runtime/agents/python-automation-builder/capabilities/review-python-automation/workflow.md +5 -0
  458. package/runtime/agents/python-automation-builder/capabilities/wrap-automation-as-capability/capability.yaml +22 -0
  459. package/runtime/agents/python-automation-builder/capabilities/wrap-automation-as-capability/decision-rules.md +6 -0
  460. package/runtime/agents/python-automation-builder/capabilities/wrap-automation-as-capability/runner.py +43 -0
  461. package/runtime/agents/python-automation-builder/capabilities/wrap-automation-as-capability/workflow.md +6 -0
  462. package/runtime/agents/python-automation-builder/infra/integrations/python-automation/python_automation_repository.py +717 -0
  463. package/runtime/agents/python-automation-builder/knowledge/context.md +15 -0
  464. package/runtime/agents/python-automation-builder/knowledge/policies.yaml +12 -0
  465. package/runtime/agents/python-automation-builder/knowledge/system.md +19 -0
  466. package/runtime/agents/python-automation-builder/templates/automation-readme.md +13 -0
  467. package/runtime/agents/python-automation-builder/templates/automation-review-report.md +13 -0
  468. package/runtime/agents/python-automation-builder/templates/automation-test.py +9 -0
  469. package/runtime/agents/python-automation-builder/templates/automation.py +19 -0
  470. package/runtime/agents/python-automation-builder/templates/capability-wrapper.md +4 -0
  471. package/runtime/agents/python-automation-builder/tests/test_runners.py +292 -0
  472. package/runtime/agents/selenium-automation-builder/AGENTS.md +27 -0
  473. package/runtime/agents/selenium-automation-builder/README.md +40 -0
  474. package/runtime/agents/selenium-automation-builder/agent.yaml +45 -0
  475. package/runtime/agents/selenium-automation-builder/capabilities/generate-selenium-project-files/capability.yaml +20 -0
  476. package/runtime/agents/selenium-automation-builder/capabilities/generate-selenium-project-files/decision-rules.md +6 -0
  477. package/runtime/agents/selenium-automation-builder/capabilities/generate-selenium-project-files/runner.py +39 -0
  478. package/runtime/agents/selenium-automation-builder/capabilities/generate-selenium-project-files/workflow.md +7 -0
  479. package/runtime/agents/selenium-automation-builder/capabilities/generate-selenium-script/capability.yaml +18 -0
  480. package/runtime/agents/selenium-automation-builder/capabilities/generate-selenium-script/decision-rules.md +6 -0
  481. package/runtime/agents/selenium-automation-builder/capabilities/generate-selenium-script/runner.py +33 -0
  482. package/runtime/agents/selenium-automation-builder/capabilities/generate-selenium-script/workflow.md +6 -0
  483. package/runtime/agents/selenium-automation-builder/capabilities/plan-selenium-automation/capability.yaml +18 -0
  484. package/runtime/agents/selenium-automation-builder/capabilities/plan-selenium-automation/decision-rules.md +6 -0
  485. package/runtime/agents/selenium-automation-builder/capabilities/plan-selenium-automation/runner.py +33 -0
  486. package/runtime/agents/selenium-automation-builder/capabilities/plan-selenium-automation/workflow.md +6 -0
  487. package/runtime/agents/selenium-automation-builder/capabilities/review-selenium-script/capability.yaml +20 -0
  488. package/runtime/agents/selenium-automation-builder/capabilities/review-selenium-script/decision-rules.md +6 -0
  489. package/runtime/agents/selenium-automation-builder/capabilities/review-selenium-script/runner.py +40 -0
  490. package/runtime/agents/selenium-automation-builder/capabilities/review-selenium-script/workflow.md +6 -0
  491. package/runtime/agents/selenium-automation-builder/capabilities/wrap-selenium-as-capability/capability.yaml +22 -0
  492. package/runtime/agents/selenium-automation-builder/capabilities/wrap-selenium-as-capability/decision-rules.md +6 -0
  493. package/runtime/agents/selenium-automation-builder/capabilities/wrap-selenium-as-capability/runner.py +43 -0
  494. package/runtime/agents/selenium-automation-builder/capabilities/wrap-selenium-as-capability/workflow.md +6 -0
  495. package/runtime/agents/selenium-automation-builder/infra/integrations/selenium-automation/selenium_automation_repository.py +793 -0
  496. package/runtime/agents/selenium-automation-builder/knowledge/context.md +15 -0
  497. package/runtime/agents/selenium-automation-builder/knowledge/policies.yaml +17 -0
  498. package/runtime/agents/selenium-automation-builder/knowledge/system.md +18 -0
  499. package/runtime/agents/selenium-automation-builder/templates/capability-wrapper.md +4 -0
  500. package/runtime/agents/selenium-automation-builder/templates/selenium-automation.py +20 -0
  501. package/runtime/agents/selenium-automation-builder/templates/selenium-readme.md +13 -0
  502. package/runtime/agents/selenium-automation-builder/templates/selenium-review-report.md +13 -0
  503. package/runtime/agents/selenium-automation-builder/templates/selenium-test.py +9 -0
  504. package/runtime/agents/selenium-automation-builder/tests/test_runners.py +282 -0
  505. package/runtime/agents/shared-memory-curator/AGENTS.md +5 -0
  506. package/runtime/agents/shared-memory-curator/README.md +6 -0
  507. package/runtime/agents/shared-memory-curator/agent.yaml +38 -0
  508. package/runtime/agents/shared-memory-curator/capabilities/create-shared-memory/capability.yaml +19 -0
  509. package/runtime/agents/shared-memory-curator/capabilities/create-shared-memory/decision-rules.md +5 -0
  510. package/runtime/agents/shared-memory-curator/capabilities/create-shared-memory/workflow.md +5 -0
  511. package/runtime/agents/shared-memory-curator/capabilities/publish-shared-submission/capability.yaml +19 -0
  512. package/runtime/agents/shared-memory-curator/capabilities/publish-shared-submission/decision-rules.md +5 -0
  513. package/runtime/agents/shared-memory-curator/capabilities/publish-shared-submission/workflow.md +5 -0
  514. package/runtime/agents/shared-memory-curator/capabilities/review-shared-submission/capability.yaml +19 -0
  515. package/runtime/agents/shared-memory-curator/capabilities/review-shared-submission/decision-rules.md +5 -0
  516. package/runtime/agents/shared-memory-curator/capabilities/review-shared-submission/workflow.md +5 -0
  517. package/runtime/agents/shared-memory-curator/infra/.gitkeep +1 -0
  518. package/runtime/agents/shared-memory-curator/knowledge/context.md +5 -0
  519. package/runtime/agents/shared-memory-curator/knowledge/system.md +4 -0
  520. package/runtime/agents/shared-memory-curator/templates/.gitkeep +1 -0
  521. package/runtime/agents/software-specification-analyst/agent.yaml +17 -4
  522. package/runtime/agents/software-specification-analyst/capabilities/analyze-multiple-projects/capability.yaml +1 -1
  523. package/runtime/agents/software-specification-analyst/capabilities/analyze-project-context/capability.yaml +1 -1
  524. package/runtime/agents/software-specification-analyst/capabilities/conduct-requirements-interview/capability.yaml +1 -1
  525. package/runtime/agents/software-specification-analyst/capabilities/create-complete-spec/capability.yaml +1 -1
  526. package/runtime/agents/software-specification-analyst/capabilities/create-final-spec-from-analysis/capability.yaml +1 -1
  527. package/runtime/agents/software-specification-analyst/capabilities/create-functional-spec/capability.yaml +11 -0
  528. package/runtime/agents/software-specification-analyst/capabilities/create-technical-spec/capability.yaml +12 -0
  529. package/runtime/agents/software-specification-analyst/capabilities/refine-analysis-with-feedback/capability.yaml +1 -1
  530. package/runtime/agents/software-specification-analyst/capabilities/write-user-stories/capability.yaml +12 -0
  531. package/runtime/agents/sqlserver-change-operator/agent.yaml +12 -1
  532. package/runtime/agents/sqlserver-data-analyzer/agent.yaml +13 -2
  533. package/runtime/agents/supabase-project-analyst/AGENTS.md +29 -0
  534. package/runtime/agents/supabase-project-analyst/README.md +23 -0
  535. package/runtime/agents/supabase-project-analyst/agent.yaml +53 -0
  536. package/runtime/agents/supabase-project-analyst/capabilities/audit-auth-security/capability.yaml +18 -0
  537. package/runtime/agents/supabase-project-analyst/capabilities/audit-auth-security/decision-rules.md +5 -0
  538. package/runtime/agents/supabase-project-analyst/capabilities/audit-auth-security/runner.py +32 -0
  539. package/runtime/agents/supabase-project-analyst/capabilities/audit-auth-security/workflow.md +6 -0
  540. package/runtime/agents/supabase-project-analyst/capabilities/audit-rls-policies/capability.yaml +18 -0
  541. package/runtime/agents/supabase-project-analyst/capabilities/audit-rls-policies/decision-rules.md +6 -0
  542. package/runtime/agents/supabase-project-analyst/capabilities/audit-rls-policies/runner.py +32 -0
  543. package/runtime/agents/supabase-project-analyst/capabilities/audit-rls-policies/workflow.md +7 -0
  544. package/runtime/agents/supabase-project-analyst/capabilities/audit-storage-policies/capability.yaml +18 -0
  545. package/runtime/agents/supabase-project-analyst/capabilities/audit-storage-policies/decision-rules.md +5 -0
  546. package/runtime/agents/supabase-project-analyst/capabilities/audit-storage-policies/runner.py +32 -0
  547. package/runtime/agents/supabase-project-analyst/capabilities/audit-storage-policies/workflow.md +6 -0
  548. package/runtime/agents/supabase-project-analyst/capabilities/generate-supabase-report/capability.yaml +18 -0
  549. package/runtime/agents/supabase-project-analyst/capabilities/generate-supabase-report/decision-rules.md +6 -0
  550. package/runtime/agents/supabase-project-analyst/capabilities/generate-supabase-report/runner.py +32 -0
  551. package/runtime/agents/supabase-project-analyst/capabilities/generate-supabase-report/workflow.md +6 -0
  552. package/runtime/agents/supabase-project-analyst/capabilities/inspect-supabase-project/capability.yaml +19 -0
  553. package/runtime/agents/supabase-project-analyst/capabilities/inspect-supabase-project/decision-rules.md +6 -0
  554. package/runtime/agents/supabase-project-analyst/capabilities/inspect-supabase-project/runner.py +36 -0
  555. package/runtime/agents/supabase-project-analyst/capabilities/inspect-supabase-project/workflow.md +7 -0
  556. package/runtime/agents/supabase-project-analyst/capabilities/plan-supabase-fix/capability.yaml +18 -0
  557. package/runtime/agents/supabase-project-analyst/capabilities/plan-supabase-fix/decision-rules.md +6 -0
  558. package/runtime/agents/supabase-project-analyst/capabilities/plan-supabase-fix/runner.py +32 -0
  559. package/runtime/agents/supabase-project-analyst/capabilities/plan-supabase-fix/workflow.md +6 -0
  560. package/runtime/agents/supabase-project-analyst/capabilities/review-migrations/capability.yaml +18 -0
  561. package/runtime/agents/supabase-project-analyst/capabilities/review-migrations/decision-rules.md +6 -0
  562. package/runtime/agents/supabase-project-analyst/capabilities/review-migrations/runner.py +32 -0
  563. package/runtime/agents/supabase-project-analyst/capabilities/review-migrations/workflow.md +5 -0
  564. package/runtime/agents/supabase-project-analyst/infra/integrations/supabase-project/supabase_project_repository.py +589 -0
  565. package/runtime/agents/supabase-project-analyst/knowledge/context.md +11 -0
  566. package/runtime/agents/supabase-project-analyst/knowledge/policies.yaml +24 -0
  567. package/runtime/agents/supabase-project-analyst/knowledge/system.md +10 -0
  568. package/runtime/agents/supabase-project-analyst/templates/supabase-audit.md +3 -0
  569. package/runtime/agents/supabase-project-analyst/templates/supabase-fix-plan.md +3 -0
  570. package/runtime/agents/supabase-project-analyst/templates/supabase-inspection.md +3 -0
  571. package/runtime/agents/supabase-project-analyst/templates/supabase-report.md +3 -0
  572. package/runtime/agents/supabase-project-analyst/tests/test_runners.py +239 -0
  573. package/runtime/agents/task-orchestrator/agent.yaml +25 -3
  574. package/runtime/agents/task-orchestrator/capabilities/plan-task/capability.yaml +1 -2
  575. package/runtime/agents/task-orchestrator/capabilities/select-specialists/capability.yaml +1 -2
  576. package/runtime/agents/technical-integration-analyst/agent.yaml +15 -2
  577. package/runtime/agents/topdesk-orchestrator/agent.yaml +10 -2
  578. package/runtime/cli/README.md +35 -4
  579. package/runtime/cli/aikit/__init__.py +1 -1
  580. package/runtime/cli/aikit/acceptance.py +166 -0
  581. package/runtime/cli/aikit/agent_executor.py +26 -3
  582. package/runtime/cli/aikit/agent_registry.py +247 -6
  583. package/runtime/cli/aikit/agentic_commands.py +158 -0
  584. package/runtime/cli/aikit/app_home.py +1 -0
  585. package/runtime/cli/aikit/architecture.py +84 -0
  586. package/runtime/cli/aikit/audit.py +187 -8
  587. package/runtime/cli/aikit/autonomy.py +237 -0
  588. package/runtime/cli/aikit/capability_runtime.py +522 -0
  589. package/runtime/cli/aikit/catalog.py +516 -0
  590. package/runtime/cli/aikit/cli_dispatch.py +1554 -0
  591. package/runtime/cli/aikit/cli_parser.py +547 -0
  592. package/runtime/cli/aikit/collaboration.py +359 -0
  593. package/runtime/cli/aikit/configuration_orchestrator.py +52 -26
  594. package/runtime/cli/aikit/contribution.py +235 -0
  595. package/runtime/cli/aikit/core/__init__.py +1 -0
  596. package/runtime/cli/aikit/core/capability_contract.py +112 -0
  597. package/runtime/cli/aikit/core/requests.py +69 -0
  598. package/runtime/cli/aikit/core/runtime.py +64 -0
  599. package/runtime/cli/aikit/diagnostics.py +8 -2
  600. package/runtime/cli/aikit/doctor_runtime.py +164 -0
  601. package/runtime/cli/aikit/errors.py +7 -0
  602. package/runtime/cli/aikit/eval.py +504 -0
  603. package/runtime/cli/aikit/execution_reviewer.py +21 -0
  604. package/runtime/cli/aikit/extensions.py +140 -0
  605. package/runtime/cli/aikit/fallback.py +1 -0
  606. package/runtime/cli/aikit/github_pr.py +23 -0
  607. package/runtime/cli/aikit/guardrails.py +25 -10
  608. package/runtime/cli/aikit/human_output.py +1332 -0
  609. package/runtime/cli/aikit/impact_map.py +294 -0
  610. package/runtime/cli/aikit/interactive_wizard.py +227 -0
  611. package/runtime/cli/aikit/knowledge_base.py +1067 -0
  612. package/runtime/cli/aikit/llm.py +12 -4
  613. package/runtime/cli/aikit/local_artifacts.py +444 -0
  614. package/runtime/cli/aikit/local_llm.py +161 -0
  615. package/runtime/cli/aikit/local_llm_operator.py +35 -1
  616. package/runtime/cli/aikit/main.py +23 -2833
  617. package/runtime/cli/aikit/mcp_manifest.py +1027 -0
  618. package/runtime/cli/aikit/mcp_server.py +132 -0
  619. package/runtime/cli/aikit/mcp_tools.py +900 -0
  620. package/runtime/cli/aikit/memory.py +405 -0
  621. package/runtime/cli/aikit/mini_brain.py +246 -0
  622. package/runtime/cli/aikit/model_router.py +182 -18
  623. package/runtime/cli/aikit/module_controller.py +335 -0
  624. package/runtime/cli/aikit/natural_prompt_runtime.py +662 -0
  625. package/runtime/cli/aikit/notifications.py +716 -2
  626. package/runtime/cli/aikit/ollama.py +64 -14
  627. package/runtime/cli/aikit/onboarding.py +551 -0
  628. package/runtime/cli/aikit/orchestrator.py +809 -119
  629. package/runtime/cli/aikit/output.py +130 -2
  630. package/runtime/cli/aikit/permissions.py +14 -4
  631. package/runtime/cli/aikit/prompt_injection.py +68 -0
  632. package/runtime/cli/aikit/review_gate.py +38 -6
  633. package/runtime/cli/aikit/roadmap.py +195 -0
  634. package/runtime/cli/aikit/roadmap_cli.py +70 -0
  635. package/runtime/cli/aikit/router.py +41 -12
  636. package/runtime/cli/aikit/router_explain.py +152 -0
  637. package/runtime/cli/aikit/runtime_paths.py +11 -0
  638. package/runtime/cli/aikit/secrets.py +114 -0
  639. package/runtime/cli/aikit/sessions.py +88 -2
  640. package/runtime/cli/aikit/setup_wizard_payload.py +35 -0
  641. package/runtime/cli/aikit/shared_memory.py +415 -0
  642. package/runtime/cli/aikit/sources.py +298 -50
  643. package/runtime/cli/aikit/specialist_readiness.py +152 -0
  644. package/runtime/cli/aikit/tasks.py +553 -22
  645. package/runtime/cli/aikit/team.py +380 -0
  646. package/runtime/cli/aikit/toolchain.py +7 -2
  647. package/runtime/cli/aikit/wizard_state.py +15 -1
  648. package/runtime/cli/aikit/workflows.py +216 -0
  649. package/runtime/cli/aikit/write_policy.py +108 -0
  650. package/runtime/plugins/claude-code-ai-devkit/README.md +17 -0
  651. package/runtime/plugins/claude-code-ai-devkit/agents/README.md +29 -2
  652. package/runtime/plugins/claude-code-ai-devkit/agents/agent-devkit-db-analyst.md +44 -0
  653. package/runtime/plugins/claude-code-ai-devkit/agents/agent-devkit-execution-reviewer.md +38 -0
  654. package/runtime/plugins/claude-code-ai-devkit/agents/agent-devkit-pr-reviewer.md +42 -0
  655. package/runtime/plugins/claude-code-ai-devkit/agents/agent-devkit-repo-explorer.md +40 -0
  656. package/runtime/plugins/claude-code-ai-devkit/agents/agent-devkit-support-triage.md +43 -0
  657. package/runtime/plugins/claude-code-ai-devkit/plugin.json +1 -1
  658. package/runtime/plugins/claude-code-ai-devkit/skills/ai-devkit-router/SKILL.md +16 -0
  659. package/runtime/plugins/claude-skill-ai-devkit/ai-devkit/SKILL.md +1 -0
  660. package/runtime/plugins/claude-skill-ai-devkit/ai-devkit/references/subagents.md +21 -0
  661. package/runtime/plugins/claude-skill-ai-devkit/plugin.json +1 -1
  662. package/runtime/providers/azure-devops.yaml +9 -0
  663. package/runtime/providers/github.yaml +4 -0
  664. package/runtime/providers/knowledge-github.yaml +40 -0
  665. package/runtime/providers/knowledge-google-drive.yaml +32 -0
  666. package/runtime/providers/knowledge-local.yaml +26 -0
  667. package/runtime/providers/knowledge-notion.yaml +32 -0
  668. package/runtime/providers/knowledge-obsidian.yaml +24 -0
  669. package/runtime/providers/knowledge-onedrive.yaml +36 -0
  670. package/runtime/providers/knowledge-s3.yaml +45 -0
  671. package/runtime/providers/knowledge-sharepoint.yaml +39 -0
  672. package/runtime/providers/knowledge-supabase.yaml +43 -0
  673. package/runtime/providers/knowledge-vector.yaml +39 -0
  674. package/runtime/providers/local-notification.yaml +5 -2
  675. package/runtime/providers/local-scheduler.yaml +1 -1
  676. package/runtime/providers/supabase.yaml +46 -0
  677. package/runtime/requirements.txt +6 -0
  678. package/runtime/scripts/docker-cli-qa.sh +453 -0
  679. package/runtime/scripts/release-catalog-snapshot.json +594 -0
  680. package/runtime/scripts/release-gate.py +189 -8
  681. package/runtime/scripts/validate-repo.py +312 -0
  682. package/runtime/tooling/toolchain.yaml +92 -0
  683. package/runtime/vendor/skills/napkin/napkin.md +32 -12
  684. package/runtime/workflows/azure-card-analysis/README.md +3 -0
  685. package/runtime/workflows/azure-card-analysis/workflow.yaml +30 -0
  686. package/runtime/workflows/daily-pr-review/README.md +3 -0
  687. package/runtime/workflows/daily-pr-review/workflow.yaml +31 -0
  688. package/runtime/workflows/incident-analysis/README.md +3 -0
  689. package/runtime/workflows/incident-analysis/workflow.yaml +33 -0
  690. package/runtime/workflows/release-prep/README.md +3 -0
  691. package/runtime/workflows/release-prep/workflow.yaml +30 -0
@@ -0,0 +1,662 @@
1
+ """Natural-language prompt runtime for `agent <prompt>`."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import argparse
6
+ import re
7
+ from pathlib import Path
8
+ from typing import Any
9
+
10
+ from cli.aikit.agent_registry import load_agent_registry
11
+ from cli.aikit.agent_executor import execute_plan_tasks
12
+ from cli.aikit.capability_runtime import load_agent, run_capability
13
+ from cli.aikit.calendar import calendar_summary, calendar_today, calendar_tomorrow
14
+ from cli.aikit.control_router import dispatch_natural_control_prompt as route_natural_control_prompt
15
+ from cli.aikit.control_router import plan_natural_control_prompt
16
+ from cli.aikit.core.requests import AgentPromptRequest
17
+ from cli.aikit.errors import DevKitError
18
+ from cli.aikit.execution_reviewer import enforce_execution_review
19
+ from cli.aikit.github_pr import planned_pr_commands, pr_create_automation, pr_list_review_requests, summarize_pr_list
20
+ from cli.aikit.identity import enforce_identity_response, is_identity_question, local_identity_response, public_name
21
+ from cli.aikit.llm import invoke_agent_prompt
22
+ from cli.aikit.local_llm_operator import enrich_prompt_with_local_result, maybe_delegate_local_llm
23
+ from cli.aikit.memory import napkin_context, record_usage
24
+ from cli.aikit.model_router import build_model_plan
25
+ from cli.aikit.module_controller import run_module_controller
26
+ from cli.aikit.orchestrator import attach_source_to_primary_task, build_execution_plan, mark_plan_after_execution, mark_review_task
27
+ from cli.aikit.personality import load_personality, update_personality
28
+ from cli.aikit.provider_wizard import missing_source_wizard
29
+ from cli.aikit.review_gate import build_review_gate
30
+ from cli.aikit.router import route_prompt
31
+ from cli.aikit.runtime_paths import ROOT
32
+ from cli.aikit.sessions import build_contextual_prompt, get_or_create_session, record_exchange
33
+ from cli.aikit.setup_wizard_payload import persist_setup_wizard_payload
34
+ from cli.aikit.sources import SourceRegistryError, public_source, resolve_source
35
+
36
+
37
+ def effective_dry_run(args: argparse.Namespace) -> bool:
38
+ return bool(getattr(args, "dry_run", False) or getattr(args, "global_dry_run", False))
39
+
40
+
41
+ def parse_rename_prompt(prompt: str) -> str | None:
42
+ text = " ".join(prompt.strip().split())
43
+ patterns = [
44
+ r"(?i)\b(?:mude|troque|altere|renomeie)\s+(?:o\s+)?seu\s+nome\s+para\s+(.+)$",
45
+ r"(?i)\b(?:seu\s+nome\s+agora\s+e|seu\s+nome\s+agora\s+é)\s+(.+)$",
46
+ r"(?i)\b(?:teu\s+nome\s+agora\s+e|teu\s+nome\s+agora\s+é)\s+(.+)$",
47
+ ]
48
+ for pattern in patterns:
49
+ match = re.search(pattern, text)
50
+ if not match:
51
+ continue
52
+ value = clean_requested_name(match.group(1))
53
+ if value:
54
+ return value
55
+ return None
56
+
57
+
58
+ def clean_requested_name(value: str) -> str | None:
59
+ cleaned = " ".join(value.strip().strip("\"'`.,;:!").split())
60
+ if not cleaned:
61
+ return None
62
+ return cleaned[:80]
63
+
64
+
65
+ def is_capabilities_help_prompt(prompt: str) -> bool:
66
+ normalized = normalize_text(prompt)
67
+ if normalized in {"ajuda", "help", "o que voce faz", "o que voce consegue fazer"}:
68
+ return True
69
+ capability_markers = (
70
+ "o que voce consegue fazer",
71
+ "o que voce pode fazer",
72
+ "como voce pode ajudar",
73
+ "como usar o agent",
74
+ "como usar voce",
75
+ "quais suas capacidades",
76
+ "quais sao suas capacidades",
77
+ "quais agentes voce tem",
78
+ "que agentes voce tem",
79
+ )
80
+ return any(marker in normalized for marker in capability_markers)
81
+
82
+
83
+ def normalize_text(value: str) -> str:
84
+ replacements = str.maketrans(
85
+ {
86
+ "á": "a",
87
+ "à": "a",
88
+ "ã": "a",
89
+ "â": "a",
90
+ "é": "e",
91
+ "ê": "e",
92
+ "í": "i",
93
+ "ó": "o",
94
+ "õ": "o",
95
+ "ô": "o",
96
+ "ú": "u",
97
+ "ç": "c",
98
+ }
99
+ )
100
+ text = value.lower().translate(replacements)
101
+ return " ".join(re.sub(r"[^a-z0-9._:-]+", " ", text).split())
102
+
103
+
104
+ def local_capabilities_help_response(prompt: str, *, name: str) -> dict[str, Any]:
105
+ registry = load_agent_registry(ROOT)
106
+ agents = registry.get("agents") if isinstance(registry.get("agents"), dict) else {}
107
+ capabilities = registry.get("capabilities") if isinstance(registry.get("capabilities"), dict) else {}
108
+ examples = [
109
+ 'agent "analise o card 7914 do projeto sustentacao no azure"',
110
+ 'agent "mude seu nome para Ianota"',
111
+ "agent onboard minimal",
112
+ "agent catalog search pr",
113
+ "agent mcp tools",
114
+ "agent memory show",
115
+ ]
116
+ response = (
117
+ f"Eu sou {name}. Posso operar como harness/agente local do Agent DevKit: "
118
+ "validar onboarding, lembrar preferencias locais, rotear pedidos para agentes especialistas, "
119
+ "criar wizards de configuracao quando faltar provider/source, executar capabilities deterministicas, "
120
+ "expor ferramentas via MCP, preparar automacoes locais e usar LLMs configuradas quando a tarefa exigir raciocinio aberto. "
121
+ f"Neste runtime encontrei {len(agents)} agentes e {len(capabilities)} capabilities."
122
+ )
123
+ return {
124
+ "kind": "agent",
125
+ "status": "ok",
126
+ "ok": True,
127
+ "requires_llm": False,
128
+ "prompt_received": True,
129
+ "prompt_length": len(prompt),
130
+ "mode": "local-capabilities-help",
131
+ "identity": {"name": name, "source": "local"},
132
+ "response": response,
133
+ "catalog": {
134
+ "agents": len(agents),
135
+ "capabilities": len(capabilities),
136
+ },
137
+ "next_steps": examples,
138
+ }
139
+
140
+
141
+ def agent_requires_llm(args: argparse.Namespace) -> dict[str, Any]:
142
+ prompt = " ".join(args.prompt).strip()
143
+ return run_agent_prompt_request(
144
+ AgentPromptRequest(
145
+ prompt=prompt,
146
+ llm=args.llm,
147
+ dry_run=effective_dry_run(args),
148
+ session_id=args.session_id,
149
+ new_session=args.new_session,
150
+ no_llm_fallback=args.no_llm_fallback,
151
+ prog_name=getattr(args, "prog_name", "agent"),
152
+ project=str(Path.cwd()),
153
+ )
154
+ )
155
+
156
+
157
+ def run_agent_prompt_request(request: AgentPromptRequest) -> dict[str, Any]:
158
+ prompt = request.prompt.strip()
159
+ if not prompt:
160
+ raise DevKitError("agent requires a natural-language prompt")
161
+ if request.dry_run:
162
+ return build_agent_dry_run_plan(prompt, request)
163
+ try:
164
+ session = get_or_create_session(
165
+ session_id=request.session_id,
166
+ force_new=request.new_session,
167
+ prompt=prompt,
168
+ project=request.project or str(Path.cwd()),
169
+ backend=request.llm,
170
+ )
171
+ except ValueError as exc:
172
+ raise DevKitError(str(exc)) from exc
173
+ personality = load_personality()
174
+ name = public_name(personality=personality, invoked_as=request.prog_name)
175
+ rename = parse_rename_prompt(prompt)
176
+ if rename:
177
+ updated = update_personality(agent_name=rename)
178
+ result = {
179
+ "kind": "agent",
180
+ "status": "ok",
181
+ "ok": True,
182
+ "requires_llm": False,
183
+ "prompt_received": True,
184
+ "prompt_length": len(prompt),
185
+ "identity": {"name": updated.get("agent_name"), "source": "local"},
186
+ "action": "rename",
187
+ "response": f"Pronto. Meu nome local agora e {updated.get('agent_name')}.",
188
+ }
189
+ return finalize_agent_session(result, session, prompt, backend=request.llm)
190
+ if is_identity_question(prompt):
191
+ result = {
192
+ "kind": "agent",
193
+ "status": "ok",
194
+ "ok": True,
195
+ "requires_llm": False,
196
+ "prompt_received": True,
197
+ "prompt_length": len(prompt),
198
+ "identity": {"name": name, "source": "local"},
199
+ "response": local_identity_response(prompt, name=name),
200
+ }
201
+ return finalize_agent_session(result, session, prompt, backend=request.llm)
202
+ if is_capabilities_help_prompt(prompt):
203
+ return finalize_agent_session(
204
+ local_capabilities_help_response(prompt, name=name),
205
+ session,
206
+ prompt,
207
+ backend=request.llm,
208
+ )
209
+ natural_result = dispatch_natural_operational_prompt(prompt)
210
+ if natural_result:
211
+ return finalize_agent_session(natural_result, session, prompt, backend=request.llm)
212
+ route = route_prompt(prompt, ROOT)
213
+ if route:
214
+ result = invoke_agentic_route(prompt, route)
215
+ return finalize_agent_session(result, session, prompt, backend=request.llm)
216
+ contextual_prompt = build_contextual_prompt(str(session["id"]), prompt)
217
+ execution_plan = build_execution_plan(ROOT, prompt, dry_run=False)
218
+ routing_decision = execution_plan.get("routing_decision") if isinstance(execution_plan.get("routing_decision"), dict) else {}
219
+ if routing_decision.get("status") in {"ambiguous", "low-confidence"}:
220
+ result = agentic_routing_needs_input_from_plan(prompt, execution_plan)
221
+ return finalize_agent_session(result, session, prompt, backend=request.llm)
222
+ if execution_plan.get("configuration_tasks"):
223
+ result = agentic_needs_input_from_plan(prompt, execution_plan)
224
+ return finalize_agent_session(result, session, prompt, backend=request.llm)
225
+ model_plan = (
226
+ execution_plan.get("model_plan")
227
+ if isinstance(execution_plan.get("model_plan"), dict)
228
+ else build_model_plan(prompt)
229
+ )
230
+ if model_plan.get("strategy") == "human":
231
+ result = agentic_model_strategy_needs_input_from_plan(prompt, execution_plan, model_plan)
232
+ return finalize_agent_session(result, session, prompt, backend=request.llm)
233
+ review_gate = (
234
+ execution_plan.get("review_gate")
235
+ if isinstance(execution_plan.get("review_gate"), dict)
236
+ else build_review_gate(prompt, model_plan=model_plan)
237
+ )
238
+ local_llm_execution = maybe_delegate_local_llm(prompt, model_plan)
239
+ coordinator_prompt = enrich_prompt_with_local_result(contextual_prompt, local_llm_execution)
240
+ result = invoke_agent_prompt(
241
+ coordinator_prompt,
242
+ request.llm,
243
+ public_name=name,
244
+ allow_fallback=not request.no_llm_fallback,
245
+ )
246
+ review_result = {
247
+ "kind": "execution-review",
248
+ "agent_id": "execution-reviewer",
249
+ "capability_id": "review-final-output",
250
+ "status": "not-run",
251
+ "ok": False,
252
+ }
253
+ if result.get("ok"):
254
+ result, review_gate, review_result = enforce_execution_review(
255
+ prompt=prompt,
256
+ result=result,
257
+ review_gate=review_gate,
258
+ execution_plan=execution_plan,
259
+ producer_backend=str(result.get("llm_backend") or request.llm or ""),
260
+ )
261
+ if review_result.get("ok"):
262
+ execution_plan = mark_review_task(execution_plan, reviewer=str(review_result.get("llm_backend") or "execution-reviewer"))
263
+ elif review_gate.get("status") == "needs-review":
264
+ execution_plan = mark_review_task_needs_review(execution_plan, review_result)
265
+ result["model_plan"] = model_plan
266
+ result["local_llm_execution"] = local_llm_execution
267
+ result["review_gate"] = review_gate
268
+ result["review_result"] = review_result
269
+ result["review_task"] = execution_plan.get("review_task")
270
+ result["execution_plan"] = execution_plan
271
+ result["orchestration_trace"] = execution_plan.get("trace", [])
272
+ result["prompt_length"] = len(prompt)
273
+ result["session_context_applied"] = contextual_prompt != prompt
274
+ result["local_context_applied"] = coordinator_prompt != contextual_prompt
275
+ if result.get("response"):
276
+ result["response"] = enforce_identity_response(str(result["response"]), prompt, name=name)
277
+ result["identity"] = {"name": name, "source": "local"}
278
+ return finalize_agent_session(result, session, prompt, backend=result.get("llm_backend") or request.llm)
279
+
280
+
281
+ def mark_review_task_needs_review(execution_plan: dict[str, Any], review_result: dict[str, Any]) -> dict[str, Any]:
282
+ task = dict(execution_plan.get("review_task") or {})
283
+ if task:
284
+ task["status"] = "needs-review"
285
+ task["reviewer"] = None
286
+ task["message"] = review_result.get("message")
287
+ execution_plan["review_task"] = task
288
+ return execution_plan
289
+
290
+
291
+ def agentic_needs_input_from_plan(prompt: str, execution_plan: dict[str, Any]) -> dict[str, Any]:
292
+ configuration_task = next(
293
+ (task for task in execution_plan.get("configuration_tasks") or [] if isinstance(task, dict)),
294
+ {},
295
+ )
296
+ wizard = configuration_task.get("setup_wizard") if isinstance(configuration_task.get("setup_wizard"), dict) else {}
297
+ provider = configuration_task.get("provider") or wizard.get("provider")
298
+ payload = {
299
+ "kind": "agent",
300
+ "status": "needs-input",
301
+ "ok": False,
302
+ "mode": "agentic-plan",
303
+ "prompt_received": True,
304
+ "prompt_length": len(prompt),
305
+ "provider": provider,
306
+ "source_provider": provider,
307
+ "requires_source": True,
308
+ "execution_plan": execution_plan,
309
+ "orchestration_trace": execution_plan.get("trace", []),
310
+ "setup_wizard": wizard,
311
+ "next_question": wizard.get("next_question"),
312
+ "message": wizard.get("message") or "O plano multiagente precisa de configuracao antes de executar.",
313
+ "next_steps": [
314
+ "Responda a pergunta do wizard para autorizar ou negar a configuracao deste provider.",
315
+ "Depois de configurar a fonte, reexecute ou retome o mesmo prompt.",
316
+ ],
317
+ "exit_code": 2,
318
+ }
319
+ return persist_setup_wizard_payload(payload, execution_plan=execution_plan)
320
+
321
+
322
+ def agentic_routing_needs_input_from_plan(prompt: str, execution_plan: dict[str, Any]) -> dict[str, Any]:
323
+ routing_decision = execution_plan.get("routing_decision") if isinstance(execution_plan.get("routing_decision"), dict) else {}
324
+ payload = {
325
+ "kind": "agent",
326
+ "status": "needs-input",
327
+ "ok": False,
328
+ "mode": "agentic-routing",
329
+ "prompt_received": True,
330
+ "prompt_length": len(prompt),
331
+ "requires_routing_confirmation": True,
332
+ "routing_decision": routing_decision,
333
+ "matches": routing_decision.get("candidates") or [],
334
+ "execution_plan": execution_plan,
335
+ "orchestration_trace": execution_plan.get("trace", []),
336
+ "message": "O roteamento do prompt ficou ambiguo ou com baixa confianca.",
337
+ "next_steps": [
338
+ "Confirme qual agente/capability deve tratar o pedido ou reformule o prompt com mais contexto.",
339
+ "Use `agent --dry-run \"...\"` para inspecionar candidatos sem executar.",
340
+ ],
341
+ "exit_code": 2,
342
+ }
343
+ return payload
344
+
345
+
346
+ def agentic_model_strategy_needs_input_from_plan(
347
+ prompt: str,
348
+ execution_plan: dict[str, Any],
349
+ model_plan: dict[str, Any],
350
+ ) -> dict[str, Any]:
351
+ execution_plan["status"] = "needs-input"
352
+ execution_plan["model_plan"] = model_plan
353
+ trace = list(execution_plan.get("trace") or [])
354
+ trace.append({"agent_id": "task-orchestrator", "action": "model-strategy", "status": "waiting-for-human"})
355
+ execution_plan["trace"] = trace
356
+ return {
357
+ "kind": "agent",
358
+ "status": "needs-input",
359
+ "ok": False,
360
+ "mode": "model-strategy",
361
+ "prompt_received": True,
362
+ "prompt_length": len(prompt),
363
+ "requires_human_confirmation": True,
364
+ "model_plan": model_plan,
365
+ "execution_plan": execution_plan,
366
+ "orchestration_trace": execution_plan.get("trace", []),
367
+ "message": model_plan.get("reason") or "A politica de modelo exige confirmacao humana antes de executar.",
368
+ "next_steps": [
369
+ "Confirme explicitamente a acao permitida ou reformule o pedido removendo decisoes destrutivas/sensiveis.",
370
+ "Use `agent --dry-run \"...\"` para inspecionar a estrategia e os gates sem executar.",
371
+ ],
372
+ "exit_code": 2,
373
+ }
374
+
375
+
376
+ def dispatch_natural_operational_prompt(prompt: str) -> dict[str, Any] | None:
377
+ normalized = " ".join(prompt.lower().split())
378
+ control_result = dispatch_natural_control_prompt(normalized)
379
+ if control_result:
380
+ control_result["prompt_received"] = True
381
+ control_result["prompt_length"] = len(prompt)
382
+ return control_result
383
+ if "agenda" in normalized:
384
+ if "amanha" in normalized or "amanhã" in normalized:
385
+ payload = calendar_tomorrow()
386
+ else:
387
+ payload = calendar_today()
388
+ payload = dict(payload)
389
+ payload["kind"] = "agent"
390
+ payload["mode"] = "calendar-route"
391
+ payload["requires_llm"] = False
392
+ payload["prompt_received"] = True
393
+ payload["prompt_length"] = len(prompt)
394
+ payload["response"] = calendar_summary(payload)
395
+ if payload.get("status") == "needs-input":
396
+ payload["ok"] = False
397
+ else:
398
+ payload["ok"] = True
399
+ return payload
400
+ if has_pr_intent(normalized):
401
+ if any(marker in normalized for marker in ("diariamente", "todo dia", "diaria", "diária", "recorrente")):
402
+ payload = pr_create_automation()
403
+ return {
404
+ "kind": "agent",
405
+ "status": payload.get("status"),
406
+ "ok": True,
407
+ "mode": "pr-automation-route",
408
+ "requires_llm": False,
409
+ "prompt_received": True,
410
+ "prompt_length": len(prompt),
411
+ "response": "Automacao diaria de revisao de PRs criada em modo report-only.",
412
+ "result": payload,
413
+ }
414
+ payload = pr_list_review_requests()
415
+ return {
416
+ "kind": "agent",
417
+ "status": payload.get("status"),
418
+ "ok": payload.get("status") == "ok",
419
+ "mode": "pr-route",
420
+ "requires_llm": False,
421
+ "prompt_received": True,
422
+ "prompt_length": len(prompt),
423
+ "response": summarize_pr_list(payload),
424
+ "result": payload,
425
+ "exit_code": payload.get("exit_code", 0 if payload.get("status") == "ok" else 2),
426
+ }
427
+ return None
428
+
429
+
430
+ def dispatch_natural_control_prompt(normalized_prompt: str) -> dict[str, Any] | None:
431
+ return route_natural_control_prompt(ROOT, normalized_prompt)
432
+
433
+
434
+ def build_agent_dry_run_plan(prompt: str, request: AgentPromptRequest) -> dict[str, Any]:
435
+ normalized = " ".join(prompt.lower().split())
436
+ control_plan = plan_natural_control_prompt(ROOT, normalized)
437
+ if control_plan:
438
+ control_plan["prompt_received"] = True
439
+ control_plan["prompt_length"] = len(prompt)
440
+ return control_plan
441
+ route = route_prompt(prompt, ROOT)
442
+ execution_plan = build_execution_plan(ROOT, prompt, dry_run=True)
443
+ model_plan = (
444
+ execution_plan.get("model_plan")
445
+ if isinstance(execution_plan.get("model_plan"), dict)
446
+ else build_model_plan(prompt, route=route)
447
+ )
448
+ review_gate = execution_plan.get("review_gate") if isinstance(execution_plan.get("review_gate"), dict) else build_review_gate(prompt, route=route, model_plan=model_plan)
449
+ plan: dict[str, Any] = {
450
+ "kind": "agent",
451
+ "status": "planned",
452
+ "ok": True,
453
+ "dry_run": True,
454
+ "requires_llm": False,
455
+ "prompt_received": True,
456
+ "prompt_length": len(prompt),
457
+ "mode": "dry-run",
458
+ "intent": "llm" if not route else route.get("intent"),
459
+ "route": route,
460
+ "llm_backend": request.llm,
461
+ "external_writes": False,
462
+ "providers": {"used": [], "missing": [], "skipped": []},
463
+ "commands": [],
464
+ "permissions": [],
465
+ "model_plan": model_plan,
466
+ "review_gate": review_gate,
467
+ "execution_plan": execution_plan,
468
+ "orchestration_trace": execution_plan.get("trace", []),
469
+ "response": "Dry-run: nenhuma chamada LLM ou escrita externa foi executada.",
470
+ }
471
+ routing_decision = execution_plan.get("routing_decision") if isinstance(execution_plan.get("routing_decision"), dict) else {}
472
+ if routing_decision.get("status") in {"ambiguous", "low-confidence"}:
473
+ plan["requires_routing_confirmation"] = True
474
+ plan["routing_decision"] = routing_decision
475
+ plan["matches"] = routing_decision.get("candidates") or []
476
+ plan["response"] = "Dry-run: o roteamento precisa de confirmacao antes de executar."
477
+ if "agenda" in normalized:
478
+ plan.update(
479
+ {
480
+ "intent": "calendar",
481
+ "mode": "calendar-dry-run",
482
+ "providers": {"used": ["calendar"], "missing": [], "skipped": []},
483
+ "data_reads": ["configured calendar provider, if present"],
484
+ "response": "Dry-run: o calendario seria consultado localmente se configurado.",
485
+ }
486
+ )
487
+ return plan
488
+ if has_pr_intent(normalized):
489
+ recurring = any(marker in normalized for marker in ("diariamente", "todo dia", "diaria", "diária", "recorrente"))
490
+ plan.update(
491
+ {
492
+ "intent": "github-pr-review",
493
+ "mode": "pr-dry-run",
494
+ "providers": {"used": ["github"], "missing": [], "skipped": []},
495
+ "commands": planned_pr_commands("list-review-requests"),
496
+ "external_writes": False,
497
+ "permissions": [{"agent": "github-pr-reviewer", "provider": "github", "required_level": "read-only"}],
498
+ "response": (
499
+ "Dry-run: a automacao diaria de PR seria planejada em modo report-only."
500
+ if recurring
501
+ else "Dry-run: PRs aguardando revisao seriam listadas via gh em modo report-only."
502
+ ),
503
+ }
504
+ )
505
+ return plan
506
+ if route:
507
+ plan["providers"] = {"used": [route.get("provider")], "missing": [], "skipped": []}
508
+ plan["response"] = "Dry-run: a capability roteada seria executada somente apos validar source/provider."
509
+ return plan
510
+ if not plan.get("requires_routing_confirmation"):
511
+ plan["response"] = "Dry-run: o prompt exigiria LLM configurada; nenhuma chamada foi feita."
512
+ return plan
513
+
514
+
515
+ def has_pr_intent(normalized_prompt: str) -> bool:
516
+ tokens = {token.strip(".,;:!?()[]{}\"'") for token in normalized_prompt.split()}
517
+ return bool({"pr", "prs"} & tokens) or "pull request" in normalized_prompt or "pull requests" in normalized_prompt
518
+
519
+
520
+ def finalize_agent_session(
521
+ result: dict[str, Any],
522
+ session: dict[str, Any],
523
+ prompt: str,
524
+ *,
525
+ backend: str | None = None,
526
+ ) -> dict[str, Any]:
527
+ try:
528
+ result["session"] = record_exchange(str(session["id"]), prompt=prompt, result=result, backend=backend)
529
+ except ValueError as exc:
530
+ raise DevKitError(str(exc)) from exc
531
+ return result
532
+
533
+
534
+ def invoke_agentic_route(prompt: str, route: dict[str, Any]) -> dict[str, Any]:
535
+ execution_plan = build_execution_plan(ROOT, prompt, dry_run=False)
536
+ try:
537
+ source = resolve_source(
538
+ provider=route.get("provider"),
539
+ intent=route.get("intent"),
540
+ agent_id=route.get("agent_id"),
541
+ )
542
+ except SourceRegistryError as exc:
543
+ raise DevKitError(str(exc)) from exc
544
+
545
+ if not source:
546
+ wizard = missing_source_wizard(prompt, route, root=ROOT)
547
+ if execution_plan.get("configuration_tasks"):
548
+ execution_plan["configuration_tasks"][0]["setup_wizard"] = wizard
549
+ execution_plan["status"] = "needs-input"
550
+ execution_plan["trace"] = [
551
+ {"agent_id": "task-orchestrator", "action": "plan", "status": "needs-input"},
552
+ {"agent_id": "provider-configurator", "action": "configure", "status": "waiting-for-user"},
553
+ ]
554
+ payload = {
555
+ "kind": "agent",
556
+ "status": "needs-input",
557
+ "ok": False,
558
+ "requires_source": True,
559
+ "provider": route.get("provider"),
560
+ "source_provider": route.get("provider"),
561
+ "prompt_received": True,
562
+ "prompt_length": len(prompt),
563
+ "route": route,
564
+ "napkin": napkin_context(ROOT, agent_id=route.get("agent_id")),
565
+ "execution_plan": execution_plan,
566
+ "orchestration_trace": execution_plan.get("trace", []),
567
+ "setup_wizard": wizard,
568
+ "next_question": wizard.get("next_question"),
569
+ "message": wizard.get("message"),
570
+ "next_steps": [
571
+ "Responda a pergunta do wizard para autorizar ou negar a configuracao desta fonte.",
572
+ "Se preferir teste local, configure uma source com fixture sem armazenar segredos.",
573
+ "O prompt original sera retomado apos a fonte reutilizavel ser configurada.",
574
+ ],
575
+ "exit_code": 2,
576
+ }
577
+ return persist_setup_wizard_payload(payload, execution_plan=execution_plan, route=route)
578
+
579
+ model_plan = execution_plan.get("model_plan") if isinstance(execution_plan.get("model_plan"), dict) else build_model_plan(prompt, route=route)
580
+ if model_plan.get("strategy") == "human":
581
+ payload = agentic_model_strategy_needs_input_from_plan(prompt, execution_plan, model_plan)
582
+ payload["route"] = route
583
+ payload["source"] = public_source(source)
584
+ return payload
585
+
586
+ execution_plan = attach_source_to_primary_task(execution_plan)
587
+ def run_prompt_capability(agent: dict[str, Any], capability_id: str, capability_args: list[str]) -> dict[str, Any]:
588
+ return run_capability(
589
+ agent,
590
+ capability_id,
591
+ capability_args,
592
+ capture_output=True,
593
+ origin="agent-prompt",
594
+ )
595
+
596
+ if execution_plan.get("controller_enabled"):
597
+ controller_run = run_module_controller(
598
+ execution_plan,
599
+ load_agent=load_agent,
600
+ run_capability=run_prompt_capability,
601
+ )
602
+ execution_plan["module_controller_run"] = controller_run
603
+ execution_plan["shared_context"] = controller_run.get("shared_context") or execution_plan.get("shared_context")
604
+ executed = list(controller_run.get("executed_tasks") or [])
605
+ blocked = list(controller_run.get("blocked_tasks") or [])
606
+ else:
607
+ executed, blocked = execute_plan_tasks(
608
+ execution_plan,
609
+ load_agent=load_agent,
610
+ run_capability=run_prompt_capability,
611
+ )
612
+ execution_plan = mark_plan_after_execution(execution_plan, executed, blocked)
613
+ result = (executed[0].get("result") if executed else blocked[0].get("result") if blocked and isinstance(blocked[0].get("result"), dict) else {}) or {}
614
+ response = result.get("stdout") or result.get("error") or ""
615
+ record_usage(prompt, route=route, source_id=str(source["id"]))
616
+ review_gate = execution_plan.get("review_gate") if isinstance(execution_plan.get("review_gate"), dict) else build_review_gate(prompt, route=route, model_plan=model_plan)
617
+ review_payload = {
618
+ "kind": "agent",
619
+ "status": execution_plan.get("status") if execution_plan.get("status") != "partial" else result.get("status"),
620
+ "ok": bool(executed) and not blocked,
621
+ "response": response,
622
+ }
623
+ review_result = {
624
+ "kind": "execution-review",
625
+ "agent_id": "execution-reviewer",
626
+ "capability_id": "review-final-output",
627
+ "status": "not-run",
628
+ "ok": False,
629
+ }
630
+ if result.get("ok"):
631
+ review_payload, review_gate, review_result = enforce_execution_review(
632
+ prompt=prompt,
633
+ result=review_payload,
634
+ review_gate=review_gate,
635
+ execution_plan=execution_plan,
636
+ producer_backend="deterministic-capability",
637
+ )
638
+ if review_result.get("ok"):
639
+ execution_plan = mark_review_task(execution_plan, reviewer=str(review_result.get("llm_backend") or "execution-reviewer"))
640
+ elif review_gate.get("status") == "needs-review":
641
+ execution_plan = mark_review_task_needs_review(execution_plan, review_result)
642
+ return {
643
+ "kind": "agent",
644
+ "status": review_payload.get("status"),
645
+ "ok": bool(review_payload.get("ok")),
646
+ "mode": "agentic-route",
647
+ "legacy_mode": "deterministic-route",
648
+ "prompt_received": True,
649
+ "prompt_length": len(prompt),
650
+ "route": route,
651
+ "source": public_source(source),
652
+ "napkin": napkin_context(ROOT, agent_id=route.get("agent_id"), source_id=str(source["id"])),
653
+ "model_plan": model_plan,
654
+ "review_gate": review_gate,
655
+ "review_result": review_result,
656
+ "review_task": execution_plan.get("review_task"),
657
+ "execution_plan": execution_plan,
658
+ "orchestration_trace": execution_plan.get("trace", []),
659
+ "response": review_payload.get("response") or response,
660
+ "result": result,
661
+ "exit_code": review_payload.get("exit_code", result.get("exit_code", 0 if executed and not blocked else 1)),
662
+ }