Skip to content

feat: add cluster-troubleshoot skill#33

Open
falox wants to merge 7 commits into
openshift:mainfrom
falox:cluster-troubleshoot-skill
Open

feat: add cluster-troubleshoot skill#33
falox wants to merge 7 commits into
openshift:mainfrom
falox:cluster-troubleshoot-skill

Conversation

@falox

@falox falox commented Jun 15, 2026

Copy link
Copy Markdown

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

@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 15, 2026
@openshift-ci

openshift-ci Bot commented Jun 15, 2026

Copy link
Copy Markdown

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci

openshift-ci Bot commented Jun 15, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: falox
Once this PR has been reviewed and has the lgtm label, please assign matzew for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Comment thread cluster-troubleshoot/OWNERS Outdated
Comment thread cluster-troubleshoot/OWNERS Outdated
Comment thread cluster-troubleshoot/SKILL.md Outdated
Comment thread cluster-troubleshoot/SKILL.md Outdated
@falox
falox marked this pull request as ready for review July 9, 2026 14:08
@openshift-ci openshift-ci Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 9, 2026
@openshift-ci
openshift-ci Bot requested review from Cali0707 and mrunalp July 9, 2026 14:09
@tremes

tremes commented Jul 17, 2026

Copy link
Copy Markdown

I've experimented with #39. It seems to be useful to split the analysis to phases as collect evidence, diagnose.

falox and others added 5 commits July 21, 2026 21:59
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
@falox
falox force-pushed the cluster-troubleshoot-skill branch from f86961d to 0ccc292 Compare July 21, 2026 20:56
@falox

falox commented Jul 21, 2026

Copy link
Copy Markdown
Author

I've experimented with #39. It seems to be useful to split the analysis to phases as collect evidence, diagnose.

thanks @tremes. I cherry picked your commit

@falox

falox commented Jul 21, 2026

Copy link
Copy Markdown
Author

Eval Results

Test Result
query_firing_alert PASSED
fetch_alert_rule PASSED
diagnose_pod_from_alert PASSED
diagnose_node_from_alert PASSED
diagnose_operator_from_alert PASSED
check_changes_during_alert PASSED
prometheus_setup PASSED
first_investigation_step PASSED
step3_mandatory_logs PASSED
interpret_firing_alert PASSED
interpret_pod_oomkilled PASSED

11 passed | Provider: claude (claude-opus-4-6) | Duration: 8m 45s

falox added 2 commits July 22, 2026 10:15
- 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
@openshift-ci

openshift-ci Bot commented Jul 22, 2026

Copy link
Copy Markdown

@falox: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/eval a33d54b link true /test eval

Full PR test history. Your PR dashboard.

Details

Instructions 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants