@rse/ase 0.9.51 → 0.9.52
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-task.js +7 -2
- package/package.json +7 -7
- 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/etc/stx.conf +2 -2
- package/plugin/meta/ase-common-dissect.md +110 -0
- package/plugin/meta/ase-common-task.md +5 -3
- package/plugin/meta/ase-control.md +53 -0
- package/plugin/meta/ase-format-task.md +6 -0
- package/plugin/meta/ase-skill.md +8 -8
- package/plugin/package.json +2 -2
- package/plugin/skills/ase-arch-analyze/SKILL.md +23 -12
- package/plugin/skills/ase-arch-analyze/help.md +16 -0
- package/plugin/skills/ase-arch-discover/SKILL.md +2 -2
- package/plugin/skills/ase-code-analyze/SKILL.md +27 -18
- package/plugin/skills/ase-code-analyze/help.md +15 -0
- package/plugin/skills/ase-code-craft/SKILL.md +2 -2
- package/plugin/skills/ase-code-dissect/SKILL.md +380 -0
- package/plugin/skills/ase-code-dissect/help.md +121 -0
- package/plugin/skills/ase-code-explain/SKILL.md +2 -2
- package/plugin/skills/ase-code-insight/SKILL.md +2 -2
- package/plugin/skills/ase-code-lint/SKILL.md +2 -2
- package/plugin/skills/ase-code-refactor/SKILL.md +2 -2
- package/plugin/skills/ase-code-resolve/SKILL.md +2 -2
- package/plugin/skills/ase-docs-distill/SKILL.md +2 -2
- package/plugin/skills/ase-docs-proofread/SKILL.md +2 -2
- package/plugin/skills/ase-help-intent/SKILL.md +2 -2
- package/plugin/skills/ase-help-skill/SKILL.md +2 -2
- package/plugin/skills/ase-help-skill/catalog.md +3 -0
- package/plugin/skills/ase-meta-brainstorm/SKILL.md +2 -2
- package/plugin/skills/ase-meta-changelog/SKILL.md +2 -2
- package/plugin/skills/ase-meta-chat/SKILL.md +2 -2
- package/plugin/skills/ase-meta-commit/SKILL.md +2 -2
- package/plugin/skills/ase-meta-config/SKILL.md +2 -2
- package/plugin/skills/ase-meta-diaboli/SKILL.md +2 -2
- package/plugin/skills/ase-meta-diff/SKILL.md +2 -2
- package/plugin/skills/ase-meta-eli5/SKILL.md +2 -2
- package/plugin/skills/ase-meta-evaluate/SKILL.md +2 -2
- package/plugin/skills/ase-meta-proximity/SKILL.md +2 -2
- package/plugin/skills/ase-meta-quorum/SKILL.md +2 -2
- package/plugin/skills/ase-meta-quotes/SKILL.md +2 -2
- package/plugin/skills/ase-meta-review/SKILL.md +2 -2
- package/plugin/skills/ase-meta-search/SKILL.md +2 -2
- package/plugin/skills/ase-meta-steelman/SKILL.md +2 -2
- package/plugin/skills/ase-meta-why/SKILL.md +2 -2
- package/plugin/skills/ase-meta-workflow/SKILL.md +378 -0
- package/plugin/skills/ase-meta-workflow/help.md +117 -0
- package/plugin/skills/ase-meta-workflow/sample.md +70 -0
- package/plugin/skills/ase-meta-workflow/workflow.txt +97 -0
- package/plugin/skills/ase-sync-export/SKILL.md +2 -2
- package/plugin/skills/ase-sync-import/SKILL.md +2 -2
- package/plugin/skills/ase-sync-reconcile/SKILL.md +2 -2
- package/plugin/skills/ase-task-condense/SKILL.md +26 -6
- package/plugin/skills/ase-task-delete/SKILL.md +2 -2
- package/plugin/skills/ase-task-dissect/SKILL.md +299 -0
- package/plugin/skills/ase-task-dissect/help.md +114 -0
- package/plugin/skills/ase-task-edit/SKILL.md +6 -4
- package/plugin/skills/ase-task-grill/SKILL.md +6 -4
- package/plugin/skills/ase-task-id/SKILL.md +2 -2
- package/plugin/skills/ase-task-implement/SKILL.md +2 -2
- package/plugin/skills/ase-task-list/SKILL.md +2 -2
- package/plugin/skills/ase-task-preflight/SKILL.md +2 -2
- package/plugin/skills/ase-task-reboot/SKILL.md +12 -6
- package/plugin/skills/ase-task-rename/SKILL.md +2 -2
- package/plugin/skills/ase-task-view/SKILL.md +2 -2
|
@@ -0,0 +1,380 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ase-code-dissect
|
|
3
|
+
argument-hint: "[--help|-h] [--max-parts|-m <count>] [--staged|-s] [--dry|-d] [--force|-f] [<dissect-hint>]"
|
|
4
|
+
description: >
|
|
5
|
+
Dissect the current Git change set, treated as an epic, domain-wise
|
|
6
|
+
and logically into cohesive parts and materialize each part in its
|
|
7
|
+
own dedicated Git WorkTree. Use when the user calls to "dissect",
|
|
8
|
+
"split", "break up", or "decompose" a large change set into atomic,
|
|
9
|
+
separately committable parts.
|
|
10
|
+
user-invocable: true
|
|
11
|
+
disable-model-invocation: false
|
|
12
|
+
effort: xhigh
|
|
13
|
+
allowed-tools:
|
|
14
|
+
- "Bash(git *)"
|
|
15
|
+
- "Bash(rm -f *)"
|
|
16
|
+
- "Write"
|
|
17
|
+
- "Read"
|
|
18
|
+
- "Edit"
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
@${CLAUDE_SKILL_DIR}/../../meta/ase-control.md
|
|
22
|
+
@${CLAUDE_SKILL_DIR}/../../meta/ase-skill.md
|
|
23
|
+
@${CLAUDE_SKILL_DIR}/../../meta/ase-getopt.md
|
|
24
|
+
|
|
25
|
+
<purpose name="ase-code-dissect">
|
|
26
|
+
Dissect a Change Set
|
|
27
|
+
</purpose>
|
|
28
|
+
|
|
29
|
+
<expand name="getopt"
|
|
30
|
+
arg1="ase-code-dissect"
|
|
31
|
+
arg2="--max-parts|-m=8 --staged|-s --dry|-d --force|-f">
|
|
32
|
+
$ARGUMENTS
|
|
33
|
+
</expand>
|
|
34
|
+
|
|
35
|
+
<objective>
|
|
36
|
+
*Dissect* the current Git change set, treated as an *epic*, domain-wise
|
|
37
|
+
and logically into *cohesive parts*, and materialize every part in its
|
|
38
|
+
own dedicated *Git WorkTree*, so each part can be reviewed and
|
|
39
|
+
committed *atomically* and *independently*.
|
|
40
|
+
</objective>
|
|
41
|
+
|
|
42
|
+
@${CLAUDE_SKILL_DIR}/../../meta/ase-common-dissect.md
|
|
43
|
+
|
|
44
|
+
Procedure
|
|
45
|
+
---------
|
|
46
|
+
|
|
47
|
+
<flow>
|
|
48
|
+
|
|
49
|
+
1. <step id="STEP 1: Determine Change Set and Hint">
|
|
50
|
+
|
|
51
|
+
1. Determine the *dissection hint*: set
|
|
52
|
+
<dissect-hint><getopt-arguments/></dissect-hint>, with any
|
|
53
|
+
leading and trailing whitespace stripped. Additionally, inherit
|
|
54
|
+
the always existing <ase-project-id/> from the current context,
|
|
55
|
+
as it names the worktrees and branches of all derived parts.
|
|
56
|
+
|
|
57
|
+
<if condition="<dissect-hint/> is not empty">
|
|
58
|
+
Only output the following <template/>:
|
|
59
|
+
|
|
60
|
+
<template>
|
|
61
|
+
⧉ **ASE**: ✪ skill: **ase-code-dissect**, ⇌ hint: **<dissect-hint/>**
|
|
62
|
+
</template>
|
|
63
|
+
</if>
|
|
64
|
+
<else>
|
|
65
|
+
No dissection hint was given, so the parts are derived from the
|
|
66
|
+
change set alone. Do not output anything.
|
|
67
|
+
</else>
|
|
68
|
+
|
|
69
|
+
2. Determine the *repository root* by running the corresponding
|
|
70
|
+
command (taken exactly as given) and capturing its output into
|
|
71
|
+
<repo-root/>:
|
|
72
|
+
|
|
73
|
+
`git rev-parse --show-toplevel`
|
|
74
|
+
|
|
75
|
+
3. Determine the *diff details* and the *diff statistics* by
|
|
76
|
+
running the corresponding commands (taken exactly as given) and
|
|
77
|
+
capturing their full outputs into <diff/> and <stat/>:
|
|
78
|
+
|
|
79
|
+
<if condition="<getopt-option-staged/> is equal `true`">
|
|
80
|
+
`git diff --cached HEAD`
|
|
81
|
+
|
|
82
|
+
`git diff --cached --numstat HEAD`
|
|
83
|
+
</if>
|
|
84
|
+
<else>
|
|
85
|
+
`git diff`
|
|
86
|
+
|
|
87
|
+
`git diff --numstat`
|
|
88
|
+
</else>
|
|
89
|
+
|
|
90
|
+
4. <if condition="<getopt-option-staged/> is not equal `true`">
|
|
91
|
+
Additionally, *fold in the untracked files* -- they are part of
|
|
92
|
+
the working copy change set, but carry no diff of their own.
|
|
93
|
+
Determine them *read-only* by running the corresponding command
|
|
94
|
+
(taken exactly as given):
|
|
95
|
+
|
|
96
|
+
`git -C "<repo-root/>" ls-files --others --exclude-standard`
|
|
97
|
+
|
|
98
|
+
*Skip* every listed entry below the `.ase/` directory -- it
|
|
99
|
+
carries *ASE*'s own state and the worktrees created by this very
|
|
100
|
+
skill, and hence is never part of the user's change set.
|
|
101
|
+
|
|
102
|
+
Then, for *every* remaining listed file, capture its creation
|
|
103
|
+
diff by running the corresponding command (taken exactly as
|
|
104
|
+
given) and *append* its output to <diff/>:
|
|
105
|
+
|
|
106
|
+
`git -C "<repo-root/>" diff --no-index --binary /dev/null "<file/>"`
|
|
107
|
+
|
|
108
|
+
This command intentionally exits with a non-zero status,
|
|
109
|
+
because the two compared paths differ; treat this exit status
|
|
110
|
+
as *success*, not as an error. Judge the *outcome* by the
|
|
111
|
+
*output* instead: a run which emits *no* diff on standard output
|
|
112
|
+
but an `error:` or `fatal:` message (e.g. the entry is a *nested*
|
|
113
|
+
Git repository, which `git ls-files` reports as a directory) is a
|
|
114
|
+
*real* failure -- append nothing for that entry and only output
|
|
115
|
+
the following <template/>, then continue with the next file:
|
|
116
|
+
|
|
117
|
+
<template>
|
|
118
|
+
⧉ **ASE**: ✪ skill: **ase-code-dissect**, ⊘ untracked: `<file/>`, ▶ status: **not foldable into the change set**
|
|
119
|
+
</template>
|
|
120
|
+
</if>
|
|
121
|
+
<else>
|
|
122
|
+
Untracked files are *not* folded in under `--staged`/`-s`,
|
|
123
|
+
because they are by definition *not* part of the Git index. Do
|
|
124
|
+
not output anything.
|
|
125
|
+
</else>
|
|
126
|
+
|
|
127
|
+
5. <if condition="<diff/> is empty">
|
|
128
|
+
Only output the following <template/> and then *STOP* immediately:
|
|
129
|
+
|
|
130
|
+
<template>
|
|
131
|
+
⧉ **ASE**: ✪ skill: **ase-code-dissect**, ▶ status: **no changes to dissect**
|
|
132
|
+
</template>
|
|
133
|
+
</if>
|
|
134
|
+
|
|
135
|
+
</step>
|
|
136
|
+
|
|
137
|
+
2. <step id="STEP 2: Dissect Change Set">
|
|
138
|
+
|
|
139
|
+
1. *Derive the parts* of the epic:
|
|
140
|
+
|
|
141
|
+
<expand
|
|
142
|
+
name="dissect-derive"
|
|
143
|
+
arg1="ase-code-dissect"
|
|
144
|
+
arg2="<dissect-hint/>"
|
|
145
|
+
arg3="<ase-project-id/>"
|
|
146
|
+
>
|
|
147
|
+
the individual hunks of the captured <diff/>, weighted by the
|
|
148
|
+
line counts of <stat/> and -- for the folded-in untracked files,
|
|
149
|
+
which carry no <stat/> entry -- by their own diff line counts
|
|
150
|
+
</expand>
|
|
151
|
+
|
|
152
|
+
Additionally, try to keep *all* hunks of *one* file in the
|
|
153
|
+
*same* part, and split a file's hunks across parts *only* when
|
|
154
|
+
they are genuinely unrelated -- this keeps the per-part patches
|
|
155
|
+
applicable.
|
|
156
|
+
|
|
157
|
+
A *single* hunk is *atomic* here, so rule 3's splitting
|
|
158
|
+
permission does *not* apply to it: you *MUST NOT* break a hunk
|
|
159
|
+
into sub-hunks, because this would require re-computing its `@@`
|
|
160
|
+
header and hence destroy the byte-exactness the per-part
|
|
161
|
+
<patch/> depends on.
|
|
162
|
+
|
|
163
|
+
2. *Report the parts*:
|
|
164
|
+
|
|
165
|
+
<expand name="dissect-report" arg1="<ase-project-id/>"></expand>
|
|
166
|
+
|
|
167
|
+
</step>
|
|
168
|
+
|
|
169
|
+
3. <step id="STEP 3: Detect Target Collisions"
|
|
170
|
+
condition="<getopt-option-dry/> is not equal `true`">
|
|
171
|
+
|
|
172
|
+
1. Determine the *existing worktrees* and *existing branches* by
|
|
173
|
+
running the corresponding commands (taken exactly as given) and
|
|
174
|
+
capturing their outputs:
|
|
175
|
+
|
|
176
|
+
`git worktree list --porcelain`
|
|
177
|
+
|
|
178
|
+
`git branch --list`
|
|
179
|
+
|
|
180
|
+
2. Set <collisions/> to all <part-id/> of <parts/> for which either
|
|
181
|
+
a worktree directory `<repo-root/>/.ase/worktree/<part-id/>` or
|
|
182
|
+
a branch `<part-id/>` already exists.
|
|
183
|
+
|
|
184
|
+
3. <if condition="<collisions/> is not empty AND <getopt-option-force/> is not equal `true`">
|
|
185
|
+
Only output the following <template/> -- with <collisions/>
|
|
186
|
+
rendered as a comma-separated list of code spans -- and then
|
|
187
|
+
immediately *STOP* processing the entire current skill, leaving
|
|
188
|
+
*all* existing worktrees and branches untouched:
|
|
189
|
+
|
|
190
|
+
<template>
|
|
191
|
+
⧉ **ASE**: ✪ skill: **ase-code-dissect**, ⊘ collisions: <collisions/>
|
|
192
|
+
⧉ **ASE**: ✪ skill: **ase-code-dissect**, ✪ dissection: **<n/>** parts, ▶ status: **targets exist**
|
|
193
|
+
</template>
|
|
194
|
+
|
|
195
|
+
Directly *after* this <template/>, and *before* stopping, give
|
|
196
|
+
the corrective hint by expanding the following (which, depending
|
|
197
|
+
on the configured <ase-guidance-level/>, may expand into nothing
|
|
198
|
+
and hence emit no output at all):
|
|
199
|
+
|
|
200
|
+
<ase-tpl-hint level="minimal">
|
|
201
|
+
Re-run `/ase-code-dissect --force` to remove and re-create the colliding worktrees and branches.
|
|
202
|
+
</ase-tpl-hint>
|
|
203
|
+
</if>
|
|
204
|
+
|
|
205
|
+
4. <if condition="<collisions/> is not empty AND <getopt-option-force/> is equal `true`">
|
|
206
|
+
*Remove* every colliding target by running the corresponding
|
|
207
|
+
commands (taken exactly as given) per colliding <part-id/>, and
|
|
208
|
+
silently ignore the failure of an individual command when the
|
|
209
|
+
corresponding worktree or branch does not exist:
|
|
210
|
+
|
|
211
|
+
`git worktree remove --force "<repo-root/>/.ase/worktree/<part-id/>"`
|
|
212
|
+
|
|
213
|
+
`git worktree prune`
|
|
214
|
+
|
|
215
|
+
`git branch -D <part-id/>`
|
|
216
|
+
</if>
|
|
217
|
+
|
|
218
|
+
</step>
|
|
219
|
+
|
|
220
|
+
4. <step id="STEP 4: Materialize WorkTrees"
|
|
221
|
+
condition="<getopt-option-dry/> is not equal `true`">
|
|
222
|
+
|
|
223
|
+
You *MUST* *NEVER* mutate the *original* working copy in this step:
|
|
224
|
+
do *not* modify, stage, stash, revert, or commit anything outside of
|
|
225
|
+
the freshly created worktrees.
|
|
226
|
+
|
|
227
|
+
1. Set <tmp-dir/> to the value of the `TMPDIR` environment variable
|
|
228
|
+
if it is known in the current session context, and to `/tmp`
|
|
229
|
+
otherwise. Do not output anything.
|
|
230
|
+
|
|
231
|
+
2. For *every* part in <parts/>, in their derived order:
|
|
232
|
+
|
|
233
|
+
1. Assemble <patch/> from the *verbatim* subset of <diff/>
|
|
234
|
+
assigned to this part: keep the complete `diff --git` file
|
|
235
|
+
headers and the complete `@@` hunk headers of the assigned
|
|
236
|
+
hunks, and change *nothing* inside them.
|
|
237
|
+
|
|
238
|
+
The captured <diff/> is *byte-exact* input and <patch/> stays
|
|
239
|
+
*byte-exact*, too, because `git apply` rejects even the
|
|
240
|
+
smallest deviation. You *MUST* therefore *NEVER* re-wrap a
|
|
241
|
+
line, re-indent a line, normalize or strip trailing
|
|
242
|
+
whitespace, drop the leading context/`+`/`-` marker column,
|
|
243
|
+
re-encode a character, or omit the trailing newline -- and
|
|
244
|
+
you *MUST* *NEVER* re-render any part of the diff as
|
|
245
|
+
Markdown, so no bullet marker and no inline code span is ever
|
|
246
|
+
introduced into <patch/>.
|
|
247
|
+
|
|
248
|
+
2. Use the `Write` tool to write <patch/> to the patch file
|
|
249
|
+
`<tmp-dir/>/ase-dissect-<part-id/>.patch`.
|
|
250
|
+
|
|
251
|
+
3. Create the worktree by running the corresponding command
|
|
252
|
+
(taken exactly as given), which creates the directory
|
|
253
|
+
*and* -- named after its last path component -- the branch
|
|
254
|
+
<part-id/> from `HEAD`. The `.ase` directory is usually
|
|
255
|
+
git-ignored, so the worktree itself never shows up as a
|
|
256
|
+
change:
|
|
257
|
+
|
|
258
|
+
`git worktree add "<repo-root/>/.ase/worktree/<part-id/>"`
|
|
259
|
+
|
|
260
|
+
<if condition="this command fails">
|
|
261
|
+
Only output the following <template/>, then *continue* with
|
|
262
|
+
the *next* part -- a single failing part *never* aborts the
|
|
263
|
+
remaining ones:
|
|
264
|
+
|
|
265
|
+
<template>
|
|
266
|
+
⧉ **ASE**: ✪ skill: **ase-code-dissect**, ◉ part: **<part-id/>**, ▶ status: **worktree failed to create**
|
|
267
|
+
</template>
|
|
268
|
+
</if>
|
|
269
|
+
|
|
270
|
+
4. Apply the patch *inside* the freshly created worktree by
|
|
271
|
+
running the corresponding command (taken exactly as given):
|
|
272
|
+
|
|
273
|
+
`git -C "<repo-root/>/.ase/worktree/<part-id/>" apply --whitespace=nowarn "<tmp-dir/>/ase-dissect-<part-id/>.patch"`
|
|
274
|
+
|
|
275
|
+
<if condition="this command fails">
|
|
276
|
+
Only output the following <template/>, then *continue* with
|
|
277
|
+
the *next* part -- a single failing part *never* aborts the
|
|
278
|
+
remaining ones:
|
|
279
|
+
|
|
280
|
+
<template>
|
|
281
|
+
⧉ **ASE**: ✪ skill: **ase-code-dissect**, ◉ part: **<part-id/>**, ▶ status: **patch failed to apply**
|
|
282
|
+
</template>
|
|
283
|
+
</if>
|
|
284
|
+
|
|
285
|
+
5. <if condition="a `CHANGELOG.md` file exists in the created worktree">
|
|
286
|
+
Add *one* new entry to the *first* (most recent) section of
|
|
287
|
+
that `CHANGELOG.md` *inside the worktree*, summarizing
|
|
288
|
+
*this part's* change set only, and strictly aligned with the
|
|
289
|
+
established style and conventions of the project (usually
|
|
290
|
+
`- <change-type/> [<artifact-kind/>]: <summary/>`).
|
|
291
|
+
|
|
292
|
+
The *existing* `CHANGELOG.md` is *changed*, never replaced:
|
|
293
|
+
you *MUST* use the `Read` tool to read it and the `Edit` tool
|
|
294
|
+
to insert the single new entry *in place*, and you *MUST*
|
|
295
|
+
*NEVER* use the `Write` tool on it, as this would drop the
|
|
296
|
+
entire remaining change history.
|
|
297
|
+
|
|
298
|
+
<if condition="the patch of this part already added an entry to that `CHANGELOG.md`">
|
|
299
|
+
The part's own change set already carries its `CHANGELOG.md`
|
|
300
|
+
entry, so you *MUST* *NOT* add a second one. Keep the entry
|
|
301
|
+
which came with the patch and, if it mentions changes which
|
|
302
|
+
landed in *other* parts, reduce it to *this* part's change
|
|
303
|
+
set only.
|
|
304
|
+
</if>
|
|
305
|
+
</if>
|
|
306
|
+
<else>
|
|
307
|
+
The project keeps no `CHANGELOG.md`, so nothing is added and
|
|
308
|
+
no `CHANGELOG.md` is created. Do not output anything.
|
|
309
|
+
</else>
|
|
310
|
+
|
|
311
|
+
6. Leave the worktree *uncommitted*: do *not* run `git add` and
|
|
312
|
+
do *not* run `git commit`, so the user keeps full control
|
|
313
|
+
over the final commit of every part.
|
|
314
|
+
|
|
315
|
+
7. Only output the following <template/>:
|
|
316
|
+
|
|
317
|
+
<template>
|
|
318
|
+
⧉ **ASE**: ✪ skill: **ase-code-dissect**, ◉ part: **<part-id/>**, ▶ status: **worktree created**
|
|
319
|
+
</template>
|
|
320
|
+
|
|
321
|
+
3. *Clean up* the temporary patch files by running the
|
|
322
|
+
corresponding command (taken exactly as given) once per
|
|
323
|
+
<part-id/> of the *successfully* materialized <parts/>, and
|
|
324
|
+
silently ignore the failure of an individual command when the
|
|
325
|
+
corresponding patch file does not exist:
|
|
326
|
+
|
|
327
|
+
`rm -f "<tmp-dir/>/ase-dissect-<part-id/>.patch"`
|
|
328
|
+
|
|
329
|
+
The patch file of a *successful* part is a pure *intermediate*:
|
|
330
|
+
it was already consumed by `git apply` and its content is fully
|
|
331
|
+
preserved in the worktree, so it is removed. The patch file of a
|
|
332
|
+
part whose worktree or patch *failed* is *kept* instead, because
|
|
333
|
+
it is that part's only materialization and would otherwise be
|
|
334
|
+
lost. Do not output anything.
|
|
335
|
+
|
|
336
|
+
</step>
|
|
337
|
+
|
|
338
|
+
5. <step id="STEP 5: Report Result">
|
|
339
|
+
|
|
340
|
+
1. <if condition="<getopt-option-dry/> is equal `true`">
|
|
341
|
+
Only output the following <template/>:
|
|
342
|
+
|
|
343
|
+
<template>
|
|
344
|
+
⧉ **ASE**: ✪ skill: **ase-code-dissect**, ✪ dissection: **<n/>** parts, ▶ status: **dry-run -- no worktrees created**
|
|
345
|
+
</template>
|
|
346
|
+
</if>
|
|
347
|
+
<else>
|
|
348
|
+
Only output the following <template/>:
|
|
349
|
+
|
|
350
|
+
<template>
|
|
351
|
+
⧉ **ASE**: ✪ skill: **ase-code-dissect**, ✪ dissection: **<n/>** parts, ▶ status: **change set dissected**
|
|
352
|
+
</template>
|
|
353
|
+
</else>
|
|
354
|
+
|
|
355
|
+
2. Finally, give the closing hints by expanding the following
|
|
356
|
+
(which, depending on the configured <ase-guidance-level/>, may
|
|
357
|
+
each expand into nothing and hence emit no output at all):
|
|
358
|
+
|
|
359
|
+
<if condition="<getopt-option-dry/> is not equal `true`">
|
|
360
|
+
<ase-tpl-hint level="minimal">
|
|
361
|
+
The parts are uncommitted in `.ase/worktree/<id>` -- review and commit each of them separately, then remove them via `git worktree remove`.
|
|
362
|
+
</ase-tpl-hint>
|
|
363
|
+
</if>
|
|
364
|
+
<else>
|
|
365
|
+
<ase-tpl-hint level="minimal">
|
|
366
|
+
Re-run `/ase-code-dissect` without `--dry` to actually create the reported worktrees, optionally with a `<dissect-hint>` argument if the reported split is not the intended one.
|
|
367
|
+
</ase-tpl-hint>
|
|
368
|
+
</else>
|
|
369
|
+
|
|
370
|
+
<ase-tpl-hint level="normal">
|
|
371
|
+
Use `/ase-meta-diff` and `/ase-meta-review` inside a part's worktree to summarize and review it before committing.
|
|
372
|
+
</ase-tpl-hint>
|
|
373
|
+
|
|
374
|
+
<ase-tpl-hint level="verbose">
|
|
375
|
+
Use `/ase-code-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.
|
|
376
|
+
</ase-tpl-hint>
|
|
377
|
+
|
|
378
|
+
</step>
|
|
379
|
+
|
|
380
|
+
</flow>
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
|
|
2
|
+
## NAME
|
|
3
|
+
|
|
4
|
+
`ase-code-dissect` - Dissect a Change Set
|
|
5
|
+
|
|
6
|
+
## SYNOPSIS
|
|
7
|
+
|
|
8
|
+
`ase-code-dissect`
|
|
9
|
+
[`--help`|`-h`]
|
|
10
|
+
[`--max-parts`|`-m` *count*]
|
|
11
|
+
[`--staged`|`-s`]
|
|
12
|
+
[`--dry`|`-d`]
|
|
13
|
+
[`--force`|`-f`]
|
|
14
|
+
[*dissect-hint*]
|
|
15
|
+
|
|
16
|
+
## DESCRIPTION
|
|
17
|
+
|
|
18
|
+
The `ase-code-dissect` skill treats the current Git change set as an
|
|
19
|
+
*epic* and *dissects* it domain-wise and logically into *cohesive
|
|
20
|
+
parts*. Each part is a self-contained unit of change with a single
|
|
21
|
+
coherent purpose, so it can be reviewed and committed *atomically* and
|
|
22
|
+
*independently* of the others.
|
|
23
|
+
|
|
24
|
+
The change set is captured from the working copy (`git diff`), with
|
|
25
|
+
untracked files folded in *read-only*, or -- under `--staged`/`-s` --
|
|
26
|
+
from the Git index (`git diff --cached HEAD`). The dissection follows a
|
|
27
|
+
strict ruleset: at least *2* and at most *count* parts are derived,
|
|
28
|
+
*every* hunk is assigned to *exactly one* part, mutually dependent hunks
|
|
29
|
+
are kept together, all hunks of one file normally stay in the same part,
|
|
30
|
+
and nothing beyond the actual change set is invented. The cut follows
|
|
31
|
+
the *semantics* of the change, not its technical structure -- a split by
|
|
32
|
+
file, directory, or technical layer is usually *not* the intended one.
|
|
33
|
+
If the change set carries only a single cohesive purpose, it is reported
|
|
34
|
+
as *not dissectable* and nothing is created.
|
|
35
|
+
|
|
36
|
+
An optional *dissect-hint* steers *how* the change set is split -- which
|
|
37
|
+
changes belong together, along which axis to cut, or how many parts to
|
|
38
|
+
aim at. It is especially useful after a `--dry` run showed an unintended
|
|
39
|
+
dissection. The hint overrides the default grouping, but never the
|
|
40
|
+
ruleset itself.
|
|
41
|
+
|
|
42
|
+
The derived parts are first reported as a *dissection table* (part
|
|
43
|
+
number, worktree id, scope, and rationale). Then -- unless `--dry` is
|
|
44
|
+
given -- each part's patch is written to a temporary file and applied
|
|
45
|
+
inside a *fresh Git WorkTree* `.ase/worktree/<project-id>-<feature-slug>`,
|
|
46
|
+
whose branch carries the same name and is created from `HEAD`. If a
|
|
47
|
+
`CHANGELOG.md` file exists, a matching entry summarizing that part is
|
|
48
|
+
added *inside* the worktree.
|
|
49
|
+
|
|
50
|
+
Every part stays *uncommitted*, a failing `git apply` is reported for
|
|
51
|
+
that part while the remaining parts continue, and the *original working
|
|
52
|
+
copy is never mutated*.
|
|
53
|
+
|
|
54
|
+
Note that the working-copy patch (without `--staged`) is taken relative
|
|
55
|
+
to the Git *index* while the worktrees are created from `HEAD`. So if
|
|
56
|
+
changes are *also* staged, the affected part patches may not apply
|
|
57
|
+
cleanly and are then reported as failed; stage everything and use
|
|
58
|
+
`--staged` in that situation.
|
|
59
|
+
|
|
60
|
+
## OPTIONS
|
|
61
|
+
|
|
62
|
+
`--max-parts`|`-m` *count*:
|
|
63
|
+
Upper bound for the number of derived parts (default: `8`). The
|
|
64
|
+
lower bound is always `2`, because fewer parts are no dissection.
|
|
65
|
+
|
|
66
|
+
`--staged`|`-s`:
|
|
67
|
+
Dissect the *staged* changes (the Git index against `HEAD`) instead
|
|
68
|
+
of the working copy changes. Untracked files are then *not* folded
|
|
69
|
+
in, because they are by definition not part of the index.
|
|
70
|
+
|
|
71
|
+
`--dry`|`-d`:
|
|
72
|
+
*Report only* -- print the dissection table but create *no*
|
|
73
|
+
artifacts at all, so the decision stays fully reversible. Note that
|
|
74
|
+
this meaning differs from `--dry`/`-d` in `ase-code-craft`, where it
|
|
75
|
+
instead omits the `## VERIFICATION` section of the composed plan.
|
|
76
|
+
|
|
77
|
+
`--force`|`-f`:
|
|
78
|
+
Remove and re-create already existing worktrees and branches of the
|
|
79
|
+
derived names. Without this option, the skill detects colliding
|
|
80
|
+
targets *before* writing anything, reports them, and stops with
|
|
81
|
+
status *targets exist*.
|
|
82
|
+
|
|
83
|
+
## ARGUMENTS
|
|
84
|
+
|
|
85
|
+
*dissect-hint*:
|
|
86
|
+
A free-text hint telling *how* the change set should be split. If
|
|
87
|
+
omitted, the parts are derived from the change set alone.
|
|
88
|
+
|
|
89
|
+
The worktree names are *not* argument-driven: they are always derived
|
|
90
|
+
from the *current* project id and the per-part feature slug.
|
|
91
|
+
|
|
92
|
+
## EXAMPLES
|
|
93
|
+
|
|
94
|
+
Dissect the current working copy changes:
|
|
95
|
+
|
|
96
|
+
```text
|
|
97
|
+
❯ /ase-code-dissect
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Preview the dissection of the staged changes into at most four parts:
|
|
101
|
+
|
|
102
|
+
```text
|
|
103
|
+
❯ /ase-code-dissect --staged --dry --max-parts 4
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Re-dissect the changes, re-creating the previously created worktrees:
|
|
107
|
+
|
|
108
|
+
```text
|
|
109
|
+
❯ /ase-code-dissect --force
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Dissect the changes along an explicitly given axis:
|
|
113
|
+
|
|
114
|
+
```text
|
|
115
|
+
❯ /ase-code-dissect keep the plugin and tool changes in separate parts
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## SEE ALSO
|
|
119
|
+
|
|
120
|
+
[`ase-task-dissect`](../ase-task-dissect/help.md), [`ase-meta-diff`](../ase-meta-diff/help.md), [`ase-meta-review`](../ase-meta-review/help.md),
|
|
121
|
+
[`ase-meta-changelog`](../ase-meta-changelog/help.md), [`ase-meta-commit`](../ase-meta-commit/help.md).
|
|
@@ -15,9 +15,9 @@ allowed-tools:
|
|
|
15
15
|
@${CLAUDE_SKILL_DIR}/../../meta/ase-skill.md
|
|
16
16
|
@${CLAUDE_SKILL_DIR}/../../meta/ase-getopt.md
|
|
17
17
|
|
|
18
|
-
<
|
|
18
|
+
<purpose name="ase-code-explain">
|
|
19
19
|
Explain Source Code
|
|
20
|
-
</
|
|
20
|
+
</purpose>
|
|
21
21
|
|
|
22
22
|
<expand name="getopt" arg1="ase-code-explain">
|
|
23
23
|
$ARGUMENTS
|
|
@@ -20,9 +20,9 @@ allowed-tools:
|
|
|
20
20
|
@${CLAUDE_SKILL_DIR}/../../meta/ase-skill.md
|
|
21
21
|
@${CLAUDE_SKILL_DIR}/../../meta/ase-getopt.md
|
|
22
22
|
|
|
23
|
-
<
|
|
23
|
+
<purpose name="ase-code-insight">
|
|
24
24
|
Project Insight
|
|
25
|
-
</
|
|
25
|
+
</purpose>
|
|
26
26
|
|
|
27
27
|
<expand name="getopt" arg1="ase-code-insight">
|
|
28
28
|
$ARGUMENTS
|
|
@@ -14,9 +14,9 @@ effort: high
|
|
|
14
14
|
@${CLAUDE_SKILL_DIR}/../../meta/ase-dialog.md
|
|
15
15
|
@${CLAUDE_SKILL_DIR}/../../meta/ase-getopt.md
|
|
16
16
|
|
|
17
|
-
<
|
|
17
|
+
<purpose name="ase-code-lint">
|
|
18
18
|
Lint Source Code
|
|
19
|
-
</
|
|
19
|
+
</purpose>
|
|
20
20
|
|
|
21
21
|
<expand name="getopt"
|
|
22
22
|
arg1="ase-code-lint"
|
|
@@ -17,9 +17,9 @@ allowed-tools:
|
|
|
17
17
|
@${CLAUDE_SKILL_DIR}/../../meta/ase-dialog.md
|
|
18
18
|
@${CLAUDE_SKILL_DIR}/../../meta/ase-getopt.md
|
|
19
19
|
|
|
20
|
-
<
|
|
20
|
+
<purpose name="ase-code-refactor">
|
|
21
21
|
Refactor Source Code
|
|
22
|
-
</
|
|
22
|
+
</purpose>
|
|
23
23
|
|
|
24
24
|
<expand name="getopt"
|
|
25
25
|
arg1="ase-code-refactor"
|
|
@@ -17,9 +17,9 @@ allowed-tools:
|
|
|
17
17
|
@${CLAUDE_SKILL_DIR}/../../meta/ase-dialog.md
|
|
18
18
|
@${CLAUDE_SKILL_DIR}/../../meta/ase-getopt.md
|
|
19
19
|
|
|
20
|
-
<
|
|
20
|
+
<purpose name="ase-code-resolve">
|
|
21
21
|
Resolve Problem
|
|
22
|
-
</
|
|
22
|
+
</purpose>
|
|
23
23
|
|
|
24
24
|
<expand name="getopt"
|
|
25
25
|
arg1="ase-code-resolve"
|
|
@@ -16,9 +16,9 @@ effort: high
|
|
|
16
16
|
@${CLAUDE_SKILL_DIR}/../../meta/ase-skill.md
|
|
17
17
|
@${CLAUDE_SKILL_DIR}/../../meta/ase-getopt.md
|
|
18
18
|
|
|
19
|
-
<
|
|
19
|
+
<purpose name="ase-docs-distill">
|
|
20
20
|
Distill Key Points
|
|
21
|
-
</
|
|
21
|
+
</purpose>
|
|
22
22
|
|
|
23
23
|
<expand name="getopt"
|
|
24
24
|
arg1="ase-docs-distill"
|
|
@@ -14,9 +14,9 @@ effort: high
|
|
|
14
14
|
@${CLAUDE_SKILL_DIR}/../../meta/ase-dialog.md
|
|
15
15
|
@${CLAUDE_SKILL_DIR}/../../meta/ase-getopt.md
|
|
16
16
|
|
|
17
|
-
<
|
|
17
|
+
<purpose name="ase-docs-proofread">
|
|
18
18
|
Analyze documents for spelling, punctuation, or grammar errors
|
|
19
|
-
</
|
|
19
|
+
</purpose>
|
|
20
20
|
|
|
21
21
|
<expand name="getopt"
|
|
22
22
|
arg1="ase-docs-proofread"
|
|
@@ -20,9 +20,9 @@ allowed-tools:
|
|
|
20
20
|
@${CLAUDE_SKILL_DIR}/../../meta/ase-dialog.md
|
|
21
21
|
@${CLAUDE_SKILL_DIR}/../../meta/ase-getopt.md
|
|
22
22
|
|
|
23
|
-
<
|
|
23
|
+
<purpose name="ase-help-intent">
|
|
24
24
|
Match an Intent to an ASE Command
|
|
25
|
-
</
|
|
25
|
+
</purpose>
|
|
26
26
|
|
|
27
27
|
<expand name="getopt"
|
|
28
28
|
arg1="ase-help-intent"
|
|
@@ -19,9 +19,9 @@ allowed-tools:
|
|
|
19
19
|
@${CLAUDE_SKILL_DIR}/../../meta/ase-dialog.md
|
|
20
20
|
@${CLAUDE_SKILL_DIR}/../../meta/ase-getopt.md
|
|
21
21
|
|
|
22
|
-
<
|
|
22
|
+
<purpose name="ase-help-skill">
|
|
23
23
|
Show the Manual Page of an ASE Skill
|
|
24
|
-
</
|
|
24
|
+
</purpose>
|
|
25
25
|
|
|
26
26
|
<expand name="getopt"
|
|
27
27
|
arg1="ase-help-skill"
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
○ `ase-meta-commit`: Git Commit Message
|
|
42
42
|
○ `ase-meta-diff`: Summarize Diff
|
|
43
43
|
○ `ase-meta-review`: Review Staged Changes
|
|
44
|
+
○ `ase-code-dissect`: Dissect a Change Set
|
|
44
45
|
|
|
45
46
|
⎈ **TASK MANAGEMENT**
|
|
46
47
|
○ `ase-task-id`: Configure Task Id
|
|
@@ -49,6 +50,7 @@
|
|
|
49
50
|
○ `ase-task-edit`: Iteratively Edit a Task Plan
|
|
50
51
|
○ `ase-task-grill`: Iteratively Grill a Task Plan
|
|
51
52
|
○ `ase-task-condense`: Condense a Task Plan
|
|
53
|
+
○ `ase-task-dissect`: Dissect a Task Plan
|
|
52
54
|
○ `ase-task-reboot`: Reboot a Task Plan
|
|
53
55
|
○ `ase-task-preflight`: Preflight a Task Plan
|
|
54
56
|
○ `ase-task-implement`: Implement a Task Plan
|
|
@@ -56,6 +58,7 @@
|
|
|
56
58
|
○ `ase-task-delete`: Delete a Task Plan
|
|
57
59
|
|
|
58
60
|
⎈ **OTHER SKILLS**
|
|
61
|
+
○ `ase-meta-workflow`: Generate a Workflow Skill
|
|
59
62
|
○ `ase-meta-config`: Configuration Management
|
|
60
63
|
○ `ase-meta-compat`: Self-Test ASE Compatibility
|
|
61
64
|
|
|
@@ -17,9 +17,9 @@ effort: high
|
|
|
17
17
|
@${CLAUDE_SKILL_DIR}/../../meta/ase-dialog.md
|
|
18
18
|
@${CLAUDE_SKILL_DIR}/../../meta/ase-getopt.md
|
|
19
19
|
|
|
20
|
-
<
|
|
20
|
+
<purpose name="ase-meta-brainstorm">
|
|
21
21
|
Collaboratively Brainstorm a Topic
|
|
22
|
-
</
|
|
22
|
+
</purpose>
|
|
23
23
|
|
|
24
24
|
<expand name="getopt"
|
|
25
25
|
arg1="ase-meta-brainstorm"
|
|
@@ -19,9 +19,9 @@ allowed-tools:
|
|
|
19
19
|
@${CLAUDE_SKILL_DIR}/../../meta/ase-skill.md
|
|
20
20
|
@${CLAUDE_SKILL_DIR}/../../meta/ase-getopt.md
|
|
21
21
|
|
|
22
|
-
<
|
|
22
|
+
<purpose name="ase-meta-changelog">
|
|
23
23
|
Update ChangeLog Entries
|
|
24
|
-
</
|
|
24
|
+
</purpose>
|
|
25
25
|
|
|
26
26
|
<expand name="getopt" arg1="ase-meta-changelog">
|
|
27
27
|
$ARGUMENTS
|