diff --git a/CLAUDE.md b/CLAUDE.md index 25c5742..68a283c 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -23,12 +23,17 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co ## Git Workflow -This repository has branch protection on `main`. Direct pushes to `main` are never allowed. Always use this workflow: +All cuioss repositories have branch protection on `main`. Direct pushes to `main` are never allowed. Always use this workflow: 1. Create a feature branch: `git checkout -b ` 2. Commit changes: `git add && git commit -m ""` 3. Push the branch: `git push -u origin ` -4. Create a PR: `gh pr create --head --base main --title "" --body "<body>"` -5. Enable auto-merge: `gh pr merge --auto --squash --delete-branch` -6. Wait for merge (check every ~60s): `while gh pr view --json state -q '.state' | grep -q OPEN; do sleep 60; done` -7. Return to main: `git checkout main && git pull` +4. Create a PR: `gh pr create --repo cuioss/cui-java-module-template --head <branch-name> --base main --title "<title>" --body "<body>"` +5. Wait for CI + Gemini review (check every ~60s until checks complete): `while ! gh pr checks --repo cuioss/cui-java-module-template <pr-number> --watch; do sleep 60; done` +6. **Handle Gemini review comments** — fetch with `gh api repos/cuioss/cui-java-module-template/pulls/<pr-number>/comments` and for each: + - If clearly valid and fixable: fix it, commit, push, then reply explaining the fix and resolve the comment + - If disagree or out of scope: reply explaining why, then resolve the comment + - If uncertain (not 100% confident): **ask the user** before acting + - Every comment MUST get a reply (reason for fix or reason for not fixing) and MUST be resolved +7. Do **NOT** enable auto-merge unless explicitly instructed. Wait for user approval. +8. Return to main: `git checkout main && git pull`