@rse/ase 0.9.2 → 0.9.4

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 (41) hide show
  1. package/dst/ase-hello.js +24 -0
  2. package/dst/ase-statusline.js +15 -5
  3. package/package.json +2 -2
  4. package/plugin/.claude-plugin/plugin.json +1 -1
  5. package/plugin/.github/plugin/plugin.json +1 -1
  6. package/plugin/agents/ase-meta-review.md +188 -0
  7. package/plugin/etc/eslint.mjs +25 -0
  8. package/plugin/etc/markdownlint.yaml +13 -11
  9. package/plugin/etc/stx.conf +2 -1
  10. package/plugin/meta/ase-control.md +7 -2
  11. package/plugin/meta/ase-dialog.md +2 -0
  12. package/plugin/meta/ase-format-arch.md +31 -31
  13. package/plugin/meta/ase-format-spec.md +3 -3
  14. package/plugin/meta/ase-getopt.md +1 -0
  15. package/plugin/meta/ase-persona.md +1 -1
  16. package/plugin/meta/ase-skill.md +6 -6
  17. package/plugin/package.json +5 -2
  18. package/plugin/skills/ase-arch-analyze/SKILL.md +33 -33
  19. package/plugin/skills/ase-code-analyze/SKILL.md +162 -18
  20. package/plugin/skills/ase-code-analyze/help.md +47 -7
  21. package/plugin/skills/ase-code-lint/SKILL.md +11 -3
  22. package/plugin/skills/ase-code-lint/help.md +14 -1
  23. package/plugin/skills/ase-docs-distill/SKILL.md +158 -0
  24. package/plugin/skills/ase-docs-distill/help.md +76 -0
  25. package/plugin/skills/ase-docs-proofread/SKILL.md +1 -1
  26. package/plugin/skills/ase-docs-proofread/help.md +1 -1
  27. package/plugin/skills/ase-meta-brainstorm/SKILL.md +29 -15
  28. package/plugin/skills/ase-meta-brainstorm/help.md +21 -7
  29. package/plugin/skills/ase-meta-diaboli/SKILL.md +36 -13
  30. package/plugin/skills/ase-meta-diaboli/help.md +22 -4
  31. package/plugin/skills/ase-meta-diff/SKILL.md +110 -64
  32. package/plugin/skills/ase-meta-diff/help.md +30 -6
  33. package/plugin/skills/ase-meta-review/SKILL.md +184 -0
  34. package/plugin/skills/ase-meta-review/help.md +88 -0
  35. package/plugin/skills/ase-meta-steelman/SKILL.md +210 -0
  36. package/plugin/skills/ase-meta-steelman/help.md +92 -0
  37. package/plugin/skills/ase-meta-why/SKILL.md +20 -7
  38. package/plugin/skills/ase-meta-why/help.md +18 -5
  39. package/plugin/skills/ase-task-condense/SKILL.md +3 -3
  40. package/plugin/skills/ase-task-grill/SKILL.md +1 -1
  41. package/plugin/skills/ase-task-implement/help.md +1 -1
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  name: ase-meta-diff
3
- argument-hint: "[--help|-h] [--risk|-r] [--blast|-b]"
3
+ argument-hint: "[--help|-h] [--coherence|-c] [--risk|-r] [--blast|-b]"
4
4
  description: >
5
5
  Summarize the currently staged Git changes as a human-readable,
6
6
  intent-grouped narrative. Use when the user wants a concise and
7
- brief report of what changed and why. Optionally can show a risk and
8
- blast radius report.
7
+ brief report of what changed and why. Optionally can check the diff
8
+ for intent coherence and show a risk and blast radius report.
9
9
  user-invocable: true
10
10
  disable-model-invocation: false
11
11
  effort: high
@@ -27,16 +27,18 @@ Summarize Diff
27
27
 
28
28
  <expand name="getopt"
29
29
  arg1="ase-meta-diff"
30
- arg2="--risk|-r --blast|-b">
30
+ arg2="--coherence|-c --risk|-r --blast|-b">
31
31
  $ARGUMENTS
32
32
  </expand>
33
33
 
34
34
  <objective>
35
35
  Summarize the currently staged Git changes into a *concise*,
36
- *human-readable* narrative of what changed and why, *grouped by
37
- intent* rather than by file. Optionally *score* the diff against a
38
- *coupling-criticality-coverage- reversibility* rubric and emit a *graded
39
- risk report* with *mitigations*. Optionally render a *blast-radius map*.
36
+ *human-readable* narrative of what changed and why, *grouped by intent*
37
+ rather than by file. Optionally *reconstruct the change's single
38
+ intended purpose* and *flag hunks that do not serve it*. Optionally
39
+ *score* the diff against a *coupling-criticality-coverage-reversibility*
40
+ rubric and emit a *graded risk report* with *mitigations*. Optionally
41
+ render a *blast-radius map*.
40
42
  </objective>
41
43
 
42
44
  Procedure
@@ -129,19 +131,86 @@ explicitly requested by this procedure via outputs based on a <template/>!
129
131
 
130
132
  </step>
131
133
 
132
- 3. <step id="STEP 3: Score Against Risk Rubric (optional)">
134
+ 3. <step id="STEP 3: Assess Intent Coherence"
135
+ condition="<getopt-option-coherence/> is equal `true` and <diff/> is NOT empty">
133
136
 
134
- 1. <if condition="<getopt-option-risk/> is NOT equal `true`">
135
- Silently *SKIP* this entire step.
136
- </if>
137
+ 1. From the *same* captured <diff/> and <stat/>, *reconstruct the
138
+ single intended change* as a thesis - the one logical, coherent purpose
139
+ the diff *as a whole* is trying to accomplish.
137
140
 
138
- 2. <if condition="<diff/> is empty">
139
- Silently *SKIP* this entire step (STEP 2 already reported it).
140
- </if>
141
+ If the <diff/> genuinely spans *several* unrelated purposes,
142
+ pick the *dominant* one as the thesis (the residue will surface
143
+ as flagged hunks below).
144
+
145
+ Multiple intents discovered in STEP 2 are a strong indicator of
146
+ incoherence. In this case, be very sceptical and do *NOT* form a
147
+ thesis which is just the superset of all those intents.
148
+
149
+ Finally, phrase the thesis as a *single* crisp sentence and
150
+ capture it as <thesis/>.
151
+
152
+ 2. Walk *every* hunk in the <diff/> and *classify* each one as
153
+ either *serving* <thesis/> or *not serving* it. A hunk does *not*
154
+ serve the thesis when it is one of the following <deviation/> kinds:
155
+
156
+ - `SCOPE-CREEP`: an unrelated change riding along (e.g. a second
157
+ feature, a drive-by refactor, an opportunistic rename, a
158
+ reformatting sweep) that should be its own commit.
159
+
160
+ - `STRAY-DEBUG`: leftover debug/diagnostic residue (e.g. debug
161
+ prints, `console.log`, commented-out code, temporary
162
+ logging, `TODO`/`FIXME` scaffolding, disabled tests), which
163
+ should be just removed and not part of any commit.
164
+
165
+ 3. A hunk that *serves* <thesis/> will be *not* reported. Only hunks that
166
+ do *not* serve it will be reported. If *every* hunk serves the thesis,
167
+ the diff is *coherent* and you report *no* flagged hunks.
168
+
169
+ Judge overall *coherence* from the flagged hunks: the diff
170
+ is `COHERENT` when there are *no* `SCOPE-CREEP` and *no*
171
+ `STRAY-DEBUG` deviations, otherwise it is `INCOHERENT`. Store
172
+ the result is <verdict/>.
173
+
174
+ 4. Emit the following header <template/>:
175
+
176
+ <template>
177
+
178
+ <ase-tpl-bullet-normal/> **CHANGE COHERENCE THESIS**: <thesis/>
141
179
 
142
- 3. <if condition="<getopt-option-risk/> is equal `true` and <diff/> is NOT empty">
180
+ <ase-tpl-bullet-signal/> **CHANGE COHERENCE REPORT**: Verdict: **<verdict/>**
143
181
 
144
- Score the *same* captured <diff/> and <stat/> information
182
+ </template>
183
+
184
+ 5. <if condition="<verdict/> is `INCOHERENT`">
185
+ Render a *three-column table* with one row per hunk, flagged
186
+ for *not serving* the <thesis/> above. Output the following table in <template/>.
187
+
188
+ For each flagged hunk, repeat the third line, where <deviation/>
189
+ is the deviation kind label, <location/> is the affected file
190
+ reference, and <reason/> is a *brief* one-sentence note on why
191
+ the hunk does not serve <thesis/> and what to do with it (e.g.
192
+ split into its own commit, drop the debug residue).
193
+
194
+ In the <location/> column, markup all file references as code
195
+ (with backticks), prepend them with `▢ ` and append ` [+N/-M]`
196
+ (based on the information in <stat/>) to them.
197
+
198
+ Keep the overall texts in <reason/> *very concise* and *brief*.
199
+ Do *not* output any further explanation.
200
+
201
+ <template>
202
+
203
+ | Deviation | Location | Why it does not serve the thesis? |
204
+ | ---------------- | ----------- | --------------------------------- |
205
+ | **<deviation/>** | <location/> | <reason/> |
206
+
207
+ </template>
208
+ </step>
209
+
210
+ 4. <step id="STEP 4: Score Against Risk Rubric"
211
+ condition="<getopt-option-risk/> is equal `true` and <diff/> is NOT empty">
212
+
213
+ 1. Score the *same* captured <diff/> and <stat/> information
145
214
  against the four-axis rubric below. Each axis is scored on an
146
215
  integer scale of *1* (lowest risk) to *5* (highest risk) against
147
216
  the *fixed anchors* given, and *every* score *MUST* be backed
@@ -154,42 +223,42 @@ explicitly requested by this procedure via outputs based on a <template/>!
154
223
  axes (e.g. who imports a touched module, whether touched code has
155
224
  adjacent tests). Do not output anything during the probe.
156
225
 
157
- Score each axis against these anchors:
226
+ 2. Score each axis against these anchors:
158
227
 
159
- 1. **COUPLING** how widely the touched code is depended upon.
228
+ 1. **COUPLING** - how widely the touched code is depended upon.
160
229
  *1*: self-contained, no first-party importers.
161
230
  *3*: a handful of dependent modules.
162
231
  *5*: a hub touched by many modules or a public interface.
163
232
 
164
- 2. **CRITICALITY** how essential the touched path is.
233
+ 2. **CRITICALITY** - how essential the touched path is.
165
234
  *1*: docs, comments, dead/peripheral code.
166
235
  *3*: ordinary feature logic.
167
236
  *5*: core/security/auth/data-integrity/money path.
168
237
 
169
- 3. **COVERAGE** how well the change is exercised by tests.
238
+ 3. **COVERAGE** - how well the change is exercised by tests.
170
239
  *1*: tests touched in this diff or directly covering the
171
240
  changed hunks.
172
241
  *3*: adjacent tests exist but are not clearly exercising the
173
242
  changed hunks.
174
243
  *5*: no tests anywhere near the touched code.
175
244
 
176
- 4. **REVERSIBILITY** how easily the change can be undone.
245
+ 4. **REVERSIBILITY** - how easily the change can be undone.
177
246
  *1*: pure code change, revert restores prior state.
178
247
  *3*: needs coordinated revert or a config rollback.
179
248
  *5*: irreversible-by-revert (schema/data migration, released
180
249
  artifact, external side effect).
181
250
 
182
- Compute the *aggregate risk* as the *equal-weighted* mean of
251
+ 3. Compute the *aggregate risk* as the *equal-weighted* mean of
183
252
  the four risk contributions (Coupling, Criticality, Coverage,
184
253
  Reversibility), rounded to one decimal, and map it to a *graded
185
254
  band*: *1.0-1.9* → **LOW**, *2.0-2.9* → **MODERATE**, *3.0-3.9*
186
255
  → **HIGH**, *4.0-5.0* → **CRITICAL**.
187
256
 
188
- Then emit the following <template/>, with the overall band and
257
+ 4. Emit the following <template/>, with the overall band and
189
258
  aggregate score, followed by a *three-column table* with one row
190
259
  per axis: column 1 is the *axis*, column 2 is the *score*, and
191
- column 3 is the *evidence* (as a `●` bullet point) plus
192
- *only* if the axis reached the mitigation threshold of '>= 4'
260
+ column 3 is the *evidence* (as a `●` bullet point) plus -
261
+ *only* if the axis reached the mitigation threshold of '>= 4' -
193
262
  the *mitigation* (as a second `●` bullet point). If an axis did
194
263
  not reach that threshold, omit the ` ● **MITIGATION**:
195
264
  <mitigation/>` part from its row. Keep the overall <evidence/>
@@ -204,49 +273,27 @@ explicitly requested by this procedure via outputs based on a <template/>!
204
273
 
205
274
  <ase-tpl-bullet-signal/> **CHANGE RISK REPORT**: Overall: **<band/>** (<aggregate/>/5)
206
275
 
207
- | Axis | Score | Findings |
208
- | ---- | ----- | -------- |
209
- </template>
210
-
211
- For each axis, emit the following row <template/>:
212
-
213
- <template>
276
+ | Axis | Score | Findings |
277
+ | ----------- | ---------- | ----------------------------------------------------------- |
214
278
  | **<axis/>** | <score/>/5 | ● **EVIDENCE**: <evidence/> ● **MITIGATION**: <mitigation/> |
215
279
  </template>
216
-
217
- Finally, output the following footer <template/>:
218
-
219
- <template>
220
-
221
- </template>
222
-
223
- </if>
224
-
225
280
  </step>
226
281
 
227
- 4. <step id="STEP 4: Render Blast-Radius Map (optional)">
228
-
229
- 1. <if condition="<getopt-option-blast/> is NOT equal `true`">
230
- Silently *SKIP* this entire step.
231
- </if>
232
-
233
- 2. <if condition="<diff/> is empty">
234
- Silently *SKIP* this entire step (STEP 2 already reported it).
235
- </if>
282
+ 5. <step id="STEP 5: Render Blast-Radius Map"
283
+ condition="<getopt-option-blast/> is equal `true` and <diff/> is NOT empty">
236
284
 
237
- 3. <if condition="<getopt-option-blast/> is equal `true` and <diff/> is NOT empty">
238
- From the *same* captured <diff/> and <stat/>, *extract the
239
- touched modules* — the distinct changed source files (or their
285
+ 1. From the *same* captured <diff/> and <stat/>, *extract the
286
+ touched modules* - the distinct changed source files (or their
240
287
  enclosing modules/ packages, according to the language idiom).
241
288
 
242
- Then, for each touched module, *scan its reverse dependencies*
243
- the other first-party files that *import* or *reference* it
289
+ 2. Then, for each touched module, *scan its reverse dependencies*
290
+ - the other first-party files that *import* or *reference* it
244
291
  across the current project (e.g. by the module's basename,
245
292
  exported symbol, or import path). Keep the scan *read-only*
246
293
  and *heuristic*; restrict it to first-party code within the
247
294
  repository. Do not output anything during the scan.
248
295
 
249
- Then build a *blast-radius graph* and render it as a diagram:
296
+ 3. Then build a *blast-radius graph* and render it as a diagram:
250
297
 
251
298
  1. Build a Mermaid specification <mermaid-spec/> for a `flowchart
252
299
  TB` whose *touched* modules are the origin nodes and whose
@@ -254,7 +301,7 @@ explicitly requested by this procedure via outputs based on a <template/>!
254
301
  (origin → dependent).
255
302
 
256
303
  Flag each *touched* node as a problem node per the
257
- `ase-meta-diagram` anomaly convention prefix its label
304
+ `ase-meta-diagram` anomaly convention - prefix its label
258
305
  with `⚑ ` inside quotes, e.g. `T1["⚑ src/core.ts"]`. Keep
259
306
  labels ultra short (basenames or module names only).
260
307
 
@@ -264,7 +311,7 @@ explicitly requested by this procedure via outputs based on a <template/>!
264
311
  "ase:ase-meta-diagram", prompt: "<mermaid-spec/>")` and capture
265
312
  its returned `text` field as <diagram/>.
266
313
 
267
- Then emit the following <template/>, showing <diagram/> and
314
+ 4. Then emit the following <template/>, showing <diagram/> and
268
315
  appending a *brief impact summary* of bullets, where each
269
316
  <module/> is a *touched* module and <impact/> is a one-sentence
270
317
  note on *what depends on it* and *how far the blast reaches*.
@@ -273,8 +320,11 @@ explicitly requested by this procedure via outputs based on a <template/>!
273
320
  (with backticks), prepend them with `▢ ` and append ` [+N/-M]`
274
321
  (based on the information in <stat/>) to them.
275
322
 
323
+ Keep the overall report *concise* and *brief*. Do *not* output
324
+ any further explanation.
325
+
276
326
  <template>
277
- <ase-tpl-head title="Hello World"/>
327
+ <ase-tpl-head title="CHANGE BLAST RADIUS"/>
278
328
 
279
329
  <ase-tpl-bullet-signal/> **CHANGE BLAST RADIUS MAP**:
280
330
 
@@ -291,10 +341,6 @@ explicitly requested by this procedure via outputs based on a <template/>!
291
341
  <ase-tpl-foot/>
292
342
  </template>
293
343
 
294
- Keep the overall report *concise* and *brief*. Do *not* output
295
- any further explanation.
296
- </if>
297
-
298
344
  </step>
299
345
 
300
346
  </flow>
@@ -7,6 +7,7 @@
7
7
 
8
8
  `ase-meta-diff`
9
9
  [`--help`|`-h`]
10
+ [`--coherence`|`-c`]
10
11
  [`--risk`|`-r`]
11
12
  [`--blast`|`-b`]
12
13
 
@@ -18,12 +19,22 @@ intent* (such as *Feature*, *Improvement*, *Bugfix*, *Update*,
18
19
  *Cleanup*, or *Refactor*) rather than by file. It inspects the
19
20
  *staged* changes (`git diff --cached HEAD`). The result is a short
20
21
  bullet list, one bullet per intent group, each naming the affected
21
- files with their per-file `[+N/-M]` line counts giving you the
22
+ files with their per-file `[+N/-M]` line counts - giving you the
22
23
  essence of the changes at a glance.
23
24
 
25
+ With `--coherence`, the skill additionally *reconstructs the single
26
+ intended change* the diff is trying to accomplish - phrased as one crisp
27
+ *thesis* sentence - and then walks *every* hunk to *flag those that do
28
+ not serve it*: **scope creep** (an unrelated feature or drive-by refactor
29
+ riding along), **stray debug** (leftover prints, commented-out code, or
30
+ disabled tests), and **ripple** (mechanical fallout edits forced by the
31
+ core change). It emits an overall **COHERENT** / **INCOHERENT** verdict
32
+ plus a table of the flagged hunks with what to do with each - keeping the
33
+ diff to a *single logical and coherent change* before it is committed.
34
+
24
35
  With `--risk`, the skill additionally *scores* the same diff against a
25
36
  four-axis **coupling-criticality-coverage-reversibility** rubric and
26
- emits a *graded risk report* one bullet per axis (each scored *1*-*5*
37
+ emits a *graded risk report* - one bullet per axis (each scored *1*-*5*
27
38
  with a one-line evidence justification drawn from the actual hunks), an
28
39
  overall risk band (**LOW**, **MODERATE**, **HIGH**, or **CRITICAL**),
29
40
  and one actionable *mitigation* per high-risk axis. The axes combine
@@ -31,18 +42,25 @@ with *equal weights*, and the rubric is deliberately *not tuned* to any
31
42
  specific project: every score is backed by cited evidence so it remains
32
43
  *overridable*, and the report is *decision support*, not a merge gate.
33
44
 
34
- With `--blast`, the skill additionally renders a *blast-radius map* a
45
+ With `--blast`, the skill additionally renders a *blast-radius map* - a
35
46
  Mermaid `flowchart` of the *touched modules* and their *reverse
36
47
  dependencies*, plus a *brief impact summary*. It *extracts the touched
37
48
  modules* from the changed files, *scans the repository* for the
38
49
  first-party code that *imports* or *references* those modules, builds a
39
50
  blast-radius graph (touched modules as origin nodes, dependents fanning
40
51
  out along the edges), dispatches the rendering to the `ase-meta-diagram`
41
- sub-agent, and appends a short bullet list of the per-module impact
52
+ sub-agent, and appends a short bullet list of the per-module impact -
42
53
  giving a visual sense of *what a diff endangers* before a deeper review.
43
54
 
44
55
  ## ARGUMENTS
45
56
 
57
+ `--coherence`, `-c`:
58
+ In addition to the intent-grouped summary, reconstruct the diff's
59
+ *single intended change* as one crisp *thesis* sentence and flag
60
+ *every* hunk that does *not* serve it - *scope creep*, *stray debug*,
61
+ or *ripple* fallout - then emit an overall **COHERENT** /
62
+ **INCOHERENT** verdict with a table of the flagged hunks.
63
+
46
64
  `--risk`, `-r`:
47
65
  In addition to the intent-grouped summary, score the diff against
48
66
  the *coupling-criticality-coverage-reversibility* rubric and emit a
@@ -52,8 +70,8 @@ giving a visual sense of *what a diff endangers* before a deeper review.
52
70
 
53
71
  `--blast`, `-b`:
54
72
  In addition to the intent-grouped summary, render a *blast-radius
55
- map* a Mermaid `flowchart` of the *touched modules* and their
56
- *reverse dependencies* plus a *brief impact summary* of what
73
+ map* - a Mermaid `flowchart` of the *touched modules* and their
74
+ *reverse dependencies* - plus a *brief impact summary* of what
57
75
  depends on the touched code and how far the blast reaches.
58
76
 
59
77
  ## EXAMPLES
@@ -64,6 +82,12 @@ Summarize the currently staged changes:
64
82
  ❯ /ase-meta-diff
65
83
  ```
66
84
 
85
+ Summarize the staged changes and append an intent-coherence report:
86
+
87
+ ```text
88
+ ❯ /ase-meta-diff --coherence
89
+ ```
90
+
67
91
  Summarize the staged changes and append a graded risk report:
68
92
 
69
93
  ```text
@@ -0,0 +1,184 @@
1
+ ---
2
+ name: ase-meta-review
3
+ argument-hint: "[--help|-h] [--severity|-S=(LOW|MEDIUM|HIGH)]"
4
+ description: >
5
+ Perform a holistic, human-reviewer-style critique of the currently
6
+ staged Git changes and emit an approve/reject verdict with
7
+ prioritized, severity-tagged, line-cited findings. Use when the user
8
+ wants the staged diff "reviewed", "critiqued", or "code-reviewed"
9
+ before committing.
10
+ user-invocable: true
11
+ disable-model-invocation: false
12
+ effort: high
13
+ allowed-tools:
14
+ - "Bash(git diff *)"
15
+ - "Agent"
16
+ ---
17
+
18
+ @${CLAUDE_SKILL_DIR}/../../meta/ase-control.md
19
+ @${CLAUDE_SKILL_DIR}/../../meta/ase-skill.md
20
+ @${CLAUDE_SKILL_DIR}/../../meta/ase-dialog.md
21
+ @${CLAUDE_SKILL_DIR}/../../meta/ase-getopt.md
22
+
23
+ <skill name="ase-meta-review">
24
+ Review Staged Changes
25
+ </skill>
26
+
27
+ <expand name="getopt"
28
+ arg1="ase-meta-review"
29
+ arg2="--severity|-S=(LOW|MEDIUM|HIGH)">
30
+ $ARGUMENTS
31
+ </expand>
32
+
33
+ <objective>
34
+ Review the currently staged Git changes the way an *experienced human
35
+ reviewer* would - judging them *holistically* against the change's *own
36
+ intent* and against *correctness*, *design fit*, *clarity*, *robustness*,
37
+ and *project-convention conformance* - and emit a single *approve /
38
+ request-changes verdict* backed by *prioritized*, *severity-tagged*,
39
+ *line-cited* findings. This is a *synthesizing critique*, not a mechanical
40
+ scan: it complements `ase-code-lint` (mechanical quality), `ase-code-analyze`
41
+ (logic/semantics), and `ase-meta-diff` (intent narrative and risk).
42
+ </objective>
43
+
44
+ Procedure
45
+ ---------
46
+
47
+ You *MUST* follow the following numbered items *strictly* *sequentially*!
48
+ You *MUST* not skip any numbered item during processing!
49
+
50
+ You *MUST* *NOT* output anything in this entire procedure, *except* when
51
+ explicitly requested by this procedure via outputs based on a <template/>!
52
+
53
+ <flow>
54
+
55
+ 1. <step id="STEP 1: Determine Change Set">
56
+
57
+ 1. Determine *whether there are staged changes at all* by running the
58
+ corresponding command (taken exactly as given) and capturing its
59
+ output - the bare *list of staged file names* - into <diff/>. This
60
+ is a lightweight gate; the full diff is fetched by the sub-agent
61
+ in STEP 2, so capturing only the file-name list here is sufficient:
62
+
63
+ `git diff --cached --name-only HEAD`
64
+
65
+ 2. <if condition="<diff/> is empty">
66
+ Only output the following <template/> and then *STOP* immediately:
67
+
68
+ <template>
69
+ ⧉ **ASE**: ✪ skill: **ase-meta-review**, ▶ status: **no changes to review**
70
+ </template>
71
+ </if>
72
+
73
+ </step>
74
+
75
+ 2. <step id="STEP 2: Review Investigation">
76
+
77
+ First, use the following <template/> to give a hint on this step:
78
+
79
+ <template>
80
+ <ase-tpl-bullet-secondary/> **REVIEW INVESTIGATION**
81
+ </template>
82
+
83
+ Dispatch the review investigation to a *sub-agent* via the `Agent`
84
+ tool so that *no* investigation details leak into the user-visible
85
+ transcript. The sub-agent performs the silent reading, the read-only
86
+ repository probing, and the critique; only its final structured return
87
+ value is consumed here.
88
+
89
+ For this, invoke *exactly once* the tool:
90
+
91
+ ```text
92
+ Agent(
93
+ name: "ase:ase-meta-review",
94
+ description: "Review Investigation",
95
+ subagent_type: "ase:ase-meta-review",
96
+ mode: "plan",
97
+ prompt: "Review the staged changes."
98
+ )
99
+ ```
100
+
101
+ Parse the single result message of the `Agent` tool as a JSON object,
102
+ set <summary/> to its `summary` field (a single crisp sentence
103
+ reconstructing the change's intent), and set <findings/> to its
104
+ `findings` field (a list).
105
+
106
+ Then *derive* the overall <verdict/> from <findings/>: set
107
+ <verdict/> to `REJECT - DEMANDS CHANGES` if *any* finding in
108
+ <findings/> has a `severity` field of `HIGH`; otherwise set
109
+ <verdict/> to `APPROVE`. The verdict is derived *before* the
110
+ severity floor below, so a suppressed `HIGH` finding still drives the
111
+ verdict.
112
+
113
+ Then *apply the severity floor* selected via <getopt-option-severity/>
114
+ (default `LOW`): define the ordinal rank `LOW`=1, `MEDIUM`=2,
115
+ `HIGH`=3. *Keep* a finding in <findings/> if and only if its
116
+ `severity` field is `ACCEPTED` *or* `rank(severity)` is greater than
117
+ or equal to `rank(<getopt-option-severity/>)`; *silently drop* all
118
+ other findings. With the default floor `LOW`, all findings are kept.
119
+ `ACCEPTED` findings are *never* dropped.
120
+
121
+ You *MUST* *NOT* output anything else in this STEP 2.
122
+
123
+ </step>
124
+
125
+ 3. <step id="STEP 3: Verdict and Findings">
126
+
127
+ 1. Use the following <template/> to output the overall review in
128
+ <verdict/> and the reconstructed intent <summary/>:
129
+
130
+ <template>
131
+
132
+ <ase-tpl-bullet-signal/> **REVIEW VERDICT**: **<verdict/>**
133
+
134
+ <ase-tpl-bullet-normal/> **CHANGE INTENT**: <summary/>
135
+
136
+ </template>
137
+
138
+ You *MUST* *NOT* output anything else in this STEP 3.
139
+
140
+ 2. <if condition="<findings/> is empty">
141
+ Only output the following <template/> and then *SKIP* the
142
+ remainder of this STEP 3:
143
+
144
+ <template>
145
+
146
+ <ase-tpl-bullet-normal/> **NO FINDINGS**: the change is clean, nothing to flag.
147
+
148
+ </template>
149
+ </if>
150
+
151
+ 3. <if condition="<findings/> is NOT empty">
152
+ Sort the findings by <severity/> from highest to lowest in the
153
+ fixed order `HIGH`, `MEDIUM`, `LOW`, `ACCEPTED`. Within the same
154
+ severity, keep the order returned by the sub-agent.
155
+
156
+ Then render a *three-column table* with one row per finding by
157
+ using the following output <template/>. For each finding, repeat
158
+ the third line, set <severity/> to its `severity` field, set
159
+ <dimension/> to its `dimension` field set <location/> to its
160
+ `location` field, and set <finding/> to its `finding` field.
161
+
162
+ In the <location/> column, markup the `file:line` reference
163
+ as code (with backticks) and prepend it with `▢ ` - keep the
164
+ sub-agent's own `:N` / `:N-M` line citation intact and do *not*
165
+ append any further line-count decoration.
166
+
167
+ Because the <finding/> text is free-form Markdown, *before*
168
+ emitting any row you *MUST* escape every literal `|` pipe
169
+ character inside <location/> and <finding/> as `\|` so it cannot
170
+ break the table column structure.
171
+
172
+ <template>
173
+ | Severity | Dimension | Finding |
174
+ | --------------- | ------------ | ----------------------- |
175
+ | **<severity/>** | <dimension/> | <location/>: <finding/> |
176
+ </template>
177
+
178
+ Keep the overall report *concise* and *brief*.
179
+ Do *not* output any further explanation.
180
+ </if>
181
+
182
+ </step>
183
+
184
+ </flow>
@@ -0,0 +1,88 @@
1
+
2
+ ## NAME
3
+
4
+ `ase-meta-review` - Review Staged Changes
5
+
6
+ ## SYNOPSIS
7
+
8
+ `ase-meta-review`
9
+ [`--help`|`-h`]
10
+ [`--severity`|`-S`=(`LOW`|`MEDIUM`|`HIGH`)]
11
+
12
+ ## DESCRIPTION
13
+
14
+ The `ase-meta-review` skill performs a *holistic*,
15
+ *human-reviewer-style* critique of the *staged* Git changes and emits a
16
+ single *approve* / *reject* **verdict** backed by *prioritized*,
17
+ *severity-tagged*, *line-cited* **findings**. Rather than scanning the
18
+ code mechanically, it first *reconstructs the change's own intent* and
19
+ then judges the diff *as a whole* against that intent - the way an
20
+ experienced reviewer would on a pull request.
21
+
22
+ The critique spans a fixed set of reviewer *dimensions*: **intent**
23
+ (does the diff do what it set out to, without scope creep or stray
24
+ residue), **correctness** (latent bugs, edge cases, broken
25
+ control/data flow), **design** (fit with the surrounding architecture,
26
+ naming, abstraction level), **clarity** (readability and
27
+ self-documentation for a future reader), **robustness** (error handling,
28
+ resource and concurrency safety), **security** and **performance** (risks
29
+ introduced by the change), **convention** (conformance to the
30
+ project's documented conventions - code style and the plan/spec/arch
31
+ formats described in `AGENTS.md` and the `ase-format-*` meta documents),
32
+ **testing** (inadequate coverage for the change - new or fixed behavior
33
+ left untested, adjacent tests not updated, or existing tests silently
34
+ broken, disabled, or weakened), and **documentation** (user- or
35
+ developer-facing docs - `README`, `CHANGELOG`, help text, or AI
36
+ guidance/meta documents - left stale by the change).
37
+
38
+ Each finding carries a *severity* - **HIGH**, **MEDIUM**, **LOW**, or
39
+ **ACCEPTED** (a concern that is contractually addressed or accepted as a
40
+ documented priority conflict) - and is *evidence-grounded*: it cites the
41
+ exact `file:line` location it stems from. The overall verdict is
42
+ **REJECT - DEMANDS CHANGES** when any *HIGH* finding remains, and
43
+ **APPROVE** otherwise. The work is performed by a dedicated `ase-meta-review`
44
+ sub-agent so that the silent reading and read-only repository probing
45
+ never leak into the transcript; only the structured verdict and findings
46
+ are rendered.
47
+
48
+ The skill *complements* rather than duplicates its neighbours:
49
+ `ase-code-lint` flags *mechanical* code-quality issues, `ase-code-analyze`
50
+ inspects *logic and semantics*, `ase-meta-diff` narrates *what changed*
51
+ (with optional coherence, risk, and blast-radius reports), and
52
+ `ase-meta-diaboli` *adversarially challenges a thesis* - whereas
53
+ `ase-meta-review` renders a *reviewer's judgement* on a concrete diff
54
+ before it is committed.
55
+
56
+ ## OPTIONS
57
+
58
+ `--severity`|`-S`=(`LOW`|`MEDIUM`|`HIGH`):
59
+ Set the *severity floor* (default `LOW`): findings below the chosen
60
+ threshold are silently suppressed, ordered `LOW` < `MEDIUM` <
61
+ `HIGH`. The default `LOW` keeps all findings; `ACCEPTED` findings are
62
+ never suppressed. The floor only affects the rendered findings table;
63
+ the overall *verdict* is still derived from all findings, so a
64
+ suppressed `HIGH` finding still yields a *REJECT* verdict.
65
+
66
+ ## ARGUMENTS
67
+
68
+ The `ase-meta-review` skill takes no positional arguments; it always
69
+ reviews the currently *staged* Git changes.
70
+
71
+ ## EXAMPLES
72
+
73
+ Review the currently staged changes before committing:
74
+
75
+ ```text
76
+ ❯ /ase-meta-review
77
+ ```
78
+
79
+ Review the staged changes, reporting only `MEDIUM` and `HIGH` findings:
80
+
81
+ ```text
82
+ ❯ /ase-meta-review -S MEDIUM
83
+ ```
84
+
85
+ ## SEE ALSO
86
+
87
+ `ase-meta-diff`, `ase-meta-commit`, `ase-code-lint`, `ase-code-analyze`,
88
+ `ase-meta-diaboli`.