executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
castai-core-workflow-bEnable CAST AI optimization through a measured canary with explicit node and workload policy boundaries. Use when observation-first onboarding is complete and Node Autoscaling, Workload Autoscaling, or managed HPA behavior can be activated. Trigger with: "enable CAST AI automation", "canary CAST AI autoscaling", "apply CAST AI optimization policies".
Independent GitHub snapshot · Automated classification · Original documentation governs
name: castai-core-workflow-b description: 'Enable CAST AI optimization through a measured canary with explicit node and workload policy boundaries. Use when observation-first onboarding is complete and Node Autoscaling, Workload Autoscaling, or managed HPA behavior can be activated. Trigger with: "enable CAST AI automation", "canary CAST AI autoscaling", "apply CAST AI optimization policies".' allowed-tools: Read, Grep, Write, Edit, Bash(kubectl:), Bash(terraform:), Bash(castctl:*) version: 2.0.0 argument-hint: '[cluster-and-canary-workload]' model: inherit effort: high license: MIT author: Jeremy Longshore jeremy@intentsolutions.io tags:
Turn recommendations into automation one bounded control at a time. Separate node capacity, vertical workload rightsizing, and horizontal replica control so each has an observable success condition and rollback.
Use Read and Grep to map Node Autoscaling, Workload Autoscaler vertical mode, horizontal autoscaling, existing HPAs, and external provisioners. Record one owner for each control. Do not transfer HPA ownership implicitly.
Use Write or Edit to define approved node templates, availability zones, instance lifecycle constraints, maximum CPU, workload minimums/maximums, policy assignment, PDB expectations, and rollback thresholds. Do not add the deprecated cluster minimum CPU setting.
Use Bash(terraform:) to produce a saved reviewed plan when Terraform owns the configuration. Use Bash(castctl:) only for supported inspection or documented feature operations. Confirm the diff affects the intended cluster and canary only.
Choose Immediate mode only when controlled pod replacement is acceptable; the Eviction API will enforce PDBs. Choose Deferred mode when recommendations should apply on natural recreation. If horizontal autoscaling is enabled, review the native autoscaling/v2 HPA configuration and any take-ownership decision.
Use Bash(kubectl:*) to inspect pending pods, scheduling events, HPA state, pod replacements, PDBs, requests, and node changes. Compare availability, latency, saturation, and spend to the pre-change baseline; do not optimize on cost alone.
Expand one policy assignment group at a time only after the canary window passes. Roll back automation or policy assignment when error budget, capacity, disruption, or performance thresholds fail, while preserving evidence.
Use Read and Grep for ownership and policy evidence. Use Write and Edit for the control matrix and rollback record. Use Bash(terraform:), Bash(castctl:), and Bash(kubectl:*) only inside the approved plan, rollout, and observation boundaries.
A stateless deployment starts in Deferred vertical mode with no HPA ownership transfer. A later reviewed change enables policy-managed horizontal scaling after the workload owner approves replica bounds and stabilization behavior.
| Failure | Response |
|---|---|
| PDB blocks Immediate mode | Preserve availability and select Deferred mode or revise with owner approval |
| Pending pods cannot match templates | Roll back and correct template constraints |
| Existing HPA is unexpectedly replaced | Disable managed horizontal scaling and restore declared ownership |
| Cost falls while latency regresses | Roll back; performance guardrails take precedence |