@rse/ase 0.9.50 → 0.9.52
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-hook.js +9 -13
- package/dst/ase-statusline.js +30 -4
- package/dst/ase-task.js +7 -2
- package/package.json +7 -7
- 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/agents/ase-code-lint.md +21 -1
- package/plugin/agents/ase-meta-proximity.md +133 -0
- package/plugin/etc/stx.conf +2 -2
- package/plugin/meta/ase-common-dissect.md +110 -0
- package/plugin/meta/ase-common-task.md +5 -3
- package/plugin/meta/ase-control.md +53 -0
- package/plugin/meta/ase-format-task.md +6 -0
- package/plugin/meta/ase-skill.md +8 -8
- package/plugin/package.json +2 -2
- package/plugin/skills/ase-arch-analyze/SKILL.md +23 -12
- package/plugin/skills/ase-arch-analyze/help.md +16 -0
- package/plugin/skills/ase-arch-discover/SKILL.md +2 -2
- package/plugin/skills/ase-code-analyze/SKILL.md +33 -16
- package/plugin/skills/ase-code-analyze/help.md +19 -2
- package/plugin/skills/ase-code-craft/SKILL.md +2 -2
- package/plugin/skills/ase-code-dissect/SKILL.md +380 -0
- package/plugin/skills/ase-code-dissect/help.md +121 -0
- package/plugin/skills/ase-code-explain/SKILL.md +2 -2
- package/plugin/skills/ase-code-insight/SKILL.md +2 -2
- package/plugin/skills/ase-code-lint/SKILL.md +43 -12
- package/plugin/skills/ase-code-lint/help.md +43 -1
- package/plugin/skills/ase-code-refactor/SKILL.md +2 -2
- package/plugin/skills/ase-code-resolve/SKILL.md +2 -2
- package/plugin/skills/ase-docs-distill/SKILL.md +2 -2
- package/plugin/skills/ase-docs-proofread/SKILL.md +2 -2
- package/plugin/skills/ase-help-intent/SKILL.md +2 -2
- package/plugin/skills/ase-help-skill/SKILL.md +2 -2
- package/plugin/skills/ase-help-skill/catalog.md +4 -0
- package/plugin/skills/ase-meta-brainstorm/SKILL.md +2 -2
- package/plugin/skills/ase-meta-changelog/SKILL.md +2 -2
- package/plugin/skills/ase-meta-chat/SKILL.md +2 -2
- package/plugin/skills/ase-meta-commit/SKILL.md +2 -2
- package/plugin/skills/ase-meta-config/SKILL.md +2 -2
- package/plugin/skills/ase-meta-diaboli/SKILL.md +2 -2
- package/plugin/skills/ase-meta-diff/SKILL.md +2 -2
- package/plugin/skills/ase-meta-eli5/SKILL.md +2 -2
- package/plugin/skills/ase-meta-eli5/help.md +1 -1
- package/plugin/skills/ase-meta-evaluate/SKILL.md +2 -2
- package/plugin/skills/ase-meta-proximity/SKILL.md +51 -92
- package/plugin/skills/ase-meta-proximity/help.md +11 -10
- package/plugin/skills/ase-meta-quorum/SKILL.md +2 -2
- package/plugin/skills/ase-meta-quotes/SKILL.md +214 -0
- package/plugin/skills/ase-meta-quotes/help.md +109 -0
- package/plugin/skills/ase-meta-review/SKILL.md +2 -2
- package/plugin/skills/ase-meta-review/help.md +4 -3
- package/plugin/skills/ase-meta-search/SKILL.md +2 -2
- package/plugin/skills/ase-meta-steelman/SKILL.md +2 -2
- package/plugin/skills/ase-meta-why/SKILL.md +2 -2
- package/plugin/skills/ase-meta-workflow/SKILL.md +378 -0
- package/plugin/skills/ase-meta-workflow/help.md +117 -0
- package/plugin/skills/ase-meta-workflow/sample.md +70 -0
- package/plugin/skills/ase-meta-workflow/workflow.txt +97 -0
- package/plugin/skills/ase-sync-export/SKILL.md +2 -2
- package/plugin/skills/ase-sync-import/SKILL.md +2 -2
- package/plugin/skills/ase-sync-reconcile/SKILL.md +2 -2
- package/plugin/skills/ase-task-condense/SKILL.md +26 -6
- package/plugin/skills/ase-task-delete/SKILL.md +2 -2
- package/plugin/skills/ase-task-dissect/SKILL.md +299 -0
- package/plugin/skills/ase-task-dissect/help.md +114 -0
- package/plugin/skills/ase-task-edit/SKILL.md +6 -4
- package/plugin/skills/ase-task-grill/SKILL.md +6 -4
- package/plugin/skills/ase-task-id/SKILL.md +2 -2
- package/plugin/skills/ase-task-implement/SKILL.md +2 -2
- package/plugin/skills/ase-task-list/SKILL.md +2 -2
- package/plugin/skills/ase-task-preflight/SKILL.md +2 -2
- package/plugin/skills/ase-task-reboot/SKILL.md +12 -6
- package/plugin/skills/ase-task-rename/SKILL.md +2 -2
- package/plugin/skills/ase-task-view/SKILL.md +2 -2
|
@@ -0,0 +1,378 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ase-meta-workflow
|
|
3
|
+
argument-hint: "[--help|-h] [--scope|-s local|user] [--force|-f] <skill-name> <workflow-description>"
|
|
4
|
+
description: >
|
|
5
|
+
Generate a new agent tool skill, written in the style of ASE
|
|
6
|
+
skills, which orchestrates a workflow of sequential actions,
|
|
7
|
+
parallel actions, sub-agent calls, and skill calls. Use when the
|
|
8
|
+
user wants to "generate a skill", create a "workflow", "orchestrate"
|
|
9
|
+
or "chain" multiple ASE skills, or automate a recurring multi-step
|
|
10
|
+
procedure.
|
|
11
|
+
user-invocable: true
|
|
12
|
+
disable-model-invocation: false
|
|
13
|
+
effort: xhigh
|
|
14
|
+
allowed-tools:
|
|
15
|
+
- "Read"
|
|
16
|
+
- "Write"
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
@${CLAUDE_SKILL_DIR}/../../meta/ase-control.md
|
|
20
|
+
@${CLAUDE_SKILL_DIR}/../../meta/ase-skill.md
|
|
21
|
+
@${CLAUDE_SKILL_DIR}/../../meta/ase-getopt.md
|
|
22
|
+
|
|
23
|
+
<purpose name="ase-meta-workflow">
|
|
24
|
+
Generate a Workflow Skill
|
|
25
|
+
</purpose>
|
|
26
|
+
|
|
27
|
+
<expand name="getopt"
|
|
28
|
+
arg1="ase-meta-workflow"
|
|
29
|
+
arg2="--scope|-s=(local|user) --force|-f">
|
|
30
|
+
$ARGUMENTS
|
|
31
|
+
</expand>
|
|
32
|
+
|
|
33
|
+
<objective>
|
|
34
|
+
*Generate* a new skill for the current *agent tool* <ase-agent-tool/>,
|
|
35
|
+
written in the style of *ASE* skills, which orchestrates the workflow
|
|
36
|
+
described by:
|
|
37
|
+
<arguments><getopt-arguments/></arguments>
|
|
38
|
+
</objective>
|
|
39
|
+
|
|
40
|
+
References
|
|
41
|
+
----------
|
|
42
|
+
|
|
43
|
+
- The following <sample/> is a *reference skill* demonstrating the
|
|
44
|
+
usual *layout* of a generated workflow skill -- its frontmatter, its
|
|
45
|
+
`ase meta` preamble, and the indentation of its `<flow>`:
|
|
46
|
+
|
|
47
|
+
<sample>
|
|
48
|
+
@${CLAUDE_SKILL_DIR}/sample.md
|
|
49
|
+
</sample>
|
|
50
|
+
|
|
51
|
+
*IMPORTANT*: <sample/> is authoritative for the usual *layout* only.
|
|
52
|
+
The *syntax* of every control construct is defined *exclusively* by
|
|
53
|
+
the `Control Flow Constructs` section above, and its frontmatter and
|
|
54
|
+
preamble show the `claude` flavor only -- the actual frontmatter
|
|
55
|
+
fields and the actual preamble are dispatched on <ase-agent-tool/> as
|
|
56
|
+
defined by the `Generated Skill Contract` below.
|
|
57
|
+
|
|
58
|
+
- The following <graph/> is the *ASE workflow graph*, carrying one
|
|
59
|
+
`<from/> -> <to/>` transition per line, where each side is either an
|
|
60
|
+
`ase-xxx-xxx` skill or an upper-case logical state (`START`, `SKETCH`,
|
|
61
|
+
`APPROACHES`, `TASK`, `ARTIFACT`, `END`):
|
|
62
|
+
|
|
63
|
+
<graph>
|
|
64
|
+
@${CLAUDE_SKILL_DIR}/workflow.txt
|
|
65
|
+
</graph>
|
|
66
|
+
|
|
67
|
+
The <graph/> tells which ASE skill sequences are *usually
|
|
68
|
+
meaningful*. It *guides* the workflow, but it does *not* restrict
|
|
69
|
+
it: a workflow may contain arbitrary *non-ASE* actions, and it may
|
|
70
|
+
contain ASE transitions the <graph/> does not list.
|
|
71
|
+
|
|
72
|
+
- The following <catalog/> is the *accumulated help* of all ASE skills --
|
|
73
|
+
the concatenation of every skill's `help.md` file -- and is the
|
|
74
|
+
*sole* source for the options and arguments of every `<skill/>`
|
|
75
|
+
invocation (for an `ase-xxx-xxx` skill) you emit:
|
|
76
|
+
|
|
77
|
+
<catalog>
|
|
78
|
+
@${CLAUDE_SKILL_DIR}/../ase-help-intent/data.md
|
|
79
|
+
</catalog>
|
|
80
|
+
|
|
81
|
+
Generated Skill Contract
|
|
82
|
+
------------------------
|
|
83
|
+
|
|
84
|
+
A generated skill is a *regular* skill of the current agent tool
|
|
85
|
+
<ase-agent-tool/> which is *independent* of the *ASE plugin*
|
|
86
|
+
installation path. It therefore *MUST* strictly follow this contract:
|
|
87
|
+
|
|
88
|
+
- **Frontmatter**: `name: <new-skill-name/>` and a `description` of one
|
|
89
|
+
to three sentences summarizing the workflow and its trigger phrases.
|
|
90
|
+
|
|
91
|
+
The *remaining* frontmatter fields are *tool-specific*, because every
|
|
92
|
+
agent tool accepts its own field set and its own `allowed-tools`
|
|
93
|
+
grammar, and hence have to be dispatched on <ase-agent-tool/>:
|
|
94
|
+
|
|
95
|
+
<if condition="<ase-agent-tool/> is `codex`">
|
|
96
|
+
Emit *only* an `allowed-tools` field, carrying the space-separated
|
|
97
|
+
string `Bash(ase meta *)`, because *OpenAI Codex* accepts *no*
|
|
98
|
+
frontmatter fields besides `name`, `description`, `license`,
|
|
99
|
+
`allowed-tools`, and `metadata`.
|
|
100
|
+
</if>
|
|
101
|
+
|
|
102
|
+
<elseif condition="<ase-agent-tool/> is `copilot`">
|
|
103
|
+
Emit an `argument-hint` derived from the declared options and
|
|
104
|
+
arguments, plus `user-invocable: true`, `disable-model-invocation:
|
|
105
|
+
false`, and an `allowed-tools` list which *always* contains
|
|
106
|
+
`"shell(ase:*)"` plus any further tool the workflow actually uses.
|
|
107
|
+
*IMPORTANT*: *GitHub Copilot* uses the permission pattern grammar
|
|
108
|
+
`shell(<command/>:*)`, `write(<path/>)`, and `<mcp-server/>(<tool/>)`
|
|
109
|
+
-- a `Bash(...)` entry would be misread as an unknown MCP server, and
|
|
110
|
+
plain tool names like `Skill` or `Agent` are *no* permission patterns
|
|
111
|
+
at all and hence *MUST NOT* be emitted.
|
|
112
|
+
</elseif>
|
|
113
|
+
|
|
114
|
+
<else>
|
|
115
|
+
Emit an `argument-hint` derived from the declared options and
|
|
116
|
+
arguments, plus `user-invocable: true`, `disable-model-invocation:
|
|
117
|
+
false`, and an `allowed-tools` list which *always* contains
|
|
118
|
+
`"Bash(ase meta *)"` plus `"Skill"` and/or `"Agent"` whenever the
|
|
119
|
+
workflow emits `<skill/>` and/or `<agent/>` invocations, plus any
|
|
120
|
+
further tool the workflow actually uses.
|
|
121
|
+
</else>
|
|
122
|
+
|
|
123
|
+
- **Preamble**: the generated skill has to pull in the ASE meta
|
|
124
|
+
definitions through the `ase meta` command, because it resolves them
|
|
125
|
+
from the bundled tool package, whereas the
|
|
126
|
+
`@${CLAUDE_SKILL_DIR}/../../meta/` includes used *inside* the ASE
|
|
127
|
+
plugin have *no* resolvable path from outside of it. Append further
|
|
128
|
+
meta names only when the workflow needs them (`dialog` for a
|
|
129
|
+
`custom-dialog`, `tenets`, `format-task`, ...).
|
|
130
|
+
|
|
131
|
+
*How* the command is pulled in is *tool-specific*, because only
|
|
132
|
+
*Anthropic Claude Code* expands the ``!`<command/>` `` construct
|
|
133
|
+
before the skill content reaches the model, hence dispatch on
|
|
134
|
+
<ase-agent-tool/>:
|
|
135
|
+
|
|
136
|
+
<if condition="<ase-agent-tool/> is `copilot` or `codex`">
|
|
137
|
+
Emit the following <preamble-block/> as the first body element,
|
|
138
|
+
because the ``!`<command/>` `` construct would otherwise reach the
|
|
139
|
+
model *verbatim* and silently stay unexpanded:
|
|
140
|
+
|
|
141
|
+
<preamble-block>
|
|
142
|
+
*IMPORTANT*: *Before* anything else, run the shell command...
|
|
143
|
+
|
|
144
|
+
`ase meta control skill getopt`
|
|
145
|
+
|
|
146
|
+
...and treat its *entire* output as if it were written here. It
|
|
147
|
+
defines the control flow constructs, the skill conventions, and the
|
|
148
|
+
option parsing used below. Do *not* proceed before you have done this.
|
|
149
|
+
</preamble-block>
|
|
150
|
+
</if>
|
|
151
|
+
|
|
152
|
+
<else>
|
|
153
|
+
Emit the *single* line ``!`ase meta control skill getopt` `` as the
|
|
154
|
+
first body line.
|
|
155
|
+
</else>
|
|
156
|
+
|
|
157
|
+
- **Identification**: a `<purpose name="<new-skill-name/>">` block
|
|
158
|
+
carrying a short title-case purpose.
|
|
159
|
+
|
|
160
|
+
- **Argument Parsing**: an `<expand name="getopt" arg1="<new-skill-name/>"
|
|
161
|
+
arg2="<spec/>">$ARGUMENTS</expand>` block -- but *only* when the
|
|
162
|
+
workflow wants to declare options.
|
|
163
|
+
|
|
164
|
+
- **Objective**: an optional `<objective/>` block declaring the
|
|
165
|
+
official objective of the workflow skill.
|
|
166
|
+
|
|
167
|
+
- **Body**: usually the `<flow>` derived in `STEP 3` below.
|
|
168
|
+
But everything is allowed here.
|
|
169
|
+
|
|
170
|
+
Procedure
|
|
171
|
+
---------
|
|
172
|
+
|
|
173
|
+
<flow>
|
|
174
|
+
|
|
175
|
+
1. <step id="STEP 1: Reason About Workflow">
|
|
176
|
+
|
|
177
|
+
1. Set <new-skill-name/> to the *first* whitespace-separated token of
|
|
178
|
+
<getopt-arguments/> and <workflow-description/> to the *entire
|
|
179
|
+
remainder*. Do not output anything.
|
|
180
|
+
|
|
181
|
+
2. <if condition="<new-skill-name/> does not match the regexp `^[a-zA-Z][a-zA-Z0-9_-]*$`">
|
|
182
|
+
Ask the user interactively, without a special tool, for the skill
|
|
183
|
+
name with a single question:
|
|
184
|
+
|
|
185
|
+
`**No valid skill name given. What should the generated skill be named?**`
|
|
186
|
+
|
|
187
|
+
Then set <new-skill-name/> to the response of the user and set
|
|
188
|
+
<workflow-description/> to the *entire* original
|
|
189
|
+
<getopt-arguments/>.
|
|
190
|
+
Repeat this question until the response matches the regexp
|
|
191
|
+
`^[a-zA-Z][a-zA-Z0-9_-]*$`, so that no path separator or traversal
|
|
192
|
+
segment can ever reach <target-skill/>.
|
|
193
|
+
</if>
|
|
194
|
+
|
|
195
|
+
3. <if condition="<workflow-description/> is empty">
|
|
196
|
+
Ask the user interactively, without a special tool, for the
|
|
197
|
+
workflow with a single question:
|
|
198
|
+
|
|
199
|
+
`**No workflow description yet. Which workflow should the skill perform?**`
|
|
200
|
+
|
|
201
|
+
Then set <workflow-description/> to the response of the user.
|
|
202
|
+
</if>
|
|
203
|
+
|
|
204
|
+
4. Determine the *skill locations* of the current agent tool, because
|
|
205
|
+
every agent tool discovers its skills in its *own* directories:
|
|
206
|
+
|
|
207
|
+
<skill-dir-user>~/.claude/skills</skill-dir-user>
|
|
208
|
+
<skill-dir-local>.claude/skills</skill-dir-local>
|
|
209
|
+
<if condition="<ase-agent-tool/> is `copilot`">
|
|
210
|
+
<skill-dir-user>~/.copilot/skills</skill-dir-user>
|
|
211
|
+
<skill-dir-local>.github/skills</skill-dir-local>
|
|
212
|
+
</if>
|
|
213
|
+
<if condition="<ase-agent-tool/> is `codex`">
|
|
214
|
+
<skill-dir-user>~/.codex/skills</skill-dir-user>
|
|
215
|
+
<skill-dir-local>.agents/skills</skill-dir-local>
|
|
216
|
+
</if>
|
|
217
|
+
|
|
218
|
+
<if condition="<getopt-option-scope/> is equal `user`">
|
|
219
|
+
Set <dir><skill-dir-user/></dir>.
|
|
220
|
+
</if>
|
|
221
|
+
<else>
|
|
222
|
+
Set <dir><skill-dir-local/></dir>.
|
|
223
|
+
</else>
|
|
224
|
+
|
|
225
|
+
Then set <target-skill><dir/>/<new-skill-name/>/SKILL.md</target-skill>.
|
|
226
|
+
Expand a leading `~` in <target-skill/> into the absolute home
|
|
227
|
+
directory of the user, as the file tools accept absolute paths only.
|
|
228
|
+
Do not output anything.
|
|
229
|
+
|
|
230
|
+
5. Check whether <target-skill/> already exists.
|
|
231
|
+
|
|
232
|
+
<if condition="<target-skill/> exists and <getopt-option-force/> is not equal `true`">
|
|
233
|
+
Only output the following <template/> and then immediately *STOP*
|
|
234
|
+
processing the entire current skill:
|
|
235
|
+
|
|
236
|
+
<template>
|
|
237
|
+
⧉ **ASE**: ✪ skill: **ase-meta-workflow**, ▶ ERROR: target already exists: **<target-skill/>**
|
|
238
|
+
</template>
|
|
239
|
+
|
|
240
|
+
Directly *after* this error <template/>, and *before* stopping,
|
|
241
|
+
give the corrective hint by expanding the following:
|
|
242
|
+
|
|
243
|
+
<ase-tpl-hint level="minimal">
|
|
244
|
+
Re-run with `--force`/`-f` to overwrite the existing skill.
|
|
245
|
+
</ase-tpl-hint>
|
|
246
|
+
</if>
|
|
247
|
+
|
|
248
|
+
6. Report the workflow with the following <template/>:
|
|
249
|
+
|
|
250
|
+
<template>
|
|
251
|
+
⧉ **ASE**: ✪ workflow: **<new-skill-name/>**, ⎈ tool: **<ase-agent-tool/>**, ◉ target: **<target-skill/>**
|
|
252
|
+
⧉ **ASE**: ✪ workflow: **<new-skill-name/>**, ⇌ description: **<workflow-description/>**
|
|
253
|
+
</template>
|
|
254
|
+
|
|
255
|
+
7. Do not output anything else in this STEP 1, unless you asked the user.
|
|
256
|
+
|
|
257
|
+
</step>
|
|
258
|
+
|
|
259
|
+
2. <step id="STEP 2: Internalize ASE Capabilities">
|
|
260
|
+
|
|
261
|
+
1. Absorb the <catalog/> to know which ASE skills exist and which
|
|
262
|
+
options and arguments each of them accepts.
|
|
263
|
+
|
|
264
|
+
2. Absorb the <graph/> to know which ASE skill sequences are usually
|
|
265
|
+
meaningful, and treat every transition it does *not* list as
|
|
266
|
+
merely *unusual*, never as *forbidden*.
|
|
267
|
+
|
|
268
|
+
3. Do not output anything in this STEP 2.
|
|
269
|
+
|
|
270
|
+
</step>
|
|
271
|
+
|
|
272
|
+
3. <step id="STEP 3: Derive Workflow Structure">
|
|
273
|
+
|
|
274
|
+
1. Decompose <workflow-description/> into an *ordered* list of
|
|
275
|
+
*top-level* actions. Each top-level action becomes a numbered
|
|
276
|
+
list item wrapping a `<step id="STEP <n/>: <title/>">` element,
|
|
277
|
+
and all of them together are wrapped into a single `<flow>`
|
|
278
|
+
element.
|
|
279
|
+
|
|
280
|
+
2. Map every action of <workflow-description/> onto the matching
|
|
281
|
+
control construct:
|
|
282
|
+
|
|
283
|
+
- *sequential* actions become consecutive `<step/>` elements,
|
|
284
|
+
- *concurrent* actions become a `<parallel>` element,
|
|
285
|
+
- *sub-agent* invocations become `<agent/>` elements,
|
|
286
|
+
- *ASE skill* invocations become `<skill name="ase:ase-xxx-xxx"
|
|
287
|
+
args="..."/>` elements, whose options and arguments are taken
|
|
288
|
+
*verbatim* from the <catalog/> and never invented,
|
|
289
|
+
- *foreign skill* invocations become `<skill name="..." args="..."/>`
|
|
290
|
+
elements, whose options and arguments are taken *verbatim*,
|
|
291
|
+
- *repetitions* become `<while/>` or `<for/>` elements,
|
|
292
|
+
- *conditional* actions become `<if/>`/`<elseif/>`/`<else/>` elements,
|
|
293
|
+
- all *remaining* actions become plain instruction prose inside
|
|
294
|
+
their `<step/>`.
|
|
295
|
+
|
|
296
|
+
Every *top-level* `<skill/>` element -- one which is not already
|
|
297
|
+
placed inside an `<agent/>` element -- *MUST* be enclosed in
|
|
298
|
+
its own dedicated `<agent/>` element, always *without* an
|
|
299
|
+
`isolation` attribute and always with `run_in_background=false`,
|
|
300
|
+
because the `TaskCreate` and `TaskUpdate` tool calls of the
|
|
301
|
+
called skill would otherwise interfere with the task tracking of
|
|
302
|
+
the generated workflow skill itself.
|
|
303
|
+
|
|
304
|
+
3. For *every* `<parallel>` element which contains at least one
|
|
305
|
+
`<agent isolation="worktree">`, you *MUST* append a *dedicated*
|
|
306
|
+
consolidation `<step/>` directly after the `<step/>` holding that
|
|
307
|
+
`<parallel>` element, and this consolidation step *MUST* contain
|
|
308
|
+
an `<agent-consolidation/>` element, so the Git WorkTrees of the
|
|
309
|
+
concurrent sub-agents are merged and removed again.
|
|
310
|
+
|
|
311
|
+
4. Determine the *options* of the generated skill: declare an option
|
|
312
|
+
only when <workflow-description/> actually asks for it, and
|
|
313
|
+
express it in the `--<long/>[|-<short/>][=<default/>|=(<c1/>|<c2/>|...)[...]]`
|
|
314
|
+
spec syntax of the `getopt` definition, which also covers the fixed
|
|
315
|
+
*choice* form and the comma-separated *list* form.
|
|
316
|
+
|
|
317
|
+
5. Do not output anything in this STEP 3.
|
|
318
|
+
|
|
319
|
+
</step>
|
|
320
|
+
|
|
321
|
+
4. <step id="STEP 4: Generate Workflow Skill">
|
|
322
|
+
|
|
323
|
+
1. <if condition="<ase-project-boxing/> is not equal `black`">
|
|
324
|
+
Set <structure/> to a compact rendering of the derived workflow --
|
|
325
|
+
one line per `<step/>`, prefixed with its number, and one indented
|
|
326
|
+
line per contained `<parallel/>`, `<agent/>`, `<skill/>`, or
|
|
327
|
+
`<agent-consolidation/>` element -- and report it with the
|
|
328
|
+
following <template/>:
|
|
329
|
+
|
|
330
|
+
<template>
|
|
331
|
+
<ase-tpl-boxed title="WORKFLOW" subtitle="<new-skill-name/>">
|
|
332
|
+
<structure/>
|
|
333
|
+
</ase-tpl-boxed>
|
|
334
|
+
</template>
|
|
335
|
+
</if>
|
|
336
|
+
|
|
337
|
+
2. Assemble <skill-content/> from the derived workflow, strictly
|
|
338
|
+
following the `Generated Skill Contract` above.
|
|
339
|
+
|
|
340
|
+
3. Write <skill-content/> to <target-skill/>, creating the directory
|
|
341
|
+
`<dir/>/<new-skill-name/>` if it does not exist yet. Calculate the
|
|
342
|
+
number of words <words/> of <skill-content/>.
|
|
343
|
+
|
|
344
|
+
4. Report the result with the following <template/>:
|
|
345
|
+
|
|
346
|
+
<template>
|
|
347
|
+
⧉ **ASE**: ✪ workflow: **<new-skill-name/>**, ✎ skill: **<words/>** words, ▶ status: **skill generated**
|
|
348
|
+
⧉ **ASE**: ✪ workflow: **<new-skill-name/>**, ◉ files: **<target-skill/>**
|
|
349
|
+
</template>
|
|
350
|
+
|
|
351
|
+
5. Give the follow-up pointer, dispatched on <ase-agent-tool/>,
|
|
352
|
+
because every agent tool reloads and invokes its skills
|
|
353
|
+
differently, by expanding the following:
|
|
354
|
+
|
|
355
|
+
<if condition="<ase-agent-tool/> is `copilot`">
|
|
356
|
+
<ase-tpl-hint level="minimal">
|
|
357
|
+
Run `/skills reload` to reload all skills.
|
|
358
|
+
Run `/<new-skill-name/>` to execute the new generated workflow.
|
|
359
|
+
</ase-tpl-hint>
|
|
360
|
+
</if>
|
|
361
|
+
<elseif condition="<ase-agent-tool/> is `codex`">
|
|
362
|
+
<ase-tpl-hint level="minimal">
|
|
363
|
+
Run `/skills` to check that the new skill was picked up.
|
|
364
|
+
Mention `$<new-skill-name/>` to execute the new generated workflow.
|
|
365
|
+
</ase-tpl-hint>
|
|
366
|
+
</elseif>
|
|
367
|
+
<else>
|
|
368
|
+
<ase-tpl-hint level="minimal">
|
|
369
|
+
Run `/reload-skills` to reload all skills.
|
|
370
|
+
Run `/<new-skill-name/>` to execute the new generated workflow.
|
|
371
|
+
</ase-tpl-hint>
|
|
372
|
+
</else>
|
|
373
|
+
|
|
374
|
+
6. Do not output anything else in this STEP 4.
|
|
375
|
+
|
|
376
|
+
</step>
|
|
377
|
+
|
|
378
|
+
</flow>
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
|
|
2
|
+
## NAME
|
|
3
|
+
|
|
4
|
+
`ase-meta-workflow` - Generate a Workflow Skill
|
|
5
|
+
|
|
6
|
+
## SYNOPSIS
|
|
7
|
+
|
|
8
|
+
`ase-meta-workflow`
|
|
9
|
+
[`--help`|`-h`]
|
|
10
|
+
[`--scope`|`-s` `local`|`user`]
|
|
11
|
+
[`--force`|`-f`]
|
|
12
|
+
*skill-name*
|
|
13
|
+
*workflow-description*
|
|
14
|
+
|
|
15
|
+
## DESCRIPTION
|
|
16
|
+
|
|
17
|
+
The `ase-meta-workflow` skill *generates* a new, regular skill of the
|
|
18
|
+
currently used *agent tool* -- written in the style of *ASE* skills --
|
|
19
|
+
which orchestrates the workflow given as *workflow-description*.
|
|
20
|
+
|
|
21
|
+
The *workflow-description* is treated as a combination of *sequential*
|
|
22
|
+
actions, *concurrent* actions, *sub-agent* invocations, *skill*
|
|
23
|
+
invocations, and arbitrary other action statements. The skill maps them
|
|
24
|
+
onto the ASE control constructs: top-level sequential actions become
|
|
25
|
+
numbered `<step>` items inside a single `<flow>`, concurrent actions
|
|
26
|
+
become a `<parallel>` block, sub-agent invocations become `<agent>`
|
|
27
|
+
elements, and skill invocations become `<skill>` elements. Whenever a
|
|
28
|
+
`<parallel>` block contains at least one `<agent isolation="worktree">`,
|
|
29
|
+
a dedicated consolidation step holding `<agent-consolidation/>` is
|
|
30
|
+
appended right after it, so the Git WorkTrees of the concurrent
|
|
31
|
+
sub-agents are merged and removed again. Every top-level `<skill>`
|
|
32
|
+
invocation is additionally enclosed in its own `<agent>` element --
|
|
33
|
+
without `isolation` and with `run_in_background=false` -- so the
|
|
34
|
+
`TaskCreate` and `TaskUpdate` tool calls of the called skill cannot
|
|
35
|
+
interfere with the task tracking of the generated workflow skill itself.
|
|
36
|
+
|
|
37
|
+
To keep the emitted `<skill>` invocations correct, the skill consults the
|
|
38
|
+
accumulated manual pages of all ASE skills and takes every option and
|
|
39
|
+
argument verbatim from them. To keep the emitted flow meaningful, it
|
|
40
|
+
consults the *ASE workflow graph* -- a list of `<from> -> <to>`
|
|
41
|
+
transitions between ASE skills and logical states such as `START`,
|
|
42
|
+
`SKETCH`, `TASK`, `ARTIFACT`, and `END`. That graph *guides* the
|
|
43
|
+
derivation but never restricts it: arbitrary non-ASE actions and
|
|
44
|
+
unlisted transitions stay allowed.
|
|
45
|
+
|
|
46
|
+
The generated skill is *independent* of the ASE plugin installation path:
|
|
47
|
+
it loads the ASE meta definitions through the `ase meta` command instead
|
|
48
|
+
of plugin-relative includes.
|
|
49
|
+
|
|
50
|
+
The skill is *portable* across the supported agent tools, because
|
|
51
|
+
*Anthropic Claude Code*, *GitHub Copilot*, and *OpenAI Codex* differ in
|
|
52
|
+
three relevant ways, each of which is dispatched on the currently used
|
|
53
|
+
agent tool:
|
|
54
|
+
|
|
55
|
+
- the *target directory*, because every agent tool discovers its skills
|
|
56
|
+
in its own locations,
|
|
57
|
+
|
|
58
|
+
- the *frontmatter fields*, because every agent tool accepts its own
|
|
59
|
+
field set and its own `allowed-tools` permission grammar, and
|
|
60
|
+
|
|
61
|
+
- the *preamble*, because only *Anthropic Claude Code* expands the
|
|
62
|
+
``!`...`` construct before the skill content reaches the model. The
|
|
63
|
+
other agent tools receive it verbatim and would silently leave it
|
|
64
|
+
unexpanded, so they instead get an explicit instruction to run
|
|
65
|
+
`ase meta ...` themselves before anything else.
|
|
66
|
+
|
|
67
|
+
## OPTIONS
|
|
68
|
+
|
|
69
|
+
`--scope`|`-s` `local`|`user`:
|
|
70
|
+
Where the generated skill is stored. With `local` (the default),
|
|
71
|
+
it is written into the current project, where it can be committed
|
|
72
|
+
and reviewed alongside the code. With `user`, it is written into the
|
|
73
|
+
personal skill directory, where it is available across all projects.
|
|
74
|
+
The concrete directory depends on the currently used agent tool:
|
|
75
|
+
`.claude/skills/` and `~/.claude/skills/` under *Anthropic Claude
|
|
76
|
+
Code*, `.github/skills/` and `~/.copilot/skills/` under *GitHub
|
|
77
|
+
Copilot*, and `.agents/skills/` and `~/.codex/skills/` under *OpenAI
|
|
78
|
+
Codex*.
|
|
79
|
+
|
|
80
|
+
`--force`|`-f`:
|
|
81
|
+
Overwrite an already existing skill. Without this option, the skill
|
|
82
|
+
refuses with an error as soon as the target `SKILL.md` exists, so
|
|
83
|
+
hand-edited skills are never lost silently.
|
|
84
|
+
|
|
85
|
+
## ARGUMENTS
|
|
86
|
+
|
|
87
|
+
*skill-name*:
|
|
88
|
+
Name of the skill to generate, matching `^[a-zA-Z][a-zA-Z0-9_-]*$`.
|
|
89
|
+
It is used as the directory name, as the frontmatter `name`, and as
|
|
90
|
+
the resulting `/`*skill-name* command (respectively the
|
|
91
|
+
`$`*skill-name* mention under *OpenAI Codex*).
|
|
92
|
+
|
|
93
|
+
*workflow-description*:
|
|
94
|
+
Free-text description of the workflow the generated skill should
|
|
95
|
+
perform. Mentioning that actions run "in parallel", that they are
|
|
96
|
+
dispatched "in a sub-agent", or naming concrete `ase-xxx-xxx` skills
|
|
97
|
+
steers the derived structure accordingly.
|
|
98
|
+
|
|
99
|
+
## EXAMPLES
|
|
100
|
+
|
|
101
|
+
Generate a project-local skill which analyzes the code and then resolves
|
|
102
|
+
every finding concurrently in isolated worktrees:
|
|
103
|
+
|
|
104
|
+
```text
|
|
105
|
+
❯ /ase-meta-workflow optimizer run ase-code-analyze, then for each finding P<n> resolve, implement and delete it in a parallel isolated sub-agent
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Generate a user-wide skill and overwrite a previous generation:
|
|
109
|
+
|
|
110
|
+
```text
|
|
111
|
+
❯ /ase-meta-workflow --scope user --force release lint the code, update the changelog, then propose a commit message
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## SEE ALSO
|
|
115
|
+
|
|
116
|
+
[`ase-help-intent`](../ase-help-intent/help.md), [`ase-help-skill`](../ase-help-skill/help.md),
|
|
117
|
+
[`ase-code-analyze`](../ase-code-analyze/help.md), [`ase-code-resolve`](../ase-code-resolve/help.md), [`ase-task-implement`](../ase-task-implement/help.md).
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: optimizer
|
|
3
|
+
argument-hint: "[-i <id>] <context>"
|
|
4
|
+
description: >
|
|
5
|
+
Resolve problems.
|
|
6
|
+
user-invocable: true
|
|
7
|
+
disable-model-invocation: false
|
|
8
|
+
allowed-tools:
|
|
9
|
+
- "Bash(ase meta *)"
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
!`ase meta control skill getopt`
|
|
13
|
+
|
|
14
|
+
<purpose name="optimizer">
|
|
15
|
+
Analyze and Resolve Source Code Problems
|
|
16
|
+
</purpose>
|
|
17
|
+
|
|
18
|
+
<expand name="getopt"
|
|
19
|
+
arg1="optimizer"
|
|
20
|
+
arg2="--id|-i <id>=optimizer">
|
|
21
|
+
$ARGUMENTS
|
|
22
|
+
</expand>
|
|
23
|
+
|
|
24
|
+
<flow>
|
|
25
|
+
|
|
26
|
+
1. <step id="STEP 1: Analyze Code">
|
|
27
|
+
|
|
28
|
+
<agent description="Analyze Code"
|
|
29
|
+
subagent_type="general-purpose"
|
|
30
|
+
run_in_background=false>
|
|
31
|
+
|
|
32
|
+
Run <skill name="ase-code-analyze" args="--prefix <id/> <getopt-arguments/>"/>
|
|
33
|
+
|
|
34
|
+
</agent>
|
|
35
|
+
|
|
36
|
+
</step>
|
|
37
|
+
|
|
38
|
+
2. <step id="STEP 2: Resolve Code Problems">
|
|
39
|
+
|
|
40
|
+
<parallel>
|
|
41
|
+
|
|
42
|
+
For each `P<n/>` in the result set, in ascending order and strictly *one at a time*:
|
|
43
|
+
|
|
44
|
+
1. Call the Agent:
|
|
45
|
+
|
|
46
|
+
<agent description="Reresolve P<n/>"
|
|
47
|
+
subagent_type="general-purpose"
|
|
48
|
+
isolation="worktree"
|
|
49
|
+
run_in_background=true>
|
|
50
|
+
|
|
51
|
+
1. Run <skill name="ase:ase-code-resolve" args="-a <id/>-P<n/>"/>
|
|
52
|
+
|
|
53
|
+
2. Run <skill name="ase:ase-task-implement" args="<id/>-P<n/>"/>
|
|
54
|
+
|
|
55
|
+
3. Run <skill name="ase:ase-task-delete" args="<id/>-P<n/>"/>
|
|
56
|
+
|
|
57
|
+
</agent>
|
|
58
|
+
|
|
59
|
+
</parallel>
|
|
60
|
+
|
|
61
|
+
</step>
|
|
62
|
+
|
|
63
|
+
3. <step id="STEP 3: Result Consolidation">
|
|
64
|
+
|
|
65
|
+
<agent-consolidation/>
|
|
66
|
+
|
|
67
|
+
</step>
|
|
68
|
+
|
|
69
|
+
</flow>
|
|
70
|
+
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
START -> ase-help-skill
|
|
2
|
+
START -> ase-meta-config
|
|
3
|
+
START -> ase-meta-why
|
|
4
|
+
START -> ase-meta-eli5
|
|
5
|
+
START -> ase-meta-evaluate
|
|
6
|
+
START -> ase-meta-diaboli
|
|
7
|
+
START -> ase-meta-steelman
|
|
8
|
+
START -> ase-meta-quorum
|
|
9
|
+
START -> ase-meta-chat
|
|
10
|
+
START -> ase-meta-search
|
|
11
|
+
START -> ase-meta-brainstorm
|
|
12
|
+
START -> ase-meta-compat
|
|
13
|
+
START -> ase-help-intent
|
|
14
|
+
START -> ase-arch-discover
|
|
15
|
+
START -> ase-code-insight
|
|
16
|
+
START -> ase-code-explain
|
|
17
|
+
START -> ase-code-lint
|
|
18
|
+
START -> ase-docs-distill
|
|
19
|
+
START -> ase-docs-proofread
|
|
20
|
+
START -> ase-meta-review
|
|
21
|
+
START -> ase-meta-diff
|
|
22
|
+
START -> ase-meta-changelog
|
|
23
|
+
START -> ase-meta-commit
|
|
24
|
+
START -> ase-meta-proximity
|
|
25
|
+
START -> ase-meta-workflow
|
|
26
|
+
START -> ase-code-dissect
|
|
27
|
+
ase-help-skill -> END
|
|
28
|
+
ase-meta-config -> END
|
|
29
|
+
ase-meta-why -> END
|
|
30
|
+
ase-meta-eli5 -> END
|
|
31
|
+
ase-meta-evaluate -> END
|
|
32
|
+
ase-meta-diaboli -> END
|
|
33
|
+
ase-meta-steelman -> END
|
|
34
|
+
ase-meta-quorum -> END
|
|
35
|
+
ase-meta-chat -> END
|
|
36
|
+
ase-meta-search -> END
|
|
37
|
+
ase-meta-brainstorm -> END
|
|
38
|
+
ase-meta-compat -> END
|
|
39
|
+
ase-help-intent -> END
|
|
40
|
+
ase-arch-discover -> END
|
|
41
|
+
ase-code-insight -> END
|
|
42
|
+
ase-code-explain -> END
|
|
43
|
+
ase-code-lint -> END
|
|
44
|
+
ase-docs-distill -> END
|
|
45
|
+
ase-docs-proofread -> END
|
|
46
|
+
ase-meta-review -> END
|
|
47
|
+
ase-meta-diff -> END
|
|
48
|
+
ase-meta-changelog -> END
|
|
49
|
+
ase-meta-commit -> END
|
|
50
|
+
ase-meta-proximity -> END
|
|
51
|
+
ase-meta-workflow -> END
|
|
52
|
+
ase-code-dissect -> END
|
|
53
|
+
START -> SKETCH
|
|
54
|
+
START -> TASK
|
|
55
|
+
START -> ase-sync-import
|
|
56
|
+
START -> ARTIFACT
|
|
57
|
+
ARTIFACT -> ase-arch-analyze
|
|
58
|
+
ARTIFACT -> ase-code-analyze
|
|
59
|
+
ase-arch-analyze -> SKETCH
|
|
60
|
+
ase-code-analyze -> SKETCH
|
|
61
|
+
SKETCH -> ase-code-craft
|
|
62
|
+
SKETCH -> ase-code-refactor
|
|
63
|
+
SKETCH -> ase-code-resolve
|
|
64
|
+
ase-code-craft -> APPROACHES
|
|
65
|
+
ase-code-refactor -> APPROACHES
|
|
66
|
+
ase-code-resolve -> APPROACHES
|
|
67
|
+
APPROACHES -> TASK
|
|
68
|
+
TASK -> ase-task-id
|
|
69
|
+
ase-task-id -> TASK
|
|
70
|
+
TASK -> ase-task-edit
|
|
71
|
+
ase-task-edit -> TASK
|
|
72
|
+
TASK -> ase-task-grill
|
|
73
|
+
ase-task-grill -> TASK
|
|
74
|
+
TASK -> ase-task-condense
|
|
75
|
+
ase-task-condense -> TASK
|
|
76
|
+
TASK -> ase-task-dissect
|
|
77
|
+
ase-task-dissect -> TASK
|
|
78
|
+
TASK -> ase-task-reboot
|
|
79
|
+
ase-task-reboot -> TASK
|
|
80
|
+
TASK -> ase-task-implement
|
|
81
|
+
TASK -> ase-task-preflight
|
|
82
|
+
ase-task-preflight -> TASK
|
|
83
|
+
TASK -> ase-task-view
|
|
84
|
+
TASK -> ase-task-list
|
|
85
|
+
TASK -> ase-task-rename
|
|
86
|
+
TASK -> ase-task-delete
|
|
87
|
+
ase-task-implement -> ARTIFACT
|
|
88
|
+
ase-task-view -> END
|
|
89
|
+
ase-task-list -> END
|
|
90
|
+
ase-task-rename -> END
|
|
91
|
+
ase-task-delete -> END
|
|
92
|
+
ase-sync-import -> ARTIFACT
|
|
93
|
+
ARTIFACT -> ase-sync-export
|
|
94
|
+
ARTIFACT -> ase-sync-reconcile
|
|
95
|
+
ase-sync-reconcile -> ARTIFACT
|
|
96
|
+
TASK -> END
|
|
97
|
+
ARTIFACT -> END
|
|
@@ -17,9 +17,9 @@ allowed-tools:
|
|
|
17
17
|
@${CLAUDE_SKILL_DIR}/../../meta/ase-skill.md
|
|
18
18
|
@${CLAUDE_SKILL_DIR}/../../meta/ase-getopt.md
|
|
19
19
|
|
|
20
|
-
<
|
|
20
|
+
<purpose name="ase-sync-export">
|
|
21
21
|
Export Artifact Set to Side-by-Side Files
|
|
22
|
-
</
|
|
22
|
+
</purpose>
|
|
23
23
|
|
|
24
24
|
<expand name="getopt"
|
|
25
25
|
arg1="ase-sync-export"
|
|
@@ -16,9 +16,9 @@ effort: xhigh
|
|
|
16
16
|
@${CLAUDE_SKILL_DIR}/../../meta/ase-skill.md
|
|
17
17
|
@${CLAUDE_SKILL_DIR}/../../meta/ase-getopt.md
|
|
18
18
|
|
|
19
|
-
<
|
|
19
|
+
<purpose name="ase-sync-import">
|
|
20
20
|
Import Foreign Sources into Artifact Set
|
|
21
|
-
</
|
|
21
|
+
</purpose>
|
|
22
22
|
|
|
23
23
|
<expand name="getopt"
|
|
24
24
|
arg1="ase-sync-import"
|