Skip to content

Commit 35a2706

Browse files
cleanup
1 parent 922ffe7 commit 35a2706

File tree

10 files changed

+1249
-400
lines changed

10 files changed

+1249
-400
lines changed

.cursor/commands/commit.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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+
7+
## Steps
8+
1. **Add all changes to the commit **
9+
- Add all changes to the commit
10+
- Ensure all changes are committed
11+
12+
2. **Add a succinct commit message based on the changes made**
13+
- Summarize changes clearly
14+
- commit that message
15+
- be succinct
16+
17+
3. **Push up branch**
18+
- push commit to latest branch in origin
19+
20+
## RULES YOU MUST FOLLOW
21+
- never do this if you are in main. If so, alert the user that they are in main.

.cursor/commands/format.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Your job is to create is to format the code base, given the changes that were made in the current pr, so that it confirms to all formatting, linting, prettier rules, etc that exist in this code base.
2+
<!-- IMPROVE THIS ONE -->

.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)