agent-devkit 0.1.6 → 0.2.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.
- package/README.md +13 -1
- package/package.json +1 -1
- package/runtime/README.md +53 -1
- package/runtime/agent +5 -0
- package/runtime/agents/README.md +26 -0
- package/runtime/agents/agent-devkit-agent-builder/AGENTS.md +24 -0
- package/runtime/agents/agent-devkit-agent-builder/README.md +37 -0
- package/runtime/agents/agent-devkit-agent-builder/agent.yaml +46 -0
- package/runtime/agents/agent-devkit-agent-builder/capabilities/plan-agent/capability.yaml +29 -0
- package/runtime/agents/agent-devkit-agent-builder/capabilities/plan-agent/decision-rules.md +7 -0
- package/runtime/agents/agent-devkit-agent-builder/capabilities/plan-agent/runner.py +33 -0
- package/runtime/agents/agent-devkit-agent-builder/capabilities/plan-agent/workflow.md +8 -0
- package/runtime/agents/agent-devkit-agent-builder/capabilities/scaffold-agent/capability.yaml +31 -0
- package/runtime/agents/agent-devkit-agent-builder/capabilities/scaffold-agent/decision-rules.md +9 -0
- package/runtime/agents/agent-devkit-agent-builder/capabilities/scaffold-agent/runner.py +39 -0
- package/runtime/agents/agent-devkit-agent-builder/capabilities/scaffold-agent/workflow.md +8 -0
- package/runtime/agents/agent-devkit-agent-builder/capabilities/validate-agent-contract/capability.yaml +28 -0
- package/runtime/agents/agent-devkit-agent-builder/capabilities/validate-agent-contract/decision-rules.md +6 -0
- package/runtime/agents/agent-devkit-agent-builder/capabilities/validate-agent-contract/runner.py +33 -0
- package/runtime/agents/agent-devkit-agent-builder/capabilities/validate-agent-contract/workflow.md +7 -0
- package/runtime/agents/agent-devkit-agent-builder/infra/integrations/agent-devkit/agent_builder_repository.py +527 -0
- package/runtime/agents/agent-devkit-agent-builder/knowledge/context.md +15 -0
- package/runtime/agents/agent-devkit-agent-builder/knowledge/policies.yaml +11 -0
- package/runtime/agents/agent-devkit-agent-builder/knowledge/system.md +11 -0
- package/runtime/agents/agent-devkit-agent-builder/templates/agent-plan-output.md +20 -0
- package/runtime/agents/agent-devkit-agent-builder/templates/scaffold-plan-output.md +13 -0
- package/runtime/agents/agent-devkit-agent-builder/templates/validation-report-output.md +13 -0
- package/runtime/agents/agent-devkit-agent-builder/tests/test_runners.py +188 -0
- package/runtime/agents/automation-architect/AGENTS.md +11 -0
- package/runtime/agents/automation-architect/README.md +27 -0
- package/runtime/agents/automation-architect/agent.yaml +57 -0
- package/runtime/agents/automation-architect/capabilities/classify-automation-request/capability.yaml +35 -0
- package/runtime/agents/automation-architect/capabilities/classify-automation-request/decision-rules.md +10 -0
- package/runtime/agents/automation-architect/capabilities/classify-automation-request/runner.py +37 -0
- package/runtime/agents/automation-architect/capabilities/classify-automation-request/workflow.md +7 -0
- package/runtime/agents/automation-architect/capabilities/delegate-automation-build/capability.yaml +34 -0
- package/runtime/agents/automation-architect/capabilities/delegate-automation-build/decision-rules.md +7 -0
- package/runtime/agents/automation-architect/capabilities/delegate-automation-build/runner.py +37 -0
- package/runtime/agents/automation-architect/capabilities/delegate-automation-build/workflow.md +6 -0
- package/runtime/agents/automation-architect/capabilities/plan-automation-solution/capability.yaml +35 -0
- package/runtime/agents/automation-architect/capabilities/plan-automation-solution/decision-rules.md +7 -0
- package/runtime/agents/automation-architect/capabilities/plan-automation-solution/runner.py +37 -0
- package/runtime/agents/automation-architect/capabilities/plan-automation-solution/workflow.md +7 -0
- package/runtime/agents/automation-architect/capabilities/review-automation-solution/capability.yaml +36 -0
- package/runtime/agents/automation-architect/capabilities/review-automation-solution/decision-rules.md +7 -0
- package/runtime/agents/automation-architect/capabilities/review-automation-solution/runner.py +39 -0
- package/runtime/agents/automation-architect/capabilities/review-automation-solution/workflow.md +7 -0
- package/runtime/agents/automation-architect/infra/integrations/automation-architecture/automation_architecture_repository.py +481 -0
- package/runtime/agents/automation-architect/knowledge/context.md +22 -0
- package/runtime/agents/automation-architect/knowledge/policies.yaml +20 -0
- package/runtime/agents/automation-architect/knowledge/system.md +8 -0
- package/runtime/agents/automation-architect/templates/automation-classification.md +6 -0
- package/runtime/agents/automation-architect/templates/automation-plan.md +5 -0
- package/runtime/agents/automation-architect/tests/test_runners.py +135 -0
- package/runtime/agents/aws-architecture-analyst/agent.yaml +17 -4
- package/runtime/agents/aws-cloudwatch-log-analyzer/agent.yaml +12 -2
- package/runtime/agents/aws-cloudwatch-log-analyzer/capabilities/analyze-service-error/capability.yaml +16 -0
- package/runtime/agents/aws-lambda-builder/AGENTS.md +27 -0
- package/runtime/agents/aws-lambda-builder/README.md +21 -0
- package/runtime/agents/aws-lambda-builder/agent.yaml +46 -0
- package/runtime/agents/aws-lambda-builder/capabilities/deploy-lambda-plan/capability.yaml +18 -0
- package/runtime/agents/aws-lambda-builder/capabilities/deploy-lambda-plan/decision-rules.md +6 -0
- package/runtime/agents/aws-lambda-builder/capabilities/deploy-lambda-plan/runner.py +33 -0
- package/runtime/agents/aws-lambda-builder/capabilities/deploy-lambda-plan/workflow.md +6 -0
- package/runtime/agents/aws-lambda-builder/capabilities/generate-lambda-project/capability.yaml +20 -0
- package/runtime/agents/aws-lambda-builder/capabilities/generate-lambda-project/decision-rules.md +6 -0
- package/runtime/agents/aws-lambda-builder/capabilities/generate-lambda-project/runner.py +39 -0
- package/runtime/agents/aws-lambda-builder/capabilities/generate-lambda-project/workflow.md +7 -0
- package/runtime/agents/aws-lambda-builder/capabilities/package-lambda/capability.yaml +22 -0
- package/runtime/agents/aws-lambda-builder/capabilities/package-lambda/decision-rules.md +6 -0
- package/runtime/agents/aws-lambda-builder/capabilities/package-lambda/runner.py +41 -0
- package/runtime/agents/aws-lambda-builder/capabilities/package-lambda/workflow.md +6 -0
- package/runtime/agents/aws-lambda-builder/capabilities/plan-lambda/capability.yaml +18 -0
- package/runtime/agents/aws-lambda-builder/capabilities/plan-lambda/decision-rules.md +7 -0
- package/runtime/agents/aws-lambda-builder/capabilities/plan-lambda/runner.py +33 -0
- package/runtime/agents/aws-lambda-builder/capabilities/plan-lambda/workflow.md +6 -0
- package/runtime/agents/aws-lambda-builder/capabilities/review-lambda-security/capability.yaml +18 -0
- package/runtime/agents/aws-lambda-builder/capabilities/review-lambda-security/decision-rules.md +7 -0
- package/runtime/agents/aws-lambda-builder/capabilities/review-lambda-security/runner.py +33 -0
- package/runtime/agents/aws-lambda-builder/capabilities/review-lambda-security/workflow.md +5 -0
- package/runtime/agents/aws-lambda-builder/infra/integrations/aws-lambda/aws_lambda_repository.py +688 -0
- package/runtime/agents/aws-lambda-builder/knowledge/context.md +12 -0
- package/runtime/agents/aws-lambda-builder/knowledge/policies.yaml +23 -0
- package/runtime/agents/aws-lambda-builder/knowledge/system.md +10 -0
- package/runtime/agents/aws-lambda-builder/templates/lambda-deploy-plan.md +3 -0
- package/runtime/agents/aws-lambda-builder/templates/lambda-package.md +3 -0
- package/runtime/agents/aws-lambda-builder/templates/lambda-plan.md +3 -0
- package/runtime/agents/aws-lambda-builder/templates/lambda-readme.md +3 -0
- package/runtime/agents/aws-lambda-builder/templates/lambda-security-review.md +3 -0
- package/runtime/agents/aws-lambda-builder/tests/test_runners.py +355 -0
- package/runtime/agents/aws-operations-operator/agent.yaml +18 -6
- package/runtime/agents/aws-security-governance-auditor/agent.yaml +17 -5
- package/runtime/agents/azure-devops-orchestrator/agent.yaml +15 -2
- package/runtime/agents/azure-devops-orchestrator/capabilities/read-card/capability.yaml +29 -0
- package/runtime/agents/bpo-analyser/agent.yaml +12 -2
- package/runtime/agents/bpo-analyser/knowledge/policies.yaml +2 -2
- package/runtime/agents/data-scientist-analyst/agent.yaml +16 -4
- package/runtime/agents/data-scientist-analyst/capabilities/generate-data-report/capability.yaml +1 -1
- package/runtime/agents/data-scientist-analyst/capabilities/generate-reconciliation-report/capability.yaml +1 -1
- package/runtime/agents/data-scientist-analyst/capabilities/run-data-pipeline/capability.yaml +1 -1
- package/runtime/agents/data-scientist-analyst/infra/integrations/agent-bridge/methods/analyze-sql-source.yaml +1 -1
- package/runtime/agents/data-scientist-analyst/knowledge/policies.yaml +4 -4
- package/runtime/agents/data-scientist-analyst/knowledge/system.md +1 -1
- package/runtime/agents/data-scientist-analyst/tests/test_runners.py +1 -1
- package/runtime/agents/database-change-operator/agent.yaml +12 -1
- package/runtime/agents/docker-container-builder/AGENTS.md +27 -0
- package/runtime/agents/docker-container-builder/README.md +21 -0
- package/runtime/agents/docker-container-builder/agent.yaml +52 -0
- package/runtime/agents/docker-container-builder/capabilities/analyze-containerization-target/capability.yaml +18 -0
- package/runtime/agents/docker-container-builder/capabilities/analyze-containerization-target/decision-rules.md +6 -0
- package/runtime/agents/docker-container-builder/capabilities/analyze-containerization-target/runner.py +32 -0
- package/runtime/agents/docker-container-builder/capabilities/analyze-containerization-target/workflow.md +6 -0
- package/runtime/agents/docker-container-builder/capabilities/generate-compose/capability.yaml +18 -0
- package/runtime/agents/docker-container-builder/capabilities/generate-compose/decision-rules.md +7 -0
- package/runtime/agents/docker-container-builder/capabilities/generate-compose/runner.py +32 -0
- package/runtime/agents/docker-container-builder/capabilities/generate-compose/workflow.md +6 -0
- package/runtime/agents/docker-container-builder/capabilities/generate-container-project-files/capability.yaml +20 -0
- package/runtime/agents/docker-container-builder/capabilities/generate-container-project-files/decision-rules.md +7 -0
- package/runtime/agents/docker-container-builder/capabilities/generate-container-project-files/runner.py +38 -0
- package/runtime/agents/docker-container-builder/capabilities/generate-container-project-files/workflow.md +7 -0
- package/runtime/agents/docker-container-builder/capabilities/generate-dockerfile/capability.yaml +18 -0
- package/runtime/agents/docker-container-builder/capabilities/generate-dockerfile/decision-rules.md +6 -0
- package/runtime/agents/docker-container-builder/capabilities/generate-dockerfile/runner.py +32 -0
- package/runtime/agents/docker-container-builder/capabilities/generate-dockerfile/workflow.md +7 -0
- package/runtime/agents/docker-container-builder/capabilities/plan-image-build/capability.yaml +18 -0
- package/runtime/agents/docker-container-builder/capabilities/plan-image-build/decision-rules.md +6 -0
- package/runtime/agents/docker-container-builder/capabilities/plan-image-build/runner.py +32 -0
- package/runtime/agents/docker-container-builder/capabilities/plan-image-build/workflow.md +6 -0
- package/runtime/agents/docker-container-builder/capabilities/review-docker-security/capability.yaml +21 -0
- package/runtime/agents/docker-container-builder/capabilities/review-docker-security/decision-rules.md +6 -0
- package/runtime/agents/docker-container-builder/capabilities/review-docker-security/runner.py +43 -0
- package/runtime/agents/docker-container-builder/capabilities/review-docker-security/workflow.md +5 -0
- package/runtime/agents/docker-container-builder/infra/integrations/docker-container/docker_container_repository.py +837 -0
- package/runtime/agents/docker-container-builder/knowledge/context.md +21 -0
- package/runtime/agents/docker-container-builder/knowledge/policies.yaml +13 -0
- package/runtime/agents/docker-container-builder/knowledge/system.md +21 -0
- package/runtime/agents/docker-container-builder/templates/container-plan.md +4 -0
- package/runtime/agents/docker-container-builder/templates/container-review.md +4 -0
- package/runtime/agents/docker-container-builder/templates/docker-compose.md +5 -0
- package/runtime/agents/docker-container-builder/templates/docker-readme.md +3 -0
- package/runtime/agents/docker-container-builder/templates/dockerfile.md +5 -0
- package/runtime/agents/docker-container-builder/tests/test_runners.py +255 -0
- package/runtime/agents/drawio-diagram-builder/agent.yaml +11 -2
- package/runtime/agents/drawio-diagram-builder/capabilities/execute-diagram-delivery/capability.yaml +1 -1
- package/runtime/agents/drawio-diagram-builder/capabilities/read-azure-card-context/capability.yaml +1 -1
- package/runtime/agents/elasticsearch-log-analyzer/agent.yaml +14 -2
- package/runtime/agents/elasticsearch-log-analyzer/capabilities/analyze-service-errors/capability.yaml +14 -0
- package/runtime/agents/excel-workbook-builder/agent.yaml +10 -0
- package/runtime/agents/excel-workbook-builder/capabilities/create-template/capability.yaml +1 -1
- package/runtime/agents/excel-workbook-builder/capabilities/create-template/workflow.md +1 -1
- package/runtime/agents/excel-workbook-builder/capabilities/create-template-version/capability.yaml +1 -1
- package/runtime/agents/excel-workbook-builder/capabilities/generate-template-input-file/capability.yaml +1 -2
- package/runtime/agents/excel-workbook-builder/capabilities/refine-template/capability.yaml +1 -1
- package/runtime/agents/excel-workbook-builder/capabilities/register-template/capability.yaml +1 -2
- package/runtime/agents/excel-workbook-builder/capabilities/register-template/workflow.md +1 -1
- package/runtime/agents/execution-loop-builder/AGENTS.md +24 -0
- package/runtime/agents/execution-loop-builder/README.md +19 -0
- package/runtime/agents/execution-loop-builder/agent.yaml +49 -0
- package/runtime/agents/execution-loop-builder/capabilities/generate-loop-project-files/capability.yaml +20 -0
- package/runtime/agents/execution-loop-builder/capabilities/generate-loop-project-files/decision-rules.md +6 -0
- package/runtime/agents/execution-loop-builder/capabilities/generate-loop-project-files/runner.py +38 -0
- package/runtime/agents/execution-loop-builder/capabilities/generate-loop-project-files/workflow.md +7 -0
- package/runtime/agents/execution-loop-builder/capabilities/generate-loop-runner/capability.yaml +18 -0
- package/runtime/agents/execution-loop-builder/capabilities/generate-loop-runner/decision-rules.md +5 -0
- package/runtime/agents/execution-loop-builder/capabilities/generate-loop-runner/runner.py +32 -0
- package/runtime/agents/execution-loop-builder/capabilities/generate-loop-runner/workflow.md +6 -0
- package/runtime/agents/execution-loop-builder/capabilities/plan-execution-loop/capability.yaml +18 -0
- package/runtime/agents/execution-loop-builder/capabilities/plan-execution-loop/decision-rules.md +6 -0
- package/runtime/agents/execution-loop-builder/capabilities/plan-execution-loop/runner.py +32 -0
- package/runtime/agents/execution-loop-builder/capabilities/plan-execution-loop/workflow.md +6 -0
- package/runtime/agents/execution-loop-builder/capabilities/register-loop-task/capability.yaml +19 -0
- package/runtime/agents/execution-loop-builder/capabilities/register-loop-task/decision-rules.md +6 -0
- package/runtime/agents/execution-loop-builder/capabilities/register-loop-task/runner.py +36 -0
- package/runtime/agents/execution-loop-builder/capabilities/register-loop-task/workflow.md +6 -0
- package/runtime/agents/execution-loop-builder/capabilities/review-loop-safety/capability.yaml +19 -0
- package/runtime/agents/execution-loop-builder/capabilities/review-loop-safety/decision-rules.md +6 -0
- package/runtime/agents/execution-loop-builder/capabilities/review-loop-safety/runner.py +39 -0
- package/runtime/agents/execution-loop-builder/capabilities/review-loop-safety/workflow.md +5 -0
- package/runtime/agents/execution-loop-builder/infra/integrations/execution-loop/execution_loop_repository.py +608 -0
- package/runtime/agents/execution-loop-builder/knowledge/context.md +26 -0
- package/runtime/agents/execution-loop-builder/knowledge/policies.yaml +13 -0
- package/runtime/agents/execution-loop-builder/knowledge/system.md +19 -0
- package/runtime/agents/execution-loop-builder/templates/loop-plan.md +3 -0
- package/runtime/agents/execution-loop-builder/templates/loop-readme.md +3 -0
- package/runtime/agents/execution-loop-builder/templates/loop-review.md +3 -0
- package/runtime/agents/execution-loop-builder/templates/loop-runner.py +2 -0
- package/runtime/agents/execution-loop-builder/tests/test_runners.py +274 -0
- package/runtime/agents/execution-reviewer/agent.yaml +6 -4
- package/runtime/agents/execution-reviewer/capabilities/review-agent-result/capability.yaml +1 -2
- package/runtime/agents/execution-reviewer/capabilities/review-final-output/capability.yaml +1 -2
- package/runtime/agents/execution-reviewer/capabilities/review-plan/capability.yaml +1 -2
- package/runtime/agents/figma-ui-ux-product-designer/agent.yaml +17 -5
- package/runtime/agents/figma-ui-ux-product-designer/capabilities/analyze-product-context/capability.yaml +1 -1
- package/runtime/agents/figma-ui-ux-product-designer/capabilities/conduct-design-interview/capability.yaml +1 -1
- package/runtime/agents/figma-ui-ux-product-designer/capabilities/conduct-design-review-session/capability.yaml +1 -1
- package/runtime/agents/figma-ui-ux-product-designer/capabilities/generate-dev-handoff/capability.yaml +1 -1
- package/runtime/agents/figma-ui-ux-product-designer/capabilities/generate-user-journey-diagram/capability.yaml +1 -1
- package/runtime/agents/figma-ui-ux-product-designer/capabilities/ingest-design-source/capability.yaml +1 -1
- package/runtime/agents/figma-ui-ux-product-designer/capabilities/triage-design-feedback/capability.yaml +1 -1
- package/runtime/agents/generic-agent-builder/AGENTS.md +20 -0
- package/runtime/agents/generic-agent-builder/README.md +40 -0
- package/runtime/agents/generic-agent-builder/agent.yaml +43 -0
- package/runtime/agents/generic-agent-builder/capabilities/generate-agent-instructions/capability.yaml +18 -0
- package/runtime/agents/generic-agent-builder/capabilities/generate-agent-instructions/decision-rules.md +5 -0
- package/runtime/agents/generic-agent-builder/capabilities/generate-agent-instructions/runner.py +33 -0
- package/runtime/agents/generic-agent-builder/capabilities/generate-agent-instructions/workflow.md +6 -0
- package/runtime/agents/generic-agent-builder/capabilities/generate-project-agent-files/capability.yaml +20 -0
- package/runtime/agents/generic-agent-builder/capabilities/generate-project-agent-files/decision-rules.md +6 -0
- package/runtime/agents/generic-agent-builder/capabilities/generate-project-agent-files/runner.py +39 -0
- package/runtime/agents/generic-agent-builder/capabilities/generate-project-agent-files/workflow.md +7 -0
- package/runtime/agents/generic-agent-builder/capabilities/generate-skill/capability.yaml +18 -0
- package/runtime/agents/generic-agent-builder/capabilities/generate-skill/decision-rules.md +5 -0
- package/runtime/agents/generic-agent-builder/capabilities/generate-skill/runner.py +33 -0
- package/runtime/agents/generic-agent-builder/capabilities/generate-skill/workflow.md +5 -0
- package/runtime/agents/generic-agent-builder/capabilities/plan-generic-agent/capability.yaml +18 -0
- package/runtime/agents/generic-agent-builder/capabilities/plan-generic-agent/decision-rules.md +6 -0
- package/runtime/agents/generic-agent-builder/capabilities/plan-generic-agent/runner.py +33 -0
- package/runtime/agents/generic-agent-builder/capabilities/plan-generic-agent/workflow.md +6 -0
- package/runtime/agents/generic-agent-builder/capabilities/review-generic-agent/capability.yaml +20 -0
- package/runtime/agents/generic-agent-builder/capabilities/review-generic-agent/decision-rules.md +6 -0
- package/runtime/agents/generic-agent-builder/capabilities/review-generic-agent/runner.py +40 -0
- package/runtime/agents/generic-agent-builder/capabilities/review-generic-agent/workflow.md +7 -0
- package/runtime/agents/generic-agent-builder/infra/integrations/generic-agent/generic_agent_repository.py +445 -0
- package/runtime/agents/generic-agent-builder/knowledge/context.md +11 -0
- package/runtime/agents/generic-agent-builder/knowledge/policies.yaml +12 -0
- package/runtime/agents/generic-agent-builder/knowledge/system.md +17 -0
- package/runtime/agents/generic-agent-builder/templates/generic-agent-instructions.md +17 -0
- package/runtime/agents/generic-agent-builder/templates/generic-review-report.md +13 -0
- package/runtime/agents/generic-agent-builder/templates/generic-skill.md +14 -0
- package/runtime/agents/generic-agent-builder/tests/test_runners.py +220 -0
- package/runtime/agents/github-pr-reviewer/agent.yaml +17 -5
- package/runtime/agents/github-pr-reviewer/capabilities/create-review-automation/capability.yaml +1 -1
- package/runtime/agents/github-pr-reviewer/capabilities/inspect-pr/capability.yaml +1 -1
- package/runtime/agents/github-pr-reviewer/capabilities/list-review-requests/capability.yaml +1 -1
- package/runtime/agents/github-pr-reviewer/capabilities/review-pr-diff/capability.yaml +1 -1
- package/runtime/agents/knowledge-generator/agent.yaml +13 -3
- package/runtime/agents/knowledge-generator/capabilities/generate-knowledge/capability.yaml +1 -1
- package/runtime/agents/local-llm-operator/agent.yaml +6 -4
- package/runtime/agents/local-llm-operator/capabilities/delegate-operational-task/capability.yaml +1 -2
- package/runtime/agents/local-llm-operator/capabilities/inspect-local-models/capability.yaml +1 -2
- package/runtime/agents/local-llm-operator/capabilities/select-local-worker/capability.yaml +1 -2
- package/runtime/agents/n1-support-agent/agent.yaml +40 -1
- package/runtime/agents/n2-support-agent/agent.yaml +41 -2
- package/runtime/agents/n2-support-agent/knowledge/policies.yaml +2 -2
- package/runtime/agents/notification-operator/AGENTS.md +11 -0
- package/runtime/agents/notification-operator/README.md +15 -0
- package/runtime/agents/notification-operator/agent.yaml +43 -0
- package/runtime/agents/notification-operator/capabilities/configure-notification-channel/capability.yaml +19 -0
- package/runtime/agents/notification-operator/capabilities/configure-notification-channel/decision-rules.md +6 -0
- package/runtime/agents/notification-operator/capabilities/configure-notification-channel/runner.py +33 -0
- package/runtime/agents/notification-operator/capabilities/configure-notification-channel/workflow.md +6 -0
- package/runtime/agents/notification-operator/capabilities/format-task-completion-notification/capability.yaml +25 -0
- package/runtime/agents/notification-operator/capabilities/format-task-completion-notification/decision-rules.md +7 -0
- package/runtime/agents/notification-operator/capabilities/format-task-completion-notification/runner.py +49 -0
- package/runtime/agents/notification-operator/capabilities/format-task-completion-notification/workflow.md +6 -0
- package/runtime/agents/notification-operator/capabilities/send-task-completion-notification/capability.yaml +27 -0
- package/runtime/agents/notification-operator/capabilities/send-task-completion-notification/decision-rules.md +6 -0
- package/runtime/agents/notification-operator/capabilities/send-task-completion-notification/runner.py +68 -0
- package/runtime/agents/notification-operator/capabilities/send-task-completion-notification/workflow.md +7 -0
- package/runtime/agents/notification-operator/infra/README.md +6 -0
- package/runtime/agents/notification-operator/knowledge/context.md +10 -0
- package/runtime/agents/notification-operator/knowledge/policies.yaml +9 -0
- package/runtime/agents/notification-operator/knowledge/system.md +7 -0
- package/runtime/agents/notification-operator/templates/README.md +6 -0
- package/runtime/agents/notification-operator/tests/test_runners.py +108 -0
- package/runtime/agents/playwright-automation-builder/AGENTS.md +23 -0
- package/runtime/agents/playwright-automation-builder/README.md +43 -0
- package/runtime/agents/playwright-automation-builder/agent.yaml +48 -0
- package/runtime/agents/playwright-automation-builder/capabilities/generate-playwright-project-files/capability.yaml +20 -0
- package/runtime/agents/playwright-automation-builder/capabilities/generate-playwright-project-files/decision-rules.md +6 -0
- package/runtime/agents/playwright-automation-builder/capabilities/generate-playwright-project-files/runner.py +38 -0
- package/runtime/agents/playwright-automation-builder/capabilities/generate-playwright-project-files/workflow.md +6 -0
- package/runtime/agents/playwright-automation-builder/capabilities/generate-playwright-script/capability.yaml +18 -0
- package/runtime/agents/playwright-automation-builder/capabilities/generate-playwright-script/decision-rules.md +6 -0
- package/runtime/agents/playwright-automation-builder/capabilities/generate-playwright-script/runner.py +32 -0
- package/runtime/agents/playwright-automation-builder/capabilities/generate-playwright-script/workflow.md +6 -0
- package/runtime/agents/playwright-automation-builder/capabilities/plan-playwright-automation/capability.yaml +18 -0
- package/runtime/agents/playwright-automation-builder/capabilities/plan-playwright-automation/decision-rules.md +6 -0
- package/runtime/agents/playwright-automation-builder/capabilities/plan-playwright-automation/runner.py +32 -0
- package/runtime/agents/playwright-automation-builder/capabilities/plan-playwright-automation/workflow.md +6 -0
- package/runtime/agents/playwright-automation-builder/capabilities/review-playwright-artifacts/capability.yaml +19 -0
- package/runtime/agents/playwright-automation-builder/capabilities/review-playwright-artifacts/decision-rules.md +6 -0
- package/runtime/agents/playwright-automation-builder/capabilities/review-playwright-artifacts/runner.py +33 -0
- package/runtime/agents/playwright-automation-builder/capabilities/review-playwright-artifacts/workflow.md +6 -0
- package/runtime/agents/playwright-automation-builder/capabilities/run-playwright-check/capability.yaml +22 -0
- package/runtime/agents/playwright-automation-builder/capabilities/run-playwright-check/decision-rules.md +6 -0
- package/runtime/agents/playwright-automation-builder/capabilities/run-playwright-check/runner.py +40 -0
- package/runtime/agents/playwright-automation-builder/capabilities/run-playwright-check/workflow.md +6 -0
- package/runtime/agents/playwright-automation-builder/capabilities/wrap-playwright-as-capability/capability.yaml +22 -0
- package/runtime/agents/playwright-automation-builder/capabilities/wrap-playwright-as-capability/decision-rules.md +6 -0
- package/runtime/agents/playwright-automation-builder/capabilities/wrap-playwright-as-capability/runner.py +42 -0
- package/runtime/agents/playwright-automation-builder/capabilities/wrap-playwright-as-capability/workflow.md +6 -0
- package/runtime/agents/playwright-automation-builder/infra/integrations/playwright-automation/playwright_automation_repository.py +865 -0
- package/runtime/agents/playwright-automation-builder/knowledge/context.md +19 -0
- package/runtime/agents/playwright-automation-builder/knowledge/policies.yaml +25 -0
- package/runtime/agents/playwright-automation-builder/knowledge/system.md +19 -0
- package/runtime/agents/playwright-automation-builder/templates/capability-wrapper.md +4 -0
- package/runtime/agents/playwright-automation-builder/templates/playwright-automation.py +12 -0
- package/runtime/agents/playwright-automation-builder/templates/playwright-readme.md +13 -0
- package/runtime/agents/playwright-automation-builder/templates/playwright-review-report.md +9 -0
- package/runtime/agents/playwright-automation-builder/templates/playwright-test.py +2 -0
- package/runtime/agents/playwright-automation-builder/tests/test_runners.py +261 -0
- package/runtime/agents/postgres-data-analyzer/agent.yaml +13 -2
- package/runtime/agents/presentation-deck-builder/agent.yaml +14 -3
- package/runtime/agents/presentation-deck-builder/capabilities/create-template/capability.yaml +1 -1
- package/runtime/agents/presentation-deck-builder/capabilities/create-template-version/capability.yaml +1 -1
- package/runtime/agents/presentation-deck-builder/capabilities/generate-template-input-file/capability.yaml +1 -1
- package/runtime/agents/presentation-deck-builder/capabilities/refine-template/capability.yaml +1 -1
- package/runtime/agents/presentation-deck-builder/capabilities/register-template/capability.yaml +1 -1
- package/runtime/agents/presentation-deck-builder/knowledge/prompts/create-template.md +1 -1
- package/runtime/agents/presentation-deck-builder/knowledge/prompts/generate-template-input-file.md +1 -1
- package/runtime/agents/provider-configurator/agent.yaml +6 -4
- package/runtime/agents/provider-configurator/capabilities/collect-provider-credentials/capability.yaml +1 -2
- package/runtime/agents/provider-configurator/capabilities/configure-provider-source/capability.yaml +1 -2
- package/runtime/agents/provider-configurator/capabilities/validate-provider-readiness/capability.yaml +1 -2
- package/runtime/agents/pyautogui-automation-builder/AGENTS.md +32 -0
- package/runtime/agents/pyautogui-automation-builder/README.md +44 -0
- package/runtime/agents/pyautogui-automation-builder/agent.yaml +45 -0
- package/runtime/agents/pyautogui-automation-builder/capabilities/generate-pyautogui-project-files/capability.yaml +20 -0
- package/runtime/agents/pyautogui-automation-builder/capabilities/generate-pyautogui-project-files/decision-rules.md +6 -0
- package/runtime/agents/pyautogui-automation-builder/capabilities/generate-pyautogui-project-files/runner.py +39 -0
- package/runtime/agents/pyautogui-automation-builder/capabilities/generate-pyautogui-project-files/workflow.md +7 -0
- package/runtime/agents/pyautogui-automation-builder/capabilities/generate-pyautogui-script/capability.yaml +18 -0
- package/runtime/agents/pyautogui-automation-builder/capabilities/generate-pyautogui-script/decision-rules.md +7 -0
- package/runtime/agents/pyautogui-automation-builder/capabilities/generate-pyautogui-script/runner.py +33 -0
- package/runtime/agents/pyautogui-automation-builder/capabilities/generate-pyautogui-script/workflow.md +7 -0
- package/runtime/agents/pyautogui-automation-builder/capabilities/plan-desktop-automation/capability.yaml +18 -0
- package/runtime/agents/pyautogui-automation-builder/capabilities/plan-desktop-automation/decision-rules.md +8 -0
- package/runtime/agents/pyautogui-automation-builder/capabilities/plan-desktop-automation/runner.py +33 -0
- package/runtime/agents/pyautogui-automation-builder/capabilities/plan-desktop-automation/workflow.md +9 -0
- package/runtime/agents/pyautogui-automation-builder/capabilities/review-pyautogui-script/capability.yaml +20 -0
- package/runtime/agents/pyautogui-automation-builder/capabilities/review-pyautogui-script/decision-rules.md +8 -0
- package/runtime/agents/pyautogui-automation-builder/capabilities/review-pyautogui-script/runner.py +43 -0
- package/runtime/agents/pyautogui-automation-builder/capabilities/review-pyautogui-script/workflow.md +7 -0
- package/runtime/agents/pyautogui-automation-builder/capabilities/wrap-pyautogui-as-capability/capability.yaml +22 -0
- package/runtime/agents/pyautogui-automation-builder/capabilities/wrap-pyautogui-as-capability/decision-rules.md +6 -0
- package/runtime/agents/pyautogui-automation-builder/capabilities/wrap-pyautogui-as-capability/runner.py +43 -0
- package/runtime/agents/pyautogui-automation-builder/capabilities/wrap-pyautogui-as-capability/workflow.md +7 -0
- package/runtime/agents/pyautogui-automation-builder/infra/integrations/pyautogui-automation/pyautogui_automation_repository.py +856 -0
- package/runtime/agents/pyautogui-automation-builder/knowledge/context.md +17 -0
- package/runtime/agents/pyautogui-automation-builder/knowledge/policies.yaml +24 -0
- package/runtime/agents/pyautogui-automation-builder/knowledge/system.md +13 -0
- package/runtime/agents/pyautogui-automation-builder/templates/capability-wrapper.md +3 -0
- package/runtime/agents/pyautogui-automation-builder/templates/pyautogui-automation.py +12 -0
- package/runtime/agents/pyautogui-automation-builder/templates/pyautogui-readme.md +3 -0
- package/runtime/agents/pyautogui-automation-builder/templates/pyautogui-review-report.md +3 -0
- package/runtime/agents/pyautogui-automation-builder/templates/pyautogui-test.py +2 -0
- package/runtime/agents/pyautogui-automation-builder/tests/test_runners.py +376 -0
- package/runtime/agents/python-automation-builder/AGENTS.md +25 -0
- package/runtime/agents/python-automation-builder/README.md +43 -0
- package/runtime/agents/python-automation-builder/agent.yaml +45 -0
- package/runtime/agents/python-automation-builder/capabilities/generate-automation-project-files/capability.yaml +20 -0
- package/runtime/agents/python-automation-builder/capabilities/generate-automation-project-files/decision-rules.md +6 -0
- package/runtime/agents/python-automation-builder/capabilities/generate-automation-project-files/runner.py +39 -0
- package/runtime/agents/python-automation-builder/capabilities/generate-automation-project-files/workflow.md +7 -0
- package/runtime/agents/python-automation-builder/capabilities/generate-python-automation/capability.yaml +18 -0
- package/runtime/agents/python-automation-builder/capabilities/generate-python-automation/decision-rules.md +5 -0
- package/runtime/agents/python-automation-builder/capabilities/generate-python-automation/runner.py +33 -0
- package/runtime/agents/python-automation-builder/capabilities/generate-python-automation/workflow.md +5 -0
- package/runtime/agents/python-automation-builder/capabilities/plan-python-automation/capability.yaml +18 -0
- package/runtime/agents/python-automation-builder/capabilities/plan-python-automation/decision-rules.md +6 -0
- package/runtime/agents/python-automation-builder/capabilities/plan-python-automation/runner.py +33 -0
- package/runtime/agents/python-automation-builder/capabilities/plan-python-automation/workflow.md +6 -0
- package/runtime/agents/python-automation-builder/capabilities/review-python-automation/capability.yaml +20 -0
- package/runtime/agents/python-automation-builder/capabilities/review-python-automation/decision-rules.md +6 -0
- package/runtime/agents/python-automation-builder/capabilities/review-python-automation/runner.py +43 -0
- package/runtime/agents/python-automation-builder/capabilities/review-python-automation/workflow.md +5 -0
- package/runtime/agents/python-automation-builder/capabilities/wrap-automation-as-capability/capability.yaml +22 -0
- package/runtime/agents/python-automation-builder/capabilities/wrap-automation-as-capability/decision-rules.md +6 -0
- package/runtime/agents/python-automation-builder/capabilities/wrap-automation-as-capability/runner.py +43 -0
- package/runtime/agents/python-automation-builder/capabilities/wrap-automation-as-capability/workflow.md +6 -0
- package/runtime/agents/python-automation-builder/infra/integrations/python-automation/python_automation_repository.py +717 -0
- package/runtime/agents/python-automation-builder/knowledge/context.md +15 -0
- package/runtime/agents/python-automation-builder/knowledge/policies.yaml +12 -0
- package/runtime/agents/python-automation-builder/knowledge/system.md +19 -0
- package/runtime/agents/python-automation-builder/templates/automation-readme.md +13 -0
- package/runtime/agents/python-automation-builder/templates/automation-review-report.md +13 -0
- package/runtime/agents/python-automation-builder/templates/automation-test.py +9 -0
- package/runtime/agents/python-automation-builder/templates/automation.py +19 -0
- package/runtime/agents/python-automation-builder/templates/capability-wrapper.md +4 -0
- package/runtime/agents/python-automation-builder/tests/test_runners.py +292 -0
- package/runtime/agents/selenium-automation-builder/AGENTS.md +27 -0
- package/runtime/agents/selenium-automation-builder/README.md +40 -0
- package/runtime/agents/selenium-automation-builder/agent.yaml +45 -0
- package/runtime/agents/selenium-automation-builder/capabilities/generate-selenium-project-files/capability.yaml +20 -0
- package/runtime/agents/selenium-automation-builder/capabilities/generate-selenium-project-files/decision-rules.md +6 -0
- package/runtime/agents/selenium-automation-builder/capabilities/generate-selenium-project-files/runner.py +39 -0
- package/runtime/agents/selenium-automation-builder/capabilities/generate-selenium-project-files/workflow.md +7 -0
- package/runtime/agents/selenium-automation-builder/capabilities/generate-selenium-script/capability.yaml +18 -0
- package/runtime/agents/selenium-automation-builder/capabilities/generate-selenium-script/decision-rules.md +6 -0
- package/runtime/agents/selenium-automation-builder/capabilities/generate-selenium-script/runner.py +33 -0
- package/runtime/agents/selenium-automation-builder/capabilities/generate-selenium-script/workflow.md +6 -0
- package/runtime/agents/selenium-automation-builder/capabilities/plan-selenium-automation/capability.yaml +18 -0
- package/runtime/agents/selenium-automation-builder/capabilities/plan-selenium-automation/decision-rules.md +6 -0
- package/runtime/agents/selenium-automation-builder/capabilities/plan-selenium-automation/runner.py +33 -0
- package/runtime/agents/selenium-automation-builder/capabilities/plan-selenium-automation/workflow.md +6 -0
- package/runtime/agents/selenium-automation-builder/capabilities/review-selenium-script/capability.yaml +20 -0
- package/runtime/agents/selenium-automation-builder/capabilities/review-selenium-script/decision-rules.md +6 -0
- package/runtime/agents/selenium-automation-builder/capabilities/review-selenium-script/runner.py +40 -0
- package/runtime/agents/selenium-automation-builder/capabilities/review-selenium-script/workflow.md +6 -0
- package/runtime/agents/selenium-automation-builder/capabilities/wrap-selenium-as-capability/capability.yaml +22 -0
- package/runtime/agents/selenium-automation-builder/capabilities/wrap-selenium-as-capability/decision-rules.md +6 -0
- package/runtime/agents/selenium-automation-builder/capabilities/wrap-selenium-as-capability/runner.py +43 -0
- package/runtime/agents/selenium-automation-builder/capabilities/wrap-selenium-as-capability/workflow.md +6 -0
- package/runtime/agents/selenium-automation-builder/infra/integrations/selenium-automation/selenium_automation_repository.py +793 -0
- package/runtime/agents/selenium-automation-builder/knowledge/context.md +15 -0
- package/runtime/agents/selenium-automation-builder/knowledge/policies.yaml +17 -0
- package/runtime/agents/selenium-automation-builder/knowledge/system.md +18 -0
- package/runtime/agents/selenium-automation-builder/templates/capability-wrapper.md +4 -0
- package/runtime/agents/selenium-automation-builder/templates/selenium-automation.py +20 -0
- package/runtime/agents/selenium-automation-builder/templates/selenium-readme.md +13 -0
- package/runtime/agents/selenium-automation-builder/templates/selenium-review-report.md +13 -0
- package/runtime/agents/selenium-automation-builder/templates/selenium-test.py +9 -0
- package/runtime/agents/selenium-automation-builder/tests/test_runners.py +282 -0
- package/runtime/agents/software-specification-analyst/agent.yaml +17 -4
- package/runtime/agents/software-specification-analyst/capabilities/analyze-multiple-projects/capability.yaml +1 -1
- package/runtime/agents/software-specification-analyst/capabilities/analyze-project-context/capability.yaml +1 -1
- package/runtime/agents/software-specification-analyst/capabilities/conduct-requirements-interview/capability.yaml +1 -1
- package/runtime/agents/software-specification-analyst/capabilities/create-complete-spec/capability.yaml +1 -1
- package/runtime/agents/software-specification-analyst/capabilities/create-final-spec-from-analysis/capability.yaml +1 -1
- package/runtime/agents/software-specification-analyst/capabilities/create-functional-spec/capability.yaml +11 -0
- package/runtime/agents/software-specification-analyst/capabilities/create-technical-spec/capability.yaml +12 -0
- package/runtime/agents/software-specification-analyst/capabilities/refine-analysis-with-feedback/capability.yaml +1 -1
- package/runtime/agents/software-specification-analyst/capabilities/write-user-stories/capability.yaml +12 -0
- package/runtime/agents/sqlserver-change-operator/agent.yaml +12 -1
- package/runtime/agents/sqlserver-data-analyzer/agent.yaml +13 -2
- package/runtime/agents/supabase-project-analyst/AGENTS.md +29 -0
- package/runtime/agents/supabase-project-analyst/README.md +23 -0
- package/runtime/agents/supabase-project-analyst/agent.yaml +53 -0
- package/runtime/agents/supabase-project-analyst/capabilities/audit-auth-security/capability.yaml +18 -0
- package/runtime/agents/supabase-project-analyst/capabilities/audit-auth-security/decision-rules.md +5 -0
- package/runtime/agents/supabase-project-analyst/capabilities/audit-auth-security/runner.py +32 -0
- package/runtime/agents/supabase-project-analyst/capabilities/audit-auth-security/workflow.md +6 -0
- package/runtime/agents/supabase-project-analyst/capabilities/audit-rls-policies/capability.yaml +18 -0
- package/runtime/agents/supabase-project-analyst/capabilities/audit-rls-policies/decision-rules.md +6 -0
- package/runtime/agents/supabase-project-analyst/capabilities/audit-rls-policies/runner.py +32 -0
- package/runtime/agents/supabase-project-analyst/capabilities/audit-rls-policies/workflow.md +7 -0
- package/runtime/agents/supabase-project-analyst/capabilities/audit-storage-policies/capability.yaml +18 -0
- package/runtime/agents/supabase-project-analyst/capabilities/audit-storage-policies/decision-rules.md +5 -0
- package/runtime/agents/supabase-project-analyst/capabilities/audit-storage-policies/runner.py +32 -0
- package/runtime/agents/supabase-project-analyst/capabilities/audit-storage-policies/workflow.md +6 -0
- package/runtime/agents/supabase-project-analyst/capabilities/generate-supabase-report/capability.yaml +18 -0
- package/runtime/agents/supabase-project-analyst/capabilities/generate-supabase-report/decision-rules.md +6 -0
- package/runtime/agents/supabase-project-analyst/capabilities/generate-supabase-report/runner.py +32 -0
- package/runtime/agents/supabase-project-analyst/capabilities/generate-supabase-report/workflow.md +6 -0
- package/runtime/agents/supabase-project-analyst/capabilities/inspect-supabase-project/capability.yaml +19 -0
- package/runtime/agents/supabase-project-analyst/capabilities/inspect-supabase-project/decision-rules.md +6 -0
- package/runtime/agents/supabase-project-analyst/capabilities/inspect-supabase-project/runner.py +36 -0
- package/runtime/agents/supabase-project-analyst/capabilities/inspect-supabase-project/workflow.md +7 -0
- package/runtime/agents/supabase-project-analyst/capabilities/plan-supabase-fix/capability.yaml +18 -0
- package/runtime/agents/supabase-project-analyst/capabilities/plan-supabase-fix/decision-rules.md +6 -0
- package/runtime/agents/supabase-project-analyst/capabilities/plan-supabase-fix/runner.py +32 -0
- package/runtime/agents/supabase-project-analyst/capabilities/plan-supabase-fix/workflow.md +6 -0
- package/runtime/agents/supabase-project-analyst/capabilities/review-migrations/capability.yaml +18 -0
- package/runtime/agents/supabase-project-analyst/capabilities/review-migrations/decision-rules.md +6 -0
- package/runtime/agents/supabase-project-analyst/capabilities/review-migrations/runner.py +32 -0
- package/runtime/agents/supabase-project-analyst/capabilities/review-migrations/workflow.md +5 -0
- package/runtime/agents/supabase-project-analyst/infra/integrations/supabase-project/supabase_project_repository.py +589 -0
- package/runtime/agents/supabase-project-analyst/knowledge/context.md +11 -0
- package/runtime/agents/supabase-project-analyst/knowledge/policies.yaml +24 -0
- package/runtime/agents/supabase-project-analyst/knowledge/system.md +10 -0
- package/runtime/agents/supabase-project-analyst/templates/supabase-audit.md +3 -0
- package/runtime/agents/supabase-project-analyst/templates/supabase-fix-plan.md +3 -0
- package/runtime/agents/supabase-project-analyst/templates/supabase-inspection.md +3 -0
- package/runtime/agents/supabase-project-analyst/templates/supabase-report.md +3 -0
- package/runtime/agents/supabase-project-analyst/tests/test_runners.py +239 -0
- package/runtime/agents/task-orchestrator/agent.yaml +25 -3
- package/runtime/agents/task-orchestrator/capabilities/plan-task/capability.yaml +1 -2
- package/runtime/agents/task-orchestrator/capabilities/select-specialists/capability.yaml +1 -2
- package/runtime/agents/technical-integration-analyst/agent.yaml +15 -2
- package/runtime/agents/topdesk-orchestrator/agent.yaml +10 -2
- package/runtime/cli/aikit/__init__.py +1 -1
- package/runtime/cli/aikit/acceptance.py +166 -0
- package/runtime/cli/aikit/agent_executor.py +26 -3
- package/runtime/cli/aikit/agent_registry.py +244 -5
- package/runtime/cli/aikit/architecture.py +84 -0
- package/runtime/cli/aikit/audit.py +172 -3
- package/runtime/cli/aikit/autonomy.py +237 -0
- package/runtime/cli/aikit/capability_runtime.py +522 -0
- package/runtime/cli/aikit/catalog.py +246 -0
- package/runtime/cli/aikit/cli_dispatch.py +1078 -0
- package/runtime/cli/aikit/cli_parser.py +409 -0
- package/runtime/cli/aikit/collaboration.py +359 -0
- package/runtime/cli/aikit/configuration_orchestrator.py +52 -26
- package/runtime/cli/aikit/contribution.py +105 -0
- package/runtime/cli/aikit/core/__init__.py +1 -0
- package/runtime/cli/aikit/core/capability_contract.py +112 -0
- package/runtime/cli/aikit/core/requests.py +69 -0
- package/runtime/cli/aikit/core/runtime.py +64 -0
- package/runtime/cli/aikit/diagnostics.py +8 -2
- package/runtime/cli/aikit/doctor_runtime.py +79 -0
- package/runtime/cli/aikit/errors.py +7 -0
- package/runtime/cli/aikit/eval.py +158 -0
- package/runtime/cli/aikit/execution_reviewer.py +21 -0
- package/runtime/cli/aikit/extensions.py +140 -0
- package/runtime/cli/aikit/fallback.py +1 -0
- package/runtime/cli/aikit/github_pr.py +23 -0
- package/runtime/cli/aikit/guardrails.py +25 -10
- package/runtime/cli/aikit/human_output.py +1026 -0
- package/runtime/cli/aikit/impact_map.py +294 -0
- package/runtime/cli/aikit/interactive_wizard.py +79 -0
- package/runtime/cli/aikit/local_llm_operator.py +35 -1
- package/runtime/cli/aikit/main.py +9 -2834
- package/runtime/cli/aikit/mcp_manifest.py +229 -0
- package/runtime/cli/aikit/mcp_server.py +132 -0
- package/runtime/cli/aikit/mcp_tools.py +262 -0
- package/runtime/cli/aikit/mini_brain.py +227 -0
- package/runtime/cli/aikit/model_router.py +182 -18
- package/runtime/cli/aikit/module_controller.py +335 -0
- package/runtime/cli/aikit/natural_prompt_runtime.py +538 -0
- package/runtime/cli/aikit/notifications.py +716 -2
- package/runtime/cli/aikit/ollama.py +1 -0
- package/runtime/cli/aikit/orchestrator.py +809 -119
- package/runtime/cli/aikit/output.py +63 -2
- package/runtime/cli/aikit/permissions.py +14 -4
- package/runtime/cli/aikit/prompt_injection.py +57 -0
- package/runtime/cli/aikit/review_gate.py +38 -6
- package/runtime/cli/aikit/roadmap.py +195 -0
- package/runtime/cli/aikit/roadmap_cli.py +70 -0
- package/runtime/cli/aikit/router.py +41 -12
- package/runtime/cli/aikit/router_explain.py +152 -0
- package/runtime/cli/aikit/runtime_paths.py +11 -0
- package/runtime/cli/aikit/secrets.py +113 -0
- package/runtime/cli/aikit/sessions.py +88 -2
- package/runtime/cli/aikit/setup_wizard_payload.py +32 -0
- package/runtime/cli/aikit/sources.py +298 -50
- package/runtime/cli/aikit/tasks.py +449 -21
- package/runtime/cli/aikit/wizard_state.py +15 -1
- package/runtime/cli/aikit/workflows.py +115 -0
- package/runtime/cli/aikit/write_policy.py +108 -0
- package/runtime/plugins/claude-code-ai-devkit/README.md +17 -0
- package/runtime/plugins/claude-code-ai-devkit/agents/README.md +29 -2
- package/runtime/plugins/claude-code-ai-devkit/agents/agent-devkit-db-analyst.md +44 -0
- package/runtime/plugins/claude-code-ai-devkit/agents/agent-devkit-execution-reviewer.md +38 -0
- package/runtime/plugins/claude-code-ai-devkit/agents/agent-devkit-pr-reviewer.md +42 -0
- package/runtime/plugins/claude-code-ai-devkit/agents/agent-devkit-repo-explorer.md +40 -0
- package/runtime/plugins/claude-code-ai-devkit/agents/agent-devkit-support-triage.md +43 -0
- package/runtime/plugins/claude-code-ai-devkit/plugin.json +1 -1
- package/runtime/plugins/claude-code-ai-devkit/skills/ai-devkit-router/SKILL.md +16 -0
- package/runtime/plugins/claude-skill-ai-devkit/ai-devkit/SKILL.md +1 -0
- package/runtime/plugins/claude-skill-ai-devkit/ai-devkit/references/subagents.md +21 -0
- package/runtime/plugins/claude-skill-ai-devkit/plugin.json +1 -1
- package/runtime/providers/azure-devops.yaml +9 -0
- package/runtime/providers/github.yaml +4 -0
- package/runtime/providers/local-notification.yaml +5 -2
- package/runtime/providers/local-scheduler.yaml +1 -1
- package/runtime/providers/supabase.yaml +46 -0
- package/runtime/scripts/release-catalog-snapshot.json +543 -0
- package/runtime/scripts/release-gate.py +141 -1
- package/runtime/scripts/validate-repo.py +312 -0
- package/runtime/vendor/skills/napkin/napkin.md +15 -9
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
"""Mini-brain local model contract and setup helpers."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from datetime import datetime, timezone
|
|
6
|
+
from typing import Any
|
|
7
|
+
|
|
8
|
+
from cli.aikit.llm import BACKENDS, configure_backend, doctor_backend, load_config, save_config
|
|
9
|
+
from cli.aikit.ollama import ollama_pull, ollama_status
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
MINI_BRAIN_CONFIG_KEY = "mini_brain"
|
|
13
|
+
DEFAULT_HF_MODEL = "Qwen/Qwen3-0.6B"
|
|
14
|
+
DEFAULT_OLLAMA_MODEL = "qwen3:0.6b"
|
|
15
|
+
DEFAULT_PROVIDER = "ollama"
|
|
16
|
+
DEFAULT_BASE_URL = "http://localhost:11434/v1"
|
|
17
|
+
ALLOWED_TASKS = [
|
|
18
|
+
"setup_help",
|
|
19
|
+
"wizard_conversation",
|
|
20
|
+
"intent_classification",
|
|
21
|
+
"command_explanation",
|
|
22
|
+
"short_error_summary",
|
|
23
|
+
]
|
|
24
|
+
FORBIDDEN_TASKS = [
|
|
25
|
+
"external_write_decision",
|
|
26
|
+
"destructive_operation_approval",
|
|
27
|
+
"security_review_final",
|
|
28
|
+
"architecture_decision",
|
|
29
|
+
"secret_handling",
|
|
30
|
+
"final_delivery_decision",
|
|
31
|
+
]
|
|
32
|
+
DEFAULT_LIMITS = {
|
|
33
|
+
"max_context_chars": 6000,
|
|
34
|
+
"max_response_chars": 2000,
|
|
35
|
+
"max_llm_calls": 1,
|
|
36
|
+
}
|
|
37
|
+
DEFAULT_GUARDRAILS = [
|
|
38
|
+
"no_secrets",
|
|
39
|
+
"low_risk_only",
|
|
40
|
+
"no_external_writes",
|
|
41
|
+
"coordinator_review_required",
|
|
42
|
+
]
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def mini_brain_contract(
|
|
46
|
+
*,
|
|
47
|
+
config: dict[str, Any] | None = None,
|
|
48
|
+
ollama_payload: dict[str, Any] | None = None,
|
|
49
|
+
ollama_backend: dict[str, Any] | None = None,
|
|
50
|
+
) -> dict[str, Any]:
|
|
51
|
+
config = load_config() if config is None else config
|
|
52
|
+
stored = config.get(MINI_BRAIN_CONFIG_KEY) if isinstance(config.get(MINI_BRAIN_CONFIG_KEY), dict) else {}
|
|
53
|
+
enabled = bool(stored.get("enabled"))
|
|
54
|
+
provider = stored.get("provider") or stored.get("runtime") or DEFAULT_PROVIDER
|
|
55
|
+
hf_model = stored.get("hf_model") or stored.get("model") or DEFAULT_HF_MODEL
|
|
56
|
+
ollama_model = stored.get("ollama_model") or DEFAULT_OLLAMA_MODEL
|
|
57
|
+
ollama_payload = ollama_status() if ollama_payload is None else ollama_payload
|
|
58
|
+
ollama_backend = doctor_backend(BACKENDS["ollama"], config) if ollama_backend is None else ollama_backend
|
|
59
|
+
backend_configured = ollama_backend.get("status") == "ok"
|
|
60
|
+
runtime_available = ollama_payload.get("status") == "ok" or backend_configured
|
|
61
|
+
available = enabled and provider == DEFAULT_PROVIDER and runtime_available
|
|
62
|
+
status = "ok" if available else "disabled" if not enabled else "unavailable"
|
|
63
|
+
return {
|
|
64
|
+
"kind": "mini-brain",
|
|
65
|
+
"status": status,
|
|
66
|
+
"enabled": enabled,
|
|
67
|
+
"available": available,
|
|
68
|
+
"configured": enabled and provider == DEFAULT_PROVIDER and backend_configured,
|
|
69
|
+
"provider": provider,
|
|
70
|
+
"runtime": provider,
|
|
71
|
+
"hf_model": hf_model,
|
|
72
|
+
"model": hf_model,
|
|
73
|
+
"ollama_model": ollama_model,
|
|
74
|
+
"allowed_tasks": list_value(stored.get("allowed_tasks"), ALLOWED_TASKS),
|
|
75
|
+
"forbidden_tasks": list_value(stored.get("forbidden_tasks"), FORBIDDEN_TASKS),
|
|
76
|
+
"limits": dict_value(stored.get("limits"), DEFAULT_LIMITS),
|
|
77
|
+
"guardrails": list_value(stored.get("guardrails"), DEFAULT_GUARDRAILS),
|
|
78
|
+
"stored_secret": False,
|
|
79
|
+
"ollama": {
|
|
80
|
+
"status": ollama_payload.get("status"),
|
|
81
|
+
"daemon": (ollama_payload.get("daemon") or {}).get("status")
|
|
82
|
+
if isinstance(ollama_payload.get("daemon"), dict)
|
|
83
|
+
else None,
|
|
84
|
+
"model_count": ollama_payload.get("model_count"),
|
|
85
|
+
},
|
|
86
|
+
"backend": {
|
|
87
|
+
"status": ollama_backend.get("status"),
|
|
88
|
+
"model": ollama_backend.get("model"),
|
|
89
|
+
"base_url": ollama_backend.get("base_url"),
|
|
90
|
+
},
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
def setup_mini_brain(
|
|
95
|
+
*,
|
|
96
|
+
dry_run: bool = False,
|
|
97
|
+
yes: bool = False,
|
|
98
|
+
set_default: bool = False,
|
|
99
|
+
model: str = DEFAULT_OLLAMA_MODEL,
|
|
100
|
+
) -> dict[str, Any]:
|
|
101
|
+
if dry_run or not yes:
|
|
102
|
+
status = "planned" if dry_run else "needs-confirmation"
|
|
103
|
+
return {
|
|
104
|
+
"kind": "mini-brain-setup",
|
|
105
|
+
"status": status,
|
|
106
|
+
"ok": bool(dry_run),
|
|
107
|
+
"dry_run": dry_run,
|
|
108
|
+
"yes": yes,
|
|
109
|
+
"stored_secret": False,
|
|
110
|
+
"mini_brain": planned_contract(model=model),
|
|
111
|
+
"pull": ollama_pull(model, yes=False, dry_run=dry_run),
|
|
112
|
+
"next_steps": ["agent setup mini-brain --yes"],
|
|
113
|
+
"message": "Use --yes to pull Qwen3-0.6B with Ollama and enable the mini-brain.",
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
pull = ollama_pull(model, yes=True, dry_run=False)
|
|
117
|
+
if not pull.get("ok"):
|
|
118
|
+
return {
|
|
119
|
+
"kind": "mini-brain-setup",
|
|
120
|
+
"status": "failed",
|
|
121
|
+
"ok": False,
|
|
122
|
+
"dry_run": False,
|
|
123
|
+
"yes": True,
|
|
124
|
+
"stored_secret": False,
|
|
125
|
+
"mini_brain": planned_contract(model=model),
|
|
126
|
+
"pull": pull,
|
|
127
|
+
"next_steps": ["Install Ollama or run agent ollama pull qwen3:0.6b --yes"],
|
|
128
|
+
"message": pull.get("message") or "Could not pull the mini-brain model.",
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
existing_config = load_config()
|
|
132
|
+
existing_ollama = (
|
|
133
|
+
existing_config.get("llm", {}).get("backends", {}).get(DEFAULT_PROVIDER)
|
|
134
|
+
if isinstance(existing_config.get("llm"), dict)
|
|
135
|
+
else {}
|
|
136
|
+
)
|
|
137
|
+
existing_base_url = existing_ollama.get("base_url") if isinstance(existing_ollama, dict) else None
|
|
138
|
+
configured = configure_backend(
|
|
139
|
+
DEFAULT_PROVIDER,
|
|
140
|
+
base_url=existing_base_url or DEFAULT_BASE_URL,
|
|
141
|
+
model=model,
|
|
142
|
+
set_default=set_default,
|
|
143
|
+
)
|
|
144
|
+
config = load_config()
|
|
145
|
+
config[MINI_BRAIN_CONFIG_KEY] = stored_config(model=model)
|
|
146
|
+
written_path = save_config(config)
|
|
147
|
+
contract = mini_brain_contract(config=config)
|
|
148
|
+
return {
|
|
149
|
+
"kind": "mini-brain-setup",
|
|
150
|
+
"status": "configured",
|
|
151
|
+
"ok": True,
|
|
152
|
+
"dry_run": False,
|
|
153
|
+
"yes": True,
|
|
154
|
+
"stored_secret": False,
|
|
155
|
+
"config_path": str(written_path),
|
|
156
|
+
"mini_brain": contract,
|
|
157
|
+
"pull": pull,
|
|
158
|
+
"llm_configure": configured,
|
|
159
|
+
"next_steps": ["Use low-risk setup, wizard and summary prompts normally."],
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
def planned_contract(*, model: str = DEFAULT_OLLAMA_MODEL) -> dict[str, Any]:
|
|
164
|
+
return {
|
|
165
|
+
"kind": "mini-brain",
|
|
166
|
+
"status": "planned",
|
|
167
|
+
"enabled": False,
|
|
168
|
+
"available": False,
|
|
169
|
+
"configured": False,
|
|
170
|
+
"provider": DEFAULT_PROVIDER,
|
|
171
|
+
"runtime": DEFAULT_PROVIDER,
|
|
172
|
+
"hf_model": DEFAULT_HF_MODEL,
|
|
173
|
+
"model": DEFAULT_HF_MODEL,
|
|
174
|
+
"ollama_model": model,
|
|
175
|
+
"allowed_tasks": list(ALLOWED_TASKS),
|
|
176
|
+
"forbidden_tasks": list(FORBIDDEN_TASKS),
|
|
177
|
+
"limits": dict(DEFAULT_LIMITS),
|
|
178
|
+
"guardrails": list(DEFAULT_GUARDRAILS),
|
|
179
|
+
"stored_secret": False,
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
def stored_config(*, model: str = DEFAULT_OLLAMA_MODEL) -> dict[str, Any]:
|
|
184
|
+
return {
|
|
185
|
+
"enabled": True,
|
|
186
|
+
"provider": DEFAULT_PROVIDER,
|
|
187
|
+
"runtime": DEFAULT_PROVIDER,
|
|
188
|
+
"hf_model": DEFAULT_HF_MODEL,
|
|
189
|
+
"model": DEFAULT_HF_MODEL,
|
|
190
|
+
"ollama_model": model,
|
|
191
|
+
"allowed_tasks": list(ALLOWED_TASKS),
|
|
192
|
+
"forbidden_tasks": list(FORBIDDEN_TASKS),
|
|
193
|
+
"limits": dict(DEFAULT_LIMITS),
|
|
194
|
+
"guardrails": list(DEFAULT_GUARDRAILS),
|
|
195
|
+
"stored_secret": False,
|
|
196
|
+
"updated_at": now_iso(),
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
def summarize_mini_brain(value: Any) -> dict[str, Any] | None:
|
|
201
|
+
if not isinstance(value, dict):
|
|
202
|
+
return None
|
|
203
|
+
return {
|
|
204
|
+
"status": value.get("status"),
|
|
205
|
+
"enabled": value.get("enabled") is True,
|
|
206
|
+
"available": value.get("available") is True,
|
|
207
|
+
"provider": value.get("provider"),
|
|
208
|
+
"hf_model": value.get("hf_model") or value.get("model"),
|
|
209
|
+
"ollama_model": value.get("ollama_model"),
|
|
210
|
+
"stored_secret": value.get("stored_secret") is True,
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
def list_value(value: Any, default: list[str]) -> list[str]:
|
|
215
|
+
if not isinstance(value, list):
|
|
216
|
+
return list(default)
|
|
217
|
+
return [str(item) for item in value if str(item).strip()]
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
def dict_value(value: Any, default: dict[str, Any]) -> dict[str, Any]:
|
|
221
|
+
if not isinstance(value, dict):
|
|
222
|
+
return dict(default)
|
|
223
|
+
return dict(value)
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
def now_iso() -> str:
|
|
227
|
+
return datetime.now(timezone.utc).isoformat()
|
|
@@ -6,7 +6,9 @@ import re
|
|
|
6
6
|
from typing import Any
|
|
7
7
|
|
|
8
8
|
from cli.aikit.llm import BACKENDS, doctor_backend, llm_preference, load_config
|
|
9
|
+
from cli.aikit.mini_brain import mini_brain_contract
|
|
9
10
|
from cli.aikit.ollama import ollama_status
|
|
11
|
+
from cli.aikit.write_policy import normalize_write_policy, write_policy_public_fields
|
|
10
12
|
|
|
11
13
|
|
|
12
14
|
OPERATIONAL_PATTERN = re.compile(
|
|
@@ -15,51 +17,211 @@ OPERATIONAL_PATTERN = re.compile(
|
|
|
15
17
|
HIGH_LEVEL_PATTERN = re.compile(
|
|
16
18
|
r"(?i)\b(arquitet|decid|aprovar|reprovar|especifica|requisit|implemente|codigo|c[oó]digo|documento|automac|deploy|seguran)\b"
|
|
17
19
|
)
|
|
20
|
+
HUMAN_PATTERN = re.compile(
|
|
21
|
+
r"(?i)\b(confirme|autorize|aprovar|aprovação|permiss[aã]o|delete|excluir|destrutiv)\b"
|
|
22
|
+
)
|
|
23
|
+
SENSITIVE_SECRET_ACTION_PATTERN = re.compile(
|
|
24
|
+
r"(?i)(\b(mostre|exiba|revele|configure|alter[ea]|salve|envie|publique|registre|grave)\b.*\b(credencial|senha|token|segredo)\b|\b(credencial|senha|token|segredo)\b.*\b(mostre|exiba|revele|configure|alter[ea]|salve|envie|publique|registre|grave)\b)"
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
FORBIDDEN_ACTIONS = [
|
|
28
|
+
"final-review",
|
|
29
|
+
"external-write",
|
|
30
|
+
"permission-decision",
|
|
31
|
+
"architecture-decision",
|
|
32
|
+
"pr-approval",
|
|
33
|
+
]
|
|
18
34
|
|
|
19
35
|
|
|
20
|
-
def build_model_plan(
|
|
36
|
+
def build_model_plan(
|
|
37
|
+
prompt: str,
|
|
38
|
+
*,
|
|
39
|
+
route: dict[str, Any] | None = None,
|
|
40
|
+
routing_decision: dict[str, Any] | None = None,
|
|
41
|
+
specialist_tasks: list[dict[str, Any]] | None = None,
|
|
42
|
+
configuration_tasks: list[dict[str, Any]] | None = None,
|
|
43
|
+
) -> dict[str, Any]:
|
|
21
44
|
config = load_config()
|
|
22
45
|
preference = llm_preference(config)
|
|
23
46
|
ollama = ollama_status()
|
|
24
47
|
ollama_backend = doctor_backend(BACKENDS["ollama"], config)
|
|
25
|
-
|
|
48
|
+
mini_brain = mini_brain_contract(config=config, ollama_payload=ollama, ollama_backend=ollama_backend)
|
|
49
|
+
local_available = mini_brain.get("available") is True
|
|
26
50
|
operational = bool(OPERATIONAL_PATTERN.search(prompt))
|
|
27
51
|
high_level = bool(HIGH_LEVEL_PATTERN.search(prompt))
|
|
28
|
-
|
|
52
|
+
policy = choose_model_strategy(
|
|
53
|
+
prompt,
|
|
54
|
+
route=route,
|
|
55
|
+
routing_decision=routing_decision,
|
|
56
|
+
specialist_tasks=specialist_tasks or [],
|
|
57
|
+
configuration_tasks=configuration_tasks or [],
|
|
58
|
+
operational=operational,
|
|
59
|
+
high_level=high_level,
|
|
60
|
+
local_available=local_available,
|
|
61
|
+
)
|
|
62
|
+
use_local = policy["strategy"] == "mini-brain" and local_available
|
|
29
63
|
return {
|
|
30
64
|
"kind": "model-plan",
|
|
31
65
|
"status": "planned",
|
|
66
|
+
"strategy": policy["strategy"],
|
|
67
|
+
"reason": policy["reason"],
|
|
68
|
+
"risk": policy["risk"],
|
|
69
|
+
"confidence": policy["confidence"],
|
|
70
|
+
"fallback": policy["fallback"],
|
|
71
|
+
"forbidden_actions": list(policy["forbidden_actions"]),
|
|
72
|
+
"decision_matrix": policy["decision_matrix"],
|
|
73
|
+
"max_llm_calls": policy["max_llm_calls"],
|
|
32
74
|
"intent": route.get("intent") if route else "llm",
|
|
33
75
|
"primary_coordinators": coordinator_order(preference),
|
|
34
76
|
"local_llm_role": "operational-worker",
|
|
35
77
|
"local_llm_available": local_available,
|
|
36
|
-
"local_llm_provider": "ollama",
|
|
78
|
+
"local_llm_provider": mini_brain.get("provider") or "ollama",
|
|
37
79
|
"local_llm_backend_configured": ollama_backend.get("status") == "ok",
|
|
38
80
|
"local_llm_runtime": {
|
|
39
81
|
"binary_status": ollama.get("status"),
|
|
40
82
|
"backend_status": ollama_backend.get("status"),
|
|
41
|
-
"model": ollama_backend.get("model"),
|
|
83
|
+
"model": mini_brain.get("ollama_model") or ollama_backend.get("model"),
|
|
42
84
|
"base_url": ollama_backend.get("base_url"),
|
|
43
85
|
},
|
|
86
|
+
"mini_brain": mini_brain,
|
|
44
87
|
"local_llm_recommended": operational,
|
|
45
88
|
"local_llm_selected": use_local,
|
|
46
89
|
"delegation": {
|
|
47
|
-
"allowed":
|
|
90
|
+
"allowed": policy["strategy"] == "mini-brain",
|
|
48
91
|
"selected": use_local,
|
|
49
|
-
"reason": local_reason(
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
"
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
],
|
|
92
|
+
"reason": local_reason(
|
|
93
|
+
operational=operational,
|
|
94
|
+
local_available=local_available,
|
|
95
|
+
high_level=high_level,
|
|
96
|
+
strategy=policy["strategy"],
|
|
97
|
+
),
|
|
98
|
+
"forbidden_actions": list(policy["forbidden_actions"]),
|
|
57
99
|
},
|
|
58
100
|
"fallback_order": preference.get("order") or [],
|
|
59
101
|
"route": route,
|
|
60
102
|
}
|
|
61
103
|
|
|
62
104
|
|
|
105
|
+
def choose_model_strategy(
|
|
106
|
+
prompt: str,
|
|
107
|
+
*,
|
|
108
|
+
route: dict[str, Any] | None,
|
|
109
|
+
routing_decision: dict[str, Any] | None,
|
|
110
|
+
specialist_tasks: list[dict[str, Any]],
|
|
111
|
+
configuration_tasks: list[dict[str, Any]],
|
|
112
|
+
operational: bool,
|
|
113
|
+
high_level: bool,
|
|
114
|
+
local_available: bool,
|
|
115
|
+
) -> dict[str, Any]:
|
|
116
|
+
routing_status = (routing_decision or {}).get("status")
|
|
117
|
+
if routing_status in {"ambiguous", "low-confidence"}:
|
|
118
|
+
return policy(
|
|
119
|
+
"human",
|
|
120
|
+
"Routing is ambiguous or low confidence, so a human must choose the agent/capability.",
|
|
121
|
+
risk="medium",
|
|
122
|
+
confidence="low",
|
|
123
|
+
fallback="ask-user-to-confirm-route",
|
|
124
|
+
max_llm_calls=0,
|
|
125
|
+
matrix="Ambigua + risco/side effect -> humano",
|
|
126
|
+
)
|
|
127
|
+
if configuration_tasks:
|
|
128
|
+
return policy(
|
|
129
|
+
"human",
|
|
130
|
+
"A provider/source configuration task is required before execution.",
|
|
131
|
+
risk="medium",
|
|
132
|
+
confidence="high",
|
|
133
|
+
fallback="provider-setup-wizard",
|
|
134
|
+
max_llm_calls=0,
|
|
135
|
+
matrix="Credencial/config faltante -> humano",
|
|
136
|
+
)
|
|
137
|
+
if prompt_requires_human(prompt) or any(task_requires_confirmation(task) for task in specialist_tasks):
|
|
138
|
+
return policy(
|
|
139
|
+
"human",
|
|
140
|
+
"The prompt or selected task requires human confirmation by policy.",
|
|
141
|
+
risk="high",
|
|
142
|
+
confidence="high",
|
|
143
|
+
fallback="ask-human-confirmation",
|
|
144
|
+
max_llm_calls=0,
|
|
145
|
+
matrix="Ambigua + risco/side effect -> humano",
|
|
146
|
+
)
|
|
147
|
+
if route or has_executable_known_task(specialist_tasks):
|
|
148
|
+
return policy(
|
|
149
|
+
"automation",
|
|
150
|
+
"The task maps to a known deterministic capability with controlled policy.",
|
|
151
|
+
risk="low",
|
|
152
|
+
confidence="high",
|
|
153
|
+
fallback="manual-steps-if-provider-missing",
|
|
154
|
+
max_llm_calls=0,
|
|
155
|
+
matrix="Conhecida + estruturada + baixo risco -> automacao",
|
|
156
|
+
)
|
|
157
|
+
if operational and not high_level:
|
|
158
|
+
return policy(
|
|
159
|
+
"mini-brain" if local_available else "external-llm",
|
|
160
|
+
"The prompt is operational and low-risk; local mini-brain is preferred when available.",
|
|
161
|
+
risk="low",
|
|
162
|
+
confidence="medium" if local_available else "low",
|
|
163
|
+
fallback="external-llm" if local_available else "configure-local-mini-brain-or-use-external-llm",
|
|
164
|
+
max_llm_calls=1,
|
|
165
|
+
matrix="Simples + conversa/setup -> mini cerebro local",
|
|
166
|
+
)
|
|
167
|
+
return policy(
|
|
168
|
+
"external-llm",
|
|
169
|
+
"The task requires coordinator-level reasoning, synthesis, or open-ended judgment.",
|
|
170
|
+
risk="medium" if not high_level else "high",
|
|
171
|
+
confidence="medium",
|
|
172
|
+
fallback="ask-human-if-review-or-backend-unavailable",
|
|
173
|
+
max_llm_calls=1,
|
|
174
|
+
matrix="Aberta + complexa + alto julgamento -> LLM externa",
|
|
175
|
+
)
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
def policy(
|
|
179
|
+
strategy: str,
|
|
180
|
+
reason: str,
|
|
181
|
+
*,
|
|
182
|
+
risk: str,
|
|
183
|
+
confidence: str,
|
|
184
|
+
fallback: str,
|
|
185
|
+
max_llm_calls: int,
|
|
186
|
+
matrix: str,
|
|
187
|
+
) -> dict[str, Any]:
|
|
188
|
+
return {
|
|
189
|
+
"strategy": strategy,
|
|
190
|
+
"reason": reason,
|
|
191
|
+
"risk": risk,
|
|
192
|
+
"confidence": confidence,
|
|
193
|
+
"fallback": fallback,
|
|
194
|
+
"forbidden_actions": FORBIDDEN_ACTIONS,
|
|
195
|
+
"max_llm_calls": max_llm_calls,
|
|
196
|
+
"decision_matrix": {
|
|
197
|
+
"selected_rule": matrix,
|
|
198
|
+
"priority": ["deterministic-rule", "local-automation", "mini-brain", "external-llm", "human"],
|
|
199
|
+
},
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
def has_executable_known_task(tasks: list[dict[str, Any]]) -> bool:
|
|
204
|
+
return any(task.get("executable") and is_autonomous_safe_task(task) for task in tasks)
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
def is_autonomous_safe_task(task: dict[str, Any]) -> bool:
|
|
208
|
+
metadata = task.get("write_policy_metadata") if isinstance(task.get("write_policy_metadata"), dict) else {}
|
|
209
|
+
if metadata:
|
|
210
|
+
return bool(metadata.get("autonomous_safe"))
|
|
211
|
+
return bool(write_policy_public_fields(task.get("write_policy"))["write_policy_metadata"].get("autonomous_safe"))
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
def task_requires_confirmation(task: dict[str, Any]) -> bool:
|
|
215
|
+
metadata = task.get("write_policy_metadata") if isinstance(task.get("write_policy_metadata"), dict) else {}
|
|
216
|
+
if not metadata:
|
|
217
|
+
metadata = write_policy_public_fields(normalize_write_policy(task.get("write_policy")))["write_policy_metadata"]
|
|
218
|
+
return bool(metadata.get("requires_confirmation") or metadata.get("blocked_by_default"))
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
def prompt_requires_human(prompt: str) -> bool:
|
|
222
|
+
return bool(HUMAN_PATTERN.search(prompt) or SENSITIVE_SECRET_ACTION_PATTERN.search(prompt))
|
|
223
|
+
|
|
224
|
+
|
|
63
225
|
def coordinator_order(preference: dict[str, Any]) -> list[str]:
|
|
64
226
|
order = list(preference.get("order") or [])
|
|
65
227
|
preferred = [item for item in order if item in {"claude-code", "codex-cli"}]
|
|
@@ -69,11 +231,13 @@ def coordinator_order(preference: dict[str, Any]) -> list[str]:
|
|
|
69
231
|
return preferred
|
|
70
232
|
|
|
71
233
|
|
|
72
|
-
def local_reason(*, operational: bool, local_available: bool, high_level: bool) -> str:
|
|
234
|
+
def local_reason(*, operational: bool, local_available: bool, high_level: bool, strategy: str) -> str:
|
|
235
|
+
if strategy != "mini-brain":
|
|
236
|
+
return "Local LLM delegation is not selected by the model strategy."
|
|
73
237
|
if operational and local_available and high_level:
|
|
74
|
-
return "Use
|
|
238
|
+
return "Use the local mini-brain for operational preprocessing; coordinator review remains mandatory."
|
|
75
239
|
if operational and local_available:
|
|
76
|
-
return "Task is operational and local
|
|
240
|
+
return "Task is operational and the local mini-brain is enabled and available."
|
|
77
241
|
if operational and not local_available:
|
|
78
|
-
return "Task is operational, but
|
|
242
|
+
return "Task is operational, but the local mini-brain is not enabled or available; coordinator/API fallback should execute."
|
|
79
243
|
return "Task requires coordinator-level reasoning or review."
|