@rse/ase 0.0.37 → 0.0.39
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-hello.js +4 -4
- package/dst/ase-setup.js +73 -2
- package/package.json +1 -1
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/.github/plugin/plugin.json +1 -1
- package/plugin/package.json +1 -1
- package/plugin/skills/ase-code-craft/SKILL.md +80 -98
- package/plugin/skills/ase-code-refactor/SKILL.md +83 -101
- package/plugin/skills/ase-code-resolve/SKILL.md +95 -111
- package/plugin/skills/ase-meta-evaluate/SKILL.md +9 -5
package/dst/ase-hello.js
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
** Licensed under GPL 3.0 <https://spdx.org/licenses/GPL-3.0-only>
|
|
5
5
|
*/
|
|
6
6
|
import { Chalk } from "chalk";
|
|
7
|
-
/* forced-color chalk instance: stdout
|
|
8
|
-
auto-detection would yield level 0; force level 1 to keep
|
|
9
|
-
emitting ANSI sequences as
|
|
7
|
+
/* forced-color chalk instance: stdout is a pipe under Claude Code,
|
|
8
|
+
so chalk auto-detection would yield level 0; force level 1 to keep
|
|
9
|
+
emitting ANSI sequences as the original implementation did */
|
|
10
10
|
const c = new Chalk({ level: 1 });
|
|
11
11
|
/* command-line handling */
|
|
12
12
|
export default class HelloCommand {
|
|
@@ -20,7 +20,7 @@ export default class HelloCommand {
|
|
|
20
20
|
.command("hello")
|
|
21
21
|
.description("print a colored greeting message")
|
|
22
22
|
.option("-s, --subject <name>", "subject to greet", "Universe")
|
|
23
|
-
.action((opts) => {
|
|
23
|
+
.action(async (opts) => {
|
|
24
24
|
process.stdout.write(`${c.red(`${opts.subject} World!`)}\n`);
|
|
25
25
|
});
|
|
26
26
|
}
|
package/dst/ase-setup.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
** Copyright (c) 2025-2026 Dr. Ralf S. Engelschall <rse@engelschall.com>
|
|
4
4
|
** Licensed under GPL 3.0 <https://spdx.org/licenses/GPL-3.0-only>
|
|
5
5
|
*/
|
|
6
|
+
import fs from "node:fs/promises";
|
|
6
7
|
import path from "node:path";
|
|
7
8
|
import { fileURLToPath } from "node:url";
|
|
8
9
|
import { execa } from "execa";
|
|
@@ -24,6 +25,74 @@ export default class SetupCommand {
|
|
|
24
25
|
throw new Error(`mandatory tool "${tool}" not found in $PATH`);
|
|
25
26
|
});
|
|
26
27
|
}
|
|
28
|
+
/* determine whether a global "npm" operation requires "sudo" by
|
|
29
|
+
checking whether the npm global install root is writable by the
|
|
30
|
+
current user; on Windows or when already running as root, no
|
|
31
|
+
elevation is needed */
|
|
32
|
+
async npmGlobalNeedsSudo() {
|
|
33
|
+
/* Windows has no "sudo" concept here */
|
|
34
|
+
if (process.platform === "win32")
|
|
35
|
+
return false;
|
|
36
|
+
/* already running as root */
|
|
37
|
+
const getuid = process.getuid;
|
|
38
|
+
if (typeof getuid === "function" && getuid.call(process) === 0)
|
|
39
|
+
return false;
|
|
40
|
+
/* determine the npm global prefix and probe writability of the
|
|
41
|
+
directories that "npm -g" actually mutates */
|
|
42
|
+
let prefix = "";
|
|
43
|
+
try {
|
|
44
|
+
const result = await execa("npm", ["prefix", "-g"], { stdio: "pipe" });
|
|
45
|
+
prefix = result.stdout.trim();
|
|
46
|
+
}
|
|
47
|
+
catch {
|
|
48
|
+
/* if we cannot determine the prefix, fall back to "no sudo" */
|
|
49
|
+
return false;
|
|
50
|
+
}
|
|
51
|
+
if (prefix === "")
|
|
52
|
+
return false;
|
|
53
|
+
const candidates = [
|
|
54
|
+
prefix,
|
|
55
|
+
path.join(prefix, "bin"),
|
|
56
|
+
path.join(prefix, "lib", "node_modules")
|
|
57
|
+
];
|
|
58
|
+
for (const dir of candidates) {
|
|
59
|
+
try {
|
|
60
|
+
await fs.access(dir, fs.constants.W_OK);
|
|
61
|
+
}
|
|
62
|
+
catch {
|
|
63
|
+
/* directory exists but not writable, or does not exist
|
|
64
|
+
inside a non-writable parent: require sudo */
|
|
65
|
+
try {
|
|
66
|
+
await fs.access(dir, fs.constants.F_OK);
|
|
67
|
+
return true;
|
|
68
|
+
}
|
|
69
|
+
catch {
|
|
70
|
+
/* directory does not exist: check parent writability */
|
|
71
|
+
try {
|
|
72
|
+
await fs.access(path.dirname(dir), fs.constants.W_OK);
|
|
73
|
+
}
|
|
74
|
+
catch {
|
|
75
|
+
return true;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
return false;
|
|
81
|
+
}
|
|
82
|
+
/* build the (cmd, args) pair for an "npm" invocation, prefixing
|
|
83
|
+
with "sudo" when necessary for global operations */
|
|
84
|
+
async npmCmd(args, global) {
|
|
85
|
+
if (global && await this.npmGlobalNeedsSudo()) {
|
|
86
|
+
const sudo = await which("sudo").catch(() => "");
|
|
87
|
+
if (sudo !== "") {
|
|
88
|
+
this.log.write("info", "setup: npm global install root not writable: using \"sudo\"");
|
|
89
|
+
return { cmd: "sudo", args: ["npm", ...args] };
|
|
90
|
+
}
|
|
91
|
+
this.log.write("warning", "setup: npm global install root is not writable by current user " +
|
|
92
|
+
"and \"sudo\" not found in $PATH: attempting without elevation");
|
|
93
|
+
}
|
|
94
|
+
return { cmd: "npm", args };
|
|
95
|
+
}
|
|
27
96
|
/* run a sub-process, suppressing output on success and emitting it on failure */
|
|
28
97
|
async run(cmd, args, opts = {}) {
|
|
29
98
|
const { cwd, quiet = false, retries = 1, ignoreError } = opts;
|
|
@@ -118,7 +187,8 @@ export default class SetupCommand {
|
|
|
118
187
|
}
|
|
119
188
|
/* update ASE CLI tool */
|
|
120
189
|
this.log.write("info", `setup: update: updating ASE CLI tool: ${current} -> ${latest}`);
|
|
121
|
-
await this.
|
|
190
|
+
const updateCmd = await this.npmCmd(["update", "-g", "@rse/ase"], true);
|
|
191
|
+
await this.run(updateCmd.cmd, updateCmd.args);
|
|
122
192
|
/* update ASE plugin */
|
|
123
193
|
this.log.write("info", `setup: update: updating ASE ${spec.label} plugin`);
|
|
124
194
|
await this.run(spec.cli, ["plugin", "marketplace", "update", "ase"]);
|
|
@@ -165,7 +235,8 @@ export default class SetupCommand {
|
|
|
165
235
|
/* uninstall ASE CLI tool (non-development only) */
|
|
166
236
|
if (!dev) {
|
|
167
237
|
this.log.write("info", "setup: uninstall: uninstalling ASE CLI tool (origin: remote)");
|
|
168
|
-
await this.
|
|
238
|
+
const uninstallCmd = await this.npmCmd(["uninstall", "-g", "@rse/ase"], true);
|
|
239
|
+
await this.run(uninstallCmd.cmd, uninstallCmd.args);
|
|
169
240
|
}
|
|
170
241
|
return 0;
|
|
171
242
|
}
|
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.0.
|
|
9
|
+
"version": "0.0.39",
|
|
10
10
|
"license": "GPL-3.0-only",
|
|
11
11
|
"author": {
|
|
12
12
|
"name": "Dr. Ralf S. Engelschall",
|
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.0.
|
|
9
|
+
"version": "0.0.39",
|
|
10
10
|
"license": "GPL-3.0-only",
|
|
11
11
|
"author": {
|
|
12
12
|
"name": "Dr. Ralf S. Engelschall",
|
|
@@ -74,7 +74,7 @@ permitted way to persist artifacts is via `task_save(...)`.
|
|
|
74
74
|
<feature><text/></feature> and <ase-task-id><id/></ase-task-id>
|
|
75
75
|
and call the `task_id(id: <ase-task-id/>, session:
|
|
76
76
|
<ase-session-id/>)` tool from the `ase` MCP service to
|
|
77
|
-
implicitly switch the task.
|
|
77
|
+
implicitly switch the task. Do not output anything.
|
|
78
78
|
|
|
79
79
|
3. If <feature/> is empty,
|
|
80
80
|
ask the user interactively, without a special tool, for the
|
|
@@ -84,19 +84,30 @@ permitted way to persist artifacts is via `task_save(...)`.
|
|
|
84
84
|
|
|
85
85
|
Then set <feature/> to the response of the user.
|
|
86
86
|
|
|
87
|
-
4.
|
|
87
|
+
4. <if condition="
|
|
88
|
+
<ase-task-id/> is equal `default` and
|
|
89
|
+
<feature/> is not empty
|
|
90
|
+
">
|
|
91
|
+
Set <ase-task-id/> to a unique task id, derived from <feature/>,
|
|
92
|
+
which consists of two lower-case words concatenated with a
|
|
93
|
+
`-` character. Then call the `task_id(id: <ase-task-id/>,
|
|
94
|
+
session: <ase-session-id/>)` tool from the `ase` MCP service to
|
|
95
|
+
implicitly switch the task. Do not output anything.
|
|
96
|
+
</if>
|
|
97
|
+
|
|
98
|
+
5. Report the task and feature with the following <template/>:
|
|
88
99
|
|
|
89
100
|
<template>
|
|
90
101
|
⧉ **ASE**: ◉ task: **<ase-task-id/>**
|
|
91
102
|
⧉ **ASE**: ⇌ feature: **<feature/>**
|
|
92
103
|
</template>
|
|
93
104
|
|
|
94
|
-
|
|
105
|
+
6. Figure out what the requested <feature/> to be crafted is about.
|
|
95
106
|
|
|
96
|
-
|
|
107
|
+
7. Ask the user for clarification if the goal of this crafting is too
|
|
97
108
|
unclear.
|
|
98
109
|
|
|
99
|
-
|
|
110
|
+
8. Do not output anything in this step, except you asked the user.
|
|
100
111
|
|
|
101
112
|
2. **Investigate Code Base**:
|
|
102
113
|
|
|
@@ -108,40 +119,12 @@ permitted way to persist artifacts is via `task_save(...)`.
|
|
|
108
119
|
|
|
109
120
|
3. Do not output anything in this step.
|
|
110
121
|
|
|
111
|
-
3. **
|
|
112
|
-
|
|
113
|
-
1. *Propose* corresponding *feature approach*, including optionally,
|
|
114
|
-
some *alternative* feature approaches.
|
|
115
|
-
|
|
116
|
-
2. Annotate the approach you recommend with an <annotation/> of
|
|
117
|
-
` ⚝ **RECOMMENDATION** ⚝`.
|
|
118
|
-
|
|
119
|
-
3. Report each approach with the following <template/>:
|
|
120
|
-
|
|
121
|
-
<template>
|
|
122
|
-
🔵 **APPROACH A<n/>**<annotation/>: *<summary/>*
|
|
123
|
-
- [...]
|
|
124
|
-
- [...]
|
|
125
|
-
- [...]
|
|
126
|
-
<optional-diagram/>
|
|
127
|
-
</template>
|
|
128
|
-
|
|
129
|
-
Hints:
|
|
122
|
+
3. **Internalize Crafting Tenets**:
|
|
130
123
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
number of bullet points in the range of 1-4.
|
|
124
|
+
Internalize and honor the following tenets.
|
|
125
|
+
Do not output anything.
|
|
134
126
|
|
|
135
|
-
|
|
136
|
-
an optional diagram <optional-diagram/> by invoking the
|
|
137
|
-
`ase-meta-diagram` skill via the `Skill` tool. For *current vs.
|
|
138
|
-
proposed* comparisons, render each side as a *separate*
|
|
139
|
-
`ase-meta-diagram` invocation and stack the rendered blocks
|
|
140
|
-
*vertically* (labels `**Before:**` / `**After:**`); never
|
|
141
|
-
side-by-side. Omit <optional-diagram/> entirely for simple or
|
|
142
|
-
purely local situation.
|
|
143
|
-
|
|
144
|
-
*Recommended* Tenets (generic):
|
|
127
|
+
1. *Recommended* Tenets (generic):
|
|
145
128
|
|
|
146
129
|
- **Surgical Changes**:
|
|
147
130
|
Keep source code changes always as small as possible.
|
|
@@ -159,20 +142,69 @@ permitted way to persist artifacts is via `task_save(...)`.
|
|
|
159
142
|
Strictly align with the existing code base by exactly following its
|
|
160
143
|
coding style, its structure, its naming conventions, etc.
|
|
161
144
|
|
|
162
|
-
|
|
145
|
+
2. *Essential* Tenets (feature crafting specific):
|
|
163
146
|
|
|
164
147
|
- **High Cohesion, Low Coupling**:
|
|
165
148
|
Strike for a set of small, focused parts (high cohesion) connected by
|
|
166
149
|
thin, explicit wires (low coupling).
|
|
167
150
|
|
|
168
|
-
4. **
|
|
151
|
+
4. **Find Feature Crafting Approaches**:
|
|
152
|
+
|
|
153
|
+
You *MUST* perform the following sub-steps *internally* and *without
|
|
154
|
+
any output* until and including the recommendation decision. Only
|
|
155
|
+
sub-step 4 below is allowed to produce output.
|
|
156
|
+
|
|
157
|
+
1. *Propose* corresponding *feature approach*, including optionally,
|
|
158
|
+
some *alternative* feature approaches. Do *not* output anything
|
|
159
|
+
in this sub-step.
|
|
160
|
+
|
|
161
|
+
2. *Reflect* on and *critique* the proposed approaches by deriving,
|
|
162
|
+
per approach, a small set of concrete *pros* and *cons*. Do
|
|
163
|
+
*not* output anything in this sub-step.
|
|
164
|
+
|
|
165
|
+
3. Based on the reflection, *decide* which approach to recommend
|
|
166
|
+
and annotate it with an <annotation/> of
|
|
167
|
+
` ⚝ **RECOMMENDATION** ⚝`. All other approaches receive an
|
|
168
|
+
empty <annotation/>. Do *not* output anything in this sub-step.
|
|
169
|
+
|
|
170
|
+
4. *Now* report each approach with the following <template/>,
|
|
171
|
+
inlining its pros/cons derived in sub-step 2:
|
|
172
|
+
|
|
173
|
+
<template>
|
|
174
|
+
🔵 **APPROACH A<n/>**<annotation/>: *<summary/>*
|
|
175
|
+
● [...]
|
|
176
|
+
● [...]
|
|
177
|
+
● [...]
|
|
178
|
+
⊕ *pro*: [...]
|
|
179
|
+
⊖ *con*: [...]
|
|
180
|
+
<optional-diagram/>
|
|
181
|
+
</template>
|
|
182
|
+
|
|
183
|
+
Hints:
|
|
184
|
+
|
|
185
|
+
- Give a short one-sentence <summary/> of the feature approach plus
|
|
186
|
+
*precise* and *brief* feature information. Try to keep the
|
|
187
|
+
number of bullet points (●) in the range of 1-4.
|
|
188
|
+
|
|
189
|
+
- In case of a *complex feature situation* only, visualize it with
|
|
190
|
+
an optional diagram <optional-diagram/> by invoking the
|
|
191
|
+
`ase-meta-diagram` skill via the `Skill` tool. For *current vs.
|
|
192
|
+
proposed* comparisons, render each side as a *separate*
|
|
193
|
+
`ase-meta-diagram` invocation and stack the rendered blocks
|
|
194
|
+
*vertically* (labels `**Before:**` / `**After:**`); never
|
|
195
|
+
side-by-side. Omit <optional-diagram/> entirely for simple or
|
|
196
|
+
purely local situation.
|
|
197
|
+
|
|
198
|
+
5. **Choose Feature Crafting Approach**:
|
|
169
199
|
|
|
170
200
|
1. If <getopt-option-auto/> is equal `false`:
|
|
171
201
|
Let the *user interactively choose* the preferred feature
|
|
172
202
|
approach A<n/> with the help of the <user-dialog-tool/> tool.
|
|
173
|
-
Use the header `Select Approach`
|
|
174
|
-
|
|
175
|
-
|
|
203
|
+
Use the header `Select Approach`, use `A<n/>: <short-summary/>`
|
|
204
|
+
for the option (where <short-summary/> is an ultra brief summary
|
|
205
|
+
of the approach A<n/>), and *single-selection* only and provide
|
|
206
|
+
small *code change previews*. Mark your recommended feature
|
|
207
|
+
approach with ` ⚝ **RECOMMENDATION** ⚝` here again.
|
|
176
208
|
|
|
177
209
|
2. If <getopt-option-auto/> is equal `true`:
|
|
178
210
|
Set <n/> to the number of the feature approach A<n/> you recommend.
|
|
@@ -182,7 +214,7 @@ permitted way to persist artifacts is via `task_save(...)`.
|
|
|
182
214
|
⧉ **ASE**: ◉ task: **<ase-task-id/>**, ▶ status: **auto-chosen approach A<n/>**
|
|
183
215
|
</template>
|
|
184
216
|
|
|
185
|
-
|
|
217
|
+
6. **Compose Feature Crafting Plan**:
|
|
186
218
|
|
|
187
219
|
1. *Compose a feature plan* for the chosen feature A<n/> by
|
|
188
220
|
closely aligning to the existing architecture and the existing
|
|
@@ -209,59 +241,9 @@ permitted way to persist artifacts is via `task_save(...)`.
|
|
|
209
241
|
⧉ **ASE**: ◉ task: **<ase-task-id/>**, ✪ plan: **<words/>** words, ▶ status: **plan created**
|
|
210
242
|
</template>
|
|
211
243
|
|
|
212
|
-
5.
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
- If <getopt-option-next/> is equal to `none`:
|
|
219
|
-
Let the *user interactively choose* what to do as the next step.
|
|
220
|
-
|
|
221
|
-
<expand name="user-dialog">
|
|
222
|
-
Next Step: How would you like to proceed with the plan?
|
|
223
|
-
DONE: Stop processing.
|
|
224
|
-
EDIT: Hand processing off to editing.
|
|
225
|
-
PREFLIGHT: Hand processing off to preflighting.
|
|
226
|
-
IMPLEMENT: Hand processing off to implementation.
|
|
227
|
-
</expand>
|
|
228
|
-
|
|
229
|
-
6. Check the tool <result/> and dispatch accordingly:
|
|
230
|
-
|
|
231
|
-
- If <result/> is `DONE` or `CANCEL`:
|
|
232
|
-
Only output the following <template/> and then *STOP*.
|
|
233
|
-
|
|
234
|
-
<template>
|
|
235
|
-
⧉ **ASE**: ◉ task: **<ase-task-id/>**, ✪ plan: **<words/>** words, ▶ status: **done**
|
|
236
|
-
</template>
|
|
237
|
-
|
|
238
|
-
- If <result/> is `EDIT`:
|
|
239
|
-
Only output the following <template/> and then use the
|
|
240
|
-
`Skill` tool to invoke the `ase:ase-task-edit` skill in
|
|
241
|
-
order to edit the plan. Immediately stop processing the
|
|
242
|
-
current skill once the `Skill` tool was used.
|
|
243
|
-
|
|
244
|
-
<template>
|
|
245
|
-
⧉ **ASE**: ◉ task: **<ase-task-id/>**, ✪ plan: **<words/>** words, ▶ status: **hand off to edit**
|
|
246
|
-
</template>
|
|
247
|
-
|
|
248
|
-
- If <result/> is `PREFLIGHT`:
|
|
249
|
-
Only output the following <template/> and then use the
|
|
250
|
-
`Skill` tool to invoke the `ase:ase-task-preflight` skill in
|
|
251
|
-
order to preflight the plan. Immediately stop processing the
|
|
252
|
-
current skill once the `Skill` tool was used.
|
|
253
|
-
|
|
254
|
-
<template>
|
|
255
|
-
⧉ **ASE**: ◉ task: **<ase-task-id/>**, ✪ plan: **<words/>** words, ▶ status: **hand off to preflight**
|
|
256
|
-
</template>
|
|
257
|
-
|
|
258
|
-
- If <result/> is `IMPLEMENT`:
|
|
259
|
-
Only output the following <template/> and then use the
|
|
260
|
-
`Skill` tool to invoke the `ase:ase-task-implement` skill in
|
|
261
|
-
order to implement the plan. Immediately stop processing the
|
|
262
|
-
current skill once the `Skill` tool was used.
|
|
263
|
-
|
|
264
|
-
<template>
|
|
265
|
-
⧉ **ASE**: ◉ task: **<ase-task-id/>**, ✪ plan: **<words/>** words, ▶ status: **hand off to implement**
|
|
266
|
-
</template>
|
|
244
|
+
5. Directly pass-through control to the `ase:ase-task-edit` skill.
|
|
245
|
+
Set <args></args> (set args to empty). If <getopt-option-next/>
|
|
246
|
+
is not equal `none`, set <args><args/> --next
|
|
247
|
+
<getopt-option-next/></args> (append to args). Then call the
|
|
248
|
+
tool `Skill(skill: "ase:ase-task-edit", args: <args/>)`.
|
|
267
249
|
|
|
@@ -74,7 +74,7 @@ permitted way to persist artifacts is via `task_save(...)`.
|
|
|
74
74
|
<request><text/></request> and <ase-task-id><id/></ase-task-id>
|
|
75
75
|
and call the `task_id(id: <ase-task-id/>, session:
|
|
76
76
|
<ase-session-id/>)` tool from the `ase` MCP service to
|
|
77
|
-
implicitly switch the task.
|
|
77
|
+
implicitly switch the task. Do not output anything.
|
|
78
78
|
|
|
79
79
|
3. If <request/> is empty,
|
|
80
80
|
ask the user interactively, without a special tool, for the
|
|
@@ -84,19 +84,30 @@ permitted way to persist artifacts is via `task_save(...)`.
|
|
|
84
84
|
|
|
85
85
|
Then set <request/> to the response of the user.
|
|
86
86
|
|
|
87
|
-
4.
|
|
87
|
+
4. <if condition="
|
|
88
|
+
<ase-task-id/> is equal `default` and
|
|
89
|
+
<request/> is not empty
|
|
90
|
+
">
|
|
91
|
+
Set <ase-task-id/> to a unique task id, derived from <request/>,
|
|
92
|
+
which consists of two lower-case words concatenated with a
|
|
93
|
+
`-` character. Then call the `task_id(id: <ase-task-id/>,
|
|
94
|
+
session: <ase-session-id/>)` tool from the `ase` MCP service to
|
|
95
|
+
implicitly switch the task. Do not output anything.
|
|
96
|
+
</if>
|
|
97
|
+
|
|
98
|
+
5. Report the task and request with the following <template/>:
|
|
88
99
|
|
|
89
100
|
<template>
|
|
90
101
|
⧉ **ASE**: ◉ task: **<ase-task-id/>**
|
|
91
102
|
⧉ **ASE**: ⇌ request: **<request/>**
|
|
92
103
|
</template>
|
|
93
104
|
|
|
94
|
-
|
|
105
|
+
6. Figure out what the artifact refactoring <request/> is about.
|
|
95
106
|
|
|
96
|
-
|
|
107
|
+
7. Ask the user for clarification if the goal of this refactoring is
|
|
97
108
|
too unclear.
|
|
98
109
|
|
|
99
|
-
|
|
110
|
+
8. Do not output anything in this step, except you asked the user.
|
|
100
111
|
|
|
101
112
|
2. **Investigate Code Base**:
|
|
102
113
|
|
|
@@ -108,41 +119,12 @@ permitted way to persist artifacts is via `task_save(...)`.
|
|
|
108
119
|
|
|
109
120
|
3. Do not output anything in this step.
|
|
110
121
|
|
|
111
|
-
3. **
|
|
112
|
-
|
|
113
|
-
1. *Propose* corresponding *refactoring approach*, including
|
|
114
|
-
optionally, some *alternative* refactoring approaches.
|
|
115
|
-
|
|
116
|
-
2. Annotate the approach you recommend with an <annotation/> of
|
|
117
|
-
` ⚝ **RECOMMENDATION** ⚝`.
|
|
118
|
-
|
|
119
|
-
3. Report each approach with the following <template/>
|
|
120
|
-
and do not output anything else in this step:
|
|
121
|
-
|
|
122
|
-
<template>
|
|
123
|
-
🔵 **APPROACH A<n/>**<annotation/>: *<summary/>*
|
|
124
|
-
- [...]
|
|
125
|
-
- [...]
|
|
126
|
-
- [...]
|
|
127
|
-
<optional-diagram/>
|
|
128
|
-
</template>
|
|
129
|
-
|
|
130
|
-
Hints:
|
|
122
|
+
3. **Internalize Refactoring Tenets**:
|
|
131
123
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
number of bullet points in the range of 1-4.
|
|
124
|
+
Internalize and honor the following tenets.
|
|
125
|
+
Do not output anything.
|
|
135
126
|
|
|
136
|
-
|
|
137
|
-
an optional diagram <optional-diagram/> by invoking the
|
|
138
|
-
`ase-meta-diagram` skill via the `Skill` tool. For *current vs.
|
|
139
|
-
proposed* comparisons, render each side as a *separate*
|
|
140
|
-
`ase-meta-diagram` invocation and stack the rendered blocks
|
|
141
|
-
*vertically* (labels `**Before:**` / `**After:**`); never
|
|
142
|
-
side-by-side. Omit <optional-diagram/> entirely for simple or
|
|
143
|
-
purely local situation.
|
|
144
|
-
|
|
145
|
-
*Recommended* Tenets (generic):
|
|
127
|
+
1. *Recommended* Tenets (generic):
|
|
146
128
|
|
|
147
129
|
- **Surgical Changes**:
|
|
148
130
|
Keep source code changes always as small as possible.
|
|
@@ -160,7 +142,7 @@ permitted way to persist artifacts is via `task_save(...)`.
|
|
|
160
142
|
Strictly align with the existing code base by exactly following its
|
|
161
143
|
coding style, its structure, its naming conventions, etc.
|
|
162
144
|
|
|
163
|
-
|
|
145
|
+
2. *Essential* Tenets (refactoring specific):
|
|
164
146
|
|
|
165
147
|
- **Boy Scout Rule**:
|
|
166
148
|
After the refactoring, leave the code base cleaner than you found it.
|
|
@@ -169,16 +151,65 @@ permitted way to persist artifacts is via `task_save(...)`.
|
|
|
169
151
|
Strike for a set of small, focused parts (high cohesion) connected by
|
|
170
152
|
thin, explicit wires (low coupling).
|
|
171
153
|
|
|
172
|
-
4. **
|
|
154
|
+
4. **Find Refactoring Approaches**:
|
|
155
|
+
|
|
156
|
+
You *MUST* perform the following sub-steps *internally* and *without
|
|
157
|
+
any output* until and including the recommendation decision. Only
|
|
158
|
+
sub-step 4 below is allowed to produce output.
|
|
159
|
+
|
|
160
|
+
1. *Propose* corresponding *refactoring approach*, including
|
|
161
|
+
optionally, some *alternative* refactoring approaches. Do *not*
|
|
162
|
+
output anything in this sub-step.
|
|
163
|
+
|
|
164
|
+
2. *Reflect* on and *critique* the proposed approaches by deriving,
|
|
165
|
+
per approach, a small set of concrete *pros* and *cons*. Do
|
|
166
|
+
*not* output anything in this sub-step.
|
|
167
|
+
|
|
168
|
+
3. Based on the reflection, *decide* which approach to recommend
|
|
169
|
+
and annotate it with an <annotation/> of
|
|
170
|
+
` ⚝ **RECOMMENDATION** ⚝`. All other approaches receive an
|
|
171
|
+
empty <annotation/>. Do *not* output anything in this sub-step.
|
|
172
|
+
|
|
173
|
+
4. *Now* report each approach with the following <template/>,
|
|
174
|
+
inlining its pros/cons derived in sub-step 2, and do not output
|
|
175
|
+
anything else in this step:
|
|
176
|
+
|
|
177
|
+
<template>
|
|
178
|
+
🔵 **APPROACH A<n/>**<annotation/>: *<summary/>*
|
|
179
|
+
● [...]
|
|
180
|
+
● [...]
|
|
181
|
+
● [...]
|
|
182
|
+
⊕ *pro*: [...]
|
|
183
|
+
⊖ *con*: [...]
|
|
184
|
+
<optional-diagram/>
|
|
185
|
+
</template>
|
|
186
|
+
|
|
187
|
+
Hints:
|
|
188
|
+
|
|
189
|
+
- Give a short one-sentence <summary/> of the refactoring approach plus
|
|
190
|
+
*precise* and *brief* refactoring information. Try to keep the
|
|
191
|
+
number of bullet points (●) in the range of 1-4.
|
|
192
|
+
|
|
193
|
+
- In case of a *complex refactoring situation* only, visualize it with
|
|
194
|
+
an optional diagram <optional-diagram/> by invoking the
|
|
195
|
+
`ase-meta-diagram` skill via the `Skill` tool. For *current vs.
|
|
196
|
+
proposed* comparisons, render each side as a *separate*
|
|
197
|
+
`ase-meta-diagram` invocation and stack the rendered blocks
|
|
198
|
+
*vertically* (labels `**Before:**` / `**After:**`); never
|
|
199
|
+
side-by-side. Omit <optional-diagram/> entirely for simple or
|
|
200
|
+
purely local situation.
|
|
201
|
+
|
|
202
|
+
5. **Choose Refactoring Approach**:
|
|
173
203
|
|
|
174
204
|
1. If <getopt-option-auto/> is equal `false`:
|
|
175
205
|
Let the *user interactively choose* the preferred refactoring
|
|
176
206
|
approach A<n/> with the help of the <user-dialog-tool/> tool.
|
|
177
|
-
Use the header `Select Approach`
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
207
|
+
Use the header `Select Approach`, use `A<n/>: <short-summary/>`
|
|
208
|
+
for the option (where <short-summary/> is an ultra brief summary
|
|
209
|
+
of the approach A<n/>), and *single-selection* only and provide
|
|
210
|
+
small *code change previews*. Mark your recommended refactoring
|
|
211
|
+
approach with ` ⚝ **RECOMMENDATION** ⚝` here again. Except for
|
|
212
|
+
the interactive selection, do not output anything in this step.
|
|
182
213
|
|
|
183
214
|
2. If <getopt-option-auto/> is equal `true`:
|
|
184
215
|
Set <n/> to the number of the refactoring approach A<n/> you recommend.
|
|
@@ -188,7 +219,7 @@ permitted way to persist artifacts is via `task_save(...)`.
|
|
|
188
219
|
⧉ **ASE**: ◉ task: **<ase-task-id/>**, ▶ status: **auto-chosen approach A<n/>**
|
|
189
220
|
</template>
|
|
190
221
|
|
|
191
|
-
|
|
222
|
+
6. **Compose Refactoring Plan**:
|
|
192
223
|
|
|
193
224
|
1. *Compose a refactoring plan* for the chosen refactoring A<n/> by
|
|
194
225
|
closely aligning to the existing architecture and the existing
|
|
@@ -215,58 +246,9 @@ permitted way to persist artifacts is via `task_save(...)`.
|
|
|
215
246
|
⧉ **ASE**: ◉ task: **<ase-task-id/>**, ✪ plan: **<words/>** words, ▶ status: **plan created**
|
|
216
247
|
</template>
|
|
217
248
|
|
|
218
|
-
5.
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
- If <getopt-option-next/> is equal to `none`:
|
|
225
|
-
Let the *user interactively choose* what to do as the next step.
|
|
226
|
-
|
|
227
|
-
<expand name="user-dialog">
|
|
228
|
-
Next Step: How would you like to proceed with the plan?
|
|
229
|
-
DONE: Stop processing.
|
|
230
|
-
EDIT: Hand processing off to editing.
|
|
231
|
-
PREFLIGHT: Hand processing off to preflighting.
|
|
232
|
-
IMPLEMENT: Hand processing off to implementation.
|
|
233
|
-
</expand>
|
|
234
|
-
|
|
235
|
-
6. Check the tool <result/> and dispatch accordingly:
|
|
236
|
-
|
|
237
|
-
- If <result/> is `DONE` or `CANCEL`:
|
|
238
|
-
Only output the following <template/> and then *STOP*.
|
|
239
|
-
|
|
240
|
-
<template>
|
|
241
|
-
⧉ **ASE**: ◉ task: **<ase-task-id/>**, ✪ plan: **<words/>** words, ▶ status: **done**
|
|
242
|
-
</template>
|
|
243
|
-
|
|
244
|
-
- If <result/> is `EDIT`:
|
|
245
|
-
Only output the following <template/> and then use the
|
|
246
|
-
`Skill` tool to invoke the `ase:ase-task-edit` skill in
|
|
247
|
-
order to edit the plan. Immediately stop processing the
|
|
248
|
-
current skill once the `Skill` tool was used.
|
|
249
|
-
|
|
250
|
-
<template>
|
|
251
|
-
⧉ **ASE**: ◉ task: **<ase-task-id/>**, ✪ plan: **<words/>** words, ▶ status: **hand off to edit**
|
|
252
|
-
</template>
|
|
253
|
-
|
|
254
|
-
- If <result/> is `PREFLIGHT`:
|
|
255
|
-
Only output the following <template/> and then use the
|
|
256
|
-
`Skill` tool to invoke the `ase:ase-task-preflight` skill in
|
|
257
|
-
order to preflight the plan. Immediately stop processing the
|
|
258
|
-
current skill once the `Skill` tool was used.
|
|
259
|
-
|
|
260
|
-
<template>
|
|
261
|
-
⧉ **ASE**: ◉ task: **<ase-task-id/>**, ✪ plan: **<words/>** words, ▶ status: **hand off to preflight**
|
|
262
|
-
</template>
|
|
263
|
-
|
|
264
|
-
- If <result/> is `IMPLEMENT`:
|
|
265
|
-
Only output the following <template/> and then use the
|
|
266
|
-
`Skill` tool to invoke the `ase:ase-task-implement` skill in
|
|
267
|
-
order to implement the plan. Immediately stop processing the
|
|
268
|
-
current skill once the `Skill` tool was used.
|
|
269
|
-
|
|
270
|
-
<template>
|
|
271
|
-
⧉ **ASE**: ◉ task: **<ase-task-id/>**, ✪ plan: **<words/>** words, ▶ status: **hand off to implement**
|
|
272
|
-
</template>
|
|
249
|
+
5. Directly pass-through control to the `ase:ase-task-edit` skill.
|
|
250
|
+
Set <args></args> (set args to empty). If <getopt-option-next/>
|
|
251
|
+
is not equal `none`, set <args><args/> --next
|
|
252
|
+
<getopt-option-next/></args> (append to args). Then call the
|
|
253
|
+
tool `Skill(skill: "ase:ase-task-edit", args: <args/>)`.
|
|
254
|
+
|
|
@@ -56,12 +56,13 @@ permitted way to persist artifacts is via `task_save(...)`.
|
|
|
56
56
|
1. **Reason About Problem**:
|
|
57
57
|
|
|
58
58
|
1. If <problem/> matches the regexp `^[PT]\d+$` (i.e. a bare issue
|
|
59
|
-
identifier like `P1`, `P2`, `T1`, `T2`, ...),
|
|
60
|
-
<problem-id><problem/></problem-id
|
|
61
|
-
<ase-task-id
|
|
62
|
-
|
|
63
|
-
`
|
|
64
|
-
|
|
59
|
+
identifier like `P1`, `P2`, `T1`, `T2`, ...),
|
|
60
|
+
set <problem-id><problem/></problem-id> and
|
|
61
|
+
<ase-task-id><problem/></ase-task-id>, call the `task_id(id:
|
|
62
|
+
<ase-task-id/>, session: <ase-session-id/>)` tool from the
|
|
63
|
+
`ase` MCP service to implicitly switch the task, and then
|
|
64
|
+
call the `kv_get(key: "ase-issue-<problem-id/>")` tool of
|
|
65
|
+
the `ase` MCP service to retrieve the previously persisted
|
|
65
66
|
problem description. If the returned `text` is non-empty, set
|
|
66
67
|
<problem><text/></problem>, otherwise complain to the user that
|
|
67
68
|
no analyzer result exists for <problem-id/> and stop processing.
|
|
@@ -85,7 +86,7 @@ permitted way to persist artifacts is via `task_save(...)`.
|
|
|
85
86
|
<problem><text/></problem> and <ase-task-id><id/></ase-task-id>
|
|
86
87
|
and call the `task_id(id: <ase-task-id/>, session:
|
|
87
88
|
<ase-session-id/>)` tool from the `ase` MCP service to
|
|
88
|
-
implicitly switch the task.
|
|
89
|
+
implicitly switch the task. Do not output anything.
|
|
89
90
|
|
|
90
91
|
4. If <problem/> is empty,
|
|
91
92
|
ask the user interactively, without a special tool, for the
|
|
@@ -95,21 +96,32 @@ permitted way to persist artifacts is via `task_save(...)`.
|
|
|
95
96
|
|
|
96
97
|
Then set <problem/> to the response of the user.
|
|
97
98
|
|
|
98
|
-
5.
|
|
99
|
+
5. <if condition="
|
|
100
|
+
<ase-task-id/> is equal `default` and
|
|
101
|
+
<problem/> is not empty
|
|
102
|
+
">
|
|
103
|
+
Set <ase-task-id/> to a unique task id, derived from <problem/>,
|
|
104
|
+
which consists of two lower-case words concatenated with a
|
|
105
|
+
`-` character. Then call the `task_id(id: <ase-task-id/>,
|
|
106
|
+
session: <ase-session-id/>)` tool from the `ase` MCP service to
|
|
107
|
+
implicitly switch the task. Do not output anything.
|
|
108
|
+
</if>
|
|
109
|
+
|
|
110
|
+
6. Report the task and problem with the following <template/>:
|
|
99
111
|
|
|
100
112
|
<template>
|
|
101
113
|
⧉ **ASE**: ◉ task: **<ase-task-id/>**
|
|
102
114
|
⧉ **ASE**: ⇌ problem: **<problem/>**
|
|
103
115
|
</template>
|
|
104
116
|
|
|
105
|
-
|
|
117
|
+
7. Figure out what the requested <problem/> is about.
|
|
106
118
|
|
|
107
|
-
|
|
119
|
+
8. Ask the user for clarification if the goal of this resolution is
|
|
108
120
|
too unclear.
|
|
109
121
|
|
|
110
|
-
|
|
122
|
+
9. Do not output anything in this step, except you asked the user.
|
|
111
123
|
|
|
112
|
-
|
|
124
|
+
10. Investigate and *figure out details* related to this problem.
|
|
113
125
|
Report those details with the following <template/>:
|
|
114
126
|
|
|
115
127
|
<template>
|
|
@@ -118,9 +130,9 @@ permitted way to persist artifacts is via `task_save(...)`.
|
|
|
118
130
|
<optional-diagram/>
|
|
119
131
|
|
|
120
132
|
🟠 **PROBLEM DETAILS**: *<summary/>*
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
133
|
+
● [...]
|
|
134
|
+
● [...]
|
|
135
|
+
● [...]
|
|
124
136
|
</template>
|
|
125
137
|
|
|
126
138
|
Hints:
|
|
@@ -130,7 +142,7 @@ permitted way to persist artifacts is via `task_save(...)`.
|
|
|
130
142
|
|
|
131
143
|
- Give a short one-sentence <summary/> of the <problem/> plus *precise*
|
|
132
144
|
but *brief* code processing information to understand the problem.
|
|
133
|
-
Try to keep the number of bullet points in the range of 1-4.
|
|
145
|
+
Try to keep the number of bullet points (●) in the range of 1-4.
|
|
134
146
|
|
|
135
147
|
- In case of a *complex context situation* with complex *structure*
|
|
136
148
|
(layout, components, dependencies, etc), complex *control flow*
|
|
@@ -151,22 +163,66 @@ permitted way to persist artifacts is via `task_save(...)`.
|
|
|
151
163
|
|
|
152
164
|
3. Do not output anything in this step.
|
|
153
165
|
|
|
154
|
-
3. **
|
|
166
|
+
3. **Internalize Problem Resolution Tenets**:
|
|
167
|
+
|
|
168
|
+
Internalize and honor the following tenets.
|
|
169
|
+
Do not output anything.
|
|
170
|
+
|
|
171
|
+
1. *Recommended* Tenets (generic):
|
|
172
|
+
|
|
173
|
+
- **Surgical Changes**:
|
|
174
|
+
Keep source code changes always as small as possible.
|
|
175
|
+
|
|
176
|
+
- **Separation of Concerns**:
|
|
177
|
+
Clearly separate all individual concerns as good as possible.
|
|
178
|
+
|
|
179
|
+
- **Single Responsibility Principle**:
|
|
180
|
+
Every module, class, or function should have only one reason to change.
|
|
181
|
+
|
|
182
|
+
- **Behavior Preservation**:
|
|
183
|
+
Refactoring changes only re-structure, never change any observable behavior.
|
|
184
|
+
|
|
185
|
+
- **Align with Code Base**:
|
|
186
|
+
Strictly align with the existing code base by exactly following its
|
|
187
|
+
coding style, its structure, its naming conventions, etc.
|
|
188
|
+
|
|
189
|
+
2. *Essential* Tenets (problem resolving specific):
|
|
190
|
+
|
|
191
|
+
- **No Cleanups**:
|
|
192
|
+
Strictly focus on resolving the problem and do not mix this task
|
|
193
|
+
with any other necessary code cleanups, except they are really
|
|
194
|
+
necessary for resolving the task.
|
|
195
|
+
|
|
196
|
+
4. **Find Problem Resolution Approaches**:
|
|
197
|
+
|
|
198
|
+
You *MUST* perform the following sub-steps *internally* and *without
|
|
199
|
+
any output* until and including the recommendation decision. Only
|
|
200
|
+
sub-step 4 below is allowed to produce output.
|
|
155
201
|
|
|
156
202
|
1. *Propose* corresponding *resolution approach*, including optionally,
|
|
157
|
-
some *alternative* resolution approaches.
|
|
203
|
+
some *alternative* resolution approaches. Do *not* output anything
|
|
204
|
+
in this sub-step.
|
|
158
205
|
|
|
159
|
-
2.
|
|
160
|
-
|
|
206
|
+
2. *Reflect* on and *critique* the proposed approaches by deriving,
|
|
207
|
+
per approach, a small set of concrete *pros* and *cons*. Do
|
|
208
|
+
*not* output anything in this sub-step.
|
|
161
209
|
|
|
162
|
-
3.
|
|
163
|
-
and
|
|
210
|
+
3. Based on the reflection, *decide* which approach to recommend
|
|
211
|
+
and annotate it with an <annotation/> of
|
|
212
|
+
` ⚝ **RECOMMENDATION** ⚝`. All other approaches receive an
|
|
213
|
+
empty <annotation/>. Do *not* output anything in this sub-step.
|
|
214
|
+
|
|
215
|
+
4. *Now* report each approach with the following <template/>,
|
|
216
|
+
inlining its pros/cons derived in sub-step 2, and do not output
|
|
217
|
+
anything else in this step:
|
|
164
218
|
|
|
165
219
|
<template>
|
|
166
220
|
🔵 **APPROACH A<n/>**<annotation/>: *<summary/>*
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
221
|
+
● [...]
|
|
222
|
+
● [...]
|
|
223
|
+
● [...]
|
|
224
|
+
⊕ *pro*: [...]
|
|
225
|
+
⊖ *con*: [...]
|
|
170
226
|
<optional-diagram/>
|
|
171
227
|
</template>
|
|
172
228
|
|
|
@@ -174,7 +230,7 @@ permitted way to persist artifacts is via `task_save(...)`.
|
|
|
174
230
|
|
|
175
231
|
- Give a short one-sentence <summary/> of the resolution approach plus
|
|
176
232
|
*precise* and *brief* resolution information. Try to keep the
|
|
177
|
-
number of bullet points in the range of 1-4.
|
|
233
|
+
number of bullet points (●) in the range of 1-4.
|
|
178
234
|
|
|
179
235
|
- Focus on resolution approaches for *practically relevant* cases and do *not*
|
|
180
236
|
investigate on theoretical or fictive cases. This is especially the case
|
|
@@ -196,39 +252,16 @@ permitted way to persist artifacts is via `task_save(...)`.
|
|
|
196
252
|
side-by-side. Omit <optional-diagram/> entirely for simple or
|
|
197
253
|
purely local situation.
|
|
198
254
|
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
- **Surgical Changes**:
|
|
202
|
-
Keep source code changes always as small as possible.
|
|
203
|
-
|
|
204
|
-
- **Separation of Concerns**:
|
|
205
|
-
Clearly separate all individual concerns as good as possible.
|
|
206
|
-
|
|
207
|
-
- **Single Responsibility Principle**:
|
|
208
|
-
Every module, class, or function should have only one reason to change.
|
|
209
|
-
|
|
210
|
-
- **Behavior Preservation**:
|
|
211
|
-
Refactoring changes only re-structure, never change any observable behavior.
|
|
212
|
-
|
|
213
|
-
- **Align with Code Base**:
|
|
214
|
-
Strictly align with the existing code base by exactly following its
|
|
215
|
-
coding style, its structure, its naming conventions, etc.
|
|
216
|
-
|
|
217
|
-
*Essential* Tenets (specific):
|
|
218
|
-
|
|
219
|
-
- **No Cleanups**:
|
|
220
|
-
Strictly focus on resolving the problem and do not mix this task
|
|
221
|
-
with any other necessary code cleanups, except they are really
|
|
222
|
-
necessary for resolving the task.
|
|
223
|
-
|
|
224
|
-
4. **Choose Problem Resolution Approach**:
|
|
255
|
+
5. **Choose Problem Resolution Approach**:
|
|
225
256
|
|
|
226
257
|
1. If <getopt-option-auto/> is equal `false`:
|
|
227
258
|
Let the *user interactively choose* the preferred resolution
|
|
228
259
|
approach A<n/> with the help of the <user-dialog-tool/> tool.
|
|
229
|
-
Use the header `Select Approach`
|
|
230
|
-
|
|
231
|
-
|
|
260
|
+
Use the header `Select Approach`, use `A<n/>: <short-summary/>`
|
|
261
|
+
for the option (where <short-summary/> is an ultra brief summary
|
|
262
|
+
of the approach A<n/>), and *single-selection* only and provide
|
|
263
|
+
small *code change previews*. Mark your recommended resolution
|
|
264
|
+
approach with ` ⚝ **RECOMMENDATION** ⚝` here again.
|
|
232
265
|
|
|
233
266
|
2. If <getopt-option-auto/> is equal `true`:
|
|
234
267
|
Set <n/> to the number of the resolution approach A<n/> you recommend.
|
|
@@ -238,7 +271,7 @@ permitted way to persist artifacts is via `task_save(...)`.
|
|
|
238
271
|
⧉ **ASE**: ◉ task: **<ase-task-id/>**, ▶ status: **auto-chosen approach A<n/>**
|
|
239
272
|
</template>
|
|
240
273
|
|
|
241
|
-
|
|
274
|
+
6. **Compose Problem Resolution Plan**:
|
|
242
275
|
|
|
243
276
|
1. *Compose a plan* with code references, a precise description of the
|
|
244
277
|
problem, the chosen resolution approach, a preview of the *unified
|
|
@@ -272,58 +305,9 @@ permitted way to persist artifacts is via `task_save(...)`.
|
|
|
272
305
|
⧉ **ASE**: ◉ task: **<ase-task-id/>**, ✪ plan: **<words/>** words, ▶ status: **plan created**
|
|
273
306
|
</template>
|
|
274
307
|
|
|
275
|
-
6.
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
- If <getopt-option-next/> is equal to `none`:
|
|
282
|
-
Let the *user interactively choose* what to do as the next step.
|
|
283
|
-
|
|
284
|
-
<expand name="user-dialog">
|
|
285
|
-
Next Step: How would you like to proceed with the plan?
|
|
286
|
-
DONE: Stop processing.
|
|
287
|
-
EDIT: Hand processing off to editing.
|
|
288
|
-
PREFLIGHT: Hand processing off to preflighting.
|
|
289
|
-
IMPLEMENT: Hand processing off to implementation.
|
|
290
|
-
</expand>
|
|
291
|
-
|
|
292
|
-
7. Check the tool <result/> and dispatch accordingly:
|
|
293
|
-
|
|
294
|
-
- If <result/> is `DONE` or `CANCEL`:
|
|
295
|
-
Only output the following <template/> and then *STOP*.
|
|
296
|
-
|
|
297
|
-
<template>
|
|
298
|
-
⧉ **ASE**: ◉ task: **<ase-task-id/>**, ✪ plan: **<words/>** words, ▶ status: **done**
|
|
299
|
-
</template>
|
|
300
|
-
|
|
301
|
-
- If <result/> is `EDIT`:
|
|
302
|
-
Only output the following <template/> and then use the
|
|
303
|
-
`Skill` tool to invoke the `ase:ase-task-edit` skill in
|
|
304
|
-
order to edit the plan. Immediately stop processing the
|
|
305
|
-
current skill once the `Skill` tool was used.
|
|
306
|
-
|
|
307
|
-
<template>
|
|
308
|
-
⧉ **ASE**: ◉ task: **<ase-task-id/>**, ✪ plan: **<words/>** words, ▶ status: **hand off to edit**
|
|
309
|
-
</template>
|
|
310
|
-
|
|
311
|
-
- If <result/> is `PREFLIGHT`:
|
|
312
|
-
Only output the following <template/> and then use the
|
|
313
|
-
`Skill` tool to invoke the `ase:ase-task-preflight` skill in
|
|
314
|
-
order to preflight the plan. Immediately stop processing the
|
|
315
|
-
current skill once the `Skill` tool was used.
|
|
316
|
-
|
|
317
|
-
<template>
|
|
318
|
-
⧉ **ASE**: ◉ task: **<ase-task-id/>**, ✪ plan: **<words/>** words, ▶ status: **hand off to preflight**
|
|
319
|
-
</template>
|
|
320
|
-
|
|
321
|
-
- If <result/> is `IMPLEMENT`:
|
|
322
|
-
Only output the following <template/> and then use the
|
|
323
|
-
`Skill` tool to invoke the `ase:ase-task-implement` skill in
|
|
324
|
-
order to implement the plan. Immediately stop processing the
|
|
325
|
-
current skill once the `Skill` tool was used.
|
|
326
|
-
|
|
327
|
-
<template>
|
|
328
|
-
⧉ **ASE**: ◉ task: **<ase-task-id/>**, ✪ plan: **<words/>** words, ▶ status: **hand off to implement**
|
|
329
|
-
</template>
|
|
308
|
+
6. Directly pass-through control to the `ase:ase-task-edit` skill.
|
|
309
|
+
Set <args></args> (set args to empty). If <getopt-option-next/>
|
|
310
|
+
is not equal `none`, set <args><args/> --next
|
|
311
|
+
<getopt-option-next/></args> (append to args). Then call the
|
|
312
|
+
tool `Skill(skill: "ase:ase-task-edit", args: <args/>)`.
|
|
313
|
+
|
|
@@ -21,8 +21,10 @@ Evaluate Alternatives
|
|
|
21
21
|
Evaluate Alternatives
|
|
22
22
|
</skill>
|
|
23
23
|
|
|
24
|
+
<role>
|
|
24
25
|
Your role is an experienced, *expert-level assistant*,
|
|
25
26
|
specialized in *evaluating alternatives*.
|
|
27
|
+
</role>
|
|
26
28
|
|
|
27
29
|
<objective>
|
|
28
30
|
*Evaluate* *alternatives* through a weighted
|
|
@@ -73,10 +75,11 @@ multi-*criteria* decision matrix.
|
|
|
73
75
|
over) is its single most distinguishing perspective, and remember
|
|
74
76
|
this as an <info-K/> (K=1-N) formatted like `<type/>: <hint/>` where
|
|
75
77
|
<type/> is one of `USP`, `Crux`, or `Gotcha` and <hint/> is a 1-6
|
|
76
|
-
word hint.
|
|
78
|
+
word hint. Do not output anything.
|
|
77
79
|
|
|
78
80
|
- For the set of alternatives, decide what the 1-6 word long
|
|
79
81
|
name of the *class of alternatives* <class-of-alternatives/> is.
|
|
82
|
+
Do not output anything.
|
|
80
83
|
|
|
81
84
|
- For each alternative <alternative-K/> (K=1-N), decide whether
|
|
82
85
|
it is a genuine member of <class-of-alternatives/>. If any
|
|
@@ -178,16 +181,16 @@ multi-*criteria* decision matrix.
|
|
|
178
181
|
- The best alternative <alternative-K/> (K=1-N) is the alternative
|
|
179
182
|
whose *raw, unrounded* <rating-K/> (i.e. the product-sum from STEP
|
|
180
183
|
4, *before* the display-only rounding) is the maximum rating value
|
|
181
|
-
across all alternatives.
|
|
184
|
+
across all alternatives. Do not output anything.
|
|
182
185
|
|
|
183
186
|
- The second best alternative <alternative-X/> (X=1-N, X != K) is
|
|
184
187
|
the alternative whose *raw, unrounded* <rating-X/> is the second
|
|
185
|
-
largest rating value across all alternatives.
|
|
188
|
+
largest rating value across all alternatives. Do not output anything.
|
|
186
189
|
|
|
187
190
|
- If multiple alternatives share the second-largest raw rating, pick
|
|
188
191
|
any one of them as <alternative-X/>; the resulting <distance/> and
|
|
189
192
|
<percentage/> are unaffected by the choice, so the downstream output
|
|
190
|
-
is deterministic.
|
|
193
|
+
is deterministic. Do not output anything.
|
|
191
194
|
|
|
192
195
|
- Determine rating distance <distance/> between <alternative-K/> and
|
|
193
196
|
<alternative-X/> from their *raw, unrounded* ratings by calculating:
|
|
@@ -203,6 +206,7 @@ multi-*criteria* decision matrix.
|
|
|
203
206
|
(so a true zero tie with <distance/> = 0 falls into the
|
|
204
207
|
*MULTIPLE BEST* branch below, and a non-zero gap with zero
|
|
205
208
|
best falls into the *small distance* branch below).
|
|
209
|
+
Do not output anything.
|
|
206
210
|
|
|
207
211
|
- By construction, <rating-K/> is the maximum rating across
|
|
208
212
|
all alternatives, so <distance/> >= 0 always holds; using
|
|
@@ -210,7 +214,7 @@ multi-*criteria* decision matrix.
|
|
|
210
214
|
regimes. Note that when <rating-K/> itself is negative, the
|
|
211
215
|
denominator anchors to a poor best rating and small gaps can
|
|
212
216
|
appear large; the all-negative regime is surfaced as a dedicated
|
|
213
|
-
warning branch below.
|
|
217
|
+
warning branch below. Do not output anything.
|
|
214
218
|
|
|
215
219
|
- If <percentage/> is less than 0.01 (i.e. <distance/> is
|
|
216
220
|
effectively zero relative to abs(<rating-K/>)), stop the flow after
|