Skip to content

Commit a3dc52b

Browse files
leotrsclaude
andcommitted
docs: document dev-vs-main PR workflow in CLAUDE.md
Adds a "Git workflow" section to the Conventions & Patterns block so future AI sessions default to opening PRs against `dev` (not `main`) and know how to recover already-misrouted ones. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 4fb3543 commit a3dc52b

1 file changed

Lines changed: 30 additions & 1 deletion

File tree

CLAUDE.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,33 @@ _Add a brief overview of your project architecture_
6666

6767
## Conventions & Patterns
6868

69-
_Add your project-specific conventions here_
69+
### Git workflow: ALL PRs target `dev`, not `main`
70+
71+
`main` is for releases only. Every feature, fix, doc change, and test change must
72+
target the `dev` branch. The GitHub default base is currently `main`, so this is
73+
easy to get wrong — you MUST verify the base every time.
74+
75+
**When opening a PR:**
76+
77+
```bash
78+
gh pr create --base dev --title "..." --body "..."
79+
```
80+
81+
`--base dev` is not optional. If you omit it, the PR will silently default to
82+
`main` and break the release workflow. (See #717 for the team's documented
83+
process and the iambic-pentameter reply for the squash/merge policy.)
84+
85+
**When fixing an already-open PR that targets the wrong base:**
86+
87+
```bash
88+
gh pr edit <PR#> --base dev
89+
```
90+
91+
**When merging:**
92+
93+
- Feature branch → `dev`: squash or merge, fine for small fixes
94+
- `dev``main`: regular merge (preserves history) at release time
95+
- After a release: backmerge `main``dev` to keep them in sync
96+
97+
**Do not:** open a PR against `main`, merge a feature PR into `main`, force-push
98+
`main`, or change branch settings without team agreement.

0 commit comments

Comments
 (0)