Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .cursor/rules/git-workflow.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
description: Git branching and PR workflow for all changes
alwaysApply: true
---

# Git Workflow

**Never push directly to `main`.** No exceptions — not even one-liners or typo fixes.

## Required Workflow

```bash
# 1. Branch off main
git checkout main && git pull origin main
git checkout -b <type>/<short-description>

# 2. Make changes, commit
git add -A
git commit -m "<type>: <description>"

# 3. Run checks before pushing (see post-change-checks rule)
bun run typecheck && trunk check --fix && bun test && bun run knip

# 4. Push and open PR
git push origin <branch>
gh pr create --base main --title "..." --body "..."
```

## Branch Naming

| Type | When |
| --- | --- |
| `feature/` | New functionality |
| `fix/` | Bug fixes |
| `chore/` | Docs, deps, config, refactoring |

## Why

CI deploys on push to `main`. Unreviewed changes go straight to production.
PRs give a chance to catch issues before they affect the daily briefing.
Loading