@rse/ase 1.0.7 → 2.0.1

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 (279) hide show
  1. package/dst/ase-agent-definition-api.d.ts +184 -0
  2. package/dst/ase-agent-definition-api.js +6 -0
  3. package/dst/ase-agent-definition-builtin/condenser.js +42 -0
  4. package/dst/ase-agent-definition-builtin/editor.js +45 -0
  5. package/dst/ase-agent-definition-builtin/estimator.js +98 -0
  6. package/dst/ase-agent-definition-builtin/implementer.js +121 -0
  7. package/dst/ase-agent-definition-builtin/integrator.js +56 -0
  8. package/dst/ase-agent-definition-builtin/qualifier.js +61 -0
  9. package/dst/ase-agent-definition-builtin/rebooter.js +41 -0
  10. package/dst/ase-agent-definition-builtin/researcher.js +77 -0
  11. package/dst/ase-agent-definition-core.js +827 -0
  12. package/dst/ase-agent-fleet.js +772 -0
  13. package/dst/ase-agent-process.js +232 -0
  14. package/dst/ase-agent-relay-client.js +509 -0
  15. package/dst/ase-agent-relay-core.js +213 -0
  16. package/dst/ase-agent-relay-server-bind.js +242 -0
  17. package/dst/ase-agent-relay-server-cli.js +50 -0
  18. package/dst/ase-agent-runtime-claim.js +189 -0
  19. package/dst/ase-agent-runtime-engine.js +1100 -0
  20. package/dst/ase-agent-runtime-exec.js +275 -0
  21. package/dst/ase-agent-runtime-phase.js +581 -0
  22. package/dst/ase-agent-runtime-request.js +272 -0
  23. package/dst/ase-agent-runtime-tool.js +207 -0
  24. package/dst/ase-agent-runtime.js +1316 -0
  25. package/dst/ase-agent.js +65 -0
  26. package/dst/ase-artifact.js +6 -5
  27. package/dst/ase-config-core.js +465 -0
  28. package/dst/ase-config-schema.js +357 -0
  29. package/dst/ase-config-scope.js +172 -0
  30. package/dst/ase-config.js +25 -585
  31. package/dst/ase-hook.js +228 -111
  32. package/dst/ase-lib-daemon-cli.js +130 -0
  33. package/dst/ase-lib-hash.js +20 -0
  34. package/dst/{ase-log.js → ase-lib-log.js} +40 -7
  35. package/dst/ase-lib-server-bind.js +115 -0
  36. package/dst/ase-lib-server-cli.js +474 -0
  37. package/dst/{ase-table.js → ase-lib-table.js} +1 -1
  38. package/dst/{ase-version.js → ase-lib-version.js} +8 -1
  39. package/dst/ase-man.js +96 -0
  40. package/dst/ase-mcp.js +166 -13
  41. package/dst/{ase-getopt.js → ase-service-getopt.js} +82 -80
  42. package/dst/{ase-markdown.js → ase-service-markdown.js} +18 -11
  43. package/dst/ase-service-otel.js +1246 -0
  44. package/dst/{ase-skills.js → ase-service-skills.js} +29 -64
  45. package/dst/ase-service-state.js +101 -0
  46. package/dst/ase-service.js +269 -81
  47. package/dst/ase-setup-common.js +141 -0
  48. package/dst/ase-setup-mcp.js +359 -0
  49. package/dst/ase-setup-settings.js +837 -0
  50. package/dst/ase-setup.js +113 -869
  51. package/dst/ase-spec.js +31 -19
  52. package/dst/ase-statusline.js +108 -43
  53. package/dst/ase-task-board-core.js +739 -0
  54. package/dst/ase-task-board-filter.js +127 -0
  55. package/dst/ase-task-board-flow.js +237 -0
  56. package/dst/ase-task-board-graph.js +497 -0
  57. package/dst/ase-task-board-stats.js +263 -0
  58. package/dst/ase-task-board-tui-control.js +775 -0
  59. package/dst/ase-task-board-tui-model.js +1008 -0
  60. package/dst/ase-task-board-tui-popup.js +626 -0
  61. package/dst/ase-task-board-tui-style.js +106 -0
  62. package/dst/ase-task-board-tui-view.js +847 -0
  63. package/dst/ase-task-board-tui.js +189 -0
  64. package/dst/ase-task-board-web-client.css +1 -0
  65. package/dst/ase-task-board-web-client.html +20 -0
  66. package/dst/ase-task-board-web-client.js +81 -0
  67. package/dst/ase-task-board-web-server.js +823 -0
  68. package/dst/ase-task-board.js +134 -0
  69. package/dst/ase-task-format.js +757 -0
  70. package/dst/ase-task-request.js +208 -0
  71. package/dst/ase-task-store-client.js +495 -0
  72. package/dst/ase-task-store-core.js +804 -0
  73. package/dst/ase-task-store-issues.js +237 -0
  74. package/dst/ase-task-store-plugin-api.js +6 -0
  75. package/dst/ase-task-store-plugin-ase.js +484 -0
  76. package/dst/ase-task-store-plugin-delegate.js +137 -0
  77. package/dst/ase-task-store-plugin-gitea.js +666 -0
  78. package/dst/ase-task-store-plugin-github.js +696 -0
  79. package/dst/ase-task-store-plugin-gitlab.js +668 -0
  80. package/dst/ase-task-store-server-bind.js +538 -0
  81. package/dst/ase-task-store-server-cli.js +154 -0
  82. package/dst/ase-task.js +1335 -357
  83. package/dst/{ase-compat.js → ase-util-compat.js} +2 -2
  84. package/dst/{ase-diagram.js → ase-util-diagram.js} +107 -32
  85. package/dst/{ase-meta.js → ase-util-meta.js} +2 -2
  86. package/dst/{ase-metric.js → ase-util-metric.js} +2 -2
  87. package/dst/{ase-mint.js → ase-util-mint.js} +19 -12
  88. package/dst/{ase-worktree.js → ase-util-worktree.js} +30 -19
  89. package/dst/ase-util.js +20 -0
  90. package/dst/ase.js +108 -32
  91. package/dst/man/ase-agent-adhoc.1 +515 -0
  92. package/dst/man/ase-agent-condenser.1 +193 -0
  93. package/dst/man/ase-agent-editor.1 +212 -0
  94. package/dst/man/ase-agent-estimator.1 +214 -0
  95. package/dst/man/ase-agent-fleet.1 +185 -0
  96. package/dst/man/ase-agent-implementer.1 +233 -0
  97. package/dst/man/ase-agent-integrator.1 +213 -0
  98. package/dst/man/ase-agent-qualifier.1 +214 -0
  99. package/dst/man/ase-agent-rebooter.1 +193 -0
  100. package/dst/man/ase-agent-relay.1 +128 -0
  101. package/dst/man/ase-agent-researcher.1 +217 -0
  102. package/dst/man/ase-agent.1 +264 -0
  103. package/dst/man/ase-artifact-list.1 +38 -0
  104. package/dst/man/ase-artifact-name.1 +39 -0
  105. package/dst/man/ase-artifact.1 +56 -0
  106. package/dst/man/ase-config-delete.1 +45 -0
  107. package/dst/man/ase-config-edit.1 +48 -0
  108. package/dst/man/ase-config-get.1 +46 -0
  109. package/dst/man/ase-config-init.1 +60 -0
  110. package/dst/man/ase-config-list.1 +42 -0
  111. package/dst/man/ase-config-set.1 +52 -0
  112. package/dst/man/ase-config.1 +231 -0
  113. package/dst/man/ase-hook-permission-request.1 +36 -0
  114. package/dst/man/ase-hook-pre-tool-use.1 +59 -0
  115. package/dst/man/ase-hook-session-end.1 +47 -0
  116. package/dst/man/ase-hook-session-persona.1 +37 -0
  117. package/dst/man/ase-hook-session-start.1 +81 -0
  118. package/dst/man/ase-hook-stop.1 +34 -0
  119. package/dst/man/ase-hook-user-prompt-submit.1 +34 -0
  120. package/dst/man/ase-hook.1 +51 -0
  121. package/dst/man/ase-man.1 +67 -0
  122. package/dst/man/ase-mcp.1 +61 -0
  123. package/dst/man/ase-service-log.1 +43 -0
  124. package/dst/man/ase-service-send.1 +47 -0
  125. package/dst/man/ase-service-start.1 +54 -0
  126. package/dst/man/ase-service-status.1 +46 -0
  127. package/dst/man/ase-service-stop.1 +37 -0
  128. package/dst/man/ase-service.1 +85 -0
  129. package/dst/man/ase-setup-disable.1 +44 -0
  130. package/dst/man/ase-setup-enable.1 +45 -0
  131. package/dst/man/ase-setup-install.1 +73 -0
  132. package/dst/man/ase-setup-mcp.1 +124 -0
  133. package/dst/man/ase-setup-status.1 +60 -0
  134. package/dst/man/ase-setup-statusline.1 +92 -0
  135. package/dst/man/ase-setup-telemetry.1 +92 -0
  136. package/dst/man/ase-setup-uninstall.1 +59 -0
  137. package/dst/man/ase-setup-update.1 +64 -0
  138. package/dst/man/ase-setup.1 +93 -0
  139. package/dst/man/ase-spec-export.1 +62 -0
  140. package/dst/man/ase-spec-lint.1 +40 -0
  141. package/dst/man/ase-spec-preview.1 +40 -0
  142. package/dst/man/ase-spec.1 +46 -0
  143. package/dst/man/ase-statusline.1 +189 -0
  144. package/dst/man/ase-task-assign.1 +71 -0
  145. package/dst/man/ase-task-board.1 +384 -0
  146. package/dst/man/ase-task-delete.1 +35 -0
  147. package/dst/man/ase-task-edit.1 +46 -0
  148. package/dst/man/ase-task-idscheme.1 +65 -0
  149. package/dst/man/ase-task-lifecycle.1 +57 -0
  150. package/dst/man/ase-task-list.1 +47 -0
  151. package/dst/man/ase-task-load.1 +36 -0
  152. package/dst/man/ase-task-newid.1 +61 -0
  153. package/dst/man/ase-task-purge.1 +37 -0
  154. package/dst/man/ase-task-rename.1 +44 -0
  155. package/dst/man/ase-task-request.1 +61 -0
  156. package/dst/man/ase-task-save.1 +48 -0
  157. package/dst/man/ase-task-status.1 +55 -0
  158. package/dst/man/ase-task-store.1 +194 -0
  159. package/dst/man/ase-task-view.1 +40 -0
  160. package/dst/man/ase-task.1 +160 -0
  161. package/dst/man/ase-util-compat.1 +25 -0
  162. package/dst/man/ase-util-diagram.1 +76 -0
  163. package/dst/man/ase-util-meta.1 +45 -0
  164. package/dst/man/ase-util-metric.1 +54 -0
  165. package/dst/man/ase-util-mint.1 +59 -0
  166. package/dst/man/ase-util-worktree.1 +72 -0
  167. package/dst/man/ase-util.1 +50 -0
  168. package/dst/man/ase.1 +124 -0
  169. package/package.json +81 -21
  170. package/plugin/.claude-plugin/plugin.json +1 -1
  171. package/plugin/.codex-plugin/plugin.json +1 -1
  172. package/plugin/.github/plugin/plugin.json +1 -1
  173. package/plugin/agents/ase-meta-diagram.md +12 -8
  174. package/plugin/agents/ase-repo-review.md +322 -0
  175. package/plugin/hooks/hooks-codex.json +5 -0
  176. package/plugin/hooks/hooks-copilot.json +5 -0
  177. package/plugin/hooks/hooks.json +8 -0
  178. package/plugin/meta/ase-common-approach.md +117 -0
  179. package/plugin/meta/ase-common-changeset.md +256 -0
  180. package/plugin/meta/ase-common-code.md +10 -173
  181. package/plugin/meta/ase-common-grill.md +317 -0
  182. package/plugin/meta/ase-common-resolve.md +305 -0
  183. package/plugin/meta/ase-common-task.md +83 -4
  184. package/plugin/meta/ase-constitution.md +0 -2
  185. package/plugin/meta/ase-format-specbook.md +208 -25
  186. package/plugin/meta/ase-format-specbook.yaml +242 -851
  187. package/plugin/meta/ase-format-task.md +669 -125
  188. package/plugin/meta/ase-persona.md +3 -4
  189. package/plugin/meta/ase-skill.md +9 -0
  190. package/plugin/mods/ase-mods.ts +409 -0
  191. package/plugin/mods/claude-code.d.ts +13417 -0
  192. package/plugin/skills/ase-arch-analyze/SKILL.md +1 -1
  193. package/plugin/skills/ase-arch-analyze/help.md +2 -2
  194. package/plugin/skills/ase-code-analyze/SKILL.md +59 -8
  195. package/plugin/skills/ase-code-analyze/help.md +29 -4
  196. package/plugin/skills/ase-code-edit/SKILL.md +107 -181
  197. package/plugin/skills/ase-code-edit/help.md +118 -31
  198. package/plugin/skills/ase-code-lint/SKILL.md +64 -13
  199. package/plugin/skills/ase-code-lint/help.md +32 -2
  200. package/plugin/skills/ase-docs-proofread/SKILL.md +4 -4
  201. package/plugin/skills/ase-docs-proofread/help.md +1 -1
  202. package/plugin/skills/ase-docs-refine/SKILL.md +4 -4
  203. package/plugin/skills/ase-docs-shorten/SKILL.md +4 -4
  204. package/plugin/skills/ase-help-intent/data.md +2164 -1087
  205. package/plugin/skills/ase-help-intent/help.md +1 -1
  206. package/plugin/skills/ase-help-skill/catalog.md +12 -9
  207. package/plugin/skills/ase-meta-brainstorm/SKILL.md +1 -1
  208. package/plugin/skills/ase-meta-config/SKILL.md +3 -4
  209. package/plugin/skills/ase-meta-config/help.md +31 -10
  210. package/plugin/skills/ase-meta-mint/SKILL.md +5 -5
  211. package/plugin/skills/ase-meta-mint/help.md +10 -5
  212. package/plugin/skills/ase-meta-why/help.md +1 -1
  213. package/plugin/skills/ase-meta-workflow/SKILL.md +7 -7
  214. package/plugin/skills/ase-meta-workflow/help.md +4 -4
  215. package/plugin/skills/ase-meta-workflow/sample.md +3 -3
  216. package/plugin/skills/ase-meta-workflow/workflow.txt +22 -18
  217. package/plugin/skills/{ase-meta-changelog → ase-repo-changelog}/SKILL.md +4 -3
  218. package/plugin/skills/{ase-meta-changelog → ase-repo-changelog}/help.md +5 -5
  219. package/plugin/skills/{ase-meta-commit → ase-repo-commit}/SKILL.md +6 -6
  220. package/plugin/skills/{ase-meta-commit → ase-repo-commit}/help.md +5 -5
  221. package/plugin/skills/{ase-meta-diff → ase-repo-diff}/SKILL.md +6 -6
  222. package/plugin/skills/{ase-meta-diff → ase-repo-diff}/help.md +8 -8
  223. package/plugin/skills/{ase-code-dissect → ase-repo-dissect}/SKILL.md +19 -19
  224. package/plugin/skills/{ase-code-dissect → ase-repo-dissect}/help.md +10 -12
  225. package/plugin/skills/ase-repo-merge/SKILL.md +346 -0
  226. package/plugin/skills/ase-repo-merge/help.md +107 -0
  227. package/plugin/skills/ase-repo-resolve/SKILL.md +158 -0
  228. package/plugin/skills/ase-repo-resolve/help.md +102 -0
  229. package/plugin/skills/ase-repo-review/SKILL.md +406 -0
  230. package/plugin/skills/ase-repo-review/help.md +181 -0
  231. package/plugin/skills/ase-spec-edit/SKILL.md +117 -183
  232. package/plugin/skills/ase-spec-edit/help.md +107 -26
  233. package/plugin/skills/ase-sync-reconcile/help.md +1 -1
  234. package/plugin/skills/ase-task-assign/SKILL.md +111 -0
  235. package/plugin/skills/ase-task-assign/help.md +119 -0
  236. package/plugin/skills/ase-task-condense/SKILL.md +21 -21
  237. package/plugin/skills/ase-task-condense/help.md +12 -10
  238. package/plugin/skills/ase-task-delete/SKILL.md +1 -1
  239. package/plugin/skills/ase-task-dissect/SKILL.md +71 -48
  240. package/plugin/skills/ase-task-dissect/help.md +10 -9
  241. package/plugin/skills/ase-task-edit/SKILL.md +379 -94
  242. package/plugin/skills/ase-task-edit/help.md +95 -22
  243. package/plugin/skills/ase-task-estimate/SKILL.md +492 -0
  244. package/plugin/skills/ase-task-estimate/help.md +158 -0
  245. package/plugin/skills/ase-task-grill/SKILL.md +246 -138
  246. package/plugin/skills/ase-task-grill/help.md +129 -26
  247. package/plugin/skills/ase-task-id/SKILL.md +8 -1
  248. package/plugin/skills/ase-task-id/help.md +6 -3
  249. package/plugin/skills/ase-task-implement/SKILL.md +535 -145
  250. package/plugin/skills/ase-task-implement/help.md +138 -47
  251. package/plugin/skills/ase-task-integrate/SKILL.md +549 -0
  252. package/plugin/skills/ase-task-integrate/help.md +187 -0
  253. package/plugin/skills/ase-task-list/SKILL.md +55 -23
  254. package/plugin/skills/ase-task-list/help.md +45 -21
  255. package/plugin/skills/ase-task-reboot/SKILL.md +84 -43
  256. package/plugin/skills/ase-task-reboot/help.md +28 -8
  257. package/plugin/skills/ase-task-rename/SKILL.md +10 -2
  258. package/plugin/skills/ase-task-research/SKILL.md +386 -0
  259. package/plugin/skills/ase-task-research/help.md +102 -0
  260. package/plugin/skills/ase-task-status/SKILL.md +137 -0
  261. package/plugin/skills/ase-task-status/help.md +80 -0
  262. package/plugin/skills/ase-task-view/SKILL.md +49 -24
  263. package/plugin/skills/ase-task-view/help.md +19 -9
  264. package/plugin/agents/ase-meta-review.md +0 -187
  265. package/plugin/skills/ase-code-craft/SKILL.md +0 -264
  266. package/plugin/skills/ase-code-craft/help.md +0 -122
  267. package/plugin/skills/ase-code-refactor/SKILL.md +0 -232
  268. package/plugin/skills/ase-code-refactor/help.md +0 -109
  269. package/plugin/skills/ase-code-resolve/SKILL.md +0 -289
  270. package/plugin/skills/ase-code-resolve/help.md +0 -116
  271. package/plugin/skills/ase-meta-review/SKILL.md +0 -210
  272. package/plugin/skills/ase-meta-review/help.md +0 -96
  273. package/plugin/skills/ase-task-preflight/SKILL.md +0 -166
  274. package/plugin/skills/ase-task-preflight/help.md +0 -82
  275. /package/dst/{ase-ignore.js → ase-lib-ignore.js} +0 -0
  276. /package/dst/{ase-stdio.js → ase-lib-stdio.js} +0 -0
  277. /package/dst/{ase-kv.js → ase-service-kv.js} +0 -0
  278. /package/dst/{ase-sleep.js → ase-service-sleep.js} +0 -0
  279. /package/dst/{ase-timestamp.js → ase-service-timestamp.js} +0 -0
@@ -0,0 +1,107 @@
1
+ ## NAME
2
+
3
+ `ase-repo-merge` - Merge a Branch
4
+
5
+ ## SYNOPSIS
6
+
7
+ `ase-repo-merge`
8
+ [`--help`|`-h`]
9
+ [`--target`|`-t` *branch*]
10
+ [`--mode`|`-m` `merge`|`rebase`|`squash`]
11
+ [`--cleanup`|`-c`]
12
+ *source-branch*
13
+
14
+ ## DESCRIPTION
15
+
16
+ The `ase-repo-merge` skill *merges* a Git *source-branch* into a target
17
+ branch and reports the result as a *merge verdict*: `MERGED`,
18
+ `CONFLICT`, or `FAILED`.
19
+
20
+ Still *uncommitted* changes in the worktree where the source branch is
21
+ checked out are first *committed* with a derived one-line commit
22
+ message of the form `<type>: <summary>`. The source branch is then
23
+ merged inside the worktree where the target branch is checked out,
24
+ which has to be free of uncommitted changes, in one of three modes: a
25
+ regular *merge* with a merge commit (`git merge --no-ff`), a *rebase*
26
+ of the source branch onto the target branch followed by a
27
+ fast-forward (`git rebase` plus `git merge --ff-only`), or a *squash*
28
+ of all source commits into one commit (`git merge --squash`).
29
+ Merge conflicts are *resolved semantically*, honoring the intents of
30
+ both sides and never losing any change, through the same procedure as
31
+ `ase-repo-resolve`. If a conflict is unresolvable, because both
32
+ intents contradict each other or no confident resolution exists, the
33
+ unresolvable conflicts are reported, the merge is *aborted*, the
34
+ target branch is left untouched, and the verdict is `CONFLICT`. Finally, the skill *checks*
35
+ that the source branch is contained in the target branch. It does
36
+ *not* build or test the merge result, so semantically resolved
37
+ conflicts still deserve a review.
38
+
39
+ On a `CONFLICT` or `FAILED` verdict, the commit of the previously
40
+ uncommitted source changes is *undone* again, so they are uncommitted
41
+ as before (but no longer partially staged).
42
+
43
+ If the source branch *equals* the target branch, only its uncommitted
44
+ changes are committed. The skill is also used by `ase agent integrator`
45
+ to drive the *Integration* phase of the `enterprise` task lifecycle
46
+ model headless. As the target branch is by default the checked-out
47
+ branch of the working copy of the project, any uncommitted change
48
+ there lets the merge of every task with its own branch fail, and hence
49
+ the task become `DEFERRED`, while for a task with an in-place change
50
+ set it is committed together with that change set. So, when running
51
+ the integrator, keep the working copy clean and do your own work in
52
+ separate worktrees.
53
+
54
+ ## OPTIONS
55
+
56
+ - `--target`|`-t` *branch*:
57
+ The target branch of the merge (default: `current`, the checked-out
58
+ branch of the working copy).
59
+
60
+ - `--mode`|`-m` `merge`|`rebase`|`squash`:
61
+ The merge mode (default: `merge`): `merge` creates a merge commit,
62
+ `rebase` rebases the source branch (rewriting its commits, in its
63
+ own worktree if it is checked out) onto the target branch and
64
+ fast-forwards the target branch, and `squash` combines all changes
65
+ of the source branch into one new commit on the target branch.
66
+ Conflicts are resolved per rebased commit under `rebase`.
67
+
68
+ - `--cleanup`|`-c`:
69
+ After a successful merge, remove the worktree of the source branch
70
+ (if any) and delete the merged source branch.
71
+
72
+ ## ARGUMENTS
73
+
74
+ - *source-branch*:
75
+ The Git branch to merge.
76
+
77
+ ## SCENARIOS
78
+
79
+ - You want a feature branch landed on the checked-out branch
80
+ - You want the uncommitted result of a worktree committed and merged
81
+ - You want merge conflicts resolved instead of hand-editing them
82
+
83
+ ## EXAMPLES
84
+
85
+ Merge the branch `feature-x` into the checked-out branch:
86
+
87
+ ```text
88
+ ❯ /ase-repo-merge feature-x
89
+ ```
90
+
91
+ Merge the branch `feature-x` into `develop` and remove it afterwards:
92
+
93
+ ```text
94
+ ❯ /ase-repo-merge --target develop --cleanup feature-x
95
+ ```
96
+
97
+ Squash the branch `feature-x` into one commit on the checked-out branch:
98
+
99
+ ```text
100
+ ❯ /ase-repo-merge --mode squash feature-x
101
+ ```
102
+
103
+ ## SEE ALSO
104
+
105
+ [`ase-task-implement`](../ase-task-implement/help.md), [`ase-repo-resolve`](../ase-repo-resolve/help.md), [`ase-repo-review`](../ase-repo-review/help.md),
106
+ [`ase-repo-commit`](../ase-repo-commit/help.md), [`ase-repo-dissect`](../ase-repo-dissect/help.md).
107
+
@@ -0,0 +1,158 @@
1
+ ---
2
+ name: ase-repo-resolve
3
+ argument-hint: "[--help|-h] [--dir|-d <dir>] [--safe|-s] [--interactive|-i] [<path> ...]"
4
+ description: >
5
+ Resolve the Git merge conflicts of a working directory -- of an
6
+ in-progress merge, rebase, cherry-pick, revert, stash apply, or of
7
+ conflict markers left by patch -- carefully and semantically, never
8
+ losing any change, escalate unresolvable hunks as-is, continue the
9
+ in-progress operation, and emit a RESOLVED, PARTIAL, NONE, or FAILED
10
+ verdict. Use when the user calls to "resolve" or "fix" merge
11
+ conflicts.
12
+ user-invocable: true
13
+ disable-model-invocation: false
14
+ effort: high
15
+ allowed-tools:
16
+ - "Bash(git *)"
17
+ - "Bash(mkdir -p *)"
18
+ - "Bash(cp -p *)"
19
+ - "Bash(rm -rf *)"
20
+ - "Read"
21
+ - "Edit"
22
+ - "Write"
23
+ ---
24
+
25
+ @${CLAUDE_SKILL_DIR}/../../meta/ase-control.md
26
+ @${CLAUDE_SKILL_DIR}/../../meta/ase-skill.md
27
+ @${CLAUDE_SKILL_DIR}/../../meta/ase-dialog.md
28
+ @${CLAUDE_SKILL_DIR}/../../meta/ase-getopt.md
29
+
30
+ <purpose name="ase-repo-resolve">
31
+ Resolve Merge Conflicts
32
+ </purpose>
33
+
34
+ <expand name="getopt"
35
+ arg1="ase-repo-resolve"
36
+ arg2="--dir|-d=. --safe|-s --interactive|-i">
37
+ $ARGUMENTS
38
+ </expand>
39
+
40
+ <objective>
41
+ *Resolve* the merge conflicts of the working directory *semantically*,
42
+ *never* losing any change, *escalate* the unresolvable hunks as-is,
43
+ *continue* the in-progress operation, and report the *resolve verdict*.
44
+ </objective>
45
+
46
+ @${CLAUDE_SKILL_DIR}/../../meta/ase-common-resolve.md
47
+
48
+ Procedure
49
+ ---------
50
+
51
+ <flow>
52
+
53
+ 1. <step id="STEP 1: Resolve Conflicts">
54
+
55
+ 1. Set <paths/> to <getopt-arguments/> with any leading and
56
+ trailing whitespace stripped. Do not output anything.
57
+
58
+ 2. Resolve the conflicts by expanding the following:
59
+
60
+ <expand name="resolve-conflicts"
61
+ arg1="ase-repo-resolve"
62
+ arg2="<getopt-option-dir/>"
63
+ arg3="<getopt-option-interactive/>"
64
+ arg4="<getopt-option-safe/>"
65
+ arg5="<paths/>"></expand>
66
+
67
+ 3. <if condition="<resolve-verdict/> is `FAILED`">
68
+ Only output the following <template/> and then immediately
69
+ *STOP* processing the entire current skill:
70
+
71
+ <template>
72
+ ⧉ **ASE**: ✪ skill: **ase-repo-resolve**, ▶ ERROR: **<getopt-option-dir/>** is no Git working directory, ▶ RESOLVE VERDICT: **FAILED**
73
+ </template>
74
+ </if>
75
+ <elseif condition="<resolve-verdict/> is `NONE`">
76
+ Only output the following <template/> and then immediately
77
+ *STOP* processing the entire current skill:
78
+
79
+ <template>
80
+ ⧉ **ASE**: ✪ skill: **ase-repo-resolve**, ⎇ operation: **<resolve-operation/>**, ▶ RESOLVE VERDICT: **NONE**
81
+ </template>
82
+ </elseif>
83
+
84
+ </step>
85
+
86
+ 2. <step id="STEP 2: Continue Operation">
87
+
88
+ 1. If <resolve-verdict/> is not `RESOLVED` or <resolve-operation/>
89
+ is `none`, skip this entire STEP 2, as either conflicts remain
90
+ or there is no operation to continue (e.g., after
91
+ `git stash apply` or `patch --merge`).
92
+
93
+ 2. Run the command
94
+ `git -C "<repo-root/>" diff --name-only --diff-filter=U`. If its
95
+ output is *not* empty (unmerged files outside of <paths/>
96
+ remain), only output the following <template/> and skip the
97
+ remaining items of this STEP 2:
98
+
99
+ <template>
100
+ ⧉ **ASE**: ✪ skill: **ase-repo-resolve**, ⎇ operation: **<resolve-operation/>**, ▶ status: **not continued -- further conflicted files remain**
101
+ </template>
102
+
103
+ 3. Continue the operation by running the command
104
+ `git -C "<repo-root/>" -c core.editor=true <resolve-operation/> --continue`,
105
+ which keeps the prepared commit message without opening an
106
+ editor.
107
+
108
+ <if condition="the command stopped again with new conflicts (only possible for a `rebase`, `cherry-pick`, or `revert` of multiple commits)">
109
+ Only output the following <template/> and then *START OVER* at
110
+ STEP 1, item 2, to resolve the conflicts of the next commit:
111
+
112
+ <template>
113
+ ⧉ **ASE**: ✪ skill: **ase-repo-resolve**, ⎇ operation: **<resolve-operation/>**, ▶ status: **continued -- next conflicts**
114
+ </template>
115
+ </if>
116
+ <elseif condition="the command failed for another reason">
117
+ Only output the following <template/>, as the resolution itself
118
+ is complete and staged:
119
+
120
+ <template>
121
+ ⧉ **ASE**: ✪ skill: **ase-repo-resolve**, ⎇ operation: **<resolve-operation/>**, ▶ WARNING: operation failed to continue
122
+ </template>
123
+ </elseif>
124
+ <else>
125
+ Only output the following <template/>:
126
+
127
+ <template>
128
+ ⧉ **ASE**: ✪ skill: **ase-repo-resolve**, ⎇ operation: **<resolve-operation/>**, ▶ status: **operation continued**
129
+ </template>
130
+ </else>
131
+
132
+ </step>
133
+
134
+ 3. <step id="STEP 3: Report Verdict">
135
+
136
+ 1. Report the escalations by expanding the following:
137
+
138
+ <expand name="resolve-report" arg1="ase-repo-resolve"></expand>
139
+
140
+ 2. Only output the following <template/>:
141
+
142
+ <template>
143
+ ⧉ **ASE**: ✪ skill: **ase-repo-resolve**, ⎇ operation: **<resolve-operation/>**, ▶ RESOLVE VERDICT: **<resolve-verdict/>**
144
+ </template>
145
+
146
+ 3. <if condition="<resolve-verdict/> is `PARTIAL`">
147
+ Give the closing hint by expanding the following (which,
148
+ depending on the configured <ase-guidance-level/>, may expand
149
+ into nothing and hence emit no output at all):
150
+
151
+ <ase-tpl-hint level="minimal">
152
+ Resolve the escalated hunks manually (or re-run with `--interactive`), stage the files via `git add`, and continue the operation.
153
+ </ase-tpl-hint>
154
+ </if>
155
+
156
+ </step>
157
+
158
+ </flow>
@@ -0,0 +1,102 @@
1
+
2
+ ## NAME
3
+
4
+ `ase-repo-resolve` - Resolve Merge Conflicts
5
+
6
+ ## SYNOPSIS
7
+
8
+ `ase-repo-resolve`
9
+ [`--help`|`-h`]
10
+ [`--dir`|`-d` *dir*]
11
+ [`--safe`|`-s`]
12
+ [`--interactive`|`-i`]
13
+ [*path* ...]
14
+
15
+ ## DESCRIPTION
16
+
17
+ The `ase-repo-resolve` skill *resolves* the Git merge conflicts of a
18
+ working directory and reports the result as a *resolve verdict*:
19
+ `RESOLVED`, `PARTIAL`, `NONE`, or `FAILED`.
20
+
21
+ It handles every *unmerged* state of the Git index -- left by an
22
+ in-progress `git merge`, `git rebase`, `git cherry-pick`, `git revert`,
23
+ or by `git stash apply` -- and additionally files carrying conflict
24
+ markers *without* an unmerged index entry, e.g., left by `patch
25
+ --merge`. Reject files (`*.rej`) of `patch` are escalated, but never
26
+ touched.
27
+
28
+ Every conflict hunk is resolved *semantically*: the intents of both
29
+ sides are determined from the commits, the base version, and the
30
+ surrounding code, and the hunk is resolved so that *both* intents are
31
+ honored. Trivial, independent, and compatible changes are combined,
32
+ while a hunk whose intents *contradict* each other, or for which no
33
+ confident resolution exists, is *kept as-is* including its conflict
34
+ markers and *escalated* to the user. Files with only some unresolvable
35
+ hunks are resolved *partially* and stay unmerged. Non-content conflicts
36
+ (binary, submodule, modify/delete, rename, delete/delete) are resolved
37
+ only if their intent is unambiguous.
38
+
39
+ The skill is very careful to *never lose* any change: every touched
40
+ file is first backed up into the `ase-resolve` directory inside the Git
41
+ directory, and every resolved hunk is checked to still reflect all
42
+ changes of both sides relative to the base; a hunk failing this check
43
+ is restored with its conflict markers and escalated. The backups are
44
+ removed on a `RESOLVED` verdict and kept otherwise.
45
+
46
+ Fully resolved unmerged files are staged. On a `RESOLVED` verdict, the
47
+ in-progress operation is *continued* (e.g., `git merge --continue`),
48
+ and, if this stops at the next conflicting commit of a rebase,
49
+ cherry-pick, or revert, those conflicts are resolved, too. The skill
50
+ does *not* build or test the result, so the resolved conflicts still
51
+ deserve a review.
52
+
53
+ The same resolution procedure is used by `ase-repo-merge` for the
54
+ conflicts of its merge.
55
+
56
+ ## OPTIONS
57
+
58
+ - `--dir`|`-d` *dir*:
59
+ The Git working directory whose conflicts are resolved (default:
60
+ `.`, the current working directory).
61
+
62
+ - `--safe`|`-s`:
63
+ Never touch non-content conflicts (binary, submodule,
64
+ modify/delete, rename, delete/delete), but always escalate them.
65
+
66
+ - `--interactive`|`-i`:
67
+ Instead of directly escalating an unresolvable hunk, show it and
68
+ let the user choose `OURS`, `THEIRS`, `BOTH`, `KEEP` (escalate), or
69
+ describe a manual resolution. Ignored when running headless.
70
+
71
+ ## ARGUMENTS
72
+
73
+ - *path* ...:
74
+ Restrict the resolution to the conflicted files equal to or below
75
+ the given paths. The in-progress operation is then continued only
76
+ if no conflicted files remain elsewhere.
77
+
78
+ ## SCENARIOS
79
+
80
+ - You ran into merge conflicts during a merge, rebase, or cherry-pick
81
+ - You applied a stash or a patch and got conflict markers
82
+ - You want conflicts resolved without risking the loss of any change
83
+
84
+ ## EXAMPLES
85
+
86
+ Resolve all conflicts of the current working directory:
87
+
88
+ ```text
89
+ ❯ /ase-repo-resolve
90
+ ```
91
+
92
+ Resolve the conflicts below `src/`, deciding unresolvable hunks
93
+ interactively:
94
+
95
+ ```text
96
+ ❯ /ase-repo-resolve --interactive src/
97
+ ```
98
+
99
+ ## SEE ALSO
100
+
101
+ [`ase-repo-merge`](../ase-repo-merge/help.md), [`ase-repo-review`](../ase-repo-review/help.md),
102
+ [`ase-repo-commit`](../ase-repo-commit/help.md), [`ase-repo-diff`](../ase-repo-diff/help.md).