From 684a11610a03124fa5ec21c6126826614aff5850 Mon Sep 17 00:00:00 2001 From: Fusion Date: Fri, 22 May 2026 20:37:50 +0200 Subject: [PATCH] docs: add git branching strategy and merge workflow to AGENTS.md - Add branching strategy section with prefix conventions (feat/, fix/, refactor/, docs/, chore/) - Add completion and merge workflow steps (branch from dev, merge back, push) - Emphasize no direct commits to main or dev branches --- AGENTS.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index 3d0a94b..3e8d643 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -87,6 +87,31 @@ Do not claim completion without verification evidence. ## Git workflow +### Branching strategy + +For every spec change or new functionality: + +1. Create a new branch from `dev` with a proper prefix: + - `feat/` for new features (e.g., `feat/tool-workshop`) + - `fix/` for bug fixes (e.g., `fix/terminal-tty`) + - `refactor/` for refactors (e.g., `refactor/api-cleanup`) + - `docs/` for documentation (e.g., `docs/api-guide`) + - `chore/` for maintenance (e.g., `chore/update-deps`) +2. Branch name should reference the OpenSpec change name when applicable. +3. Do not commit directly to `main` or `dev`. + +### Completion and merge + +When implementation is complete and verified: + +1. Ensure all tests pass and quality gates are met. +2. Stage all changes with `git add -A`. +3. Create a commit with a proper conventional commit message (see below). +4. Switch to `dev`: `git checkout dev`. +5. Merge the feature branch: `git merge --no-ff `. +6. Push to remote: `git push origin dev`. +7. Delete the local feature branch if desired: `git branch -d `. + ### Auto-commit on spec completion When an OpenSpec change is fully implemented and all tasks are complete: