@rse/ase 0.9.2 → 0.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dst/ase-hello.js +24 -0
- package/dst/ase-statusline.js +15 -5
- package/package.json +2 -2
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/.github/plugin/plugin.json +1 -1
- package/plugin/agents/ase-meta-review.md +188 -0
- package/plugin/etc/eslint.mjs +25 -0
- package/plugin/etc/markdownlint.yaml +13 -11
- package/plugin/etc/stx.conf +2 -1
- package/plugin/meta/ase-control.md +7 -2
- package/plugin/meta/ase-dialog.md +2 -0
- package/plugin/meta/ase-format-arch.md +31 -31
- package/plugin/meta/ase-format-spec.md +3 -3
- package/plugin/meta/ase-getopt.md +1 -0
- package/plugin/meta/ase-persona.md +1 -1
- package/plugin/meta/ase-skill.md +6 -6
- package/plugin/package.json +5 -2
- package/plugin/skills/ase-arch-analyze/SKILL.md +33 -33
- package/plugin/skills/ase-code-lint/SKILL.md +1 -1
- package/plugin/skills/ase-code-lint/help.md +1 -1
- package/plugin/skills/ase-docs-distill/SKILL.md +158 -0
- package/plugin/skills/ase-docs-distill/help.md +76 -0
- package/plugin/skills/ase-docs-proofread/SKILL.md +1 -1
- package/plugin/skills/ase-docs-proofread/help.md +1 -1
- package/plugin/skills/ase-meta-brainstorm/SKILL.md +17 -11
- package/plugin/skills/ase-meta-brainstorm/help.md +4 -4
- package/plugin/skills/ase-meta-diaboli/SKILL.md +4 -4
- package/plugin/skills/ase-meta-diaboli/help.md +2 -2
- package/plugin/skills/ase-meta-diff/SKILL.md +110 -64
- package/plugin/skills/ase-meta-diff/help.md +30 -6
- package/plugin/skills/ase-meta-review/SKILL.md +166 -0
- package/plugin/skills/ase-meta-review/help.md +70 -0
- package/plugin/skills/ase-meta-steelman/SKILL.md +159 -0
- package/plugin/skills/ase-meta-steelman/help.md +60 -0
- package/plugin/skills/ase-meta-why/help.md +1 -1
- package/plugin/skills/ase-task-condense/SKILL.md +3 -3
- 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
|
|
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
|
-
|
|
38
|
-
*
|
|
39
|
-
|
|
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:
|
|
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.
|
|
135
|
-
|
|
136
|
-
|
|
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
|
-
|
|
139
|
-
|
|
140
|
-
|
|
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
|
-
|
|
180
|
+
<ase-tpl-bullet-signal/> **CHANGE COHERENCE REPORT**: Verdict: **<verdict/>**
|
|
143
181
|
|
|
144
|
-
|
|
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
|
-
|
|
226
|
+
2. Score each axis against these anchors:
|
|
158
227
|
|
|
159
|
-
1. **COUPLING**
|
|
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**
|
|
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**
|
|
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**
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
238
|
-
|
|
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
|
-
|
|
243
|
-
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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="
|
|
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
|
|
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*
|
|
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*
|
|
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*
|
|
56
|
-
*reverse dependencies*
|
|
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,166 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ase-meta-review
|
|
3
|
+
argument-hint: "[--help|-h]"
|
|
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
|
+
|
|
21
|
+
<skill name="ase-meta-review">
|
|
22
|
+
Review Staged Changes
|
|
23
|
+
</skill>
|
|
24
|
+
|
|
25
|
+
<objective>
|
|
26
|
+
Review the currently staged Git changes the way an *experienced human
|
|
27
|
+
reviewer* would - judging them *holistically* against the change's *own
|
|
28
|
+
intent* and against *correctness*, *design fit*, *clarity*, *robustness*,
|
|
29
|
+
and *project-convention conformance* - and emit a single *approve /
|
|
30
|
+
request-changes verdict* backed by *prioritized*, *severity-tagged*,
|
|
31
|
+
*line-cited* findings. This is a *synthesizing critique*, not a mechanical
|
|
32
|
+
scan: it complements `ase-code-lint` (mechanical quality), `ase-code-analyze`
|
|
33
|
+
(logic/semantics), and `ase-meta-diff` (intent narrative and risk).
|
|
34
|
+
</objective>
|
|
35
|
+
|
|
36
|
+
Procedure
|
|
37
|
+
---------
|
|
38
|
+
|
|
39
|
+
You *MUST* follow the following numbered items *strictly* *sequentially*!
|
|
40
|
+
You *MUST* not skip any numbered item during processing!
|
|
41
|
+
|
|
42
|
+
You *MUST* *NOT* output anything in this entire procedure, *except* when
|
|
43
|
+
explicitly requested by this procedure via outputs based on a <template/>!
|
|
44
|
+
|
|
45
|
+
<flow>
|
|
46
|
+
|
|
47
|
+
1. <step id="STEP 1: Determine Change Set">
|
|
48
|
+
|
|
49
|
+
1. Determine *whether there are staged changes at all* by running the
|
|
50
|
+
corresponding command (taken exactly as given) and capturing its
|
|
51
|
+
output - the bare *list of staged file names* - into <diff/>. This
|
|
52
|
+
is a lightweight gate; the full diff is fetched by the sub-agent
|
|
53
|
+
in STEP 2, so capturing only the file-name list here is sufficient:
|
|
54
|
+
|
|
55
|
+
`git diff --cached --name-only HEAD`
|
|
56
|
+
|
|
57
|
+
2. <if condition="<diff/> is empty">
|
|
58
|
+
Only output the following <template/> and then *STOP* immediately:
|
|
59
|
+
|
|
60
|
+
<template>
|
|
61
|
+
⧉ **ASE**: ✪ skill: **ase-meta-review**, ▶ status: **no changes to review**
|
|
62
|
+
</template>
|
|
63
|
+
</if>
|
|
64
|
+
|
|
65
|
+
</step>
|
|
66
|
+
|
|
67
|
+
2. <step id="STEP 2: Review Investigation">
|
|
68
|
+
|
|
69
|
+
First, use the following <template/> to give a hint on this step:
|
|
70
|
+
|
|
71
|
+
<template>
|
|
72
|
+
<ase-tpl-bullet-secondary/> **REVIEW INVESTIGATION**
|
|
73
|
+
</template>
|
|
74
|
+
|
|
75
|
+
Dispatch the review investigation to a *sub-agent* via the `Agent`
|
|
76
|
+
tool so that *no* investigation details leak into the user-visible
|
|
77
|
+
transcript. The sub-agent performs the silent reading, the read-only
|
|
78
|
+
repository probing, and the critique; only its final structured return
|
|
79
|
+
value is consumed here.
|
|
80
|
+
|
|
81
|
+
For this, invoke *exactly once* the tool:
|
|
82
|
+
|
|
83
|
+
```text
|
|
84
|
+
Agent(
|
|
85
|
+
name: "ase:ase-meta-review",
|
|
86
|
+
description: "Review Investigation",
|
|
87
|
+
subagent_type: "ase:ase-meta-review",
|
|
88
|
+
mode: "plan",
|
|
89
|
+
prompt: "Review the staged changes."
|
|
90
|
+
)
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Parse the single result message of the `Agent` tool as a JSON object,
|
|
94
|
+
set <summary/> to its `summary` field (a single crisp sentence
|
|
95
|
+
reconstructing the change's intent), and set <findings/> to its
|
|
96
|
+
`findings` field (a list).
|
|
97
|
+
|
|
98
|
+
Then *derive* the overall <verdict/> from <findings/>: set
|
|
99
|
+
<verdict/> to `REJECT - DEMANDS CHANGES` if *any* finding in
|
|
100
|
+
<findings/> has a `severity` field of `HIGH`; otherwise set
|
|
101
|
+
<verdict/> to `APPROVE`.
|
|
102
|
+
|
|
103
|
+
You *MUST* *NOT* output anything else in this STEP 2.
|
|
104
|
+
|
|
105
|
+
</step>
|
|
106
|
+
|
|
107
|
+
3. <step id="STEP 3: Verdict and Findings">
|
|
108
|
+
|
|
109
|
+
1. Use the following <template/> to output the overall review in
|
|
110
|
+
<verdict/> and the reconstructed intent <summary/>:
|
|
111
|
+
|
|
112
|
+
<template>
|
|
113
|
+
|
|
114
|
+
<ase-tpl-bullet-signal/> **REVIEW VERDICT**: **<verdict/>**
|
|
115
|
+
|
|
116
|
+
<ase-tpl-bullet-normal/> **CHANGE INTENT**: <summary/>
|
|
117
|
+
|
|
118
|
+
</template>
|
|
119
|
+
|
|
120
|
+
You *MUST* *NOT* output anything else in this STEP 3.
|
|
121
|
+
|
|
122
|
+
2. <if condition="<findings/> is empty">
|
|
123
|
+
Only output the following <template/> and then *SKIP* the
|
|
124
|
+
remainder of this STEP 3:
|
|
125
|
+
|
|
126
|
+
<template>
|
|
127
|
+
|
|
128
|
+
<ase-tpl-bullet-normal/> **NO FINDINGS**: the change is clean, nothing to flag.
|
|
129
|
+
|
|
130
|
+
</template>
|
|
131
|
+
</if>
|
|
132
|
+
|
|
133
|
+
3. <if condition="<findings/> is NOT empty">
|
|
134
|
+
Sort the findings by <severity/> from highest to lowest in the
|
|
135
|
+
fixed order `HIGH`, `MEDIUM`, `LOW`, `ACCEPTED`. Within the same
|
|
136
|
+
severity, keep the order returned by the sub-agent.
|
|
137
|
+
|
|
138
|
+
Then render a *three-column table* with one row per finding by
|
|
139
|
+
using the following output <template/>. For each finding, repeat
|
|
140
|
+
the third line, set <severity/> to its `severity` field, set
|
|
141
|
+
<dimension/> to its `dimension` field set <location/> to its
|
|
142
|
+
`location` field, and set <finding/> to its `finding` field.
|
|
143
|
+
|
|
144
|
+
In the <location/> column, markup the `file:line` reference
|
|
145
|
+
as code (with backticks) and prepend it with `▢ ` - keep the
|
|
146
|
+
sub-agent's own `:N` / `:N-M` line citation intact and do *not*
|
|
147
|
+
append any further line-count decoration.
|
|
148
|
+
|
|
149
|
+
Because the <finding/> text is free-form Markdown, *before*
|
|
150
|
+
emitting any row you *MUST* escape every literal `|` pipe
|
|
151
|
+
character inside <location/> and <finding/> as `\|` so it cannot
|
|
152
|
+
break the table column structure.
|
|
153
|
+
|
|
154
|
+
<template>
|
|
155
|
+
| Severity | Dimension | Finding |
|
|
156
|
+
| --------------- | ------------ | ----------------------- |
|
|
157
|
+
| **<severity/>** | <dimension/> | <location/>: <finding/> |
|
|
158
|
+
</template>
|
|
159
|
+
|
|
160
|
+
Keep the overall report *concise* and *brief*.
|
|
161
|
+
Do *not* output any further explanation.
|
|
162
|
+
</if>
|
|
163
|
+
|
|
164
|
+
</step>
|
|
165
|
+
|
|
166
|
+
</flow>
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
|
|
2
|
+
## NAME
|
|
3
|
+
|
|
4
|
+
`ase-meta-review` - Review Staged Changes
|
|
5
|
+
|
|
6
|
+
## SYNOPSIS
|
|
7
|
+
|
|
8
|
+
`ase-meta-review`
|
|
9
|
+
|
|
10
|
+
## DESCRIPTION
|
|
11
|
+
|
|
12
|
+
The `ase-meta-review` skill performs a *holistic*,
|
|
13
|
+
*human-reviewer-style* critique of the *staged* Git changes and emits a
|
|
14
|
+
single *approve* / *reject* **verdict** backed by *prioritized*,
|
|
15
|
+
*severity-tagged*, *line-cited* **findings**. Rather than scanning the
|
|
16
|
+
code mechanically, it first *reconstructs the change's own intent* and
|
|
17
|
+
then judges the diff *as a whole* against that intent - the way an
|
|
18
|
+
experienced reviewer would on a pull request.
|
|
19
|
+
|
|
20
|
+
The critique spans a fixed set of reviewer *dimensions*: **intent**
|
|
21
|
+
(does the diff do what it set out to, without scope creep or stray
|
|
22
|
+
residue), **correctness** (latent bugs, edge cases, broken
|
|
23
|
+
control/data flow), **design** (fit with the surrounding architecture,
|
|
24
|
+
naming, abstraction level), **clarity** (readability and
|
|
25
|
+
self-documentation for a future reader), **robustness** (error handling,
|
|
26
|
+
resource and concurrency safety), **security** and **performance** (risks
|
|
27
|
+
introduced by the change), **convention** (conformance to the
|
|
28
|
+
project's documented conventions - code style and the plan/spec/arch
|
|
29
|
+
formats described in `AGENTS.md` and the `ase-format-*` meta documents),
|
|
30
|
+
**testing** (inadequate coverage for the change - new or fixed behavior
|
|
31
|
+
left untested, adjacent tests not updated, or existing tests silently
|
|
32
|
+
broken, disabled, or weakened), and **documentation** (user- or
|
|
33
|
+
developer-facing docs - `README`, `CHANGELOG`, help text, or AI
|
|
34
|
+
guidance/meta documents - left stale by the change).
|
|
35
|
+
|
|
36
|
+
Each finding carries a *severity* - **HIGH**, **MEDIUM**, **LOW**, or
|
|
37
|
+
**ACCEPTED** (a concern that is contractually addressed or accepted as a
|
|
38
|
+
documented priority conflict) - and is *evidence-grounded*: it cites the
|
|
39
|
+
exact `file:line` location it stems from. The overall verdict is
|
|
40
|
+
**REJECT - DEMANDS CHANGES** when any *HIGH* finding remains, and
|
|
41
|
+
**APPROVE** otherwise. The work is performed by a dedicated `ase-meta-review`
|
|
42
|
+
sub-agent so that the silent reading and read-only repository probing
|
|
43
|
+
never leak into the transcript; only the structured verdict and findings
|
|
44
|
+
are rendered.
|
|
45
|
+
|
|
46
|
+
The skill *complements* rather than duplicates its neighbours:
|
|
47
|
+
`ase-code-lint` flags *mechanical* code-quality issues, `ase-code-analyze`
|
|
48
|
+
inspects *logic and semantics*, `ase-meta-diff` narrates *what changed*
|
|
49
|
+
(with optional coherence, risk, and blast-radius reports), and
|
|
50
|
+
`ase-meta-diaboli` *adversarially challenges a thesis* - whereas
|
|
51
|
+
`ase-meta-review` renders a *reviewer's judgement* on a concrete diff
|
|
52
|
+
before it is committed.
|
|
53
|
+
|
|
54
|
+
## ARGUMENTS
|
|
55
|
+
|
|
56
|
+
The `ase-meta-review` skill takes no arguments; it always reviews the
|
|
57
|
+
currently *staged* Git changes.
|
|
58
|
+
|
|
59
|
+
## EXAMPLES
|
|
60
|
+
|
|
61
|
+
Review the currently staged changes before committing:
|
|
62
|
+
|
|
63
|
+
```text
|
|
64
|
+
❯ /ase-meta-review
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## SEE ALSO
|
|
68
|
+
|
|
69
|
+
`ase-meta-diff`, `ase-meta-commit`, `ase-code-lint`, `ase-code-analyze`,
|
|
70
|
+
`ase-meta-diaboli`.
|