Autonomous Agents Agentic Workflow
SE: Review + Merge PR — Autonomous Agents Agentic Workflow
Review PR, resolve conflicts, fix issues, merge, report back
sidebutton install agents A senior-style merge chain for PRs that are already close to approval. The agent reviews the diff for correctness, style, and acceptance-criteria coverage, fixes any small issues it finds with its own commits, resolves merge conflicts against the default branch, and then merges using the repo's preferred strategy.
After the merge, a concise report is posted back to the source ticket with the commit SHA, any follow-ups that were deferred, and a pointer to the first deploy that will carry the change. Reserve this workflow for PRs that are intentionally being landed by an agent rather than a human reviewer.
Steps
- 1. Open a terminal
- title
- Agent: SE Review + Merge
- cwd
- {{entry_path}}
terminal.open - 2. Run a terminal command
- cmd
- >-
terminal.run
Workflow definition
schema_version: 1
id: agent_se_review_merge
title: "SE: Review + Merge PR"
description: "Review PR, resolve conflicts, fix issues, merge, report back"
overview: |
A senior-style merge chain for PRs that are already close to approval. The agent reviews the diff for correctness, style, and acceptance-criteria coverage, fixes any small issues it finds with its own commits, resolves merge conflicts against the default branch, and then merges using the repo's preferred strategy.
After the merge, a concise report is posted back to the source ticket with the commit SHA, any follow-ups that were deferred, and a pointer to the first deploy that will carry the change. Reserve this workflow for PRs that are intentionally being landed by an agent rather than a human reviewer.
category:
level: pipeline
domain: engineering
metadata:
agent: true
role: se
params:
ticket_url:
type: string
description: "Jira ticket URL"
hint:
type: string
default: ""
description: "Optional extra instructions for the agent"
entry_path:
type: string
default: "~/workspace"
description: "Working directory for the agent"
steps:
- type: terminal.open
title: "Agent: SE Review + Merge"
cwd: "{{entry_path}}"
- type: terminal.run
cmd: >-
source ~/.agent-env && claude --dangerously-skip-permissions
"read ticket with attachments and all comments - {{ticket_url}}. if it fails, stop and report the error.
find the linked PR in ticket comments. learn how to SE relevant parts.
check out the PR branch locally and review the diff against ticket requirements.
REVIEW: read every changed file. check correctness, edge cases, missing acceptance criteria, code style.
CONFLICTS: if the PR has merge conflicts with the target branch, resolve them — prefer the PR intent, preserve target branch fixes.
ISSUES: if you find bugs, missing logic, or acceptance criteria gaps — fix them in the PR branch and push.
CI: after fixes, verify the build passes (run tests, lint, type-check as applicable). fix any CI failures.
MERGE: once review is clean, CI passes, and no conflicts remain — merge the PR via gh CLI (merge commit, not squash, unless repo convention says otherwise). delete the remote branch after merge.
{{hint}}
write one comment to the ticket with: review summary (what was checked), conflicts resolved (if any), issues fixed (file refs), CI status, merge confirmation (PR link + merge commit), and how to verify on the target branch."