Skip to content

Commit 0f4cc6e

Browse files
author
Vineeth Wilson
committed
docs(contributing): add Git branch discipline rules to copilot instructions
1 parent 3b73da8 commit 0f4cc6e

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

.github/copilot-instructions.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,32 @@ python -m cli chat
6161

6262
Run tests: `pytest tests/unit/` (unit, no Docker) · `pytest tests/integration/` (needs Docker)
6363

64+
## Git Workflow — Branch Discipline
65+
66+
**`master` is protected. Every change — no matter how small — must go through a PR.**
67+
68+
### Rules for all commits (AI agent and human alike)
69+
1. **Always create a feature branch first** before making any file edits or commits:
70+
```bash
71+
git checkout master && git pull
72+
git checkout -b <type>/<short-description>
73+
```
74+
2. **Never commit directly to `master`**. Pushing to `master` is blocked by branch protection and will be rejected.
75+
3. **Before committing**, verify the active branch is not `master`:
76+
```bash
77+
git branch --show-current # must NOT print "master"
78+
```
79+
4. **Branch naming convention**: `<type>/<short-description>`
80+
- `feat/` — new feature
81+
- `fix/` — bug or CI fix
82+
- `chore/` — housekeeping (deps, config, docs)
83+
- `test/` — adding or fixing tests
84+
5. **One logical change per PR** — keep diffs focused and reviewable.
85+
6. After a PR is merged, **always sync local master** before starting the next branch:
86+
```bash
87+
git checkout master && git reset --hard origin/master
88+
```
89+
6490
## Module Conventions
6591

6692
### `core/config.py`

0 commit comments

Comments
 (0)