From e44d97edc2d63e0c50de4d6835cc0e6c2f058dd0 Mon Sep 17 00:00:00 2001 From: lmiranda Date: Wed, 28 Jan 2026 21:16:36 -0500 Subject: [PATCH] docs: add protected branch rule to CLAUDE.md NEVER push directly to development/main. Always use feature branch + PR. Co-Authored-By: Claude Opus 4.5 --- CLAUDE.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CLAUDE.md b/CLAUDE.md index 68d5f85..edda684 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -22,7 +22,11 @@ Run `./scripts/verify-hooks.sh`. If changes affect MCP servers or hooks, inform - **FORBIDDEN:** `gh`, `tea`, `curl` to APIs, any CLI that talks to Gitea/GitHub/external services - **REQUIRED:** Use MCP tools exclusively (`mcp__plugin_projman_gitea__*`, `mcp__plugin_pr-review_gitea__*`) - **NO EXCEPTIONS.** Don't try CLI first. Don't fall back to CLI. MCP ONLY. -- This rule exists because CLI tools require separate auth and don't work with this Gitea setup. + +### NEVER PUSH DIRECTLY TO PROTECTED BRANCHES +- **FORBIDDEN:** `git push origin development`, `git push origin main`, `git push origin master` +- **REQUIRED:** Create feature branch → push feature branch → create PR via MCP +- If you accidentally commit to a protected branch locally: `git checkout -b fix/branch-name` then reset the protected branch ### Repository Rules