tools/ registry, not the workspace file tools.
What it enables
- One-command (or scheduled) AWS audit: compute footprint, storage hygiene, IAM key/MFA gaps, network exposure, cost movers, RDS posture, and CloudTrail coverage — all in a single run.
- A consistent, narrated artifact (Markdown + Slack Block Kit) that the team can read in 30 seconds instead of clicking through ten console tabs.
- Graceful degradation when Cost Explorer or Compute Optimizer aren’t
enabled: those tools surface
OptInRequiredas a cleanToolResult(ok=False)and the loop continues with the remaining signals. - A blueprint for future ops scenarios (Incident Response, Lead Qualifier, Vendor Audit) that need the same connector pattern.
What’s changed
- New scenario YAML:
knowledge-hub/scenarios/aws_pulse_report.yamlwith three levels —collect(tool_loop),synthesize(prompt),publish(tool_loop) — wired byintent_routes: [aws_pulse, aws_audit, cloud_audit, aws_cost, aws_security]. - Three new prompt builders in
worker/worker/graph/scenarios/prompts.py:aws_pulse_collect,aws_pulse_synthesize,aws_pulse_publish. - CLI smoke runner:
python -m worker.scripts.run_scenario aws_pulse_report. Routes through the realLlmProviders+EnvToolSecretProvider; prints the final Markdown body and a compact JSON tail.
Impact scope
- Pure addition. Doesn’t touch the file-tool dispatch path; existing
code_build/document_writing/quick_qaruns are unaffected. - Requires per-tenant
aws_defaultandslack_botsecrets seeded viapython -m worker.scripts.seed_tool_secret(see the external-tools-platform doc for shape). - Defaults to off — only fires on jobs that carry one of the declared intent routes.
- Cost-bounded by the scenario budget (
max_cost_usd: 2.50,max_duration_s: 600). - Cost Explorer + Compute Optimizer enablement on the AWS account is optional; gated tools degrade gracefully.
Tests
- Load test: every
prompt_refresolves to a registered builder; everyintra_toolsname is in the registry; intent routes index back to this scenario. - End-to-end integration test: drives the production
ScenarioOrchestratorwith a scriptedFakeProvidersqueue,botocore.stub.Stubberfor AWS, andhttpx.MockTransportfor Slack. Covers the happy path and the OptInRequired graceful path.