1---2name: ase-meta-review3description: Perform a holistic, human-reviewer-style critique of the currently staged Git changes and emit an approve/reject verdict with prioritized, severity-tagged, line-cited findings. Use when the user wants the staged diff "reviewed", "critiqued", or "code-reviewed" before committing.4---5
6@${CLAUDE_SKILL_DIR}/../../meta/ase-control.md
7@${CLAUDE_SKILL_DIR}/../../meta/ase-skill.md
8@${CLAUDE_SKILL_DIR}/../../meta/ase-getopt.md
9
10<skill name="ase-meta-review">
11Review Staged Changes
12</skill>
13
14<expand name="getopt"
15 arg1="ase-meta-review"
16 arg2="--severity|-S=(LOW|MEDIUM|HIGH)">
17 $ARGUMENTS
18</expand>
19
20<objective>
21Review the currently staged Git changes the way an *experienced human
22reviewer* would - judging them *holistically* against the change's *own
23intent* and against *correctness*, *design fit*, *clarity*, *robustness*,
24and *project-convention conformance* - and emit a single *approve /
25request-changes verdict* backed by *prioritized*, *severity-tagged*,
26*line-cited* findings. This is a *synthesizing critique*, not a mechanical
27scan: it complements `ase-code-lint` (mechanical quality), `ase-code-analyze`
28(logic/semantics), and `ase-meta-diff` (intent narrative and risk).
29</objective>
30
31Procedure
32---------
33
34<flow>
35
361. <step id="STEP 1: Determine Change Set">
37
38 1. Determine *whether there are staged changes at all* by running the
39 corresponding command (taken exactly as given) and capturing its
40 output - the bare *list of staged file names* - into <diff/>. This
41 is a lightweight gate; the full diff is fetched by the sub-agent
42 in STEP 2, so capturing only the file-name list here is sufficient:
43
44 `git diff --cached --name-only HEAD`
45
46 2. <if condition="<diff/> is empty">
47 Only output the following <template/> and then *STOP* immediately:
48
49 <template>
50 ⧉ **ASE**: ✪ skill: **ase-meta-review**, ▶ status: **no changes to review**
51 </template>
52 </if>
53
54 </step>
55
562. <step id="STEP 2: Review Investigation">
57
58 First, use the following <template/> to give a hint on this step:
59
60 <template>
61 <ase-tpl-bullet-secondary/> **REVIEW INVESTIGATION**
62 </template>
63
64 Dispatch the review investigation to a *sub-agent* via the `Agent`
65 tool so that *no* investigation details leak into the user-visible
66 transcript. The sub-agent performs the silent reading, the read-only
67 repository probing, and the critique; only its final structured return
68 value is consumed here.
69
70 For this, invoke *exactly once* the tool:
71
72 ```text
73 Agent(
74 name: "ase-meta-review",
75 description: "Review Investigation",
76 subagent_type: "ase:ase-meta-review",
77 mode: "plan",
78 prompt: "Review the staged changes."
79 )
80 ```
81
82 Parse the single result message of the `Agent` tool as a JSON object,
83 set <summary/> to its `summary` field (a single crisp sentence
84 reconstructing the change's intent), and set <findings/> to its
85 `findings` field (a list).
86
87 Then *derive* the overall <verdict/> from <findings/>: set
88 <verdict/> to `REJECT - DEMANDS CHANGES` if *any* finding in
89 <findings/> has a `severity` field of `HIGH`; otherwise set
90 <verdict/> to `APPROVE`. The verdict is derived *before* the
91 severity floor below, so the floor only affects which findings are
92 *rendered*, never the verdict.
93
94 Then *apply the severity floor* selected via <getopt-option-severity/>
95 (default `LOW`): define the ordinal rank `LOW`=1, `MEDIUM`=2,
96 `HIGH`=3. *Keep* a finding in <findings/> if and only if its
97 `severity` field is `ACCEPTED` *or* `rank(severity)` is greater than
98 or equal to `rank(<getopt-option-severity/>)`; *silently drop* all
99 other findings. With the default floor `LOW`, all findings are kept.
100 `ACCEPTED` findings are *never* dropped.
101
102 You *MUST* *NOT* output anything else in this STEP 2.
103
104 </step>
105
1063. <step id="STEP 3: Verdict and Findings">
107
108 1. Use the following <template/> to output the overall review in
109 <verdict/> and the reconstructed intent <summary/>:
110
111 <template>
112
113 <ase-tpl-bullet-signal/> **REVIEW VERDICT**: **<verdict/>**
114
115 <ase-tpl-bullet-normal/> **CHANGE INTENT**: <summary/>
116
117 </template>
118
119 You *MUST* *NOT* output anything else in this STEP 3.1.
120
121 2. <if condition="<findings/> is empty">
122 Only output the following <template/> and then *SKIP* the
123 remainder of this STEP 3:
124
125 <template>
126
127 <ase-tpl-bullet-normal/> **NO FINDINGS**: the change is clean, nothing to flag.
128
129 </template>
130 </if>
131
132 3. <if condition="<findings/> is NOT empty">
133 Sort the findings by <severity/> from highest to lowest in the
134 fixed order `HIGH`, `MEDIUM`, `LOW`, `ACCEPTED`. Within the same
135 severity, keep the order returned by the sub-agent.
136
137 Then render a *three-column table* with one row per finding by
138 using the following output <template/>. For each finding, repeat
139 the third line, set <severity/> to its `severity` field, set
140 <dimension/> to its `dimension` field set <location/> to its
141 `location` field, and set <finding/> to its `finding` field.
142
143 In the <location/> column, markup the `file:line` reference
144 as code (with backticks) and prepend it with `▢ ` - keep the
145 sub-agent's own `:N` / `:N-M` line citation intact and do *not*
146 append any further line-count decoration.
147
148 Because the <finding/> text is free-form Markdown, *before*
149 emitting any row you *MUST* escape every literal `|` pipe
150 character inside <location/> and <finding/> as `\|` so it cannot
151 break the table column structure.
152
153 <template>
154 | Severity | Dimension | Finding |
155 | --------------- | ------------ | ----------------------- |
156 | **<severity/>** | <dimension/> | <location/>: <finding/> |
157 </template>
158
159 Keep the overall report *concise* and *brief*.
160 Do *not* output any further explanation.
161 </if>
162
163 </step>
164
165</flow>