@rse/ase 0.9.34 → 0.9.36

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.
@@ -13,167 +13,6 @@ User Dialog
13
13
  <user-dialog-tool>none</user-dialog-tool>
14
14
  </if>
15
15
 
16
- <define name="user-dialog">
17
-
18
- Let the *user interactively choose* an answer.
19
-
20
- 1. Take the following question specification:
21
-
22
- <spec>
23
- <content/>
24
- </spec>
25
-
26
- The first line of <spec/> (separated by newlines) is of the format:
27
- `<question-label/>: <question-description/>`
28
-
29
- The second and following lines of <spec/> (separated by newlines) are of the format:
30
- `<label/>: <description/>`
31
-
32
- The first line provides the question label and the question
33
- description. The second and following lines each provide an
34
- answer label and an answer description.
35
-
36
- Do not output anything in this step!
37
-
38
- 2. Dispatch according to the agent tool:
39
-
40
- - <if condition="<ase-agent-tool/> is 'claude'">
41
-
42
- 1. Start with <config></config> (set config to empty).
43
- Do not output anything in this step!
44
-
45
- Start with <n>0</n> (set entry count to zero).
46
- <for items="2 3 4 5">
47
- Take from <spec/> the line number <item/>.
48
- If this line does not exist, <break/>.
49
- If this line exists, parse it according to the format `<label/>: <description/>`.
50
- If <config/> is not empty, set <config><config/>, </config> (append comma).
51
- Set <config><config/>{ label: "<label/>",
52
- description: "<description/>" }</config> (append a config entry).
53
- Set <n/> to <n/> + 1 (increment entry count).
54
- </for>
55
-
56
- If <n/> is less than 2:
57
- Set <result>ERROR: user-dialog requires 2-4 answer lines, got <n/></result>
58
- and *SKIP* the following step 2.2 (do not call `AskUserQuestion`)
59
- and continue with step 2.3 dispatch.
60
-
61
- 2. Call the `AskUserQuestion` tool of the agent harness with:
62
-
63
- `AskUserQuestion({
64
- questions: [
65
- {
66
- header: "<question-label/>",
67
- question: "<question-description/>",
68
- multiSelect: false,
69
- options: [
70
- <config/>
71
- ]
72
- }
73
- ]
74
- })`
75
-
76
- 3. Check the tool result and dispatch accordingly:
77
-
78
- - If <result/> already starts with `ERROR:` (set by the
79
- guard in step 2.1 above), keep <result/> unchanged and
80
- *SKIP* all remaining dispatch in this step.
81
-
82
- - If the tool result contains `user doesn't want to proceed`,
83
- `tool use was rejected`, or `user declined to answer
84
- questions`, or the result clearly indicates that the
85
- dialog was cancelled, rejected or skipped, set
86
- <result>CANCEL</result>.
87
-
88
- - Otherwise, extract the selected <answer/> from the
89
- tool result `"<question-description/>"="<answer/>"`.
90
- Set <result><answer/></result>.
91
- If <result/> is then NOT one
92
- of the "label" values from <config/>, set
93
- <result>OTHER: <result/></result>
94
- (prefix result with "OTHER").
95
-
96
- Do not output anything in this step!
97
- </if>
98
-
99
- - <if condition="<ase-agent-tool/> is 'copilot'">
100
-
101
- 1. Start with <config></config> (set config to empty).
102
- Do not output anything in this step!
103
-
104
- Start with <n>0</n> (set entry count to zero).
105
- <for items="2 3 4 5">
106
- Take from <spec/> the line number <item/>.
107
- If this line does not exist, <break/>.
108
- If this line exists, parse it according to the format `<label/>: <description/>`.
109
- If <config/> is not empty, set <config><config/>, </config> (append comma).
110
- Set <config><config/>"<label/>: <description/>"</config> (append a config entry).
111
- Set <n/> to <n/> + 1 (increment entry count).
112
- </for>
113
-
114
- If <n/> is less than 2:
115
- Set <result>ERROR: user-dialog requires 2-4 answer lines, got <n/></result>
116
- and *SKIP* the following step 2.2 (do not call `ask_user`)
117
- and continue with step 2.3 dispatch.
118
-
119
- 2. Call the `ask_user` tool of the agent harness with:
120
-
121
- `ask_user({
122
- question: "<question-label/>: <question-description/>",
123
- allow_freeform: true,
124
- choices: [
125
- <config/>
126
- ]
127
- })`
128
-
129
- 3. Check the tool result and dispatch accordingly:
130
-
131
- - If <result/> already starts with `ERROR:` (set by the
132
- guard in step 2.1 above), keep <result/> unchanged and
133
- *SKIP* all remaining dispatch in this step.
134
-
135
- - If the tool result contains `User skipped question`
136
- or the result clearly indicates that the
137
- dialog was cancelled, rejected or skipped, set
138
- <result>CANCEL</result>.
139
-
140
- - Otherwise, extract the selected answer from the tool
141
- result and set <result/> accordingly. The harness may
142
- return either the full `<label/>: <description/>` line or
143
- just the bare `<label/>`. Determine the selected
144
- <label/> by mapping the <result/> to one of the answer
145
- labels parsed from <spec/> (lines 2 and following): if
146
- <result/> is of the format `<label/>: <description/>`,
147
- take its `<label/>` part; otherwise, if <result/> already
148
- equals one of the answer labels, take it as-is. Set
149
- <result><label/></result>. If <result/> is then NOT one
150
- of the answer labels parsed from <spec/>, set
151
- <result>OTHER: <result/></result>
152
- (prefix result with "OTHER").
153
-
154
- Do not output anything in this step!
155
-
156
- </if>
157
-
158
- - <if condition="<ase-agent-tool/> is 'codex'">
159
-
160
- OpenAI Codex CLI has *no* interactive user-dialog tool, so you
161
- *MUST* *NOT* call any tool here. Instead, render the question and
162
- answers as a custom Markdown dialog and let the user reply with a
163
- free-text choice -- exactly as defined by the following expansion,
164
- passing <spec/> as its question specification, and set <result/> to
165
- the result of that custom dialog:
166
-
167
- <expand name="custom-dialog" arg1="--other">
168
- <spec/>
169
- </expand>
170
-
171
- Do not output anything in this step!
172
-
173
- </if>
174
-
175
- </define>
176
-
177
16
  <define name="custom-dialog">
178
17
 
179
18
  In the following, you *MUST* *NOT* use the <user-dialog-tool/> tool!
@@ -216,7 +55,7 @@ following procedure:
216
55
  If this line does not exist, <break/>.
217
56
  If this line exists, parse it according to the format `<label/>: <description/>`.
218
57
  Set <n/> to <n/> + 1 (increment entry count).
219
- Set <label-key/> to <ase-tpl-key digit="<n/>"/>.
58
+ Set <label-key/> to `<ase-tpl-key digit="<n/>"/>`.
220
59
  Set <label-text/> to `<ase-tpl-pad width="<width/>" text="<label/>:"/>`.
221
60
  Append an entry to <text/>:
222
61
 
@@ -276,31 +115,31 @@ following procedure:
276
115
  3. Do not output anything in this step!
277
116
  Check the <result/> and dispatch accordingly:
278
117
 
279
- 0. If <result/> already starts with `ERROR:` (set by the
280
- guard in step 2.1 above), keep <result/> unchanged and
281
- *SKIP* all remaining sub-steps 3.1-3.3 of this dispatch.
118
+ 1. If <result/> already starts with `ERROR:` (potentially set by
119
+ the guard in step 2.1 above), keep <result/> unchanged and
120
+ *SKIP* all remaining steps 2.3.2 - 2.3.4 of this dispatch.
282
121
 
283
- 1. If <result/> is `cancel`, `CANCEL`, `reject`, `REJECT`, or
122
+ 2. If <result/> is `cancel`, `CANCEL`, `reject`, `REJECT`, or
284
123
  otherwise indicates that the user doesn't want to proceed,
285
124
  or the user declined to answer the question, or that
286
125
  the dialog was cancelled, rejected or skipped, set
287
126
  <result>CANCEL</result>.
288
127
 
289
- 2. Otherwise, determine the selected <label/>
128
+ 3. Otherwise, determine the selected <label/>
290
129
  by mapping the <result/> (usually containing one of the
291
130
  "key" or "label" strings) to one of the answer labels in
292
131
  <spec/>. Set <result><label/></result>.
293
132
 
294
- 3. If <result/> is then *NEITHER* one of the "key"
133
+ 4. If <result/> is then *NEITHER* one of the "key"
295
134
  *NOR* "label" values from <spec/>:
296
135
  <if condition="<opts/> contains `--other`">
297
136
  Set <result>OTHER: <result/></result>
298
- (prefix result with "OTHER").
137
+ (prefix result with `OTHER: `).
299
138
  </if>
300
139
  <else>
301
140
  Output the following <template/> and then *START OVER*
302
- by *GOING* to step 2.2 above, reusing the already-built
303
- <text/> from step 2.1 unchanged (do *NOT* re-enter step 2.1
141
+ by *GOING* to step 2.2.2 above, reusing the already-built
142
+ <text/> from step 2.2.1 unchanged (do *NOT* re-enter step 2.2.1
304
143
  and do *NOT* rebuild <text/>, <keys/>, <n/>, or <width/>).
305
144
 
306
145
  <template>
@@ -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.34",
9
+ "version": "0.9.36",
10
10
  "license": "Apache-2.0",
11
11
  "author": {
12
12
  "name": "Dr. Ralf S. Engelschall",
@@ -16,10 +16,10 @@
16
16
  "devDependencies": {
17
17
  "@rse/stx": "1.1.6",
18
18
  "markdownlint": "0.41.0",
19
- "markdownlint-cli2": "0.22.1",
20
- "eslint": "10.5.0",
21
- "@eslint/markdown": "8.0.2",
22
- "eslint-markdown": "0.11.0"
19
+ "markdownlint-cli2": "0.23.0",
20
+ "eslint": "10.6.0",
21
+ "@eslint/markdown": "8.0.3",
22
+ "eslint-markdown": "0.11.1"
23
23
  },
24
24
  "engines": {
25
25
  "npm": ">=10.0.0",
@@ -304,10 +304,11 @@ interface quality, quality attributes, and architecture governance.
304
304
  specification <mermaid-spec/> for a `flowchart TB` of the
305
305
  high-level component or layer structure and dispatch the rendering
306
306
  to the `ase-meta-diagram` sub-agent by calling the tool
307
- `Agent(name: "ase-meta-diagram", description: "Diagram Rendering",
308
- subagent_type: "ase:ase-meta-diagram", prompt: <mermaid-spec/>)`,
309
- using its returned fenced code block verbatim. Show layers /
310
- slices / major components and their dependency direction.
307
+ `Agent(description: "Diagram Rendering", subagent_type:
308
+ "ase:ase-meta-diagram", prompt: <mermaid-spec/>,
309
+ run_in_background: false)`, using its returned fenced code block
310
+ verbatim. Show layers / slices / major components and their
311
+ dependency direction.
311
312
 
312
313
  - Mark detected *anomalies* directly in the Mermaid source.
313
314
  Because `!` and `?` are Mermaid special characters, *always
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ase-arch-discover
3
- argument-hint: "[--help|-h] [--limit|-l=12] <functionality>"
3
+ argument-hint: "[--help|-h] [--limit|-l=12] [--staleness|-s=18] [--small-scope|-S] <functionality>"
4
4
  description: >
5
5
  Discover additional, third-party components (libraries/frameworks) for
6
6
  the technology stack to provide needed functionality.
@@ -25,7 +25,7 @@ Discover Components
25
25
 
26
26
  <expand name="getopt"
27
27
  arg1="ase-arch-discover"
28
- arg2="--limit|-l=12">
28
+ arg2="--limit|-l=12 --staleness|-s=18 --small-scope|-S">
29
29
  $ARGUMENTS
30
30
  </expand>
31
31
 
@@ -166,18 +166,25 @@ for the technology stack to *provide* the *needed functionality*
166
166
  entries by Maven coordinate.
167
167
 
168
168
  6. Call the `ase_component_info(stack: "<stack/>", components:
169
- [ "<package-1/>", ..., "<package-C/>" ])` tool of the `ase` MCP
170
- server *once* for the entire candidate set of discovered packages.
171
- The tool dispatches internally on <stack/> and fetches all
172
- metadata in maximum parallel and returns an array of objects `{
173
- name, version, created, updated, repository, stars, downloads,
174
- rank }`. For each
175
- component <component-K/> (K=1-C) read from its corresponding
176
- entry: <version-K/> from `version`, <updated-K/> from `updated`,
177
- <created-K/> from `created`, <repository-K/> from `repository`,
178
- <stars-K/> from `stars` (numeric or `N.A.`), <downloads-K/>
179
- from `downloads` (numeric or `N.A.`) and <rank-K/> from `rank`
180
- (numeric).
169
+ [ "<package-1/>", ..., "<package-C/>" ], staleMonths:
170
+ <getopt-option-staleness/>, smallScope: <getopt-option-small-scope/>)`
171
+ tool of the `ase` MCP server *once* for the entire candidate set of
172
+ discovered packages. When the <getopt-option-small-scope/> option is
173
+ enabled, the ranking treats the <functionality/> as *small-scope*,
174
+ i.e. narrow, self-contained, and low-effort enough that a
175
+ *dependency-free/hand-rolled* implementation is a realistic
176
+ alternative to pulling in a third-party component. The tool
177
+ dispatches internally on <stack/>
178
+ and fetches all metadata in maximum parallel and returns an array
179
+ of objects `{ name, version, created, updated, repository, stars,
180
+ downloads, deps, rank }`. For each component <component-K/>
181
+ (K=1-C) read from its corresponding entry: <version-K/> from
182
+ `version`, <updated-K/> from `updated`, <created-K/> from
183
+ `created`, <repository-K/> from `repository`, <stars-K/> from
184
+ `stars` (numeric or `N.A.`), <downloads-K/> from `downloads`
185
+ (numeric or `N.A.`), <deps-K/> from `deps` (numeric or `N.A.`)
186
+ and <rank-K/> from `rank` (numeric). The returned `rank` already
187
+ reflects the staleness and small-scope dependency penalties.
181
188
 
182
189
  7. Sort, in descending order, the discovered candidate components
183
190
  <component-K/> (K=1-C) by their `rank` field and trim the result
@@ -192,7 +199,15 @@ for the technology stack to *provide* the *needed functionality*
192
199
  you should not stumble over) is its single most distinguishing
193
200
  perspective, and remember this as an <info-K/> (K=1-N) formatted
194
201
  like `<type/>: <hint/>` where <type/> is one of `USP`, `Crux`,
195
- or `Gotcha` and <hint/> is a 1-6 word hint. Do not output
202
+ or `Gotcha` and <hint/> is a 1-6 word hint.
203
+
204
+ *Staleness override*: determine the coarse age <age-K/> (like
205
+ `2y`) of the last release from <updated-K/>. If <updated-K/> is
206
+ known and its age exceeds *twice* <getopt-option-staleness/>
207
+ months, *append* to <info-K/> the hint `Gotcha: stale/abandoned
208
+ -- last release <age-K/> ago`; else if its age exceeds
209
+ <getopt-option-staleness/> months, *append* to <info-K/> the
210
+ hint `Gotcha: aging -- last release <age-K/> ago`. Do not output
196
211
  anything.
197
212
  </step>
198
213
 
@@ -217,11 +232,11 @@ for the technology stack to *provide* the *needed functionality*
217
232
  <template>
218
233
  <ase-tpl-bullet-normal/> **COMPONENT RANKING**:
219
234
 
220
- | ⚑ *Component* | ▣ *Package* | ❖ *Version* | ↓ *Downloads* | ⎈ *Stars* | ⏲ *Updated* | ☆ *Created* |
221
- | :------------ | :------------- | -----------: | -----------------: | -------------: | :--------------- | :----------- |
222
- | **<name-1/>** | `<package-1/>` | <version-1/> | **<downloads-1/>** | **<stars-1/>** | **<updated-1/>** | <created-1/> |
235
+ | ⚑ *Component* | ▣ *Package* | ❖ *Version* | ↓ *Downloads* | ⎈ *Stars* | ⏲ *Updated* | ☆ *Created* | ⚭ *Dep.* |
236
+ | :------------ | :------------- | -----------: | -----------------: | -------------: | :--------------- | :----------- | ---------: |
237
+ | **<name-1/>** | `<package-1/>` | <version-1/> | **<downloads-1/>** | **<stars-1/>** | **<updated-1/>** | <created-1/> | <deps-1/> |
223
238
  [...]
224
- | **<name-N/>** | `<package-N/>` | <version-N/> | **<downloads-N/>** | **<stars-N/>** | **<updated-N/>** | <created-N/> |
239
+ | **<name-N/>** | `<package-N/>` | <version-N/> | **<downloads-N/>** | **<stars-N/>** | **<updated-N/>** | <created-N/> | <deps-N/> |
225
240
  </template>
226
241
  </step>
227
242
  </flow>
@@ -8,6 +8,8 @@
8
8
  `ase-arch-discover`
9
9
  [`--help`|`-h`]
10
10
  [`--limit`|`-l=12`]
11
+ [`--staleness`|`-s=18`]
12
+ [`--small-scope`|`-S`]
11
13
  *functionality*
12
14
 
13
15
  ## DESCRIPTION
@@ -20,9 +22,13 @@ The skill determines the project's technology stack (TypeScript,
20
22
  JavaScript, Kotlin, or Java), derives essential keywords from the
21
23
  requested functionality, queries the corresponding package registry
22
24
  (NPM or Maven Central), retrieves metadata (version, downloads,
23
- stars, dates) via the `ase_component_info` MCP tool, and reports
24
- the top-ranked components as a Markdown table together with a single
25
- distinguishing hint (USP, Crux, or Gotcha) per component.
25
+ stars, dates, dependency count) via the `ase_component_info` MCP tool,
26
+ and reports the top-ranked components as a Markdown table together with
27
+ a single distinguishing hint (USP, Crux, or Gotcha) per component.
28
+
29
+ The ranking penalizes *stale* components (last release older than the
30
+ `--staleness` threshold) and, when the `--small-scope` option is given,
31
+ demotes dependency-heavy components.
26
32
 
27
33
  ## OPTIONS
28
34
 
@@ -31,6 +37,19 @@ distinguishing hint (USP, Crux, or Gotcha) per component.
31
37
  in the final ranking (default: 12). Raise it for a broader, more
32
38
  exhaustive survey, lower it for a quicker, narrower lookup.
33
39
 
40
+ `--staleness`|`-s=18`:
41
+ The *staleness threshold* in months (default: 18). A component whose
42
+ last release is older than this is rank-penalized and flagged with an
43
+ `aging` gotcha; older than *twice* the threshold, it is penalized
44
+ harder and flagged as `stale/abandoned`.
45
+
46
+ `--small-scope`|`-S`:
47
+ Treat the requested *functionality* as *small-scope* (default: off).
48
+ When enabled, the ranking demotes dependency-heavy components by a
49
+ dependency-weight penalty, since a dependency-free/hand-rolled
50
+ implementation is a realistic alternative for narrow, self-contained
51
+ functionality.
52
+
34
53
  ## ARGUMENTS
35
54
 
36
55
  *functionality*:
@@ -57,6 +76,12 @@ Discover a broader set of up to 20 HTTP client components:
57
76
  ❯ /ase-arch-discover --limit 20 HTTP client with retries
58
77
  ```
59
78
 
79
+ Discover HTTP clients, flagging any without a release in the last 12 months:
80
+
81
+ ```text
82
+ ❯ /ase-arch-discover --staleness 12 HTTP client with retries
83
+ ```
84
+
60
85
  ## SEE ALSO
61
86
 
62
87
  [`ase-arch-analyze`](../ase-arch-analyze/help.md), [`ase-meta-search`](../ase-meta-search/help.md), [`ase-meta-evaluate`](../ase-meta-evaluate/help.md).