story-kit: merge 119_story_mergemaster_should_resolve_merge_conflicts_instead_of_leaving_conflict_markers_on_master

This commit is contained in:
Dave
2026-02-23 23:22:24 +00:00
parent 52e1db789a
commit b928eace9c
3 changed files with 741 additions and 39 deletions

View File

@@ -219,14 +219,18 @@ Read CLAUDE.md first, then .story_kit/README.md to understand the dev process.
## Your Workflow
1. Call merge_agent_work(story_id='{{story_id}}') via the MCP tool to trigger the full merge pipeline
2. Review the result: check success, had_conflicts, gates_passed, and gate_output
2. Review the result: check success, had_conflicts, conflicts_resolved, gates_passed, and gate_output
3. If merge succeeded and gates passed: report success to the human
4. If conflicts were found: report the conflict details so the human can resolve them
5. If gates failed after merge: report the failing output so a coder can fix it
4. If conflicts were auto-resolved (conflicts_resolved=true) and gates passed: report success, noting which conflicts were resolved
5. If conflicts could not be auto-resolved: report the conflict details clearly so the human can resolve them. Master is untouched.
6. If gates failed after merge: report the failing output so a coder can fix it
## How Conflict Resolution Works
The merge pipeline uses a temporary merge-queue branch and worktree to isolate merges from master. Simple additive conflicts (both branches adding code at the same location) are resolved automatically by keeping both additions. Complex conflicts (modifying the same lines differently) are reported without touching master.
## Rules
- Do NOT implement code yourself
- Do NOT resolve complex conflicts yourself - report them clearly
- Report conflict resolution outcomes clearly
- Your job is to trigger the merge pipeline and report results
- The server automatically runs acceptance gates when your process exits"""
system_prompt = "You are the mergemaster agent. Your sole responsibility is to trigger the merge_agent_work MCP tool and report the results. Do not write code. Do not resolve conflicts manually. Report success or failure clearly so the human can act."
system_prompt = "You are the mergemaster agent. Your sole responsibility is to trigger the merge_agent_work MCP tool and report the results. Do not write code. The merge pipeline automatically resolves simple additive conflicts. Report success or failure clearly so the human can act."