From exarchos
Shepherds pull requests through CI checks and code reviews to merge readiness. Iteratively assesses stack, fixes issues, resubmits, and requests approval.
How this command is triggered — by the user, by Claude, or both
Slash command
/exarchos:shepherdFiles this command reads when invoked
The summary Claude sees in its command listing — used to decide when to auto-load this command
# Shepherd Shepherd PRs for: "$ARGUMENTS" ## Workflow Position This command operates as an **iteration loop within the synthesize phase**. The workflow phase remains `synthesize` throughout. ## Skill Reference Follow the shepherd skill: `@skills/shepherd/SKILL.md` ## Prerequisites - [ ] Active workflow with PRs published - [ ] PRs created via `gh pr create` (artifacts.pr exists in state) - [ ] GitHub MCP tools available or `gh` CLI authenticated ## Idempotency Before shepherding, check shepherd status: 1. Read `shepherd.currentIteration` from state — resume from last iteration 2....
Shepherd PRs for: "$ARGUMENTS"
/exarchos:synthesize → /exarchos:shepherd (assess → fix → resubmit → loop) → /exarchos:cleanup
▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲
This command operates as an iteration loop within the synthesize phase. The workflow phase remains synthesize throughout.
Follow the shepherd skill: @skills/shepherd/SKILL.md
gh pr create (artifacts.pr exists in state)gh CLI authenticatedBefore shepherding, check shepherd status:
shepherd.currentIteration from state — resume from last iterationshepherd.approvalRequested is true, skip to approval waitcompleted, no action neededmcp__plugin_exarchos_exarchos__exarchos_view({ action: "code_quality", workflowId: "<featureId>" })
Check for regressions and degrading gate pass rates before assessing PRs.
mcp__plugin_exarchos_exarchos__exarchos_orchestrate({
action: "assess_stack",
featureId: "<featureId>",
prNumbers: [123]
})
Act on the recommendation:
fix-and-resubmit — Proceed to Step 2request-approval — Skip to Step 4wait — Inform user, pause, re-assess after delayescalate — Report to user with escalation contextAddress each actionItem from the assessment:
ci-fix — Read CI logs, reproduce locally, fix, commitcomment-reply — Read context, compose response, post via GitHub MCPreview-address — Fix code for CHANGES_REQUESTED, reply to each threadrestack — git rebase origin/<base>, verify with gh pr listgit push --force-with-lease
gh pr merge <number> --auto --squash
Return to Step 1. Max 5 iterations — escalate if limit reached.
When all checks green and comments addressed:
gh pr edit <number> --add-reviewer <approver>mcp__plugin_exarchos_exarchos__exarchos_workflow({
action: "update",
featureId: "<featureId>",
updates: { "shepherd": { "approvalRequested": true } }
})
Initialize shepherd tracking on first run:
mcp__plugin_exarchos_exarchos__exarchos_workflow({
action: "update",
featureId: "<featureId>",
updates: {
"shepherd": {
"startedAt": "<ISO8601>",
"currentIteration": 0,
"maxIterations": 5,
"approvalRequested": false
}
}
})
Update currentIteration after each assess cycle.
When approval requested:
## Ready for Approval
All CI checks pass. All review comments addressed.
Approval requested from: <approvers>
PRs:
- #123: <url>
Run `/exarchos:cleanup` after merge completes.
/exarchos:rehydrate to restore state."/exarchos:synthesize first."After approval requested:
/exarchos:cleanupnpx claudepluginhub lvlup-sw/exarchos/pr-shepherdMonitors a pull request through to merge, automatically handling CI failures, review comments, and unresolved threads.
/polishIteratively drives a pull request to meet all 6 green conditions (CI passing, no merge conflicts, CodeRabbit approval, resolved comments, etc.) via fix-and-verify loops. Does not merge.
/peer-reviewCommits uncommitted work, creates PR if needed, and runs multi-agent peer review task hierarchy with remediation cycles and user approvals.
/shipExecutes full PR workflow from commit to production: pre-flight checks, PR creation, CI/review monitoring, merge, deployment, and validation with quality gates.
/git-workflowOrchestrates git workflow from code review and quality gates through commit, push, and PR creation to target branch. Supports flags: --skip-tests, --draft-pr, --no-push, --squash, --conventional, --trunk-based.