docs: add comprehensive cursor rules for AI-assisted development#1462
Conversation
- Remove redundant code-cleanliness and pr-template rules - Improve clarity in you-and-me, engineering-best-practices, and when-creating-prs - Add explicit git command in engineering-best-practices - Split PR and testing rules into dedicated files - Fix incomplete sentence in GitHub CLI setup guidance
- Add test execution command (yarn test) to when-writing-tests - Clarify config file locations (.commitlintrc.js) with examples - Fix path references to use correct absolute paths - Add branch naming examples (feat/, fix/, docs/) - Add yarn install guidance after git pull - Fix typo: 'the are' -> 'that are' - Create about-me.mdc in correct location (gitignored)
|
Take a guess how this PR was made 😂 Let's get really meta and ask Co-pilot to review it... |
|
🔄 Probe API Server Mappings Verification Failed The Verification Output: To fix this, please run the probe mappings build script locally and verify the changes: yarn build:probe-api-mappings && yarn verify:probe-api-mappings |
Script size changes
Totals
|
There was a problem hiding this comment.
Pull Request Overview
This PR establishes comprehensive cursor rules to guide AI-assisted development across a team with varying technical backgrounds. The rules ensure consistent code quality, testing practices, file organization, and PR standards when working with AI tools like Cursor.
Key Changes:
- Adds 10
.mdcrule files covering AI behavior, development standards, testing philosophy, and workflow practices - Updates
.gitignoreto exclude personal rules and reference directories while keeping shared rules versioned - Establishes mode-based interactions and conventions for team members ranging from designers to frontend engineers
Reviewed Changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
.gitignore |
Excludes personal AI rules and reference notes from version control |
.cursor/you-and-me.mdc |
Defines AI assistant expertise and user identification process |
.cursor/this-product.mdc |
Provides context about Synthetic Monitoring and k6 products |
.cursor/team-composition.mdc |
Describes team roles and varying technical backgrounds |
.cursor/file-organisation.mdc |
Specifies component structure conventions and separation of concerns |
.cursor/engineering-best-practices.mdc |
Outlines git workflow, branching, and PR strategies |
.cursor/when-writing-tests.mdc |
Details testing philosophy favoring integration tests and TDD proposals |
.cursor/when-creating-prs.mdc |
Defines PR checklist and description format requirements |
.cursor/documentation.mdc |
Guides when to write documentation versus iterate on code |
.cursor/reference-directory.mdc |
Explains usage of gitignored reference directory for working notes |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Fix 'commited' -> 'committed' in reference-directory.mdc - Fix 'colocacting' -> 'colocating' in file-organisation.mdc - Fix 'unfocussed' -> 'unfocused' in when-writing-tests.mdc and documentation.mdc - Fix inconsistent verb forms (ensures -> ensure) in when-creating-prs.mdc
* docs: added repo cursor rules * docs: pr template rule * docs: refine cursor rules based on AI feedback - Remove redundant code-cleanliness and pr-template rules - Improve clarity in you-and-me, engineering-best-practices, and when-creating-prs - Add explicit git command in engineering-best-practices - Split PR and testing rules into dedicated files - Fix incomplete sentence in GitHub CLI setup guidance * docs: add missing details and fix inconsistencies in cursor rules - Add test execution command (yarn test) to when-writing-tests - Clarify config file locations (.commitlintrc.js) with examples - Fix path references to use correct absolute paths - Add branch naming examples (feat/, fix/, docs/) - Add yarn install guidance after git pull - Fix typo: 'the are' -> 'that are' - Create about-me.mdc in correct location (gitignored) * docs: fix spelling and grammar issues in cursor rules - Fix 'commited' -> 'committed' in reference-directory.mdc - Fix 'colocacting' -> 'colocating' in file-organisation.mdc - Fix 'unfocussed' -> 'unfocused' in when-writing-tests.mdc and documentation.mdc - Fix inconsistent verb forms (ensures -> ensure) in when-creating-prs.mdc
Problem
As our team increasingly uses AI tools like Cursor for development, we need consistent guidelines to ensure AI interactions produce high-quality code that meets our standards. Without these rules, AI-generated code may not follow our testing practices, file organization conventions, PR standards, or engineering best practices.
Team members with varying levels of frontend experience (designers, product managers, backend engineers, and frontend engineers) all contribute to this repository and need clear guidance for working with AI assistants.
Solution
This PR adds comprehensive cursor rules that guide AI interactions across all aspects of development:
Core Rules:
you-and-me.mdc- Establishes the AI's role and expertise areas (TypeScript, React, Grafana plugins)this-product.mdc- Provides context about Synthetic Monitoring and k6team-composition.mdc- Describes team roles and their varying technical backgroundsDevelopment Standards:
file-organisation.mdc- Component structure conventions (hooks, utils, tests, constants, types)engineering-best-practices.mdc- Git workflow, branch naming, and PR strategieswhen-writing-tests.mdc- Testing philosophy (integration over unit, TDD proposals)when-creating-prs.mdc- PR checklist and description formatWorkflow Rules:
documentation.mdc- When to write documentation vs iterate on codereference-directory.mdc- Using.cursor/referencesfor working notesAI Behavior:
modes.mdc- Conversation/Plan/Apply mode system for controlled interactionsmessage-prefix.mdc- Requires model name and confidence percentageAll rules reference relevant configuration files (
.commitlintrc.js) and include examples. Personal information is stored in gitignored.cursor/rules/personal/about-me.mdcto maintain privacy while providing AI context.