Skip to content

Commit cd6e6cd

Browse files
fao89claude
andcommitted
CONSOLE-5118: Improve AI assessment prompts and update irreversibility notice
Standardize TL;DR sections across all prompt templates by moving Data Completeness near the top, simplifying its format, and enforcing terminal fields (Recommendation/Next Steps). Update the AI Assessment card icon and split the irreversibility warning into a title and body for better readability. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Fabricio Aguiar <fabricio.aguiar@gmail.com>
1 parent 53de1c9 commit cd6e6cd

8 files changed

Lines changed: 25 additions & 16 deletions

File tree

frontend/packages/console-shared/src/components/cluster-updates/prompts/precheck-no-updates.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,13 +141,13 @@ Conditions have TWO important fields you MUST check:
141141
142142
## TL;DR
143143
- **Overall Status**: [Healthy | Minor issues | Attention needed]
144+
- **Data Completeness**: [High | Moderate | Limited] confidence
144145
- **System Health**: [Count of healthy vs degraded operators]
145146
- **Core Platform**: [Status of essential operators: console, authentication, ingress, etc.]
146147
- **Degraded Components**: [Count and names of any unhealthy operators]
147148
- **User Impact**: [Any operator issues affecting workloads]
148149
- **Action Items**: [Count of items needing administrator attention]
149150
- **Update Readiness**: [Ready | Operator issues need resolution]
150-
- **Data Completeness**: [Full | Partial — list missing sources | Limited — list missing essential sources] → [High | Moderate | Limited] confidence
151151
- **Next Review**: [Recommended reassessment timeframe]
152152
</output_format>`;
153153
};

frontend/packages/console-shared/src/components/cluster-updates/prompts/precheck-specific.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ ${languageConstraint}
7777
- NEVER use placeholder or dummy data - only reference real data from tool calls
7878
- ONLY report issues that are actually present in the data
7979
- ONLY OUTPUT the Summary and TL;DR sections
80+
- CRITICAL: The TL;DR section MUST end with the **Recommendation** field. NEVER omit it.
8081
- Be specific about the source of any issues identified
8182
${securityConstraint}
8283
${confidenceQualifiers}
@@ -320,6 +321,7 @@ If ${targetVersion} is not available, recommend the closest available version an
320321
## TL;DR
321322
- **Current Version**: ${currentVersion}
322323
- **Target Version**: ${targetVersion}
324+
- **Data Completeness**: [High | Moderate | Limited] confidence
323325
- **Target Available**: [Yes in availableUpdates / Yes in conditionalUpdates with risks / No]
324326
- **Upgrade Path**: [${currentVersion}${targetVersion}, list intermediate versions if applicable]
325327
- **Conditional Risks in Upgrade Path**: [Total count of risk conditions across ALL versions from ${currentVersion} to ${targetVersion}, or "None"]
@@ -338,7 +340,6 @@ If ${targetVersion} is not available, recommend the closest available version an
338340
- **Resource Pressure**: [nodes with >90% CPU or memory usage]
339341
- **Recent Events**: [count of error/warning events in last 30 min, user-friendly summary]
340342
- **Active Alerts**: [count of critical/warning alerts, skip if tool unavailable]
341-
- **Data Completeness**: [Full | Partial — list missing sources | Limited — list missing essential sources] → [High | Moderate | Limited] confidence
342343
- **Recommendation**: [Proceed with upgrade to ${targetVersion} | Address risks/warnings first | Blocked - resolve issues | Target not available - use X.X.X instead]
343344
</output_format>`;
344345
};

frontend/packages/console-shared/src/components/cluster-updates/prompts/precheck.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ ${languageConstraint}
3434
- NEVER use placeholder or dummy data - only reference real data from tool calls.
3535
- ONLY report issues that are actually present in the data.
3636
- ONLY OUTPUT the Summary and TL;DR sections.
37+
- CRITICAL: The TL;DR section MUST end with the **Recommendation** field. NEVER omit it.
3738
- Be specific about the source of any issues identified.
3839
- CRITICAL: When counting available updates, count ALL array elements in status.availableUpdates AND status.conditionalUpdates separately.
3940
${securityConstraint}
@@ -464,6 +465,7 @@ A "hard blocker" means at least one of:
464465
- Deprecated API in active use that is removed in target minor
465466
## TL;DR
466467
- **Current Version**: ${currentVersion}
468+
- **Data Completeness**: [High | Moderate | Limited] confidence
467469
- **Available Updates**: [count from status.availableUpdates]
468470
- **Latest Recommended Update**: [version with channels]
469471
- **Conditional Updates**: [count] ([N with Recommended=False risks applying to this cluster])
@@ -489,7 +491,6 @@ A "hard blocker" means at least one of:
489491
- **Recent Events**: [count of upgrade-relevant errors/warnings in last 30 min]
490492
- **Active Alerts**: [count of critical/warning, skip if unavailable]
491493
- **Configuration Issues**: [overrides or capability concerns]
492-
- **Data Completeness**: [Full | Partial — list missing sources | Limited — list missing essential sources] → [High | Moderate | Limited] confidence
493494
- **Recommendation**: [Proceed with upgrade | Address warnings first | Blocked — resolve listed issues]
494495
</output_format>`;
495496
};

frontend/packages/console-shared/src/components/cluster-updates/prompts/progress.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ Conditions have TWO important fields you MUST check:
208208
209209
## TL;DR
210210
- **Progress**: [X% complete - (${operatorCounts.updated} Updated Operators / ${operatorCounts.total} Total Operators) * 100]
211+
- **Data Completeness**: [High | Moderate | Limited] confidence
211212
- **Target Version**: [${desiredVersion} with release info if available]
212213
- **Target Channels**: [Available channels for target release]
213214
- **Upgrade Duration**: [Elapsed time from upgrade start]
@@ -221,7 +222,6 @@ Conditions have TWO important fields you MUST check:
221222
- **Recent Events**: [Count of warning events in last 30 min, user-friendly summary]
222223
- **Alerts**: [Warning/critical alerts during upgrade, if available]
223224
- **ETA**: [Estimated time remaining based on current progress rate]
224-
- **Data Completeness**: [Full | Partial — list missing sources | Limited — list missing essential sources] → [High | Moderate | Limited] confidence
225225
- **Action Required**: [Continue monitoring | Investigate delays | Address operator issues]
226226
</output_format>`;
227227
};

frontend/packages/console-shared/src/components/cluster-updates/prompts/troubleshoot.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ export const createTroubleshootPrompt = (currentVersion: string, desiredVersion:
7979
- Provide conservative, investigation-focused remediation
8080
- Focus on root cause identification using real error messages, not aggressive fixes
8181
- ONLY OUTPUT the Summary and TL;DR sections
82+
- CRITICAL: The TL;DR section MUST end with the **Next Steps** field. NEVER omit it.
8283
${securityConstraint}
8384
${confidenceQualifiers}
8485
${languageConstraint}
@@ -259,6 +260,7 @@ Based on the ClusterVersion data:
259260
260261
## TL;DR
261262
- **Failure Type**: [Specific failure reason from conditions]
263+
- **Data Completeness**: [High | Moderate | Limited] confidence
262264
- **Target Version**: [Failed upgrade target with release info]
263265
- **Root Cause**: [Primary component or process failing - with actual error from logs]
264266
- **Failed Components**: [Count and names of failed ClusterOperators]
@@ -271,9 +273,8 @@ Based on the ClusterVersion data:
271273
- **Node Issues**: [Count of NotReady nodes if any]
272274
- **Infrastructure Problems**: [Any detected infrastructure issues]
273275
- **MCP Issues**: [Count of degraded MachineConfigPools if any]
274-
- **Next Steps**: [Conservative investigation approach based on actual errors found]
275276
- **Escalation**: [When to contact Red Hat support]
276-
- **Data Completeness**: [Full | Partial — list missing sources | Limited — list missing essential sources] → [High | Moderate | Limited] confidence
277277
- **Recovery Time**: [Realistic estimate based on failure type]
278+
- **Next Steps**: [Conservative investigation approach based on actual errors found]
278279
</output_format>`;
279280
};

frontend/public/components/cluster-settings/cluster-settings.tsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ import {
3636
RhUiAddCircleIcon,
3737
RhUiPauseCircleIcon,
3838
RhUiEditIcon,
39+
RhUiAiInfoIcon,
3940
RhUiInProgressIcon,
4041
} from '@patternfly/react-icons';
4142

@@ -1504,7 +1505,7 @@ const UpdateAssessmentCard: FC<{
15041505
<CardBody>
15051506
<Alert
15061507
variant="info"
1507-
customIcon={<RhUiInProgressIcon />}
1508+
customIcon={<RhUiAiInfoIcon />}
15081509
isInline
15091510
title={alertTitle}
15101511
actionLinks={
@@ -1553,12 +1554,14 @@ const UpdateAssessmentCard: FC<{
15531554
variant="warning"
15541555
isInline
15551556
isPlain
1556-
title={t(
1557-
'public~Cluster updates are irreversible. After an update begins, it cannot be rolled back to the previous version. Verify your cluster is ready before you proceed.',
1558-
)}
1557+
title={t('public~Cluster updates are irreversible')}
15591558
className="pf-v6-u-mt-sm"
15601559
data-test="update-assessment-irreversibility-notice"
1561-
/>
1560+
>
1561+
{t(
1562+
'public~After an update begins, it cannot be rolled back to the previous version. Verify your cluster is ready before you proceed.',
1563+
)}
1564+
</Alert>
15621565
</CardBody>
15631566
</CardExpandableContent>
15641567
</Card>

frontend/public/components/modals/cluster-update-modal.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -384,11 +384,13 @@ const ClusterUpdateModal = (props: ClusterUpdateModalProps) => {
384384
variant="warning"
385385
isInline
386386
isPlain
387-
title={t(
388-
'Cluster updates are irreversible. After an update begins, it cannot be rolled back to the previous version. Verify your cluster is ready before you proceed.',
389-
)}
387+
title={t('Cluster updates are irreversible')}
390388
data-test="update-cluster-modal-irreversibility-notice"
391-
/>
389+
>
390+
{t(
391+
'After an update begins, it cannot be rolled back to the previous version. Verify your cluster is ready before you proceed.',
392+
)}
393+
</Alert>
392394
</Form>
393395
</ModalBody>
394396
<ModalFooterWithAlerts errorMessage={errorMessage || error}>

frontend/public/locales/en/public.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@
168168
"Affects pods that do not have resource limits set. These pods have a best effort quality of service.": "Affects pods that do not have resource limits set. These pods have a best effort quality of service.",
169169
"Affects pods that have an active deadline. These pods usually include builds, deployers, and jobs.": "Affects pods that have an active deadline. These pods usually include builds, deployers, and jobs.",
170170
"Affects pods that have at least one resource limit set. These pods do not have a best effort quality of service.": "Affects pods that have at least one resource limit set. These pods do not have a best effort quality of service.",
171+
"After an update begins, it cannot be rolled back to the previous version. Verify your cluster is ready before you proceed.": "After an update begins, it cannot be rolled back to the previous version. Verify your cluster is ready before you proceed.",
171172
"AI Assessment": "AI Assessment",
172173
"Alert routing": "Alert routing",
173174
"Alerting": "Alerting",
@@ -349,7 +350,7 @@
349350
"Cluster update available. <2>Update cluster</2>": "Cluster update available. <2>Update cluster</2>",
350351
"Cluster update conditions need attention": "Cluster update conditions need attention",
351352
"Cluster update is in progress": "Cluster update is in progress",
352-
"Cluster updates are irreversible. After an update begins, it cannot be rolled back to the previous version. Verify your cluster is ready before you proceed.": "Cluster updates are irreversible. After an update begins, it cannot be rolled back to the previous version. Verify your cluster is ready before you proceed.",
353+
"Cluster updates are irreversible": "Cluster updates are irreversible",
353354
"Cluster updating": "Cluster updating",
354355
"Cluster utilization": "Cluster utilization",
355356
"Cluster version configuration": "Cluster version configuration",

0 commit comments

Comments
 (0)