Skip to content

Conversation

@metalice
Copy link
Member

@metalice metalice commented Feb 4, 2026

Description

Adds a comprehensive set of Cursor AI rules to provide consistent, project-aware coding assistance across the team. Also consolidates CODING_STANDARDS.md into the cursor rules as the single source of truth.

New to the project? See GETTING_STARTED_AI.md for a comprehensive guide.


What's Included

Core Rules (Always Active)

Rule Description
project-context KubeVirt architecture, key concepts, project structure
coding-standards Code style, TypeScript patterns, React conventions, PR template (replaces CODING_STANDARDS.md)
team-review Multi-perspective review agent (Developer, UX, QE, Security, KubeVirt Expert)

File-Specific Rules (Activate When Relevant Files Open)

Rule Triggers On Description
react-components *.tsx Component patterns, PatternFly usage
typescript *.ts Type safety, KubeVirt API types
testing *.test.ts, cypress/** Jest & Cypress patterns
styles *.scss BEM, PatternFly variables
i18n locales/** Translation patterns

Agent Personas (Deep-Dive Reviews)

Agent Invoke With Focus
developer "as developer" Code quality, architecture, performance, bundle size
ux-reviewer "as ux" Accessibility, UX patterns, PatternFly (with resource links)
qe-agent "as qe" Testing, edge cases, race conditions
security-reviewer "as security" Vulnerabilities, XSS, auth
kubevirt-expert "as kubevirt expert" 20+ K8s/KubeVirt resource types, VM lifecycle, API usage

Workflows (On-Demand)

Workflow Invoke With Purpose
common-commands "how do I build" Build, test, lint, deploy commands
new-component "create component" Component creation with proper structure
pr-preparation "prepare PR" Pre-PR checklist and description
debugging "help debug" Systematic debugging approach
jira-workflow "my tickets", "search jira" Jira search, update, comment
ticket-workflow "CNV-XXX", Jira URL Full agent tracking for ticket work
playwright-testing "test in browser" Interactive UI testing
feature-development "full workflow" End-to-end: Jira to Code to PR

Key Design Decisions

Context Efficiency

  • Only 3 rules are alwaysApply: true (project-context, coding-standards, team-review) -- everything else is on-demand
  • common-commands moved from always-apply to on-demand to save tokens
  • team-review split into lean core (123 lines) + separate ticket-workflow for detailed agent tracking
  • ~80% reduction in always-injected context vs initial version

Single Source of Truth

  • Deleted CODING_STANDARDS.md from project root -- all coding standards now live in coding-standards.mdc
  • PR template is defined once in coding-standards.mdc Section 8, referenced by pr-preparation.mdc
  • No duplicate content across rule files

Accuracy Over Assumptions

  • kubevirt-expert.mdc expanded with all 20+ resource types actually used in the codebase (DataSource, DataImportCron, MigrationPolicy, NNCP, HCO, StorageProfile, etc.)
  • developer.mdc documents actual project conventions (string enums, undefined over null, type over interface)
  • Bundle size section explains Module Federation shared modules with exact list from SDK source
  • lodash deep import guidance based on actual CJS tree-shaking behavior
  • ux-reviewer.mdc includes real links to PatternFly 6, UXD Design Hub, WCAG, and virtualization design team contacts

File Structure

.cursor/rules/
├── project-context.mdc          # Always active
├── coding-standards.mdc         # Always active
├── common-commands.mdc          # On-demand
├── team-review.mdc              # Always active
├── react-components.mdc
├── typescript.mdc
├── testing.mdc
├── styles.mdc
├── i18n.mdc
├── agents/
│   ├── developer.mdc
│   ├── ux-reviewer.mdc
│   ├── qe-agent.mdc
│   ├── security-reviewer.mdc
│   └── kubevirt-expert.mdc
└── workflows/
    ├── new-component.mdc
    ├── pr-preparation.mdc
    ├── debugging.mdc
    ├── jira-workflow.mdc
    ├── ticket-workflow.mdc
    ├── playwright-testing.mdc
    └── feature-development.mdc

Links

Test Plan

  • Verified rules load correctly in Cursor
  • Tested agent invocations ("as developer", "as ux", "as kubevirt expert", etc.)
  • Tested workflow triggers ("create component", "prepare PR")
  • Verified personal rules are gitignored
  • Tested ticket workflow with real Jira ticket (CNV-78624)
  • Verified npm run check-types passes
  • Verified npm run lint passes (no new warnings)

This adds a comprehensive set of Cursor AI rules to provide:

- Core rules: Project context, coding standards, common commands
- File-specific rules: React, TypeScript, SCSS, testing, i18n patterns
- Agent personas: Developer, UX, QE, Security, KubeVirt expert
- Workflows: Component creation, PR prep, debugging, Jira, Playwright
- Documentation: AI_README.md and GETTING_STARTED_AI.md guides
- MCP integrations: Jira ticket management, interactive browser testing

Rules are automatically loaded when opening the project in Cursor IDE,
providing consistent coding assistance across the team.

Personal rules (personal-*.mdc) are gitignored for individual customization.

Co-authored-by: Cursor <[email protected]>
@openshift-ci openshift-ci bot requested review from lkladnit and upalatucci February 4, 2026 13:03
@openshift-ci openshift-ci bot added the approved This issue is something we want to fix label Feb 4, 2026
@coderabbitai
Copy link

coderabbitai bot commented Feb 4, 2026

📝 Walkthrough

Walkthrough

Adds many new Cursor AI rule and project documentation files (agent specs, coding standards, workflows, testing/i18n/style/type guidance, onboarding docs) plus a small .gitignore update and removal of the legacy CODING_STANDARDS.md.

Changes

Cohort / File(s) Summary
Agent Specifications
.cursor/rules/agents/developer.mdc, .cursor/rules/agents/kubevirt-expert.mdc, .cursor/rules/agents/qe-agent.mdc, .cursor/rules/agents/security-reviewer.mdc, .cursor/rules/agents/ux-reviewer.mdc
Adds five new agent persona/config files describing invocation phrases, roles, focus areas, checklists, and structured output formats for developer, KubeVirt, QE, security, and UX reviews.
Project Rules & Guidelines
.cursor/rules/coding-standards.mdc, .cursor/rules/common-commands.mdc, .cursor/rules/i18n.mdc, .cursor/rules/project-context.mdc, .cursor/rules/react-components.mdc, .cursor/rules/styles.mdc, .cursor/rules/typescript.mdc, .cursor/rules/testing.mdc, .cursor/rules/team-review.mdc
Adds comprehensive project guidance covering coding standards, common commands, i18n, project context, React patterns, styling, TypeScript, testing, and team review processes.
Workflows
.cursor/rules/workflows/debugging.mdc, .cursor/rules/workflows/feature-development.mdc, .cursor/rules/workflows/jira-workflow.mdc, .cursor/rules/workflows/new-component.mdc, .cursor/rules/workflows/playwright-testing.mdc, .cursor/rules/workflows/pr-preparation.mdc, .cursor/rules/workflows/ticket-workflow.mdc
Adds multiple workflow documents for debugging, feature development, Jira handling, new-component creation, Playwright testing, PR preparation, and ticket workflows.
Onboarding & Docs
AI_README.md, GETTING_STARTED_AI.md
Adds AI onboarding and getting-started documentation for project AI assistance and agent usage.
Repository Metadata
.gitignore
Updates .gitignore to exclude personal Cursor rule files (personal-*.mdc).
Removed Files
CODING_STANDARDS.md
Removes legacy CODING_STANDARDS.md (content replaced/moved into new .cursor/rules/coding-standards.mdc).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~30 minutes

Suggested labels

lgtm

Suggested reviewers

  • upalatucci
  • rszwajko
  • adamviktora
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and concisely summarizes the main change: adding Cursor AI rules for development assistance.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The PR description is comprehensive, well-structured, and clearly explains the changes, design decisions, and organization of the Cursor AI rules being added to the project.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In @.cursor/rules/typescript.mdc:
- Around line 367-368: The summary line in the "Don't" section currently reads
"Use `any` type anywhere" which contradicts the intent; update that phrase to
"Don't use `any` type anywhere" (or "Never use `any` type") so the rule aligns
with the rest of the document and clearly forbids the `any` type in the
TypeScript best-practices block.
🧹 Nitpick comments (10)
GETTING_STARTED_AI.md (1)

88-415: Add language tags to fenced code blocks to satisfy MD040.

markdownlint reports multiple fenced blocks without a language. Please annotate them (e.g., text for prompt examples, bash for shell commands).

AI_README.md (1)

69-214: Add language tags to fenced code blocks to satisfy MD040.

markdownlint reports fenced blocks without a language. Please annotate them (e.g., text for prompt examples, bash for shell commands).

.cursor/rules/typescript.mdc (1)

3-3: Consider expanding the glob pattern to include .tsx files.

The current glob pattern "**/*.ts" only matches TypeScript files without JSX. However, based on learnings, many TypeScript conventions (avoiding any, explicit return types, preferring type over interface, etc.) also apply to .tsx files. Consider using "**/*.{ts,tsx}" to ensure these guidelines are active when working with React components.

📝 Suggested adjustment to glob pattern
-globs: "**/*.ts"
+globs: "**/*.{ts,tsx}"
.cursor/rules/agents/security-reviewer.mdc (1)

215-220: Consider adding npm audit reference for dependency security.

The dependency security section (lines 215-220) mentions known vulnerabilities, outdated packages, and supply chain concerns. Consider adding a reference to npm audit as a practical tool for identifying these issues, especially since the project includes this as part of the quality check workflow.

🔧 Suggested addition
 **Dependency Security**
 - Known vulnerabilities in dependencies
 - Outdated packages
 - Typosquatting risk
 - Supply chain attacks
 - Lock file integrity
+- Run `npm audit` regularly
+- Check GitHub security advisories
.cursor/rules/agents/qe-agent.mdc (1)

188-213: Consider adding mobile/responsive testing to environment variations.

The Environment & Configuration section comprehensively covers browsers, network, cluster, and user variations. However, given that the project uses PatternFly (which supports responsive design) and line 182 mentions "Responsive design tested" in E2E coverage, consider explicitly adding mobile/responsive testing guidance here.

📱 Suggested addition
 **Browser Variations**
 - Different browsers (Chrome, Firefox, Safari, Edge)
 - Different browser versions
 - Private/incognito mode
 - Browser extensions interfering
 - Different screen sizes
+- Mobile viewport sizes
+- Touch vs mouse interactions
+- Responsive breakpoint transitions
.cursor/rules/workflows/new-component.mdc (1)

23-31: Consider adding Error Boundary guidance to component types.

The component types section comprehensively covers Page, Container, Presentational, Modal, and Form components. Based on learnings, class components are used for specific lifecycle methods like componentDidCatch. Consider adding an Error Boundary component type to this list, as it's a distinct pattern used for catching and handling errors in the component tree.

🛡️ Suggested addition
 ### Form Components
 - Use react-hook-form
 - Validation and error display
 - Loading/submitting states
 - Accessible labels and errors
+
+### Error Boundary Components
+- Catch errors in child component tree
+- Use class component with componentDidCatch
+- Provide fallback UI for errors
+- Log errors for debugging
.cursor/rules/agents/ux-reviewer.mdc (1)

299-315: Add a prompt for visual evidence on UX changes.

Consider extending the Output Format or checklist to request screenshots/video when UI changes are reviewed. Based on learnings: Add a main PR comment explaining referenced links, Jira, doc, use cases, and current/required state. When there are visual changes, add videos and/or screenshots.

.cursor/rules/agents/developer.mdc (1)

254-261: Explicitly require peer review before merge.

Consider adding a line in the Review Approach or a checklist item stating merges should not occur without a peer review. Based on learnings: Encourage peer code reviews to ensure consistency, catch errors, and improve code quality. No merges without a review.

.cursor/rules/team-review.mdc (1)

221-237: Add an explicit “no merge without review” item.

Recommend adding a checklist item under “After Review” (or “Before”) requiring peer review approval prior to merge. Based on learnings: Encourage peer code reviews to ensure consistency, catch errors, and improve code quality. No merges without a review.

.cursor/rules/workflows/pr-preparation.mdc (1)

210-262: Add an explicit “main PR comment” instruction with required link/context details.

The workflow covers links and demo artifacts but doesn’t explicitly instruct a main PR comment explaining referenced links/Jira/docs, use cases, and current/required state. Consider adding a short checklist item or template note.
Based on learnings: “Add a main PR comment explaining referenced links, Jira, doc, use cases, and current/required state. When there are visual changes, add videos and/or screenshots.”

@upalatucci
Copy link
Member

I read that all and for me its great

// ❌ Split strings lose context
{t('Click')} {t('here')} {t('to continue')}

// ❌ Hardcoded strings
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can add a bad pattern for pluralization (and issue I have encountered last week with Cursor and also discussed with @adamviktora):
"{{count}} virtual machine are available_plural": "{{count}} virtual machine are available" will be translated into {{count}} virtual machine are availables
In this case we need to explicitly distinguish the plural / singular use cases via the code.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@galkremer1 @adamviktora we have our custom scripts that do the magic and sometimes they get it wrong. Check

* {{count}} item_other --> 0

CC: @upalatucci

Copy link
Member

@upalatucci upalatucci Feb 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes i suggest removing the script that does the pluralization in English and do it by ourselves or let cursor translate it. Only for the English as we can verify it. For other languages, we have human translators

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not letting cursor write one working script? :)
But this can be done in a follow up , pr, Could one of oyu guys open a ticket for it?

Copy link
Member

@avivtur avivtur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added some suggestions to improve

- Template parameters and defaults
- Template validation rules
- Instance types and preferences

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

networks?

- User interactions work
- Accessibility requirements met

**Integration Test Coverage**
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we plan to add integration tests as well?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fair point, removed

@@ -0,0 +1,245 @@
---
description: Coding standards and best practices for this project
alwaysApply: true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that means all files would be impacted? also config files? can we glob it?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

depend on which files it edits/adds. Can also be configs, but if nothing should be changed there, it won't change.


# UX Reviewer Agent

Invoke with: *"as ux"*, *"review ux"*, *"accessibility review"*, *"a11y check"*, *"usability review"*
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we should use a consistent way to invoke each agent, something like review:ux or @ux this would make easier to remember if they all triggered the same.
I was also suggested by cursor as could be a conflict with built-in cursor prompts

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm we can add, i will let you add it in a follow up pr :) will give you some ability to play with it and extend it :)


# Team Review Agent

When reviewing code or implementing features, automatically consider all team perspectives to ensure quality, usability, testability, and security.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be better if we can choose which agents to run, there are some PRs that won't need all agents that would be just an overkill something like team-review:all or team-review:dev,qe or just review:dev

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can just promt it, " this is the tickect XXX , dont use team review but only qe review"

- Handles cloning, importing, uploading
- Check DataVolume.status.phase for completion
- DataVolume creates and manages underlying PVC
- Boot order and disk attachment configuration
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DataSources?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure

Copy link
Member

@rszwajko rszwajko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very useful and interesting work! There are however some points that we need to address before wider adoption.

My concerns:

  1. we need explicit security guidelines regarding jira/gh MCP or cluster usage with oc.
  2. the instructions duplicate existing information from other sources (package.json, CODING_STANDARDS.md, etc) which will be impossible to maintain/sync in the long run
  3. some messages were not clear to me - I consider the instructions also valuable for onboarding/general knowledge sharing so they should be easy to follow.
  4. IMHO we should not expose test workflows to the agents when we have insufficient infrastructure
  5. it seems we are tight coupling with the Cursor ecosystem - how can we ensure that agent skills follow the open standards ( https://github.com/agentskills/agentskills)?
  6. some of the workflows are inherently downstream-only (i.e. jira) - maybe we should consider treating the entire configuration as optional and keep it in a separate repository? this way both personal and team-scope skills would be treated in the same way (ignored by git).

Note that:

  1. I was able to check only first part of the instructions (30%?)
  2. see also my comments in #3382


### 3. React Patterns

**Hooks Best Practices**
Copy link
Member

@rszwajko rszwajko Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the entire section lists/presents actually bad practices - where do we say that agent should actually NOT do those things?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point

Comment on lines 170 to 171
- Wrong nullability (undefined vs null vs optional)
- Enum vs union type choices
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unclear what's the recommended approach

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point

Comment on lines 163 to 165
- Overly complex generic types
- Missing discriminated unions for state
- Interface vs type inconsistency
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unclear instructions - IMHO we should be explicit in our expectation

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point


---

### 4. TypeScript Quality
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we redirect to our eslint/prettier setup?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TS quality is the right place for it? ESLint is mentioned in different places, such as coding standards

- State updates causing cascade re-renders
- Missing Suspense boundaries

**Bundle Size**
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should also redirect here to console-extensions.md to explain plugin-specific bundle config (i.e. shared modules)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not extensions but the plugin-sdk, shared modules, added

Comment on lines 208 to 215
**Component Usage**
- Using appropriate PatternFly components
- Not recreating existing components
- Consistent with OpenShift Console patterns
- Following PatternFly design guidelines

**Layout Patterns**
- Page structure consistent with console
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are re-directing to the Console patterns and PF guidelines without providing proper resources preferably local files in *.md format.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ive edit it with right links, its a lot of info i dont want ot include it locally as this proably only on new feauter is used, so agent can catch info then


**Check Permissions**
- User has get/list/watch permissions
- Run: `oc auth can-i list virtualmachines`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. how we plan to separate bot-trafic on test clusters from human testing? i.e. I'm concerned about agents deleting a VM that I use for some dev work/testing. By convention we use named namespaces for that (i.e. radek)
  2. how to ensure that agent won't go wild on a prod env - we do sometimes log to such clusters.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. ugo added something for NS
  2. we never have access to prod env. sometimes we might have access to customer testing clusters

Comment on lines +372 to +374
- **Jira MCP**: Ticket management, status updates
- **Playwright MCP**: Interactive testing
- **GitHub MCP**: PR creation (if enabled)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should be explicit about risk involved with using those services:

  1. jira (as for now) doesn't support granular tokens so agent is operating with full permission - for admin roles this involves significant risk if the agent goes wild
  2. playwright which is e2e testing requires a backend - either we need separate clusters or we should remove those instructions as automated high traffic will block the environments
  3. GH supports granular tokens and it's recommended to limit the scope to the minimum (and secure the full permission token for authorized use only)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add this in a separate md file? With all the risks we can find?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. i refer to this issue in the general answer about pr
  2. i dont see the issue here.
  3. same as 1.

- typescript.mdc: fix 'Don\'t' typo (Never use any), add tsx to glob, clarify Don't section
- coding-standards.mdc: scope with globs (src, cypress, tests) instead of alwaysApply
- kubevirt-expert.mdc: add DataSources, Networks; k8sPatch test op; console-extensions ref
- qe-agent.mdc: add integration tests note
- team-review.mdc: document review:dev/ux/qe and team-review:all dev,qe; no merge without review
- ux-reviewer.mdc: review:ux/@ux invocation; PatternFly + Coding Standards refs
- developer.mdc: defer to Coding Standards, eslint ref, anti-patterns note, console-extensions, no merge without review
- debugging.mdc: clarify investigation steps, Chrome DevTools MCP, safety/env (namespaces, prod)
- feature-development.mdc: add MCP/agent risks (Jira, Playwright, GitHub)

Co-authored-by: Cursor <[email protected]>
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In @.cursor/rules/agents/developer.mdc:
- Line 198: The manifest references a non-existent documentation file
"console-extensions.md"; either add a new docs file named
"console-extensions.md" containing the plugin shared modules and bundle
configuration guidance referenced by the rule, or change the reference in
.cursor/rules/agents/developer.mdc to point to an existing documentation file
that covers plugin shared modules and bundle configuration (update the link
text/string "console-extensions.md" accordingly and ensure the referenced
document includes the required content).
🧹 Nitpick comments (3)
.cursor/rules/agents/developer.mdc (1)

106-106: Consider making anti-pattern warnings more prominent.

The note at line 106 clarifies that sections 3–6 list anti-patterns to avoid, but this guidance appears only once between sections 2 and 3. Readers skimming directly to sections 4, 5, or 6 might miss this context and misinterpret the lists as recommended practices.

💡 Consider one of these options to improve clarity

Option 1: Add the anti-pattern clarification to each section header:

-### 3. React Patterns
+### 3. React Patterns (Anti-patterns to Avoid)

Option 2: Repeat a brief reminder at the start of each subsequent section:

 ### 4. TypeScript Quality
 
+**Note:** The items below are anti-patterns. Flag these and advise against them.
+
 **Type Safety**
.cursor/rules/agents/qe-agent.mdc (1)

170-176: Consider referencing specific E2E testing tools.

The E2E Test Coverage section mentions cross-browser testing and responsive design but doesn't specify which tools to use. Based on learnings, the project uses Cypress or Playwright for E2E testing. Adding an explicit reference would help align this document with established practices.

🔧 Suggested enhancement
 **E2E Test Coverage**
+- Use Playwright or Cypress for end-to-end testing
 - Critical user journeys covered
 - Happy path scenarios
 - Common error scenarios

Based on learnings: Use Cypress or Playwright for end-to-end (E2E) testing with comprehensive UI coverage.

.cursor/rules/workflows/feature-development.mdc (1)

376-379: Security guidance for MCP integrations is valuable but could be more prominent.

Lines 376-379 provide important security guidance about token permissions and usage limitations for Jira, Playwright, and GitHub MCPs. This is particularly critical for the Jira MCP recommendation to exclude jira_delete_issue and jira_update_issue from the allowlist.

However, this guidance appears late in the document (section 10 out of 10) and might be missed by users who skim or jump directly to specific phases.

💡 Consider making security guidance more discoverable

Option 1: Add a brief security callout earlier in the workflow overview (section 1):

 ## 1. Workflow Overview
 
+> **⚠️ Security Note**: This workflow uses MCP integrations (Jira, Playwright, GitHub).
+> See section 10 for important token permission and usage guidance.
+

┌─────────────────────────────────────────────────────────────┐


**Option 2**: Add inline security reminders in relevant phases:

```diff
 ### Get the Ticket

"Start working on CNV-12345"


+> **Security**: Jira MCP uses your account permissions. Avoid granting admin roles.
+
I will:

@rszwajko rszwajko dismissed their stale review February 10, 2026 10:25

the agent skills definitions have been updated

@metalice
Copy link
Member Author

Very useful and interesting work! There are however some points that we need to address before wider adoption.

My concerns:

  1. we need explicit security guidelines regarding jira/gh MCP or cluster usage with oc.
  2. the instructions duplicate existing information from other sources (package.json, CODING_STANDARDS.md, etc) which will be impossible to maintain/sync in the long run
  3. some messages were not clear to me - I consider the instructions also valuable for onboarding/general knowledge sharing so they should be easy to follow.
  4. IMHO we should not expose test workflows to the agents when we have insufficient infrastructure
  5. it seems we are tight coupling with the Cursor ecosystem - how can we ensure that agent skills follow the open standards ( https://github.com/agentskills/agentskills)?
  6. some of the workflows are inherently downstream-only (i.e. jira) - maybe we should consider treating the entire configuration as optional and keep it in a separate repository? this way both personal and team-scope skills would be treated in the same way (ignored by git).

Note that:

  1. I was able to check only first part of the instructions (30%?)
  2. see also my comments in docs: add Claude.md AI assistant guide #3382
  1. Ugo, send an update to this pr with additional Jira and GitHub MCP instructions. Another way around it is to add personal-XXX.mdc files that extend the initial settings; you can add anything you want and harden them. BTW, Jira Cloud should be used from mid-March, probably grained token will be available. You can always not set you jira mcp.
  2. Yes, saw it also, I'm changing it to a single source to reduce context.
  3. such as?
  4. i not sure I understand
  5. I feel comfortable coupling it, as this repo, the direct consumer is ocp, and probably almost solely is RH.
  6. I don't want to separate to a different repo, same as before, consumer can always disable workflows/agent from local env using personal-*.mdc files

@rszwajko
Copy link
Member

@metalice

  • some messages were not clear to me - I consider the instructions also valuable for onboarding/general knowledge sharing so they should be easy to follow.
  • IMHO we should not expose test workflows to the agents when we have insufficient infrastructure
  • such as?

  • i not sure I understand

Check per lines comments in my review above. In general:

  1. the knowledge part goes (in some cases) too far with summarizing/simplifying - there are only nouns/terms left without the relationships/recommendations.
  2. bot traffic on our test clusters will likely block them

metalice and others added 2 commits February 11, 2026 14:35
- Auto-trigger on Jira ticket URLs (start immediately, no confirmation)
- Add todo tracking for agents and subtasks
- Run Developer Agent first for implementation
- Run review agents (UX, QE, Security, KubeVirt) sequentially
- Prompt to implement recommendations after each agent
- Add complete workflow documentation in Section 11

Co-authored-by: Cursor <[email protected]>
…erage

- Merge CODING_STANDARDS.md into coding-standards.mdc (single source of truth)
- Split team-review.mdc into lean always-apply core + on-demand ticket-workflow.mdc
- Set common-commands.mdc to on-demand (alwaysApply: false)
- Expand kubevirt-expert.mdc with 16+ missing resource types (DataSource, DataImportCron, MigrationPolicy, NNCP, HCO, etc.)
- Fix developer.mdc: clarify anti-patterns, nullability, enums, bundle size, shared modules
- Add design resource links to ux-reviewer.mdc (PatternFly, UXD Hub, WCAG)
- Trim debugging.mdc, jira-workflow.mdc, reduce overlap with feature-development.mdc
- Fix broken references (testing.mdc, AI_README.md, PR template)
- Add port labels in playwright-testing.mdc

~80% reduction in always-injected context tokens.

Co-authored-by: Cursor <[email protected]>
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.cursor/rules/coding-standards.mdc (1)

255-267: ⚠️ Potential issue | 🟡 Minor

Section 10 appears incomplete.

The "AI-Specific Guidance" section ends abruptly at line 267 ("Ensure no console.log or debug code is left in") without proper closure. Verify this section is complete or add any missing guidance.

🤖 Fix all issues with AI agents
In @.cursor/rules/workflows/jira-workflow.mdc:
- Around line 110-122: Add a "Security & Safe Operations" section to the MCP
tool reference that warns about destructive Jira operations and limits
recommended automation to create/fetch actions: explicitly mark jira_search and
jira_get_issue as read-only, jira_add_comment as safe, flag jira_add_worklog as
"use with care", and mark jira_transition_issue and jira_update_issue as "use
with caution" (review required), and state that jira_delete_issue must not be
allowlisted; align wording with feature-development.mdc and the PR objective
(metalice) to restrict Jira MCP to create/fetch operations and explain that Jira
tokens are broad and agents run with full account permissions.

In @.cursor/rules/workflows/playwright-testing.mdc:
- Around line 33-38: Insert an "Environment Considerations" warning block
immediately under the "## 2. Getting Started" / "### Prerequisites" section: add
a "### ⚠️ Environment Considerations" heading and the four bullet points
recommending dedicated test environments, limiting automation frequency,
checking cluster capacity, and coordinating with the team so readers know not to
run heavy browser automation on shared/staging/production clusters; ensure the
language mirrors the PR guidance about bot traffic blocking resources and
avoiding exposing test workflows to agents when infrastructure is limited.
🧹 Nitpick comments (5)
.cursor/rules/coding-standards.mdc (1)

40-42: Consider clarifying or relaxing the 150-line file size limit.

The strict 150-line maximum may be impractical for legitimate complex components (e.g., comprehensive forms, feature-rich tables, multi-step wizards with validation). This could force artificial splitting that reduces cohesion.

Consider:

  • Adding exceptions for specific cases (e.g., "excluding type definitions and constants")
  • Raising to 200-250 lines as a soft guideline rather than a hard limit
  • Clarifying this is a guideline, not a blocker
.cursor/rules/workflows/playwright-testing.mdc (1)

242-262: Add resource cleanup guidance to testing workflows.

The VM creation and action workflows don't mention cleanup. Automated testing that creates resources without cleanup can exhaust cluster capacity, especially on shared test environments.

Add cleanup steps:

### Cleanup After Testing
"Delete the test VM after verification"
"Clean up test resources created during this session"
.cursor/rules/workflows/feature-development.mdc (1)

376-379: Good security guidance, but consider making it more prominent.

The security guidance addresses key concerns from PR feedback (Jira token scope, Playwright infrastructure impact, GitHub permissions). However:

  1. This guidance is buried in section 10 - consider moving it to section 1 (Workflow Overview) or creating a dedicated security section at the top
  2. Add guidance for oc cluster access mentioned in PR feedback:
    - **oc/kubectl**: Use dedicated test clusters with limited RBAC; never use production credentials for automation
.cursor/rules/workflows/ticket-workflow.mdc (1)

14-23: Add reference to MCP security guidance.

This workflow orchestrates automated Jira operations but doesn't reference security considerations. Add a note referencing the security guidance:

**Security Note**: When working with Jira tickets, follow MCP security guidelines in `feature-development.mdc` section 10. Use limited-permission tokens and restrict to create/fetch operations.
.cursor/rules/workflows/jira-workflow.mdc (1)

126-133: Consider adding security best practice to tips.

Add a tip about safe Jira operations:

- Limit automation to read and comment operations; review before modifying tickets

This reinforces the security guidance and promotes safe usage patterns.

Comment on lines +110 to +122
## 5. MCP Tool Reference

| Tool | Purpose |
|------|---------|
| `jira_search` | Find tickets with JQL |
| `jira_get_issue` | Get ticket details |
| `jira_add_comment` | Add comments |
| `jira_transition_issue` | Change status |
| `jira_add_worklog` | Log time |
| `jira_update_issue` | Update fields |
| `jira_get_sprint_issues` | Get sprint issues |

Tools are called automatically when you make requests. Just describe what you want in natural language.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Add security guidance for Jira MCP operations.

The tool reference lists all operations including jira_update_issue and jira_transition_issue without security warnings. Per feature-development.mdc, Jira MCP should be limited to create/fetch operations to prevent mistakes or misuse.

Add a security section:

## Security & Safe Operations

⚠️ **Recommended Safe Operations**:
-`jira_search` - Find tickets (read-only)
-`jira_get_issue` - Get details (read-only)
-`jira_add_comment` - Add comments (safe)
- ⚠️ `jira_add_worklog` - Log time (use with care)

⚠️ **Use With Caution**:
- ⚠️ `jira_transition_issue` - Changes status (review required)
- ⚠️ `jira_update_issue` - Modifies fields (review required)

❌ **Not Recommended for Automation**:
- Do not add `jira_delete_issue` to allowlist
- Limit automation to minimize impact of errors

**Rationale**: Jira tokens are not granular; agents run with full account permissions. Limiting to create/fetch operations reduces risk.

Based on PR objectives: metalice requested "explicit security guidelines for Jira/GitHub MCP" and feature-development.mdc includes guidance to "Use the Jira MCP only to create and fetch tickets; do not use it to delete or modify existing tickets."

🤖 Prompt for AI Agents
In @.cursor/rules/workflows/jira-workflow.mdc around lines 110 - 122, Add a
"Security & Safe Operations" section to the MCP tool reference that warns about
destructive Jira operations and limits recommended automation to create/fetch
actions: explicitly mark jira_search and jira_get_issue as read-only,
jira_add_comment as safe, flag jira_add_worklog as "use with care", and mark
jira_transition_issue and jira_update_issue as "use with caution" (review
required), and state that jira_delete_issue must not be allowlisted; align
wording with feature-development.mdc and the PR objective (metalice) to restrict
Jira MCP to create/fetch operations and explain that Jira tokens are broad and
agents run with full account permissions.

Comment on lines +33 to +38
## 2. Getting Started

### Prerequisites
- Development server running: `npm run dev` (port 9001)
- Console running: `npm run start-console` (port 9000)
- Or a deployed environment URL
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Add infrastructure impact and environment selection warnings.

The prerequisites don't warn about infrastructure impact from automated browser testing. Per PR feedback, bot traffic on shared test clusters can block resources.

Add warnings:

### ⚠️ Environment Considerations
- **Use dedicated test environments** - avoid shared staging/production
- **Limit automation frequency** - manual verification, not CI loops
- **Check cluster capacity** - ensure sufficient resources before heavy testing
- **Coordinate with team** - communicate when running extensive test sessions

Based on PR objectives: rszwajko warned "Bot traffic on test clusters could block resources; warns about exposing test workflows to agents when infrastructure is limited" and metalice stated "Prefer not exposing test workflows to agents if infrastructure is insufficient."

🤖 Prompt for AI Agents
In @.cursor/rules/workflows/playwright-testing.mdc around lines 33 - 38, Insert
an "Environment Considerations" warning block immediately under the "## 2.
Getting Started" / "### Prerequisites" section: add a "### ⚠️ Environment
Considerations" heading and the four bullet points recommending dedicated test
environments, limiting automation frequency, checking cluster capacity, and
coordinating with the team so readers know not to run heavy browser automation
on shared/staging/production clusters; ensure the language mirrors the PR
guidance about bot traffic blocking resources and avoiding exposing test
workflows to agents when infrastructure is limited.

- Internal implementation details exposed
- Inconsistent folder structure

**Note:** Sections 3–6 below list **anti-patterns and bad practices**. Flag these and advise the author **not** to do them; do not suggest or generate code that follows these patterns.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we sure the AI understands this? Or maybe take just part of this document and think some of those chapters are describing best practices?

@upalatucci
Copy link
Member

/lgtm

@openshift-ci openshift-ci bot added the lgtm Passed code review, ready for merge label Feb 12, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 12, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: metalice, upalatucci

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

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [metalice,upalatucci]

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

@upalatucci
Copy link
Member

/retest

@openshift-merge-bot openshift-merge-bot bot merged commit 7acd7f2 into kubevirt-ui:main Feb 13, 2026
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved This issue is something we want to fix lgtm Passed code review, ready for merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants