/resolve-conflicts
Handbook · Skill index · Runtime source
Purpose
Coordinate parallel work and resolve local Git conflicts while preserving collaborators' requirements, unrelated work, project decisions and verification evidence.
When to use
Multiple people or concurrent Claude sessions share a repository, tasks overlap, or merge/rebase/cherry-pick conflicts need scoped inspection and resolution. It can produce a collaboration plan before any conflict exists.
When not to use
Do not use it as an automatic remote merge/push service, distributed lock, blanket side selector or replacement for application implementation/review. It cannot infer contradictory owners' intent reliably.
Invocation
/resolve-conflictsAutocomplete hint: [plan or resolve] [scope] [target/ownership]. Required information can be supplied in context; this is not a shell command or a CLI parser. Use plain-language arguments. See argument conventions for notation and permission boundaries.
Minimal example:
/resolve-conflictsWith optional context:
/resolve-conflicts Resolve the current booking merge conflicts, preserve both supported behaviors and unrelated edits, run relevant checks, and do not push.Inputs
| Input | Requirement | If omitted |
|---|---|---|
| plan or resolve | Optional | Inspect Git; address an active conflict, otherwise ask the collaboration goal. |
| scope and owners | Required before semantic resolution | Infer only from reliable task records; ask about contradictory intent. |
| integration target/strategy | Required before starting integration | Use verified team policy/refs; ask if absent. |
No arguments: Run read-only inventory; if no conflict exists, ask for the intended collaboration task without starting a merge.
Optional inputs are discovered where reliable; recommendations do not become confirmed choices. Conditional requirements must be resolved before their dependent action. Required information is enforced by skill instructions, not by native autocomplete. The detailed procedure is linked directly from SKILL.md.
What it does
- Inventory local branch/head, active operation and unmerged stages with a read-only helper.
- For planned work, recommend one clone/worktree and task branch per person/session, explicit shared-interface ownership and one state-file integrator.
- For an existing conflict, inspect ancestor and both sides in operation context; resolve behavior, including rename/delete/add cases.
- Apply file-specific rules for code/tests, generated assets, lockfiles, migrations, ADRs, design answers, shared state and native configuration.
- Inspect and stage explicit resolution paths, preserve unrelated edits, run actual checks and use iteration-review for substantial semantic changes.
- Record rationale/evidence/blockers, then continue only the authorized operation; remote publication remains separate.
The full procedure is .claude/framework/collaboration.md. The optional coordination/resolution template belongs under docs/project/collaboration/<task-id>.md. These notes are agreements, not locks.
Outputs and ownership
A collaboration plan or scoped local resolutions, task-specific resolution notes, explicit test/review evidence and next action. One integrator reconciles shared STATE/ROADMAP from actual facts. Do not copy machine-local manifests or secret-bearing settings into shared notes.
Questions and decisions
Confirm missing integration target, merge/rebase policy, file ownership and materially conflicting behavior. During rebase, ours/theirs labels differ from an ordinary merge; inspect actual commits and index stages. Separate worktrees reduce editing collisions but cannot eliminate semantic integration conflicts.
Permissions and side effects
The inventory helper is read-only and performs no fetch/edit/stage/continue. The skill can edit and stage scoped local files when requested; its permissions are ordinary conversation permissions. No reset --hard, clean, blanket side selection, auto-stash, skipped commits or force push. Rewriting shared history, credential/network actions, new installation, destructive actions and remote publication require authorization. Reuse existing authorization for reversible local work.
Validation and completion
python3 .claude/framework/collaboration.py statusGlobal --target precedes status. Exit 0 means no detected operation/unmerged entries, but dirty work can remain; inspect ready_for_new_integration. Exit 2 means conflicts or an operation still in progress; 1 means invalid Git/path/tool input. A staged resolution with no unmerged entries can still be an unfinished merge. No marker text, clean Git integration or helper result alone proves application correctness. Run relevant project tests/contracts and revalidate source-bound review evidence.
Failure and recovery
Preserve unrelated work and diagnostics. Do not start a second Git operation, silently discard one side or invent owner approval. Abort only with appropriate authorization after preserving later work; abort may fail to recover pre-existing edits. Keep unavailable review UNVERIFIED. After two review/fix rounds, escalate unresolved blockers.
Example
Alice changes validation; Bob changes persistence on separate task branches. Resolve a service conflict by tracing both requirements and callers, retain the intended validation and persistence behavior, and run tests covering both paths plus their integration. If one branch removes an API the other depends on, request the material contract decision rather than choosing whichever file is newer.
This is a usage scenario, not evidence that a live model resolved a real team's conflict. Native Git fixtures exercise detection; semantic resolution quality remains unverified.
Related components
implement-change · iteration-review · architecture-design · helper reference