Skip to content

Commit 24e312a

Browse files
committed
docs: add Git workflow guidance to AGENTS.md
Adds instructions for agents to sync with origin/main before starting new work and to rebase before creating PRs. This prevents branches from getting out of sync with merged changes.
1 parent e4ba4c0 commit 24e312a

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

AGENTS.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,31 @@ The following commands require `required_permissions: ['all']` to run outside th
5353
- **State Management:** See `review_roadmap/agent/state.py` for the `ReviewState` model that flows through the graph.
5454
- **Prompts:** LLM prompts are centralized in `review_roadmap/agent/prompts.py`.
5555

56+
## Git Workflow
57+
58+
Before starting any new feature or fix:
59+
60+
1. **Sync with remote:** `git fetch origin`
61+
2. **Check out main:** `git checkout main`
62+
3. **Pull latest:** `git pull origin main`
63+
4. **Create feature branch:** `git checkout -b feat/your-feature-name`
64+
65+
Before creating a PR, rebase onto the latest main to avoid conflicts:
66+
67+
```bash
68+
git fetch origin
69+
git rebase origin/main
70+
pytest # Verify tests still pass after rebase
71+
git push --force-with-lease # If branch was already pushed
72+
```
73+
5674
## Guidelines & Rules
5775

5876
- **Never** delete `.env` files or `env.example`.
5977
- **Never** hardcode API keys — all secrets go through environment variables.
6078
- **Always** run `pytest` after modifying logic in `review_roadmap/`.
6179
- **Always** update `env.example` when adding new environment variables.
80+
- **Always** sync with `origin/main` before starting new work (see Git Workflow above).
6281
- **Ask** before adding new heavy dependencies (especially LLM providers or frameworks).
6382
- **Commits:** Use [Conventional Commits](https://www.conventionalcommits.org/) (e.g., `feat:`, `fix:`, `docs:`).
6483

0 commit comments

Comments
 (0)