@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.
- package/dst/ase-agent-definition-api.d.ts +184 -0
- package/dst/ase-agent-definition-api.js +6 -0
- package/dst/ase-agent-definition-builtin/condenser.js +42 -0
- package/dst/ase-agent-definition-builtin/editor.js +45 -0
- package/dst/ase-agent-definition-builtin/estimator.js +98 -0
- package/dst/ase-agent-definition-builtin/implementer.js +121 -0
- package/dst/ase-agent-definition-builtin/integrator.js +56 -0
- package/dst/ase-agent-definition-builtin/qualifier.js +61 -0
- package/dst/ase-agent-definition-builtin/rebooter.js +41 -0
- package/dst/ase-agent-definition-builtin/researcher.js +77 -0
- package/dst/ase-agent-definition-core.js +827 -0
- package/dst/ase-agent-fleet.js +772 -0
- package/dst/ase-agent-process.js +232 -0
- package/dst/ase-agent-relay-client.js +509 -0
- package/dst/ase-agent-relay-core.js +213 -0
- package/dst/ase-agent-relay-server-bind.js +242 -0
- package/dst/ase-agent-relay-server-cli.js +50 -0
- package/dst/ase-agent-runtime-claim.js +189 -0
- package/dst/ase-agent-runtime-engine.js +1100 -0
- package/dst/ase-agent-runtime-exec.js +275 -0
- package/dst/ase-agent-runtime-phase.js +581 -0
- package/dst/ase-agent-runtime-request.js +272 -0
- package/dst/ase-agent-runtime-tool.js +207 -0
- package/dst/ase-agent-runtime.js +1316 -0
- package/dst/ase-agent.js +65 -0
- package/dst/ase-artifact.js +6 -5
- package/dst/ase-config-core.js +465 -0
- package/dst/ase-config-schema.js +357 -0
- package/dst/ase-config-scope.js +172 -0
- package/dst/ase-config.js +25 -585
- package/dst/ase-hook.js +228 -111
- package/dst/ase-lib-daemon-cli.js +130 -0
- package/dst/ase-lib-hash.js +20 -0
- package/dst/{ase-log.js → ase-lib-log.js} +40 -7
- package/dst/ase-lib-server-bind.js +115 -0
- package/dst/ase-lib-server-cli.js +474 -0
- package/dst/{ase-table.js → ase-lib-table.js} +1 -1
- package/dst/{ase-version.js → ase-lib-version.js} +8 -1
- package/dst/ase-man.js +96 -0
- package/dst/ase-mcp.js +166 -13
- package/dst/{ase-getopt.js → ase-service-getopt.js} +82 -80
- package/dst/{ase-markdown.js → ase-service-markdown.js} +18 -11
- package/dst/ase-service-otel.js +1246 -0
- package/dst/{ase-skills.js → ase-service-skills.js} +29 -64
- package/dst/ase-service-state.js +101 -0
- package/dst/ase-service.js +269 -81
- package/dst/ase-setup-common.js +141 -0
- package/dst/ase-setup-mcp.js +359 -0
- package/dst/ase-setup-settings.js +837 -0
- package/dst/ase-setup.js +113 -869
- package/dst/ase-spec.js +31 -19
- package/dst/ase-statusline.js +108 -43
- package/dst/ase-task-board-core.js +739 -0
- package/dst/ase-task-board-filter.js +127 -0
- package/dst/ase-task-board-flow.js +237 -0
- package/dst/ase-task-board-graph.js +497 -0
- package/dst/ase-task-board-stats.js +263 -0
- package/dst/ase-task-board-tui-control.js +775 -0
- package/dst/ase-task-board-tui-model.js +1008 -0
- package/dst/ase-task-board-tui-popup.js +626 -0
- package/dst/ase-task-board-tui-style.js +106 -0
- package/dst/ase-task-board-tui-view.js +847 -0
- package/dst/ase-task-board-tui.js +189 -0
- package/dst/ase-task-board-web-client.css +1 -0
- package/dst/ase-task-board-web-client.html +20 -0
- package/dst/ase-task-board-web-client.js +81 -0
- package/dst/ase-task-board-web-server.js +823 -0
- package/dst/ase-task-board.js +134 -0
- package/dst/ase-task-format.js +757 -0
- package/dst/ase-task-request.js +208 -0
- package/dst/ase-task-store-client.js +495 -0
- package/dst/ase-task-store-core.js +804 -0
- package/dst/ase-task-store-issues.js +237 -0
- package/dst/ase-task-store-plugin-api.js +6 -0
- package/dst/ase-task-store-plugin-ase.js +484 -0
- package/dst/ase-task-store-plugin-delegate.js +137 -0
- package/dst/ase-task-store-plugin-gitea.js +666 -0
- package/dst/ase-task-store-plugin-github.js +696 -0
- package/dst/ase-task-store-plugin-gitlab.js +668 -0
- package/dst/ase-task-store-server-bind.js +538 -0
- package/dst/ase-task-store-server-cli.js +154 -0
- package/dst/ase-task.js +1335 -357
- package/dst/{ase-compat.js → ase-util-compat.js} +2 -2
- package/dst/{ase-diagram.js → ase-util-diagram.js} +107 -32
- package/dst/{ase-meta.js → ase-util-meta.js} +2 -2
- package/dst/{ase-metric.js → ase-util-metric.js} +2 -2
- package/dst/{ase-mint.js → ase-util-mint.js} +19 -12
- package/dst/{ase-worktree.js → ase-util-worktree.js} +30 -19
- package/dst/ase-util.js +20 -0
- package/dst/ase.js +108 -32
- package/dst/man/ase-agent-adhoc.1 +515 -0
- package/dst/man/ase-agent-condenser.1 +193 -0
- package/dst/man/ase-agent-editor.1 +212 -0
- package/dst/man/ase-agent-estimator.1 +214 -0
- package/dst/man/ase-agent-fleet.1 +185 -0
- package/dst/man/ase-agent-implementer.1 +233 -0
- package/dst/man/ase-agent-integrator.1 +213 -0
- package/dst/man/ase-agent-qualifier.1 +214 -0
- package/dst/man/ase-agent-rebooter.1 +193 -0
- package/dst/man/ase-agent-relay.1 +128 -0
- package/dst/man/ase-agent-researcher.1 +217 -0
- package/dst/man/ase-agent.1 +264 -0
- package/dst/man/ase-artifact-list.1 +38 -0
- package/dst/man/ase-artifact-name.1 +39 -0
- package/dst/man/ase-artifact.1 +56 -0
- package/dst/man/ase-config-delete.1 +45 -0
- package/dst/man/ase-config-edit.1 +48 -0
- package/dst/man/ase-config-get.1 +46 -0
- package/dst/man/ase-config-init.1 +60 -0
- package/dst/man/ase-config-list.1 +42 -0
- package/dst/man/ase-config-set.1 +52 -0
- package/dst/man/ase-config.1 +231 -0
- package/dst/man/ase-hook-permission-request.1 +36 -0
- package/dst/man/ase-hook-pre-tool-use.1 +59 -0
- package/dst/man/ase-hook-session-end.1 +47 -0
- package/dst/man/ase-hook-session-persona.1 +37 -0
- package/dst/man/ase-hook-session-start.1 +81 -0
- package/dst/man/ase-hook-stop.1 +34 -0
- package/dst/man/ase-hook-user-prompt-submit.1 +34 -0
- package/dst/man/ase-hook.1 +51 -0
- package/dst/man/ase-man.1 +67 -0
- package/dst/man/ase-mcp.1 +61 -0
- package/dst/man/ase-service-log.1 +43 -0
- package/dst/man/ase-service-send.1 +47 -0
- package/dst/man/ase-service-start.1 +54 -0
- package/dst/man/ase-service-status.1 +46 -0
- package/dst/man/ase-service-stop.1 +37 -0
- package/dst/man/ase-service.1 +85 -0
- package/dst/man/ase-setup-disable.1 +44 -0
- package/dst/man/ase-setup-enable.1 +45 -0
- package/dst/man/ase-setup-install.1 +73 -0
- package/dst/man/ase-setup-mcp.1 +124 -0
- package/dst/man/ase-setup-status.1 +60 -0
- package/dst/man/ase-setup-statusline.1 +92 -0
- package/dst/man/ase-setup-telemetry.1 +92 -0
- package/dst/man/ase-setup-uninstall.1 +59 -0
- package/dst/man/ase-setup-update.1 +64 -0
- package/dst/man/ase-setup.1 +93 -0
- package/dst/man/ase-spec-export.1 +62 -0
- package/dst/man/ase-spec-lint.1 +40 -0
- package/dst/man/ase-spec-preview.1 +40 -0
- package/dst/man/ase-spec.1 +46 -0
- package/dst/man/ase-statusline.1 +189 -0
- package/dst/man/ase-task-assign.1 +71 -0
- package/dst/man/ase-task-board.1 +384 -0
- package/dst/man/ase-task-delete.1 +35 -0
- package/dst/man/ase-task-edit.1 +46 -0
- package/dst/man/ase-task-idscheme.1 +65 -0
- package/dst/man/ase-task-lifecycle.1 +57 -0
- package/dst/man/ase-task-list.1 +47 -0
- package/dst/man/ase-task-load.1 +36 -0
- package/dst/man/ase-task-newid.1 +61 -0
- package/dst/man/ase-task-purge.1 +37 -0
- package/dst/man/ase-task-rename.1 +44 -0
- package/dst/man/ase-task-request.1 +61 -0
- package/dst/man/ase-task-save.1 +48 -0
- package/dst/man/ase-task-status.1 +55 -0
- package/dst/man/ase-task-store.1 +194 -0
- package/dst/man/ase-task-view.1 +40 -0
- package/dst/man/ase-task.1 +160 -0
- package/dst/man/ase-util-compat.1 +25 -0
- package/dst/man/ase-util-diagram.1 +76 -0
- package/dst/man/ase-util-meta.1 +45 -0
- package/dst/man/ase-util-metric.1 +54 -0
- package/dst/man/ase-util-mint.1 +59 -0
- package/dst/man/ase-util-worktree.1 +72 -0
- package/dst/man/ase-util.1 +50 -0
- package/dst/man/ase.1 +124 -0
- package/package.json +81 -21
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/.codex-plugin/plugin.json +1 -1
- package/plugin/.github/plugin/plugin.json +1 -1
- package/plugin/agents/ase-meta-diagram.md +12 -8
- package/plugin/agents/ase-repo-review.md +322 -0
- package/plugin/hooks/hooks-codex.json +5 -0
- package/plugin/hooks/hooks-copilot.json +5 -0
- package/plugin/hooks/hooks.json +8 -0
- package/plugin/meta/ase-common-approach.md +117 -0
- package/plugin/meta/ase-common-changeset.md +256 -0
- package/plugin/meta/ase-common-code.md +10 -173
- package/plugin/meta/ase-common-grill.md +317 -0
- package/plugin/meta/ase-common-resolve.md +305 -0
- package/plugin/meta/ase-common-task.md +83 -4
- package/plugin/meta/ase-constitution.md +0 -2
- package/plugin/meta/ase-format-specbook.md +208 -25
- package/plugin/meta/ase-format-specbook.yaml +242 -851
- package/plugin/meta/ase-format-task.md +669 -125
- package/plugin/meta/ase-persona.md +3 -4
- package/plugin/meta/ase-skill.md +9 -0
- package/plugin/mods/ase-mods.ts +409 -0
- package/plugin/mods/claude-code.d.ts +13417 -0
- package/plugin/skills/ase-arch-analyze/SKILL.md +1 -1
- package/plugin/skills/ase-arch-analyze/help.md +2 -2
- package/plugin/skills/ase-code-analyze/SKILL.md +59 -8
- package/plugin/skills/ase-code-analyze/help.md +29 -4
- package/plugin/skills/ase-code-edit/SKILL.md +107 -181
- package/plugin/skills/ase-code-edit/help.md +118 -31
- package/plugin/skills/ase-code-lint/SKILL.md +64 -13
- package/plugin/skills/ase-code-lint/help.md +32 -2
- package/plugin/skills/ase-docs-proofread/SKILL.md +4 -4
- package/plugin/skills/ase-docs-proofread/help.md +1 -1
- package/plugin/skills/ase-docs-refine/SKILL.md +4 -4
- package/plugin/skills/ase-docs-shorten/SKILL.md +4 -4
- package/plugin/skills/ase-help-intent/data.md +2164 -1087
- package/plugin/skills/ase-help-intent/help.md +1 -1
- package/plugin/skills/ase-help-skill/catalog.md +12 -9
- package/plugin/skills/ase-meta-brainstorm/SKILL.md +1 -1
- package/plugin/skills/ase-meta-config/SKILL.md +3 -4
- package/plugin/skills/ase-meta-config/help.md +31 -10
- package/plugin/skills/ase-meta-mint/SKILL.md +5 -5
- package/plugin/skills/ase-meta-mint/help.md +10 -5
- package/plugin/skills/ase-meta-why/help.md +1 -1
- package/plugin/skills/ase-meta-workflow/SKILL.md +7 -7
- package/plugin/skills/ase-meta-workflow/help.md +4 -4
- package/plugin/skills/ase-meta-workflow/sample.md +3 -3
- package/plugin/skills/ase-meta-workflow/workflow.txt +22 -18
- package/plugin/skills/{ase-meta-changelog → ase-repo-changelog}/SKILL.md +4 -3
- package/plugin/skills/{ase-meta-changelog → ase-repo-changelog}/help.md +5 -5
- package/plugin/skills/{ase-meta-commit → ase-repo-commit}/SKILL.md +6 -6
- package/plugin/skills/{ase-meta-commit → ase-repo-commit}/help.md +5 -5
- package/plugin/skills/{ase-meta-diff → ase-repo-diff}/SKILL.md +6 -6
- package/plugin/skills/{ase-meta-diff → ase-repo-diff}/help.md +8 -8
- package/plugin/skills/{ase-code-dissect → ase-repo-dissect}/SKILL.md +19 -19
- package/plugin/skills/{ase-code-dissect → ase-repo-dissect}/help.md +10 -12
- package/plugin/skills/ase-repo-merge/SKILL.md +346 -0
- package/plugin/skills/ase-repo-merge/help.md +107 -0
- package/plugin/skills/ase-repo-resolve/SKILL.md +158 -0
- package/plugin/skills/ase-repo-resolve/help.md +102 -0
- package/plugin/skills/ase-repo-review/SKILL.md +406 -0
- package/plugin/skills/ase-repo-review/help.md +181 -0
- package/plugin/skills/ase-spec-edit/SKILL.md +117 -183
- package/plugin/skills/ase-spec-edit/help.md +107 -26
- package/plugin/skills/ase-sync-reconcile/help.md +1 -1
- package/plugin/skills/ase-task-assign/SKILL.md +111 -0
- package/plugin/skills/ase-task-assign/help.md +119 -0
- package/plugin/skills/ase-task-condense/SKILL.md +21 -21
- package/plugin/skills/ase-task-condense/help.md +12 -10
- package/plugin/skills/ase-task-delete/SKILL.md +1 -1
- package/plugin/skills/ase-task-dissect/SKILL.md +71 -48
- package/plugin/skills/ase-task-dissect/help.md +10 -9
- package/plugin/skills/ase-task-edit/SKILL.md +379 -94
- package/plugin/skills/ase-task-edit/help.md +95 -22
- package/plugin/skills/ase-task-estimate/SKILL.md +492 -0
- package/plugin/skills/ase-task-estimate/help.md +158 -0
- package/plugin/skills/ase-task-grill/SKILL.md +246 -138
- package/plugin/skills/ase-task-grill/help.md +129 -26
- package/plugin/skills/ase-task-id/SKILL.md +8 -1
- package/plugin/skills/ase-task-id/help.md +6 -3
- package/plugin/skills/ase-task-implement/SKILL.md +535 -145
- package/plugin/skills/ase-task-implement/help.md +138 -47
- package/plugin/skills/ase-task-integrate/SKILL.md +549 -0
- package/plugin/skills/ase-task-integrate/help.md +187 -0
- package/plugin/skills/ase-task-list/SKILL.md +55 -23
- package/plugin/skills/ase-task-list/help.md +45 -21
- package/plugin/skills/ase-task-reboot/SKILL.md +84 -43
- package/plugin/skills/ase-task-reboot/help.md +28 -8
- package/plugin/skills/ase-task-rename/SKILL.md +10 -2
- package/plugin/skills/ase-task-research/SKILL.md +386 -0
- package/plugin/skills/ase-task-research/help.md +102 -0
- package/plugin/skills/ase-task-status/SKILL.md +137 -0
- package/plugin/skills/ase-task-status/help.md +80 -0
- package/plugin/skills/ase-task-view/SKILL.md +49 -24
- package/plugin/skills/ase-task-view/help.md +19 -9
- package/plugin/agents/ase-meta-review.md +0 -187
- package/plugin/skills/ase-code-craft/SKILL.md +0 -264
- package/plugin/skills/ase-code-craft/help.md +0 -122
- package/plugin/skills/ase-code-refactor/SKILL.md +0 -232
- package/plugin/skills/ase-code-refactor/help.md +0 -109
- package/plugin/skills/ase-code-resolve/SKILL.md +0 -289
- package/plugin/skills/ase-code-resolve/help.md +0 -116
- package/plugin/skills/ase-meta-review/SKILL.md +0 -210
- package/plugin/skills/ase-meta-review/help.md +0 -96
- package/plugin/skills/ase-task-preflight/SKILL.md +0 -166
- package/plugin/skills/ase-task-preflight/help.md +0 -82
- /package/dst/{ase-ignore.js → ase-lib-ignore.js} +0 -0
- /package/dst/{ase-stdio.js → ase-lib-stdio.js} +0 -0
- /package/dst/{ase-kv.js → ase-service-kv.js} +0 -0
- /package/dst/{ase-sleep.js → ase-service-sleep.js} +0 -0
- /package/dst/{ase-timestamp.js → ase-service-timestamp.js} +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
|
|
2
2
|
## NAME
|
|
3
3
|
|
|
4
|
-
`ase-
|
|
4
|
+
`ase-repo-diff` - Summarize Diff
|
|
5
5
|
|
|
6
6
|
## SYNOPSIS
|
|
7
7
|
|
|
8
|
-
`ase-
|
|
8
|
+
`ase-repo-diff`
|
|
9
9
|
[`--help`|`-h`]
|
|
10
10
|
[`--coherence`|`-c`]
|
|
11
11
|
[`--risk`|`-r`]
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
## DESCRIPTION
|
|
15
15
|
|
|
16
|
-
The `ase-
|
|
16
|
+
The `ase-repo-diff` skill turns a raw Git diff into a *concise*,
|
|
17
17
|
*human-readable* narrative of what changed and why, *grouped by
|
|
18
18
|
intent* (such as *Feature*, *Improvement*, *Bugfix*, *Update*,
|
|
19
19
|
*Cleanup*, or *Refactor*) rather than by file. It inspects the
|
|
@@ -85,27 +85,27 @@ giving a visual sense of *what a diff endangers* before a deeper review.
|
|
|
85
85
|
Summarize the currently staged changes:
|
|
86
86
|
|
|
87
87
|
```text
|
|
88
|
-
❯ /ase-
|
|
88
|
+
❯ /ase-repo-diff
|
|
89
89
|
```
|
|
90
90
|
|
|
91
91
|
Summarize the staged changes and append an intent-coherence report:
|
|
92
92
|
|
|
93
93
|
```text
|
|
94
|
-
❯ /ase-
|
|
94
|
+
❯ /ase-repo-diff --coherence
|
|
95
95
|
```
|
|
96
96
|
|
|
97
97
|
Summarize the staged changes and append a graded risk report:
|
|
98
98
|
|
|
99
99
|
```text
|
|
100
|
-
❯ /ase-
|
|
100
|
+
❯ /ase-repo-diff --risk
|
|
101
101
|
```
|
|
102
102
|
|
|
103
103
|
Summarize the staged changes and append a blast-radius map:
|
|
104
104
|
|
|
105
105
|
```text
|
|
106
|
-
❯ /ase-
|
|
106
|
+
❯ /ase-repo-diff --blast
|
|
107
107
|
```
|
|
108
108
|
|
|
109
109
|
## SEE ALSO
|
|
110
110
|
|
|
111
|
-
[`ase-
|
|
111
|
+
[`ase-repo-commit`](../ase-repo-commit/help.md), [`ase-repo-changelog`](../ase-repo-changelog/help.md), [`ase-arch-analyze`](../ase-arch-analyze/help.md).
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: ase-
|
|
2
|
+
name: ase-repo-dissect
|
|
3
3
|
argument-hint: "[--help|-h] [--max-parts|-m <count>] [--staged|-s] [--dry|-d] [--force|-f] [<dissect-hint>]"
|
|
4
4
|
description: >
|
|
5
5
|
Dissect the current Git change set, treated as an epic, domain-wise
|
|
@@ -22,12 +22,12 @@ allowed-tools:
|
|
|
22
22
|
@${CLAUDE_SKILL_DIR}/../../meta/ase-skill.md
|
|
23
23
|
@${CLAUDE_SKILL_DIR}/../../meta/ase-getopt.md
|
|
24
24
|
|
|
25
|
-
<purpose name="ase-
|
|
25
|
+
<purpose name="ase-repo-dissect">
|
|
26
26
|
Dissect a Change Set
|
|
27
27
|
</purpose>
|
|
28
28
|
|
|
29
29
|
<expand name="getopt"
|
|
30
|
-
arg1="ase-
|
|
30
|
+
arg1="ase-repo-dissect"
|
|
31
31
|
arg2="--max-parts|-m=8 --staged|-s --dry|-d --force|-f">
|
|
32
32
|
$ARGUMENTS
|
|
33
33
|
</expand>
|
|
@@ -58,7 +58,7 @@ Procedure
|
|
|
58
58
|
Only output the following <template/>:
|
|
59
59
|
|
|
60
60
|
<template>
|
|
61
|
-
⧉ **ASE**: ✪ skill: **ase-
|
|
61
|
+
⧉ **ASE**: ✪ skill: **ase-repo-dissect**, ⇌ hint: **<dissect-hint/>**
|
|
62
62
|
</template>
|
|
63
63
|
</if>
|
|
64
64
|
<else>
|
|
@@ -115,7 +115,7 @@ Procedure
|
|
|
115
115
|
the following <template/>, then continue with the next file:
|
|
116
116
|
|
|
117
117
|
<template>
|
|
118
|
-
⧉ **ASE**: ✪ skill: **ase-
|
|
118
|
+
⧉ **ASE**: ✪ skill: **ase-repo-dissect**, ⊘ untracked: `<file/>`, ▶ status: **not foldable into the change set**
|
|
119
119
|
</template>
|
|
120
120
|
</if>
|
|
121
121
|
<else>
|
|
@@ -128,7 +128,7 @@ Procedure
|
|
|
128
128
|
Only output the following <template/> and then *STOP* immediately:
|
|
129
129
|
|
|
130
130
|
<template>
|
|
131
|
-
⧉ **ASE**: ✪ skill: **ase-
|
|
131
|
+
⧉ **ASE**: ✪ skill: **ase-repo-dissect**, ▶ status: **no changes to dissect**
|
|
132
132
|
</template>
|
|
133
133
|
</if>
|
|
134
134
|
|
|
@@ -140,7 +140,7 @@ Procedure
|
|
|
140
140
|
|
|
141
141
|
<expand
|
|
142
142
|
name="dissect-derive"
|
|
143
|
-
arg1="ase-
|
|
143
|
+
arg1="ase-repo-dissect"
|
|
144
144
|
arg2="<dissect-hint/>"
|
|
145
145
|
arg3="<ase-project-id/>"
|
|
146
146
|
>
|
|
@@ -186,7 +186,7 @@ Procedure
|
|
|
186
186
|
*all* existing worktrees and branches untouched:
|
|
187
187
|
|
|
188
188
|
<template>
|
|
189
|
-
⧉ **ASE**: ✪ skill: **ase-
|
|
189
|
+
⧉ **ASE**: ✪ skill: **ase-repo-dissect**, ▶ ERROR: unsafe worktree directory -- cannot create worktrees
|
|
190
190
|
</template>
|
|
191
191
|
</if>
|
|
192
192
|
|
|
@@ -209,8 +209,8 @@ Procedure
|
|
|
209
209
|
*all* existing worktrees and branches untouched:
|
|
210
210
|
|
|
211
211
|
<template>
|
|
212
|
-
⧉ **ASE**: ✪ skill: **ase-
|
|
213
|
-
⧉ **ASE**: ✪ skill: **ase-
|
|
212
|
+
⧉ **ASE**: ✪ skill: **ase-repo-dissect**, ⊘ collisions: <collisions/>
|
|
213
|
+
⧉ **ASE**: ✪ skill: **ase-repo-dissect**, ✪ dissection: **<n/>** parts, ▶ status: **targets exist**
|
|
214
214
|
</template>
|
|
215
215
|
|
|
216
216
|
Directly *after* this <template/>, and *before* stopping, give
|
|
@@ -219,7 +219,7 @@ Procedure
|
|
|
219
219
|
and hence emit no output at all):
|
|
220
220
|
|
|
221
221
|
<ase-tpl-hint level="minimal">
|
|
222
|
-
Re-run `/ase-
|
|
222
|
+
Re-run `/ase-repo-dissect --force` to remove and re-create the colliding worktrees and branches.
|
|
223
223
|
</ase-tpl-hint>
|
|
224
224
|
</if>
|
|
225
225
|
|
|
@@ -284,7 +284,7 @@ Procedure
|
|
|
284
284
|
remaining ones:
|
|
285
285
|
|
|
286
286
|
<template>
|
|
287
|
-
⧉ **ASE**: ✪ skill: **ase-
|
|
287
|
+
⧉ **ASE**: ✪ skill: **ase-repo-dissect**, ◉ part: **<part-id/>**, ▶ status: **worktree failed to create**
|
|
288
288
|
</template>
|
|
289
289
|
</if>
|
|
290
290
|
|
|
@@ -299,7 +299,7 @@ Procedure
|
|
|
299
299
|
remaining ones:
|
|
300
300
|
|
|
301
301
|
<template>
|
|
302
|
-
⧉ **ASE**: ✪ skill: **ase-
|
|
302
|
+
⧉ **ASE**: ✪ skill: **ase-repo-dissect**, ◉ part: **<part-id/>**, ▶ status: **patch failed to apply**
|
|
303
303
|
</template>
|
|
304
304
|
</if>
|
|
305
305
|
|
|
@@ -336,7 +336,7 @@ Procedure
|
|
|
336
336
|
7. Only output the following <template/>:
|
|
337
337
|
|
|
338
338
|
<template>
|
|
339
|
-
⧉ **ASE**: ✪ skill: **ase-
|
|
339
|
+
⧉ **ASE**: ✪ skill: **ase-repo-dissect**, ◉ part: **<part-id/>**, ▶ status: **worktree created**
|
|
340
340
|
</template>
|
|
341
341
|
|
|
342
342
|
3. *Clean up* the temporary patch files by running the
|
|
@@ -362,14 +362,14 @@ Procedure
|
|
|
362
362
|
Only output the following <template/>:
|
|
363
363
|
|
|
364
364
|
<template>
|
|
365
|
-
⧉ **ASE**: ✪ skill: **ase-
|
|
365
|
+
⧉ **ASE**: ✪ skill: **ase-repo-dissect**, ✪ dissection: **<n/>** parts, ▶ status: **dry-run -- no worktrees created**
|
|
366
366
|
</template>
|
|
367
367
|
</if>
|
|
368
368
|
<else>
|
|
369
369
|
Only output the following <template/>:
|
|
370
370
|
|
|
371
371
|
<template>
|
|
372
|
-
⧉ **ASE**: ✪ skill: **ase-
|
|
372
|
+
⧉ **ASE**: ✪ skill: **ase-repo-dissect**, ✪ dissection: **<n/>** parts, ▶ status: **change set dissected**
|
|
373
373
|
</template>
|
|
374
374
|
</else>
|
|
375
375
|
|
|
@@ -384,16 +384,16 @@ Procedure
|
|
|
384
384
|
</if>
|
|
385
385
|
<else>
|
|
386
386
|
<ase-tpl-hint level="minimal">
|
|
387
|
-
Re-run `/ase-
|
|
387
|
+
Re-run `/ase-repo-dissect` without `--dry` to actually create the reported worktrees, optionally with a `<dissect-hint>` argument if the reported split is not the intended one.
|
|
388
388
|
</ase-tpl-hint>
|
|
389
389
|
</else>
|
|
390
390
|
|
|
391
391
|
<ase-tpl-hint level="normal">
|
|
392
|
-
Use `/ase-
|
|
392
|
+
Use `/ase-repo-diff` and `/ase-repo-review` inside a part's worktree to summarize and review it before committing.
|
|
393
393
|
</ase-tpl-hint>
|
|
394
394
|
|
|
395
395
|
<ase-tpl-hint level="verbose">
|
|
396
|
-
Use `/ase-
|
|
396
|
+
Use `/ase-repo-dissect --staged` to dissect the staged changes only, `--max-parts <count>` to bound the number of parts, `--force` to re-create already existing worktrees, and a `<dissect-hint>` argument to steer the split.
|
|
397
397
|
</ase-tpl-hint>
|
|
398
398
|
|
|
399
399
|
</step>
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
|
|
2
2
|
## NAME
|
|
3
3
|
|
|
4
|
-
`ase-
|
|
4
|
+
`ase-repo-dissect` - Dissect a Change Set
|
|
5
5
|
|
|
6
6
|
## SYNOPSIS
|
|
7
7
|
|
|
8
|
-
`ase-
|
|
8
|
+
`ase-repo-dissect`
|
|
9
9
|
[`--help`|`-h`]
|
|
10
10
|
[`--max-parts`|`-m` *count*]
|
|
11
11
|
[`--staged`|`-s`]
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
## DESCRIPTION
|
|
17
17
|
|
|
18
|
-
The `ase-
|
|
18
|
+
The `ase-repo-dissect` skill treats the current Git change set as an
|
|
19
19
|
*epic* and *dissects* it domain-wise and logically into *cohesive
|
|
20
20
|
parts*. Each part is a self-contained unit of change with a single
|
|
21
21
|
coherent purpose, so it can be reviewed and committed *atomically* and
|
|
@@ -70,9 +70,7 @@ cleanly and are then reported as failed; stage everything and use
|
|
|
70
70
|
|
|
71
71
|
- `--dry`|`-d`:
|
|
72
72
|
*Report only* -- print the dissection table but create *no*
|
|
73
|
-
artifacts at all, so the decision stays fully reversible.
|
|
74
|
-
this meaning differs from `--dry`/`-d` in `ase-code-craft`, where it
|
|
75
|
-
instead omits the `## VERIFICATION` section of the composed plan.
|
|
73
|
+
artifacts at all, so the decision stays fully reversible.
|
|
76
74
|
|
|
77
75
|
- `--force`|`-f`:
|
|
78
76
|
Remove and re-create already existing worktrees and branches of the
|
|
@@ -101,28 +99,28 @@ from the *current* project id and the per-part feature slug.
|
|
|
101
99
|
Dissect the current working copy changes:
|
|
102
100
|
|
|
103
101
|
```text
|
|
104
|
-
❯ /ase-
|
|
102
|
+
❯ /ase-repo-dissect
|
|
105
103
|
```
|
|
106
104
|
|
|
107
105
|
Preview the dissection of the staged changes into at most four parts:
|
|
108
106
|
|
|
109
107
|
```text
|
|
110
|
-
❯ /ase-
|
|
108
|
+
❯ /ase-repo-dissect --staged --dry --max-parts 4
|
|
111
109
|
```
|
|
112
110
|
|
|
113
111
|
Re-dissect the changes, re-creating the previously created worktrees:
|
|
114
112
|
|
|
115
113
|
```text
|
|
116
|
-
❯ /ase-
|
|
114
|
+
❯ /ase-repo-dissect --force
|
|
117
115
|
```
|
|
118
116
|
|
|
119
117
|
Dissect the changes along an explicitly given axis:
|
|
120
118
|
|
|
121
119
|
```text
|
|
122
|
-
❯ /ase-
|
|
120
|
+
❯ /ase-repo-dissect keep the plugin and tool changes in separate parts
|
|
123
121
|
```
|
|
124
122
|
|
|
125
123
|
## SEE ALSO
|
|
126
124
|
|
|
127
|
-
[`ase-task-dissect`](../ase-task-dissect/help.md), [`ase-
|
|
128
|
-
[`ase-
|
|
125
|
+
[`ase-task-dissect`](../ase-task-dissect/help.md), [`ase-repo-diff`](../ase-repo-diff/help.md), [`ase-repo-review`](../ase-repo-review/help.md),
|
|
126
|
+
[`ase-repo-changelog`](../ase-repo-changelog/help.md), [`ase-repo-commit`](../ase-repo-commit/help.md).
|
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ase-repo-merge
|
|
3
|
+
argument-hint: "[--help|-h] [--target|-t <target-branch>] [--mode|-m merge|rebase|squash] [--cleanup|-c] <source-branch>"
|
|
4
|
+
description: >
|
|
5
|
+
Merge a Git source branch, including its still uncommitted changes,
|
|
6
|
+
into a target branch through a regular merge, a rebase with
|
|
7
|
+
fast-forward, or a squash merge, resolving merge conflicts semantically, check
|
|
8
|
+
that the source branch landed, and emit a MERGED, CONFLICT, or FAILED
|
|
9
|
+
verdict. Use when the user calls to "merge", "integrate", or "land" a
|
|
10
|
+
branch.
|
|
11
|
+
user-invocable: true
|
|
12
|
+
disable-model-invocation: false
|
|
13
|
+
effort: high
|
|
14
|
+
allowed-tools:
|
|
15
|
+
- "Bash(git *)"
|
|
16
|
+
- "Bash(mkdir -p *)"
|
|
17
|
+
- "Bash(cp -p *)"
|
|
18
|
+
- "Bash(rm -rf *)"
|
|
19
|
+
- "Read"
|
|
20
|
+
- "Edit"
|
|
21
|
+
- "Write"
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
@${CLAUDE_SKILL_DIR}/../../meta/ase-control.md
|
|
25
|
+
@${CLAUDE_SKILL_DIR}/../../meta/ase-skill.md
|
|
26
|
+
@${CLAUDE_SKILL_DIR}/../../meta/ase-getopt.md
|
|
27
|
+
|
|
28
|
+
<purpose name="ase-repo-merge">
|
|
29
|
+
Merge a Branch
|
|
30
|
+
</purpose>
|
|
31
|
+
|
|
32
|
+
<expand name="getopt"
|
|
33
|
+
arg1="ase-repo-merge"
|
|
34
|
+
arg2="--target|-t=current --mode|-m=(merge|rebase|squash) --cleanup|-c">
|
|
35
|
+
$ARGUMENTS
|
|
36
|
+
</expand>
|
|
37
|
+
|
|
38
|
+
<objective>
|
|
39
|
+
*Merge* the source branch, including its still *uncommitted* changes,
|
|
40
|
+
into the target branch, *resolve* all merge conflicts *semantically*,
|
|
41
|
+
*check* that the source branch landed, and report the *merge verdict*.
|
|
42
|
+
</objective>
|
|
43
|
+
|
|
44
|
+
@${CLAUDE_SKILL_DIR}/../../meta/ase-common-resolve.md
|
|
45
|
+
|
|
46
|
+
<define name="source-rollback">
|
|
47
|
+
If <source-commit/> is not empty and <merged/> is not equal `true`,
|
|
48
|
+
undo the commit of the pending source changes of STEP 2, so they are
|
|
49
|
+
uncommitted again: run the command `git -C "<source-dir/>" rev-parse HEAD`
|
|
50
|
+
and, only if its output equals <source-commit/>, run the command
|
|
51
|
+
`git -C "<source-dir/>" reset --quiet --mixed "<source-commit/>~1"`.
|
|
52
|
+
</define>
|
|
53
|
+
|
|
54
|
+
<define name="merge-fail">
|
|
55
|
+
First expand the following:
|
|
56
|
+
|
|
57
|
+
<expand name="source-rollback"></expand>
|
|
58
|
+
|
|
59
|
+
Then only output the following <template/> and then immediately *STOP*
|
|
60
|
+
processing the entire current skill:
|
|
61
|
+
|
|
62
|
+
<template>
|
|
63
|
+
⧉ **ASE**: ✪ skill: **ase-repo-merge**, ▶ ERROR: <arg1/>, ▶ MERGE VERDICT: **FAILED**
|
|
64
|
+
</template>
|
|
65
|
+
</define>
|
|
66
|
+
|
|
67
|
+
<flow>
|
|
68
|
+
|
|
69
|
+
1. <step id="STEP 1: Determine Branches">
|
|
70
|
+
|
|
71
|
+
1. Set <source-commit/> to empty, <merged/> to `false`, and
|
|
72
|
+
<squashed/> to `false`.
|
|
73
|
+
|
|
74
|
+
2. Set <source/> to <getopt-arguments/> with any leading and
|
|
75
|
+
trailing whitespace stripped. If <source/> is empty or contains
|
|
76
|
+
whitespace, expand the following:
|
|
77
|
+
|
|
78
|
+
<expand name="merge-fail" arg1="exactly one source branch required"></expand>
|
|
79
|
+
|
|
80
|
+
3. Determine the *checked-out branch* by running the command
|
|
81
|
+
`git branch --show-current` (taken exactly as given) and
|
|
82
|
+
capturing its output into <current-branch/>. If
|
|
83
|
+
<getopt-option-target/> is `current`, set
|
|
84
|
+
<target><current-branch/></target>, otherwise set
|
|
85
|
+
<target><getopt-option-target/></target>. If <target/> is empty
|
|
86
|
+
(detached `HEAD`), expand the following:
|
|
87
|
+
|
|
88
|
+
<expand name="merge-fail" arg1="no target branch determinable"></expand>
|
|
89
|
+
|
|
90
|
+
4. For each of the branches <source/> and <target/>, run the command
|
|
91
|
+
`git rev-parse --verify --quiet "refs/heads/<branch/>"` (with
|
|
92
|
+
<branch/> substituted). If it fails for a branch, expand the
|
|
93
|
+
following:
|
|
94
|
+
|
|
95
|
+
<expand name="merge-fail" arg1="branch **<branch/>** does not exist"></expand>
|
|
96
|
+
|
|
97
|
+
5. Determine the *worktrees* by running the command
|
|
98
|
+
`git worktree list --porcelain` (taken exactly as given). Set
|
|
99
|
+
<source-dir/> to the `worktree` path of the entry whose `branch`
|
|
100
|
+
line is `refs/heads/<source/>` (or to empty if there is none),
|
|
101
|
+
and set <target-dir/> to the `worktree` path of the entry whose
|
|
102
|
+
`branch` line is `refs/heads/<target/>` (or to empty if there is
|
|
103
|
+
none). Do not output anything.
|
|
104
|
+
|
|
105
|
+
</step>
|
|
106
|
+
|
|
107
|
+
2. <step id="STEP 2: Commit Pending Source Changes">
|
|
108
|
+
|
|
109
|
+
1. If <source-dir/> is empty, skip this entire STEP 2, as a branch
|
|
110
|
+
not checked out anywhere carries no uncommitted changes.
|
|
111
|
+
|
|
112
|
+
2. Run the command `git -C "<source-dir/>" status --porcelain`. If
|
|
113
|
+
its output is empty, skip the remaining items of this STEP 2.
|
|
114
|
+
|
|
115
|
+
3. Stage all changes by running the command
|
|
116
|
+
`git -C "<source-dir/>" add --all`, inspect them by running the
|
|
117
|
+
command `git -C "<source-dir/>" diff --cached`, and craft a
|
|
118
|
+
commit <message/> in the format `<type/>: <summary/>`, where
|
|
119
|
+
<type/> is one of `FEATURE`, `IMPROVEMENT`, `BUGFIX`, `UPDATE`,
|
|
120
|
+
`CLEANUP`, or `REFACTOR` and <summary/> is a 60-80 character,
|
|
121
|
+
imperative-mood summary without a trailing period, without
|
|
122
|
+
Markdown formatting, and without any double-quote (`"`),
|
|
123
|
+
backtick (`` ` ``), dollar (`$`), or backslash (`\`) characters.
|
|
124
|
+
|
|
125
|
+
4. Commit the changes by running the command
|
|
126
|
+
`git -C "<source-dir/>" commit -m "<message/>"`. If it fails,
|
|
127
|
+
unstage the changes again by running the command
|
|
128
|
+
`git -C "<source-dir/>" reset --quiet` and expand the following:
|
|
129
|
+
|
|
130
|
+
<expand name="merge-fail" arg1="pending changes of branch **<source/>** failed to commit"></expand>
|
|
131
|
+
|
|
132
|
+
5. Capture the output of the command
|
|
133
|
+
`git -C "<source-dir/>" rev-parse HEAD` into <source-commit/>.
|
|
134
|
+
If <source/> equals <target/>, set <merged/> to `true`, as the
|
|
135
|
+
committed changes already landed on the target branch.
|
|
136
|
+
|
|
137
|
+
6. Only output the following <template/>:
|
|
138
|
+
|
|
139
|
+
<template>
|
|
140
|
+
⧉ **ASE**: ✪ skill: **ase-repo-merge**, ⎇ branch: **<source/>**, ▶ status: **pending changes committed**
|
|
141
|
+
</template>
|
|
142
|
+
|
|
143
|
+
</step>
|
|
144
|
+
|
|
145
|
+
3. <step id="STEP 3: Merge Source into Target">
|
|
146
|
+
|
|
147
|
+
1. If <source/> equals <target/>, skip this entire STEP 3, as the
|
|
148
|
+
committed changes already landed on the target branch.
|
|
149
|
+
|
|
150
|
+
2. If <target-dir/> is empty, expand the following:
|
|
151
|
+
|
|
152
|
+
<expand name="merge-fail" arg1="target branch **<target/>** is not checked out in any worktree"></expand>
|
|
153
|
+
|
|
154
|
+
3. Run the command `git -C "<target-dir/>" status --porcelain`. If
|
|
155
|
+
its output is *not* empty, expand the following, leaving the
|
|
156
|
+
uncommitted changes of the target *untouched*:
|
|
157
|
+
|
|
158
|
+
<expand name="merge-fail" arg1="target branch **<target/>** has uncommitted changes"></expand>
|
|
159
|
+
|
|
160
|
+
4. Capture the output of the command
|
|
161
|
+
`git -C "<target-dir/>" rev-parse HEAD` into <target-commit/>,
|
|
162
|
+
the target branch *before* the merge. Then set <op-dir/>, the
|
|
163
|
+
worktree in which the operation runs, and <abort-cmd/>, the
|
|
164
|
+
command which undoes the in-progress operation, according to
|
|
165
|
+
<getopt-option-mode/>:
|
|
166
|
+
|
|
167
|
+
- `merge`: set <op-dir><target-dir/></op-dir> and
|
|
168
|
+
<abort-cmd>git -C "<target-dir/>" merge --abort</abort-cmd>.
|
|
169
|
+
|
|
170
|
+
- `squash`: set <op-dir><target-dir/></op-dir> and
|
|
171
|
+
<abort-cmd>git -C "<target-dir/>" reset --hard --quiet HEAD</abort-cmd>,
|
|
172
|
+
as a squash merge records no `MERGE_HEAD` and hence cannot
|
|
173
|
+
be aborted via `git merge --abort` (the reset is safe, as
|
|
174
|
+
the target worktree was free of uncommitted changes before).
|
|
175
|
+
|
|
176
|
+
- `rebase`: the source branch has to be *checked out* for
|
|
177
|
+
being rebased. If <source-dir/> is not empty, set
|
|
178
|
+
<op-dir><source-dir/></op-dir>, and, if the command
|
|
179
|
+
`git -C "<source-dir/>" status --porcelain` reports any
|
|
180
|
+
output, expand the following:
|
|
181
|
+
|
|
182
|
+
<expand name="merge-fail" arg1="source branch **<source/>** has uncommitted changes"></expand>
|
|
183
|
+
|
|
184
|
+
Otherwise, set <op-dir><target-dir/></op-dir>, where the
|
|
185
|
+
rebase temporarily checks out the source branch. In both
|
|
186
|
+
cases set <abort-cmd>git -C "<op-dir/>" rebase --abort</abort-cmd>,
|
|
187
|
+
which also restores the original checkout of <op-dir/>.
|
|
188
|
+
|
|
189
|
+
5. Start the operation according to <getopt-option-mode/> by
|
|
190
|
+
running the command:
|
|
191
|
+
|
|
192
|
+
- `merge`: `git -C "<target-dir/>" merge --no-ff --no-edit "<source/>"`
|
|
193
|
+
- `squash`: `git -C "<target-dir/>" merge --squash "<source/>"`
|
|
194
|
+
- `rebase`: `git -C "<op-dir/>" rebase "<target/>" "<source/>"`
|
|
195
|
+
|
|
196
|
+
If it succeeds, continue with item 9 below.
|
|
197
|
+
|
|
198
|
+
6. Determine the *conflicted files* by running the command
|
|
199
|
+
`git -C "<op-dir/>" diff --name-only --diff-filter=U`. If there
|
|
200
|
+
are none, the operation failed for another reason: run the
|
|
201
|
+
command <abort-cmd/> and expand the following:
|
|
202
|
+
|
|
203
|
+
<expand name="merge-fail" arg1="<getopt-option-mode/> of **<source/>** into **<target/>** failed"></expand>
|
|
204
|
+
|
|
205
|
+
7. Resolve the conflicts semantically, never losing any change, by
|
|
206
|
+
expanding the following:
|
|
207
|
+
|
|
208
|
+
<expand name="resolve-conflicts"
|
|
209
|
+
arg1="ase-repo-merge"
|
|
210
|
+
arg2="<op-dir/>"
|
|
211
|
+
arg3="false"
|
|
212
|
+
arg4="false"
|
|
213
|
+
arg5=""></expand>
|
|
214
|
+
|
|
215
|
+
<if condition="<resolve-verdict/> is not `RESOLVED`">
|
|
216
|
+
Run the command <abort-cmd/>, so the target and source branches
|
|
217
|
+
are left exactly as before, and, if <resolve-backup-dir/> is not
|
|
218
|
+
empty, remove the now obsolete backups by running the command
|
|
219
|
+
`rm -rf "<resolve-backup-dir/>"` and set
|
|
220
|
+
<resolve-backup-dir></resolve-backup-dir> (empty). Then report
|
|
221
|
+
the escalations by expanding the following:
|
|
222
|
+
|
|
223
|
+
<expand name="resolve-report" arg1="ase-repo-merge"></expand>
|
|
224
|
+
|
|
225
|
+
Then expand the following:
|
|
226
|
+
|
|
227
|
+
<expand name="source-rollback"></expand>
|
|
228
|
+
|
|
229
|
+
Finally, only output the following <template/> and then immediately
|
|
230
|
+
*STOP* processing the entire current skill:
|
|
231
|
+
|
|
232
|
+
<template>
|
|
233
|
+
⧉ **ASE**: ✪ skill: **ase-repo-merge**, ⎇ source: **<source/>**, ⎇ target: **<target/>**, ▶ MERGE VERDICT: **CONFLICT**
|
|
234
|
+
</template>
|
|
235
|
+
</if>
|
|
236
|
+
|
|
237
|
+
8. Conclude the conflict resolution according to
|
|
238
|
+
<getopt-option-mode/> by running the command:
|
|
239
|
+
|
|
240
|
+
- `merge`: `git -C "<target-dir/>" commit --no-edit`
|
|
241
|
+
- `squash`: skip this item, as item 9 below commits.
|
|
242
|
+
- `rebase`: `git -C "<op-dir/>" -c core.editor=true rebase --continue`
|
|
243
|
+
|
|
244
|
+
If the `rebase --continue` stopped again with new conflicts of
|
|
245
|
+
a further source commit, *START OVER* at item 7 above. If the
|
|
246
|
+
command failed for another reason, run the command <abort-cmd/>
|
|
247
|
+
and expand the following:
|
|
248
|
+
|
|
249
|
+
<expand name="merge-fail" arg1="<getopt-option-mode/> of **<source/>** into **<target/>** failed to conclude"></expand>
|
|
250
|
+
|
|
251
|
+
Otherwise, only output the following <template/>:
|
|
252
|
+
|
|
253
|
+
<template>
|
|
254
|
+
⧉ **ASE**: ✪ skill: **ase-repo-merge**, ⎇ source: **<source/>**, ⎇ target: **<target/>**, ▶ status: **merge conflicts resolved**
|
|
255
|
+
</template>
|
|
256
|
+
|
|
257
|
+
9. Land the operation according to <getopt-option-mode/>:
|
|
258
|
+
|
|
259
|
+
- `merge`: nothing to do, as the merge commit already exists.
|
|
260
|
+
|
|
261
|
+
- `squash`: if the command `git -C "<target-dir/>" diff --cached --quiet`
|
|
262
|
+
succeeds, nothing was staged, as the changes of the source
|
|
263
|
+
branch already are contained in the target branch, so
|
|
264
|
+
nothing is to be committed. Otherwise, commit the squashed
|
|
265
|
+
changes with the prepared message, listing all squashed
|
|
266
|
+
commits, by running the command
|
|
267
|
+
`git -C "<target-dir/>" commit --no-edit`. If it fails, run
|
|
268
|
+
the command <abort-cmd/> and expand the following:
|
|
269
|
+
|
|
270
|
+
<expand name="merge-fail" arg1="squash of **<source/>** into **<target/>** failed to commit"></expand>
|
|
271
|
+
|
|
272
|
+
Otherwise, set <squashed/> to `true`.
|
|
273
|
+
|
|
274
|
+
- `rebase`: if <op-dir/> equals <target-dir/>, switch it back
|
|
275
|
+
to the target branch by running the command
|
|
276
|
+
`git -C "<target-dir/>" switch "<target/>"`. Then
|
|
277
|
+
fast-forward the target branch onto the rebased source
|
|
278
|
+
branch by running the command
|
|
279
|
+
`git -C "<target-dir/>" merge --ff-only "<source/>"`. If a
|
|
280
|
+
command fails, expand the following, as the source branch
|
|
281
|
+
is already rebased, but the target branch is unchanged:
|
|
282
|
+
|
|
283
|
+
<expand name="merge-fail" arg1="fast-forward of **<target/>** to rebased **<source/>** failed"></expand>
|
|
284
|
+
|
|
285
|
+
Set <merged/> to `true`.
|
|
286
|
+
|
|
287
|
+
</step>
|
|
288
|
+
|
|
289
|
+
4. <step id="STEP 4: Check Merge">
|
|
290
|
+
|
|
291
|
+
1. If <source/> equals <target/>, skip this entire STEP 4.
|
|
292
|
+
|
|
293
|
+
2. <if condition="<getopt-option-mode/> is `squash`">
|
|
294
|
+
A squash merge does not record the source branch as an
|
|
295
|
+
ancestor, so check that the squash commit landed instead: if
|
|
296
|
+
<squashed/> is `true`, run the command
|
|
297
|
+
`git -C "<target-dir/>" rev-parse "<target/>~1"`, and if its
|
|
298
|
+
output does not equal <target-commit/> (the squash commit is
|
|
299
|
+
not the direct successor of the previous target), expand the
|
|
300
|
+
following:
|
|
301
|
+
|
|
302
|
+
<expand name="merge-fail" arg1="changes of branch **<source/>** not contained in branch **<target/>** after squash"></expand>
|
|
303
|
+
</if>
|
|
304
|
+
<else>
|
|
305
|
+
Run the command `git merge-base --is-ancestor "<source/>" "<target/>"`.
|
|
306
|
+
If it fails, the source branch did not land on the target
|
|
307
|
+
branch, so expand the following:
|
|
308
|
+
|
|
309
|
+
<expand name="merge-fail" arg1="branch **<source/>** not contained in branch **<target/>** after <getopt-option-mode/>"></expand>
|
|
310
|
+
</else>
|
|
311
|
+
|
|
312
|
+
</step>
|
|
313
|
+
|
|
314
|
+
5. <step id="STEP 5: Clean Up Source" condition="<getopt-option-cleanup/> is equal `true` and <source/> is not equal <target/>">
|
|
315
|
+
|
|
316
|
+
1. If <source-dir/> is not empty and differs from <target-dir/>,
|
|
317
|
+
remove the worktree of the source branch by running the command
|
|
318
|
+
`git worktree remove "<source-dir/>"`.
|
|
319
|
+
|
|
320
|
+
2. Delete the merged source branch by running the command
|
|
321
|
+
`git -C "<target-dir/>" branch -d "<source/>"`, or, for
|
|
322
|
+
<getopt-option-mode/> `squash`, whose source branch Git never
|
|
323
|
+
considers merged, by running the command
|
|
324
|
+
`git -C "<target-dir/>" branch -D "<source/>"`.
|
|
325
|
+
|
|
326
|
+
3. If a command fails, only output the following <template/> and
|
|
327
|
+
continue, as the merge itself succeeded:
|
|
328
|
+
|
|
329
|
+
<template>
|
|
330
|
+
⧉ **ASE**: ✪ skill: **ase-repo-merge**, ⎇ branch: **<source/>**, ▶ WARNING: cleanup of source branch failed
|
|
331
|
+
</template>
|
|
332
|
+
|
|
333
|
+
</step>
|
|
334
|
+
|
|
335
|
+
6. <step id="STEP 6: Report Verdict">
|
|
336
|
+
|
|
337
|
+
Only output the following <template/>:
|
|
338
|
+
|
|
339
|
+
<template>
|
|
340
|
+
⧉ **ASE**: ✪ skill: **ase-repo-merge**, ⎇ source: **<source/>**, ⎇ target: **<target/>**, ▶ MERGE VERDICT: **MERGED**
|
|
341
|
+
</template>
|
|
342
|
+
|
|
343
|
+
</step>
|
|
344
|
+
|
|
345
|
+
</flow>
|
|
346
|
+
|