Skip to content

docs(agents): add PR, CI, and branch hygiene rules - #257

Merged
sambitcreate merged 1 commit into
mainfrom
docs/agents-ci-hygiene
Sep 26, 2026
Merged

sambitcreate merged 1 commit into
mainfrom
docs/agents-ci-hygiene

Conversation

@sambitcreate

Copy link
Copy Markdown
Owner

Adds a Pull requests, CI, and branches section to AGENTS.md, based on what went wrong during the 0.50.0 merge and release campaign. It also adds a .memory/ note recording the lessons and the owner-side follow-ups that aren't done yet.

New agent rules:

  • Update a shared PR branch by merging origin/main. No rebase or force-push once a PR exists.
  • Run the narrow local suites before waiting on hosted CI or bot reviews.
  • Merge only when CI is green on the exact head commit. Never cancel CI runs on main.
  • Flaky tests: rerun at most once, then record the flake. No timeout bumps, retries, or weakening --fail-on-flaky-tests.
  • Known conflict hotspots:
    • the root package.json test chain
    • the Aiden Remote protocol revision
    • the vendored advisor sources in packages/cli
  • Stacked PRs: deleting a base branch closes the PR on top of it. This happened to Add shared active-run input admission and true steering #220 and Add capability-gated native Bot Queue and Steer controls #223, which were restored and reopened. delete_branch_on_merge is now enabled on the repo, so GitHub retargets stacked PRs automatically when their base branch is deleted on merge.
  • Never delete a branch or worktree that holds uncommitted or unpushed work.

Docs only; no code or tests change.

🤖 Generated with Claude Code

Codify lessons from the 0.50.0 merge campaign: merge main instead of
force-pushing, green CI on the exact head, no cancelling main CI, a
one-rerun limit for flaky specs, the known conflict hotspots (test
chain, protocol revision, vendored advisor sources), and stacked-PR
base branches that GitHub closes when deleted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GAkZRgQzUoKWGpgupF3a4D

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes This review covers the PR-hygiene guidance and its supporting merge-campaign note.

  • Agent workflow rules AGENTS.md documents shared branch updates, local testing, exact-head CI, flaky-test handling, conflict hotspots, stacked PR safety, and safe branch/worktree deletion.
  • Incident context .memory/ci-merge-hygiene-20260926.md records the merge/release campaign lessons and remaining owner-side follow-ups.

Pullfrog  | View workflow run | Using GPT Luna | 𝕏

@very-hermes-bot

Copy link
Copy Markdown
Collaborator

Hermes Review Bot

Confidence: 5

Engine: agy/gemini-3.8-flash-high
Review mode: full
Head: a3df6a970e4ee635514b98eb18b82f3719019392
Generated: 2026-09-26T18:33:14+00:00
Reviews: 1

Summary

Adds a dedicated "Pull requests, CI, and branches" policy section to AGENTS.md and documents supporting context in .memory/ci-merge-hygiene-20260926.md based on friction encountered during the 0.50.0 release campaign. The new rules codify conventions for non-destructive branch updates via merge, head-commit CI verification, flake tracking in .papercuts/troubleshooting.md without weakening --fail-on-flaky-tests, stacked PR safety, and resolution strategies for recurring merge conflict hotspots (package.json test chains, Aiden Remote contractRevision, and vendored CLI advisor sources). Maintainers should double-check that team members and automated agent workflows are aligned on using origin/main merges rather than rebasing once a PR branch is published.

Confidence Score: 5/5

All referenced file paths, conflict hotspots (contractRevision, advisor vendoring, and test chains), and historical PR references were verified against the repository state and git history.

📁 Important Files Changed
  • AGENTS.md: Adds the "Pull requests, CI, and branches" operating rules governing branch update strategy, CI verification gates, flake handling, stacked PR preservation, and merge conflict resolution across known hotspots.
  • .memory/ci-merge-hygiene-20260926.md: Captures project memory and retrospective notes from the 0.50.0 merge campaign alongside pending owner-side infrastructure follow-ups.

Findings

No findings.

📊 Sequence Diagram

Unchanged or not applicable for this change.

Machine-Readable Findings

[]

Last reviewed commit: a3df6a970e4e
Reviews (1) · Comment /hermes review to trigger a new review · /hermes review full for full re-review

@sambitcreate
sambitcreate merged commit bfa1e11 into main Sep 26, 2026
22 checks passed
@sambitcreate
sambitcreate deleted the docs/agents-ci-hygiene branch September 26, 2026 19:20
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.

2 participants