diff --git a/.cursor/rules/pull_request_rules.mdc b/.cursor/rules/pull_request_rules.mdc new file mode 100644 index 0000000..b471e5e --- /dev/null +++ b/.cursor/rules/pull_request_rules.mdc @@ -0,0 +1,103 @@ +--- +description: Guidelines for creating pull requests, including pre-pull request checklist, preparation, and pull request content template +globs: +alwaysApply: false +--- + +# Pull Request Creation Guidelines + +## 1. Pre-Pull Request Checklist + +### 1.1 Run All Tests + +Ensure all tests across the project are passing to maintain code reliability and +prevent regressions. + +```shell +melos run test --no-select +``` + +### 1.2 Verify Code Analysis + +Run static code analysis to identify potential issues, anti-patterns, and ensure +code quality standards are met. + +```shell +dvm dart analyze +``` + +### 1.3 Verify Code Formatting + +Ensure code follows the project's formatting standards for consistency across +the codebase. + +```shell +melos format --output none --set-exit-if-changed +``` + +### 1.4 Remove Debug and Commented Code + +Search through the codebase to ensure there are no unnecessary debug code or +commented-out code remaining. + +### 1.5 Review Documentation Updates + +Search through the codebase to verify if any documentation needs to be updated +to reflect the changes made in the pull request. + +## 2. Pull Request Creation Process + +### 2.1 Get Branch Name + +Get your current working branch name. + +```shell +git branch --show-current +``` + +### 2.2 Extract GitHub Issue Number + +Extract the GitHub issue number from your branch name for reference. + +```shell +# If your branch name is like `GH-[issue number]` or `GH-[issue number]/[brief description]` +git branch --show-current | grep -o 'GH-[0-9]\+' | grep -o '[0-9]\+' +``` + +### 2.3 Identify Base Branch + +Determine the base branch for your pull request. + +```shell +git symbolic-ref refs/remotes/origin/HEAD --short | sed 's#^origin/##' +``` + +### 2.4 Review Changed Files + +List all modified, added, and deleted files between branches. + +```shell +git diff {base branch}...HEAD --name-status +``` + +### 2.5 Review Code Changes + +Examine the detailed code changes for each modified file. + +```shell +git diff {base branch}...HEAD +``` + +### 2.6 Generate Pull Request Content + +#### Title + +- Format: `type(scope): description` + - type: feat, fix, docs, style, refactor, test, chore + - scope: stratos_core, stratos_app, etc. + - description: Brief description of changes in present tense +- Example: `feat(stratos_core): implement user authentication` + +#### Description + +Follow the [Pull Request Template](mdc:.github/PULL_REQUEST_TEMPLATE.md). diff --git a/.cursor/rules/tdd_rules.mdc b/.cursor/rules/tdd_rules.mdc index a3a976d..ef64eec 100644 --- a/.cursor/rules/tdd_rules.mdc +++ b/.cursor/rules/tdd_rules.mdc @@ -1,7 +1,7 @@ --- description: TDD mandatory rules and best practices adopted in the Stratos project -globs: *.dart -alwaysApply: true +globs: +alwaysApply: false --- # TDD (Test-Driven Development) Rules diff --git a/.cursor/rules/tdd_task_workflow.mdc b/.cursor/rules/tdd_task_workflow.mdc index 75f7ec4..848e73c 100644 --- a/.cursor/rules/tdd_task_workflow.mdc +++ b/.cursor/rules/tdd_task_workflow.mdc @@ -1,7 +1,7 @@ --- description: Workflow for implementing features using Test-Driven Development -globs: * -alwaysApply: true +globs: +alwaysApply: false --- # TDD Task Workflow diff --git a/.cursorignore b/.cursorignore index a6425ed..5784af4 100644 --- a/.cursorignore +++ b/.cursorignore @@ -2,7 +2,10 @@ .dvm/ # GitHub related files -.github/ +.github/* + +# Not exclude pull request template +!.github/PULL_REQUEST_TEMPLATE.md # VSCode related files .vscode/ diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..5e5756a --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,31 @@ +## Related Issues + + + +## Overview + + + +## Changes + + + +## Review Points + + + +## Additional Notes + +