@rse/ase 0.9.8 → 0.9.10

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 (73) hide show
  1. package/dst/ase-getopt.js +60 -4
  2. package/dst/ase-hook.js +6 -21
  3. package/dst/ase-markdown.js +32 -11
  4. package/dst/ase-mcp.js +22 -8
  5. package/dst/ase-notify.js +32 -0
  6. package/dst/ase-service.js +5 -2
  7. package/dst/ase-setup.js +45 -131
  8. package/dst/ase-skills.js +17 -13
  9. package/dst/ase-statusline.js +8 -12
  10. package/dst/ase-task.js +12 -2
  11. package/package.json +2 -2
  12. package/plugin/.claude-plugin/plugin.json +1 -1
  13. package/plugin/.github/plugin/plugin.json +1 -1
  14. package/plugin/meta/ase-dialog.md +133 -7
  15. package/plugin/meta/ase-format-arch.md +3 -3
  16. package/plugin/meta/ase-format-spec.md +13 -4
  17. package/plugin/meta/ase-getopt.md +40 -28
  18. package/plugin/meta/ase-skill.md +69 -6
  19. package/plugin/package.json +1 -1
  20. package/plugin/skills/ase-arch-analyze/help.md +2 -2
  21. package/plugin/skills/ase-arch-discover/SKILL.md +43 -27
  22. package/plugin/skills/ase-arch-discover/help.md +1 -1
  23. package/plugin/skills/ase-code-analyze/help.md +2 -2
  24. package/plugin/skills/ase-code-craft/SKILL.md +47 -41
  25. package/plugin/skills/ase-code-craft/help.md +2 -2
  26. package/plugin/skills/ase-code-explain/help.md +1 -1
  27. package/plugin/skills/ase-code-insight/SKILL.md +5 -4
  28. package/plugin/skills/ase-code-insight/help.md +1 -1
  29. package/plugin/skills/ase-code-lint/SKILL.md +23 -14
  30. package/plugin/skills/ase-code-lint/help.md +2 -2
  31. package/plugin/skills/ase-code-refactor/SKILL.md +46 -41
  32. package/plugin/skills/ase-code-refactor/help.md +2 -2
  33. package/plugin/skills/ase-code-resolve/SKILL.md +46 -40
  34. package/plugin/skills/ase-code-resolve/help.md +3 -3
  35. package/plugin/skills/ase-docs-distill/help.md +1 -1
  36. package/plugin/skills/ase-docs-proofread/SKILL.md +21 -13
  37. package/plugin/skills/ase-docs-proofread/help.md +1 -1
  38. package/plugin/skills/ase-meta-brainstorm/SKILL.md +24 -5
  39. package/plugin/skills/ase-meta-brainstorm/help.md +1 -1
  40. package/plugin/skills/ase-meta-changelog/help.md +1 -1
  41. package/plugin/skills/ase-meta-chat/help.md +1 -1
  42. package/plugin/skills/ase-meta-commit/help.md +1 -1
  43. package/plugin/skills/ase-meta-diaboli/SKILL.md +4 -4
  44. package/plugin/skills/ase-meta-diaboli/help.md +2 -2
  45. package/plugin/skills/ase-meta-diff/SKILL.md +2 -2
  46. package/plugin/skills/ase-meta-diff/help.md +1 -1
  47. package/plugin/skills/ase-meta-evaluate/help.md +2 -2
  48. package/plugin/skills/ase-meta-persona/help.md +1 -1
  49. package/plugin/skills/ase-meta-quorum/help.md +1 -1
  50. package/plugin/skills/ase-meta-review/SKILL.md +0 -1
  51. package/plugin/skills/ase-meta-review/help.md +2 -2
  52. package/plugin/skills/ase-meta-search/SKILL.md +9 -1
  53. package/plugin/skills/ase-meta-search/help.md +1 -1
  54. package/plugin/skills/ase-meta-steelman/help.md +2 -2
  55. package/plugin/skills/ase-meta-why/SKILL.md +6 -4
  56. package/plugin/skills/ase-meta-why/help.md +1 -1
  57. package/plugin/skills/ase-task-condense/SKILL.md +5 -2
  58. package/plugin/skills/ase-task-condense/help.md +2 -2
  59. package/plugin/skills/ase-task-delete/help.md +2 -2
  60. package/plugin/skills/ase-task-edit/SKILL.md +10 -4
  61. package/plugin/skills/ase-task-edit/help.md +2 -2
  62. package/plugin/skills/ase-task-grill/SKILL.md +5 -2
  63. package/plugin/skills/ase-task-grill/help.md +3 -3
  64. package/plugin/skills/ase-task-id/help.md +2 -2
  65. package/plugin/skills/ase-task-implement/SKILL.md +5 -2
  66. package/plugin/skills/ase-task-implement/help.md +2 -2
  67. package/plugin/skills/ase-task-list/help.md +2 -2
  68. package/plugin/skills/ase-task-preflight/SKILL.md +5 -2
  69. package/plugin/skills/ase-task-preflight/help.md +2 -2
  70. package/plugin/skills/ase-task-reboot/SKILL.md +5 -2
  71. package/plugin/skills/ase-task-reboot/help.md +2 -2
  72. package/plugin/skills/ase-task-rename/help.md +2 -2
  73. package/plugin/skills/ase-task-view/help.md +2 -2
@@ -37,13 +37,29 @@ for the technology stack to *provide* the *needed functionality*
37
37
 
38
38
  <flow>
39
39
  1. <step id="STEP 1: Determine Functionality">
40
- - Derive the needed <functionality/> from the <request/>, but keep
40
+ 1. Derive the needed <functionality/> from the <request/>, but keep
41
41
  the functionality description very *brief* but still *precise*.
42
42
 
43
- - If <functionality/> is not clear or not precise enough, raise
44
- questions to the user with the help of an interactive user dialog tool.
43
+ 2. If <functionality/> is not clear, not precise, or not specific
44
+ enough, let the *user interactively choose* the intended
45
+ functionality.
45
46
 
46
- - Display the determined final functionality with just the following
47
+ In the following, you *MUST* *NOT* use the <user-dialog-tool/>
48
+ tool! Instead, you *MUST* just show a custom output, let the
49
+ user enter input, and then you set the result accordingly.
50
+
51
+ <expand name="custom-dialog" arg1="--no-other">
52
+ Functionality: Which functionality should the components provide?
53
+ <answer-1/>: (grounded candidate functionality 1)
54
+ <answer-2/>: (grounded candidate functionality 2)
55
+ <answer-3/>: (grounded candidate functionality 2)
56
+ <answer-4/>: (grounded candidate functionality 3)
57
+ </expand>
58
+
59
+ Then use the <result/> and its corresponding grounded candidate
60
+ functionality to adjust <functionality/> accordingly.
61
+
62
+ 3. Display the determined final functionality with just the following
47
63
  <template/>:
48
64
 
49
65
  <template>
@@ -52,32 +68,32 @@ for the technology stack to *provide* the *needed functionality*
52
68
  </step>
53
69
 
54
70
  2. <step id="STEP 2: Determine Technology Stack">
55
- - Determine the used technology stack:
71
+ 1. Determine the used technology stack:
56
72
 
57
- - If a file `package.json` is found in the top-level directory
73
+ 1. If a file `package.json` is found in the top-level directory
58
74
  of the project and contains an entry `typescript` under `dependencies`
59
75
  or `devDependencies`, then <stack>TypeScript</stack>.
60
76
 
61
- - Else, if a file `package.json` is found in the top-level directory
77
+ 2. Else, if a file `package.json` is found in the top-level directory
62
78
  of the project, then <stack>JavaScript</stack>.
63
79
 
64
- - Else, if a file `build.gradle.kts` or `settings.gradle.kts`
80
+ 3. Else, if a file `build.gradle.kts` or `settings.gradle.kts`
65
81
  is found in the top-level directory, then <stack>Kotlin</stack>.
66
82
 
67
- - Else, if a file `build.gradle` is found in the top-level directory and
83
+ 4. Else, if a file `build.gradle` is found in the top-level directory and
68
84
  is applying `kotlin`, `org.jetbrains.kotlin.jvm`, `kotlin-android`,
69
85
  or `kotlin-multiplatform` plugins, then <stack>Kotlin</stack>.
70
86
 
71
- - Else, if a file `pom.xml` is found in the top-level directory and
87
+ 5. Else, if a file `pom.xml` is found in the top-level directory and
72
88
  contains `kotlin-maven-plugin` or `kotlin-stdlib` dependencies, then
73
89
  <stack>Kotlin</stack>.
74
90
 
75
- - Else, if a file `pom.xml` or `build.gradle` is found in the top-level directory
91
+ 6. Else, if a file `pom.xml` or `build.gradle` is found in the top-level directory
76
92
  of the project, then <stack>Java</stack>.
77
93
 
78
- - Else, use <stack>Unknown</stack>.
94
+ 7. Else, use <stack>Unknown</stack>.
79
95
 
80
- - Display the determined final technology stack with just the
96
+ 2. Display the determined final technology stack with just the
81
97
  following <template/>:
82
98
 
83
99
  <template>
@@ -86,7 +102,7 @@ for the technology stack to *provide* the *needed functionality*
86
102
  </step>
87
103
 
88
104
  3. <step id="STEP 3: Discover Components">
89
- - If <stack/> is "Unknown", the technology stack could not be
105
+ 1. If <stack/> is "Unknown", the technology stack could not be
90
106
  determined and no component discovery backend is available.
91
107
  Inform the user with just the following <template/> and then
92
108
  *STOP* the entire flow (do not perform any further steps):
@@ -95,26 +111,26 @@ for the technology stack to *provide* the *needed functionality*
95
111
  <ase-tpl-bullet-normal/> **RESULT**: technology stack could not be determined -- component discovery is only supported for JavaScript, TypeScript, Java, and Kotlin projects.
96
112
  </template>
97
113
 
98
- - From <stack/> and <functionality/>, derive essential keywords
114
+ 2. From <stack/> and <functionality/>, derive essential keywords
99
115
  <keyword-L/> (L=1-M), which allow you to search for suitable
100
116
  components.
101
117
 
102
- - In the to be discovered result set of components <component-K/>
118
+ 3. In the to be discovered result set of components <component-K/>
103
119
  (K=1-N), remember the component name as <name-K/>, the
104
120
  official package name as <package-K/>, the latest version as
105
121
  <version-K/>, the stars as <stars-K/>, the created date as
106
122
  <created-K/>, the last updated date as <updated-K/>, the total
107
123
  number of downloads in the last month as <downloads-K/>.
108
124
 
109
- - If <stack/> is "JavaScript" or "TypeScript":
125
+ 4. If <stack/> is "JavaScript" or "TypeScript":
110
126
 
111
- - Based on the essential keywords <keyword-L/> (L=1-M),
127
+ 1. Based on the essential keywords <keyword-L/> (L=1-M),
112
128
  use the `ase-meta-search` skill in a subagent to *generally*
113
129
  discover an initial set of a maximum of <getopt-option-limit/> *NPM packages*
114
130
  <component-K/> and at least their real name <name-K/> and
115
131
  their unique package names <package-K/>.
116
132
 
117
- - Use the shell command `npm search --json --searchlimit <getopt-option-limit/>
133
+ 2. Use the shell command `npm search --json --searchlimit <getopt-option-limit/>
118
134
  "<keyword-1/>" [...] "<keyword-M/>"` to *specifically*
119
135
  discover an additional set of a maximum of <getopt-option-limit/> *NPM packages*
120
136
  <component-K/> and at least their unique package names
@@ -122,16 +138,16 @@ for the technology stack to *provide* the *needed functionality*
122
138
  (L=1-M). Merge the results into the already existing result
123
139
  set, but deduplicate entries.
124
140
 
125
- - If <stack/> is "Java" or "Kotlin":
141
+ 5. If <stack/> is "Java" or "Kotlin":
126
142
 
127
- - Based on the essential keywords <keyword-L/> (L=1-M),
143
+ 1. Based on the essential keywords <keyword-L/> (L=1-M),
128
144
  use the `ase-meta-search` skill in a subagent to *generally*
129
145
  discover an initial set of a maximum of <getopt-option-limit/> *Maven packages*
130
146
  <component-K/> and at least their real name <name-K/> and
131
147
  their unique Maven coordinates <package-K/> of the form
132
148
  `groupId:artifactId`.
133
149
 
134
- - Use the shell command `curl -s 'https://search.maven.org/solrsearch/select?q=<keyword-1/>+[...]+<keyword-M/>&rows=<getopt-option-limit/>&wt=json'`
150
+ 2. Use the shell command `curl -s 'https://search.maven.org/solrsearch/select?q=<keyword-1/>+[...]+<keyword-M/>&rows=<getopt-option-limit/>&wt=json'`
135
151
  to *specifically* discover an additional set of a maximum
136
152
  of <getopt-option-limit/> *Maven packages* <component-K/> and at least their
137
153
  unique Maven coordinates <package-K/> (i.e. `<g/>:<a/>` from
@@ -140,7 +156,7 @@ for the technology stack to *provide* the *needed functionality*
140
156
  into the already existing result set, but deduplicate
141
157
  entries by Maven coordinate.
142
158
 
143
- - Call the `ase_component_info(stack: "<stack/>", components:
159
+ 6. Call the `ase_component_info(stack: "<stack/>", components:
144
160
  [ "<package-1/>", ..., "<package-N/>" ])` tool of the `ase` MCP
145
161
  server *once* for the entire set of discovered packages.
146
162
  The tool dispatches internally on <stack/> and fetches all
@@ -154,11 +170,11 @@ for the technology stack to *provide* the *needed functionality*
154
170
  from `downloads` (numeric or `N.A.`) and <rank-K/> from `rank`
155
171
  (numeric).
156
172
 
157
- - Sort, in descending order, the discovered components
173
+ 7. Sort, in descending order, the discovered components
158
174
  <component-K/> (K=1-N) by their `rank` field and trim the result
159
175
  list to just a maximum of <getopt-option-limit/> total components.
160
176
 
161
- - For each component <component-K/> (K=1-N), research and then
177
+ 8. For each component <component-K/> (K=1-N), research and then
162
178
  decide which *one* of *USP* (Unique Selling Point -- what makes
163
179
  it unique), *Crux* (what you should notice), or *Gotcha* (what
164
180
  you should not stumble over) is its single most distinguishing
@@ -169,7 +185,7 @@ for the technology stack to *provide* the *needed functionality*
169
185
  </step>
170
186
 
171
187
  4. <step id="STEP 4: Report Components">
172
- - Display the determined, individual components as a Markdown
188
+ 1. Display the determined, individual components as a Markdown
173
189
  *table* with just the following <template/> and do not output
174
190
  anything else:
175
191
 
@@ -183,7 +199,7 @@ for the technology stack to *provide* the *needed functionality*
183
199
  | **<name-N/>** | `<package-N/>` | <info-N/> |
184
200
  </template>
185
201
 
186
- - Display the discovered components as a Markdown *table*
202
+ 2. Display the discovered components as a Markdown *table*
187
203
  with just the following <template/>:
188
204
 
189
205
  <template>
@@ -59,4 +59,4 @@ Discover a broader set of up to 20 HTTP client components:
59
59
 
60
60
  ## SEE ALSO
61
61
 
62
- `ase-arch-analyze`, `ase-meta-search`, `ase-meta-evaluate`.
62
+ [`ase-arch-analyze`](../ase-arch-analyze/help.md), [`ase-meta-search`](../ase-meta-search/help.md), [`ase-meta-evaluate`](../ase-meta-evaluate/help.md).
@@ -83,5 +83,5 @@ Analyze a directory, reporting only `MEDIUM` and `HIGH` problems:
83
83
 
84
84
  ## SEE ALSO
85
85
 
86
- `ase-code-resolve`, `ase-code-refactor`, `ase-code-lint`,
87
- `ase-code-explain`, `ase-arch-analyze`.
86
+ [`ase-code-resolve`](../ase-code-resolve/help.md), [`ase-code-refactor`](../ase-code-refactor/help.md), [`ase-code-lint`](../ase-code-lint/help.md),
87
+ [`ase-code-explain`](../ase-code-explain/help.md), [`ase-arch-analyze`](../ase-arch-analyze/help.md).
@@ -53,7 +53,9 @@ You *MUST* *NOT* call `Edit`, `Write`, `NotebookEdit`, or any
53
53
  filesystem-modifying tool during this entire skill. The *only*
54
54
  permitted way to persist artifacts is via `ase_task_save(...)`.
55
55
 
56
- 1. **Reason About Feature**:
56
+ <flow>
57
+
58
+ 1. <step id="STEP 1: Reason About Feature">
57
59
 
58
60
  1. <if condition="
59
61
  <feature/> matches the regexp `^[a-zA-Z][a-zA-Z0-9_-]*$`
@@ -114,7 +116,9 @@ permitted way to persist artifacts is via `ase_task_save(...)`.
114
116
 
115
117
  8. Do not output anything in this step, unless you asked the user.
116
118
 
117
- 2. **Investigate Code Base**:
119
+ </step>
120
+
121
+ 2. <step id="STEP 2: Investigate Code Base">
118
122
 
119
123
  1. Check the existing source files for all code which is related to the
120
124
  requested new <feature/>.
@@ -122,9 +126,11 @@ permitted way to persist artifacts is via `ase_task_save(...)`.
122
126
  2. Check the architecture of the existing code base to understand the
123
127
  overall structures and dynamics.
124
128
 
125
- 3. Do not output anything in this step.
129
+ 3. Do not output anything in this STEP 2.
130
+
131
+ </step>
126
132
 
127
- 3. **Internalize Crafting Tenets**:
133
+ 3. <step id="STEP 3: Internalize Crafting Tenets">
128
134
 
129
135
  You *MUST* internalize and honor the following tenets when crafting the new feature.
130
136
  Do not output anything.
@@ -179,7 +185,9 @@ permitted way to persist artifacts is via `ase_task_save(...)`.
179
185
  Honor the non-functional requirements Performance, Security,
180
186
  Scalability, Comprehensibility.
181
187
 
182
- 4. **Find Feature Crafting Approaches**:
188
+ </step>
189
+
190
+ 4. <step id="STEP 4: Choose Feature Crafting Approaches">
183
191
 
184
192
  You *MUST* perform the following sub-steps *internally* and *without
185
193
  any output* until and including the recommendation decision. Only
@@ -208,16 +216,14 @@ permitted way to persist artifacts is via `ase_task_save(...)`.
208
216
  </template>
209
217
 
210
218
  5. Now report each approach with the following <template/>,
211
- inlining its pros/cons derived in sub-step 2:
219
+ inlining its pros/cons derived in sub-step 2, and do not output
220
+ anything else in this step:
212
221
 
213
222
  <template>
214
- ● **APPROACH A<n/>**<annotation/>: *<summary/>*
215
- ○ [...]
216
- ○ [...]
223
+ ● **APPROACH A<n/>**<annotation/>: **<summary/>**
217
224
  ○ [...]
218
- **PRO**: [...]
219
- **CON**: [...]
220
- <optional-diagram/>
225
+ *PRO*: [...]
226
+ *CON*: [...]
221
227
  </template>
222
228
 
223
229
  Hints:
@@ -225,23 +231,7 @@ permitted way to persist artifacts is via `ase_task_save(...)`.
225
231
  - Give a short one-sentence <summary/> of the feature
226
232
  approach plus *precise* and *ultra brief and concise*
227
233
  feature information. Try to keep the number of bullet points
228
- () in the range of 1-4.
229
-
230
- - In case of a *complex feature situation* only, visualize
231
- it with an optional diagram <optional-diagram/> by building
232
- a Mermaid specification <mermaid-spec/> (e.g. `flowchart
233
- TB`, `stateDiagram-v2`, `sequenceDiagram`, `classDiagram`,
234
- or `erDiagram`, depending on intent) and dispatching the
235
- rendering to the `ase-meta-diagram` sub-agent by calling
236
- the tool `Agent(name: "ase-meta-diagram", description:
237
- "Diagram Rendering", subagent_type: "ase:ase-meta-diagram",
238
- prompt: <mermaid-spec/>)`, reproducing its returned fenced
239
- code block verbatim. For *current vs. proposed* comparisons,
240
- render each side as a *separate* `ase-meta-diagram`
241
- invocation and stack the rendered blocks *vertically*
242
- (labels `**Before:**` / `**After:**`); never side-by-side.
243
- Omit <optional-diagram/> entirely for simple or purely local
244
- situations.
234
+ (`○ [...]`) in the range of 1-4.
245
235
 
246
236
  6. Indicate end of reporting by showing the following <template/>:
247
237
 
@@ -249,28 +239,41 @@ permitted way to persist artifacts is via `ase_task_save(...)`.
249
239
  <ase-tpl-foot title="APPROACHES"/>
250
240
  </template>
251
241
 
252
- 5. **Choose Feature Crafting Approach**:
242
+ 7. <if condition="<getopt-option-auto/> is not equal `true`">
243
+
244
+ In the following, you *MUST* *NOT* use the <user-dialog-tool/>
245
+ tool! Instead, you *MUST* just show a custom output, let the
246
+ user enter input, and then you set the result accordingly.
247
+
248
+ Let the user choose the preferred approach A<n/> by raising
249
+ a question with the following custom dialog, where per
250
+ approach A<n/>, you determine an ultra brief summary
251
+ <short-summary/> and then use the answer option `A<n/>:
252
+ ⚝ **RECOMMENDATION** ⚝: <short-summary/>` for your
253
+ recommended approach plus zero or more answer options `A<n/>:
254
+ <short-summary/>` for all other approaches:
255
+
256
+ <expand name="custom-dialog" arg1="--no-other">
257
+ Select Approach: Select your preferred crafting approach to follow?
258
+ A<n/>: <short-summary/>
259
+ [...]
260
+ </expand>
253
261
 
254
- 1. <if condition="<getopt-option-auto/> is equal `false`">
255
- Let the *user interactively choose* the preferred feature
256
- approach A<n/> with the help of the <user-dialog-tool/> tool.
257
- Use the header `Select Approach`, use `A<n/>: <short-summary/>`
258
- for the option (where <short-summary/> is an ultra brief summary
259
- of the approach A<n/>), and *single-selection* only and provide
260
- small *code change previews*. Mark your recommended feature
261
- approach with ` ⚝ **RECOMMENDATION** ⚝` here again.
262
262
  </if>
263
+ <else>
263
264
 
264
- 2. <else>
265
265
  Set <n/> to the number of the feature approach A<n/> you recommend.
266
266
  Output a hint with the following <template/>:
267
267
 
268
268
  <template>
269
269
  ⧉ **ASE**: ◉ task: **<ase-task-id/>**, ▶ status: **auto-chosen approach A<n/>**
270
270
  </template>
271
+
271
272
  </else>
272
273
 
273
- 6. **Compose Feature Crafting Plan**:
274
+ </step>
275
+
276
+ 5. <step id="STEP 5: Compose Feature Crafting Plan">
274
277
 
275
278
  1. *Compose a feature plan* for the chosen feature A<n/> by
276
279
  closely aligning to the existing architecture and the existing
@@ -300,7 +303,7 @@ permitted way to persist artifacts is via `ase_task_save(...)`.
300
303
  <timestamp-modified/> information and calculate the number of
301
304
  words <words/> of <content/>.
302
305
 
303
- 3. You *MUST* *save* the resulting plan content with the
306
+ 3. You then *MUST* *save* the resulting plan content with the
304
307
  `ase_task_save(id: "<ase-task-id/>", text: "<content/>")`.
305
308
 
306
309
  4. Output a hint with the following <template/>:
@@ -351,3 +354,6 @@ permitted way to persist artifacts is via `ase_task_save(...)`.
351
354
  Then call the tool `Skill(skill: "ase:ase-task-edit", args: "<args/>")`.
352
355
  </else>
353
356
 
357
+ </step>
358
+
359
+ </flow>
@@ -86,5 +86,5 @@ Craft a feature under a named task and directly hand off to implementation:
86
86
 
87
87
  ## SEE ALSO
88
88
 
89
- `ase-code-refactor`, `ase-code-resolve`, `ase-task-edit`,
90
- `ase-task-preflight`, `ase-task-implement`.
89
+ [`ase-code-refactor`](../ase-code-refactor/help.md), [`ase-code-resolve`](../ase-code-resolve/help.md), [`ase-task-edit`](../ase-task-edit/help.md),
90
+ [`ase-task-preflight`](../ase-task-preflight/help.md), [`ase-task-implement`](../ase-task-implement/help.md).
@@ -40,4 +40,4 @@ Explain a specific function:
40
40
 
41
41
  ## SEE ALSO
42
42
 
43
- `ase-code-insight`, `ase-code-analyze`, `ase-arch-analyze`.
43
+ [`ase-code-insight`](../ase-code-insight/help.md), [`ase-code-analyze`](../ase-code-analyze/help.md), [`ase-arch-analyze`](../ase-arch-analyze/help.md).
@@ -7,10 +7,11 @@ user-invocable: true
7
7
  disable-model-invocation: false
8
8
  effort: high
9
9
  allowed-tools:
10
- - "Bash(git)"
11
- - "Bash(sort)"
12
- - "Bash(uniq)"
13
- - "Bash(head)"
10
+ - "Bash(git *)"
11
+ - "Bash(grep *)"
12
+ - "Bash(sort *)"
13
+ - "Bash(uniq *)"
14
+ - "Bash(head *)"
14
15
  - "Skill"
15
16
  - "Agent"
16
17
  ---
@@ -40,4 +40,4 @@ Get insights into a specific subsystem:
40
40
 
41
41
  ## SEE ALSO
42
42
 
43
- `ase-code-explain`, `ase-code-analyze`, `ase-arch-analyze`.
43
+ [`ase-code-explain`](../ase-code-explain/help.md), [`ase-code-analyze`](../ase-code-analyze/help.md), [`ase-arch-analyze`](../ase-arch-analyze/help.md).
@@ -100,10 +100,12 @@ related to a set of code quality aspects.
100
100
 
101
101
  3. <step id="STEP 3: Correction">
102
102
 
103
- 1. You *MUST* call the MCP tool `ase_config_set(key: "agent.skill", val:
104
- "ase-code-lint", scope: "session:<ase-session-id/>")` of the
105
- `ase` MCP server. You *MUST* *NOT* output anything related to
106
- this.
103
+ 1. *Mark this skill as the active edit-capable skill* so that the
104
+ ASE `pre-tool-use` hook auto-approves the subsequent `Edit`
105
+ invocations on *any* invocation path (slash command *or* `Skill`
106
+ tool). Call the `ase_config_set(key: "agent.skill", val:
107
+ "ase-code-lint", scope: "session:<ase-session-id/>")` tool
108
+ from the `ase` MCP server. Do not output anything in this substep.
107
109
 
108
110
  2. Iterate over all problems:
109
111
 
@@ -150,7 +152,7 @@ related to a set of code quality aspects.
150
152
  3. Append the following <template/> to <diff-file/>:
151
153
 
152
154
  <template>
153
- @@ -<old-start/>,<n/> +<new-start/>,<m/> @@
155
+ @@ -<old-start/>,<old-count/> +<new-start/>,<new-count/> @@
154
156
  <context-before/>
155
157
  -<old-text/>
156
158
  +<new-text/>
@@ -162,10 +164,10 @@ related to a set of code quality aspects.
162
164
  the line of <context-before/> (one before <line/>).
163
165
  - The <new-start/> is the same as <old-start/> (the unchanged
164
166
  <context-before/> line shares the same start in both files).
165
- - The <n/> is the total number of old-side hunk lines, i.e.,
167
+ - The <old-count/> is the total number of old-side hunk lines, i.e.,
166
168
  the number of lines in <context-before/>, <old-text/>, and
167
169
  <context-after/> combined.
168
- - The <m/> is the total number of new-side hunk lines, i.e.,
170
+ - The <new-count/> is the total number of new-side hunk lines, i.e.,
169
171
  the number of lines in <context-before/>, <new-text/>, and
170
172
  <context-after/> combined.
171
173
 
@@ -213,9 +215,11 @@ related to a set of code quality aspects.
213
215
 
214
216
  6. <if condition="<getopt-option-auto/> is not 'true'">
215
217
 
216
- Ask the user how to proceed via an interactive user dialog:
218
+ In the following, you *MUST* *NOT* use the <user-dialog-tool/>
219
+ tool! Instead, you *MUST* just show a custom output, let the
220
+ user enter input, and then you set the result accordingly.
217
221
 
218
- <expand name="user-dialog">
222
+ <expand name="custom-dialog" arg1="--other">
219
223
  CORRECTION: How would you like to proceed with this proposed correction?
220
224
  ACCEPT: Apply the proposed correction.
221
225
  REJECT: Skip this proposed correction.
@@ -234,8 +238,11 @@ related to a set of code quality aspects.
234
238
 
235
239
  - <if condition="<result/> is 'ACCEPT'">
236
240
  Invoke the `Edit` tool to apply the changes exactly
237
- as shown in the <diff/>. After applying the changes,
238
- just continue with the next <item/>.
241
+ as shown in the <diff/>. The operation will be
242
+ auto-approved by the ASE `pre-tool-use` hook (which
243
+ tracks the active skill), so *no* interactive permission
244
+ prompt will appear. After applying the changes, just
245
+ continue with the next <item/>.
239
246
  </if>
240
247
 
241
248
  - <if condition="<result/> starts with 'OTHER'">
@@ -257,9 +264,11 @@ related to a set of code quality aspects.
257
264
 
258
265
  </for>
259
266
 
260
- 3. You *MUST* call the MCP tool `ase_config_delete(key: "agent.skill",
261
- scope: "session:<ase-session-id/>")` of the `ase` MCP server.
262
- You *MUST* *NOT* output anything related to this.
267
+ 3. *Clear the active edit-capable skill marker* now that all `Edit`
268
+ invocations are done, so a later unrelated `Edit` is *not*
269
+ auto-approved. Call the `ase_config_delete(key: "agent.skill",
270
+ scope: "session:<ase-session-id/>")` tool from the `ase` MCP
271
+ server. Do not output anything in this substep.
263
272
 
264
273
  4. You *MUST* *NOT* output any further additional explanations or
265
274
  summaries at the end of this skill processing, except for the
@@ -63,5 +63,5 @@ Lint a directory, reporting only `MEDIUM` and `HIGH` findings:
63
63
 
64
64
  ## SEE ALSO
65
65
 
66
- `ase-code-analyze`, `ase-code-resolve`, `ase-code-refactor`,
67
- `ase-docs-proofread`.
66
+ [`ase-code-analyze`](../ase-code-analyze/help.md), [`ase-code-resolve`](../ase-code-resolve/help.md), [`ase-code-refactor`](../ase-code-refactor/help.md),
67
+ [`ase-docs-proofread`](../ase-docs-proofread/help.md).
@@ -53,7 +53,9 @@ You *MUST* *NOT* call `Edit`, `Write`, `NotebookEdit`, or any
53
53
  filesystem-modifying tool during this entire skill. The *only*
54
54
  permitted way to persist artifacts is via `ase_task_save(...)`.
55
55
 
56
- 1. **Reason About Refactoring**:
56
+ <flow>
57
+
58
+ 1. <step id="STEP 1: Reason About Refactoring">
57
59
 
58
60
  1. <if condition="
59
61
  <request/> matches the regexp `^[a-zA-Z][a-zA-Z0-9_-]*$`
@@ -114,7 +116,9 @@ permitted way to persist artifacts is via `ase_task_save(...)`.
114
116
 
115
117
  8. Do not output anything in this step, unless you asked the user.
116
118
 
117
- 2. **Investigate Code Base**:
119
+ </step>
120
+
121
+ 2. <step id="STEP 2: Investigate Code Base">
118
122
 
119
123
  1. Check the existing source files for all code which is related to the
120
124
  refactoring <request/>.
@@ -122,9 +126,11 @@ permitted way to persist artifacts is via `ase_task_save(...)`.
122
126
  2. Check the architecture of the existing code base to understand the
123
127
  overall structures and dynamics.
124
128
 
125
- 3. Do not output anything in this step.
129
+ 3. Do not output anything in this STEP 2.
126
130
 
127
- 3. **Internalize Refactoring Tenets**:
131
+ </step>
132
+
133
+ 3. <step id="STEP 3: Internalize Refactoring Tenets">
128
134
 
129
135
  You *MUST* internalize and honor the following tenets when refactoring.
130
136
  Do not output anything.
@@ -168,7 +174,9 @@ permitted way to persist artifacts is via `ase_task_save(...)`.
168
174
  Design clear interfaces, contracts, and data models --
169
175
  with high attention to boundaries and modularity.
170
176
 
171
- 4. **Find Refactoring Approaches**:
177
+ </step>
178
+
179
+ 4. <step id="STEP 4: Choose Refactoring Approaches">
172
180
 
173
181
  You *MUST* perform the following sub-steps *internally* and *without
174
182
  any output* until and including the recommendation decision. Only
@@ -201,13 +209,10 @@ permitted way to persist artifacts is via `ase_task_save(...)`.
201
209
  anything else in this step:
202
210
 
203
211
  <template>
204
- ● **APPROACH A<n/>**<annotation/>: *<summary/>*
212
+ ● **APPROACH A<n/>**<annotation/>: **<summary/>**
205
213
  ○ [...]
206
- [...]
207
- [...]
208
- ⊕ **PRO**: [...]
209
- ⊖ **CON**: [...]
210
- <optional-diagram/>
214
+ *PRO*: [...]
215
+ *CON*: [...]
211
216
  </template>
212
217
 
213
218
  Hints:
@@ -215,23 +220,7 @@ permitted way to persist artifacts is via `ase_task_save(...)`.
215
220
  - Give a short one-sentence <summary/> of the refactoring
216
221
  approach plus *precise* and *ultra brief and concise*
217
222
  refactoring information. Try to keep the number of bullet
218
- points () in the range of 1-4.
219
-
220
- - In case of a *complex refactoring situation* only,
221
- visualize it with an optional diagram <optional-diagram/>
222
- by building a Mermaid specification <mermaid-spec/>
223
- (e.g. `flowchart TB`, `stateDiagram-v2`, `sequenceDiagram`,
224
- `classDiagram`, or `erDiagram`, depending on intent) and
225
- dispatching the rendering to the `ase-meta-diagram`
226
- sub-agent by calling the tool `Agent(name: "ase-meta-diagram",
227
- description: "Diagram Rendering", subagent_type:
228
- "ase:ase-meta-diagram", prompt: <mermaid-spec/>)`, reproducing
229
- its returned fenced code block verbatim. For *current
230
- vs. proposed* comparisons, render each side as a *separate*
231
- `ase-meta-diagram` invocation and stack the rendered blocks
232
- *vertically* (labels `**Before:**` / `**After:**`); never
233
- side-by-side. Omit <optional-diagram/> entirely for simple
234
- or purely local situations.
223
+ points (`○ [...]`) in the range of 1-4.
235
224
 
236
225
  6. Indicate end of reporting by showing the following <template/>:
237
226
 
@@ -239,29 +228,41 @@ permitted way to persist artifacts is via `ase_task_save(...)`.
239
228
  <ase-tpl-foot title="APPROACHES"/>
240
229
  </template>
241
230
 
242
- 5. **Choose Refactoring Approach**:
243
-
244
- 1. <if condition="<getopt-option-auto/> is not 'true'">
245
- Let the *user interactively choose* the preferred refactoring
246
- approach A<n/> with the help of the <user-dialog-tool/> tool.
247
- Use the header `Select Approach`, use `A<n/>: <short-summary/>`
248
- for the option (where <short-summary/> is an ultra brief summary
249
- of the approach A<n/>), and *single-selection* only and provide
250
- small *code change previews*. Mark your recommended refactoring
251
- approach with ` **RECOMMENDATION** ⚝` here again. Except for
252
- the interactive selection, do not output anything in this step.
231
+ 7. <if condition="<getopt-option-auto/> is not `true`">
232
+
233
+ In the following, you *MUST* *NOT* use the <user-dialog-tool/>
234
+ tool! Instead, you *MUST* just show a custom output, let the
235
+ user enter input, and then you set the result accordingly.
236
+
237
+ Let the user choose the preferred approach A<n/> by raising
238
+ a question with the following custom dialog, where per
239
+ approach A<n/>, you determine an ultra brief summary
240
+ <short-summary/> and then use the answer option `A<n/>:
241
+ **RECOMMENDATION** ⚝: <short-summary/>` for your
242
+ recommended approach plus zero or more answer options `A<n/>:
243
+ <short-summary/>` for all other approaches:
244
+
245
+ <expand name="custom-dialog" arg1="--no-other">
246
+ Select Approach: Select your preferred refactoring approach to follow?
247
+ A<n/>: <short-summary/>
248
+ [...]
249
+ </expand>
250
+
253
251
  </if>
252
+ <else>
254
253
 
255
- 2. <else>
256
254
  Set <n/> to the number of the refactoring approach A<n/> you recommend.
257
255
  Output a hint with the following <template/>:
258
256
 
259
257
  <template>
260
258
  ⧉ **ASE**: ◉ task: **<ase-task-id/>**, ▶ status: **auto-chosen approach A<n/>**
261
259
  </template>
260
+
262
261
  </else>
263
262
 
264
- 6. **Compose Refactoring Plan**:
263
+ </step>
264
+
265
+ 5. <step id="STEP 5: Compose Refactoring Plan">
265
266
 
266
267
  1. *Compose a refactoring plan* for the chosen refactoring A<n/> by
267
268
  closely aligning to the existing architecture and the existing
@@ -342,3 +343,7 @@ permitted way to persist artifacts is via `ase_task_save(...)`.
342
343
  Then call the tool `Skill(skill: "ase:ase-task-edit", args: "<args/>")`.
343
344
  </else>
344
345
 
346
+ </step>
347
+
348
+ </flow>
349
+
@@ -86,5 +86,5 @@ Refactor under a named task and directly hand off to implementation:
86
86
 
87
87
  ## SEE ALSO
88
88
 
89
- `ase-code-craft`, `ase-code-resolve`, `ase-task-edit`,
90
- `ase-task-preflight`, `ase-task-implement`.
89
+ [`ase-code-craft`](../ase-code-craft/help.md), [`ase-code-resolve`](../ase-code-resolve/help.md), [`ase-task-edit`](../ase-task-edit/help.md),
90
+ [`ase-task-preflight`](../ase-task-preflight/help.md), [`ase-task-implement`](../ase-task-implement/help.md).