@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.
Files changed (34) hide show
  1. package/package.json +1 -1
  2. package/plugin/.claude-plugin/plugin.json +1 -1
  3. package/plugin/.github/plugin/plugin.json +1 -1
  4. package/plugin/package.json +1 -1
  5. package/plugin/skills/ase-arch-analyze/SKILL.md +1 -1
  6. package/plugin/skills/ase-arch-discover/SKILL.md +17 -9
  7. package/plugin/skills/ase-arch-discover/help.md +14 -0
  8. package/plugin/skills/ase-code-analyze/SKILL.md +162 -18
  9. package/plugin/skills/ase-code-analyze/help.md +47 -7
  10. package/plugin/skills/ase-code-craft/SKILL.md +1 -1
  11. package/plugin/skills/ase-code-insight/SKILL.md +1 -1
  12. package/plugin/skills/ase-code-lint/SKILL.md +11 -3
  13. package/plugin/skills/ase-code-lint/help.md +13 -0
  14. package/plugin/skills/ase-code-refactor/SKILL.md +1 -1
  15. package/plugin/skills/ase-code-resolve/SKILL.md +2 -2
  16. package/plugin/skills/ase-docs-distill/SKILL.md +1 -1
  17. package/plugin/skills/ase-docs-proofread/SKILL.md +1 -1
  18. package/plugin/skills/ase-meta-brainstorm/SKILL.md +30 -21
  19. package/plugin/skills/ase-meta-brainstorm/help.md +49 -9
  20. package/plugin/skills/ase-meta-chat/SKILL.md +1 -1
  21. package/plugin/skills/ase-meta-diaboli/SKILL.md +33 -10
  22. package/plugin/skills/ase-meta-diaboli/help.md +20 -2
  23. package/plugin/skills/ase-meta-diff/SKILL.md +1 -1
  24. package/plugin/skills/ase-meta-quorum/SKILL.md +37 -5
  25. package/plugin/skills/ase-meta-quorum/help.md +18 -0
  26. package/plugin/skills/ase-meta-review/SKILL.md +21 -3
  27. package/plugin/skills/ase-meta-review/help.md +20 -2
  28. package/plugin/skills/ase-meta-search/SKILL.md +35 -6
  29. package/plugin/skills/ase-meta-search/help.md +14 -2
  30. package/plugin/skills/ase-meta-steelman/SKILL.md +62 -11
  31. package/plugin/skills/ase-meta-steelman/help.md +34 -2
  32. package/plugin/skills/ase-meta-why/SKILL.md +122 -17
  33. package/plugin/skills/ase-meta-why/help.md +46 -5
  34. package/plugin/skills/ase-task-grill/SKILL.md +1 -1
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ase-meta-search
3
- argument-hint: "[--help|-h] <query>"
3
+ argument-hint: "[--help|-h] [--services|-s=(all|perplexity|brave|exa|websearch)...] <query>"
4
4
  description: >
5
5
  Search the Internet/Web with a query.
6
6
  Prefer this skill before using Perplexity, Brave and WebSearch.
@@ -17,14 +17,21 @@ allowed-tools:
17
17
 
18
18
  @${CLAUDE_SKILL_DIR}/../../meta/ase-control.md
19
19
  @${CLAUDE_SKILL_DIR}/../../meta/ase-skill.md
20
+ @${CLAUDE_SKILL_DIR}/../../meta/ase-getopt.md
20
21
 
21
22
  <skill name="ase-meta-search">
22
23
  Search the Internet/Web
23
24
  </skill>
24
25
 
26
+ <expand name="getopt"
27
+ arg1="ase-meta-search"
28
+ arg2="--services|-s=(all|perplexity|brave|exa|websearch)...">
29
+ $ARGUMENTS
30
+ </expand>
31
+
25
32
  <objective>
26
33
  Your objective is to *search* the *Internet*/*Web* for the following query:
27
- <query>$ARGUMENTS</query>
34
+ <query><getopt-arguments/></query>
28
35
  </objective>
29
36
 
30
37
  <flow>
@@ -34,7 +41,7 @@ Your objective is to *search* the *Internet*/*Web* for the following query:
34
41
  <define name="agent">
35
42
  ```text
36
43
  Agent(
37
- name: "ase:ase-meta-search",
44
+ name: "ase-meta-search",
38
45
  description: "Query Web Search Service",
39
46
  subagent_type: "ase:ase-meta-search",
40
47
  prompt: <content/>
@@ -42,24 +49,46 @@ Your objective is to *search* the *Internet*/*Web* for the following query:
42
49
  ```
43
50
  </define>
44
51
 
45
- If the MCP tool `perplexity_search` from the MCP server `search-perplexity` is available:
52
+ Treat <getopt-option-services/> as a comma-separated list of
53
+ *backend tokens*. The getopt parser validates only the *first*
54
+ token, so you *MUST* validate each remaining token yourself against
55
+ the allowed set `all`, `perplexity`, `brave`, `exa`, `websearch`. If
56
+ any token is *not* in this set, only output the following <template/>
57
+ and then immediately *STOP* processing the entire current skill:
58
+
59
+ <template>
60
+ ⧉ **ASE**: ✪ skill: **ase-meta-search**, ▶ ERROR: invalid `--services` token: **<token/>**
61
+ </template>
62
+
63
+ A backend is *selected* if `all` is in <getopt-option-services/> *OR*
64
+ that backend's own name is in <getopt-option-services/>.
65
+
66
+ If the `perplexity` backend is *selected* and the MCP tool
67
+ `perplexity_search` from the MCP server `search-perplexity` is available:
68
+
46
69
  <expand name="agent">
47
70
  Call the MCP tool `perplexity_search(query: "<query/>")`
48
71
  from the MCP server `search-perplexity`.
49
72
  </expand>
50
73
 
51
- If the MCP tool `brave_web_search` from the MCP server `search-brave` is available:
74
+ If the `brave` backend is *selected* and the MCP tool
75
+ `brave_web_search` from the MCP server `search-brave` is available:
76
+
52
77
  <expand name="agent">
53
78
  Call the MCP tool `brave_web_search(query: "<query/>")`
54
79
  from the MCP server `search-brave`.
55
80
  </expand>
56
81
 
57
- If the MCP tool `web_search_exa` from the MCP server `search-exa` is available:
82
+ If the `exa` backend is *selected* and the MCP tool
83
+ `web_search_exa` from the MCP server `search-exa` is available:
84
+
58
85
  <expand name="agent">
59
86
  Call the MCP tool `web_search_exa(query: "<query/>")`
60
87
  from the MCP server `search-exa`.
61
88
  </expand>
62
89
 
90
+ If the `websearch` backend is *selected*:
91
+
63
92
  <expand name="agent">
64
93
  Call the tool `WebSearch(query: "<query/>")`.
65
94
  </expand>
@@ -7,12 +7,13 @@
7
7
 
8
8
  `ase-meta-search`
9
9
  [`--help`|`-h`]
10
+ [`--services`|`-s`=(`all`|`perplexity`|`brave`|`exa`|`websearch`)...]
10
11
  *query*
11
12
 
12
13
  ## DESCRIPTION
13
14
 
14
15
  The `ase-meta-search` skill searches the *Internet*/*Web* for the
15
- given *query*. It dispatches the query in parallel to all available
16
+ given *query*. It dispatches the query in parallel to the *selected*
16
17
  search services (Perplexity, Brave, Exa, and Claude's built-in
17
18
  `WebSearch`) via the `ase:ase-meta-search` sub-agent and consolidates
18
19
  all responses into a single answer without removing original
@@ -23,17 +24,28 @@ Brave, or `WebSearch` individually.
23
24
 
24
25
  ## ARGUMENTS
25
26
 
27
+ `--services`|`-s`=(`all`|`perplexity`|`brave`|`exa`|`websearch`)...:
28
+ The comma-separated list of search backends to query. The default
29
+ `all` queries every available backend (the original behavior);
30
+ otherwise only the listed backends are queried.
31
+
26
32
  *query*:
27
33
  The search query to dispatch to the search services.
28
34
 
29
35
  ## EXAMPLES
30
36
 
31
- Search the Web for a topic:
37
+ Search the Web for a topic across all backends:
32
38
 
33
39
  ```text
34
40
  ❯ /ase-meta-search latest stable release of TypeScript and release notes
35
41
  ```
36
42
 
43
+ Search the Web using only the Brave and Exa backends:
44
+
45
+ ```text
46
+ ❯ /ase-meta-search --services=brave,exa latest stable release of TypeScript
47
+ ```
48
+
37
49
  ## SEE ALSO
38
50
 
39
51
  `ase-meta-chat`, `ase-meta-quorum`, `ase-arch-discover`.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ase-meta-steelman
3
- argument-hint: "[--help|-h] <thesis>"
3
+ argument-hint: "[--help|-h] [--count|-c <count>] [--rounds|-r <rounds>] <thesis>"
4
4
  description: >
5
5
  Build the strongest possible case for a thesis by playing
6
6
  "Steelman" (Latin spirit: "Advocatus Dei"). Use when the user
@@ -12,25 +12,57 @@ effort: xhigh
12
12
 
13
13
  @${CLAUDE_SKILL_DIR}/../../meta/ase-control.md
14
14
  @${CLAUDE_SKILL_DIR}/../../meta/ase-skill.md
15
+ @${CLAUDE_SKILL_DIR}/../../meta/ase-getopt.md
15
16
 
16
17
  <skill name="ase-meta-steelman">
17
18
  Build the "Steelman" Argument
18
19
  </skill>
19
20
 
21
+ <expand name="getopt"
22
+ arg1="ase-meta-steelman"
23
+ arg2="--count|-c=10 --rounds|-r=1">
24
+ $ARGUMENTS
25
+ </expand>
26
+
20
27
  <objective>
21
28
  Build the "Steelman" argument by constructing the strongest
22
- possible case for the thesis: <thesis>$ARGUMENTS</thesis>
29
+ possible case for the thesis: <thesis><getopt-arguments/></thesis>
23
30
  </objective>
24
31
 
25
- 1. **Repeat Thesis**:
32
+ Determine the number of *rounds* to perform: set <rounds/> to
33
+ <getopt-option-rounds/>; if <getopt-option-rounds/> is *non-numeric* or
34
+ *less than or equal to 0*, use the default *1* instead.
35
+
36
+ Determine the minimum number of *pro-theses* to surface: set <count/>
37
+ to <getopt-option-count/>; if <getopt-option-count/> is *non-numeric* or
38
+ *less than or equal to 0*, use the default *10* instead.
39
+
40
+ <flow>
41
+
42
+ 1. <step id="STEP 1: Restate Thesis">
43
+
44
+ Begin a *round* of fortification and consolidating reasoning. On
45
+ the first visit, set <i>1</i> (set round counter to one); on each
46
+ subsequent visit (via the jump back in the last step), <i/> has
47
+ already been incremented.
48
+
49
+ <if condition="<rounds/> is greater than 1">
50
+ Indicate the current round with the following <template/>:
51
+
52
+ <template>
53
+ <ase-tpl-bullet-secondary/> **ROUND**: <i/>/<rounds/>
54
+ </template>
55
+ </if>
26
56
 
27
57
  Output the thesis with the following <template/>:
28
58
 
29
59
  <template>
30
- <ase-tpl-bullet-secondary/> **THESIS**: <thesis/>
60
+ <ase-tpl-bullet-normal/> **THESIS**: <thesis/>
31
61
  </template>
32
62
 
33
- 2. **Determine Pro-Theses**:
63
+ </step>
64
+
65
+ 2. <step id="STEP 2: Determine Pro-Theses">
34
66
 
35
67
  Reason on the thesis in <thesis/> by playing *Steelman* (Latin
36
68
  spirit: "Advocatus Dei") - building the strongest possible case
@@ -108,11 +140,11 @@ effort: xhigh
108
140
  For each Pro-Thesis or Supporting-Argument rank it on a Likert
109
141
  scale of 0 (weak) to 10 (strong). Repeat the process of finding
110
142
  more Pro-Theses or Supporting-Arguments until you EITHER have found
111
- at least 10 Pro-Theses or Supporting-Arguments with at least a rank
112
- of 7 OR you have already checked a total of 50 Pro-Theses or
113
- Supporting-Arguments.
143
+ at least <count/> Pro-Theses or Supporting-Arguments with at least a
144
+ rank of 7 OR you have already checked a total of <count/> x 5
145
+ Pro-Theses or Supporting-Arguments.
114
146
 
115
- Then, for the top-10 highest-ranked Pro-Theses or
147
+ Then, for the top-<count/> highest-ranked Pro-Theses or
116
148
  Supporting-Arguments, sort them by their rank from highest to lowest,
117
149
  store each in <prothesis-N/> with the format `**<aspect-N/>**
118
150
  (rank: <rank-N/>/10): <statement-N/>` (where <aspect-N/> is a short
@@ -124,8 +156,9 @@ effort: xhigh
124
156
  <template>
125
157
  <ase-tpl-bullet-signal/> **PRO-THESIS**: <prothesis-N/>
126
158
  </template>
159
+ </step>
127
160
 
128
- 3. **Consolidating Reasoning**:
161
+ 3. <step id="STEP 3: Consolidating Reasoning">
129
162
 
130
163
  Following the consolidation of...
131
164
 
@@ -149,7 +182,7 @@ effort: xhigh
149
182
  while honestly bounding where it holds. The fortification reinforces
150
183
  the position by sharpening it.
151
184
 
152
- ...finally derive a strong single-sentence (not more than 40 words)
185
+ ...then derive a strong single-sentence (not more than 40 words)
153
186
  fortification of the <thesis/> and all found <prothesis-N/> - the
154
187
  strongest defensible form of the thesis - store it in <fortification/>,
155
188
  and then finally output the following <template/>:
@@ -157,3 +190,21 @@ effort: xhigh
157
190
  <template>
158
191
  <ase-tpl-bullet-normal/> **FORTIFICATION**: <fortification/>
159
192
  </template>
193
+
194
+ Finally, decide whether to perform a further round:
195
+
196
+ <if condition="<i/> is less than <rounds/>">
197
+ Carry the result forward to the next round: set
198
+ <thesis><fortification/></thesis> (the fortification becomes the
199
+ thesis to be strengthened next), set <i/> to <i/> + 1 (increment the
200
+ round counter), and then *CONTINUE* the *LOOP* at **STEP 1**!
201
+ </if>
202
+
203
+ <if condition="<i/> is greater than or equal to <rounds/>">
204
+ All <rounds/> rounds are complete; *STOP* the loop here.
205
+ Do not output any further explanations.
206
+ </if>
207
+
208
+ </step>
209
+
210
+ </flow>
@@ -7,6 +7,8 @@
7
7
 
8
8
  `ase-meta-steelman`
9
9
  [`--help`|`-h`]
10
+ [`--count`|`-c` *count*]
11
+ [`--rounds`|`-r` *rounds*]
10
12
  *thesis*
11
13
 
12
14
  ## DESCRIPTION
@@ -21,20 +23,44 @@ surfacing the upside, and pre-parade thinking - while crediting the
21
23
  claim rather than the proponent's authority and conceding where the
22
24
  thesis genuinely falls short.
23
25
 
24
- The skill iterates until it has found at least ten pro-theses
26
+ The skill iterates until it has found at least *count* pro-theses
25
27
  (supporting arguments) each ranked at least 7 on a 0 (weak) to 10
26
- (strong) Likert scale, reports the top ten sorted from strongest to
28
+ (strong) Likert scale, reports the top *count* sorted from strongest to
27
29
  weakest, and finally consolidates them (*Thesis* + *Pro-Theses* →
28
30
  *Fortification*) to derive a single-sentence *FORTIFICATION* that
29
31
  consolidates everything genuinely strengthening the thesis while
30
32
  honestly bounding where it holds.
31
33
 
34
+ The `--rounds`/`-r` *rounds* option turns the single defense pass into an
35
+ *iterative chain* of *rounds* rounds (default *1*): each round's
36
+ *FORTIFICATION* becomes the *thesis* of the next round, so the position
37
+ is progressively re-fortified and sharpened. A `0`, negative, or
38
+ non-numeric value falls back to the default *1*; with a single round the
39
+ output is identical to running without the option.
40
+
41
+ The `--count`/`-c` *count* option sets the minimum number of strong
42
+ pro-theses to surface (default *10*), raising or lowering the floor of
43
+ supporting arguments hunted for, sorted, and reported in each defense
44
+ pass. A `0`, negative, or non-numeric value falls back to the default
45
+ *10*.
46
+
32
47
  The intent is constructive: building the best honest case for the
33
48
  thesis to arrive at a better final decision, not overselling or merely
34
49
  cheerleading.
35
50
 
36
51
  ## ARGUMENTS
37
52
 
53
+ `--count`, `-c` *count*:
54
+ Surface at least *count* strong pro-theses (default *10*) per defense
55
+ pass before sorting and reporting the top *count* and deriving the
56
+ *FORTIFICATION*. An invalid or non-positive *count* reverts to the
57
+ default *10*.
58
+
59
+ `--rounds`, `-r` *rounds*:
60
+ Run *rounds* iterative defense rounds (default *1*), feeding each
61
+ round's *FORTIFICATION* in as the next round's *thesis*. An invalid
62
+ or non-positive *rounds* reverts to the default *1*.
63
+
38
64
  *thesis*:
39
65
  The statement, claim, or position to be charitably strengthened.
40
66
  It may be technical, factual, or opinion-based; the skill defends
@@ -54,6 +80,12 @@ Build the case for a design decision:
54
80
  ❯ /ase-meta-steelman We should rewrite the service in Rust.
55
81
  ```
56
82
 
83
+ Strengthen across five iterative rounds:
84
+
85
+ ```text
86
+ ❯ /ase-meta-steelman --rounds 5 We should rewrite the service in Rust.
87
+ ```
88
+
57
89
  ## SEE ALSO
58
90
 
59
91
  `ase-meta-diaboli`, `ase-meta-why`, `ase-meta-evaluate`,
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ase-meta-why
3
- argument-hint: "[--help|-h] <fact>"
3
+ argument-hint: "[--help|-h] [--depth|-d <N>] [--width|-w <M>] <fact>"
4
4
  description: >
5
5
  Five-Whys Root-Cause Analysis.
6
6
  user-invocable: true
@@ -10,16 +10,23 @@ effort: high
10
10
 
11
11
  @${CLAUDE_SKILL_DIR}/../../meta/ase-control.md
12
12
  @${CLAUDE_SKILL_DIR}/../../meta/ase-skill.md
13
+ @${CLAUDE_SKILL_DIR}/../../meta/ase-getopt.md
13
14
 
14
15
  <skill name="ase-meta-why">
15
16
  Five-Whys Root-Cause Analysis
16
17
  </skill>
17
18
 
19
+ <expand name="getopt"
20
+ arg1="ase-meta-why"
21
+ arg2="--depth|-d=5 --width|-w=1">
22
+ $ARGUMENTS
23
+ </expand>
24
+
18
25
  <objective>
19
26
  Apply the *Five-Whys* *root-cause analysis* technique to investigate
20
27
  the following problem:
21
28
 
22
- <problem>Why $ARGUMENTS?</problem>
29
+ <problem>Why <getopt-arguments/>?</problem>
23
30
 
24
31
  For this, iteratively ask "why" to drill down from symptoms to the root-cause.
25
32
  This helps to identify the fundamental reason behind a problem rather than just
@@ -27,42 +34,140 @@ addressing surface-level symptoms.
27
34
  </objective>
28
35
 
29
36
  <flow>
30
- 1. <step id="STEP 1: Determine Problem">
37
+
38
+ 1. <step id="STEP 1: Restate Problem">
39
+
31
40
  State the problem statement.
32
41
 
33
42
  <template>
34
43
  <ase-tpl-bullet-signal/> **PROBLEM**: <problem/>
35
44
  </template>
45
+
36
46
  </step>
37
47
 
38
48
  2. <step id="STEP 2: Root-Cause Analysis">
49
+
39
50
  Find the root-cause of <problem/> by following the following iteration cycle.
40
51
  Start with a <question/> set equal to the <problem/>.
41
52
 
42
- <for items="1 2 3 4 5">
43
- Ask <question/> and document the answer in <answer/> with the following template:
44
- Don't stop at symptoms, keep digging for systemic issues.
45
- Multiple root-causes may exist -- explore different branches.
46
- Consider technical, domain-specific, process-related, or organizational causes.
53
+ Determine the *maximum chain length* from <getopt-option-depth/>:
54
+ set <depth/> to <getopt-option-depth/>; if <getopt-option-depth/>
55
+ is *non-numeric* or *less than or equal to 0*, use the default *5* instead.
56
+
57
+ Determine the *maximum chain width* from <getopt-option-width/>:
58
+ set <width/> to <getopt-option-width/>; if <getopt-option-width/>
59
+ is *non-numeric* or *less than or equal to 0*, use the default *1* instead.
60
+
61
+ - <if condition="<width/> is less than or equal to 1">
62
+
63
+ Walk a *single* causality chain (the classic Five-Whys):
64
+
65
+ Start with <n>1</n> (set iteration counter to one).
66
+
67
+ <while condition="<n/> is less than or equal to <depth/>">
68
+
69
+ Ask <question/> and document the answer in <answer/> with the following template:
70
+ Don't stop at symptoms, keep digging for systemic issues.
71
+ Consider technical, domain-specific, process-related, or organizational causes.
72
+
73
+ <template>
74
+ <ase-tpl-bullet-secondary/> **WHY <n/>**: <answer/>
75
+ </template>
76
+
77
+ Then, for the next iteration set <question/> now to be the last <answer/>.
78
+ The magic is NOT in exactly <depth/> "Why" -- you can <break/>
79
+ the iteration when you already reached the root-cause.
80
+ Finally, set <n/> to <n/> + 1 (increment iteration counter).
81
+
82
+ </while>
83
+
84
+ </if>
85
+
86
+ - <if condition="<width/> is greater than 1">
47
87
 
48
- <template>
49
- <ase-tpl-bullet-secondary/> **WHY <item/>**: <answer/>
50
- </template>
88
+ Walk a *widened* causality chain: at each "why" level, surface up to
89
+ <width/> *candidate* sub-causes, then commit to the single most
90
+ significant one and descend into it (the chain stays single-rooted --
91
+ the extra candidates are *not* each drilled to their own root-cause).
92
+ Their purpose is to guard against *premature commitment* to the wrong
93
+ sub-cause: by enumerating the plausible alternatives at each level, the
94
+ chosen descent is a *justified* selection rather than the first
95
+ plausible answer, and the unchosen candidates remain on record as
96
+ *fallbacks* to backtrack into (see STEP 3) should the chosen path fail
97
+ validation.
98
+
99
+ Remember the *unchosen* candidates of every level (keep them in
100
+ <fallbacks/>, tagged by their level <n/>), so STEP 3 can backtrack
101
+ into them.
102
+
103
+ Start with <n>1</n> (set iteration counter to one).
104
+
105
+ <while condition="<n/> is less than or equal to <depth/>">
106
+
107
+ Ask <question/> and surface up to <width/> *distinct*,
108
+ *non-overlapping* candidate sub-causes, each documented in <answer-k/>.
109
+ Don't stop at symptoms, keep digging for systemic issues.
110
+ Explore *different* candidates -- technical, domain-specific,
111
+ process-related, or organizational causes -- and avoid restating
112
+ the same cause in different words.
113
+
114
+ Start with <k>1</k> (set candidate counter to one).
115
+ <while condition="<k/> is less than or equal to <width/>">
116
+ <template>
117
+ <ase-tpl-bullet-secondary/> **WHY <n/>.<k/>**: <answer-k/>
118
+ </template>
119
+ Set <k/> to <k/> + 1 (increment candidate counter).
120
+ </while>
121
+
122
+ Then choose, among the <answer-k/>, the *most causally-significant*
123
+ candidate -- the one most likely to lead to the true root-cause --
124
+ and *justify* the choice in one line (state explicitly *why* it
125
+ beats the other candidates, e.g. it alone also explains the timing,
126
+ scope, or magnitude of the level's fact). A bare "most significant"
127
+ is *not* sufficient; if no candidate clearly dominates, say so.
128
+
129
+ <template>
130
+ <ase-tpl-bullet-secondary/> **WHY <n/> → chosen <n/>.<chosen-k/>**: <justification/>
131
+ </template>
132
+
133
+ Record the remaining candidates as <fallbacks/> for level <n/>.
134
+ Then, for the next iteration, set <question/> to the chosen candidate.
135
+ You can <break/> the iteration when the chosen candidate already
136
+ reached its root-cause.
137
+ Finally, set <n/> to <n/> + 1 (increment iteration counter).
138
+
139
+ </while>
140
+
141
+ </if>
51
142
 
52
- Then, for the next iteration set <question/> now to be the last <answer/>.
53
- The magic is NOT in exactly 5 "Why" -- you can <break/> the iteration
54
- when you already reached the root-cause.
55
- </for>
56
143
  </step>
57
144
 
58
145
  3. <step id="STEP 3: Report Solution">
59
- Validate the root-cause by working backwards the causality chain.
60
- Propose a solution that addresses and solves the root-cause.
146
+
147
+ Validate the root-cause by working backwards along the chosen causality
148
+ chain: check, level by level, that each chosen sub-cause genuinely *causes*
149
+ the fact above it (and that fixing the final root-cause would dissolve the
150
+ whole chain up to the original <problem/>).
151
+
152
+ When <width/> is *greater than 1* and this backward validation *fails* at
153
+ some level -- i.e. the chosen sub-cause does *not* adequately explain the
154
+ fact above it -- *backtrack*: discard the chosen sub-cause from that level
155
+ downward, pick the next-best candidate from that level's <fallbacks/>, set
156
+ <question/> to it, and re-run the STEP 2 widened descent from there. Repeat
157
+ until a chain survives backward validation or that level's <fallbacks/> are
158
+ exhausted (then report the strongest chain found and note that no candidate
159
+ fully validated). This is the payoff of <width/> *greater than 1*: the
160
+ enumerated alternatives let the analysis *recover* from a wrong turn instead
161
+ of committing to a mis-rooted chain.
162
+
163
+ Propose a solution that addresses and solves the validated root-cause.
61
164
  For the proposed solution, optionally directly propose corresponding source code changes.
62
165
 
63
166
  <template>
64
167
  <ase-tpl-bullet-signal/> **SOLUTION**: <solution/>
65
168
  </template>
169
+
66
170
  </step>
171
+
67
172
  </flow>
68
173
 
@@ -7,20 +7,48 @@
7
7
 
8
8
  `ase-meta-why`
9
9
  [`--help`|`-h`]
10
+ [`--depth`|`-d` *N*]
11
+ [`--width`|`-w` *M*]
10
12
  *fact*
11
13
 
12
14
  ## DESCRIPTION
13
15
 
14
16
  The `ase-meta-why` skill applies the *Five-Whys* *root-cause
15
17
  analysis* technique to the supplied *fact*. The skill iteratively
16
- asks "why" - up to five times - to drill down from surface symptoms
17
- to the underlying root cause, considering technical, domain-specific,
18
- process-related, and organizational causes. After identifying the
19
- root cause it proposes a *SOLUTION* that addresses it, optionally
20
- including concrete source code changes.
18
+ asks "why" - up to *N* times (see `--depth`, default five) - to drill
19
+ down from surface symptoms to the underlying root cause, considering
20
+ technical, domain-specific, process-related, and organizational
21
+ causes. By default it walks a *single* causality chain, but with
22
+ `--width` *M* (> 1) it walks a *widened* chain: at each level it surfaces
23
+ up to *M* candidate sub-causes, descends into the most significant one
24
+ with an explicit justification for the choice, and keeps the unchosen
25
+ candidates as *fallbacks*. If backward validation later shows the chosen
26
+ path was mis-rooted, it *backtracks* into a fallback and re-descends -
27
+ guarding against the classic Five-Whys failure of committing early to the
28
+ wrong sub-cause. After identifying (and validating) the root cause it
29
+ proposes a *SOLUTION* that addresses it, optionally including concrete
30
+ source code changes.
21
31
 
22
32
  ## ARGUMENTS
23
33
 
34
+ `--depth`|`-d` *N*:
35
+ The *maximum* number of "why" iterations (the Five-Whys chain
36
+ length), acting as an *upper bound* only - the analysis still stops
37
+ early once the root cause is reached. Defaults to *5*. A non-numeric
38
+ or non-positive value falls back to the default.
39
+
40
+ `--width`|`-w` *M*:
41
+ The *maximum* number of *candidate sub-causes* to surface per "why"
42
+ level. With the default *1*, the skill walks a single causality chain
43
+ (classic Five-Whys); with *M* > 1, each level surfaces up to *M*
44
+ candidate sub-causes, descends into the single most significant one
45
+ (justifying the choice), and retains the rest as *fallbacks*. During
46
+ backward validation a mis-rooted choice is *backtracked* into a fallback
47
+ and re-descended, so the widening actively improves which root-cause is
48
+ reached rather than merely listing alternatives. The result is still a
49
+ single, but better-justified, root-cause. A non-numeric or non-positive
50
+ value falls back to the default.
51
+
24
52
  *fact*:
25
53
  The observed *fact* (symptom, problem, or surprising outcome)
26
54
  whose root cause should be investigated. The skill implicitly
@@ -34,6 +62,19 @@ Investigate the root cause of a build failure:
34
62
  ❯ /ase-meta-why the CI build is intermittently failing on macOS runners
35
63
  ```
36
64
 
65
+ Drill down deeper with a tunable chain length of seven:
66
+
67
+ ```text
68
+ ❯ /ase-meta-why -d 7 the production latency spiked after the last deploy
69
+ ```
70
+
71
+ Weigh several candidate sub-causes per level (with backtracking) to avoid
72
+ committing early to the wrong root-cause:
73
+
74
+ ```text
75
+ ❯ /ase-meta-why -w 3 the release was delayed by two weeks
76
+ ```
77
+
37
78
  ## SEE ALSO
38
79
 
39
80
  `ase-code-analyze`, `ase-code-resolve`, `ase-arch-analyze`.
@@ -117,7 +117,7 @@ Procedure
117
117
 
118
118
  - **Fuzzy Language**:
119
119
  When the user uses vague or overloaded terms instead of a precise
120
- or canonical terms.
120
+ or canonical term.
121
121
 
122
122
  - **Conflicting Terminology**:
123
123
  When the user uses a term that conflicts with the existing