Skip to content

Commit 99e915f

Browse files
sup
1 parent f8745ca commit 99e915f

File tree

8 files changed

+525
-19
lines changed

8 files changed

+525
-19
lines changed

.cursor/commands/commit.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Commit PR
2+
3+
## Overview
4+
Add all files to the the commit. come up with a succinct, accurate commit message based on the commit. Then push that commit up as a branch.
5+
6+
## Steps
7+
1. **Add all changes to the commit **
8+
- Add all changes to the commit
9+
- Ensure all changes are committed
10+
11+
2. **Add a succinct commit message based on the changes made**
12+
- Summarize changes clearly
13+
- commit that message
14+
- be succinct
15+
16+
<!-- 3. TODO ADD PRETTY aND FORMAT STEP -->
17+
18+
4. **Push up branch**
19+
- push commit to latest branch in origin
20+
21+
## RULES YOU MUST FOLLOW
22+
- never do this if you are in main. If so, alert the user that they are in main.
23+
- ignore all new generated .md files and do not add them to the branch.

.cursor/commands/format.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Format & Lint Changes
2+
3+
## Overview
4+
5+
Run all relevant formatting, linting, and prettifying commands before committing any changes.
6+
This command ensures the codebase is clean and consistent by:
7+
8+
- Formatting modified files
9+
- Linting modified files
10+
- Failing fast on any errors
11+
- Running tasks as efficiently and in parallel as safely possible
12+
13+
> **Note:** This command is intended to be run *before* the `command.md` "Commit PR" flow.
14+
15+
---
16+
17+
## Steps
18+
19+
### 1. Safety & Branch Checks
20+
21+
1. Detect the current branch.
22+
2. **If on `main` (or the repository’s primary protected branch):**
23+
- **Do not make any changes.**
24+
- Surface a clear error:
25+
> "You are on `main`. Switch to a feature branch before running the format command."
26+
27+
---
28+
29+
### 2. Repository-Level Tidy (Default Workflow)
30+
31+
From the **repository root**, run the standard repo-wide tidy command:
32+
33+
```bash
34+
rush tidy --sha main

.cursor/commands/new-branch.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
2+
# Create a new branch
3+
4+
## Overview
5+
Given a description for a task, create a new branch
6+
7+
## Steps
8+
1. **Ingest the message put in and clean up the message**
9+
- You must take in the message and clean it to be succinct and clear.
10+
11+
2. **Summarize the message into a branch**
12+
- The branch should be relatively short, less than 63 characters
13+
- if i provide a ticket number number like "ENT-1234" in the beginning, reference that at the beginning of the new summarize message. (ex: ENT-1234-my-branch)
14+
- each word should be followed by - until the last word
15+
- Validate that the branch name doesn't already exist
16+
- Validate that the ticket number format is valid (e.g., numeric)
17+
- Handle cases where the message is too long after summarization by truncating appropriately
18+
19+
3. **Create the branch**
20+
- using the message in step 2, create the branch
21+
- If branch creation fails (e.g., branch already exists), inform the user and do not proceed
22+
23+
## RULES YOU MUST FOLLOW
24+
- never do this if there is no message given by the user
25+
- never do this if the user does not provide a ticket number
26+
- Validate all inputs before attempting branch creation
27+
- Handle errors gracefully and provide clear feedback to the user

.cursor/commands/review-pr.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# PR Code Review Checklist
2+
3+
## Overview
4+
You will perform a comprehensive checklist for conducting thorough code reviews to ensure quality, security, and maintainability. It should be scoped to the pr and how it changes the codebase and functionality of the app.
5+
6+
Ensure all rules, in ./cursor/rules/, are followed.
7+
8+
## Review Categories
9+
10+
### Functionality
11+
- [ ] Code does what it's supposed to do
12+
- [ ] Edge cases are handled
13+
- [ ] Error handling is appropriate
14+
- [ ] No obvious bugs or logic errors
15+
16+
### Code Quality
17+
- [ ] Code is readable and well-structured
18+
- [ ] Functions are small and focused
19+
- [ ] Variable names are descriptive
20+
- [ ] No code duplication
21+
- [ ] Follows project conventions
22+
23+
### Security
24+
- [ ] No obvious security vulnerabilities
25+
- [ ] Input validation is present
26+
- [ ] Sensitive data is handled properly
27+
- [ ] No hardcoded secrets

.cursor/rules/.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
*
2+
3+
!.gitignore
4+
!create-data-migration.mdc
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
description: This rule creates a data migration Typescript class. It does not need to understand the underlying database.
3+
globs:
4+
alwaysApply: false
5+
---
6+
7+
8+
# Required inputs
9+
- Name, which must be specified by the user
10+
11+
# Steps
12+
- Generate an id by running ` pnpm exec node -e "const { ulid } = require('ulid'); console.log(ulid())"` in the `common/temp` directory and capturing the output. Do not use other ULID utilities. Trim any whitespace or newlines and convert the ulid to lowercase. I will refer to this as ULID.
13+
- Process the input name by converting it into kebab case. I will refer to this as NAME.
14+
- Create a new file called "<ULID>-<NAME>".ts in the 'packages/api/src/data-migrations/migrations'. This file should follow the class definition pattern of other files in that directory. Make sure to include a constructor that calls 'super()' with the ULID as the only argument.
15+
- Import the new class in 'packages/api/src/data-migrations/data-migration.jobs.module.ts' and add it to the `DATA_MIGRATION_MODULES` constant in alphabetical order.
16+

0 commit comments

Comments
 (0)