Skip to content

docs(pr-template): make branch naming agent-operable - #810

Merged
cgfixit merged 2 commits into
mainfrom
grok/pr-template-branch-rules
Aug 6, 2026
Merged

docs(pr-template): make branch naming agent-operable#810
cgfixit merged 2 commits into
mainfrom
grok/pr-template-branch-rules

Conversation

@cgfixit

@cgfixit cgfixit commented Aug 5, 2026

Copy link
Copy Markdown
Owner

Summary

Rewrites the casual top-of-template branch note into explicit, agent-operable rules aligned with utils/agent_identity.py and .githooks.

Changes

  • Replace freeform prose with a driver → prefix table
  • Explicit rule: do not default to agent/ when the driver is known
  • Rename-before-push instruction for wrong branch names
  • Light cleanup of Further-comments ELI5 wording and contributor notes
  • Add squash-and-merge / permanent-record guidance for multi-agent PRs

Out of scope

Does not change DEFAULT_COMMIT_NAME / DEFAULT_BRANCH_PREFIX in utils/agent_identity.py (CyClaw Agent / agent/ fallback). That remains a separate decision.

Test plan

  • Open a new PR draft and confirm template renders cleanly
  • Skim that branch rules still match githooks allowlist
  • Squash-merge with a clean final message

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

PR template check (advisory, non-blocking)

This PR body doesn't look like it covers everything .github/PULL_REQUEST_TEMPLATE.md expects:

  • Risks to monitor (e.g. ## Risks to monitor, ## Risk)

This isn't a required check -- it won't block merge. See the template's own "Notes for contributors" for which sections lighter-path PRs can skip.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 620c735e4f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/PULL_REQUEST_TEMPLATE.md
@cgfixit
cgfixit force-pushed the grok/pr-template-branch-rules branch from 0f6125c to 8c80d65 Compare August 6, 2026 01:09
cgfixit pushed a commit that referenced this pull request Aug 6, 2026
…ly stale

Two more codex findings on the same section fixed in the prior commit:

- The documented recovery (checkout main, fetch, hard-reset main) only
  helps when local main itself is what's stale. Run the quick-check from a
  feature branch that's simply behind (the common case for an agent branch
  cut before a later merge landed on main) and it reports
  REWRITE/DIVERGED, but resetting main does nothing for that branch --
  switching back to it fails the same check and the pre-push gate still
  refuses it. Verified against this session's own history: PR #804/#809/#810
  were in exactly this state (cut before #802 merged) and the fix was
  `git rebase origin/main` on each feature branch, not a main reset.
- `git reset --hard origin/main` was presented unconditionally, with no
  check for unique local commits or uncommitted work it would discard.
  `git reset -h` confirms --hard resets HEAD, the index, and the working
  tree. CLAUDE.md's own Git Safety Protocol treats `reset --hard` as
  destructive and never to run without explicit confirmation; this doc
  contradicted that by presenting it as a bare recovery one-liner.

Added the feature-branch rebase path as the primary recovery, and gated the
main-reset path on `git status --short` being clean and
`git log origin/main..main` being empty first.

Co-Authored-By: CyClaw Agent <cyclaw-agent@users.noreply.github.com>
@cgfixit
cgfixit merged commit 8189be7 into main Aug 6, 2026
41 checks passed
@cgfixit
cgfixit deleted the grok/pr-template-branch-rules branch August 6, 2026 02:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant