Add workflow, environment, and orchestration guidance#4
Conversation
…ghts Adds four new sections based on recurring friction patterns observed across 80+ agent sessions: Project Context (assume brownfield), Git Workflow (branch creation and switching guardrails), Development Environment (dependency checks before launch), and Branch Protection & SonarCloud (merge retry limits). Also adds Multi-Repo Orchestration rules to the existing multi-agent section. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdded documentation to AGENTS.md defining project-context guidance, git workflow and safe-branching rules, development-environment pre-flight checks, branch-protection/SonarCloud CI requirements, and multi-repo orchestration rules enforcing isolated per-repo agent workspaces. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Pull request overview
Updates the org-wide AGENTS.md standards to reduce recurring agent friction around repo discovery, git workflow hygiene, environment readiness checks, CI/branch-protection behavior, and parallel work across repositories.
Changes:
- Add “Project Context” guidance (primary languages, assume-brownfield exploration).
- Add explicit Git workflow and development-environment preflight guidance.
- Add SonarCloud/branch-protection notes and multi-repo orchestration rules.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Clarified primary languages used in the project.
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@AGENTS.md`:
- Around line 18-25: Update the "Branch Creation" instructions to first check
for uncommitted changes before running the existing git commands: explicitly
require running a status check and instruct to either commit or stash local
changes (or abort) when uncommitted changes are present, then proceed with the
existing sequence "git checkout main && git pull origin main"; reference the
"Branch Creation" heading and the existing command string so the doc change adds
the pre-check and the commit/stash guidance consistent with the Branch Switching
guidance.
- Line 20: Update the wording of the sentence "**Always base new branches off
`main`**" to match the "default branch" terminology used elsewhere (e.g., the
Multi-Agent Isolation text that mentions "branch from the repository's
configured default branch (for example, `origin/main`)"); replace the explicit
`main` reference with a phrasing such as "the repository's configured default
branch (for example, `origin/main`)" so the language is consistent across
AGENTS.md and aligns with the worktrees section.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (1)
AGENTS.md (1)
19-24:⚠️ Potential issue | 🟠 MajorRequire a clean working tree before
git checkout main.Line 20 should explicitly require checking
git statusand committing/stashing first; otherwise branch creation can fail or cause context loss. Also prefer “default branch” terminology to match Line 261.🔧 Proposed doc fix
-- **Always base new branches off `main`** (not off other feature or PR branches) unless explicitly told otherwise. -- Before creating a branch, run: +- **Always base new branches off the repository's configured default branch (for example, `origin/main`)** (not off other feature or PR branches) unless explicitly told otherwise. +- Before creating a branch, verify the working tree is clean (`git status`), then commit or stash any pending changes. Next run: ```bash git checkout main && git pull origin main</details> Based on learnings: “Workspaces MUST branch from the repository's configured default branch…” and “If the worktree has uncommitted changes, the agent MUST commit or discard before exiting.” <details> <summary>🤖 Prompt for AI Agents</summary>Verify each finding against the current code and only fix it if needed.
In
@AGENTS.mdaround lines 19 - 24, Update the branching guidance to require a
clean working tree before switching to the default branch: replace references to
"main" with "default branch" where applicable (the bullet "Always base new
branches offmain" and the command snippet), and add a step instructing users
to rungit statusand commit or stash/discard uncommitted changes before
running the checkout/pull sequence so branch creation won't fail or lose
context.</details> </blockquote></details> </blockquote></details> <details> <summary>🤖 Prompt for all review comments with AI agents</summary>Verify each finding against the current code and only fix it if needed.
Inline comments:
In@AGENTS.md:
- Around line 245-246: Replace the instruction that recommends using "gh pr
merge --admin" for stale/mismatched SonarCloud checks with guidance to first
verify the actual required status checks and branch-protection configuration
(i.e., inspect check names, statuses and branch protection settings) and prefer
fixing the check-name or branch-protection configuration rather than bypassing;
update the text that warns "Do not retry a failing merge more than twice" to
require surfacing the specific failing check name, status and reason before any
admin override is considered, and remove or gate any unconditional
admin-override recommendation (references: the string "gh pr merge --admin" and
the paragraph about retrying merges).
Duplicate comments:
In@AGENTS.md:
- Around line 19-24: Update the branching guidance to require a clean working
tree before switching to the default branch: replace references to "main" with
"default branch" where applicable (the bullet "Always base new branches off
main" and the command snippet), and add a step instructing users to rungit statusand commit or stash/discard uncommitted changes before running the
checkout/pull sequence so branch creation won't fail or lose context.</details> <details> <summary>🪄 Autofix (Beta)</summary> Fix all unresolved CodeRabbit comments on this PR: - [ ] <!-- {"checkboxId": "4b0d0e0a-96d7-4f10-b296-3a18ea78f0b9"} --> Push a commit to this branch (recommended) - [ ] <!-- {"checkboxId": "ff5b1114-7d8c-49e6-8ac1-43f82af23a33"} --> Create a new PR with the fixes </details> --- <details> <summary>ℹ️ Review info</summary> <details> <summary>⚙️ Run configuration</summary> **Configuration used**: Organization UI **Review profile**: ASSERTIVE **Plan**: Pro **Run ID**: `8715f10e-bf04-442e-a4a7-e3b58dc2af2e` </details> <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between 0d9305334bc2e897f6518ecc15ad37f0f8f766b2 and 11204ab292059fee46bb57fcee35798475b55b97. </details> <details> <summary>📒 Files selected for processing (1)</summary> * `AGENTS.md` </details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
- Use "default branch" terminology consistent with multi-agent section - Add clean working tree check before branch creation - Clarify branch switching risk (Git prevents most data loss) - Gate admin override behind explicit user approval and verification - Fix worktree/clone wording in multi-repo orchestration Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Broaden Rule #4 exception to include story worktrees branching from Epic integration branches, not just child Epic branches - Add git fetch before merging story branches into Epic branch - Fix rebase snippet to run from within the story worktree instead of using git checkout (which fails when branch is in another worktree) - Add language identifiers (text/bash) to all unfenced code blocks - Add blank lines around fenced blocks inside ordered lists (MD031) - Add mandatory repo-level template for dev commands and env vars Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Add workflow, environment, and orchestration guidance from usage insights Adds four new sections based on recurring friction patterns observed across 80+ agent sessions: Project Context (assume brownfield), Git Workflow (branch creation and switching guardrails), Development Environment (dependency checks before launch), and Branch Protection & SonarCloud (merge retry limits). Also adds Multi-Repo Orchestration rules to the existing multi-agent section. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Update project context in AGENTS.md Clarified primary languages used in the project. * Address review comments from Copilot and CodeRabbit - Use "default branch" terminology consistent with multi-agent section - Add clean working tree check before branch creation - Clarify branch switching risk (Git prevents most data loss) - Gate admin override behind explicit user approval and verification - Fix worktree/clone wording in multi-repo orchestration Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Add stacked PR strategy for Epic-level development Introduces a comprehensive stacked PR workflow where dependent Epics form a linear chain (main ← Epic-1 ← Epic-2 ← ...) with bottom-up merging. Within each Epic, multiple agents work stories in parallel via worktrees branching from the Epic integration branch. Sprints within an Epic can also overlap when independent. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Address review comments from Copilot and CodeRabbit - Broaden Rule #4 exception to include story worktrees branching from Epic integration branches, not just child Epic branches - Add git fetch before merging story branches into Epic branch - Fix rebase snippet to run from within the story worktree instead of using git checkout (which fails when branch is in another worktree) - Add language identifiers (text/bash) to all unfenced code blocks - Add blank lines around fenced blocks inside ordered lists (MD031) - Add mandatory repo-level template for dev commands and env vars Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Simplify and tighten stacked PR documentation - Clarify Rule #5 re: story PRs targeting Epic branch are internal, not standalone feature PRs - Consolidate Step 3 merge commands into "Story and Sprint Organization" section to eliminate duplication - Replace vague "enough foundation" with explicit dependency criterion - Add "Keeping Epic Branches in Sync with Main" guidance - Standardize terminology on "Epic branch" (define "integration branch" once on first use) - Add story worktree cleanup guidance (remove after merging into Epic) - Add scoping note linking Epic naming convention to general convention - Remove redundant "When to use" callout (already covered in intro) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Revise multi-agent isolation guidelines in AGENTS.md Clarified rules for branching and pull requests in multi-agent environments. * Treat Epic and Feature as interchangeable using Epic/Feature label Updates all generic/conceptual references throughout the stacked PR section to use "Epic/Feature" — section headings, rules, workflow steps, checklists, tables, and internal anchor links. Concrete example names (Epic 1, epic-1/foundation) remain unchanged as illustrative instances. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Clarify enforce_admins impact on branch protection Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: DJ <dj@Rachels-Air.localdomain> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: DJ <dj@Rachels-MacBook-Air.local>
Summary
Motivation
These additions address the top friction patterns observed across 80+ agent sessions:
Test plan
🤖 Generated with Claude Code
Summary by CodeRabbit