From 3a8208bb566f68542ea721eaa0f22a229af9b048 Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Thu, 7 May 2026 09:07:08 -1000 Subject: fix(agent): make branch policy a mandatory session-start action Strengthen the branch rule so it's an imperative step-zero command, not just a policy statement that gets read and ignored. Also updates project memory with a feedback entry enforcing the same habit. Co-Authored-By: Claude Sonnet 4.6 --- .agent/config.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.agent/config.md b/.agent/config.md index b3a28dc..d0e00d1 100644 --- a/.agent/config.md +++ b/.agent/config.md @@ -14,12 +14,18 @@ This is the primary source of truth for all AI agents working on **Nav**. These | `narrative.md` | **Background** — Historical context and evolution of the project. | | `preferences.md` | **User Prefs** — Living record of user-specific likes/dislikes. | -## 2. Branch Policy — READ THIS FIRST +## 2. Branch Policy — MANDATORY SESSION START ACTION + +**Before any other action in every session: run `git branch` and switch to `main` if not already there.** + +``` +git checkout main # run this if not already on main +``` **Primary branch: `main`** - ALL work merges to `main`. Never to `master` or any other branch. -- `master` does not exist as a development target. If it exists locally, ignore it. +- `master` does not exist as a development target. If HEAD is on `master`, switch to `main` immediately — before reading files, before planning, before any other tool call. - Feature branches are cut from `main` and merge back to `main`. - When a session harness specifies a generated branch name (e.g. `claude/foo-XYZ`), develop there and merge to `main` when done — not to wherever the local HEAD points. - The CI/CD workflow targets `main`. Firebase distribution fires on `main` pushes only. -- cgit v1.2.3