@lvlup-sw/exarchos 2.7.1 → 2.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (176) hide show
  1. package/.claude-plugin/plugin.json +3 -2
  2. package/agents/fixer.md +2 -1
  3. package/agents/implementer.md +2 -1
  4. package/agents/reviewer.md +2 -1
  5. package/agents/scaffolder.md +55 -0
  6. package/commands/discover.md +6 -0
  7. package/dist/exarchos.js +314 -335
  8. package/package.json +1 -1
  9. package/skills/claude/cleanup/SKILL.md +10 -4
  10. package/skills/claude/cleanup/references/merge-verification.md +8 -9
  11. package/skills/claude/debug/references/thorough-track.md +5 -2
  12. package/skills/claude/debug/references/troubleshooting.md +1 -1
  13. package/skills/claude/delegation/SKILL.md +4 -3
  14. package/skills/claude/delegation/references/agent-teams-saga.md +1 -3
  15. package/skills/claude/delegation/references/fixer-prompt.md +0 -1
  16. package/skills/claude/delegation/references/implementer-prompt.md +0 -1
  17. package/skills/claude/delegation/references/parallel-strategy.md +6 -11
  18. package/skills/claude/delegation/references/worked-example.md +3 -3
  19. package/skills/claude/delegation/references/workflow-steps.md +0 -2
  20. package/skills/claude/delegation/references/worktree-enforcement.md +1 -1
  21. package/skills/claude/discovery/SKILL.md +95 -0
  22. package/skills/claude/dogfood/SKILL.md +8 -2
  23. package/skills/claude/dogfood/references/report-template.md +4 -4
  24. package/skills/claude/oneshot-workflow/SKILL.md +9 -3
  25. package/skills/claude/prune-workflows/SKILL.md +6 -0
  26. package/skills/claude/quality-review/references/auto-transition.md +1 -1
  27. package/skills/claude/refactor/references/overhaul-track.md +1 -1
  28. package/skills/claude/shepherd/SKILL.md +14 -5
  29. package/skills/claude/shepherd/references/assess-checklist.md +7 -7
  30. package/skills/claude/shepherd/references/fix-strategies.md +4 -4
  31. package/skills/claude/synthesis/SKILL.md +27 -8
  32. package/skills/claude/synthesis/references/github-native-stacking.md +26 -30
  33. package/skills/claude/synthesis/references/merge-ordering.md +1 -1
  34. package/skills/claude/synthesis/references/synthesis-steps.md +6 -6
  35. package/skills/claude/synthesis/references/troubleshooting.md +11 -18
  36. package/skills/codex/cleanup/SKILL.md +10 -4
  37. package/skills/codex/cleanup/references/merge-verification.md +8 -9
  38. package/skills/codex/debug/references/thorough-track.md +5 -2
  39. package/skills/codex/debug/references/troubleshooting.md +1 -1
  40. package/skills/codex/delegation/SKILL.md +4 -3
  41. package/skills/codex/delegation/references/agent-teams-saga.md +1 -3
  42. package/skills/codex/delegation/references/fixer-prompt.md +0 -1
  43. package/skills/codex/delegation/references/implementer-prompt.md +0 -1
  44. package/skills/codex/delegation/references/parallel-strategy.md +6 -11
  45. package/skills/codex/delegation/references/worked-example.md +3 -3
  46. package/skills/codex/delegation/references/workflow-steps.md +0 -2
  47. package/skills/codex/delegation/references/worktree-enforcement.md +1 -1
  48. package/skills/codex/discovery/SKILL.md +95 -0
  49. package/skills/codex/dogfood/SKILL.md +8 -2
  50. package/skills/codex/dogfood/references/report-template.md +4 -4
  51. package/skills/codex/oneshot-workflow/SKILL.md +9 -3
  52. package/skills/codex/prune-workflows/SKILL.md +6 -0
  53. package/skills/codex/quality-review/references/auto-transition.md +1 -1
  54. package/skills/codex/refactor/references/overhaul-track.md +1 -1
  55. package/skills/codex/shepherd/SKILL.md +14 -5
  56. package/skills/codex/shepherd/references/assess-checklist.md +7 -7
  57. package/skills/codex/shepherd/references/fix-strategies.md +4 -4
  58. package/skills/codex/synthesis/SKILL.md +27 -8
  59. package/skills/codex/synthesis/references/github-native-stacking.md +26 -30
  60. package/skills/codex/synthesis/references/merge-ordering.md +1 -1
  61. package/skills/codex/synthesis/references/synthesis-steps.md +6 -6
  62. package/skills/codex/synthesis/references/troubleshooting.md +11 -18
  63. package/skills/copilot/cleanup/SKILL.md +10 -4
  64. package/skills/copilot/cleanup/references/merge-verification.md +8 -9
  65. package/skills/copilot/debug/references/thorough-track.md +5 -2
  66. package/skills/copilot/debug/references/troubleshooting.md +1 -1
  67. package/skills/copilot/delegation/SKILL.md +4 -3
  68. package/skills/copilot/delegation/references/agent-teams-saga.md +1 -3
  69. package/skills/copilot/delegation/references/fixer-prompt.md +0 -1
  70. package/skills/copilot/delegation/references/implementer-prompt.md +0 -1
  71. package/skills/copilot/delegation/references/parallel-strategy.md +6 -11
  72. package/skills/copilot/delegation/references/worked-example.md +3 -3
  73. package/skills/copilot/delegation/references/workflow-steps.md +0 -2
  74. package/skills/copilot/delegation/references/worktree-enforcement.md +1 -1
  75. package/skills/copilot/discovery/SKILL.md +95 -0
  76. package/skills/copilot/dogfood/SKILL.md +8 -2
  77. package/skills/copilot/dogfood/references/report-template.md +4 -4
  78. package/skills/copilot/oneshot-workflow/SKILL.md +9 -3
  79. package/skills/copilot/prune-workflows/SKILL.md +6 -0
  80. package/skills/copilot/quality-review/references/auto-transition.md +1 -1
  81. package/skills/copilot/refactor/references/overhaul-track.md +1 -1
  82. package/skills/copilot/shepherd/SKILL.md +14 -5
  83. package/skills/copilot/shepherd/references/assess-checklist.md +7 -7
  84. package/skills/copilot/shepherd/references/fix-strategies.md +4 -4
  85. package/skills/copilot/synthesis/SKILL.md +27 -8
  86. package/skills/copilot/synthesis/references/github-native-stacking.md +26 -30
  87. package/skills/copilot/synthesis/references/merge-ordering.md +1 -1
  88. package/skills/copilot/synthesis/references/synthesis-steps.md +6 -6
  89. package/skills/copilot/synthesis/references/troubleshooting.md +11 -18
  90. package/skills/cursor/cleanup/SKILL.md +10 -4
  91. package/skills/cursor/cleanup/references/merge-verification.md +8 -9
  92. package/skills/cursor/debug/references/thorough-track.md +5 -2
  93. package/skills/cursor/debug/references/troubleshooting.md +1 -1
  94. package/skills/cursor/delegation/SKILL.md +4 -3
  95. package/skills/cursor/delegation/references/agent-teams-saga.md +1 -3
  96. package/skills/cursor/delegation/references/fixer-prompt.md +0 -1
  97. package/skills/cursor/delegation/references/implementer-prompt.md +0 -1
  98. package/skills/cursor/delegation/references/parallel-strategy.md +6 -11
  99. package/skills/cursor/delegation/references/worked-example.md +3 -3
  100. package/skills/cursor/delegation/references/workflow-steps.md +0 -2
  101. package/skills/cursor/delegation/references/worktree-enforcement.md +1 -1
  102. package/skills/cursor/discovery/SKILL.md +95 -0
  103. package/skills/cursor/dogfood/SKILL.md +8 -2
  104. package/skills/cursor/dogfood/references/report-template.md +4 -4
  105. package/skills/cursor/oneshot-workflow/SKILL.md +9 -3
  106. package/skills/cursor/prune-workflows/SKILL.md +6 -0
  107. package/skills/cursor/quality-review/references/auto-transition.md +1 -1
  108. package/skills/cursor/refactor/references/overhaul-track.md +1 -1
  109. package/skills/cursor/shepherd/SKILL.md +14 -5
  110. package/skills/cursor/shepherd/references/assess-checklist.md +7 -7
  111. package/skills/cursor/shepherd/references/fix-strategies.md +4 -4
  112. package/skills/cursor/synthesis/SKILL.md +27 -8
  113. package/skills/cursor/synthesis/references/github-native-stacking.md +26 -30
  114. package/skills/cursor/synthesis/references/merge-ordering.md +1 -1
  115. package/skills/cursor/synthesis/references/synthesis-steps.md +6 -6
  116. package/skills/cursor/synthesis/references/troubleshooting.md +11 -18
  117. package/skills/generic/cleanup/SKILL.md +10 -4
  118. package/skills/generic/cleanup/references/merge-verification.md +8 -9
  119. package/skills/generic/debug/references/thorough-track.md +5 -2
  120. package/skills/generic/debug/references/troubleshooting.md +1 -1
  121. package/skills/generic/delegation/SKILL.md +4 -3
  122. package/skills/generic/delegation/references/agent-teams-saga.md +1 -3
  123. package/skills/generic/delegation/references/fixer-prompt.md +0 -1
  124. package/skills/generic/delegation/references/implementer-prompt.md +0 -1
  125. package/skills/generic/delegation/references/parallel-strategy.md +6 -11
  126. package/skills/generic/delegation/references/worked-example.md +3 -3
  127. package/skills/generic/delegation/references/workflow-steps.md +0 -2
  128. package/skills/generic/delegation/references/worktree-enforcement.md +1 -1
  129. package/skills/generic/discovery/SKILL.md +95 -0
  130. package/skills/generic/dogfood/SKILL.md +8 -2
  131. package/skills/generic/dogfood/references/report-template.md +4 -4
  132. package/skills/generic/oneshot-workflow/SKILL.md +9 -3
  133. package/skills/generic/prune-workflows/SKILL.md +6 -0
  134. package/skills/generic/quality-review/references/auto-transition.md +1 -1
  135. package/skills/generic/refactor/references/overhaul-track.md +1 -1
  136. package/skills/generic/shepherd/SKILL.md +14 -5
  137. package/skills/generic/shepherd/references/assess-checklist.md +7 -7
  138. package/skills/generic/shepherd/references/fix-strategies.md +4 -4
  139. package/skills/generic/synthesis/SKILL.md +27 -8
  140. package/skills/generic/synthesis/references/github-native-stacking.md +26 -30
  141. package/skills/generic/synthesis/references/merge-ordering.md +1 -1
  142. package/skills/generic/synthesis/references/synthesis-steps.md +6 -6
  143. package/skills/generic/synthesis/references/troubleshooting.md +11 -18
  144. package/skills/opencode/cleanup/SKILL.md +10 -4
  145. package/skills/opencode/cleanup/references/merge-verification.md +8 -9
  146. package/skills/opencode/debug/references/thorough-track.md +5 -2
  147. package/skills/opencode/debug/references/troubleshooting.md +1 -1
  148. package/skills/opencode/delegation/SKILL.md +4 -3
  149. package/skills/opencode/delegation/references/agent-teams-saga.md +1 -3
  150. package/skills/opencode/delegation/references/fixer-prompt.md +0 -1
  151. package/skills/opencode/delegation/references/implementer-prompt.md +0 -1
  152. package/skills/opencode/delegation/references/parallel-strategy.md +6 -11
  153. package/skills/opencode/delegation/references/worked-example.md +3 -3
  154. package/skills/opencode/delegation/references/workflow-steps.md +0 -2
  155. package/skills/opencode/delegation/references/worktree-enforcement.md +1 -1
  156. package/skills/opencode/discovery/SKILL.md +95 -0
  157. package/skills/opencode/dogfood/SKILL.md +8 -2
  158. package/skills/opencode/dogfood/references/report-template.md +4 -4
  159. package/skills/opencode/oneshot-workflow/SKILL.md +9 -3
  160. package/skills/opencode/prune-workflows/SKILL.md +6 -0
  161. package/skills/opencode/quality-review/references/auto-transition.md +1 -1
  162. package/skills/opencode/refactor/references/overhaul-track.md +1 -1
  163. package/skills/opencode/shepherd/SKILL.md +14 -5
  164. package/skills/opencode/shepherd/references/assess-checklist.md +7 -7
  165. package/skills/opencode/shepherd/references/fix-strategies.md +4 -4
  166. package/skills/opencode/synthesis/SKILL.md +27 -8
  167. package/skills/opencode/synthesis/references/github-native-stacking.md +26 -30
  168. package/skills/opencode/synthesis/references/merge-ordering.md +1 -1
  169. package/skills/opencode/synthesis/references/synthesis-steps.md +6 -6
  170. package/skills/opencode/synthesis/references/troubleshooting.md +11 -18
  171. package/skills/claude/delegation/references/pr-fixes-mode.md +0 -155
  172. package/skills/codex/delegation/references/pr-fixes-mode.md +0 -155
  173. package/skills/copilot/delegation/references/pr-fixes-mode.md +0 -155
  174. package/skills/cursor/delegation/references/pr-fixes-mode.md +0 -155
  175. package/skills/generic/delegation/references/pr-fixes-mode.md +0 -155
  176. package/skills/opencode/delegation/references/pr-fixes-mode.md +0 -155
@@ -8,7 +8,7 @@ How to address common issues found during shepherd assessment.
8
8
  |-----------|----------|
9
9
  | Single file, < 20 lines changed | Fix directly in the stack branch |
10
10
  | Multiple files, contained concern | Fix directly if < 5 files |
11
- | Cross-cutting or architectural | Delegate via `/exarchos:delegate --pr-fixes [PR_URL]` |
11
+ | Cross-cutting or architectural | Route to `/exarchos:delegate --fixes` for subagent dispatch |
12
12
  | Test changes needed | Fix directly (keep TDD cycle tight) |
13
13
 
14
14
  **Default to fixing directly** — delegation adds overhead. Only delegate when the fix scope warrants it.
@@ -105,7 +105,7 @@ These events feed `selfCorrectionRate` and `avgRemediationAttempts` metrics in C
105
105
 
106
106
  If a test passes locally but fails in CI:
107
107
  1. Check if it's a known flaky test
108
- 2. Re-run CI: `gh pr checks <number> --watch` (or push an empty commit to retrigger)
108
+ 2. Re-run CI: `exarchos_orchestrate({ action: "check_ci", prId: "<number>" })` (or push an empty commit to retrigger)
109
109
  3. If consistently flaky, fix the test or mark it with a skip annotation and create a follow-up issue
110
110
 
111
111
  ## Addressing Inline Review Comments
@@ -268,7 +268,7 @@ When making fixes to stack branches:
268
268
  git push --force-with-lease
269
269
  ```
270
270
 
271
- **IMPORTANT:** After pushing, verify auto-merge is still enabled: `gh pr view <number> --json autoMergeRequest`.
271
+ **IMPORTANT:** After pushing, verify auto-merge is still enabled: `gh pr view <number> --json autoMergeRequest` (no MCP equivalent yet — use VCS CLI directly).
272
272
 
273
273
  ## Responding on PRs
274
274
 
@@ -286,4 +286,4 @@ mcp__plugin_github_github__add_issue_comment({
286
286
  body: "Addressed review feedback:\n- Fixed Sentry bug: ...\n- Replied to DI concern...\n\nAll inline review threads have replies."
287
287
  })
288
288
  ```
289
- Fallback (if MCP token lacks write scope): `gh pr comment <number> --body "..."`
289
+ Fallback (if MCP token lacks write scope): `exarchos_orchestrate({ action: "add_pr_comment", prId: "<number>", body: "..." })`
@@ -11,6 +11,12 @@ metadata:
11
11
 
12
12
  # Synthesis Skill
13
13
 
14
+ ## VCS Provider
15
+
16
+ This skill uses VCS operations through Exarchos MCP actions (`create_pr`, `merge_pr`, `list_prs`, `check_ci`, etc.).
17
+ These actions automatically detect and route to the correct VCS provider (GitHub, GitLab, Azure DevOps).
18
+ No `gh`/`glab`/`az` commands needed — the MCP server handles provider dispatch.
19
+
14
20
  ## Overview
15
21
 
16
22
  Submit stacked PRs after review phase completes. The `prepare_synthesis` composite action consolidates readiness checks, stack verification, test validation, and quality signal analysis into a single call -- eliminating the multi-script coordination that historically caused synthesis failures.
@@ -105,20 +111,33 @@ mcp__exarchos__exarchos_orchestrate({
105
111
  })
106
112
  ```
107
113
 
108
- **Do NOT call `gh pr create` until validation passes.** If validation fails, fix the body and re-validate.
114
+ **Do NOT call `create_pr` until validation passes.** If validation fails, fix the body and re-validate.
109
115
 
110
116
  ### Step 3: Submit and Merge
111
117
 
112
- Create PRs using the validated body and enable auto-merge:
113
- ```bash
114
- # For each branch in the stack (bottom-up):
115
- gh pr create --base <parent-branch> --head <branch> --title "<type>: <what>" --body-file /tmp/pr-body.md
116
- gh pr merge <number> --auto --squash
118
+ Create PRs using the validated body and enable auto-merge. For each branch in the stack (bottom-up):
119
+
120
+ ```typescript
121
+ // Create PR via VCS MCP action
122
+ exarchos_orchestrate({
123
+ action: "create_pr",
124
+ base: "<parent-branch>",
125
+ head: "<branch>",
126
+ title: "<type>: <what>",
127
+ body: "<pr-body>"
128
+ })
129
+
130
+ // Enable auto-merge
131
+ exarchos_orchestrate({
132
+ action: "merge_pr",
133
+ prId: "<number>",
134
+ strategy: "squash"
135
+ })
117
136
  ```
118
137
 
119
138
  After submission:
120
139
  1. **Apply benchmark label** -- If `verification.hasBenchmarks` is true, apply label: `gh pr edit <number> --add-label has-benchmarks`
121
- 2. **Record PR URLs** -- Capture URLs from `gh pr list --json number,url,headRefName`
140
+ 2. **Record PR URLs** -- Capture URLs via `exarchos_orchestrate({ action: "list_prs", state: "open" })`
122
141
  3. **Update state:**
123
142
 
124
143
  ```typescript
@@ -135,7 +154,7 @@ For merge ordering strategy, see `references/merge-ordering.md`.
135
154
  **Human checkpoint:** Output "Stacked PRs enqueued: [URLs]. Waiting for CI/merge queue." then **PAUSE for user input**: "Merge stack? (yes/no/feedback)"
136
155
 
137
156
  - **'yes'** -- PRs merge; transition to completed via `cleanup`
138
- - **'feedback'** -- Route to `delegate --pr-fixes [PR_URL]` to address comments, then return here
157
+ - **'feedback'** -- Route to `shepherd [PR_URL]` to address comments, then return here
139
158
  - **'no'** -- Pause workflow; resume later with `rehydrate`
140
159
 
141
160
  ### Event Emissions (REQUIRED)
@@ -8,15 +8,15 @@ PR stacking creates a chain of dependent pull requests that merge bottom-up into
8
8
 
9
9
  ## 1. PR Chain Creation
10
10
 
11
- Create PRs that chain together by setting each PR's `--base` to the previous branch:
11
+ Create PRs that chain together by setting each PR's base to the previous branch:
12
12
 
13
- ```bash
14
- # First PR in chain targets main
15
- gh pr create --base main --head feat/step-1 --title "feat: step 1" --body "..."
13
+ ```typescript
14
+ // First PR in chain targets main
15
+ exarchos_orchestrate({ action: "create_pr", base: "main", head: "feat/step-1", title: "feat: step 1", body: "..." })
16
16
 
17
- # Subsequent PRs target the previous PR's branch
18
- gh pr create --base feat/step-1 --head feat/step-2 --title "feat: step 2" --body "..."
19
- gh pr create --base feat/step-2 --head feat/step-3 --title "feat: step 3" --body "..."
17
+ // Subsequent PRs target the previous PR's branch
18
+ exarchos_orchestrate({ action: "create_pr", base: "feat/step-1", head: "feat/step-2", title: "feat: step 2", body: "..." })
19
+ exarchos_orchestrate({ action: "create_pr", base: "feat/step-2", head: "feat/step-3", title: "feat: step 3", body: "..." })
20
20
  ```
21
21
 
22
22
  The resulting chain looks like:
@@ -72,15 +72,14 @@ After rebasing a mid-stack branch, all downstream branches in the stack must als
72
72
 
73
73
  View the current PR chain and its state:
74
74
 
75
- ```bash
76
- # List all open PRs with base/head branch relationships
77
- gh pr list --json number,baseRefName,headRefName,title,state \
78
- --jq '.[] | "\(.number): \(.baseRefName) <- \(.headRefName) [\(.state)]"'
79
-
80
- # Example output:
81
- # 101: main <- feat/step-1 [OPEN]
82
- # 102: feat/step-1 <- feat/step-2 [OPEN]
83
- # 103: feat/step-2 <- feat/step-3 [OPEN]
75
+ ```typescript
76
+ // List all open PRs with base/head branch relationships
77
+ exarchos_orchestrate({ action: "list_prs", state: "open" })
78
+
79
+ // Example output shows PR numbers, base/head branches, titles, and state:
80
+ // 101: main <- feat/step-1 [OPEN]
81
+ // 102: feat/step-1 <- feat/step-2 [OPEN]
82
+ // 103: feat/step-2 <- feat/step-3 [OPEN]
84
83
  ```
85
84
 
86
85
  To validate stack integrity, use the `validate_pr_stack` action via orchestrate:
@@ -97,32 +96,29 @@ exarchos_orchestrate({
97
96
  GitHub's native merge queue ensures PRs pass CI before merging:
98
97
 
99
98
  - **Enable:** Repository Settings > Rules > Branch protection > Require merge queue
100
- - **Auto-merge:** `gh pr merge --auto --squash` enables auto-merge once checks pass
99
+ - **Auto-merge:** `exarchos_orchestrate({ action: "merge_pr", prId: "<number>", strategy: "squash" })` enables auto-merge once checks pass
101
100
  - **For stacks:** Enable auto-merge on each PR, then merge bottom-up
102
101
 
103
- ```bash
104
- # Enable auto-merge on all PRs in the stack
105
- gh pr merge 101 --auto --squash
106
- gh pr merge 102 --auto --squash
107
- gh pr merge 103 --auto --squash
108
-
109
- # Merge the first PR to start the cascade
110
- gh pr merge 101 --squash
102
+ ```typescript
103
+ // Enable auto-merge on all PRs in the stack
104
+ exarchos_orchestrate({ action: "merge_pr", prId: "101", strategy: "squash" })
105
+ exarchos_orchestrate({ action: "merge_pr", prId: "102", strategy: "squash" })
106
+ exarchos_orchestrate({ action: "merge_pr", prId: "103", strategy: "squash" })
111
107
  ```
112
108
 
113
109
  After PR 101 merges and its branch is deleted, GitHub retargets PR 102 to `main`. If auto-merge is enabled on PR 102, it merges automatically once CI passes.
114
110
 
115
- ## 7. Graphite to GitHub-Native Equivalents
111
+ ## 7. Graphite to Exarchos MCP Equivalents
116
112
 
117
- | Graphite Command | GitHub-Native Equivalent |
113
+ | Graphite Command | Exarchos MCP Equivalent |
118
114
  |---|---|
119
115
  | `gt create <branch> -m "feat: ..."` | `git checkout -b <branch> && git commit -m "feat: ..." && git push -u origin <branch>` |
120
- | `gt submit --no-interactive --publish --stack` | `gh pr create --base <base> --title "..." --body "..."` (per PR) |
121
- | `gt log` | `gh pr list --json number,baseRefName,headRefName` |
116
+ | `gt submit --no-interactive --publish --stack` | `exarchos_orchestrate({ action: "create_pr", base: "<base>", title: "...", body: "..." })` (per PR) |
117
+ | `gt log` | `exarchos_orchestrate({ action: "list_prs", state: "open" })` |
122
118
  | `gt modify -m "..."` | `git commit --amend -m "..." && git push --force-with-lease` |
123
119
  | `gt sync` | `git fetch --prune && git rebase origin/main` |
124
120
  | `gt restack` | `git rebase origin/<base-branch>` per branch in stack |
125
- | `mcp__graphite__run_gt_cmd` | `gh` CLI directly via Bash tool |
121
+ | `mcp__graphite__run_gt_cmd` | `exarchos_orchestrate` VCS actions |
126
122
 
127
123
  ## 8. Error Handling
128
124
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Overview
4
4
 
5
- GitHub-native stacked PRs merge bottom-up: the base branch merges first, then each dependent branch in sequence. This ordering is enforced by creating PRs with correct base branches and enabling auto-merge (`gh pr merge --auto --squash`).
5
+ GitHub-native stacked PRs merge bottom-up: the base branch merges first, then each dependent branch in sequence. This ordering is enforced by creating PRs with correct base branches and enabling auto-merge via `exarchos_orchestrate({ action: "merge_pr", prId: "<number>", strategy: "squash" })`.
6
6
 
7
7
  ## Stack Ordering Rules
8
8
 
@@ -74,7 +74,7 @@ The script queries GitHub's PR reviews API for each PR, filters for CodeRabbit r
74
74
  **On `passed: true`:** All PRs are APPROVED or have no CodeRabbit review -- proceed to Step 5.
75
75
  **On `passed: false`:** At least one PR has CHANGES_REQUESTED or PENDING. The output identifies which PRs need attention. Route to fix cycle:
76
76
  ```typescript
77
- Skill({ skill: "exarchos:delegate", args: "--pr-fixes [PR_URL]" })
77
+ Skill({ skill: "exarchos:shepherd", args: "[PR_URL]" })
78
78
  ```
79
79
  After fixes are applied, return to Step 4 to re-check.
80
80
 
@@ -121,13 +121,13 @@ mcp__plugin_exarchos_exarchos__exarchos_orchestrate({
121
121
 
122
122
  Create PRs for each branch in the stack (bottom-up) and enable auto-merge:
123
123
 
124
- ```bash
125
- # For each branch in the stack (bottom-up):
126
- gh pr create --base <parent-branch> --head <branch> --title "<type>: <what>" --body "<pr-body>"
127
- gh pr merge <number> --auto --squash
124
+ ```typescript
125
+ // For each branch in the stack (bottom-up):
126
+ exarchos_orchestrate({ action: "create_pr", base: "<parent-branch>", head: "<branch>", title: "<type>: <what>", body: "<pr-body>" })
127
+ exarchos_orchestrate({ action: "merge_pr", prId: "<number>", strategy: "squash" })
128
128
  ```
129
129
 
130
- After creation, use `gh pr list --json number,url,headRefName` to get the PR URLs for each stack entry.
130
+ After creation, use `exarchos_orchestrate({ action: "list_prs", state: "open" })` to get the PR URLs for each stack entry.
131
131
 
132
132
  ## Step 7: Cleanup After Merge
133
133
 
@@ -21,7 +21,7 @@ If tests fail during synthesis (they passed in review):
21
21
  ### Merge Queue Rejection
22
22
 
23
23
  If the merge queue rejects a PR:
24
- 1. Check CI status via `gh pr checks <number>` (or GitHub MCP `pull_request_read` with method `get_status` if available)
24
+ 1. Check CI status via `exarchos_orchestrate({ action: "check_ci", prId: "<number>" })`
25
25
  2. Fix failing checks
26
26
  3. Push fixes and re-enqueue
27
27
 
@@ -29,20 +29,13 @@ If the merge queue rejects a PR:
29
29
 
30
30
  If the user receives PR review comments:
31
31
 
32
- 1. Offer to address feedback:
32
+ 1. Route to the shepherd skill:
33
33
  ```typescript
34
- Skill({ skill: "exarchos:delegate", args: "--pr-fixes [PR_URL]" })
34
+ Skill({ skill: "exarchos:shepherd", args: "[PR_URL]" })
35
35
  ```
36
36
 
37
- 2. Delegate reads PR comments via gh CLI:
38
- ```bash
39
- gh pr view <number> --json reviews,comments
40
- ```
41
- > Or use GitHub MCP `pull_request_read` if available.
42
-
43
- 3. Creates fix tasks from review comments
44
- 4. After fixes, amend the commit with `git commit --amend -m "fix: <description>"` and push with `git push --force-with-lease`
45
- 5. Return to merge confirmation
37
+ 2. Shepherd reads PR comments, assesses CI, and applies fixes directly
38
+ 3. After fixes, return to merge confirmation
46
39
 
47
40
  ## Final Report Template
48
41
 
@@ -50,7 +43,7 @@ If the user receives PR review comments:
50
43
  ## Synthesis Complete
51
44
 
52
45
  ### Pull Requests
53
- [PR URLs from gh pr list]
46
+ [PR URLs from list_prs action]
54
47
 
55
48
  ### Stack Branches
56
49
  - task/001-types
@@ -88,11 +81,11 @@ If workflow state doesn't match git reality:
88
81
  3. Update state via `mcp__plugin_exarchos_exarchos__exarchos_workflow` with `action: "set"` to match git truth
89
82
 
90
83
  ## PR Creation Failed
91
- If `gh pr create` fails:
84
+ If `create_pr` fails:
92
85
  1. Check the error output for specific guidance
93
- 2. Run `gh pr list --json number,baseRefName,headRefName` to verify the branch state
86
+ 2. Run `exarchos_orchestrate({ action: "list_prs", state: "open" })` to verify the branch state
94
87
  3. If rebase conflict: run `git rebase origin/<base>` to resolve
95
- 4. If authentication issue: check GitHub token permissions
88
+ 4. If authentication issue: check VCS provider token permissions
96
89
 
97
90
  ## Stack Rebase Conflict
98
91
  If `git rebase` encounters conflicts:
@@ -104,8 +97,8 @@ If `git rebase` encounters conflicts:
104
97
 
105
98
  When Exarchos MCP tools are available:
106
99
 
107
- 1. **After stack submission:** Call `mcp__plugin_exarchos_exarchos__exarchos_event` with `action: "append"` with event type `stack.enqueued` including PR numbers from `gh pr list --json number`
108
- 2. **Monitor merge status:** Use `gh pr list --json number,state,mergedAt` to check stack/PR status
100
+ 1. **After stack submission:** Call `mcp__plugin_exarchos_exarchos__exarchos_event` with `action: "append"` with event type `stack.enqueued` including PR numbers from `exarchos_orchestrate({ action: "list_prs", state: "open" })`
101
+ 2. **Monitor merge status:** Use `exarchos_orchestrate({ action: "list_prs", state: "all" })` to check stack/PR status
109
102
  3. **On successful merge:** Call `mcp__plugin_exarchos_exarchos__exarchos_event` with `action: "append"` with event type `phase.transitioned` to mark workflow complete
110
103
 
111
104
  ## Performance Notes
@@ -11,6 +11,12 @@ metadata:
11
11
 
12
12
  # Cleanup Skill
13
13
 
14
+ ## VCS Provider
15
+
16
+ This skill uses VCS operations through Exarchos MCP actions (`list_prs`, `get_pr_comments`, etc.).
17
+ These actions automatically detect and route to the correct VCS provider (GitHub, GitLab, Azure DevOps).
18
+ No `gh`/`glab`/`az` commands needed — the MCP server handles provider dispatch.
19
+
14
20
  ## Overview
15
21
 
16
22
  Resolve merged workflows to `completed` state in a single operation. Replaces the manual multi-step process of navigating HSM guards after PR stacks merge.
@@ -52,12 +58,12 @@ mcp__exarchos__exarchos_view({ action: "pipeline" })
52
58
 
53
59
  For each PR associated with the workflow, verify it is merged.
54
60
 
55
- **Primary method** — gh CLI:
56
- ```bash
57
- gh pr view <number> --json state,mergedAt,headRefName
61
+ **Primary method** — VCS MCP action:
62
+ ```typescript
63
+ exarchos_orchestrate({ action: "list_prs", state: "merged" })
58
64
  ```
59
65
 
60
- > Or use GitHub MCP `pull_request_read` if available.
66
+ For individual PR details, use `exarchos_orchestrate({ action: "get_pr_comments", prId: "<number>" })` or the VCS provider's native API.
61
67
 
62
68
  Collect from merged PRs:
63
69
  - `prUrl`: The PR URL (or array of URLs for stacked PRs)
@@ -10,22 +10,21 @@ The cleanup action trusts the `mergeVerified` flag — it does not query GitHub
10
10
 
11
11
  ## Verification Methods
12
12
 
13
- ### gh CLI (Primary)
13
+ ### VCS MCP Action (Primary)
14
14
 
15
- ```bash
16
- gh pr view 123 --json state,mergedAt,headRefName
17
- # Check: .state == "MERGED" and .mergedAt is not null
15
+ ```typescript
16
+ // List PRs to check merge state
17
+ exarchos_orchestrate({ action: "list_prs", state: "merged" })
18
+ // Check: each PR's state is "MERGED" and mergedAt is not null
18
19
  ```
19
20
 
20
- > Or use GitHub MCP `pull_request_read` if available for structured data.
21
-
22
21
  ### For Stacked PRs
23
22
 
24
23
  When verifying a stacked PR set, check ALL PRs in the stack:
25
24
 
26
- ```bash
27
- # List PRs for the branch stack
28
- gh pr list --head "feature/*" --json number,state,headRefName
25
+ ```typescript
26
+ // List PRs for the branch stack
27
+ exarchos_orchestrate({ action: "list_prs", head: "feature/*", state: "all" })
29
28
  ```
30
29
 
31
30
  Collect from each merged PR:
@@ -121,8 +121,11 @@ git commit -m "fix: <issue summary>"
121
121
  git push -u origin <branch-name>
122
122
 
123
123
  # Create PR and enable auto-merge
124
- gh pr create --base main --title "fix: <issue summary>" --body "<pr-body>"
125
- gh pr merge <number> --auto --squash
124
+ ```
125
+
126
+ ```typescript
127
+ exarchos_orchestrate({ action: "create_pr", base: "main", head: "<branch-name>", title: "fix: <issue summary>", body: "<pr-body>" })
128
+ exarchos_orchestrate({ action: "merge_pr", prId: "<number>", strategy: "squash" })
126
129
  ```
127
130
 
128
131
  Then update the PR description:
@@ -36,7 +36,7 @@ When Exarchos MCP tools are available, emit events throughout the debug workflow
36
36
  1. **At workflow start (triage):** `mcp__plugin_exarchos_exarchos__exarchos_event` with `action: "append"` -> `workflow.started` with workflowType "debug", urgency
37
37
  2. **On track selection:** `mcp__plugin_exarchos_exarchos__exarchos_event` with `action: "append"` -> `phase.transitioned` with selected track (hotfix/thorough)
38
38
  3. **On each phase transition:** `mcp__plugin_exarchos_exarchos__exarchos_event` with `action: "append"` -> `phase.transitioned` from->to
39
- 4. **Thorough track stacking:** Handled by `/exarchos:synthesize` (PR creation via `gh pr create`)
39
+ 4. **Thorough track stacking:** Handled by `/exarchos:synthesize` (PR creation via `exarchos_orchestrate({ action: "create_pr" })`)
40
40
  5. **Hotfix track commit:** Single `git commit -m "fix: <description>"` + `git push` -- no multi-branch stacking needed
41
41
  6. **On complete:** `mcp__plugin_exarchos_exarchos__exarchos_event` with `action: "append"` -> `phase.transitioned` to "completed"
42
42
 
@@ -43,7 +43,7 @@ Rationalization patterns that violate this principle are catalogued in `referenc
43
43
 
44
44
  **Auto-detection:** tmux + `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS` present means `agent-team`. Otherwise `subagent`. Override with `delegate --mode subagent|agent-team`.
45
45
 
46
- **CRITICAL:** Always specify `model: "opus"` for coding tasks (when not using native agent definitions).
46
+ Use the `recommendedModel` from `prepare_delegation` task classifications when available. If no classification exists (e.g., fixer dispatch), omit `model` to inherit the session default.
47
47
 
48
48
  ### Pre-Dispatch Schema Discovery
49
49
 
@@ -250,7 +250,9 @@ Handles review failures instead of initial implementation. Uses `references/fixe
250
250
 
251
251
  **Arguments:** `--fixes <state-file-path>` — state JSON containing review results in `.reviews.<taskId>.specReview` or `.reviews.<taskId>.qualityReview`.
252
252
 
253
- For detailed fix-mode process, see `references/fix-mode.md`. For PR feedback workflows (`--pr-fixes`), see `references/pr-fixes-mode.md`.
253
+ For detailed fix-mode process, see `references/fix-mode.md`.
254
+
255
+ > **Deprecated:** `--pr-fixes` has been superseded by `/exarchos:shepherd`. Use the shepherd skill for PR feedback workflows.
254
256
 
255
257
  ---
256
258
 
@@ -337,7 +339,6 @@ This is NOT a human checkpoint — the workflow continues autonomously.
337
339
  | `references/testing-patterns.md` | Arrange/Act/Assert, naming, mocking conventions |
338
340
  | `references/pbt-patterns.md` | Property-based testing patterns |
339
341
  | `references/fix-mode.md` | Detailed fix-mode process |
340
- | `references/pr-fixes-mode.md` | PR feedback fix workflows |
341
342
  | `references/state-management.md` | State patterns and benchmark labeling |
342
343
  | `references/troubleshooting.md` | Common failure modes and resolutions |
343
344
  | `references/adaptive-orchestration.md` | Adaptive team composition |
@@ -103,7 +103,6 @@ exarchos_event append:
103
103
  teammateName: {name}
104
104
  worktreePath: {path}
105
105
  assignedTaskIds: [{taskIds}]
106
- model: "opus"
107
106
 
108
107
  # Execute side effect
109
108
  # Note: teammates inherit the lead's permission mode (per Claude Code docs).
@@ -112,7 +111,6 @@ Task:
112
111
  subagent_type: "general-purpose"
113
112
  team_name: {featureId}
114
113
  name: {teammateName}
115
- model: "opus"
116
114
  prompt: {spawnPrompt} # See implementer-prompt.md template
117
115
  ```
118
116
 
@@ -199,7 +197,7 @@ If a compensating action itself fails after 3 retries, mark the workflow with `_
199
197
  | **Permissions inherit from lead** | Do NOT set `mode` at spawn -- not respected. All teammates inherit the lead's permission mode. |
200
198
  | **Teammates load MCP automatically** | Exarchos MCP tools are available without explicit instruction. The spawn prompt guides WHICH tools to use, not HOW to access them. |
201
199
 
202
- **CRITICAL:** Ensure your session is using the opus model for coding tasks. All teammates inherit the session model -- use Task tool dispatch if you need per-task model selection.
200
+ **Model selection:** Teammates inherit the session model. Model is configured via `.exarchos.yml` and resolved by `prepare_delegation`. Use Task tool dispatch if you need per-task model override.
203
201
 
204
202
  ## Event Payload Conventions
205
203
 
@@ -109,7 +109,6 @@ When done, report:
109
109
  ```typescript
110
110
  Task({
111
111
  subagent_type: "general-purpose",
112
- model: "opus",
113
112
  description: "Fix: SQL injection vulnerability",
114
113
  prompt: `
115
114
  # Fix Task: SQL Injection in User Query
@@ -280,7 +280,6 @@ When done, report:
280
280
  ```typescript
281
281
  Task({
282
282
  subagent_type: "general-purpose",
283
- model: "opus",
284
283
  description: "Implement user validation",
285
284
  prompt: `
286
285
  # Task: Implement User Email Validation
@@ -21,8 +21,8 @@ Group B (depends on Group A):
21
21
 
22
22
  ```typescript
23
23
  // CORRECT: Single message, parallel execution
24
- Task({ model: "opus", description: "Task 001", prompt: "..." })
25
- Task({ model: "opus", description: "Task 002", prompt: "..." })
24
+ Task({ description: "Task 001", prompt: "..." })
25
+ Task({ description: "Task 002", prompt: "..." })
26
26
 
27
27
  // WRONG: Separate messages = sequential
28
28
  ```
@@ -59,7 +59,7 @@ Agent Teams supports one team per session. If you need more parallel groups than
59
59
  | Parallel dispatch | Multiple `Task()` in one message | Named teammates in agent team |
60
60
  | Waiting | `TaskOutput({ block: true })` | `TeammateIdle` hook (fires when teammate idle) |
61
61
  | Visibility | None (background) | tmux split panes |
62
- | Model control | `model: "opus"` per task | Session model for all |
62
+ | Model control | `recommendedModel` from config | Session model for all |
63
63
  | Max parallelism | Unlimited | One team, N teammates |
64
64
  | Resume on crash | Task results preserved | Teammates lost (worktrees survive) |
65
65
 
@@ -73,14 +73,9 @@ TaskOutput({ task_id: "task-002-id" })
73
73
 
74
74
  ## Model Selection Guide
75
75
 
76
- | Task Type | Model | Reason |
77
- |-----------|-------|--------|
78
- | Code implementation | `opus` | Best quality for coding |
79
- | Code review | `opus` | Thorough analysis |
80
- | File search/exploration | (default) | Speed over quality |
81
- | Simple queries | `haiku` | Fast, low cost |
76
+ Model selection is config-driven via `.exarchos.yml`. The `prepare_delegation` action returns a `recommendedModel` in each task classification based on the config cascade: per-agent override, then default-model, then fallback. Override per-task via the Task tool's `model` parameter when needed.
82
77
 
83
- **Note:** When using Agent Teams, all teammates inherit the session's model. Use Task tool dispatch if you need per-task model selection (e.g., `haiku` for simple queries, `opus` for implementation).
78
+ **Note:** When using Agent Teams, all teammates inherit the session's model. Model is resolved from `.exarchos.yml` config via `prepare_delegation`. Use Task tool dispatch if you need per-task model override.
84
79
 
85
80
  ## Agent Teams Dispatch Pattern
86
81
 
@@ -106,7 +101,7 @@ Each teammate receives the full implementer prompt including TDD requirements, f
106
101
  | Cross-task deps | Orchestrator manages phases | Shared task list + unblocked task detection |
107
102
  | Monitoring | `TaskOutput` polling | tmux panes + `TeammateIdle` hook |
108
103
  | State updates | Orchestrator updates state | Hook auto-updates via state bridge |
109
- | Model per task | Yes (`model: "opus"` per Task) | No (session model for all) |
104
+ | Model per task | Yes (`recommendedModel` per Task) | No (session model for all) |
110
105
  | Quality gates | Manual via `post_delegation_check` action | Automatic via `TeammateIdle` hook |
111
106
  | Recovery | Task results preserved | Worktrees survive, teammates lost |
112
107
 
@@ -41,13 +41,13 @@ Build two self-contained prompts from `implementer-prompt.md` and dispatch in a
41
41
 
42
42
  ```typescript
43
43
  Task({
44
- subagent_type: "general-purpose", model: "opus", run_in_background: true,
44
+ subagent_type: "general-purpose", run_in_background: true,
45
45
  description: "Implement task-001: Email format validator",
46
46
  prompt: `# Task: Email Format Validator\n\n## Working Directory\n/project/.worktrees/task-001\n\n[Full implementer prompt with TDD, file paths, acceptance criteria...]`
47
47
  })
48
48
 
49
49
  Task({
50
- subagent_type: "general-purpose", model: "opus", run_in_background: true,
50
+ subagent_type: "general-purpose", run_in_background: true,
51
51
  description: "Implement task-002: Domain MX check",
52
52
  prompt: `# Task: Domain MX Check\n\n## Working Directory\n/project/.worktrees/task-002\n\n[Full implementer prompt with TDD, file paths, acceptance criteria...]`
53
53
  })
@@ -86,7 +86,7 @@ Re-dispatch with fixer prompt in the same worktree:
86
86
 
87
87
  ```typescript
88
88
  Task({
89
- subagent_type: "general-purpose", model: "opus",
89
+ subagent_type: "general-purpose",
90
90
  description: "Fix task-002: DNS mock missing",
91
91
  prompt: `# Fix Task: DNS Mock Missing\n\n## Adversarial Verification Posture\nIndependently verify the failure...\n\n## Working Directory\n/project/.worktrees/task-002\n\n## Issue to Fix\n**File:** src/validators/domain.test.ts\n**Problem:** Missing vi.mock('dns') — test makes real network calls\n**Fix:** Add vi.mock('dns') with MX record stub\n\n## Verification\nRun: npm run test:run\nAll tests must pass without network access.`
92
92
  })
@@ -40,7 +40,6 @@ TodoWrite({
40
40
  // Launch multiple in single message for parallel execution
41
41
  Task({
42
42
  subagent_type: "general-purpose",
43
- model: "opus",
44
43
  run_in_background: true,
45
44
  description: "Implement task 001",
46
45
  prompt: "[Full implementer prompt]"
@@ -48,7 +47,6 @@ Task({
48
47
 
49
48
  Task({
50
49
  subagent_type: "general-purpose",
51
- model: "opus",
52
50
  run_in_background: true,
53
51
  description: "Implement task 002",
54
52
  prompt: "[Full implementer prompt]"
@@ -64,7 +64,7 @@ When using native isolation:
64
64
  | Don't | Do Instead |
65
65
  |-------|------------|
66
66
  | Make subagents read plan files | Provide full task text in prompt |
67
- | Use default model for coding | Specify `model: "opus"` |
67
+ | Use default model for coding | Use configured model from `prepare_delegation` |
68
68
  | Send sequential Task calls | Batch parallel tasks in one message |
69
69
  | Skip worktree for parallel work | Create isolated worktrees |
70
70
  | Forget to track in TodoWrite | Update status for every task |