get_resolution_context
Resolve live code collisions by retrieving peer code, recorded decisions, and resolution policies to adapt your edit and avoid conflicts.
Instructions
Resolve a live code collision with a peer BEFORE you write (Layer C resolution handoff).
Call this when the Stop hook's collision report (or complete_intent's resolution_required gate) surfaced a live peer (a teammate or AI agent editing the same lines). Pass that collision's uid as peerUid and its overlapping ranges. You get back:
peerSnippet — the peer's actual (decrypted) code at the overlapping lines, so you can see what they wrote.
decisions — recorded reasoning attached to this file (region context).
guardrail — the policy you must follow when resolving: • Never overwrite a peer's COMMITTED work — yield or merge. Only override an uncommitted live diff, and only with a recorded rationale. • Your resolution is an ordinary git edit (revert/diff is the undo) — stay in your own working tree; build no bespoke undo. • Before completing, record_decision(type=fork|tradeoff, …) explaining how you resolved (and supersedes the peer's decision if you overrode it). • Choose or synthesize ONE coherent result — never blindly interleave both diffs.
This is advisory and proactive (no lock). Use it to adapt your edit and avoid the conflict.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ranges | Yes | Overlapping [start, end] line ranges (from the collision) to fetch the peer code for. | |
| peerUid | Yes | The peer HAI whose live edits overlap — the `uid` of a collision from the Stop hook collision report. | |
| filePath | Yes | Path to the file being edited (relative to repoPath) | |
| intentId | No | Active intent ID (advisory). Auto-detected by Kawa Code when omitted. | |
| repoPath | Yes | Local path to the repository root | |
| forkAuthor | No | Fork attribution; usually resolved by Muninn automatically — pass only for override / testing. | |
| repoOrigin | No | Git remote origin URL. Auto-detected from repoPath via git if not provided. | |
| workspaceId | No | Workspace identifier; usually resolved by Muninn automatically — pass only for override / testing. |