feat: add cluster-troubleshoot skill - #33
Conversation
|
Skipping CI for Draft Pull Request. |
|
I've experimented with #39. It seems to be useful to split the analysis to phases as collect evidence, diagnose. |
Add OpenShift cluster diagnostics skill for investigating live cluster issues (pod crashes, node failures, operator degradation, etc.) using oc commands and Prometheus metrics. Signed-off-by: Alberto Falossi <afalossi@redhat.com> Assisted-by: Claude Code:claude-opus-4-6
Signed-off-by: Alberto Falossi <afalossi@redhat.com>
Remove ROLE section, add available CLI tools and writable directories to ENVIRONMENT, restrict remediation output to the specific alert being analyzed, and drop curly braces from THANOS_URL references to avoid ADK template substitution errors. Signed-off-by: Alberto Falossi <afalossi@redhat.com> Assisted-by: Claude Code:claude-opus-4-6
Move SKILL.md and tools/ into a new investigate-alert/ subdirectory under cluster-troubleshoot/, which now serves as a parent for multiple troubleshooting skills. Narrow the skill scope to focus on investigating firing alerts rather than general cluster troubleshooting. Key changes: - Rename skill from cluster-troubleshoot to investigate-alert - Reorganize investigation protocol: add blast-radius scoping step, remove symptom-based discovery path, renumber remaining steps - Update terminology: "fix" to "remediation options" throughout - Simplify cluster-troubleshoot/README.md to describe the directory - Update eval system_prompt and test_cases to match new skill name Signed-off-by: Alberto Falossi <afalossi@redhat.com> Assisted-by: Claude Code:claude-opus-4-6
f86961d to
0ccc292
Compare
Eval Results
11 passed | Provider: |
- Quote exported values with %q in prometheus-setup.sh - Use jq -n for JSON construction in fetch-alert-rule.sh - Validate alert name format in query-alert.sh - Add default case for unsupported kinds in diagnose-workload.sh - Amend "All output JSON" claim to note prometheus-setup.sh exception Signed-off-by: Alberto Falossi <afalossi@redhat.com> Assisted-by: Claude Code:claude-opus-4-6
Rewrite all test cases to start from a firing alert as the trigger point, matching the skill's identity shift from generic cluster troubleshooting to alert-specific investigation. - Tool-selection tests now begin with "you are investigating alert X" - Mock-based tests include alert context in the scenario - Add step3_mandatory_logs test for protocol evidence requirements - Add fetch_alert_rule test (query-alert vs fetch-alert-rule distinction) - Drop diagnose_pod_log_flag (flag trivia, not investigation-relevant) Signed-off-by: Alberto Falossi <afalossi@redhat.com> Assisted-by: Claude Code:claude-opus-4-6
|
@falox: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
|
||
| # Tools | ||
|
|
||
| The `tools/` directory contains diagnostic scripts. All output JSON to stdout and return structured error objects on failure, except `prometheus-setup.sh` which prints shell export commands for `eval`. Run `eval $(bash tools/prometheus-setup.sh)` once per session before using Prometheus tools. |
There was a problem hiding this comment.
Can we automatically run the prometheus-setup.sh script if any of the prometheus tools are called? That would likely be simpler/less tokens then expecting the model to do this
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Cali0707, falox The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Add OpenShift cluster diagnostics skill for investigating live cluster issues (pod crashes, node failures, operator degradation, etc.) using oc commands and Prometheus metrics.
Assisted-by: Claude Code:claude-opus-4-6