@rse/ase 0.0.58 → 0.0.60
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 +28 -2
- package/dst/ase-hello.js +5 -5
- package/package.json +1 -1
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/.github/plugin/plugin.json +1 -1
- package/plugin/meta/ase-format-adr.md +199 -0
- package/plugin/meta/ase-getopt.md +12 -5
- package/plugin/package.json +1 -1
- package/plugin/skills/ase-arch-discover/SKILL.md +1 -1
- package/plugin/skills/ase-code-craft/SKILL.md +43 -15
- package/plugin/skills/ase-code-craft/help.md +24 -8
- package/plugin/skills/ase-code-explain/SKILL.md +1 -1
- package/plugin/skills/ase-code-insight/SKILL.md +1 -1
- package/plugin/skills/ase-code-refactor/SKILL.md +43 -15
- package/plugin/skills/ase-code-refactor/help.md +24 -8
- package/plugin/skills/ase-code-resolve/SKILL.md +43 -15
- package/plugin/skills/ase-code-resolve/help.md +24 -8
- package/plugin/skills/ase-meta-changes/SKILL.md +1 -1
- package/plugin/skills/ase-meta-chat/SKILL.md +1 -1
- package/plugin/skills/ase-meta-diaboli/SKILL.md +152 -0
- package/plugin/skills/ase-meta-diaboli/help.md +60 -0
- package/plugin/skills/ase-meta-persona/SKILL.md +1 -1
- package/plugin/skills/ase-meta-quorum/SKILL.md +1 -1
- package/plugin/skills/ase-meta-search/SKILL.md +1 -1
- package/plugin/skills/ase-meta-why/SKILL.md +4 -4
- package/plugin/skills/ase-task-delete/SKILL.md +1 -1
- package/plugin/skills/ase-task-edit/SKILL.md +42 -23
- package/plugin/skills/ase-task-edit/help.md +10 -4
- package/plugin/skills/ase-task-grill/SKILL.md +275 -0
- package/plugin/skills/ase-task-grill/help.md +79 -0
- package/plugin/skills/ase-task-id/SKILL.md +1 -1
- package/plugin/skills/ase-task-implement/SKILL.md +31 -9
- package/plugin/skills/ase-task-implement/help.md +8 -4
- package/plugin/skills/ase-task-list/SKILL.md +1 -1
- package/plugin/skills/ase-task-preflight/SKILL.md +40 -13
- package/plugin/skills/ase-task-preflight/help.md +10 -5
- package/plugin/skills/ase-task-reboot/SKILL.md +61 -11
- package/plugin/skills/ase-task-reboot/help.md +13 -6
- package/plugin/skills/ase-task-rename/SKILL.md +1 -1
- package/plugin/skills/ase-task-view/SKILL.md +1 -1
- /package/plugin/meta/{ase-plan.md → ase-format-plan.md} +0 -0
package/dst/ase-getopt.js
CHANGED
|
@@ -52,7 +52,7 @@ export class GetoptMCP {
|
|
|
52
52
|
});
|
|
53
53
|
/* tokenize spec and add one option per token */
|
|
54
54
|
const tokens = args.spec.split(/\s+/).filter((e) => e.length > 0);
|
|
55
|
-
const re = /^--([A-Za-z][A-Za-z0-9-]*)(?:\|-([A-Za-z]))?(?:=(\((.*)\)
|
|
55
|
+
const re = /^--([A-Za-z][A-Za-z0-9-]*)(?:\|-([A-Za-z]))?(?:=(\((.*)\)(\.\.\.)?|.*))?$/;
|
|
56
56
|
for (const tok of tokens) {
|
|
57
57
|
const m = re.exec(tok);
|
|
58
58
|
if (m === null)
|
|
@@ -61,14 +61,16 @@ export class GetoptMCP {
|
|
|
61
61
|
const short = m[2] ?? null;
|
|
62
62
|
const valuePart = m[3] ?? null;
|
|
63
63
|
const choicePart = m[4] ?? null;
|
|
64
|
+
const listMarker = m[5] ?? null;
|
|
64
65
|
const takesValue = valuePart !== null;
|
|
65
66
|
const choices = choicePart !== null ? choicePart.split("|") : null;
|
|
67
|
+
const isList = listMarker !== null;
|
|
66
68
|
const dflt = choices !== null ? choices[0] : valuePart;
|
|
67
69
|
const head = short !== null ? `-${short}, --${long}` : `--${long}`;
|
|
68
70
|
const flags = takesValue ? `${head} <value>` : head;
|
|
69
71
|
const opt = new Option(flags);
|
|
70
72
|
if (takesValue) {
|
|
71
|
-
if (choices !== null)
|
|
73
|
+
if (choices !== null && !isList)
|
|
72
74
|
opt.choices(choices);
|
|
73
75
|
opt.default(dflt);
|
|
74
76
|
}
|
|
@@ -78,6 +80,30 @@ export class GetoptMCP {
|
|
|
78
80
|
}
|
|
79
81
|
/* parse args */
|
|
80
82
|
cmd.parse(argsVec, { from: "user" });
|
|
83
|
+
/* validate comma-separated list-of-choices options */
|
|
84
|
+
const listOpts = [];
|
|
85
|
+
for (const tok of tokens) {
|
|
86
|
+
const m = re.exec(tok);
|
|
87
|
+
if (m === null)
|
|
88
|
+
continue;
|
|
89
|
+
const long = m[1];
|
|
90
|
+
const choicePart = m[4] ?? null;
|
|
91
|
+
const listMarker = m[5] ?? null;
|
|
92
|
+
if (choicePart !== null && listMarker !== null)
|
|
93
|
+
listOpts.push({ long, choices: choicePart.split("|") });
|
|
94
|
+
}
|
|
95
|
+
if (listOpts.length > 0) {
|
|
96
|
+
const opts = cmd.opts();
|
|
97
|
+
for (const { long, choices } of listOpts) {
|
|
98
|
+
const v = opts[long];
|
|
99
|
+
if (typeof v !== "string")
|
|
100
|
+
continue;
|
|
101
|
+
const items = v.split(",").map((s) => s.trim()).filter((s) => s.length > 0);
|
|
102
|
+
if (items.length > 0 && !choices.includes(items[0]))
|
|
103
|
+
throw new Error(`invalid token "${items[0]}" for --${long} ` +
|
|
104
|
+
`(allowed: ${choices.join(", ")})`);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
81
107
|
/* compute verbatim trailing argument string */
|
|
82
108
|
let argsVerbatim = "";
|
|
83
109
|
if (argsRaw !== null) {
|
package/dst/ase-hello.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { Chalk } from "chalk";
|
|
7
7
|
/* forced-color chalk instance: stdout is a pipe under Claude Code,
|
|
8
8
|
so chalk auto-detection would yield level 0; force level 1 to keep
|
|
9
|
-
emitting ANSI sequences */
|
|
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 {
|
|
@@ -18,10 +18,10 @@ export default class HelloCommand {
|
|
|
18
18
|
register(program) {
|
|
19
19
|
program
|
|
20
20
|
.command("hello")
|
|
21
|
-
.description("
|
|
22
|
-
.
|
|
23
|
-
|
|
24
|
-
process.stdout.write(c.red(
|
|
21
|
+
.description("Show a greeting message")
|
|
22
|
+
.option("-s, --subject <subject>", "subject to greet", "Universe")
|
|
23
|
+
.action(async (opts) => {
|
|
24
|
+
process.stdout.write(c.red(`${opts.subject} World!`) + "\n");
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
27
|
}
|
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.60",
|
|
10
10
|
"license": "GPL-3.0-only",
|
|
11
11
|
"author": {
|
|
12
12
|
"name": "Dr. Ralf S. Engelschall",
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
|
|
2
|
+
Architecture Decision Record (ADR)
|
|
3
|
+
==================================
|
|
4
|
+
|
|
5
|
+
An *Architecture Decision Record (ADR)* records
|
|
6
|
+
a major decision related to the architecture.
|
|
7
|
+
|
|
8
|
+
FORMAT
|
|
9
|
+
------
|
|
10
|
+
|
|
11
|
+
Every ADR uses a strict and fixed format:
|
|
12
|
+
|
|
13
|
+
<format>
|
|
14
|
+
|
|
15
|
+
# ✪ <id/> - **<title/>**
|
|
16
|
+
|
|
17
|
+
✳ created: **<timestamp-created/>**
|
|
18
|
+
✎ modified: **<timestamp-modified/>**
|
|
19
|
+
▶ status: <status/>
|
|
20
|
+
|
|
21
|
+
## ※ WHEN (Context)
|
|
22
|
+
|
|
23
|
+
<context/>
|
|
24
|
+
|
|
25
|
+
## ※ WHAT (Decision)
|
|
26
|
+
|
|
27
|
+
<decision/>
|
|
28
|
+
|
|
29
|
+
## ※ WHY (Rationale)
|
|
30
|
+
|
|
31
|
+
<rationale/>
|
|
32
|
+
|
|
33
|
+
## ※ NOTES (Background)
|
|
34
|
+
|
|
35
|
+
<notes/>
|
|
36
|
+
|
|
37
|
+
</format>
|
|
38
|
+
|
|
39
|
+
You *MUST* honor the following hints on this *ADR* format:
|
|
40
|
+
|
|
41
|
+
- The <id/> is `ADR-<N/>-<slug/>` where <N/> is a 3-digit zero-padded
|
|
42
|
+
unique number, <slug/> is a unique "slug" of always 2 lower-cased
|
|
43
|
+
words (concatenated with "-" characters and in total not longer than
|
|
44
|
+
30 characters, and derived from the <decision/>).
|
|
45
|
+
|
|
46
|
+
- The <title/> is a short summary of the <decision/>, not longer than
|
|
47
|
+
80 characters.
|
|
48
|
+
|
|
49
|
+
- The <timestamp-created/> is the timestamp when this ADR
|
|
50
|
+
was created. The <timestamp-modified/> is the timestamp when this
|
|
51
|
+
ADR was last modified. Both use an ISO-style format value. The value
|
|
52
|
+
of both can be determined by a call to the `ase_timestamp(format:
|
|
53
|
+
"yyyy-LL-dd HH:mm")` tool of the `ase` MCP server and use the `text`
|
|
54
|
+
field of its response.
|
|
55
|
+
|
|
56
|
+
- The <status/> is `proposed`, `accepted`, `deprecated` or `superseded
|
|
57
|
+
by ADR-NNN-xxx-yyy`)
|
|
58
|
+
|
|
59
|
+
- The <context/> captures the situation that forces the <decision/> -
|
|
60
|
+
the "why are we even talking about this" part. It describes the
|
|
61
|
+
situation as it is, before the <decision/> is made.
|
|
62
|
+
|
|
63
|
+
The following usually goes into <context/>:
|
|
64
|
+
|
|
65
|
+
- The problem or need — what's broken, missing, or about to change
|
|
66
|
+
that requires a decision.
|
|
67
|
+
- The forces at play — technical constraints, business requirements,
|
|
68
|
+
deadlines, team skills, existing systems, regulatory/compliance
|
|
69
|
+
pressures. These are often competing and that tension is the whole point.
|
|
70
|
+
- Relevant facts — current architecture, prior decisions,
|
|
71
|
+
assumptions, what's known and what's uncertain.
|
|
72
|
+
- Scope/boundaries — what this decision is (and isn't) about.
|
|
73
|
+
|
|
74
|
+
It is written neutrally and factually. It should not contain the
|
|
75
|
+
decision itself, nor advocate for an option — a reader should
|
|
76
|
+
be able to read the <context/>, pause, and arrive at the decision
|
|
77
|
+
themselves because the forces make it (nearly) inevitable.
|
|
78
|
+
|
|
79
|
+
- The <decision/> states what you are actually going to do — the chosen
|
|
80
|
+
response to the forces laid out in the <context/>. It is written in
|
|
81
|
+
active, assertive voice, in the present or imperative tense, as a
|
|
82
|
+
committed position rather than a discussion.
|
|
83
|
+
|
|
84
|
+
The following usually goes into <decision/>:
|
|
85
|
+
|
|
86
|
+
- The choice itself — clearly and unambiguously.
|
|
87
|
+
- The essence of how — enough of the approach to make the choice
|
|
88
|
+
concrete (the mechanism, pattern, or technology), but not a full
|
|
89
|
+
implementation specification.
|
|
90
|
+
|
|
91
|
+
The <decision/> is a declaration, not a deliberation. The
|
|
92
|
+
<decision/> usually uses the wording "We use..." or "We do..."
|
|
93
|
+
and is active, definite, owning the choice. In <decision/> avoid
|
|
94
|
+
hedging ("we might", "we could consider"). The deliberation already
|
|
95
|
+
happened, the ADR records the verdict.
|
|
96
|
+
|
|
97
|
+
- The <rationale/> is the reasoning that justifies the <decision/> — the
|
|
98
|
+
bridge that explains why this choice, given those forces. It
|
|
99
|
+
answers: "Of all the things we could have done, why was this the
|
|
100
|
+
right one?". Where <context/> states the forces and <decision/>
|
|
101
|
+
states the choice, <rationale/> is the logical connective tissue
|
|
102
|
+
between them — it shows that the <decision/> actually follows from
|
|
103
|
+
the <context/>.
|
|
104
|
+
|
|
105
|
+
The following usually goes in <rationale/>:
|
|
106
|
+
|
|
107
|
+
- The deciding factors — which forces from the <context/> carried the
|
|
108
|
+
most weight, and how the chosen option satisfies them best.
|
|
109
|
+
- The trade-off reasoning — what you optimized for and what you
|
|
110
|
+
knowingly sacrificed. Naming the trade-off is the heart of rationale.
|
|
111
|
+
- Why the alternatives lost — the comparative argument: "option B
|
|
112
|
+
failed on X, option C cost too much on Y."
|
|
113
|
+
- Assumptions and evidence — benchmarks, prior experience,
|
|
114
|
+
constraints, or principles the reasoning rests on.
|
|
115
|
+
|
|
116
|
+
- The <notes/> section is *OPTIONAL* and can be omitted
|
|
117
|
+
when it does not add genuine value. Most ADRs won't need it.
|
|
118
|
+
|
|
119
|
+
The following usually goes in <notes/>:
|
|
120
|
+
|
|
121
|
+
- Information of the decision *process* like e.g.
|
|
122
|
+
weighted decision matrix of considered alternatives.
|
|
123
|
+
- Consequences of the <decision/> — but only when non-obvious downstream
|
|
124
|
+
effects need to be called out.
|
|
125
|
+
- Links to strongly related ADRs.
|
|
126
|
+
|
|
127
|
+
- For the relationship between <context/>, <decision/> and <rationale/>
|
|
128
|
+
good checks are:
|
|
129
|
+
|
|
130
|
+
- The "litmus test" is:
|
|
131
|
+
- <context/> = forces
|
|
132
|
+
- <decision/> = response to those forces,
|
|
133
|
+
- <rationale/> = why <decision/> answers the forces in <context/>.
|
|
134
|
+
|
|
135
|
+
- The <decision/> should feel like the natural, almost inevitable
|
|
136
|
+
answer to the <context/>. If a reader is surprised by the
|
|
137
|
+
<decision/>, either the <context/> is missing a force, or the
|
|
138
|
+
<decision/> is under-justified.
|
|
139
|
+
|
|
140
|
+
- The <rationale/> should make the <decision/> feel earned, not
|
|
141
|
+
asserted. If you would delete the <rationale/> and the
|
|
142
|
+
<decision/> suddenly looks arbitrary, the <rationale/> was
|
|
143
|
+
doing its job. So, the <rationale/> is the justification that
|
|
144
|
+
ties the <decision/> back to the pressures in <context/>.
|
|
145
|
+
|
|
146
|
+
- The <context/>, <decision/> and <rationale/> all are just a
|
|
147
|
+
single paragraph of concise and brief prose text, usually comprised
|
|
148
|
+
of just 1 to 3 sentences. The paragraphs break all lines with a
|
|
149
|
+
newline character after about 120 characters per line. The value of
|
|
150
|
+
an ADR is in recording *that* a decision was made and *why* — not in
|
|
151
|
+
filling out sections of a document.
|
|
152
|
+
|
|
153
|
+
TENETS
|
|
154
|
+
------
|
|
155
|
+
|
|
156
|
+
For an ADR, all of the following three tenets must be true:
|
|
157
|
+
|
|
158
|
+
- **Hard to Reverse**: the cost of changing it later is meaningful
|
|
159
|
+
("Oh my god, this would result in a dramatic refactoring!"). So,
|
|
160
|
+
if a decision is easy to reverse, just skip it.
|
|
161
|
+
|
|
162
|
+
- **Surprising without Context**: a future architect will look at
|
|
163
|
+
the code and wonder ("Why on earth did they do it this way?").
|
|
164
|
+
So, if a decision is not surprising, nobody will wonder why.
|
|
165
|
+
|
|
166
|
+
- **Result of a Real Trade-Off**: there were genuine alternatives
|
|
167
|
+
and one was picked for specific reasons ("We deliberately chose
|
|
168
|
+
this, because..."). So, if there was no real alternative,
|
|
169
|
+
there's nothing to record beyond "we did the obvious thing."
|
|
170
|
+
|
|
171
|
+
For an ADR, the following qualify:
|
|
172
|
+
|
|
173
|
+
- **Architectural shape.** "We're using a monorepo." "The write
|
|
174
|
+
model is event-sourced, the read model is projected into PostgreSQL."
|
|
175
|
+
|
|
176
|
+
- **Integration patterns between contexts.** "Ordering and Billing
|
|
177
|
+
communicate via domain events, not synchronous HTTP."
|
|
178
|
+
|
|
179
|
+
- **Technology choices that carry lock-in.** Database, message bus,
|
|
180
|
+
auth provider, deployment target. Not every library — just the
|
|
181
|
+
ones that would take a quarter to swap out.
|
|
182
|
+
|
|
183
|
+
- **Boundary and scope decisions.** "Customer data is owned by the
|
|
184
|
+
Customer context; other contexts reference it by ID only." The explicit
|
|
185
|
+
no-s are as valuable as the yes-s.
|
|
186
|
+
|
|
187
|
+
- **Deliberate deviations from the obvious path.** "We're using
|
|
188
|
+
manual SQL instead of an ORM because X." Anything where a reasonable
|
|
189
|
+
reader would assume the opposite. These stop the next engineer from
|
|
190
|
+
"fixing" something that was deliberate.
|
|
191
|
+
|
|
192
|
+
- **Constraints not visible in the code.** "We can't use AWS because
|
|
193
|
+
of compliance requirements." "Response times must be under 200ms because
|
|
194
|
+
of the partner API contract."
|
|
195
|
+
|
|
196
|
+
- **Rejected alternatives when the rejection is non-obvious.** If
|
|
197
|
+
you considered GraphQL and picked REST for subtle reasons, record it —
|
|
198
|
+
otherwise someone will suggest GraphQL again in six months.
|
|
199
|
+
|
|
@@ -17,10 +17,11 @@ set placeholders into the context as a side-effect.
|
|
|
17
17
|
contains no options at all):
|
|
18
18
|
|
|
19
19
|
For each option token in <getopt-spec/> of the form
|
|
20
|
-
`--<long/>[|-<short/>][=<default/>|=(<c1/>|<c2/>|...)]`, set
|
|
20
|
+
`--<long/>[|-<short/>][=<default/>|=(<c1/>|<c2/>|...)[...]]`, set
|
|
21
21
|
<getopt-option-<long/>/> to <default/> (for `=<default/>`
|
|
22
22
|
form), or to <c1/> (the first choice, for `=(<c1/>|<c2>/|...)`
|
|
23
|
-
form
|
|
23
|
+
form, or for the list form `=(<c1/>|<c2>/|...)...`),
|
|
24
|
+
or to `false` (for value-less options). Then set
|
|
24
25
|
<getopt-arguments><getopt-args/></getopt-arguments>.
|
|
25
26
|
|
|
26
27
|
Additionally, simulate <getopt-info/> as a comma-separated
|
|
@@ -37,10 +38,16 @@ set placeholders into the context as a side-effect.
|
|
|
37
38
|
"<getopt-spec/>", args: "<getopt-args/>")` tool of the `ase`
|
|
38
39
|
MCP server and set <text/> to the `text` output field of
|
|
39
40
|
this tool call. The `spec` syntax for each option token is
|
|
40
|
-
`--<long>[|-<short>][=<default>|=(<c1>|<c2>|...)]`, where
|
|
41
|
-
`=<default>` declares a value-taking option with a default,
|
|
41
|
+
`--<long>[|-<short>][=<default>|=(<c1>|<c2>|...)[...]]`, where
|
|
42
|
+
`=<default>` declares a value-taking option with a default,
|
|
42
43
|
`=(<c1>|<c2>|...)` declares a value-taking option restricted to the
|
|
43
|
-
listed fixed choices (the first choice acts as the default)
|
|
44
|
+
listed fixed choices (the first choice acts as the default), and the
|
|
45
|
+
trailing `...` (as in `=(<c1>|<c2>|...)...`) declares a value-taking
|
|
46
|
+
option whose value is a *comma-separated list* of choice tokens
|
|
47
|
+
(the first choice still acts as the default; only the *first*
|
|
48
|
+
token of the list is validated by the parser against the choice
|
|
49
|
+
set -- subsequent tokens are *not* validated, and skills validate
|
|
50
|
+
each remaining token themselves as they consume it).
|
|
44
51
|
|
|
45
52
|
4. **Short-Circuit for Error**:
|
|
46
53
|
If <text/> starts with `ERROR:`:
|
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.60",
|
|
10
10
|
"license": "GPL-3.0-only",
|
|
11
11
|
"author": {
|
|
12
12
|
"name": "Dr. Ralf S. Engelschall",
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ase-code-craft
|
|
3
|
-
argument-hint: "[--help|-h] [--auto|-a] [--dry|-d] [--next|-n <option>] [<task-id>:] <feature>"
|
|
3
|
+
argument-hint: "[--help|-h] [--auto|-a] [--dry|-d] [--quick|-Q] [--next|-n <option>[,...]] [<task-id>:] <feature>"
|
|
4
4
|
description: >
|
|
5
5
|
Craft Source Code:
|
|
6
6
|
Use when user wants to create or craft a new feature from scratch.
|
|
7
7
|
user-invocable: true
|
|
8
8
|
disable-model-invocation: false
|
|
9
|
-
effort:
|
|
9
|
+
effort: xhigh
|
|
10
10
|
allowed-tools:
|
|
11
11
|
- "Skill"
|
|
12
12
|
- "Agent"
|
|
@@ -23,16 +23,22 @@ Craft Source Code
|
|
|
23
23
|
|
|
24
24
|
<expand name="getopt"
|
|
25
25
|
arg1="ase-code-craft"
|
|
26
|
-
arg2="--auto|-a --dry|-d --next|-n=(none|DONE|EDIT|PREFLIGHT|IMPLEMENT)">
|
|
26
|
+
arg2="--auto|-a --dry|-d --quick|-Q --next|-n=(none|DONE|EDIT|PREFLIGHT|IMPLEMENT)...">
|
|
27
27
|
$ARGUMENTS
|
|
28
28
|
</expand>
|
|
29
29
|
|
|
30
|
+
<if condition="<getopt-option-quick/> is equal `true`">
|
|
31
|
+
The `--quick`/`-Q` flag is a *shorthand alias*: set <getopt-option-auto/>
|
|
32
|
+
to `true`, <getopt-option-dry/> to `true`, and <getopt-option-next/> to
|
|
33
|
+
`IMPLEMENT,DELETE`. Do not output anything.
|
|
34
|
+
</if>
|
|
35
|
+
|
|
30
36
|
<objective>
|
|
31
37
|
From scratch *craft* the following feature:
|
|
32
38
|
<feature><getopt-arguments/></feature>
|
|
33
39
|
</objective>
|
|
34
40
|
|
|
35
|
-
@${CLAUDE_SKILL_DIR}/../../meta/ase-plan.md
|
|
41
|
+
@${CLAUDE_SKILL_DIR}/../../meta/ase-format-plan.md
|
|
36
42
|
|
|
37
43
|
Procedure
|
|
38
44
|
---------
|
|
@@ -172,7 +178,10 @@ permitted way to persist artifacts is via `ase_task_save(...)`.
|
|
|
172
178
|
|
|
173
179
|
You *MUST* perform the following sub-steps *internally* and *without
|
|
174
180
|
any output* until and including the recommendation decision. Only
|
|
175
|
-
sub-
|
|
181
|
+
sub-steps 4-6 below are allowed to produce output, and only if
|
|
182
|
+
<getopt-option-auto/> is equal `false`. If <getopt-option-auto/> is
|
|
183
|
+
equal `true`, *skip* the reporting sub-steps 4-6 entirely (perform
|
|
184
|
+
no output at all) to speed up processing.
|
|
176
185
|
|
|
177
186
|
1. *Propose* corresponding *feature approach*, including optionally,
|
|
178
187
|
some *alternative* feature approaches. Do *not* output anything
|
|
@@ -294,23 +303,42 @@ permitted way to persist artifacts is via `ase_task_save(...)`.
|
|
|
294
303
|
|
|
295
304
|
5. Directly pass-through control to the next skill:
|
|
296
305
|
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
306
|
+
Treat <getopt-option-next/> as a comma-separated chronological
|
|
307
|
+
list of pre-selected next-step tokens. *Peek* the *first* token
|
|
308
|
+
as <head/> (or `none` if the list is `none`/empty).
|
|
309
|
+
|
|
310
|
+
1. <if condition="<head/> is equal `IMPLEMENT`">
|
|
311
|
+
Consume the head: set <getopt-option-next/> to the remaining
|
|
312
|
+
tokens (joined back with `,`, or `none` if empty). Set
|
|
313
|
+
<args></args> (empty).
|
|
314
|
+
<if condition="<getopt-option-next/> is not equal `none`">
|
|
315
|
+
Set <args>--next <getopt-option-next/></args> (forward
|
|
316
|
+
remaining list tokens to the downstream skill).
|
|
317
|
+
</if>
|
|
318
|
+
Call the tool `Skill(skill: "ase:ase-task-implement", args: <args/>)`
|
|
319
|
+
to *implement* the freshly composed plan, bypassing `ase-task-edit`.
|
|
300
320
|
</if>
|
|
301
321
|
|
|
302
|
-
2. <if condition="<
|
|
303
|
-
|
|
304
|
-
|
|
322
|
+
2. <if condition="<head/> is equal `PREFLIGHT`">
|
|
323
|
+
Consume the head: set <getopt-option-next/> to the remaining
|
|
324
|
+
tokens (joined back with `,`, or `none` if empty). Set
|
|
325
|
+
<args></args> (empty).
|
|
326
|
+
<if condition="<getopt-option-next/> is not equal `none`">
|
|
327
|
+
Set <args>--next <getopt-option-next/></args> (forward
|
|
328
|
+
remaining list tokens to the downstream skill).
|
|
329
|
+
</if>
|
|
330
|
+
Call the tool `Skill(skill: "ase:ase-task-preflight", args: <args/>)`
|
|
331
|
+
to *preflight* the freshly composed plan, bypassing `ase-task-edit`.
|
|
305
332
|
</if>
|
|
306
333
|
|
|
307
334
|
3. <if condition="
|
|
308
|
-
<
|
|
309
|
-
<
|
|
335
|
+
<head/> is not equal `IMPLEMENT` AND
|
|
336
|
+
<head/> is not equal `PREFLIGHT`
|
|
310
337
|
">
|
|
311
|
-
|
|
338
|
+
Forward the *entire* (unshifted) list to `ase-task-edit`, which
|
|
339
|
+
will consume its head itself. Set <args></args> (empty).
|
|
312
340
|
<if condition="<getopt-option-next/> is not equal `none`">
|
|
313
|
-
Set <args
|
|
341
|
+
Set <args>--next <getopt-option-next/></args> (append to args).
|
|
314
342
|
</if>
|
|
315
343
|
Then call the tool `Skill(skill: "ase:ase-task-edit", args: <args/>)`.
|
|
316
344
|
</if>
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
[`--help`|`-h`]
|
|
10
10
|
[`--auto`|`-a`]
|
|
11
11
|
[`--dry`|`-d`]
|
|
12
|
-
[`--
|
|
12
|
+
[`--quick`|`-Q`]
|
|
13
|
+
[`--next`|`-n` *option*[,...]]
|
|
13
14
|
[*task-id*:] *feature*
|
|
14
15
|
|
|
15
16
|
## DESCRIPTION
|
|
@@ -39,13 +40,28 @@ plan via `ase_task_save` and then hands off to `ase-task-edit`,
|
|
|
39
40
|
type-checker, or program execution) once the source files have
|
|
40
41
|
been modified.
|
|
41
42
|
|
|
42
|
-
`--
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
43
|
+
`--quick`|`-Q`:
|
|
44
|
+
Shorthand alias for `-a -d -n IMPLEMENT,DELETE`: automatically pick
|
|
45
|
+
the recommended feature approach, compose the plan *without* the
|
|
46
|
+
`※ VERIFICATION` section, immediately hand off to `ase-task-implement`,
|
|
47
|
+
and finally `ase-task-delete` the now-consumed plan. This gives a
|
|
48
|
+
single, fast *one-shot* crafting mode.
|
|
49
|
+
|
|
50
|
+
`--next`|`-n` *option*[,...]:
|
|
51
|
+
Automatically choose the next step after composing the plan.
|
|
52
|
+
*option* is a single token or a *comma-separated chronological
|
|
53
|
+
list* of tokens; an `IMPLEMENT` or `PREFLIGHT` head token is
|
|
54
|
+
consumed by this skill (bypassing `ase-task-edit`), and any
|
|
55
|
+
remaining tokens are *forwarded* (via `--next`) to the downstream
|
|
56
|
+
skill. For all other head tokens, the *entire* list is forwarded
|
|
57
|
+
to `ase-task-edit`, which consumes its head itself. This lets an
|
|
58
|
+
entire pipeline be pre-scripted in one shot. Recognized tokens at
|
|
59
|
+
this skill: `none` (default, hand-off to `ase-task-edit`
|
|
60
|
+
interactively), `DONE` (stop), `EDIT` (hand off to
|
|
61
|
+
`ase-task-edit`), `PREFLIGHT` (hand off to `ase-task-preflight`),
|
|
62
|
+
or `IMPLEMENT` (hand off to `ase-task-implement`). Example:
|
|
63
|
+
`--next PREFLIGHT,IMPLEMENT,DONE` crafts the plan, preflights it,
|
|
64
|
+
implements it, and exits without further dialog.
|
|
49
65
|
|
|
50
66
|
## ARGUMENTS
|
|
51
67
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ase-code-refactor
|
|
3
|
-
argument-hint: "[--help|-h] [--auto|-a] [--dry|-d] [--next|-n <option>] [<task-id>:] <request>"
|
|
3
|
+
argument-hint: "[--help|-h] [--auto|-a] [--dry|-d] [--quick|-Q] [--next|-n <option>[,...]] [<task-id>:] <request>"
|
|
4
4
|
description: >
|
|
5
5
|
Refactor Code Base:
|
|
6
6
|
Use when user wants to refactor the code base.
|
|
7
7
|
user-invocable: true
|
|
8
8
|
disable-model-invocation: false
|
|
9
|
-
effort:
|
|
9
|
+
effort: xhigh
|
|
10
10
|
allowed-tools:
|
|
11
11
|
- "Skill"
|
|
12
12
|
- "Agent"
|
|
@@ -23,16 +23,22 @@ Refactor Artifacts
|
|
|
23
23
|
|
|
24
24
|
<expand name="getopt"
|
|
25
25
|
arg1="ase-code-refactor"
|
|
26
|
-
arg2="--auto|-a --dry|-d --next|-n=(none|DONE|EDIT|PREFLIGHT|IMPLEMENT)">
|
|
26
|
+
arg2="--auto|-a --dry|-d --quick|-Q --next|-n=(none|DONE|EDIT|PREFLIGHT|IMPLEMENT)...">
|
|
27
27
|
$ARGUMENTS
|
|
28
28
|
</expand>
|
|
29
29
|
|
|
30
|
+
<if condition="<getopt-option-quick/> is equal `true`">
|
|
31
|
+
The `--quick`/`-Q` flag is a *shorthand alias*: set <getopt-option-auto/>
|
|
32
|
+
to `true`, <getopt-option-dry/> to `true`, and <getopt-option-next/> to
|
|
33
|
+
`IMPLEMENT,DELETE`. Do not output anything.
|
|
34
|
+
</if>
|
|
35
|
+
|
|
30
36
|
<objective>
|
|
31
37
|
*Refactor* existing artifacts the following way:
|
|
32
38
|
<request><getopt-arguments/></request>
|
|
33
39
|
</objective>
|
|
34
40
|
|
|
35
|
-
@${CLAUDE_SKILL_DIR}/../../meta/ase-plan.md
|
|
41
|
+
@${CLAUDE_SKILL_DIR}/../../meta/ase-format-plan.md
|
|
36
42
|
|
|
37
43
|
Procedure
|
|
38
44
|
---------
|
|
@@ -161,7 +167,10 @@ permitted way to persist artifacts is via `ase_task_save(...)`.
|
|
|
161
167
|
|
|
162
168
|
You *MUST* perform the following sub-steps *internally* and *without
|
|
163
169
|
any output* until and including the recommendation decision. Only
|
|
164
|
-
sub-
|
|
170
|
+
sub-steps 4-6 below are allowed to produce output, and only if
|
|
171
|
+
<getopt-option-auto/> is equal `false`. If <getopt-option-auto/> is
|
|
172
|
+
equal `true`, *skip* the reporting sub-steps 4-6 entirely (perform
|
|
173
|
+
no output at all) to speed up processing.
|
|
165
174
|
|
|
166
175
|
1. *Propose* corresponding *refactoring approach*, including
|
|
167
176
|
optionally, some *alternative* refactoring approaches. Do *not*
|
|
@@ -285,23 +294,42 @@ permitted way to persist artifacts is via `ase_task_save(...)`.
|
|
|
285
294
|
|
|
286
295
|
5. Directly pass-through control to the next skill:
|
|
287
296
|
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
297
|
+
Treat <getopt-option-next/> as a comma-separated chronological
|
|
298
|
+
list of pre-selected next-step tokens. *Peek* the *first* token
|
|
299
|
+
as <head/> (or `none` if the list is `none`/empty).
|
|
300
|
+
|
|
301
|
+
1. <if condition="<head/> is equal `IMPLEMENT`">
|
|
302
|
+
Consume the head: set <getopt-option-next/> to the remaining
|
|
303
|
+
tokens (joined back with `,`, or `none` if empty). Set
|
|
304
|
+
<args></args> (empty).
|
|
305
|
+
<if condition="<getopt-option-next/> is not equal `none`">
|
|
306
|
+
Set <args>--next <getopt-option-next/></args> (forward
|
|
307
|
+
remaining list tokens to the downstream skill).
|
|
308
|
+
</if>
|
|
309
|
+
Call the tool `Skill(skill: "ase:ase-task-implement", args: <args/>)`
|
|
310
|
+
to *implement* the freshly composed plan, bypassing `ase-task-edit`.
|
|
291
311
|
</if>
|
|
292
312
|
|
|
293
|
-
2. <if condition="<
|
|
294
|
-
|
|
295
|
-
|
|
313
|
+
2. <if condition="<head/> is equal `PREFLIGHT`">
|
|
314
|
+
Consume the head: set <getopt-option-next/> to the remaining
|
|
315
|
+
tokens (joined back with `,`, or `none` if empty). Set
|
|
316
|
+
<args></args> (empty).
|
|
317
|
+
<if condition="<getopt-option-next/> is not equal `none`">
|
|
318
|
+
Set <args>--next <getopt-option-next/></args> (forward
|
|
319
|
+
remaining list tokens to the downstream skill).
|
|
320
|
+
</if>
|
|
321
|
+
Call the tool `Skill(skill: "ase:ase-task-preflight", args: <args/>)`
|
|
322
|
+
to *preflight* the freshly composed plan, bypassing `ase-task-edit`.
|
|
296
323
|
</if>
|
|
297
324
|
|
|
298
325
|
3. <if condition="
|
|
299
|
-
<
|
|
300
|
-
<
|
|
326
|
+
<head/> is not equal `IMPLEMENT` AND
|
|
327
|
+
<head/> is not equal `PREFLIGHT`
|
|
301
328
|
">
|
|
302
|
-
|
|
329
|
+
Forward the *entire* (unshifted) list to `ase-task-edit`, which
|
|
330
|
+
will consume its head itself. Set <args></args> (empty).
|
|
303
331
|
<if condition="<getopt-option-next/> is not equal `none`">
|
|
304
|
-
Set <args
|
|
332
|
+
Set <args>--next <getopt-option-next/></args> (append to args).
|
|
305
333
|
</if>
|
|
306
334
|
Then call the tool `Skill(skill: "ase:ase-task-edit", args: <args/>)`.
|
|
307
335
|
</if>
|