Repository navigation
feat(finale): add sub-agent option for merge conflict resolution - #326
Conversation
- Add option 5 to step 6b conflict recovery menu: spawn cobalt-crush-dev sub-agent for AI-assisted resolution - Include mergeability gate (6a), conflict recovery (6b), and workflow cross-reference (6c) from PR unbound-force#320 baseline - Add user approval gate, failure handling with merge abort, and post-resolution CI polling - Add guardrails for force push safety and sub-agent approval - Sync embedded scaffold asset - Create OpenSpec change artifacts (proposal, design, specs, tasks) Closes unbound-force#325 Assisted-by: claude-opus-4 Generated with AI assistance (claude-opus-4)
yvonnedevlinrh
left a comment
There was a problem hiding this comment.
Clean, well-structured PR with thorough OpenSpec artifacts. All CI checks pass, scaffold asset is in sync, constitution alignment is solid. Three findings -- one consistency issue (MEDIUM), and one spec/implementation gap (MEDIUM)
Findings
- MEDIUM git push missing from confirmation prompts in Options 1 and 5
Options 1 and 5 execute git push after the user approves, but the confirmation text only mentions fetch/merge (Option 1) or "Approve and commit" (Option 5). Option 2 correctly includes git push --force-with-lease in its confirmation text. All three options should be consistent -- the user should see that push is part of what they're approving.
- Option 1: Add git push to the confirmation prompt alongside git fetch and git merge
- Option 5 step (a): Add git push to the initial confirmation or clarify it happens after approval
- Option 5 step (e): Change "Approve and commit" to "Approve, commit, and push" (or similar)
- MEDIUM Spec FR-003 promises "request edits" option not present in implementation
The spec (specs/finale-conflict-resolution.md FR-003) says: "The user MUST be asked to approve, request edits, or abort." The implementation in finale.md step (e) only provides two options: "Approve and commit" / "Abort (discard resolution)." Either add a "Request edits" option to the implementation or remove "request edits" from the spec.
| Show the commands and ask for explicit confirmation | ||
| before executing: | ||
|
|
||
| > "I will run the following commands: |
There was a problem hiding this comment.
MEDIUM Push not shown in confirmation prompt
The confirmation text shows git fetch and git merge but the git push that follows on success is not shown to the user. Option 2 correctly includes push in its confirmation. For consistency, add git push here so the user knows they're approving a remote-affecting operation.
There was a problem hiding this comment.
Addressed in a31f235: Added git push to the Option 1 confirmation prompt and updated the description to "This creates a merge commit and pushes to the remote. Proceed?" — now consistent with Option 2.
| > the resolution diff above. | ||
| > | ||
| > Options: | ||
| > 1. Approve and commit |
There was a problem hiding this comment.
MEDIUM "Approve and commit" should mention push
The approval prompt says "Approve and commit" but git commit --no-edit and git push both execute on approval. The user should know push is included. Suggest changing option 1 text to "Approve, commit, and push" for transparency. Also, the spec (FR-003) promises a "request edits" option that isn't implemented here -- either add it or update the spec.
There was a problem hiding this comment.
Addressed in a31f235: Renamed "Approve and commit" to "Approve, commit, and push" for transparency. Added "Request edits (modify resolution manually)" as option 2 per FR-003, which lets the user edit resolved files and re-show the diff before committing. Abort is now option 3.
- Option 1 (merge): add `git push` to the confirmation prompt for consistency with Option 2 (rebase) which already shows push - Option 5 (sub-agent): rename "Approve and commit" to "Approve, commit, and push" for transparency - Option 5 (sub-agent): add "Request edits" option per FR-003 which requires approve, request edits, or abort Addresses PR unbound-force#326 review feedback from @yvonnedevlinrh. Signed-off-by: Em <[email protected]> Assisted-by: OpenCode (claude-opus-4-6)
yvonnedevlinrh
left a comment
There was a problem hiding this comment.
Both prior findings are resolved. All CI checks pass. The implementation is consistent with the spec, the scaffold asset is in sync, and no new concerns were introduced by the fix commit.
gxmiranda
left a comment
There was a problem hiding this comment.
Clean PR with thorough OpenSpec artifacts and full spec coverage (FR-001 through FR-006). All CI checks pass. Scaffold asset verified in sync. Prior reviewer findings (push transparency in confirmation prompts, missing "request edits" option per FR-003) were addressed in commit a31f235 and confirmed resolved. No new concerns. Constitution alignment verified across all five principles.
This review was generated by /review-pr (AI-assisted).
Summary
Adds a sub-agent option (Option 5) to
/finalestep 6b'sconflict recovery menu. When a PR has merge conflicts, users
can now choose "Spawn sub-agent to resolve conflicts
(AI-assisted)" alongside the existing manual options.
The sub-agent flow:
cobalt-crush-devsub-agent with a scoped promptThis also includes the full mergeability gate (6a), conflict
recovery (6b options 1-4), and workflow cross-reference (6c)
from PR #320 as baseline content.
Closes #325
How to Test
.opencode/commands/finale.mdand verify:go test -race -count=1 ./...-- all tests passincluding embedded asset drift detection
How to Demo
This change modifies agent instructions (Markdown), not
runtime code. To verify:
.opencode/commands/finale.mdKey Files Changed
.opencode/commands/finale.md-- Added step 6a/6b/6cwith option 5 sub-agent conflict resolution
internal/scaffold/assets/opencode/commands/finale.md--Synced embedded scaffold asset
openspec/changes/finale-conflict-resolution/-- Changeartifacts (proposal, design, specs, tasks)
This PR was generated by /finale (AI-assisted).