|
| 1 | +# Release Process |
| 2 | + |
| 3 | +## Step-by-Step Development Workflow |
| 4 | + |
| 5 | +### 1. Starting New Work |
| 6 | + |
| 7 | +**Always start by syncing with main:** |
| 8 | +```bash |
| 9 | +git checkout main |
| 10 | +git pull origin main |
| 11 | +``` |
| 12 | + |
| 13 | +**Create feature branch using standardized naming convention:** |
| 14 | +```bash |
| 15 | +git checkout -b feature/issue-123-add-new-feature |
| 16 | +git checkout -b bugfix/issue-456-fix-simulator-crash |
| 17 | +``` |
| 18 | + |
| 19 | +### 2. Development & Commits |
| 20 | + |
| 21 | +**Make logical, atomic commits:** |
| 22 | +- Each commit should represent a single logical change |
| 23 | +- Write short, descriptive commit summaries |
| 24 | +- Commit frequently to your feature branch |
| 25 | + |
| 26 | +```bash |
| 27 | +git add . |
| 28 | +git commit -m "feat: add simulator boot validation logic" |
| 29 | +git commit -m "fix: handle null response in device list parser" |
| 30 | +``` |
| 31 | + |
| 32 | +### 3. Pushing Changes |
| 33 | + |
| 34 | +**🚨 CRITICAL: Always ask permission before pushing** |
| 35 | +- **NEVER push without explicit user permission** |
| 36 | +- **NEVER force push without explicit permission** |
| 37 | +- Pushing without permission is a fatal error resulting in termination |
| 38 | + |
| 39 | +```bash |
| 40 | +# Only after getting permission: |
| 41 | +git push origin feature/your-branch-name |
| 42 | +``` |
| 43 | + |
| 44 | +### 4. Pull Request Creation |
| 45 | + |
| 46 | +**Use GitHub CLI tool exclusively:** |
| 47 | +```bash |
| 48 | +gh pr create --title "feat: add simulator boot validation" --body "$(cat <<'EOF' |
| 49 | +## Summary |
| 50 | +Brief description of what this PR does and why. |
| 51 | +
|
| 52 | +## Background/Details |
| 53 | +### For New Features: |
| 54 | +- Detailed explanation of the new feature |
| 55 | +- Context and requirements that led to this implementation |
| 56 | +- Design decisions and approach taken |
| 57 | +
|
| 58 | +### For Bug Fixes: |
| 59 | +- **Root Cause Analysis**: Detailed explanation of what caused the bug |
| 60 | +- Specific conditions that trigger the issue |
| 61 | +- Why the current code fails in these scenarios |
| 62 | +
|
| 63 | +## Solution |
| 64 | +- How the root cause was addressed |
| 65 | +- Technical approach and implementation details |
| 66 | +- Key changes made to resolve the issue |
| 67 | +
|
| 68 | +## Testing |
| 69 | +- **Reproduction Steps**: How to reproduce the original issue (for bugs) |
| 70 | +- **Validation Method**: How you verified the fix works |
| 71 | +- **Test Coverage**: What tests were added or modified |
| 72 | +- **Manual Testing**: Steps taken to validate the solution |
| 73 | +- **Edge Cases**: Additional scenarios tested |
| 74 | +
|
| 75 | +## Notes |
| 76 | +- Any important considerations for reviewers |
| 77 | +- Potential impacts or side effects |
| 78 | +- Future improvements or technical debt |
| 79 | +- Deployment considerations |
| 80 | +EOF |
| 81 | +)" |
| 82 | +``` |
| 83 | + |
| 84 | +**After PR creation, add automated review trigger:** |
| 85 | +```bash |
| 86 | +gh pr comment --body "Cursor review" |
| 87 | +``` |
| 88 | + |
| 89 | +### 5. Branch Management & Rebasing |
| 90 | + |
| 91 | +**Keep branch up to date with main:** |
| 92 | +```bash |
| 93 | +git checkout main |
| 94 | +git pull origin main |
| 95 | +git checkout your-feature-branch |
| 96 | +git rebase main |
| 97 | +``` |
| 98 | + |
| 99 | +**If rebase creates conflicts:** |
| 100 | +- Resolve conflicts manually |
| 101 | +- `git add .` resolved files |
| 102 | +- `git rebase --continue` |
| 103 | +- **Ask permission before force pushing rebased branch** |
| 104 | + |
| 105 | +### 6. Merge Process |
| 106 | + |
| 107 | +**Only merge via Pull Requests:** |
| 108 | +- No direct merges to `main` |
| 109 | +- Maintain linear commit history through rebasing |
| 110 | +- Use "Squash and merge" or "Rebase and merge" as appropriate |
| 111 | +- Delete feature branch after successful merge |
| 112 | + |
| 113 | +## Pull Request Template Structure |
| 114 | + |
| 115 | +Every PR must include these sections in order: |
| 116 | + |
| 117 | +1. **Summary**: Brief overview of changes and purpose |
| 118 | +2. **Background/Details**: |
| 119 | + - New Feature: Requirements, context, design decisions |
| 120 | + - Bug Fix: Detailed root cause analysis |
| 121 | +3. **Solution**: Technical approach and implementation details |
| 122 | +4. **Testing**: Reproduction steps, validation methods, test coverage |
| 123 | +5. **Notes**: Additional considerations, impacts, future work |
| 124 | + |
| 125 | +## Critical Rules |
| 126 | + |
| 127 | +### ❌ FATAL ERRORS (Result in Termination) |
| 128 | +- **NEVER push to `main` directly** |
| 129 | +- **NEVER push without explicit user permission** |
| 130 | +- **NEVER force push without explicit permission** |
| 131 | + |
| 132 | +### ✅ Required Practices |
| 133 | +- Always pull from `main` before creating branches |
| 134 | +- Use `gh` CLI tool for all PR operations |
| 135 | +- Add "Cursor review" comment after PR creation |
| 136 | +- Maintain linear commit history via rebasing |
| 137 | +- Ask permission before any push operation |
| 138 | +- Use standardized branch naming conventions |
| 139 | + |
| 140 | +## Branch Naming Conventions |
| 141 | + |
| 142 | +- `feature/issue-xxx-description` - New features |
| 143 | +- `bugfix/issue-xxx-description` - Bug fixes |
| 144 | +- `hotfix/critical-issue-description` - Critical production fixes |
| 145 | +- `docs/update-readme` - Documentation updates |
| 146 | +- `refactor/improve-error-handling` - Code refactoring |
0 commit comments