@rse/ase 0.9.62 → 0.9.64

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.
Files changed (73) hide show
  1. package/dst/ase-artifact.js +19 -8
  2. package/dst/ase-config.js +12 -8
  3. package/dst/ase-hook.js +9 -1
  4. package/dst/ase-service.js +2 -0
  5. package/dst/ase-spec.js +281 -0
  6. package/dst/ase.js +2 -0
  7. package/package.json +10 -8
  8. package/plugin/.claude-plugin/plugin.json +1 -1
  9. package/plugin/.codex-plugin/plugin.json +1 -1
  10. package/plugin/.github/plugin/plugin.json +1 -1
  11. package/plugin/etc/stx.conf +5 -3
  12. package/plugin/meta/ase-format-meta.md +23 -105
  13. package/plugin/meta/ase-format-spec.md +22 -1326
  14. package/plugin/meta/ase-tenets.md +63 -4
  15. package/plugin/package.json +6 -2
  16. package/plugin/skills/ase-arch-analyze/help.md +7 -0
  17. package/plugin/skills/ase-arch-discover/help.md +7 -0
  18. package/plugin/skills/ase-code-analyze/help.md +8 -0
  19. package/plugin/skills/ase-code-craft/help.md +7 -0
  20. package/plugin/skills/ase-code-dissect/help.md +7 -0
  21. package/plugin/skills/ase-code-edit/SKILL.md +14 -9
  22. package/plugin/skills/ase-code-edit/help.md +7 -0
  23. package/plugin/skills/ase-code-explain/help.md +7 -0
  24. package/plugin/skills/ase-code-insight/help.md +7 -0
  25. package/plugin/skills/ase-code-lint/help.md +8 -0
  26. package/plugin/skills/ase-code-refactor/help.md +7 -0
  27. package/plugin/skills/ase-code-resolve/help.md +7 -0
  28. package/plugin/skills/ase-docs-distill/help.md +7 -0
  29. package/plugin/skills/ase-docs-proofread/help.md +7 -0
  30. package/plugin/skills/ase-help-intent/SKILL.md +66 -43
  31. package/plugin/skills/ase-help-intent/help.md +27 -16
  32. package/plugin/skills/ase-help-skill/catalog.md +3 -0
  33. package/plugin/skills/ase-help-skill/help.md +7 -0
  34. package/plugin/skills/ase-meta-brainstorm/help.md +8 -0
  35. package/plugin/skills/ase-meta-changelog/help.md +6 -0
  36. package/plugin/skills/ase-meta-chat/help.md +6 -0
  37. package/plugin/skills/ase-meta-commit/help.md +6 -0
  38. package/plugin/skills/ase-meta-compat/help.md +6 -0
  39. package/plugin/skills/ase-meta-config/help.md +7 -0
  40. package/plugin/skills/ase-meta-diaboli/help.md +7 -0
  41. package/plugin/skills/ase-meta-diff/help.md +7 -0
  42. package/plugin/skills/ase-meta-eli5/help.md +6 -0
  43. package/plugin/skills/ase-meta-evaluate/help.md +7 -0
  44. package/plugin/skills/ase-meta-proximity/help.md +7 -0
  45. package/plugin/skills/ase-meta-quorum/help.md +6 -0
  46. package/plugin/skills/ase-meta-quotes/help.md +7 -0
  47. package/plugin/skills/ase-meta-review/help.md +8 -1
  48. package/plugin/skills/ase-meta-search/help.md +6 -0
  49. package/plugin/skills/ase-meta-steelman/help.md +6 -0
  50. package/plugin/skills/ase-meta-why/help.md +7 -0
  51. package/plugin/skills/ase-meta-workflow/help.md +7 -0
  52. package/plugin/skills/ase-spec-edit/SKILL.md +520 -0
  53. package/plugin/skills/ase-spec-edit/help.md +137 -0
  54. package/plugin/skills/ase-sync-export/SKILL.md +66 -110
  55. package/plugin/skills/ase-sync-export/help.md +43 -40
  56. package/plugin/skills/ase-sync-import/SKILL.md +37 -15
  57. package/plugin/skills/ase-sync-import/help.md +21 -10
  58. package/plugin/skills/ase-sync-reconcile/SKILL.md +37 -16
  59. package/plugin/skills/ase-sync-reconcile/help.md +26 -16
  60. package/plugin/skills/ase-task-condense/help.md +6 -0
  61. package/plugin/skills/ase-task-delete/help.md +6 -0
  62. package/plugin/skills/ase-task-dissect/help.md +7 -0
  63. package/plugin/skills/ase-task-edit/help.md +7 -0
  64. package/plugin/skills/ase-task-grill/SKILL.md +5 -4
  65. package/plugin/skills/ase-task-grill/help.md +7 -0
  66. package/plugin/skills/ase-task-id/help.md +6 -0
  67. package/plugin/skills/ase-task-implement/help.md +7 -0
  68. package/plugin/skills/ase-task-list/help.md +6 -0
  69. package/plugin/skills/ase-task-preflight/help.md +7 -0
  70. package/plugin/skills/ase-task-reboot/help.md +6 -0
  71. package/plugin/skills/ase-task-rename/help.md +6 -0
  72. package/plugin/skills/ase-task-view/help.md +6 -0
  73. package/plugin/meta/ase-format-arch.md +0 -1164
@@ -6,7 +6,7 @@ The following are the **ASE Tenets** -- the guiding principles you
6
6
  *MUST* internalize when requested. They are organized into *Generic
7
7
  Tenets*, which always apply, and *Operation-Specific Tenets*, which
8
8
  apply only to a particular kind of operation (Crafting, Reconciling,
9
- Refactoring, Resolving).
9
+ Refactoring, Resolving, Specifying).
10
10
 
11
11
  GENERIC TENETS
12
12
  --------------
@@ -149,11 +149,11 @@ you *MUST* honor the following so-called **RECONCILIATION TENETS**:
149
149
  - **Level-Appropriate Translation**:
150
150
  Re-express source facts at the *target's* level of abstraction and
151
151
  altitude; do not copy verbatim across artifact levels. A SPEC states
152
- intent, an ARCH states structure, CODE states realization, DOCS
153
- states facts, etc. -- align the *meaning*, not the wording.
152
+ intent and structure, CODE states realization, DOCS states facts,
153
+ etc. -- align the *meaning*, not the wording.
154
154
 
155
155
  - **Format Conformance**:
156
- Keep every formatted target (SPEC, ARCH, TASK) conformant to its
156
+ Keep every formatted target (SPEC, TASK) conformant to its
157
157
  format contract (headings, structure, identifiers). Treat CODE,
158
158
  DOCS, INFR, and OTHR kinds of artifacts as foreign-defined, but not
159
159
  as free-form.
@@ -221,3 +221,62 @@ you *MUST* honor the following so-called **RESOLVING TENETS**:
221
221
  handled *near the origin*. Problems for *theoretical, fictive, or
222
222
  unexpected* errors *should* be handled more generally and in parent
223
223
  scopes.
224
+
225
+ SPECIFYING TENETS
226
+ -----------------
227
+
228
+ When *specifying* -- creating, revising, or editing the statements of a
229
+ specification artifact set -- you *MUST* honor the following so-called
230
+ **SPECIFYING TENETS**:
231
+
232
+ - **Intent over Realization**:
233
+ A specification, in its domain-specific and non-architecture related
234
+ aspects, states only the *WHAT* and the *WHY*, never the *HOW*.
235
+ Record intent, structure, constraints, and relationships here.
236
+ Implementation steps, algorithms, technologies, and code-level
237
+ details describe the *WHAT* and *HOW* and belong only into
238
+ the domain-unspecific and architecture-related aspects of the
239
+ specification.
240
+
241
+ - **Statement with Rationale**:
242
+ Every statement carries its *WHY* behind the `, BECAUSE ` clause in
243
+ a description. A statement without a rationale can neither be judged
244
+ nor revised, so never leave the rationale implicit and never restate
245
+ the statement as its own rationale.
246
+
247
+ - **Unambiguous and Verifiable**:
248
+ Every statement is precise enough that two readers derive the same
249
+ meaning and that its fulfillment is decidable. Replace vague
250
+ qualifiers ("fast", "user-friendly", "robust") with the concrete
251
+ property, threshold, or scenario actually meant.
252
+
253
+ - **Single Source of Truth**:
254
+ Every fact resides in exactly *one* object of the specification. Do
255
+ not restate a fact in a second place -- point at its owning object
256
+ with a `[[xxx]]` reference instead, so a later change has exactly
257
+ one place to land.
258
+
259
+ - **Atomic Statement**:
260
+ Every statement expresses exactly *one* fact with exactly *one*
261
+ rationale. Split a statement that joins independent facts with
262
+ "and"/"or" -- otherwise its fulfillment is only partially decidable
263
+ and its rationale covers more than it explains.
264
+
265
+ - **Schema Conformance**:
266
+ Every object stays conformant to the **SpecBook SCHEMA Model** of
267
+ the project: allowed kinds, allowed nesting, mandatory and optional
268
+ properties, and the configured value constraints. Never invent an
269
+ object kind or a property key the schema does not define.
270
+
271
+ - **Referential Integrity**:
272
+ Every `[[xxx]]` reference resolves to exactly one object. When an
273
+ object is renamed, moved, or removed, follow *all* references to it
274
+ through the entire specification corpus and adjust or remove them
275
+ in the same change set -- a dangling or ambiguous reference is a
276
+ defect.
277
+
278
+ - **No Fabrication**:
279
+ Never invent specification content the request does not warrant. If
280
+ the request is silent, ambiguous, or contradictory on something the
281
+ specification needs, surface the gap explicitly rather than papering
282
+ over it with a plausible guess.
@@ -6,7 +6,7 @@
6
6
  "homepage": "https://ase.tools",
7
7
  "repository": { "url": "git+https://github.com/rse/ase.git", "type": "git" },
8
8
  "bugs": { "url": "https://github.com/rse/ase/issues" },
9
- "version": "0.9.62",
9
+ "version": "0.9.64",
10
10
  "license": "Apache-2.0",
11
11
  "author": {
12
12
  "name": "Dr. Ralf S. Engelschall",
@@ -15,9 +15,10 @@
15
15
  },
16
16
  "devDependencies": {
17
17
  "@rse/stx": "1.1.6",
18
+ "@rse/specbook": "1.0.3",
18
19
  "markdownlint": "0.41.1",
19
20
  "markdownlint-cli2": "0.23.2",
20
- "eslint": "10.9.0",
21
+ "eslint": "10.9.1",
21
22
  "@eslint/markdown": "8.0.3",
22
23
  "eslint-markdown": "0.14.0"
23
24
  },
@@ -25,6 +26,9 @@
25
26
  "npm": ">=10.0.0",
26
27
  "node": ">=22.13.0"
27
28
  },
29
+ "allowScripts": {
30
+ "fsevents": true
31
+ },
28
32
  "scripts": {
29
33
  "start": "stx -v4 -l warning -c etc/stx.conf"
30
34
  }
@@ -40,6 +40,13 @@ covers the *entire* `ase-issue-*` space, including any prefixed results.
40
40
  A file, directory, or other reference to the source code that
41
41
  is to be analyzed architecturally.
42
42
 
43
+ ## SCENARIOS
44
+
45
+ - You want the software architecture of your code base reviewed
46
+ - You want coupling and cohesion problems between packages found
47
+ - You want an architecture diagram plus PROBLEM and TRADEOFF findings
48
+ - You want architecture findings persisted for later resolution
49
+
43
50
  ## EXAMPLES
44
51
 
45
52
  Analyze architecture of the current project:
@@ -57,6 +57,13 @@ demotes dependency-heavy components.
57
57
  A short description of the desired functionality the third-party
58
58
  component should provide.
59
59
 
60
+ ## SCENARIOS
61
+
62
+ - You want a third-party library or framework for a needed functionality
63
+ - You want a ranked survey of candidate components from NPM or Maven Central
64
+ - You want to know whether a package is healthy or stale and abandoned
65
+ - You want to decide between a dependency and hand-rolling a small feature
66
+
60
67
  ## EXAMPLES
61
68
 
62
69
  Discover components for JSON schema validation:
@@ -61,6 +61,14 @@ fixed via `ase-code-edit P<n>`.
61
61
  A file, directory, function, or other reference to the source code
62
62
  to analyze.
63
63
 
64
+ ## SCENARIOS
65
+
66
+ - You want your code checked for logic, semantics, and control-flow problems
67
+ - You want a read-only report of problems without any changes applied
68
+ - You want performance and efficiency opportunities surfaced
69
+ - You want a security-focused inspection of your code
70
+ - You want problems persisted as issue ids like `P1` for later resolving
71
+
64
72
  ## EXAMPLES
65
73
 
66
74
  Analyze a specific source file for logic/semantic problems:
@@ -89,6 +89,13 @@ entirely and applies the change set to the affected artifacts itself.
89
89
  a *task-id* followed by a colon to bind the resulting plan to
90
90
  a specific task id.
91
91
 
92
+ ## SCENARIOS
93
+
94
+ - You want to add a new feature to the code base
95
+ - You want feature approaches with pros and cons before any code changes
96
+ - You want a task plan composed for building something new
97
+ - You want a fast one-shot crafting without any plan ceremony
98
+
92
99
  ## EXAMPLES
93
100
 
94
101
  Craft a new logging feature:
@@ -89,6 +89,13 @@ cleanly and are then reported as failed; stage everything and use
89
89
  The worktree names are *not* argument-driven: they are always derived
90
90
  from the *current* project id and the per-part feature slug.
91
91
 
92
+ ## SCENARIOS
93
+
94
+ - You want a large uncommitted change set split into atomic parts
95
+ - You want each cohesive part of a diff in its own Git worktree
96
+ - You want mixed-up changes untangled before committing them
97
+ - You want a preview of how a change set would be divided
98
+
92
99
  ## EXAMPLES
93
100
 
94
101
  Dissect the current working copy changes:
@@ -189,9 +189,11 @@ empty <todo-what/> or <todo-how/> renders as `(none)`:
189
189
 
190
190
  2. DETERMINE QUESTIONS:
191
191
 
192
- Determine the questions, comprised of a globally-unique id
193
- <question-N-id/> of `Q<N/>`, and a very brief but precise
194
- question text <question-N-text/>. Each question is chosen to
192
+ Determine the questions, comprised of a round-local id
193
+ <question-N-id/> of `Q<N/>` -- where <N/> restarts at `1`
194
+ in *every* round, independent of the numbering of previous
195
+ rounds --, and a very brief but precise question text
196
+ <question-N-text/>. Each question is chosen to
195
197
  resolve the open points related to the above understanding
196
198
  of grilling, by focusing on the mentioned *Focus Areas*.
197
199
 
@@ -229,9 +231,10 @@ empty <todo-what/> or <todo-how/> renders as `(none)`:
229
231
  Finally, *sort* the questions by descending focus area
230
232
  order -- first all `DOMAIN`, then all `INTERFACE`, then all
231
233
  `ARCHITECTURE`, and then all `IMPLEMENTATION` ones -- and
232
- renumber <N/> according to this order. Truncate the list
233
- after a maximum of 10 questions and set <n/> to the number
234
- of remaining questions. Do not output anything.
234
+ renumber <N/> according to this order, starting at `1`.
235
+ Truncate the list after a maximum of 10 questions and set
236
+ <n/> to the number of remaining questions. Do not output
237
+ anything.
235
238
 
236
239
  Finally, assemble the <question-N/> out of
237
240
  `**<question-N-id/>** ▶ **<context-N-id/>** ▷
@@ -241,8 +244,10 @@ empty <todo-what/> or <todo-how/> renders as `(none)`:
241
244
 
242
245
  For all remaining <question-N/>, check the code base and
243
246
  your world knowledge to find *two to three* grounded answer
244
- alternatives <answer-N-K/> with an id <answer-N-K-id/>
245
- of `A<K/>`, a 1-3 word label <answer-N-K-label/>, and
247
+ alternatives <answer-N-K/> with a question-local id
248
+ <answer-N-K-id/> of `A<K/>` -- where <K/> restarts at `1`
249
+ for *every* question, independent of the numbering of other
250
+ questions --, a 1-3 word label <answer-N-K-label/>, and
246
251
  an ultra brief description <answer-N-K-description/> of
247
252
  at most *10 words*. For the answer which reflects the
248
253
  current <todo-what/>/<todo-how/> understanding, append
@@ -304,7 +309,7 @@ empty <todo-what/> or <todo-how/> renders as `(none)`:
304
309
  | [...] | [...] |
305
310
 
306
311
  Legend: **DOM**: Domain (MUST), **IFC**: Interface (MUST), **ARC**: Architecture (SHOULD), **IMP**: Implementation (MAY)
307
- **Qn**: global question id, **An**: question-local answer id, ⚑: current decision state
312
+ **Qn**: round-local question id, **An**: question-local answer id, ⚑: current decision state
308
313
  </template>
309
314
 
310
315
  2. Show a custom dialog. Its only answer options are the
@@ -101,6 +101,13 @@ implementation until it passes). The *querying* state and every
101
101
  for the query via an interactive `Edit Query` dialog, carrying the
102
102
  fixed `STOP SKILL` option plus free-text input.
103
103
 
104
+ ## SCENARIOS
105
+
106
+ - You want the code base edited in one shot from a plain description
107
+ - You want an analyzer issue like `P1` fixed directly without a plan
108
+ - You want a quick change with optional grilling and verification
109
+ - You want several edits chained in a loop, optionally in a worktree
110
+
104
111
  ## EXAMPLES
105
112
 
106
113
  Edit in one shot, without any questions or verification:
@@ -24,6 +24,13 @@ notice), and *GOTCHAS* (what to not stumble over).
24
24
  A file, directory, function, or other reference to the source code
25
25
  to explain.
26
26
 
27
+ ## SCENARIOS
28
+
29
+ - You want to understand how a piece of code works
30
+ - You want an explanation with WHAT, WHY, analogy, and diagram
31
+ - You want the cruxes and gotchas of unfamiliar code pointed out
32
+ - You want a quick orientation before touching foreign code
33
+
27
34
  ## EXAMPLES
28
35
 
29
36
  Explain a single source file:
@@ -24,6 +24,13 @@ a *MODULE STRUCTURE* Mermaid diagram of modules and their imports.
24
24
  One or more file or directory references to source code that
25
25
  should be inspected for insights.
26
26
 
27
+ ## SCENARIOS
28
+
29
+ - You want a high-level overview of a project
30
+ - You want to know who wrote the project and which files churn most
31
+ - You want a module structure diagram of the imports
32
+ - You want to get familiar with an unknown code base quickly
33
+
27
34
  ## EXAMPLES
28
35
 
29
36
  Get insights into the current project:
@@ -81,6 +81,14 @@ the code, and comments contradicting the code.
81
81
  *source-reference*:
82
82
  A file, directory, or other reference to the source code to lint.
83
83
 
84
+ ## SCENARIOS
85
+
86
+ - You want your code checked for code quality problems
87
+ - You want corrections proposed which you accept or reject one by one
88
+ - You want all quality corrections applied automatically
89
+ - You want only specific quality aspects like formatting or spelling checked
90
+ - You want missing or excessive code documentation flagged
91
+
84
92
  ## EXAMPLES
85
93
 
86
94
  Lint a source file interactively:
@@ -82,6 +82,13 @@ entirely and applies the change set to the affected artifacts itself.
82
82
  with a *task-id* followed by a colon to bind the resulting plan
83
83
  to a specific task id.
84
84
 
85
+ ## SCENARIOS
86
+
87
+ - You want existing code restructured without changing its behavior
88
+ - You want refactoring approaches with pros and cons before any changes
89
+ - You want a task plan composed for a cleanup
90
+ - You want a one-shot refactoring applied directly in place
91
+
85
92
  ## EXAMPLES
86
93
 
87
94
  Refactor a module into smaller files:
@@ -88,6 +88,13 @@ entirely and applies the change set to the affected artifacts itself.
88
88
  skill. Optionally prefixed with a *task-id* followed by a colon
89
89
  to bind the resulting plan to a specific task id.
90
90
 
91
+ ## SCENARIOS
92
+
93
+ - You want a bug fixed or a problem resolved in the code
94
+ - You want an issue like `P1` reported by an analyzer resolved
95
+ - You want resolution approaches with pros and cons before any changes
96
+ - You want a task plan composed for a bugfix
97
+
91
98
  ## EXAMPLES
92
99
 
93
100
  Resolve a free-text problem:
@@ -52,6 +52,13 @@ non-numeric value falls back to the default *5*.
52
52
  *text* itself pasted inline. If it resolves to a readable file the
53
53
  file is read; otherwise it is treated verbatim as pasted text.
54
54
 
55
+ ## SCENARIOS
56
+
57
+ - You want the key points of a document extracted and ranked
58
+ - You want the essence of a long text without reading all of it
59
+ - You want each key point backed by verbatim, line-cited evidence
60
+ - You want a pasted text or file boiled down to what matters
61
+
55
62
  ## EXAMPLES
56
63
 
57
64
  Distill the key points of a document file:
@@ -36,6 +36,13 @@ hint, which re-proposes the correction without limit) or - with
36
36
  A file, directory, or other reference to the documents to
37
37
  proofread.
38
38
 
39
+ ## SCENARIOS
40
+
41
+ - You want documents checked for spelling, punctuation, and grammar
42
+ - You want corrections proposed which you accept or reject one by one
43
+ - You want a whole documentation directory corrected automatically
44
+ - You want a final language pass over a text before publishing
45
+
39
46
  ## EXAMPLES
40
47
 
41
48
  Proofread a single document interactively:
@@ -3,11 +3,12 @@ name: ase-help-intent
3
3
  argument-hint: "[--help|-h] <intent>"
4
4
  description: >
5
5
  Match a free-text intent against the accumulated help of all ASE
6
- skills, generate the single best-fitting `/ase:ase-xxx-xxx` command
7
- with concrete options and arguments, and let the user execute it,
8
- refine the intent, or cancel. Use when the user knows what they want
9
- but not which skill or flags realize it, or mentions "intent" or
10
- requests "help".
6
+ skills, generate all adequately fitting `/ase:ase-xxx-xxx` commands
7
+ -- ranked best-fitting first, each with concrete options and
8
+ arguments -- and let the user execute one of them, refine the
9
+ intent, or cancel. Use when the user knows what they want but not
10
+ which skill or flags realize it, or mentions "intent" or requests
11
+ "help".
11
12
  user-invocable: true
12
13
  disable-model-invocation: false
13
14
  effort: high
@@ -21,7 +22,7 @@ allowed-tools:
21
22
  @${CLAUDE_SKILL_DIR}/../../meta/ase-getopt.md
22
23
 
23
24
  <purpose name="ase-help-intent">
24
- Match an Intent to an ASE Command
25
+ Match an Intent to ASE Commands
25
26
  </purpose>
26
27
 
27
28
  <expand name="getopt"
@@ -32,8 +33,8 @@ Match an Intent to an ASE Command
32
33
 
33
34
  <objective>
34
35
  *Match* the following free-text intent against the accumulated help of
35
- all ASE skills and *generate* the single best-fitting `/ase:ase-xxx-xxx`
36
- command that realizes it:
36
+ all ASE skills and *generate* every adequately fitting `/ase:ase-xxx-xxx`
37
+ command that realizes it, ranked best-fitting first:
37
38
  <intent><getopt-arguments/></intent>
38
39
  </objective>
39
40
 
@@ -63,32 +64,43 @@ catalog you match <intent/> against:
63
64
  2. <step id="STEP 2: Match Intent and Dialog">
64
65
 
65
66
  *REPEAT* the following sub-steps in a *LOOP* until the user either
66
- *executes* the generated command or *cancels* the dialog in sub-step 4:
67
+ *executes* one of the generated commands or *cancels* the dialog in
68
+ sub-step 4:
67
69
 
68
70
  1. *Match Intent*:
69
71
 
70
- Match the current <intent/> against the <corpus/> and select the
71
- *single* best-fitting skill. From that skill's `## SYNOPSIS`,
72
- `## OPTIONS`, and `## ARGUMENTS` sections in <corpus/>,
73
- *generate* a concrete command that realizes <intent/>:
74
-
75
- - Set <name/> to the selected skill's name (e.g. `ase-code-lint`).
76
- - Set <arguments/> to the concrete option flags and positional
77
- arguments -- derived from the skill's `## OPTIONS` and
78
- `## ARGUMENTS` -- that best realize <intent/> (may be empty).
79
- - Set <command>/ase:<name/> <arguments/></command> (the full
80
- command line, with surplus inner spaces collapsed).
81
- - Set <rationale/> to a *very brief*, single-sentence
82
- justification of why the selected skill and its options match
72
+ Match the current <intent/> against the <corpus/> and select
73
+ *every* skill that adequately fits it -- judging the fit
74
+ primarily by each skill's `## SCENARIOS` ("You want ...") and
75
+ `## DESCRIPTION` sections. Order the selected skills from
76
+ best-fitting to worst-fitting and keep at most the *8* best
77
+ ones, so the dispatch dialog of sub-step 4 stays addressable.
78
+ Set <count/> to the number of kept skills. Then, for each kept
79
+ skill <n/> (numbered `1` to <count/> in rank order), from that
80
+ skill's `## SYNOPSIS`, `## OPTIONS`, and `## ARGUMENTS`
81
+ sections in <corpus/>, *generate* a concrete command that
82
+ realizes <intent/>:
83
+
84
+ - Set <name<n/>/> to the skill's name (e.g. `ase-code-lint`).
85
+ - Set <arguments<n/>/> to the concrete option flags and
86
+ positional arguments -- derived from the skill's
87
+ `## OPTIONS` and `## ARGUMENTS` -- that best realize
88
+ <intent/> (may be empty).
89
+ - Set <command<n/>>/ase:<name<n/>/> <arguments<n/>/></command<n/>>
90
+ (the full command line, with surplus inner spaces collapsed).
91
+ - Set <rationale<n/>/> to a *very brief*, single-sentence
92
+ justification of why this skill and its options match
83
93
  <intent/>.
84
- - Set <matched>yes</matched>.
94
+
95
+ Finally set <matched>yes</matched>.
85
96
 
86
97
  2. *Guard No Match*:
87
98
 
88
99
  <if condition="no skill in <corpus/> adequately matches <intent/>">
89
100
  Set <matched>no</matched> and discard the inadequate selection of
90
- sub-step 1 by setting <name></name>, <arguments></arguments>, and
91
- <command></command> (all set to empty), so that no stale command
101
+ sub-step 1 by setting <count>0</count> and clearing all
102
+ <name<n/>/>, <arguments<n/>/>, and <command<n/>/> placeholders
103
+ (all set to empty), so that no stale command
92
104
  can survive into the dialog of sub-step 4. Then output the
93
105
  following <template/> and *continue* the *loop* at sub-step 4 to
94
106
  prompt the user for a refined or clearer intent via the dialog's
@@ -99,18 +111,22 @@ catalog you match <intent/> against:
99
111
  </template>
100
112
  </if>
101
113
 
102
- 3. *Render Command*:
114
+ 3. *Render Commands*:
103
115
 
104
- Output the generated command with the following <template/>:
116
+ Output the generated commands, in rank order, with the following
117
+ <template/>, where the `[...]` marks the repetition of the
118
+ command/rationale line pair for each kept skill <n/> from `1`
119
+ to <count/>:
105
120
 
106
121
  <template>
107
- <ase-tpl-head title="SKILL COMMAND PROPOSAL"/>
122
+ <ase-tpl-head title="SKILL COMMAND PROPOSALS"/>
108
123
 
109
- ❯ `<command/>`
124
+ **C<n/>** ❯ `<command<n/>/>`
125
+ ▷ *<rationale<n/>/>*
110
126
 
111
- <ase-tpl-foot title="SKILL COMMAND PROPOSAL"/>
127
+ [...]
112
128
 
113
- **RATIONALE**: <rationale/>
129
+ <ase-tpl-foot title="SKILL COMMAND PROPOSALS"/>
114
130
  </template>
115
131
 
116
132
  4. *Dispatch Command*:
@@ -123,9 +139,9 @@ catalog you match <intent/> against:
123
139
  Let the user decide how to proceed by raising a question with the
124
140
  following custom dialog (invoked with `--other`, so that any
125
141
  free-text instruction is accepted as an intent refinement). Which
126
- dialog is raised depends on <matched/>, so that `EXECUTE` is
127
- offered *only* when a command was actually generated in sub-step 1
128
- *and* rendered in sub-step 3:
142
+ dialog is raised depends on <matched/>, so that the `C<n/>`
143
+ command options are offered *only* when commands were actually
144
+ generated in sub-step 1 *and* rendered in sub-step 3:
129
145
 
130
146
  <if condition="<matched/> is `no`">
131
147
  <expand name="custom-dialog" arg1="--other">
@@ -136,10 +152,16 @@ catalog you match <intent/> against:
136
152
  </if>
137
153
  <else>
138
154
  <expand name="custom-dialog" arg1="--other">
139
- Dispatch: What would you like to do with the generated command?
140
- EXECUTE: Execute the generated command now.
141
- CANCEL: Cancel this dialog.
155
+ Dispatch: Which of the proposed commands would you like to execute?
156
+ C1: Execute: `<command1/>`
157
+ [...]
158
+ CANCEL: Cancel this dialog.
142
159
  </expand>
160
+
161
+ The `[...]` line stands for one further answer line
162
+ `C<n/>: Execute `<command<n/>/>` now.` per additionally kept
163
+ skill <n/> from `2` to <count/>, in rank order, so the dialog
164
+ offers exactly <count/> command options plus `CANCEL`.
143
165
  </else>
144
166
 
145
167
  Check the tool <result/> and dispatch accordingly:
@@ -148,7 +170,7 @@ catalog you match <intent/> against:
148
170
  *Break* out of the *loop* and stop processing without any
149
171
  further output.
150
172
 
151
- - If <result/> is `REFINE`, or <result/> is `EXECUTE` while
173
+ - If <result/> is `REFINE`, or <result/> matches `C<n/>` while
152
174
  <matched/> is `no`: do *not* execute anything -- output the
153
175
  following <template/> and *continue* the *loop* at sub-step 4
154
176
  to obtain a refined intent via the dialog's free-text channel:
@@ -157,13 +179,14 @@ catalog you match <intent/> against:
157
179
  <ase-tpl-bullet-secondary/> **HINT**: please enter a refined or clearer intent as free text.
158
180
  </template>
159
181
 
160
- - If <result/> is `EXECUTE` (which implies <matched/> is `yes`):
161
- *Break* out of the *loop*, output the following <template/>,
162
- and then call the tool `Skill(skill: "ase:<name/>", args:
163
- "<arguments/>")` to *execute* the generated command:
182
+ - If <result/> matches `C<n/>` (which implies <matched/> is
183
+ `yes`): *Break* out of the *loop*, output the following
184
+ <template/>, and then call the tool `Skill(skill:
185
+ "ase:<name<n/>/>", args: "<arguments<n/>/>")` to *execute*
186
+ the selected command:
164
187
 
165
188
  <template>
166
- ⧉ **ASE**: ◉ intent: **<intent/>**, ⌘ command: **<command/>**, ▶ status: **command executing**
189
+ ⧉ **ASE**: ◉ intent: **<intent/>**, ⌘ command: **<command<n/>/>**, ▶ status: **command executing**
167
190
  </template>
168
191
 
169
192
  - If <result/> matches `OTHER: <text/>`:
@@ -1,7 +1,7 @@
1
1
 
2
2
  ## NAME
3
3
 
4
- `ase-help-intent` - Match an Intent to an ASE Command
4
+ `ase-help-intent` - Match an Intent to ASE Commands
5
5
 
6
6
  ## SYNOPSIS
7
7
 
@@ -14,18 +14,22 @@
14
14
  The `ase-help-intent` skill matches a free-text *intent* against the
15
15
  *accumulated help* of all ASE skills -- the concatenation of every
16
16
  skill's `help.md` file into `skills/ase-help-intent/data.md`, built by
17
- `npm start build` in `plugin/` -- and generates the *single* best-fitting
18
- `/ase:ase-xxx-xxx` command that realizes the intent, complete with
19
- concrete option flags and positional arguments derived from the selected
20
- skill's `SYNOPSIS`, `OPTIONS`, and `ARGUMENTS`.
21
-
22
- The generated command is presented together with a brief rationale in an
23
- interactive dialog. The dialog lets the user *execute* the command (which
24
- dispatches the target skill via its generated arguments), *cancel* the
25
- operation, or *refine* the intent by typing any free-text instruction --
26
- the instruction is folded into the intent and the best-fitting command is
27
- re-matched and re-rendered. If no skill confidently matches the intent, a
28
- warning is emitted and the user is prompted to refine or clarify it.
17
+ `npm start build` in `plugin/` -- and generates *all* adequately fitting
18
+ `/ase:ase-xxx-xxx` commands that realize the intent, ranked best-fitting
19
+ first and limited to the eight best ones. The fit is judged primarily
20
+ against each skill's `SCENARIOS` ("You want ...") and `DESCRIPTION`
21
+ sections, and each command is complete with concrete option flags and
22
+ positional arguments derived from the skill's `SYNOPSIS`, `OPTIONS`,
23
+ and `ARGUMENTS`.
24
+
25
+ The generated commands are presented together with a brief per-command
26
+ rationale in an interactive dialog. The dialog lets the user *execute*
27
+ one of the commands `C1`...`C8` (which dispatches the target skill via
28
+ its generated arguments), *cancel* the operation, or *refine* the intent
29
+ by typing any free-text instruction -- the instruction is folded into
30
+ the intent and the fitting commands are re-matched and re-rendered. If
31
+ no skill confidently matches the intent, a warning is emitted and the
32
+ user is prompted to refine or clarify it.
29
33
 
30
34
  The skill exposes *no* option flags beyond `--help`/`-h`; it is driven
31
35
  entirely through the intent argument and the interactive dialog.
@@ -34,18 +38,25 @@ entirely through the intent argument and the interactive dialog.
34
38
 
35
39
  *intent*:
36
40
  The free-text intent to be realized. It describes *what* the user
37
- wants to achieve; the skill determines *which* ASE skill and *which*
41
+ wants to achieve; the skill determines *which* ASE skills and *which*
38
42
  options and arguments realize it.
39
43
 
44
+ ## SCENARIOS
45
+
46
+ - You want to know which ASE skills realize what you have in mind
47
+ - You want free text turned into concrete slash commands with options
48
+ - You want all matching commands proposed, ranked best-fitting first
49
+ - You want to refine an intent in a dialog until a command fits
50
+
40
51
  ## EXAMPLES
41
52
 
42
- Route an intent to the matching command and pick from the dialog:
53
+ Route an intent to the matching commands and pick one from the dialog:
43
54
 
44
55
  ```text
45
56
  ❯ /ase-help-intent lint the TypeScript sources for high-severity issues only
46
57
  ```
47
58
 
48
- Route a planning intent to the matching command:
59
+ Route a planning intent to the matching commands:
49
60
 
50
61
  ```text
51
62
  ❯ /ase-help-intent explain how the authentication module works
@@ -20,6 +20,9 @@
20
20
  ○ `ase-arch-analyze`: Review Software Architecture
21
21
  ○ `ase-arch-discover`: Discover Components
22
22
 
23
+ ⎈ **SPECIFICATION**
24
+ ○ `ase-spec-edit`: Edit Specification
25
+
23
26
  ⎈ **CODING**
24
27
  ○ `ase-code-analyze`: Analyze Source Code
25
28
  ○ `ase-code-lint`: Lint Source Code