@rse/ase 0.9.45 → 0.9.47
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-compat.js +3 -2
- package/dst/ase-config.js +6 -5
- package/dst/ase-hook.js +22 -17
- package/dst/ase-kv.js +38 -43
- package/dst/ase-log.js +13 -5
- package/dst/ase-markdown.js +12 -2
- package/dst/ase-mcp.js +20 -3
- package/dst/ase-persona.js +1 -3
- package/dst/ase-service.js +15 -25
- package/dst/ase-setup.js +12 -39
- package/dst/ase-statusline.js +14 -28
- package/dst/ase-task.js +14 -23
- package/dst/ase.js +6 -2
- package/package.json +3 -3
- 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 +6 -1
- package/plugin/meta/ase-dialog.md +2 -2
- package/plugin/meta/ase-skill.md +9 -0
- package/plugin/package.json +1 -1
- package/plugin/skills/ase-code-craft/SKILL.md +16 -2
- package/plugin/skills/ase-code-craft/help.md +5 -4
- package/plugin/skills/ase-code-refactor/SKILL.md +16 -2
- package/plugin/skills/ase-code-refactor/help.md +5 -4
- package/plugin/skills/ase-code-resolve/SKILL.md +16 -2
- package/plugin/skills/ase-code-resolve/help.md +6 -5
- package/plugin/skills/ase-help-intent/SKILL.md +157 -0
- package/plugin/skills/ase-help-intent/help.md +57 -0
- package/plugin/skills/ase-help-skill/SKILL.md +203 -0
- package/plugin/skills/ase-help-skill/catalog.md +60 -0
- package/plugin/skills/ase-help-skill/help.md +83 -0
- package/plugin/skills/ase-meta-eli5/SKILL.md +116 -0
- package/plugin/skills/ase-meta-eli5/help.md +61 -0
- package/plugin/skills/ase-meta-proximity/SKILL.md +224 -0
- package/plugin/skills/ase-meta-proximity/help.md +78 -0
- package/plugin/skills/ase-task-condense/help.md +3 -3
- package/plugin/skills/ase-task-reboot/help.md +3 -3
- package/plugin/skills/ase-task-view/help.md +3 -3
package/dst/ase.js
CHANGED
|
@@ -59,12 +59,16 @@ const main = async () => {
|
|
|
59
59
|
/* parse program arguments */
|
|
60
60
|
await program.parseAsync(process.argv);
|
|
61
61
|
/* gracefully terminate */
|
|
62
|
+
await log.close();
|
|
62
63
|
process.exit(0);
|
|
63
64
|
};
|
|
64
|
-
main().catch((err) => {
|
|
65
|
-
if (err instanceof CommanderError)
|
|
65
|
+
main().catch(async (err) => {
|
|
66
|
+
if (err instanceof CommanderError) {
|
|
67
|
+
await log.close();
|
|
66
68
|
process.exit(err.exitCode);
|
|
69
|
+
}
|
|
67
70
|
const message = err instanceof Error ? err.message : String(err);
|
|
68
71
|
log.write("error", message);
|
|
72
|
+
await log.close();
|
|
69
73
|
process.exit(1);
|
|
70
74
|
});
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"homepage": "https://ase.tools",
|
|
7
7
|
"repository": { "url": "git+https://github.com/rse/ase.git", "type": "git" },
|
|
8
8
|
"bugs": { "url": "https://github.com/rse/ase/issues" },
|
|
9
|
-
"version": "0.9.
|
|
9
|
+
"version": "0.9.47",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"author": {
|
|
12
12
|
"name": "Dr. Ralf S. Engelschall",
|
|
@@ -42,12 +42,12 @@
|
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"commander": "15.0.0",
|
|
45
|
-
"@dotenvx/dotenvx": "2.
|
|
45
|
+
"@dotenvx/dotenvx": "2.17.2",
|
|
46
46
|
"yaml": "2.9.0",
|
|
47
47
|
"valibot": "1.4.2",
|
|
48
48
|
"execa": "10.0.0",
|
|
49
49
|
"mkdirp": "3.0.1",
|
|
50
|
-
"@hapi/hapi": "21.4.
|
|
50
|
+
"@hapi/hapi": "21.4.10",
|
|
51
51
|
"beautiful-mermaid": "1.1.3",
|
|
52
52
|
"cli-table3": "0.6.5",
|
|
53
53
|
"chalk": "5.6.2",
|
package/plugin/etc/stx.conf
CHANGED
|
@@ -11,7 +11,12 @@ lint
|
|
|
11
11
|
|
|
12
12
|
# [plugin] build project
|
|
13
13
|
build : lint
|
|
14
|
-
|
|
14
|
+
( for name in $(cd skills; ls -1 | grep -v ase-help-intent | sort); do
|
|
15
|
+
echo "<skill name=\"$name\">"
|
|
16
|
+
cat skills/$name/help.md | sed -e '/^## SEE ALSO/,$d'
|
|
17
|
+
echo "</skill>"
|
|
18
|
+
done
|
|
19
|
+
) >skills/ase-help-intent/data.md
|
|
15
20
|
|
|
16
21
|
# [plugin] remove all generated files
|
|
17
22
|
clean
|
|
@@ -50,7 +50,7 @@ following procedure:
|
|
|
50
50
|
excluding the question label on line 1, and stopping at the first missing line --
|
|
51
51
|
the same lines the entry loop below renders).
|
|
52
52
|
|
|
53
|
-
<for items="2 3 4 5 6 7 8 9">
|
|
53
|
+
<for items="2 3 4 5 6 7 8 9 10">
|
|
54
54
|
Take from <spec/> the line number <item/>.
|
|
55
55
|
If this line does not exist, <break/>.
|
|
56
56
|
If this line exists, parse it according to the format `<label/>: <description/>`.
|
|
@@ -103,7 +103,7 @@ following procedure:
|
|
|
103
103
|
</text>
|
|
104
104
|
|
|
105
105
|
If <n/> is less than 2:
|
|
106
|
-
Set <result>ERROR: custom-dialog requires 2-
|
|
106
|
+
Set <result>ERROR: custom-dialog requires 2-9 answer lines, got <n/></result>
|
|
107
107
|
and *SKIP* the following step 2.2 and continue with step 2.3 dispatch.
|
|
108
108
|
|
|
109
109
|
2. Output the following <template/>, end the current turn, wait for the
|
package/plugin/meta/ase-skill.md
CHANGED
|
@@ -140,6 +140,15 @@ Skill Sequential Processing
|
|
|
140
140
|
- *IMPORTANT*: For each <step/> you *MUST* use the `TaskUpdate` tool
|
|
141
141
|
for updating its status *during* processing, once a <step/> finished.
|
|
142
142
|
|
|
143
|
+
- *IMPORTANT*: Whenever a skill *stops early* -- because a <step/>
|
|
144
|
+
instructed you to *STOP* processing (on an error, a cancelled
|
|
145
|
+
dialog, a short-circuit branch, or any other early exit) -- you
|
|
146
|
+
*MUST*, *before* emitting the final <template/>, use the `TaskUpdate`
|
|
147
|
+
tool to set the status of *every* still `pending` or `in_progress`
|
|
148
|
+
task of the current <flow/> to `deleted`, so that no task of a
|
|
149
|
+
finished skill remains open. Steps that were *skipped* because their
|
|
150
|
+
`condition` attribute was not met *MUST* be treated the same way.
|
|
151
|
+
|
|
143
152
|
- *IMPORTANT*: You *MUST* *strictly sequentially* execute every <step/> in
|
|
144
153
|
a <flow/>. You *MUST* not implicitly skip any <step/> during
|
|
145
154
|
processing, except you were explicitly requested to do this or the
|
package/plugin/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"homepage": "https://ase.tools",
|
|
7
7
|
"repository": { "url": "git+https://github.com/rse/ase.git", "type": "git" },
|
|
8
8
|
"bugs": { "url": "https://github.com/rse/ase/issues" },
|
|
9
|
-
"version": "0.9.
|
|
9
|
+
"version": "0.9.47",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"author": {
|
|
12
12
|
"name": "Dr. Ralf S. Engelschall",
|
|
@@ -23,7 +23,7 @@ Craft Source Code
|
|
|
23
23
|
|
|
24
24
|
<expand name="getopt"
|
|
25
25
|
arg1="ase-code-craft"
|
|
26
|
-
arg2="--auto|-a --dry|-d --quick|-Q --next|-n=(none|DONE|EDIT|PREFLIGHT|IMPLEMENT)...">
|
|
26
|
+
arg2="--auto|-a --dry|-d --quick|-Q --next|-n=(none|DONE|EDIT|GRILL|PREFLIGHT|IMPLEMENT)...">
|
|
27
27
|
$ARGUMENTS
|
|
28
28
|
</expand>
|
|
29
29
|
|
|
@@ -303,7 +303,21 @@ permitted way to persist artifacts is via `ase_task_save(...)`.
|
|
|
303
303
|
to *preflight* the freshly composed plan, bypassing `ase-task-edit`.
|
|
304
304
|
</elseif>
|
|
305
305
|
|
|
306
|
-
4. <
|
|
306
|
+
4. <elseif condition="<head/> is equal `GRILL`">
|
|
307
|
+
Consume the head: set <getopt-option-next/> to the remaining
|
|
308
|
+
tokens (joined back with `,`, or `none` if empty). `GRILL`
|
|
309
|
+
is this skill's own dispatch token, *not* part of
|
|
310
|
+
`ase-task-grill`'s `--next` vocabulary, so it must be
|
|
311
|
+
stripped here rather than forwarded. All remaining tokens are
|
|
312
|
+
`ase-task-grill`'s own vocabulary and are forwarded verbatim.
|
|
313
|
+
<if condition="<getopt-option-next/> is not equal `none`">
|
|
314
|
+
Set <args><args/> --next <getopt-option-next/></args>
|
|
315
|
+
</if>
|
|
316
|
+
Call the tool `Skill(skill: "ase:ase-task-grill", args: "<args/>")`
|
|
317
|
+
to *grill* the freshly composed plan, bypassing `ase-task-edit`.
|
|
318
|
+
</elseif>
|
|
319
|
+
|
|
320
|
+
5. <else>
|
|
307
321
|
Hand off to `ase-task-edit`.
|
|
308
322
|
<if condition="<head/> is equal `EDIT`">
|
|
309
323
|
Consume the head: set <getopt-option-next/> to the remaining
|
|
@@ -50,15 +50,16 @@ plan via `ase_task_save` and then hands off to `ase-task-edit`,
|
|
|
50
50
|
`--next`|`-n` *option*[,...]:
|
|
51
51
|
Automatically choose the next step after composing the plan.
|
|
52
52
|
*option* is a single token or a *comma-separated chronological
|
|
53
|
-
list* of tokens; an `IMPLEMENT` or `
|
|
54
|
-
consumed by this skill (bypassing `ase-task-edit`), and any
|
|
53
|
+
list* of tokens; an `IMPLEMENT`, `PREFLIGHT`, or `GRILL` head token
|
|
54
|
+
is consumed by this skill (bypassing `ase-task-edit`), and any
|
|
55
55
|
remaining tokens are *forwarded* (via `--next`) to the downstream
|
|
56
56
|
skill. For all other head tokens, the *entire* list is forwarded
|
|
57
57
|
to `ase-task-edit`, which consumes its head itself. This lets an
|
|
58
58
|
entire pipeline be pre-scripted in one shot. Recognized tokens at
|
|
59
59
|
this skill: `none` (default, hand-off to `ase-task-edit`
|
|
60
60
|
interactively), `DONE` (stop), `EDIT` (hand off to
|
|
61
|
-
`ase-task-edit`), `
|
|
61
|
+
`ase-task-edit`), `GRILL` (hand off to `ase-task-grill`),
|
|
62
|
+
`PREFLIGHT` (hand off to `ase-task-preflight`),
|
|
62
63
|
or `IMPLEMENT` (hand off to `ase-task-implement`). Example:
|
|
63
64
|
`--next PREFLIGHT,IMPLEMENT,DONE` crafts the plan, preflights it,
|
|
64
65
|
implements it, and exits without further dialog.
|
|
@@ -87,4 +88,4 @@ Craft a feature under a named task and directly hand off to implementation:
|
|
|
87
88
|
## SEE ALSO
|
|
88
89
|
|
|
89
90
|
[`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).
|
|
91
|
+
[`ase-task-grill`](../ase-task-grill/help.md), [`ase-task-preflight`](../ase-task-preflight/help.md), [`ase-task-implement`](../ase-task-implement/help.md).
|
|
@@ -23,7 +23,7 @@ Refactor Source Code
|
|
|
23
23
|
|
|
24
24
|
<expand name="getopt"
|
|
25
25
|
arg1="ase-code-refactor"
|
|
26
|
-
arg2="--auto|-a --dry|-d --quick|-Q --next|-n=(none|DONE|EDIT|PREFLIGHT|IMPLEMENT)...">
|
|
26
|
+
arg2="--auto|-a --dry|-d --quick|-Q --next|-n=(none|DONE|EDIT|GRILL|PREFLIGHT|IMPLEMENT)...">
|
|
27
27
|
$ARGUMENTS
|
|
28
28
|
</expand>
|
|
29
29
|
|
|
@@ -303,7 +303,21 @@ permitted way to persist artifacts is via `ase_task_save(...)`.
|
|
|
303
303
|
to *preflight* the freshly composed plan, bypassing `ase-task-edit`.
|
|
304
304
|
</elseif>
|
|
305
305
|
|
|
306
|
-
4. <
|
|
306
|
+
4. <elseif condition="<head/> is equal `GRILL`">
|
|
307
|
+
Consume the head: set <getopt-option-next/> to the remaining
|
|
308
|
+
tokens (joined back with `,`, or `none` if empty). `GRILL`
|
|
309
|
+
is this skill's own dispatch token, *not* part of
|
|
310
|
+
`ase-task-grill`'s `--next` vocabulary, so it must be
|
|
311
|
+
stripped here rather than forwarded. All remaining tokens are
|
|
312
|
+
`ase-task-grill`'s own vocabulary and are forwarded verbatim.
|
|
313
|
+
<if condition="<getopt-option-next/> is not equal `none`">
|
|
314
|
+
Set <args><args/> --next <getopt-option-next/></args>
|
|
315
|
+
</if>
|
|
316
|
+
Call the tool `Skill(skill: "ase:ase-task-grill", args: "<args/>")`
|
|
317
|
+
to *grill* the freshly composed plan, bypassing `ase-task-edit`.
|
|
318
|
+
</elseif>
|
|
319
|
+
|
|
320
|
+
5. <else>
|
|
307
321
|
Hand off to `ase-task-edit`.
|
|
308
322
|
<if condition="<head/> is equal `EDIT`">
|
|
309
323
|
Consume the head: set <getopt-option-next/> to the remaining
|
|
@@ -50,15 +50,16 @@ plan via `ase_task_save` and then hands off to `ase-task-edit`,
|
|
|
50
50
|
`--next`|`-n` *option*[,...]:
|
|
51
51
|
Automatically choose the next step after composing the plan.
|
|
52
52
|
*option* is a single token or a *comma-separated chronological
|
|
53
|
-
list* of tokens; an `IMPLEMENT` or `
|
|
54
|
-
consumed by this skill (bypassing `ase-task-edit`), and any
|
|
53
|
+
list* of tokens; an `IMPLEMENT`, `PREFLIGHT`, or `GRILL` head token
|
|
54
|
+
is consumed by this skill (bypassing `ase-task-edit`), and any
|
|
55
55
|
remaining tokens are *forwarded* (via `--next`) to the downstream
|
|
56
56
|
skill. For all other head tokens, the *entire* list is forwarded
|
|
57
57
|
to `ase-task-edit`, which consumes its head itself. This lets an
|
|
58
58
|
entire pipeline be pre-scripted in one shot. Recognized tokens at
|
|
59
59
|
this skill: `none` (default, hand off to `ase-task-edit`
|
|
60
60
|
interactively), `DONE` (stop), `EDIT` (hand off to
|
|
61
|
-
`ase-task-edit`), `
|
|
61
|
+
`ase-task-edit`), `GRILL` (hand off to `ase-task-grill`),
|
|
62
|
+
`PREFLIGHT` (hand off to `ase-task-preflight`),
|
|
62
63
|
or `IMPLEMENT` (hand off to `ase-task-implement`). Example:
|
|
63
64
|
`--next PREFLIGHT,IMPLEMENT,DONE` refactors, preflights, implements,
|
|
64
65
|
and exits without further dialog.
|
|
@@ -87,4 +88,4 @@ Refactor under a named task and directly hand off to implementation:
|
|
|
87
88
|
## SEE ALSO
|
|
88
89
|
|
|
89
90
|
[`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).
|
|
91
|
+
[`ase-task-grill`](../ase-task-grill/help.md), [`ase-task-preflight`](../ase-task-preflight/help.md), [`ase-task-implement`](../ase-task-implement/help.md).
|
|
@@ -23,7 +23,7 @@ Resolve Problem
|
|
|
23
23
|
|
|
24
24
|
<expand name="getopt"
|
|
25
25
|
arg1="ase-code-resolve"
|
|
26
|
-
arg2="--auto|-a --dry|-d --quick|-Q --next|-n=(none|DONE|EDIT|PREFLIGHT|IMPLEMENT)...">
|
|
26
|
+
arg2="--auto|-a --dry|-d --quick|-Q --next|-n=(none|DONE|EDIT|GRILL|PREFLIGHT|IMPLEMENT)...">
|
|
27
27
|
$ARGUMENTS
|
|
28
28
|
</expand>
|
|
29
29
|
|
|
@@ -364,7 +364,21 @@ permitted way to persist artifacts is via `ase_task_save(...)`.
|
|
|
364
364
|
to *preflight* the freshly composed plan, bypassing `ase-task-edit`.
|
|
365
365
|
</elseif>
|
|
366
366
|
|
|
367
|
-
4. <
|
|
367
|
+
4. <elseif condition="<head/> is equal `GRILL`">
|
|
368
|
+
Consume the head: set <getopt-option-next/> to the remaining
|
|
369
|
+
tokens (joined back with `,`, or `none` if empty). `GRILL`
|
|
370
|
+
is this skill's own dispatch token, *not* part of
|
|
371
|
+
`ase-task-grill`'s `--next` vocabulary, so it must be
|
|
372
|
+
stripped here rather than forwarded. All remaining tokens are
|
|
373
|
+
`ase-task-grill`'s own vocabulary and are forwarded verbatim.
|
|
374
|
+
<if condition="<getopt-option-next/> is not equal `none`">
|
|
375
|
+
Set <args><args/> --next <getopt-option-next/></args>
|
|
376
|
+
</if>
|
|
377
|
+
Call the tool `Skill(skill: "ase:ase-task-grill", args: "<args/>")`
|
|
378
|
+
to *grill* the freshly composed plan, bypassing `ase-task-edit`.
|
|
379
|
+
</elseif>
|
|
380
|
+
|
|
381
|
+
5. <else>
|
|
368
382
|
Hand off to `ase-task-edit`.
|
|
369
383
|
<if condition="<head/> is equal `EDIT`">
|
|
370
384
|
Consume the head: set <getopt-option-next/> to the remaining
|
|
@@ -55,15 +55,16 @@ plan via `ase_task_save` and then hands off to `ase-task-edit`,
|
|
|
55
55
|
`--next`|`-n` *option*[,...]:
|
|
56
56
|
Automatically choose the next step after composing the plan.
|
|
57
57
|
*option* is a single token or a *comma-separated chronological
|
|
58
|
-
list* of tokens; an `IMPLEMENT` or `
|
|
59
|
-
consumed by this skill (bypassing `ase-task-edit`), and any
|
|
58
|
+
list* of tokens; an `IMPLEMENT`, `PREFLIGHT`, or `GRILL` head token
|
|
59
|
+
is consumed by this skill (bypassing `ase-task-edit`), and any
|
|
60
60
|
remaining tokens are *forwarded* (via `--next`) to the downstream
|
|
61
61
|
skill. For all other head tokens, the *entire* list is forwarded
|
|
62
62
|
to `ase-task-edit`, which consumes its head itself. This lets an
|
|
63
63
|
entire pipeline be pre-scripted in one shot. Recognized tokens at
|
|
64
64
|
this skill: `none` (default, hand off to `ase-task-edit`
|
|
65
65
|
interactively), `DONE` (stop), `EDIT` (hand off to
|
|
66
|
-
`ase-task-edit`), `
|
|
66
|
+
`ase-task-edit`), `GRILL` (hand off to `ase-task-grill`),
|
|
67
|
+
`PREFLIGHT` (hand off to `ase-task-preflight`),
|
|
67
68
|
or `IMPLEMENT` (hand off to `ase-task-implement`). Example:
|
|
68
69
|
`--next IMPLEMENT,DONE` resolves the problem, implements it, and
|
|
69
70
|
exits without further dialog.
|
|
@@ -93,5 +94,5 @@ Resolve a previously analyzed issue and hand off to implementation:
|
|
|
93
94
|
## SEE ALSO
|
|
94
95
|
|
|
95
96
|
[`ase-code-craft`](../ase-code-craft/help.md), [`ase-code-refactor`](../ase-code-refactor/help.md), [`ase-code-analyze`](../ase-code-analyze/help.md),
|
|
96
|
-
[`ase-arch-analyze`](../ase-arch-analyze/help.md), [`ase-task-edit`](../ase-task-edit/help.md), [`ase-task-
|
|
97
|
-
[`ase-task-implement`](../ase-task-implement/help.md).
|
|
97
|
+
[`ase-arch-analyze`](../ase-arch-analyze/help.md), [`ase-task-edit`](../ase-task-edit/help.md), [`ase-task-grill`](../ase-task-grill/help.md),
|
|
98
|
+
[`ase-task-preflight`](../ase-task-preflight/help.md), [`ase-task-implement`](../ase-task-implement/help.md).
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ase-help-intent
|
|
3
|
+
argument-hint: "[--help|-h] <intent>"
|
|
4
|
+
description: >
|
|
5
|
+
Match a free-text intent against the accumulated help of all ASE
|
|
6
|
+
skills, generate the single best-fitting `/ase:ase-xxx-xxx` command
|
|
7
|
+
with concrete options and arguments, and let the user execute it,
|
|
8
|
+
refine the intent, or cancel. Use when the user knows what they want
|
|
9
|
+
but not which skill or flags realize it, or mentions "intent" or
|
|
10
|
+
requests "help".
|
|
11
|
+
user-invocable: true
|
|
12
|
+
disable-model-invocation: false
|
|
13
|
+
effort: high
|
|
14
|
+
allowed-tools:
|
|
15
|
+
- "Skill"
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
@${CLAUDE_SKILL_DIR}/../../meta/ase-control.md
|
|
19
|
+
@${CLAUDE_SKILL_DIR}/../../meta/ase-skill.md
|
|
20
|
+
@${CLAUDE_SKILL_DIR}/../../meta/ase-dialog.md
|
|
21
|
+
@${CLAUDE_SKILL_DIR}/../../meta/ase-getopt.md
|
|
22
|
+
|
|
23
|
+
<skill name="ase-help-intent">
|
|
24
|
+
Match an Intent to an ASE Command
|
|
25
|
+
</skill>
|
|
26
|
+
|
|
27
|
+
<expand name="getopt"
|
|
28
|
+
arg1="ase-help-intent"
|
|
29
|
+
arg2="">
|
|
30
|
+
$ARGUMENTS
|
|
31
|
+
</expand>
|
|
32
|
+
|
|
33
|
+
<objective>
|
|
34
|
+
*Match* the following free-text intent against the accumulated help of
|
|
35
|
+
all ASE skills and *generate* the single best-fitting `/ase:ase-xxx-xxx`
|
|
36
|
+
command that realizes it:
|
|
37
|
+
<intent><getopt-arguments/></intent>
|
|
38
|
+
</objective>
|
|
39
|
+
|
|
40
|
+
The following <corpus/> is the *accumulated help* of all ASE skills --
|
|
41
|
+
the concatenation of every skill's `help.md` file -- and is the *sole*
|
|
42
|
+
catalog you match <intent/> against:
|
|
43
|
+
|
|
44
|
+
<corpus>
|
|
45
|
+
@${CLAUDE_SKILL_DIR}/data.md
|
|
46
|
+
</corpus>
|
|
47
|
+
|
|
48
|
+
<flow>
|
|
49
|
+
|
|
50
|
+
1. <step id="STEP 1: Check Intent">
|
|
51
|
+
|
|
52
|
+
<if condition="<intent/> is empty">
|
|
53
|
+
Only output the following <template/> and then immediately *STOP*
|
|
54
|
+
processing the entire current skill:
|
|
55
|
+
|
|
56
|
+
<template>
|
|
57
|
+
⧉ **ASE**: ✪ skill: **ase-help-intent**, ▶ ERROR: expected a `<intent>` argument
|
|
58
|
+
</template>
|
|
59
|
+
</if>
|
|
60
|
+
|
|
61
|
+
</step>
|
|
62
|
+
|
|
63
|
+
2. <step id="STEP 2: Match Intent and Dialog">
|
|
64
|
+
|
|
65
|
+
*REPEAT* the following sub-steps in a *LOOP* until the user either
|
|
66
|
+
*executes* the generated command or *cancels* the dialog in sub-step 4:
|
|
67
|
+
|
|
68
|
+
1. *Match Intent*:
|
|
69
|
+
|
|
70
|
+
Match the current <intent/> against the <corpus/> and select the
|
|
71
|
+
*single* best-fitting skill. From that skill's `## SYNOPSIS`,
|
|
72
|
+
`## OPTIONS`, and `## ARGUMENTS` sections in <corpus/>,
|
|
73
|
+
*generate* a concrete command that realizes <intent/>:
|
|
74
|
+
|
|
75
|
+
- Set <name/> to the selected skill's name (e.g. `ase-code-lint`).
|
|
76
|
+
- Set <arguments/> to the concrete option flags and positional
|
|
77
|
+
arguments -- derived from the skill's `## OPTIONS` and
|
|
78
|
+
`## ARGUMENTS` -- that best realize <intent/> (may be empty).
|
|
79
|
+
- Set <command>/ase:<name/> <arguments/></command> (the full
|
|
80
|
+
command line, with surplus inner spaces collapsed).
|
|
81
|
+
- Set <rationale/> to a *very brief*, single-sentence
|
|
82
|
+
justification of why the selected skill and its options match
|
|
83
|
+
<intent/>.
|
|
84
|
+
|
|
85
|
+
2. *Guard No Match*:
|
|
86
|
+
|
|
87
|
+
<if condition="no skill in <corpus/> adequately matches <intent/>">
|
|
88
|
+
Output the following <template/> and then *continue* the *loop*
|
|
89
|
+
at sub-step 4 to prompt the user for a refined or clearer intent
|
|
90
|
+
via the dialog's free-text channel (do *not* stop and do *not*
|
|
91
|
+
render a command):
|
|
92
|
+
|
|
93
|
+
<template>
|
|
94
|
+
<ase-tpl-bullet-secondary/> **WARNING**: no confident match for the intent -- please refine or clarify it.
|
|
95
|
+
</template>
|
|
96
|
+
</if>
|
|
97
|
+
|
|
98
|
+
3. *Render Command*:
|
|
99
|
+
|
|
100
|
+
Output the generated command with the following <template/>:
|
|
101
|
+
|
|
102
|
+
<template>
|
|
103
|
+
<ase-tpl-head title="SKILL COMMAND PROPOSAL"/>
|
|
104
|
+
|
|
105
|
+
● **INTENT**:
|
|
106
|
+
○ <intent/>
|
|
107
|
+
|
|
108
|
+
● **COMMAND**:
|
|
109
|
+
⌘ `<command/>`
|
|
110
|
+
|
|
111
|
+
● **RATIONALE**:
|
|
112
|
+
○ <rationale/>
|
|
113
|
+
|
|
114
|
+
<ase-tpl-foot title="SKILL COMMAND PROPOSAL"/>
|
|
115
|
+
</template>
|
|
116
|
+
|
|
117
|
+
4. *Dispatch Command*:
|
|
118
|
+
|
|
119
|
+
In the following, you *MUST* *NOT* use your built-in
|
|
120
|
+
<user-dialog-tool/> tool! Instead, you *MUST* just show a custom
|
|
121
|
+
dialog according to the expanded `custom-dialog` definition. You
|
|
122
|
+
*MUST* closely follow this definition.
|
|
123
|
+
|
|
124
|
+
Let the user decide what to do with the generated command by
|
|
125
|
+
raising a question with the following custom dialog (invoked with
|
|
126
|
+
`--other`, so that any free-text instruction is accepted as an
|
|
127
|
+
intent refinement):
|
|
128
|
+
|
|
129
|
+
<expand name="custom-dialog" arg1="--other">
|
|
130
|
+
Dispatch: What would you like to do with the generated command?
|
|
131
|
+
EXECUTE: Execute the generated command now.
|
|
132
|
+
CANCEL: Cancel this dialog.
|
|
133
|
+
</expand>
|
|
134
|
+
|
|
135
|
+
Check the tool <result/> and dispatch accordingly:
|
|
136
|
+
|
|
137
|
+
- If <result/> is `CANCEL`:
|
|
138
|
+
*Break* out of the *loop* and stop processing without any
|
|
139
|
+
further output.
|
|
140
|
+
|
|
141
|
+
- If <result/> is `EXECUTE`:
|
|
142
|
+
*Break* out of the *loop*, output the following <template/>,
|
|
143
|
+
and then call the tool `Skill(skill: "ase:<name/>", args:
|
|
144
|
+
"<arguments/>")` to *execute* the generated command:
|
|
145
|
+
|
|
146
|
+
<template>
|
|
147
|
+
⧉ **ASE**: ◉ intent: **<intent/>**, ⌘ command: **<command/>**, ▶ status: **command executing**
|
|
148
|
+
</template>
|
|
149
|
+
|
|
150
|
+
- If <result/> matches `OTHER: <text/>`:
|
|
151
|
+
Set <intent><intent/> <text/></intent> (fold the free-text
|
|
152
|
+
instruction into the intent). Then you *MUST* *continue* the
|
|
153
|
+
*loop* at sub-step **2.1** to re-match the refined intent.
|
|
154
|
+
|
|
155
|
+
</step>
|
|
156
|
+
|
|
157
|
+
</flow>
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
|
|
2
|
+
## NAME
|
|
3
|
+
|
|
4
|
+
`ase-help-intent` - Match an Intent to an ASE Command
|
|
5
|
+
|
|
6
|
+
## SYNOPSIS
|
|
7
|
+
|
|
8
|
+
`ase-help-intent`
|
|
9
|
+
[`--help`|`-h`]
|
|
10
|
+
*intent*
|
|
11
|
+
|
|
12
|
+
## DESCRIPTION
|
|
13
|
+
|
|
14
|
+
The `ase-help-intent` skill matches a free-text *intent* against the
|
|
15
|
+
*accumulated help* of all ASE skills -- the concatenation of every
|
|
16
|
+
skill's `help.md` file into `skills/ase-help-intent/data.md`, built by
|
|
17
|
+
`npm start build` in `plugin/` -- and generates the *single* best-fitting
|
|
18
|
+
`/ase:ase-xxx-xxx` command that realizes the intent, complete with
|
|
19
|
+
concrete option flags and positional arguments derived from the selected
|
|
20
|
+
skill's `SYNOPSIS`, `OPTIONS`, and `ARGUMENTS`.
|
|
21
|
+
|
|
22
|
+
The generated command is presented together with a brief rationale in an
|
|
23
|
+
interactive dialog. The dialog lets the user *execute* the command (which
|
|
24
|
+
dispatches the target skill via its generated arguments), *cancel* the
|
|
25
|
+
operation, or *refine* the intent by typing any free-text instruction --
|
|
26
|
+
the instruction is folded into the intent and the best-fitting command is
|
|
27
|
+
re-matched and re-rendered. If no skill confidently matches the intent, a
|
|
28
|
+
warning is emitted and the user is prompted to refine or clarify it.
|
|
29
|
+
|
|
30
|
+
The skill exposes *no* option flags beyond `--help`/`-h`; it is driven
|
|
31
|
+
entirely through the intent argument and the interactive dialog.
|
|
32
|
+
|
|
33
|
+
## ARGUMENTS
|
|
34
|
+
|
|
35
|
+
*intent*:
|
|
36
|
+
The free-text intent to be realized. It describes *what* the user
|
|
37
|
+
wants to achieve; the skill determines *which* ASE skill and *which*
|
|
38
|
+
options and arguments realize it.
|
|
39
|
+
|
|
40
|
+
## EXAMPLES
|
|
41
|
+
|
|
42
|
+
Route an intent to the matching command and pick from the dialog:
|
|
43
|
+
|
|
44
|
+
```text
|
|
45
|
+
❯ /ase-help-intent lint the TypeScript sources for high-severity issues only
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Route a planning intent to the matching command:
|
|
49
|
+
|
|
50
|
+
```text
|
|
51
|
+
❯ /ase-help-intent explain how the authentication module works
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## SEE ALSO
|
|
55
|
+
|
|
56
|
+
[`ase-help-skill`](../ase-help-skill/help.md), [`ase-meta-proximity`](../ase-meta-proximity/help.md), [`ase-meta-search`](../ase-meta-search/help.md),
|
|
57
|
+
[`ase-code-craft`](../ase-code-craft/help.md).
|