feat(skill): Add merging branches by intent skill#961
Conversation
Adds the branch-merge workflow skill so agents can follow the intent-preserving conflict resolution process from the repo. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Try out this PRQuick install: pip install --upgrade --force-reinstall git+https://github.com/ai-dynamo/aiperf.git@e4a2961a3aba821dc417a076f594e2753d7587adRecommended with virtual environment (using uv): uv venv --python 3.12 && source .venv/bin/activate
uv pip install --upgrade --force-reinstall git+https://github.com/ai-dynamo/aiperf.git@e4a2961a3aba821dc417a076f594e2753d7587adLast updated for commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
| - PR/issue references via gh pr view / gh issue view if available | ||
| - Surrounding code to understand the pre-change state | ||
|
|
||
| If you cannot state WHY for a change, say so explicitly. Do not guess. |
There was a problem hiding this comment.
Knit: Some folks seem to think bold and caps help Claude/Codex adhere. For directives like Do not guess. might be worth trying *DO NOT GUESS.?
Just a thought, if this has been working for you then feel free to disregard.
| - **Parallel extension** — both sides added to the same list/map/enum | ||
| - **Semantic drift** — same function name, different contract on each side | ||
| - **Cross-cutting convention** — one side changed a convention (logging, error handling, naming); the other added new code in the old style | ||
| - **Signature rename under new files** — one side renamed a base-class signature (e.g. `user_config: UserConfig` → `run: BenchmarkRun`); the other side added *new* subclasses/callers using the OLD signature. Git auto-merges because the files don't overlap textually. Every new file on one branch must be audited against signature changes on the other branch — this is invisible to `git status` but guarantees runtime breakage. |
There was a problem hiding this comment.
Consider adding a seventh risk class for intent-level conflicts that don't share a symbol or a region. "Semantic drift" above is narrowly scoped to same-name-different-contract — it catches symbol-level collisions but not cases where one branch's change invalidates an invariant the other branch's design depends on, even when no file overlaps.
Concrete examples:
- Branch A removes the retry middleware because downstream calls were made idempotent. Branch B adds a configurable retry policy to a handler that relied on the old non-idempotent semantics. No textual conflict; no shared symbol; B's feature now sits on top of an invariant A just deleted.
- Branch A introduces strict-typed plugin contracts via a registry. Branch B adds a duck-typed dynamic plugin path. Both merge cleanly; the merged system now has two incompatible plugin philosophies.
- Branch A adds a request-boundary cache. Branch B adds bespoke memoization in one handler for the same reason. Result is either dead weight or double-caching.
- Branch A enforces validation in the Pydantic model. Branch B adds the same check in a service-layer guard. Two sources of truth, no rule for which wins.
Suggested addition to the list here:
- **Invariant conflict / intent collision** — one branch's change invalidates, duplicates, or obsoletes an invariant the other branch's intent depends on, even when no textual conflict and no shared symbol exists. Detection requires cross-checking each branch's invariants (Step 2) against the *other* branch's diff, not against the merged tree.And a matching rule-of-thumb under "Resolve by intent" (near the semantic-drift bullet), since detection is different from semantic drift:
- **Invariant conflict:** the merge is textually clean but the design premises don't compose. Do not paper over with a synthesis edit — escalate to the humans who wrote each side and decide which premise the merged system holds. The fix is often a follow-up commit that retires one side, not a conflict resolution.Rationale: the intent-agent prompt already asks for INVARIANTS the change assumes or establishes, so the raw material is captured — but Step 3's risk map currently has no bucket to file invariant collisions into, so they tend to fall through. Naming the class makes them explicit and gives the sweep agent (Step 6) a question to ask: "for each invariant on branch A, does any change on branch B violate or obsolete it, and vice versa?"

Summary
merging-branches-by-intentskill under.agents/skillsHow it works
Test plan
SKILL.mdhash matches existing source skill🤖 Generated with Claude Code