Skip to content

Latest commit

 

History

History
165 lines (116 loc) · 5.28 KB

File metadata and controls

165 lines (116 loc) · 5.28 KB

AI Assistant Guide

This project includes Cursor AI rules that provide consistent coding assistance across the team. When you open this project in Cursor, these rules are automatically loaded.

CLAUDE.md is the source of truth for conventions; .cursor/rules/ supplements it.


Quick Start

  1. Open the project in Cursor
  2. Set up your environment:
npm install
npm start          # Terminal 1: Start dev server
npm run console    # Terminal 2: Start local OpenShift console
  1. Start coding -- the AI already knows your project's standards
  2. Try: "Show my Jira tickets", "Start working on MTV-1885", "Review this code", "Test this in the browser"

How Rules Work

Rules are in .cursor/rules/ and apply automatically:

  • Always Active: Project context only (project-context.mdc)
  • File-Specific: TypeScript rules when editing .ts/.tsx, SCSS rules for .scss, etc.
  • On-Demand: Workflows and agents you invoke explicitly
Knowledge Area What It Knows
Project Conventions TypeScript, React, SCSS standards (from CLAUDE.md)
Domain Context Forklift CRDs, provider types, migration flow
Team Perspectives Developer, UX, QE, Security, Forklift Expert
Workflows How to create components, debug, prepare PRs

Your First Feature

  1. Find your ticket: "Show my assigned Jira tickets" or "Start working on MTV-1885"
  2. Understand the codebase: "Where should I add this feature?", "Show me similar components"
  3. Implement: "Create a component for [feature]"
  4. Test: "Add tests for my changes", "Test this in the browser"
  5. Review: "Review my code" (multi-perspective feedback)
  6. Submit: "Prepare this for PR"

Agents

Team Review (Invoked)

Invoke with "Review my code" or "review:dev" (or review:ux, review:qe, review:security, review:forklift). Considers all perspectives when reviewing code.

Deep-Dive Agents

Say This You Get
"as developer" Code quality, architecture, performance
"as ux" Accessibility, UX patterns, PatternFly
"as qe" Edge cases, test coverage, error scenarios
"as security" Vulnerabilities, input validation, auth
"as forklift expert" CRD patterns, migration lifecycle, provider handling

Workflows

Workflow Invoke With Purpose
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, create tickets
ticket-workflow "MTV-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

Jira Integration

Setup: Jira MCP requires .cursor/mcp.json (gitignored). Configure it with your Jira credentials before using Jira commands.

"Show my assigned tickets"
"Start working on MTV-1885"
"Add comment to MTV-1885: [message]"
"Move MTV-1885 to Code Review"
"I found a bug"

Interactive Testing (Playwright)

Ensure your dev server is running, then:

"Navigate to the provider list page"
"Click on the first provider"
"Take a screenshot"
"Test the creation form"

Tips

  • Be specific: "Fix the null pointer error in ProviderList when no providers exist" beats "Fix this"
  • Use agents for deep analysis: "As security, review this form handling"
  • Give context: "I'm working on MTV-1885 which adds bulk VM selection"
  • Ask for explanations: "Why does this pattern exist?", "What's the difference between cold and warm migration?"

Cheat Sheet

Want To... Say...
Get my tickets "Show my assigned tickets"
Start a task "Start working on MTV-XXXX"
Create component "Create a component for X"
Add tests "Add tests for this"
Review code "Review my changes"
Prepare PR "Prepare this for PR"
Debug issue "Help me debug this"
Test in browser "Test this page"

NPM Scripts

Command Purpose
npm start Start dev server
npm run console Start local OpenShift console
npm run lint Lint check
npm run lint:fix Auto-fix lint issues
npm test Run unit tests
npm run test:e2e Run Playwright E2E tests
npm run i18n Update translations

Personal Customization

Create .cursor/rules/personal-<name>.mdc -- it's gitignored. Add your preferences (e.g., shortcuts, conventions).


Troubleshooting

  • Rules not loading? Ensure you're in Cursor (not VS Code); check .cursor/rules/ exists; restart Cursor.
  • Jira not working? Ensure Jira MCP is configured in .cursor/mcp.json with valid credentials.
  • Playwright not working? Ensure dev server is running (npm start).
  • AI not following standards? Be explicit: "Following our coding standards, create..."

Contributing to Rules

Edit files in .cursor/rules/, keep them focused, avoid duplicating CLAUDE.md, and submit a PR.