@rse/ase 0.9.3 → 0.9.5
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/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-arch-analyze/SKILL.md +1 -1
- package/plugin/skills/ase-arch-discover/SKILL.md +17 -9
- package/plugin/skills/ase-arch-discover/help.md +14 -0
- package/plugin/skills/ase-code-analyze/SKILL.md +162 -18
- package/plugin/skills/ase-code-analyze/help.md +47 -7
- package/plugin/skills/ase-code-craft/SKILL.md +1 -1
- package/plugin/skills/ase-code-insight/SKILL.md +1 -1
- package/plugin/skills/ase-code-lint/SKILL.md +11 -3
- package/plugin/skills/ase-code-lint/help.md +13 -0
- package/plugin/skills/ase-code-refactor/SKILL.md +1 -1
- package/plugin/skills/ase-code-resolve/SKILL.md +2 -2
- package/plugin/skills/ase-docs-distill/SKILL.md +1 -1
- package/plugin/skills/ase-docs-proofread/SKILL.md +1 -1
- package/plugin/skills/ase-meta-brainstorm/SKILL.md +30 -21
- package/plugin/skills/ase-meta-brainstorm/help.md +49 -9
- package/plugin/skills/ase-meta-chat/SKILL.md +1 -1
- package/plugin/skills/ase-meta-diaboli/SKILL.md +33 -10
- package/plugin/skills/ase-meta-diaboli/help.md +20 -2
- package/plugin/skills/ase-meta-diff/SKILL.md +1 -1
- package/plugin/skills/ase-meta-quorum/SKILL.md +37 -5
- package/plugin/skills/ase-meta-quorum/help.md +18 -0
- package/plugin/skills/ase-meta-review/SKILL.md +21 -3
- package/plugin/skills/ase-meta-review/help.md +20 -2
- package/plugin/skills/ase-meta-search/SKILL.md +35 -6
- package/plugin/skills/ase-meta-search/help.md +14 -2
- package/plugin/skills/ase-meta-steelman/SKILL.md +62 -11
- package/plugin/skills/ase-meta-steelman/help.md +34 -2
- package/plugin/skills/ase-meta-why/SKILL.md +122 -17
- package/plugin/skills/ase-meta-why/help.md +46 -5
- package/plugin/skills/ase-task-grill/SKILL.md +1 -1
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.9.
|
|
9
|
+
"version": "0.9.5",
|
|
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.9.
|
|
9
|
+
"version": "0.9.5",
|
|
10
10
|
"license": "GPL-3.0-only",
|
|
11
11
|
"author": {
|
|
12
12
|
"name": "Dr. Ralf S. Engelschall",
|
|
@@ -299,7 +299,7 @@ interface quality, quality attributes, and architecture governance.
|
|
|
299
299
|
specification <mermaid-spec/> for a `flowchart TB` of the
|
|
300
300
|
high-level component or layer structure and dispatch the rendering
|
|
301
301
|
to the `ase-meta-diagram` sub-agent by calling the tool
|
|
302
|
-
`Agent(name: "ase
|
|
302
|
+
`Agent(name: "ase-meta-diagram", description: "Diagram Rendering",
|
|
303
303
|
subagent_type: "ase:ase-meta-diagram", prompt: <mermaid-spec/>)`,
|
|
304
304
|
using its returned fenced code block verbatim. Show layers /
|
|
305
305
|
slices / major components and their dependency direction.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ase-arch-discover
|
|
3
|
-
argument-hint: "[--help|-h] <functionality>"
|
|
3
|
+
argument-hint: "[--help|-h] [--limit|-l=12] <functionality>"
|
|
4
4
|
description: >
|
|
5
5
|
Discover additional, third-party components (libraries/frameworks) for
|
|
6
6
|
the technology stack to provide needed functionality.
|
|
@@ -16,15 +16,23 @@ allowed-tools:
|
|
|
16
16
|
|
|
17
17
|
@${CLAUDE_SKILL_DIR}/../../meta/ase-control.md
|
|
18
18
|
@${CLAUDE_SKILL_DIR}/../../meta/ase-skill.md
|
|
19
|
+
@${CLAUDE_SKILL_DIR}/../../meta/ase-dialog.md
|
|
20
|
+
@${CLAUDE_SKILL_DIR}/../../meta/ase-getopt.md
|
|
19
21
|
|
|
20
22
|
<skill name="ase-arch-discover">
|
|
21
23
|
Discover Components
|
|
22
24
|
</skill>
|
|
23
25
|
|
|
26
|
+
<expand name="getopt"
|
|
27
|
+
arg1="ase-arch-discover"
|
|
28
|
+
arg2="--limit|-l=12">
|
|
29
|
+
$ARGUMENTS
|
|
30
|
+
</expand>
|
|
31
|
+
|
|
24
32
|
<objective>
|
|
25
33
|
*Discover* additional, *third-party components* (libraries/frameworks)
|
|
26
34
|
for the technology stack to *provide* the *needed functionality*
|
|
27
|
-
<request
|
|
35
|
+
<request><getopt-arguments/></request>.
|
|
28
36
|
</objective>
|
|
29
37
|
|
|
30
38
|
<flow>
|
|
@@ -93,13 +101,13 @@ for the technology stack to *provide* the *needed functionality*
|
|
|
93
101
|
|
|
94
102
|
- Based on the essential keywords <keyword-L/> (L=1-M),
|
|
95
103
|
use the `ase-meta-search` skill in a subagent to *generally*
|
|
96
|
-
discover an initial set of a maximum of
|
|
104
|
+
discover an initial set of a maximum of <getopt-option-limit/> *NPM packages*
|
|
97
105
|
<component-K/> and at least their real name <name-K/> and
|
|
98
106
|
their unique package names <package-K/>.
|
|
99
107
|
|
|
100
|
-
- Use the shell command `npm search --json --searchlimit
|
|
108
|
+
- Use the shell command `npm search --json --searchlimit <getopt-option-limit/>
|
|
101
109
|
"<keyword-1/>" [...] "<keyword-M/>"` to *specifically*
|
|
102
|
-
discover an additional set of a maximum of
|
|
110
|
+
discover an additional set of a maximum of <getopt-option-limit/> *NPM packages*
|
|
103
111
|
<component-K/> and at least their unique package names
|
|
104
112
|
<package-K/>, based on the essential keywords <keyword-L/>
|
|
105
113
|
(L=1-M). Merge the results into the already existing result
|
|
@@ -109,14 +117,14 @@ for the technology stack to *provide* the *needed functionality*
|
|
|
109
117
|
|
|
110
118
|
- Based on the essential keywords <keyword-L/> (L=1-M),
|
|
111
119
|
use the `ase-meta-search` skill in a subagent to *generally*
|
|
112
|
-
discover an initial set of a maximum of
|
|
120
|
+
discover an initial set of a maximum of <getopt-option-limit/> *Maven packages*
|
|
113
121
|
<component-K/> and at least their real name <name-K/> and
|
|
114
122
|
their unique Maven coordinates <package-K/> of the form
|
|
115
123
|
`groupId:artifactId`.
|
|
116
124
|
|
|
117
|
-
- Use the shell command `curl -s 'https://search.maven.org/solrsearch/select?q=<keyword-1/>+<keyword-M/>&rows
|
|
125
|
+
- Use the shell command `curl -s 'https://search.maven.org/solrsearch/select?q=<keyword-1/>+<keyword-M/>&rows=<getopt-option-limit/>&wt=json'`
|
|
118
126
|
to *specifically* discover an additional set of a maximum
|
|
119
|
-
of
|
|
127
|
+
of <getopt-option-limit/> *Maven packages* <component-K/> and at least their
|
|
120
128
|
unique Maven coordinates <package-K/> (i.e. `<g/>:<a/>` from
|
|
121
129
|
each result document's `g` and `a` fields), based on the
|
|
122
130
|
essential keywords <keyword-L/> (L=1-M). Merge the results
|
|
@@ -139,7 +147,7 @@ for the technology stack to *provide* the *needed functionality*
|
|
|
139
147
|
|
|
140
148
|
- Sort, in descending order, the discovered components
|
|
141
149
|
<component-K/> (K=1-N) by their `rank` field and trim the result
|
|
142
|
-
list to just a maximum of
|
|
150
|
+
list to just a maximum of <getopt-option-limit/> total components.
|
|
143
151
|
|
|
144
152
|
- For each component <component-K/> (K=1-N), research and then
|
|
145
153
|
decide which *one* of *USP* (Unique Selling Point -- what makes
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
`ase-arch-discover`
|
|
9
9
|
[`--help`|`-h`]
|
|
10
|
+
[`--limit`|`-l=12`]
|
|
10
11
|
*functionality*
|
|
11
12
|
|
|
12
13
|
## DESCRIPTION
|
|
@@ -23,6 +24,13 @@ stars, dates) via the `ase_component_info` MCP tool, and reports
|
|
|
23
24
|
the top-ranked components as a Markdown table together with a single
|
|
24
25
|
distinguishing hint (USP, Crux, or Gotcha) per component.
|
|
25
26
|
|
|
27
|
+
## OPTIONS
|
|
28
|
+
|
|
29
|
+
`--limit`|`-l=12`:
|
|
30
|
+
The *maximum* number of components searched per source and retained
|
|
31
|
+
in the final ranking (default: 12). Raise it for a broader, more
|
|
32
|
+
exhaustive survey, lower it for a quicker, narrower lookup.
|
|
33
|
+
|
|
26
34
|
## ARGUMENTS
|
|
27
35
|
|
|
28
36
|
*functionality*:
|
|
@@ -43,6 +51,12 @@ Discover components for HTTP client functionality:
|
|
|
43
51
|
❯ /ase-arch-discover HTTP client with retries
|
|
44
52
|
```
|
|
45
53
|
|
|
54
|
+
Discover a broader set of up to 20 HTTP client components:
|
|
55
|
+
|
|
56
|
+
```text
|
|
57
|
+
❯ /ase-arch-discover --limit 20 HTTP client with retries
|
|
58
|
+
```
|
|
59
|
+
|
|
46
60
|
## SEE ALSO
|
|
47
61
|
|
|
48
62
|
`ase-arch-analyze`, `ase-meta-search`, `ase-meta-evaluate`.
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ase-code-analyze
|
|
3
|
-
argument-hint: "[--help|-h] <source-reference>"
|
|
3
|
+
argument-hint: "[--help|-h] [--performance|-p] [--security|-s] [--severity|-S=(LOW|MEDIUM|HIGH)] <source-reference>"
|
|
4
4
|
description: >
|
|
5
|
-
Analyze the source code for problems in the logic and
|
|
5
|
+
Analyze the source code for problems in either the logic and
|
|
6
|
+
semantics and its related control flow, performance and efficiency,
|
|
7
|
+
or security.
|
|
6
8
|
user-invocable: true
|
|
7
9
|
disable-model-invocation: false
|
|
8
10
|
effort: high
|
|
@@ -12,50 +14,174 @@ allowed-tools:
|
|
|
12
14
|
|
|
13
15
|
@${CLAUDE_SKILL_DIR}/../../meta/ase-control.md
|
|
14
16
|
@${CLAUDE_SKILL_DIR}/../../meta/ase-skill.md
|
|
17
|
+
@${CLAUDE_SKILL_DIR}/../../meta/ase-getopt.md
|
|
15
18
|
|
|
16
19
|
<skill name="ase-code-analyze">
|
|
17
20
|
Analyze Source Code
|
|
18
21
|
</skill>
|
|
19
22
|
|
|
23
|
+
<expand name="getopt"
|
|
24
|
+
arg1="ase-code-analyze"
|
|
25
|
+
arg2="--performance|-p --security|-s --severity|-S=(LOW|MEDIUM|HIGH)">
|
|
26
|
+
$ARGUMENTS
|
|
27
|
+
</expand>
|
|
28
|
+
|
|
20
29
|
<objective>
|
|
21
|
-
*Analyze* the source code of
|
|
22
|
-
code, for problems
|
|
23
|
-
*
|
|
30
|
+
*Analyze* the source code of <getopt-arguments/>, and its directly
|
|
31
|
+
related source code, for problems - read-only, *without* applying any
|
|
32
|
+
changes. The *analysis lens* depends on the selected options: problems
|
|
33
|
+
in its *logic* and *semantics* and its related *control flow*, or
|
|
34
|
+
problems in *performance* and *efficiency*, or problems in *security*.
|
|
24
35
|
</objective>
|
|
25
36
|
|
|
26
37
|
<flow>
|
|
27
38
|
|
|
28
|
-
1. <step id="STEP 1:
|
|
29
|
-
|
|
39
|
+
1. <step id="STEP 1: Sanity Check Usage">
|
|
40
|
+
|
|
41
|
+
<if condition="<getopt-option-performance/> is equal `true` and <getopt-option-security/> is equal `true`">
|
|
42
|
+
|
|
43
|
+
Only output the following <template/> and then *STOP* immediately:
|
|
44
|
+
|
|
45
|
+
<template>
|
|
46
|
+
⧉ **ASE**: ✪ skill: **ase-code-analyze**, ▶ ERROR: options `--performance` and `--security` are mutually exclusive
|
|
47
|
+
</template>
|
|
48
|
+
|
|
49
|
+
</if>
|
|
50
|
+
|
|
51
|
+
</step>
|
|
52
|
+
|
|
53
|
+
2. <step id="STEP 2: Investigate Code Base">
|
|
54
|
+
|
|
55
|
+
In this STEP 2, investigate on the code. If the code base is large,
|
|
30
56
|
you *MUST* use the `Agent` tool (not inline work) to create multiple
|
|
31
57
|
sub-agents to split the investigation task into appropriate chunks.
|
|
32
58
|
|
|
33
59
|
Tenets:
|
|
34
60
|
|
|
35
61
|
- **Quiet Operation**:
|
|
36
|
-
|
|
62
|
+
|
|
63
|
+
During investigation in this STEP 2, do *not* output anything else,
|
|
37
64
|
especially do not give any further explanations or information.
|
|
38
65
|
|
|
39
66
|
- **Practical Relevance Only**:
|
|
67
|
+
|
|
40
68
|
Focus on *practically relevant* cases and especially do *not*
|
|
41
69
|
investigate theoretical or fictive cases.
|
|
42
70
|
|
|
43
71
|
- **Problem Focus Only**:
|
|
72
|
+
|
|
44
73
|
Still focus on the *problem only* and do *not* already
|
|
45
|
-
investigate any possible *solution*.
|
|
74
|
+
investigate any possible *solution* or apply any *change*.
|
|
75
|
+
|
|
76
|
+
- **Lens Focus**:
|
|
77
|
+
|
|
78
|
+
<if condition="<getopt-option-performance/> is equal `true`">
|
|
79
|
+
|
|
80
|
+
Focus on *performance* and *efficiency* only - and do *not*
|
|
81
|
+
investigate logic, semantics, control flow, or security
|
|
82
|
+
problems.
|
|
83
|
+
|
|
84
|
+
Analysis Hints (not exhaustive, just indicators):
|
|
85
|
+
- high algorithmic complexity
|
|
86
|
+
- needless resource allocations/copies
|
|
87
|
+
- redundant recomputation
|
|
88
|
+
- many I/O and query round-trips
|
|
89
|
+
- concurrency bottlenecks
|
|
90
|
+
- mismatched data structures
|
|
91
|
+
- [...]
|
|
92
|
+
|
|
93
|
+
</if>
|
|
94
|
+
|
|
95
|
+
<if condition="<getopt-option-security/> is equal `true`">
|
|
96
|
+
|
|
97
|
+
Focus on *security* only - and do *not* investigate logic,
|
|
98
|
+
semantics, performance, or efficiency problems.
|
|
99
|
+
|
|
100
|
+
Analysis Hints (not exhaustive, just indicators):
|
|
101
|
+
- unsafe data deserialization
|
|
102
|
+
- missing input data validation/sanitization
|
|
103
|
+
- broken authentication/authorization
|
|
104
|
+
- sensitive-data exposure
|
|
105
|
+
- path traversal
|
|
106
|
+
- unsafe cryptography
|
|
107
|
+
- hard-coded secrets
|
|
108
|
+
- vulnerable dependencies
|
|
109
|
+
- [...]
|
|
110
|
+
|
|
111
|
+
</if>
|
|
112
|
+
|
|
113
|
+
<if condition="<getopt-option-performance/> is NOT equal `true` and <getopt-option-security/> is NOT equal `true`">
|
|
114
|
+
|
|
115
|
+
Focus on problems in the *logic* and *semantics* and the related
|
|
116
|
+
*control flow* only - and do *not* investigate performance,
|
|
117
|
+
efficiency, or security problems.
|
|
118
|
+
|
|
119
|
+
Analysis Hints (not exhaustive, just indicators):
|
|
120
|
+
- incorrect conditionals and boolean logic
|
|
121
|
+
- off-by-one and boundary errors
|
|
122
|
+
- operator misuse
|
|
123
|
+
- mishandled edge cases
|
|
124
|
+
- broken or missing error handling
|
|
125
|
+
- incorrect async/await/promise handling
|
|
126
|
+
- control-flow defects (unreachable code, missing breaks, wrong early returns)
|
|
127
|
+
- state-mutation bugs
|
|
128
|
+
- incorrect default values
|
|
129
|
+
- null/undefined mishandling
|
|
130
|
+
- type-coercion bugs
|
|
131
|
+
- faulty parsing or merge/override semantics
|
|
132
|
+
- [...]
|
|
133
|
+
|
|
134
|
+
</if>
|
|
135
|
+
|
|
136
|
+
You *MUST* not output anything in this STEP 2.
|
|
137
|
+
|
|
46
138
|
</step>
|
|
47
139
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
140
|
+
3. <step id="STEP 3: Show Results">
|
|
141
|
+
|
|
142
|
+
Before reporting, *apply the severity floor* selected via
|
|
143
|
+
<getopt-option-severity/> (default `LOW`): define the ordinal rank
|
|
144
|
+
`LOW`=1, `MEDIUM`=2, `HIGH`=3. *Keep* a detected problem if and only
|
|
145
|
+
if its <severity/> is `ACCEPTED` *or* `rank(severity)` is greater
|
|
146
|
+
than or equal to `rank(<getopt-option-severity/>)`; *silently drop*
|
|
147
|
+
all other problems (they are neither reported nor persisted). With
|
|
148
|
+
the default floor `LOW`, all problems are kept. `ACCEPTED` problems
|
|
149
|
+
are *never* dropped. Then renumber the surviving problems
|
|
150
|
+
contiguously as `P<n/>` with <n/> = 1, 2, ... in the original
|
|
151
|
+
ordering. If *all* problems are dropped, skip the per-problem report
|
|
152
|
+
but still emit the final hint <template/> below.
|
|
153
|
+
|
|
154
|
+
In this STEP 3, for *EVERY* surviving problem, immediately report
|
|
155
|
+
it with the following output <template/>, based on concise bullet
|
|
51
156
|
points.
|
|
52
157
|
|
|
158
|
+
<if condition="<getopt-option-performance/> is equal `true`">
|
|
159
|
+
|
|
53
160
|
<template>
|
|
54
|
-
|
|
161
|
+
|
|
162
|
+
<ase-tpl-bullet-signal/> **PROBLEM** (Severity: **<severity/>**): **P<n/>**: **<title/>**
|
|
163
|
+
|
|
164
|
+
<description/>
|
|
165
|
+
|
|
166
|
+
⊙ EVIDENCE: <evidence/>
|
|
167
|
+
⊖ TRADEOFF: <trade-off/>
|
|
168
|
+
|
|
169
|
+
</template>
|
|
170
|
+
|
|
171
|
+
</if>
|
|
172
|
+
|
|
173
|
+
<if condition="<getopt-option-performance/> is NOT equal `true`">
|
|
174
|
+
|
|
175
|
+
<template>
|
|
176
|
+
|
|
177
|
+
<ase-tpl-bullet-signal/> **PROBLEM** (Severity: **<severity/>**): **P<n/>**: **<title/>**
|
|
55
178
|
|
|
56
179
|
<description/>
|
|
180
|
+
|
|
57
181
|
</template>
|
|
58
182
|
|
|
183
|
+
</if>
|
|
184
|
+
|
|
59
185
|
Hints:
|
|
60
186
|
|
|
61
187
|
- For the final results, do *not* output anything else, especially do
|
|
@@ -77,7 +203,23 @@ code, for problems in its *logic* and *semantics* and its related
|
|
|
77
203
|
|
|
78
204
|
- In <description/>, classify the problem with a <severity/>
|
|
79
205
|
of <template>LOW</template>, <template>MEDIUM</template> or
|
|
80
|
-
<template>HIGH</template
|
|
206
|
+
<template>HIGH</template>, ranked by the estimated *impact* of the
|
|
207
|
+
problem.
|
|
208
|
+
|
|
209
|
+
- <if condition="<getopt-option-performance/> is equal `true`">
|
|
210
|
+
In <evidence/>, ground the finding by citing either the inferred
|
|
211
|
+
*Big-O* time/space complexity (e.g. `O(n²)` reducible to `O(n)`)
|
|
212
|
+
with the exact driving loop or recursion, or the matched
|
|
213
|
+
performance *anti-pattern* (e.g. N+1 query, sync-in-loop, repeated
|
|
214
|
+
recompute, string concat in loop), with an inline code reference.
|
|
215
|
+
</if>
|
|
216
|
+
|
|
217
|
+
- <if condition="<getopt-option-performance/> is equal `true`">
|
|
218
|
+
In <trade-off/>, state the *cost* of the optimization (e.g.
|
|
219
|
+
readability, additional memory for speed, added complexity), so
|
|
220
|
+
the user can make an informed decision; use *none* if there is no
|
|
221
|
+
meaningful trade-off.
|
|
222
|
+
</if>
|
|
81
223
|
|
|
82
224
|
- *Additionally*, persist all reported problems in a *single*
|
|
83
225
|
`ase_kv_batch` call to the `ase` MCP server with `transactional`
|
|
@@ -85,17 +227,19 @@ code, for problems in its *logic* and *semantics* and its related
|
|
|
85
227
|
starts with one `{ command: "clear" }` entry, followed by one
|
|
86
228
|
`{ command: "set", key: "ase-issue-P<n/>", val: "<title/>:
|
|
87
229
|
<description/>" }` entry per reported problem.
|
|
88
|
-
</step>
|
|
89
230
|
|
|
90
|
-
|
|
91
|
-
Finally, in this STEP 3, output the following <template/> to give a
|
|
92
|
-
final hint:
|
|
231
|
+
Finally, output the following <template/> to give a final hint:
|
|
93
232
|
|
|
94
233
|
<template>
|
|
95
234
|
⧉ **ASE**: ☻ skill: **<skill-name/>**, ▶ status: **skill finished**
|
|
96
235
|
⧉ **ASE**: ↪ hint: **For deeper analysis, suggestions on solution approaches and then final problem resolution, use `/ase-code-resolve P{n}` in the same or even a different session.**
|
|
97
236
|
</template>
|
|
237
|
+
|
|
238
|
+
You *MUST* not output anything else in this STEP 3,
|
|
239
|
+
especially not any further explanations.
|
|
240
|
+
|
|
98
241
|
</step>
|
|
99
242
|
|
|
100
243
|
</flow>
|
|
101
244
|
|
|
245
|
+
</output>
|
|
@@ -7,19 +7,41 @@
|
|
|
7
7
|
|
|
8
8
|
`ase-code-analyze`
|
|
9
9
|
[`--help`|`-h`]
|
|
10
|
+
[`--performance`|`-p`]
|
|
11
|
+
[`--security`|`-s`]
|
|
12
|
+
[`--severity`|`-S`=(`LOW`|`MEDIUM`|`HIGH`)]
|
|
10
13
|
*source-reference*
|
|
11
14
|
|
|
12
15
|
## DESCRIPTION
|
|
13
16
|
|
|
14
17
|
The `ase-code-analyze` skill analyzes the source code of the referenced
|
|
15
|
-
location, and its directly related source code, for problems
|
|
16
|
-
*
|
|
18
|
+
location, and its directly related source code, for problems. It is
|
|
19
|
+
*read-only* and advisory: it reports problems but applies *no* changes.
|
|
20
|
+
|
|
21
|
+
The *analysis lens* depends on the selected options:
|
|
22
|
+
|
|
23
|
+
- **default** (neither `--performance` nor `--security`): problems in
|
|
24
|
+
its *logic*, *semantics*, and related *control flow*.
|
|
25
|
+
|
|
26
|
+
- `--performance`|`-p`: problems in *performance* and *efficiency*.
|
|
27
|
+
|
|
28
|
+
- `--security`|`-s`: problems in *security*.
|
|
29
|
+
|
|
30
|
+
The `--performance` and `--security` options are *mutually exclusive*.
|
|
31
|
+
|
|
32
|
+
The `--severity`|`-S`=(`LOW`|`MEDIUM`|`HIGH`) option sets a *severity
|
|
33
|
+
floor* (default `LOW`): problems below the chosen threshold are silently
|
|
34
|
+
suppressed (neither reported nor persisted), ordered `LOW` < `MEDIUM` <
|
|
35
|
+
`HIGH`. The default `LOW` keeps all problems; `ACCEPTED` problems are
|
|
36
|
+
never suppressed. Surviving problems are renumbered contiguously as
|
|
37
|
+
`P<n>`.
|
|
17
38
|
|
|
18
39
|
The skill investigates the code base silently, reports each detected
|
|
19
|
-
problem as a `PROBLEM` entry with severity (`LOW`, `MEDIUM`, `HIGH`)
|
|
20
|
-
inline file/line references
|
|
21
|
-
|
|
22
|
-
|
|
40
|
+
problem as a `PROBLEM` entry with severity (`LOW`, `MEDIUM`, `HIGH`) and
|
|
41
|
+
inline file/line references (in the performance lens, each entry
|
|
42
|
+
additionally carries an *evidence* and a *trade-off* line), and persists
|
|
43
|
+
results in the `ase` MCP key/value store as `ase-issue-P<n>` entries so
|
|
44
|
+
they can later be resolved via `ase-code-resolve P<n>`.
|
|
23
45
|
|
|
24
46
|
## ARGUMENTS
|
|
25
47
|
|
|
@@ -29,7 +51,7 @@ resolved via `ase-code-resolve P<n>`.
|
|
|
29
51
|
|
|
30
52
|
## EXAMPLES
|
|
31
53
|
|
|
32
|
-
Analyze a specific source file:
|
|
54
|
+
Analyze a specific source file for logic/semantic problems:
|
|
33
55
|
|
|
34
56
|
```text
|
|
35
57
|
❯ /ase-code-analyze src/server.ts
|
|
@@ -41,6 +63,24 @@ Analyze a directory of code:
|
|
|
41
63
|
❯ /ase-code-analyze src/handlers/
|
|
42
64
|
```
|
|
43
65
|
|
|
66
|
+
Analyze a source file for performance/efficiency opportunities only:
|
|
67
|
+
|
|
68
|
+
```text
|
|
69
|
+
❯ /ase-code-analyze --performance src/server.ts
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Analyze a source file for security aspects only:
|
|
73
|
+
|
|
74
|
+
```text
|
|
75
|
+
❯ /ase-code-analyze -s src/handlers/
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Analyze a directory, reporting only `MEDIUM` and `HIGH` problems:
|
|
79
|
+
|
|
80
|
+
```text
|
|
81
|
+
❯ /ase-code-analyze -S MEDIUM src/handlers/
|
|
82
|
+
```
|
|
83
|
+
|
|
44
84
|
## SEE ALSO
|
|
45
85
|
|
|
46
86
|
`ase-code-resolve`, `ase-code-refactor`, `ase-code-lint`,
|
|
@@ -228,7 +228,7 @@ permitted way to persist artifacts is via `ase_task_save(...)`.
|
|
|
228
228
|
TB`, `stateDiagram-v2`, `sequenceDiagram`, `classDiagram`,
|
|
229
229
|
or `erDiagram`, depending on intent) and dispatching the
|
|
230
230
|
rendering to the `ase-meta-diagram` sub-agent by calling
|
|
231
|
-
the tool `Agent(name: "ase
|
|
231
|
+
the tool `Agent(name: "ase-meta-diagram", description:
|
|
232
232
|
"Diagram Rendering", subagent_type: "ase:ase-meta-diagram",
|
|
233
233
|
prompt: <mermaid-spec/>)`, reproducing its returned fenced
|
|
234
234
|
code block verbatim. For *current vs. proposed* comparisons,
|
|
@@ -89,7 +89,7 @@ Give *insights* into the project through the source code of $ARGUMENTS.
|
|
|
89
89
|
<mermaid-spec/> for a `flowchart TB` diagram with all modules as
|
|
90
90
|
boxes and the imports between modules as the directed edges. Then
|
|
91
91
|
dispatch the rendering to the `ase-meta-diagram` sub-agent by
|
|
92
|
-
calling the tool `Agent(name: "ase
|
|
92
|
+
calling the tool `Agent(name: "ase-meta-diagram", description:
|
|
93
93
|
"Diagram Rendering", subagent_type: "ase:ase-meta-diagram", prompt:
|
|
94
94
|
<mermaid-spec/>)` and reproduce its returned fenced code block
|
|
95
95
|
verbatim in the response text. Do not display any further
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ase-code-lint
|
|
3
|
-
argument-hint: "[--help|-h] [--auto|-a] <source-reference>"
|
|
3
|
+
argument-hint: "[--help|-h] [--auto|-a] [--severity|-S=(LOW|MEDIUM|HIGH)] <source-reference>"
|
|
4
4
|
description: >
|
|
5
5
|
Lint source code for potential code quality problems.
|
|
6
6
|
Use when the user wants to "lint" or "check" source code.
|
|
@@ -20,7 +20,7 @@ Lint Source Code
|
|
|
20
20
|
|
|
21
21
|
<expand name="getopt"
|
|
22
22
|
arg1="ase-code-lint"
|
|
23
|
-
arg2="--auto|-a">
|
|
23
|
+
arg2="--auto|-a --severity|-S=(LOW|MEDIUM|HIGH)">
|
|
24
24
|
$ARGUMENTS
|
|
25
25
|
</expand>
|
|
26
26
|
|
|
@@ -48,7 +48,7 @@ related to a set of code quality aspects.
|
|
|
48
48
|
|
|
49
49
|
```text
|
|
50
50
|
Agent(
|
|
51
|
-
name: "ase
|
|
51
|
+
name: "ase-code-lint",
|
|
52
52
|
description: "Lint Investigation",
|
|
53
53
|
subagent_type: "ase:ase-code-lint",
|
|
54
54
|
mode: "plan",
|
|
@@ -59,6 +59,14 @@ related to a set of code quality aspects.
|
|
|
59
59
|
Parse the single result message of the `Agent` tool as a JSON array
|
|
60
60
|
and set <problems/> to that list.
|
|
61
61
|
|
|
62
|
+
Then *apply the severity floor* selected via <getopt-option-severity/>
|
|
63
|
+
(default `LOW`): define the ordinal rank `LOW`=1, `MEDIUM`=2,
|
|
64
|
+
`HIGH`=3. *Keep* a problem in <problems/> if and only if its
|
|
65
|
+
`severity` field is `ACCEPTED` *or* `rank(severity)` is greater than
|
|
66
|
+
or equal to `rank(<getopt-option-severity/>)`; *silently drop* all
|
|
67
|
+
other problems. With the default floor `LOW`, all problems are kept.
|
|
68
|
+
`ACCEPTED` problems are *never* dropped.
|
|
69
|
+
|
|
62
70
|
You *MUST* *NOT* output anything else in this step 1.
|
|
63
71
|
|
|
64
72
|
</step>
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
`ase-code-lint`
|
|
9
9
|
[`--help`|`-h`]
|
|
10
10
|
[`--auto`|`-a`]
|
|
11
|
+
[`--severity`|`-S`=(`LOW`|`MEDIUM`|`HIGH`)]
|
|
11
12
|
*source-reference*
|
|
12
13
|
|
|
13
14
|
## DESCRIPTION
|
|
@@ -29,6 +30,12 @@ automatically.
|
|
|
29
30
|
Automatically apply every proposed correction without asking the
|
|
30
31
|
user via the interactive dialog.
|
|
31
32
|
|
|
33
|
+
`--severity`|`-S`=(`LOW`|`MEDIUM`|`HIGH`):
|
|
34
|
+
Set the *severity floor* (default `LOW`): findings below the chosen
|
|
35
|
+
threshold are silently suppressed, ordered `LOW` < `MEDIUM` <
|
|
36
|
+
`HIGH`. The default `LOW` keeps all findings; `ACCEPTED` findings are
|
|
37
|
+
never suppressed.
|
|
38
|
+
|
|
32
39
|
## ARGUMENTS
|
|
33
40
|
|
|
34
41
|
*source-reference*:
|
|
@@ -48,6 +55,12 @@ Lint a directory and automatically apply all corrections:
|
|
|
48
55
|
❯ /ase-code-lint --auto src/handlers/
|
|
49
56
|
```
|
|
50
57
|
|
|
58
|
+
Lint a directory, reporting only `MEDIUM` and `HIGH` findings:
|
|
59
|
+
|
|
60
|
+
```text
|
|
61
|
+
❯ /ase-code-lint -S MEDIUM src/handlers/
|
|
62
|
+
```
|
|
63
|
+
|
|
51
64
|
## SEE ALSO
|
|
52
65
|
|
|
53
66
|
`ase-code-analyze`, `ase-code-resolve`, `ase-code-refactor`,
|
|
@@ -218,7 +218,7 @@ permitted way to persist artifacts is via `ase_task_save(...)`.
|
|
|
218
218
|
(e.g. `flowchart TB`, `stateDiagram-v2`, `sequenceDiagram`,
|
|
219
219
|
`classDiagram`, or `erDiagram`, depending on intent) and
|
|
220
220
|
dispatching the rendering to the `ase-meta-diagram`
|
|
221
|
-
sub-agent by calling the tool `Agent(name: "ase
|
|
221
|
+
sub-agent by calling the tool `Agent(name: "ase-meta-diagram",
|
|
222
222
|
description: "Diagram Rendering", subagent_type:
|
|
223
223
|
"ase:ase-meta-diagram", prompt: <mermaid-spec/>)`, reproducing
|
|
224
224
|
its returned fenced code block verbatim. For *current
|
|
@@ -154,7 +154,7 @@ permitted way to persist artifacts is via `ase_task_save(...)`.
|
|
|
154
154
|
TB`, `stateDiagram-v2`, `sequenceDiagram`, `classDiagram`, or
|
|
155
155
|
`erDiagram`, depending on intent) and dispatching the rendering
|
|
156
156
|
to the `ase-meta-diagram` sub-agent by calling the tool
|
|
157
|
-
`Agent(name: "ase
|
|
157
|
+
`Agent(name: "ase-meta-diagram", description: "Diagram
|
|
158
158
|
Rendering", subagent_type: "ase:ase-meta-diagram", prompt:
|
|
159
159
|
<mermaid-spec/>)`, reproducing its returned fenced code block
|
|
160
160
|
verbatim. Omit <optional-diagram/> entirely for simple or
|
|
@@ -267,7 +267,7 @@ permitted way to persist artifacts is via `ase_task_save(...)`.
|
|
|
267
267
|
(e.g. `flowchart TB`, `stateDiagram-v2`, `sequenceDiagram`,
|
|
268
268
|
`classDiagram`, or `erDiagram`, depending on intent) and
|
|
269
269
|
dispatching the rendering to the `ase-meta-diagram`
|
|
270
|
-
sub-agent by calling the tool `Agent(name: "ase
|
|
270
|
+
sub-agent by calling the tool `Agent(name: "ase-meta-diagram",
|
|
271
271
|
description: "Diagram Rendering", subagent_type:
|
|
272
272
|
"ase:ase-meta-diagram", prompt: <mermaid-spec/>)`, reproducing
|
|
273
273
|
its returned fenced code block verbatim. For *current
|
|
@@ -109,7 +109,7 @@ explicitly requested by this procedure via outputs based on a <template/>!
|
|
|
109
109
|
where `Ls` is the start line and `Le` is the end line.
|
|
110
110
|
|
|
111
111
|
- A *verbatim* <evidence/> snippet, copied exactly from
|
|
112
|
-
<source/> (but with all newlines
|
|
112
|
+
<source/> (but with all newlines replaced with spaces
|
|
113
113
|
and multiple spaces collapsed into a single space), that
|
|
114
114
|
*proves* the point. The cited snippet *MUST* prove the
|
|
115
115
|
point verbatim. If it does not, *re-investigate and re-cite
|