@${CLAUDE_SKILL_DIR}/../../meta/ase-control.md
Self-Test ASE Compatibility
Objective
Self-test how faithfully the current LLM (and its harness) executes the
four core interpreter primitives that every ASE skill silently relies
on -- control flow, XML placeholders, regex matching, and
arithmetic -- and report an overall 0%…100% compatibility rating.
This skill is unusual: it is both the test definition and the system
under test. Each probe is a pure ASE construct that you execute and
record its actual result. You MUST NOT compare against any expected
value until STEP 6. Do not fabricate passes: a probe whose actual result
differs from its expected result MUST be recorded as a fail.
Notice that this skill intentionally does not strictly follow the ASE
skill format, especially it does not include any meta skill information,
etc.
Procedure
STEP 1: Initialize Self-Test
Initialize the running map of actual probe results
(set to empty) -- every probe in STEPs 2-5 stores its result here as
a <category/>/<probe-name/> entry with its actual computed value.
Initialize the running list of failed probes
(set to empty) -- this is populated only in STEP 6 after comparing
actuals against the expected values.
STEP 2: Probe XML Placeholders
Execute all of the following XML-placeholder probes (in the given
order). For each probe, record the actual result in
under the key xml-placeholders/<probe-name/>. Do not compare to
any expected value here.
get-and-set: Set 42, then get .
Record actual result for xml-placeholders/get-and-set.
self-ref: Set 42, then set <v>pre_<v/></v>, then get .
Record actual result for xml-placeholders/self-ref.
overwrite: Set 42, then set <v>99</v>, then get .
Record actual result for xml-placeholders/overwrite.
indexed: Set <eval-1-2>+1</eval-1-2> and <eval-2-1>-1</eval-2-1>,
then get and via <eval-1-2/>,<eval-2-1/>.
Record actual result for xml-placeholders/indexed.
nested-attr: With 20, build the value of an XML attribute
width="<w/>" and read the attribute width back.
Record actual result for xml-placeholders/nested-attr.
entity: Evaluate the XML entity ⦿ and get the rendered
Unicode character.
Record actual result for xml-placeholders/entity.
Set to the number of XML-placeholder probes above.
STEP 3: Probe Control Flow
Execute all of the following control-flow probes (in the given
order). For each probe, record the actual result in
under the key control-flow/<probe-name/>. Do not compare to any
expected value here.
branch: Set 3, then evaluate
<if condition="<a/> is greater than 5">big</if> <elseif condition="<a/> is greater than 2">mid</elseif> <else>small</else>.
Record actual result for control-flow/branch.
while-sum: Set 0 and 1, then evaluate
<while condition="<i/> is less than or equal to 5"> set <s/> to <s/> + <i/>, set <i/> to <i/> + 1 </while>.
Record as actual result for control-flow/while-sum.
for-order: Set , then evaluate
<for items="x y z"><s><s/>-<item/></for>.
Record as actual result for control-flow/for-order.
while-break: Set 1 and , then evaluate
<while condition="<i/> is less than or equal to 9"> if <i/> equals 4 set <hit/> to <i/> and <break/>, else set <i/> to <i/> + 1 </while>.
Record as actual result for control-flow/while-break.
step-skip: A <step condition="[...]">[...]</step> either expands
to its body (if condition evaluates to true) or to the empty string,
so what does <step condition="42 is greater than 7">X</step> expands into?
Record the result of this construct for control-flow/step-skip.
expand-subst: With <define name="foo">[<arg1/>:<content/>]</define>,
evaluate <expand name="foo" arg1="K">V</expand>.
Record actual result for control-flow/expand-subst.
Set to the number of control-flow probes above.
STEP 4: Probe Regex Matching
Execute all of the following regex probes (in the given order).
For each probe, record the actual result in under the
key regex/<probe-name/>. Do not compare to any expected value
here.
getopt-dash: Does the string -l foo match the regexp (^|\s)-?
Record yes or no as actual result for regex/getopt-dash.
getopt-nodash: Does the string foo match the regexp (^|\s)-?
Record yes or no as actual result for regex/getopt-nodash.
anchored-int: Does 123 fully match ^\d+$, and does 12a fully
match ^\d+$? Report as <yes-or-no/>,<yes-or-no/>.
Record actual result for regex/anchored-int.
alternation: Does thorough match ^(basic|standard|thorough)$?
Record yes or no as actual result for regex/alternation.
capture: Apply ^--(\w+).+ to --foo-bar-quux.
Record the first capture group as actual result for regex/capture.
whitespace: Does -x (leading space then dash) match (^|\s)-
(the \s alternative)?
Record yes or no as actual result for regex/whitespace.
complex: Does --level=(low|high)... match
^--([A-Za-z][A-Za-z0-9-]*)(?:\|-([A-Za-z]))?(?:=(\((.*)\)(\.\.\.)?|.*))?$?
Record yes or no as actual result for regex/complex.
Set to the number of regex probes above.
STEP 5: Probe Arithmetic
Execute all of the following arithmetic probes (in the given
order). For each probe, record the actual result in
under the key arithmetic/<probe-name/>. Do not compare to any
expected value here.
increment: With 7, compute + 2.
Record actual result for arithmetic/increment.
product-sum: Compute 4.00 * 1.00 + 2.00 * 0.50.
Record actual result (as X.XX) for arithmetic/product-sum.
percentage: Compute 3 / 7 rounded to 2 decimal places.
Record actual result (as 0.XX) for arithmetic/percentage.
bar-width: With 13, compute 67 - <title-len/>.
Record actual result for arithmetic/bar-width.
threshold: Is 0.095 less than 0.10?
Record yes or no as actual result for arithmetic/threshold.
round-half: Round 2.5 to the nearest integer (round half up).
Record actual result for arithmetic/round-half.
Set to the number of arithmetic probes above.
STEP 6: Fetch Expected Values and Score
Call the ase_compat() tool of the ase MCP server with an
internal programmatic MCP tool call (and NOT with an external
shell command) and set to the text content of the
response.
Parse into a map by splitting on
newlines; for each non-empty line of the form <id/>: <value/>, set
<expected[<id/>]> to <value/> (value may be empty for probes
whose correct answer is an empty string).
For each probe in , compare the actual result to
<expected[<id/>]> using an exact-match comparison:
- If they match, count the probe as pass.
- If they differ, count the probe as fail and append
<id/>
to .
Tally pass counts per category:
- Set to the number of
xml-placeholders/* probes that passed.
- Set to the number of
control-flow/* probes that passed.
- Set to the number of
regex/* probes that passed.
- Set to the number of
arithmetic/* probes that passed.
STEP 7: Compute and Report Compatibility
Compute each category's pass-rate (a value in 0.0…1.0) by dividing
its passes by its total:
set to / ,
set to / ,
set to / ,
set to / .
Compute the overall compatibility as a weighted average of the
four pass-rates, where XML placeholders carry weight 4.00 (the
backbone of every skill), control flow carries weight 3.00,
regex matching carries weight 2.00, and arithmetic carries
weight 1.00. Use the ase_decision_matrix MCP tool with a single
"compatibility" alternative column, one matrix row per category of
the form [ <weight/>, <rate/> ]:
Call...
ase_decision_matrix(matrix: [ [ 4.00, <xml-rate/> ], [ 3.00, <cf-rate/> ], [ 2.00, <re-rate/> ], [ 1.00, <arith-rate/> ] ])
...of the ase MCP server with an internal programmatic MCP
tool call (and NOT with an external shell command) and set
to the single numerical value of the returned
array.
The product-sum is the sum over the four rows of <weight/> * <rate/>, so dividing by the sum of weights (4.00 + 3.00 + 2.00 +
1.00 = 10.00) yields the weighted-average compatibility on 0.0…1.0:
Set to / 10.00.
Set to round( * 100) (an integer percentage).
Also compute each category's display percentage:
Set to round( * 100), and
likewise , , .
Determine the from :
If is greater than or equal to 90:
Set ✓ FULLY COMPATIBLE.
Else if is greater than or equal to 60:
Set ⚠ PARTIALLY COMPATIBLE.
Else:
Set ✘ INCOMPATIBLE.
If is not empty:
Append to the suffix (failed: <failures/>).
Finally, output the compatibility report:
RESULTS:
| ⦿ Capability |
⚖ Weight |
✓ Passed |
⚑ Rate |
| XML Placeholders |
4.00 |
/ |
% |
| Control Flow |
3.00 |
/ |
% |
| Regex Matching |
2.00 |
/ |
% |
| Arithmetic |
1.00 |
/ |
% |
| OVERALL |
|
|
% |
VERDICT:
1---2name: ase-meta-compat3description: Self-test the LLM's ability to execute ASE's core interpreter machinery (control flow, XML placeholders, regex matching, arithmetic) and report an overall compatibility rating. Use when the user wants to check how well the current model/harness is compatible with ASE, or asks to "test ASE compatibility" or "check ASE compatibility".4---5
6@${CLAUDE_SKILL_DIR}/../../meta/ase-control.md
7
8Self-Test ASE Compatibility
9===========================
10
11Objective
12---------
13
14*Self-test* how faithfully the current LLM (and its harness) executes the
15four *core interpreter primitives* that every ASE skill silently relies
16on -- *control flow*, *XML placeholders*, *regex matching*, and
17*arithmetic* -- and report an overall **0%…100% compatibility** rating.
18
19This skill is unusual: it is both the *test definition* and the *system
20under test*. Each *probe* is a pure ASE construct that you execute and
21record its *actual* result. You *MUST NOT* compare against any expected
22value until STEP 6. Do not fabricate passes: a probe whose actual result
23differs from its expected result *MUST* be recorded as a *fail*.
24
25Notice that this skill intentionally does not strictly follow the ASE
26skill format, especially it does not include any meta skill information,
27etc.
28
29Procedure
30---------
31
321. STEP 1: Initialize Self-Test
33
34 Initialize the running map of actual probe results <actuals></actuals>
35 (set to empty) -- every probe in STEPs 2-5 stores its result here as
36 a `<category/>/<probe-name/>` entry with its *actual* computed value.
37
38 Initialize the running list of failed probes <failures></failures>
39 (set to empty) -- this is populated only in STEP 6 after comparing
40 actuals against the expected values.
41
422. STEP 2: Probe XML Placeholders
43
44 Execute *all* of the following XML-placeholder probes (in the given
45 order). For each probe, record the *actual* result in <actuals/>
46 under the key `xml-placeholders/<probe-name/>`. Do *not* compare to
47 any expected value here.
48
49 1. *get-and-set*: Set <v>42</v>, then get <v/>.
50 Record actual result for `xml-placeholders/get-and-set`.
51
52 2. *self-ref*: Set <v>42</v>, then set `<v>pre_<v/></v>`, then get <v/>.
53 Record actual result for `xml-placeholders/self-ref`.
54
55 3. *overwrite*: Set <v>42</v>, then set `<v>99</v>`, then get <v/>.
56 Record actual result for `xml-placeholders/overwrite`.
57
58 4. *indexed*: Set `<eval-1-2>+1</eval-1-2>` and `<eval-2-1>-1</eval-2-1>`,
59 then get <eval-1-2/> and <eval-2-1/> via `<eval-1-2/>,<eval-2-1/>`.
60 Record actual result for `xml-placeholders/indexed`.
61
62 5. *nested-attr*: With <w>20</w>, build the value of an XML attribute
63 `width="<w/>"` and read the attribute `width` back.
64 Record actual result for `xml-placeholders/nested-attr`.
65
66 6. *entity*: Evaluate the XML entity `⦿` and get the rendered
67 Unicode character.
68 Record actual result for `xml-placeholders/entity`.
69
70 Set <xml-total/> to the number of XML-placeholder probes above.
71
723. STEP 3: Probe Control Flow
73
74 Execute *all* of the following control-flow probes (in the given
75 order). For each probe, record the *actual* result in <actuals/>
76 under the key `control-flow/<probe-name/>`. Do *not* compare to any
77 expected value here.
78
79 1. *branch*: Set <a>3</a>, then evaluate
80 `<if condition="<a/> is greater than 5">big</if>
81 <elseif condition="<a/> is greater than 2">mid</elseif>
82 <else>small</else>`.
83 Record actual result for `control-flow/branch`.
84
85 2. *while-sum*: Set <s>0</s> and <i>1</i>, then evaluate
86 `<while condition="<i/> is less than or equal to 5">
87 set <s/> to <s/> + <i/>,
88 set <i/> to <i/> + 1
89 </while>`.
90 Record <s/> as actual result for `control-flow/while-sum`.
91
92 3. *for-order*: Set <s></s>, then evaluate
93 `<for items="x y z"><s><s/>-<item/></for>`.
94 Record <s/> as actual result for `control-flow/for-order`.
95
96 4. *while-break*: Set <i>1</i> and <hit></hit>, then evaluate
97 `<while condition="<i/> is less than or equal to 9">
98 if <i/> equals 4 set <hit/> to <i/> and <break/>,
99 else set <i/> to <i/> + 1
100 </while>`.
101 Record <hit/> as actual result for `control-flow/while-break`.
102
103 5. *step-skip*: A `<step condition="[...]">[...]</step>` either expands
104 to its body (if condition evaluates to true) or to the empty string,
105 so what does `<step condition="42 is greater than 7">X</step>` expands into?
106 Record the result of this construct for `control-flow/step-skip`.
107
108 6. *expand-subst*: With `<define name="foo">[<arg1/>:<content/>]</define>`,
109 evaluate `<expand name="foo" arg1="K">V</expand>`.
110 Record actual result for `control-flow/expand-subst`.
111
112 Set <cf-total/> to the number of control-flow probes above.
113
1144. STEP 4: Probe Regex Matching
115
116 Execute *all* of the following regex probes (in the given order).
117 For each probe, record the *actual* result in <actuals/> under the
118 key `regex/<probe-name/>`. Do *not* compare to any expected value
119 here.
120
121 1. *getopt-dash*: Does the string `-l foo` match the regexp `(^|\s)-`?
122 Record `yes` or `no` as actual result for `regex/getopt-dash`.
123
124 2. *getopt-nodash*: Does the string `foo` match the regexp `(^|\s)-`?
125 Record `yes` or `no` as actual result for `regex/getopt-nodash`.
126
127 3. *anchored-int*: Does `123` fully match `^\d+$`, and does `12a` fully
128 match `^\d+$`? Report as `<yes-or-no/>,<yes-or-no/>`.
129 Record actual result for `regex/anchored-int`.
130
131 4. *alternation*: Does `thorough` match `^(basic|standard|thorough)$`?
132 Record `yes` or `no` as actual result for `regex/alternation`.
133
134 5. *capture*: Apply `^--(\w+).+` to `--foo-bar-quux`.
135 Record the first capture group as actual result for `regex/capture`.
136
137 6. *whitespace*: Does ` -x` (leading space then dash) match `(^|\s)-`
138 (the `\s` alternative)?
139 Record `yes` or `no` as actual result for `regex/whitespace`.
140
141 7. *complex*: Does `--level=(low|high)...` match
142 `^--([A-Za-z][A-Za-z0-9-]*)(?:\|-([A-Za-z]))?(?:=(\((.*)\)(\.\.\.)?|.*))?$`?
143 Record `yes` or `no` as actual result for `regex/complex`.
144
145 Set <re-total/> to the number of regex probes above.
146
1475. STEP 5: Probe Arithmetic
148
149 Execute *all* of the following arithmetic probes (in the given
150 order). For each probe, record the *actual* result in <actuals/>
151 under the key `arithmetic/<probe-name/>`. Do *not* compare to any
152 expected value here.
153
154 1. *increment*: With <n>7</n>, compute <n/> + 2.
155 Record actual result for `arithmetic/increment`.
156
157 2. *product-sum*: Compute `4.00 * 1.00 + 2.00 * 0.50`.
158 Record actual result (as `X.XX`) for `arithmetic/product-sum`.
159
160 3. *percentage*: Compute `3 / 7` rounded to 2 decimal places.
161 Record actual result (as `0.XX`) for `arithmetic/percentage`.
162
163 4. *bar-width*: With <title-len>13</title-len>, compute `67 - <title-len/>`.
164 Record actual result for `arithmetic/bar-width`.
165
166 5. *threshold*: Is `0.095` less than `0.10`?
167 Record `yes` or `no` as actual result for `arithmetic/threshold`.
168
169 6. *round-half*: Round `2.5` to the nearest integer (round half up).
170 Record actual result for `arithmetic/round-half`.
171
172 Set <arith-total/> to the number of arithmetic probes above.
173
1746. STEP 6: Fetch Expected Values and Score
175
176 Call the `ase_compat()` tool of the `ase` MCP server with an
177 *internal* *programmatic* MCP tool call (and *NOT* with an external
178 shell command) and set <compat-output/> to the `text` content of the
179 response.
180
181 Parse <compat-output/> into a map <expected/> by splitting on
182 newlines; for each non-empty line of the form `<id/>: <value/>`, set
183 `<expected[<id/>]>` to `<value/>` (value may be empty for probes
184 whose correct answer is an empty string).
185
186 For each probe in <actuals/>, compare the actual result to
187 `<expected[<id/>]>` using an exact-match comparison:
188
189 - If they match, count the probe as *pass*.
190 - If they differ, count the probe as *fail* and append `<id/>`
191 to <failures/>.
192
193 Tally pass counts per category:
194
195 - Set <xml-pass/> to the number of `xml-placeholders/*` probes that passed.
196 - Set <cf-pass/> to the number of `control-flow/*` probes that passed.
197 - Set <re-pass/> to the number of `regex/*` probes that passed.
198 - Set <arith-pass/> to the number of `arithmetic/*` probes that passed.
199
2007. STEP 7: Compute and Report Compatibility
201
202 Compute each category's *pass-rate* (a value in 0.0…1.0) by dividing
203 its passes by its total:
204
205 set <xml-rate/> to <xml-pass/> / <xml-total/>,
206 set <cf-rate/> to <cf-pass/> / <cf-total/>,
207 set <re-rate/> to <re-pass/> / <re-total/>,
208 set <arith-rate/> to <arith-pass/> / <arith-total/>.
209
210 Compute the overall compatibility as a *weighted average* of the
211 four pass-rates, where *XML placeholders* carry weight `4.00` (the
212 backbone of every skill), *control flow* carries weight `3.00`,
213 *regex matching* carries weight `2.00`, and *arithmetic* carries
214 weight `1.00`. Use the `ase_decision_matrix` MCP tool with a single
215 "compatibility" alternative column, one matrix row per category of
216 the form `[ <weight/>, <rate/> ]`:
217
218 Call...
219
220 `ase_decision_matrix(matrix: [
221 [ 4.00, <xml-rate/> ],
222 [ 3.00, <cf-rate/> ],
223 [ 2.00, <re-rate/> ],
224 [ 1.00, <arith-rate/> ]
225 ])`
226
227 ...of the `ase` MCP server with an *internal* *programmatic* MCP
228 tool call (and *NOT* with an external shell command) and set
229 <product-sum/> to the *single* numerical value of the returned
230 array.
231
232 The product-sum is the sum over the four rows of `<weight/> *
233 <rate/>`, so dividing by the sum of weights (4.00 + 3.00 + 2.00 +
234 1.00 = 10.00) yields the weighted-average compatibility on 0.0…1.0:
235
236 Set <overall/> to <product-sum/> / 10.00.
237 Set <overall-pct/> to round(<overall/> * 100) (an integer percentage).
238
239 Also compute each category's display percentage:
240
241 Set <cf-pct/> to round(<cf-rate/> * 100), and
242 likewise <xml-pct/>, <re-pct/>, <arith-pct/>.
243
244 Determine the <verdict/> from <overall-pct/>:
245
246 1. If <overall-pct/> is greater than or equal to 90:
247 Set <verdict>✓ *FULLY COMPATIBLE*</verdict>.
248
249 2. Else if <overall-pct/> is greater than or equal to 60:
250 Set <verdict>⚠ *PARTIALLY COMPATIBLE*</verdict>.
251
252 3. Else:
253 Set <verdict>✘ *INCOMPATIBLE*</verdict>.
254
255 4. If <failures/> is not empty:
256 Append to <verdict/> the suffix ` (failed: <failures/>)`.
257
258 Finally, output the compatibility report:
259
260 **RESULTS**:
261
262 | ⦿ *Capability* | ⚖ *Weight* | ✓ *Passed* | ⚑ *Rate* |
263 | :------------------- | ----------: | ---------------------------: | ------------------: |
264 | XML Placeholders | 4.00 | <xml-pass/>/<xml-total/> | <xml-pct/>% |
265 | Control Flow | 3.00 | <cf-pass/>/<cf-total/> | <cf-pct/>% |
266 | Regex Matching | 2.00 | <re-pass/>/<re-total/> | <re-pct/>% |
267 | Arithmetic | 1.00 | <arith-pass/>/<arith-total/> | <arith-pct/>% |
268 | **OVERALL** | | | **<overall-pct/>%** |
269
270 **VERDICT**: <verdict/>