@rse/ase 0.9.8 → 0.9.9
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-getopt.js +60 -4
- package/dst/ase-hook.js +6 -21
- package/dst/ase-markdown.js +32 -11
- package/dst/ase-mcp.js +22 -8
- package/dst/ase-notify.js +32 -0
- package/dst/ase-service.js +5 -2
- package/dst/ase-setup.js +45 -131
- package/dst/ase-skills.js +17 -13
- package/dst/ase-statusline.js +8 -12
- package/dst/ase-task.js +12 -2
- package/package.json +2 -2
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/.github/plugin/plugin.json +1 -1
- package/plugin/meta/ase-dialog.md +105 -7
- package/plugin/meta/ase-getopt.md +31 -23
- package/plugin/meta/ase-skill.md +62 -6
- package/plugin/package.json +1 -1
- package/plugin/skills/ase-arch-analyze/help.md +2 -2
- package/plugin/skills/ase-arch-discover/SKILL.md +40 -27
- package/plugin/skills/ase-arch-discover/help.md +1 -1
- package/plugin/skills/ase-code-analyze/help.md +2 -2
- package/plugin/skills/ase-code-craft/SKILL.md +43 -38
- package/plugin/skills/ase-code-craft/help.md +2 -2
- package/plugin/skills/ase-code-explain/help.md +1 -1
- package/plugin/skills/ase-code-insight/help.md +1 -1
- package/plugin/skills/ase-code-lint/SKILL.md +20 -11
- package/plugin/skills/ase-code-lint/help.md +2 -2
- package/plugin/skills/ase-code-refactor/SKILL.md +42 -38
- package/plugin/skills/ase-code-refactor/help.md +2 -2
- package/plugin/skills/ase-code-resolve/SKILL.md +42 -37
- package/plugin/skills/ase-code-resolve/help.md +3 -3
- package/plugin/skills/ase-docs-distill/help.md +1 -1
- package/plugin/skills/ase-docs-proofread/SKILL.md +18 -10
- package/plugin/skills/ase-docs-proofread/help.md +1 -1
- package/plugin/skills/ase-meta-brainstorm/SKILL.md +5 -3
- package/plugin/skills/ase-meta-brainstorm/help.md +1 -1
- package/plugin/skills/ase-meta-changelog/help.md +1 -1
- package/plugin/skills/ase-meta-chat/help.md +1 -1
- package/plugin/skills/ase-meta-commit/help.md +1 -1
- package/plugin/skills/ase-meta-diaboli/help.md +2 -2
- package/plugin/skills/ase-meta-diff/SKILL.md +1 -1
- package/plugin/skills/ase-meta-diff/help.md +1 -1
- package/plugin/skills/ase-meta-evaluate/help.md +2 -2
- package/plugin/skills/ase-meta-persona/help.md +1 -1
- package/plugin/skills/ase-meta-quorum/help.md +1 -1
- package/plugin/skills/ase-meta-review/SKILL.md +0 -1
- package/plugin/skills/ase-meta-review/help.md +2 -2
- package/plugin/skills/ase-meta-search/help.md +1 -1
- package/plugin/skills/ase-meta-steelman/help.md +2 -2
- package/plugin/skills/ase-meta-why/help.md +1 -1
- package/plugin/skills/ase-task-condense/SKILL.md +4 -2
- package/plugin/skills/ase-task-condense/help.md +2 -2
- package/plugin/skills/ase-task-delete/help.md +2 -2
- package/plugin/skills/ase-task-edit/SKILL.md +8 -4
- package/plugin/skills/ase-task-edit/help.md +2 -2
- package/plugin/skills/ase-task-grill/SKILL.md +4 -2
- package/plugin/skills/ase-task-grill/help.md +3 -3
- package/plugin/skills/ase-task-id/help.md +2 -2
- package/plugin/skills/ase-task-implement/SKILL.md +4 -2
- package/plugin/skills/ase-task-implement/help.md +2 -2
- package/plugin/skills/ase-task-list/help.md +2 -2
- package/plugin/skills/ase-task-preflight/SKILL.md +4 -2
- package/plugin/skills/ase-task-preflight/help.md +2 -2
- package/plugin/skills/ase-task-reboot/SKILL.md +4 -2
- package/plugin/skills/ase-task-reboot/help.md +2 -2
- package/plugin/skills/ase-task-rename/help.md +2 -2
- package/plugin/skills/ase-task-view/help.md +2 -2
package/dst/ase-statusline.js
CHANGED
|
@@ -245,12 +245,14 @@ export default class StatuslineCommand {
|
|
|
245
245
|
out += ansi;
|
|
246
246
|
col += raw.length;
|
|
247
247
|
};
|
|
248
|
-
/* active <color> span state: when non-null,
|
|
249
|
-
|
|
248
|
+
/* active <color> span state: when non-null, each emitted chunk is colored
|
|
249
|
+
individually and passed straight through appendOutput, so column
|
|
250
|
+
accounting and line-wrapping continue to work per-chunk inside the span
|
|
251
|
+
instead of treating the whole colored run as one atomic chunk */
|
|
250
252
|
let span = null;
|
|
251
253
|
const emit = (chunk) => {
|
|
252
|
-
if (span !== null)
|
|
253
|
-
span.
|
|
254
|
+
if (span !== null && span.color !== "default")
|
|
255
|
+
appendOutput((c[span.color])(chunk));
|
|
254
256
|
else
|
|
255
257
|
appendOutput(chunk);
|
|
256
258
|
};
|
|
@@ -446,13 +448,7 @@ export default class StatuslineCommand {
|
|
|
446
448
|
};
|
|
447
449
|
/* walk each template line and render */
|
|
448
450
|
const closeSpan = () => {
|
|
449
|
-
|
|
450
|
-
const wrapped = span.color === "default" ?
|
|
451
|
-
span.buf :
|
|
452
|
-
(c[span.color])(span.buf);
|
|
453
|
-
span = null;
|
|
454
|
-
appendOutput(wrapped);
|
|
455
|
-
}
|
|
451
|
+
span = null;
|
|
456
452
|
};
|
|
457
453
|
for (const line of tmpl) {
|
|
458
454
|
let i = 0;
|
|
@@ -465,7 +461,7 @@ export default class StatuslineCommand {
|
|
|
465
461
|
if (m[1] === "/")
|
|
466
462
|
closeSpan();
|
|
467
463
|
else if (span === null)
|
|
468
|
-
span = { color: m[2]
|
|
464
|
+
span = { color: m[2] };
|
|
469
465
|
i += m[0].length;
|
|
470
466
|
continue;
|
|
471
467
|
}
|
package/dst/ase-task.js
CHANGED
|
@@ -59,12 +59,22 @@ export class Task {
|
|
|
59
59
|
static baseDir(log) {
|
|
60
60
|
return path.join(Task.projectRoot(), Task.spec(log).basedir);
|
|
61
61
|
}
|
|
62
|
+
/* ensure a task id's "TASK-<id>.md" filename satisfies
|
|
63
|
+
the configured "files" miniglob */
|
|
64
|
+
static enforceFiles(log, id) {
|
|
65
|
+
const { files } = Task.spec(log);
|
|
66
|
+
const filename = `TASK-${id}.md`;
|
|
67
|
+
if (!picomatch(files, { dot: true })(filename))
|
|
68
|
+
throw new Error(`task: id "${id}" yields filename "${filename}" ` +
|
|
69
|
+
`which does not match the configured "files" glob "${files}"`);
|
|
70
|
+
}
|
|
62
71
|
/* resolve the on-disk path for a given task id; as a side effect,
|
|
63
72
|
eagerly migrate any legacy <basedir>/<id>/plan.md files to the
|
|
64
73
|
current <basedir>/TASK-<id>.md layout on first access (guarded by
|
|
65
74
|
a cheap check, so it is a no-op once the store is migrated) */
|
|
66
75
|
static path(log, id) {
|
|
67
76
|
Task.validateId(id);
|
|
77
|
+
Task.enforceFiles(log, id);
|
|
68
78
|
if (Task.needsMigration(log))
|
|
69
79
|
Task.migrateAll(log);
|
|
70
80
|
return path.join(Task.baseDir(log), `TASK-${id}.md`);
|
|
@@ -93,7 +103,7 @@ export class Task {
|
|
|
93
103
|
return [];
|
|
94
104
|
const migrated = [];
|
|
95
105
|
for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
|
|
96
|
-
if (!entry.isDirectory() || !/^[A-Za-z0-
|
|
106
|
+
if (!entry.isDirectory() || !/^[A-Za-z0-9_-]+$/.test(entry.name))
|
|
97
107
|
continue;
|
|
98
108
|
const id = entry.name;
|
|
99
109
|
const oldFile = path.join(dir, id, "plan.md");
|
|
@@ -138,7 +148,7 @@ export class Task {
|
|
|
138
148
|
}
|
|
139
149
|
/* rename a task by moving its <project>/<basedir>/TASK-<oldId>.md file
|
|
140
150
|
to <project>/<basedir>/TASK-<newId>.md; the embedded
|
|
141
|
-
"#
|
|
151
|
+
"# TASK <id>:" heading inside the plan content is rewritten to
|
|
142
152
|
the new id; returns true on success, false if the source task does
|
|
143
153
|
not exist; throws if the target id already exists */
|
|
144
154
|
static rename(log, oldId, newId) {
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"homepage": "http://github.com/rse/ase",
|
|
7
7
|
"repository": { "url": "git+https://github.com/rse/ase.git", "type": "git" },
|
|
8
8
|
"bugs": { "url": "http://github.com/rse/ase/issues" },
|
|
9
|
-
"version": "0.9.
|
|
9
|
+
"version": "0.9.9",
|
|
10
10
|
"license": "GPL-3.0-only",
|
|
11
11
|
"author": {
|
|
12
12
|
"name": "Dr. Ralf S. Engelschall",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"commander": "15.0.0",
|
|
45
|
-
"@dotenvx/dotenvx": "1.71.
|
|
45
|
+
"@dotenvx/dotenvx": "1.71.3",
|
|
46
46
|
"yaml": "2.9.0",
|
|
47
47
|
"valibot": "1.4.1",
|
|
48
48
|
"execa": "9.6.1",
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
|
|
2
|
-
|
|
3
2
|
User Dialog
|
|
4
3
|
===========
|
|
5
4
|
|
|
@@ -15,13 +14,16 @@ User Dialog
|
|
|
15
14
|
Let the *user interactively choose* an answer.
|
|
16
15
|
|
|
17
16
|
1. Take the following question specification:
|
|
17
|
+
|
|
18
18
|
<spec>
|
|
19
19
|
<content/>
|
|
20
20
|
</spec>
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
The first line of <spec/> (separated by newlines) is of the format:
|
|
23
|
+
`<question-label/>: <question-description/>`
|
|
23
24
|
|
|
24
|
-
|
|
25
|
+
The second and following lines of <spec/> (separated by newlines) are of the format:
|
|
26
|
+
`<label/>: <description/>`
|
|
25
27
|
|
|
26
28
|
The first line provides the question label and the question
|
|
27
29
|
description. The second and following lines each provide an
|
|
@@ -49,8 +51,8 @@ Let the *user interactively choose* an answer.
|
|
|
49
51
|
|
|
50
52
|
If <n/> is less than 2:
|
|
51
53
|
Set <result>ERROR: user-dialog requires 2-4 answer lines, got <n/></result>
|
|
52
|
-
and *SKIP* the following step 2 (do not call `AskUserQuestion`)
|
|
53
|
-
and continue with step 3 dispatch.
|
|
54
|
+
and *SKIP* the following step 2.2 (do not call `AskUserQuestion`)
|
|
55
|
+
and continue with step 2.3 dispatch.
|
|
54
56
|
|
|
55
57
|
2. Call the `AskUserQuestion` tool of the agent harness with:
|
|
56
58
|
|
|
@@ -103,8 +105,8 @@ Let the *user interactively choose* an answer.
|
|
|
103
105
|
|
|
104
106
|
If <n/> is less than 2:
|
|
105
107
|
Set <result>ERROR: user-dialog requires 2-4 answer lines, got <n/></result>
|
|
106
|
-
and *SKIP* the following step 2 (do not call `ask_user`)
|
|
107
|
-
and continue with step 3 dispatch.
|
|
108
|
+
and *SKIP* the following step 2.2 (do not call `ask_user`)
|
|
109
|
+
and continue with step 2.3 dispatch.
|
|
108
110
|
|
|
109
111
|
2. Call the `ask_user` tool of the agent harness with:
|
|
110
112
|
|
|
@@ -137,3 +139,99 @@ Let the *user interactively choose* an answer.
|
|
|
137
139
|
|
|
138
140
|
</define>
|
|
139
141
|
|
|
142
|
+
<define name="custom-dialog">
|
|
143
|
+
Let the *user interactively choose* an answer.
|
|
144
|
+
|
|
145
|
+
1. Take the following question specification:
|
|
146
|
+
|
|
147
|
+
<spec>
|
|
148
|
+
<content/>
|
|
149
|
+
</spec>
|
|
150
|
+
|
|
151
|
+
The first line of <spec/> (separated by newlines) is of the format:
|
|
152
|
+
`<question-label/>: <question-description/>`
|
|
153
|
+
|
|
154
|
+
The second and following lines of <spec/> (separated by newlines) are of the format:
|
|
155
|
+
`<label/>: <description/>`
|
|
156
|
+
|
|
157
|
+
The first line provides the question label and the question
|
|
158
|
+
description. The second and following lines each provide an
|
|
159
|
+
answer label and an answer description.
|
|
160
|
+
|
|
161
|
+
Do not output anything in this step!
|
|
162
|
+
|
|
163
|
+
2. Dispatch according to the agent tool:
|
|
164
|
+
|
|
165
|
+
1. You *MUST* not output anything in this step.
|
|
166
|
+
|
|
167
|
+
Set <text></text> (set to empty).
|
|
168
|
+
Set <keys></keys> (set to empty).
|
|
169
|
+
Set <n>1</n> (set entry count to one).
|
|
170
|
+
Set <width/> to the maximum length plus 3 of all <label/> strings in <spec/>.
|
|
171
|
+
|
|
172
|
+
<for items="2 3 4 5 6 7 8 9">
|
|
173
|
+
Take from <spec/> the line number <item/>.
|
|
174
|
+
If this line does not exist, <break/>.
|
|
175
|
+
If this line exists, parse it according to the format `<label/>: <description/>`.
|
|
176
|
+
Set <label-key/> to <ase-tpl-key digit="<n/>"/>.
|
|
177
|
+
Set <label-text/> to `<ase-tpl-pad width="<width/>" text="<label/>:"/>`.
|
|
178
|
+
Append an entry to <text/>:
|
|
179
|
+
|
|
180
|
+
<text>
|
|
181
|
+
<text/>
|
|
182
|
+
<ase-tpl-boxline><label-key/> ▶ **<label-text/>** <description/></ase-tpl-boxline>
|
|
183
|
+
</text>
|
|
184
|
+
|
|
185
|
+
Set <n/> to <n/> + 1 (increment entry count).
|
|
186
|
+
<if condition="<keys/> is empty">
|
|
187
|
+
Set <keys><label-key/></keys>
|
|
188
|
+
</if>
|
|
189
|
+
<else>
|
|
190
|
+
Set <keys><keys/>/<label-key/></keys>
|
|
191
|
+
</else>
|
|
192
|
+
</for>
|
|
193
|
+
|
|
194
|
+
Set:
|
|
195
|
+
|
|
196
|
+
<text>
|
|
197
|
+
<ase-tpl-boxed title="QUESTION" subtitle="<question-label/>">
|
|
198
|
+
|
|
199
|
+
<ase-tpl-boxline>**<question-description/>**</ase-tpl-boxline>
|
|
200
|
+
|
|
201
|
+
<text/>
|
|
202
|
+
|
|
203
|
+
Please choose *one* option by typing <keys/>/**CANCEL** or free-text instruction.
|
|
204
|
+
|
|
205
|
+
</ase-tpl-boxed>
|
|
206
|
+
</text>
|
|
207
|
+
|
|
208
|
+
If <n/> is less than 3:
|
|
209
|
+
Set <result>ERROR: user-dialog requires 2-8 answer lines, got less</result>
|
|
210
|
+
and *SKIP* the following step 2 and continue with step 3 dispatch.
|
|
211
|
+
|
|
212
|
+
2. Output the following <template/>, end the current turn, wait for the
|
|
213
|
+
user input, store the user input in <result/> and then continue with step 3:
|
|
214
|
+
|
|
215
|
+
<template>
|
|
216
|
+
<text/>
|
|
217
|
+
</template>
|
|
218
|
+
|
|
219
|
+
3. Check the result and dispatch accordingly:
|
|
220
|
+
|
|
221
|
+
- If <result/> indicates that the user doesn't want to proceed,
|
|
222
|
+
or the user declined to answer the question, or that the dialog
|
|
223
|
+
was cancelled, rejected or skipped, set <result>CANCEL</result>.
|
|
224
|
+
|
|
225
|
+
- Otherwise, determine the selected <label/>
|
|
226
|
+
by mapping the <result/> (usually containing one of the
|
|
227
|
+
"key" or "label" strings) to one of the answer labels. Set
|
|
228
|
+
<result><label/></result>.
|
|
229
|
+
|
|
230
|
+
If <result/> is then *NOT* one of the "label" values from
|
|
231
|
+
<spec/>, set <result>OTHER: <result/></result> (prefix
|
|
232
|
+
result with "OTHER").
|
|
233
|
+
|
|
234
|
+
Do not output anything in this step!
|
|
235
|
+
|
|
236
|
+
</define>
|
|
237
|
+
|
|
@@ -8,31 +8,39 @@ Do not output anything in the following steps. The entire purpose is to
|
|
|
8
8
|
set placeholders into the context as a side-effect.
|
|
9
9
|
|
|
10
10
|
1. **Determine Parameters**:
|
|
11
|
-
Set <getopt-skill><arg1/></getopt-skill
|
|
12
|
-
Set <getopt-spec>--help|-h <arg2/></getopt-spec
|
|
13
|
-
Set <getopt-args><content/></getopt-args
|
|
11
|
+
Set <getopt-skill><arg1/></getopt-skill>
|
|
12
|
+
Set <getopt-spec>--help|-h <arg2/></getopt-spec>
|
|
13
|
+
Set <getopt-args><content/></getopt-args>
|
|
14
14
|
|
|
15
15
|
2. **Short-Circuit Processing**:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
16
|
+
You *MUST* decide here, via the following *mandatory* <if/> control
|
|
17
|
+
construct, whether the options are parsed *locally* (no MCP call) or
|
|
18
|
+
*remotely* (via the MCP call in steps 3-6). This is a *hard branch*,
|
|
19
|
+
not an optional optimization: when the <if/> branch is taken, steps
|
|
20
|
+
3-6 are *structurally unreachable* and you *MUST NOT* call the
|
|
21
|
+
`ase_getopt` MCP tool under any circumstances.
|
|
22
|
+
|
|
23
|
+
<if condition="<getopt-args/> does *NOT* match the regexp `(^|\s)-` (i.e. it does not start with an option)">
|
|
24
|
+
Parse the options *locally*, without any MCP call:
|
|
25
|
+
|
|
26
|
+
For each option token in <getopt-spec/> of the form
|
|
27
|
+
`--<long/>[|-<short/>][=<default/>|=(<c1/>|<c2/>|...)[...]]`, set
|
|
28
|
+
<getopt-option-<long/>/> to <default/> (for `=<default/>`
|
|
29
|
+
form), or to <c1/> (the first choice, for `=(<c1/>|<c2>/|...)`
|
|
30
|
+
form, or for the list form `=(<c1/>|<c2>/|...)...`),
|
|
31
|
+
or to `false` (for value-less options). Then set
|
|
32
|
+
<getopt-arguments><getopt-args/></getopt-arguments>.
|
|
33
|
+
|
|
34
|
+
Additionally, simulate <getopt-info/> as a comma-separated
|
|
35
|
+
markdown rendering of the parsed options in the form `<longN/>:
|
|
36
|
+
**<valueN/>**, [...]` (joined with `, `, with each value
|
|
37
|
+
shell-quoted if value contains spaces or special characters, and
|
|
38
|
+
excluding the `help` option and any *internal* option whose long
|
|
39
|
+
name starts with `int-`).
|
|
40
|
+
|
|
41
|
+
You then *MUST* silently *SKIP* the steps 3-6 below
|
|
42
|
+
and proceed directly to step 7 to display the results.
|
|
43
|
+
</if>
|
|
36
44
|
|
|
37
45
|
3. **MCP Call**:
|
|
38
46
|
Call the `ase_getopt(name: "<getopt-skill/>", spec:
|
package/plugin/meta/ase-skill.md
CHANGED
|
@@ -227,12 +227,12 @@ Template Patterns
|
|
|
227
227
|
</template>
|
|
228
228
|
|
|
229
229
|
- When `<ase-tpl-head title="<title/>"/>` should be expanded, use
|
|
230
|
-
(where <bar/> = "─" x (
|
|
231
|
-
the "─" character repeated (
|
|
230
|
+
(where <bar/> = "─" x (67 - length("⧉ ASE: <title/>")), i.e., <bar/> is
|
|
231
|
+
the "─" character repeated (67 - length("⧉ ASE: <title/>")) times):
|
|
232
232
|
|
|
233
233
|
<template>
|
|
234
234
|
|
|
235
|
-
╭────━━━━**(**
|
|
235
|
+
╭────━━━━**(** `⧉ ASE`: **`<title/>`** **)**━━━━────<bar/>┈┈┈┈┈┈┈┈┈┈
|
|
236
236
|
|
|
237
237
|
</template>
|
|
238
238
|
|
|
@@ -245,15 +245,65 @@ Template Patterns
|
|
|
245
245
|
</template>
|
|
246
246
|
|
|
247
247
|
- When `<ase-tpl-foot title="<title/>"/>` should be expanded, use
|
|
248
|
-
(where <bar/> = "─" x (
|
|
249
|
-
the "─" character repeated (
|
|
248
|
+
(where <bar/> = "─" x (67 - length("⧉ ASE: <title/>")), i.e., <bar/> is
|
|
249
|
+
the "─" character repeated (67 - length("⧉ ASE: <title/>")) times):
|
|
250
250
|
|
|
251
251
|
<template>
|
|
252
252
|
|
|
253
|
-
╰────━━━━**(**
|
|
253
|
+
╰────━━━━**(** `⧉ ASE`: **`<title/>`** **)**━━━━────<bar/>┈┈┈┈┈┈┈┈┈┈
|
|
254
254
|
|
|
255
255
|
</template>
|
|
256
256
|
|
|
257
|
+
- When `<ase-tpl-boxline><line/></ase-tpl-boxline>` should be expanded, use:
|
|
258
|
+
|
|
259
|
+
<if condition="<line/> is not empty">
|
|
260
|
+
<template>
|
|
261
|
+
│ <line/>
|
|
262
|
+
</template>
|
|
263
|
+
</if>
|
|
264
|
+
<else>
|
|
265
|
+
<template>
|
|
266
|
+
│
|
|
267
|
+
</template>
|
|
268
|
+
</else>
|
|
269
|
+
|
|
270
|
+
- When `<ase-tpl-boxed title="<title/>"[ subtitle="<subtitle/>"]><content/></ase-tpl-boxed>`
|
|
271
|
+
should be expanded use the following helper placeholder and then the <template/>:
|
|
272
|
+
|
|
273
|
+
- <if condition="<subtitle/> is not empty">
|
|
274
|
+
Set <raw-title>⧉ ASE: <title/>: <subtitle/><raw-title>.
|
|
275
|
+
Set <render-title>`⧉ ASE`: **`<title/>`**: `<subtitle/>`</render-title>.
|
|
276
|
+
</if>
|
|
277
|
+
<else>
|
|
278
|
+
Set <raw-title>⧉ ASE: <title/><raw-title>.
|
|
279
|
+
Set <render-title>`⧉ ASE`: **`<title/>`**</render-title>.
|
|
280
|
+
</else>
|
|
281
|
+
- Set <bar/> to ("─" x (67 - length("<raw-title/>"))),
|
|
282
|
+
i.e., set <bar/> to the "─" character repeated (67 - length("<raw-title/>")) times.
|
|
283
|
+
- Set <body> to <content/> with all line-starts prefixed with `│ `.
|
|
284
|
+
|
|
285
|
+
<template>
|
|
286
|
+
|
|
287
|
+
╭────━━━━**(** <render-title/> **)**━━━━────<bar/>┈┈┈┈┈┈┈┈┈┈
|
|
288
|
+
│
|
|
289
|
+
<body/>
|
|
290
|
+
│
|
|
291
|
+
╰────━━━━**(** <render-title/> **)**━━━━────<bar/>┈┈┈┈┈┈┈┈┈┈
|
|
292
|
+
|
|
293
|
+
</template>
|
|
294
|
+
|
|
295
|
+
- When `<ase-tpl-key digit="<digit/>"/>` should be expanded, use:
|
|
296
|
+
|
|
297
|
+
<if condition="<digit/> is '1'"><template>➊</template></if>
|
|
298
|
+
<if condition="<digit/> is '2'"><template>➋</template></if>
|
|
299
|
+
<if condition="<digit/> is '3'"><template>➌</template></if>
|
|
300
|
+
<if condition="<digit/> is '4'"><template>➍</template></if>
|
|
301
|
+
<if condition="<digit/> is '5'"><template>➎</template></if>
|
|
302
|
+
<if condition="<digit/> is '6'"><template>➏</template></if>
|
|
303
|
+
<if condition="<digit/> is '7'"><template>➐</template></if>
|
|
304
|
+
<if condition="<digit/> is '8'"><template>➑</template></if>
|
|
305
|
+
<if condition="<digit/> is '9'"><template>➒</template></if>
|
|
306
|
+
|
|
257
307
|
- When `<ase-tpl-bullet-secondary/>` should be expanded, use:
|
|
258
308
|
|
|
259
309
|
<template>⚪</template>
|
|
@@ -265,3 +315,9 @@ Template Patterns
|
|
|
265
315
|
- When `<ase-tpl-bullet-signal/>` should be expanded, use:
|
|
266
316
|
|
|
267
317
|
<template>🟠</template>
|
|
318
|
+
|
|
319
|
+
- When `<ase-tpl-pad width="<width/>" text="<text/>"/>` should be expanded, use
|
|
320
|
+
(where <ws/> = ` ` x (<width/> - length("<text/>")), i.e., <ws/> is
|
|
321
|
+
the ` ` character repeated (<width/> - length("<text/>")) times):
|
|
322
|
+
|
|
323
|
+
<template><text/><ws/></template>
|
package/plugin/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"homepage": "http://github.com/rse/ase",
|
|
7
7
|
"repository": { "url": "git+https://github.com/rse/ase.git", "type": "git" },
|
|
8
8
|
"bugs": { "url": "http://github.com/rse/ase/issues" },
|
|
9
|
-
"version": "0.9.
|
|
9
|
+
"version": "0.9.9",
|
|
10
10
|
"license": "GPL-3.0-only",
|
|
11
11
|
"author": {
|
|
12
12
|
"name": "Dr. Ralf S. Engelschall",
|
|
@@ -46,5 +46,5 @@ Analyze a specific module:
|
|
|
46
46
|
|
|
47
47
|
## SEE ALSO
|
|
48
48
|
|
|
49
|
-
`ase-arch-discover
|
|
50
|
-
`ase-code-refactor
|
|
49
|
+
[`ase-arch-discover`](../ase-arch-discover/help.md), [`ase-code-analyze`](../ase-code-analyze/help.md), [`ase-code-resolve`](../ase-code-resolve/help.md),
|
|
50
|
+
[`ase-code-refactor`](../ase-code-refactor/help.md), [`ase-code-insight`](../ase-code-insight/help.md).
|
|
@@ -37,13 +37,26 @@ for the technology stack to *provide* the *needed functionality*
|
|
|
37
37
|
|
|
38
38
|
<flow>
|
|
39
39
|
1. <step id="STEP 1: Determine Functionality">
|
|
40
|
-
|
|
40
|
+
1. Derive the needed <functionality/> from the <request/>, but keep
|
|
41
41
|
the functionality description very *brief* but still *precise*.
|
|
42
42
|
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
2. If <functionality/> is not clear, not precise, or not specific
|
|
44
|
+
enough, let the *user interactively choose* the intended
|
|
45
|
+
functionality. For this you *MUST* use the custom `custom-dialog`
|
|
46
|
+
and *NOT* the `AskUserQuestion` based "user-dialog":
|
|
45
47
|
|
|
46
|
-
|
|
48
|
+
<expand name="custom-dialog">
|
|
49
|
+
Functionality: Which functionality should the components provide?
|
|
50
|
+
<answer-1/>: (grounded candidate functionality 1)
|
|
51
|
+
<answer-2/>: (grounded candidate functionality 2)
|
|
52
|
+
<answer-3/>: (grounded candidate functionality 2)
|
|
53
|
+
<answer-4/>: (grounded candidate functionality 3)
|
|
54
|
+
</expand>
|
|
55
|
+
|
|
56
|
+
Then use the <result/> and its corresponding grounded candidate
|
|
57
|
+
functionality to adjust <functionality/> accordingly.
|
|
58
|
+
|
|
59
|
+
3. Display the determined final functionality with just the following
|
|
47
60
|
<template/>:
|
|
48
61
|
|
|
49
62
|
<template>
|
|
@@ -52,32 +65,32 @@ for the technology stack to *provide* the *needed functionality*
|
|
|
52
65
|
</step>
|
|
53
66
|
|
|
54
67
|
2. <step id="STEP 2: Determine Technology Stack">
|
|
55
|
-
|
|
68
|
+
1. Determine the used technology stack:
|
|
56
69
|
|
|
57
|
-
|
|
70
|
+
1. If a file `package.json` is found in the top-level directory
|
|
58
71
|
of the project and contains an entry `typescript` under `dependencies`
|
|
59
72
|
or `devDependencies`, then <stack>TypeScript</stack>.
|
|
60
73
|
|
|
61
|
-
|
|
74
|
+
2. Else, if a file `package.json` is found in the top-level directory
|
|
62
75
|
of the project, then <stack>JavaScript</stack>.
|
|
63
76
|
|
|
64
|
-
|
|
77
|
+
3. Else, if a file `build.gradle.kts` or `settings.gradle.kts`
|
|
65
78
|
is found in the top-level directory, then <stack>Kotlin</stack>.
|
|
66
79
|
|
|
67
|
-
|
|
80
|
+
4. Else, if a file `build.gradle` is found in the top-level directory and
|
|
68
81
|
is applying `kotlin`, `org.jetbrains.kotlin.jvm`, `kotlin-android`,
|
|
69
82
|
or `kotlin-multiplatform` plugins, then <stack>Kotlin</stack>.
|
|
70
83
|
|
|
71
|
-
|
|
84
|
+
5. Else, if a file `pom.xml` is found in the top-level directory and
|
|
72
85
|
contains `kotlin-maven-plugin` or `kotlin-stdlib` dependencies, then
|
|
73
86
|
<stack>Kotlin</stack>.
|
|
74
87
|
|
|
75
|
-
|
|
88
|
+
6. Else, if a file `pom.xml` or `build.gradle` is found in the top-level directory
|
|
76
89
|
of the project, then <stack>Java</stack>.
|
|
77
90
|
|
|
78
|
-
|
|
91
|
+
7. Else, use <stack>Unknown</stack>.
|
|
79
92
|
|
|
80
|
-
|
|
93
|
+
2. Display the determined final technology stack with just the
|
|
81
94
|
following <template/>:
|
|
82
95
|
|
|
83
96
|
<template>
|
|
@@ -86,7 +99,7 @@ for the technology stack to *provide* the *needed functionality*
|
|
|
86
99
|
</step>
|
|
87
100
|
|
|
88
101
|
3. <step id="STEP 3: Discover Components">
|
|
89
|
-
|
|
102
|
+
1. If <stack/> is "Unknown", the technology stack could not be
|
|
90
103
|
determined and no component discovery backend is available.
|
|
91
104
|
Inform the user with just the following <template/> and then
|
|
92
105
|
*STOP* the entire flow (do not perform any further steps):
|
|
@@ -95,26 +108,26 @@ for the technology stack to *provide* the *needed functionality*
|
|
|
95
108
|
<ase-tpl-bullet-normal/> **RESULT**: technology stack could not be determined -- component discovery is only supported for JavaScript, TypeScript, Java, and Kotlin projects.
|
|
96
109
|
</template>
|
|
97
110
|
|
|
98
|
-
|
|
111
|
+
2. From <stack/> and <functionality/>, derive essential keywords
|
|
99
112
|
<keyword-L/> (L=1-M), which allow you to search for suitable
|
|
100
113
|
components.
|
|
101
114
|
|
|
102
|
-
|
|
115
|
+
3.. In the to be discovered result set of components <component-K/>
|
|
103
116
|
(K=1-N), remember the component name as <name-K/>, the
|
|
104
117
|
official package name as <package-K/>, the latest version as
|
|
105
118
|
<version-K/>, the stars as <stars-K/>, the created date as
|
|
106
119
|
<created-K/>, the last updated date as <updated-K/>, the total
|
|
107
120
|
number of downloads in the last month as <downloads-K/>.
|
|
108
121
|
|
|
109
|
-
|
|
122
|
+
4. If <stack/> is "JavaScript" or "TypeScript":
|
|
110
123
|
|
|
111
|
-
|
|
124
|
+
1. Based on the essential keywords <keyword-L/> (L=1-M),
|
|
112
125
|
use the `ase-meta-search` skill in a subagent to *generally*
|
|
113
126
|
discover an initial set of a maximum of <getopt-option-limit/> *NPM packages*
|
|
114
127
|
<component-K/> and at least their real name <name-K/> and
|
|
115
128
|
their unique package names <package-K/>.
|
|
116
129
|
|
|
117
|
-
|
|
130
|
+
2. Use the shell command `npm search --json --searchlimit <getopt-option-limit/>
|
|
118
131
|
"<keyword-1/>" [...] "<keyword-M/>"` to *specifically*
|
|
119
132
|
discover an additional set of a maximum of <getopt-option-limit/> *NPM packages*
|
|
120
133
|
<component-K/> and at least their unique package names
|
|
@@ -122,16 +135,16 @@ for the technology stack to *provide* the *needed functionality*
|
|
|
122
135
|
(L=1-M). Merge the results into the already existing result
|
|
123
136
|
set, but deduplicate entries.
|
|
124
137
|
|
|
125
|
-
|
|
138
|
+
5. If <stack/> is "Java" or "Kotlin":
|
|
126
139
|
|
|
127
|
-
|
|
140
|
+
1. Based on the essential keywords <keyword-L/> (L=1-M),
|
|
128
141
|
use the `ase-meta-search` skill in a subagent to *generally*
|
|
129
142
|
discover an initial set of a maximum of <getopt-option-limit/> *Maven packages*
|
|
130
143
|
<component-K/> and at least their real name <name-K/> and
|
|
131
144
|
their unique Maven coordinates <package-K/> of the form
|
|
132
145
|
`groupId:artifactId`.
|
|
133
146
|
|
|
134
|
-
|
|
147
|
+
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
148
|
to *specifically* discover an additional set of a maximum
|
|
136
149
|
of <getopt-option-limit/> *Maven packages* <component-K/> and at least their
|
|
137
150
|
unique Maven coordinates <package-K/> (i.e. `<g/>:<a/>` from
|
|
@@ -140,7 +153,7 @@ for the technology stack to *provide* the *needed functionality*
|
|
|
140
153
|
into the already existing result set, but deduplicate
|
|
141
154
|
entries by Maven coordinate.
|
|
142
155
|
|
|
143
|
-
|
|
156
|
+
6. Call the `ase_component_info(stack: "<stack/>", components:
|
|
144
157
|
[ "<package-1/>", ..., "<package-N/>" ])` tool of the `ase` MCP
|
|
145
158
|
server *once* for the entire set of discovered packages.
|
|
146
159
|
The tool dispatches internally on <stack/> and fetches all
|
|
@@ -154,11 +167,11 @@ for the technology stack to *provide* the *needed functionality*
|
|
|
154
167
|
from `downloads` (numeric or `N.A.`) and <rank-K/> from `rank`
|
|
155
168
|
(numeric).
|
|
156
169
|
|
|
157
|
-
|
|
170
|
+
7. Sort, in descending order, the discovered components
|
|
158
171
|
<component-K/> (K=1-N) by their `rank` field and trim the result
|
|
159
172
|
list to just a maximum of <getopt-option-limit/> total components.
|
|
160
173
|
|
|
161
|
-
|
|
174
|
+
8. For each component <component-K/> (K=1-N), research and then
|
|
162
175
|
decide which *one* of *USP* (Unique Selling Point -- what makes
|
|
163
176
|
it unique), *Crux* (what you should notice), or *Gotcha* (what
|
|
164
177
|
you should not stumble over) is its single most distinguishing
|
|
@@ -169,7 +182,7 @@ for the technology stack to *provide* the *needed functionality*
|
|
|
169
182
|
</step>
|
|
170
183
|
|
|
171
184
|
4. <step id="STEP 4: Report Components">
|
|
172
|
-
|
|
185
|
+
1. Display the determined, individual components as a Markdown
|
|
173
186
|
*table* with just the following <template/> and do not output
|
|
174
187
|
anything else:
|
|
175
188
|
|
|
@@ -183,7 +196,7 @@ for the technology stack to *provide* the *needed functionality*
|
|
|
183
196
|
| **<name-N/>** | `<package-N/>` | <info-N/> |
|
|
184
197
|
</template>
|
|
185
198
|
|
|
186
|
-
|
|
199
|
+
2. Display the discovered components as a Markdown *table*
|
|
187
200
|
with just the following <template/>:
|
|
188
201
|
|
|
189
202
|
<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
|
|
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
|
|
87
|
-
`ase-code-explain
|
|
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).
|