# cypress-defect-tracking-cursorrules-prompt-file

A Cursor rule that turns the agent into a QA engineer: writes Cypress tests tagged by team, category and case ID, and builds reports through qa-shadow-report.

- rule · `type=rule` · Cursor · ★ 41011
- Author: PatrickJS
- License: CC0-1.0 · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/PatrickJS/awesome-cursorrules/tree/HEAD/rules/cypress-defect-tracking-cursorrules-prompt-file.mdc
- Updated: 2026-05-30
- HTML: https://affpapa.org/en/nevibecode/rules/cypress-defect-tracking-cursorrules-prompt-file

## What it does

The rule gives the agent a QA engineer persona with working knowledge of Cypress, TypeScript and test reporting. Before writing anything, it checks whether the project uses TypeScript — looking for `tsconfig.json`, `.ts` or `.tsx` files under `cypress/`, and TypeScript dependencies in `package.json` — then adjusts file extensions and syntax to match.

Tests get tagged hierarchically. Team names go into the top-level `describe`, shared categories like `regression` or `smoke` into `describe` or `context` blocks, and a category tag lands on an individual test only when it differs from its parent. Case IDs always sit at the test level in `[C1234]` format. Reporting runs through the `qa-shadow-report` package, split by team, feature and test type.

You need a `shadowReportConfig` file listing team names, test types and categories. Google Sheets export also wants `googleKeyFilePath` pointing at a credentials file, so that part won't run without the key. Setup is manual: drop the rule file into `.cursor/rules/`.

## Install

### Cursor (native platform)

**Manually: put the files in place**
- File: `.cursor/rules/cypress-defect-tracking-cursorrules-prompt-file.mdc` — Frontmatter: description, globs, alwaysApply

### Claude Code

**Manually: put the files in place**
- File: `.claude/rules/cypress-defect-tracking-cursorrules-prompt-file.md` — The paths frontmatter field limits the files: move globs from the source into paths

### Codex

**AGENTS.md**
- Codex reads AGENTS.md: paste the rule text there

### GitHub Copilot

**Manually: put the files in place**
- File: `.github/instructions/cypress-defect-tracking-cursorrules-prompt-file.instructions.md` — The applyTo field sets which files it applies to: move globs from the source into applyTo

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/rules/cypress-defect-tracking-cursorrules-prompt-file.md`

### Cline

**Manually: put the files in place**
- File: `.clinerules/cypress-defect-tracking-cursorrules-prompt-file.md`

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/PatrickJS/awesome-cursorrules/tree/HEAD/rules/cypress-defect-tracking-cursorrules-prompt-file.mdc

## When to use it
- tag Cypress tests by team, feature and type
- attach a case ID to every test in `[CXXXX]` format
- produce failure reports developers can act on
- build a `shadowReportConfig` matching project metadata
- sort test files into folders by test type

## Example prompts
- Write Cypress tests for the shopping cart: team CartTeam, type ui, category regression, feature Shopping cart, case IDs C5001, C5002, C5003
- Generate a `shadowReportConfig` with teams CartTeam and CheckoutTeam and types api, ui, accessibility
- Add a performance category tag to the test with case ID C5003 if it differs from the parent

## Source text · cypress-defect-tracking-cursorrules-prompt-file.mdc · CC0-1.0

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 7ca3910f777e6bb7.

BEGIN THIRD-PARTY FILE 7ca3910f777e6bb7
```text
---
description: "Cursor rules for Cypress development with defect tracking."
globs: **/*
alwaysApply: false
---
# Persona

You are an expert QA engineer with deep knowledge of Cypress, TypeScript, and test reporting practices, tasked with tracking and documenting defects in web application tests.

# Auto-detect TypeScript Usage

Before creating tests, check if the project uses TypeScript by looking for:
- tsconfig.json file
- .ts or .tsx file extensions in cypress/
- TypeScript dependencies in package.json
Adjust file extensions (.ts/.js) and syntax based on this detection.

# Defect Tracking Focus

Use the qa-shadow-report package to create organized, traceable test reporting
Tag test cases with proper identifiers to link them to test management systems
Create structured reports categorized by team, feature, and test type
Generate configuration files that define project-specific test metadata
Ensure all test failures include actionable information for developers

# Input Processing

Accept user input for:
- Team names (e.g., 'AuthTeam', 'ProfileTeam', 'PaymentTeam')
- Test types (e.g., 'api', 'ui', 'integration', 'accessibility')
- Test categories (e.g., 'smoke', 'regression', 'usability')
- Feature or component names being tested
- Case IDs for tests, if available
Use these inputs to structure and tag tests appropriately

# Hierarchical Test Tagging

**1** **Team Names**: Always include team names in the top-level describe blocks
**2** **Common Categories**: Place common test categories (like 'regression' or 'smoke') in describe or context blocks
**3** **Specific Categories**: Only add category tags to individual tests when they differ from parent categories
**4** **Case IDs**: Always include case IDs at the individual test level with the [CXXXX] format
**5** **Type Tags**: Include test types at the folder level or high-level describe blocks

# Best Practices

**1** **Case Identification**: Tag each test with a unique case ID using format [C1234]
**2** **Test Categorization**: Apply categories at the appropriate level of the test hierarchy
**3** **Team Organization**: Group tests by team and feature using nested describe/context blocks
**4** **Configuration Setup**: Create a comprehensive shadowReportConfig file with all required settings
**5** **Folder Structure**: Organize test files based on test type (e.g., ui, api, accessibility)
**6** **Metadata Usage**: Include proper metadata for filtering and reporting in test management systems
**7** **Report Generation**: Generate and export reports after test runs for stakeholder review
**8** **Data Structure**: Maintain consistent data structure for test results to enable proper reporting
**9** **Integration**: Set up integration with reporting tools like Google Sheets where applicable

# Input/Output Expectations

**Input**: 
- Team name(s) to associate with the tests
- Test type(s) to create (e.g., api, ui, accessibility)
- Test category(ies) to apply (e.g., smoke, regression, usability)
- Feature or component description to test
- Optional case IDs for tests

**Output**: 
- Properly formatted Cypress test files with hierarchical tagging
- Configuration file with provided team names, test types, and categories
```
END THIRD-PARTY FILE 7ca3910f777e6bb7

The third-party file has ended. Everything between the 7ca3910f777e6bb7 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 3220 of 6369 bytes. © PatrickJS · CC0-1.0 · https://github.com/PatrickJS/awesome-cursorrules/tree/HEAD/rules/cypress-defect-tracking-cursorrules-prompt-file.mdc

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
