@rse/ase 0.9.65 → 0.9.67

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 (77) hide show
  1. package/dst/ase-hook.js +1 -1
  2. package/dst/ase-metric.js +103 -0
  3. package/dst/ase-mint.js +106 -0
  4. package/dst/ase-service.js +4 -0
  5. package/dst/ase-setup.js +133 -1
  6. package/dst/ase-spec.js +104 -40
  7. package/dst/ase-statusline.js +11 -2
  8. package/dst/ase.js +4 -0
  9. package/package.json +13 -12
  10. package/plugin/.claude-plugin/plugin.json +1 -1
  11. package/plugin/.codex-plugin/plugin.json +1 -1
  12. package/plugin/.github/plugin/plugin.json +1 -1
  13. package/plugin/agents/ase-docs-proofread.md +13 -7
  14. package/plugin/agents/ase-docs-refine.md +165 -0
  15. package/plugin/agents/ase-docs-shorten.md +182 -0
  16. package/plugin/package.json +4 -4
  17. package/plugin/skills/ase-arch-analyze/help.md +1 -1
  18. package/plugin/skills/ase-arch-discover/help.md +4 -4
  19. package/plugin/skills/ase-code-analyze/help.md +1 -1
  20. package/plugin/skills/ase-code-craft/help.md +7 -7
  21. package/plugin/skills/ase-code-dissect/help.md +5 -5
  22. package/plugin/skills/ase-code-edit/help.md +7 -7
  23. package/plugin/skills/ase-code-explain/help.md +1 -1
  24. package/plugin/skills/ase-code-insight/help.md +1 -1
  25. package/plugin/skills/ase-code-lint/help.md +5 -5
  26. package/plugin/skills/ase-code-refactor/help.md +6 -6
  27. package/plugin/skills/ase-code-resolve/help.md +6 -6
  28. package/plugin/skills/ase-docs-distill/help.md +2 -2
  29. package/plugin/skills/ase-docs-proofread/SKILL.md +16 -12
  30. package/plugin/skills/ase-docs-proofread/help.md +18 -8
  31. package/plugin/skills/ase-docs-refine/SKILL.md +396 -0
  32. package/plugin/skills/ase-docs-refine/help.md +104 -0
  33. package/plugin/skills/ase-docs-shorten/SKILL.md +527 -0
  34. package/plugin/skills/ase-docs-shorten/help.md +120 -0
  35. package/plugin/skills/ase-help-intent/help.md +1 -1
  36. package/plugin/skills/ase-help-skill/catalog.md +4 -1
  37. package/plugin/skills/ase-help-skill/help.md +1 -1
  38. package/plugin/skills/ase-meta-brainstorm/help.md +5 -5
  39. package/plugin/skills/ase-meta-chat/help.md +2 -2
  40. package/plugin/skills/ase-meta-config/help.md +3 -3
  41. package/plugin/skills/ase-meta-diaboli/help.md +2 -2
  42. package/plugin/skills/ase-meta-diff/help.md +3 -3
  43. package/plugin/skills/ase-meta-eli5/help.md +2 -2
  44. package/plugin/skills/ase-meta-evaluate/help.md +1 -1
  45. package/plugin/skills/ase-meta-mint/SKILL.md +157 -0
  46. package/plugin/skills/ase-meta-mint/help.md +114 -0
  47. package/plugin/skills/ase-meta-proximity/help.md +3 -3
  48. package/plugin/skills/ase-meta-quorum/help.md +2 -2
  49. package/plugin/skills/ase-meta-quotes/help.md +4 -4
  50. package/plugin/skills/ase-meta-review/help.md +1 -1
  51. package/plugin/skills/ase-meta-search/help.md +2 -2
  52. package/plugin/skills/ase-meta-steelman/help.md +3 -3
  53. package/plugin/skills/ase-meta-why/help.md +3 -3
  54. package/plugin/skills/ase-meta-workflow/SKILL.md +3 -2
  55. package/plugin/skills/ase-meta-workflow/help.md +4 -4
  56. package/plugin/skills/ase-meta-workflow/workflow.txt +8 -2
  57. package/plugin/skills/ase-spec-edit/SKILL.md +1 -1
  58. package/plugin/skills/ase-spec-edit/help.md +6 -6
  59. package/plugin/skills/ase-sync-export/SKILL.md +3 -1
  60. package/plugin/skills/ase-sync-export/help.md +1 -1
  61. package/plugin/skills/ase-sync-import/SKILL.md +1 -1
  62. package/plugin/skills/ase-sync-import/help.md +2 -2
  63. package/plugin/skills/ase-sync-reconcile/SKILL.md +1 -1
  64. package/plugin/skills/ase-sync-reconcile/help.md +4 -4
  65. package/plugin/skills/ase-task-condense/SKILL.md +7 -4
  66. package/plugin/skills/ase-task-condense/help.md +2 -2
  67. package/plugin/skills/ase-task-delete/help.md +1 -1
  68. package/plugin/skills/ase-task-dissect/help.md +5 -5
  69. package/plugin/skills/ase-task-edit/help.md +4 -4
  70. package/plugin/skills/ase-task-grill/help.md +3 -3
  71. package/plugin/skills/ase-task-id/help.md +1 -1
  72. package/plugin/skills/ase-task-implement/help.md +3 -3
  73. package/plugin/skills/ase-task-list/help.md +3 -3
  74. package/plugin/skills/ase-task-preflight/help.md +2 -2
  75. package/plugin/skills/ase-task-reboot/help.md +2 -2
  76. package/plugin/skills/ase-task-rename/help.md +1 -1
  77. package/plugin/skills/ase-task-view/help.md +2 -2
@@ -0,0 +1,396 @@
1
+ ---
2
+ name: ase-docs-refine
3
+ argument-hint: "[--help|-h] [--auto|-a] <docs-reference>"
4
+ description: >
5
+ Refine the sentence structure and style of the documents: shorten long sentences, replace
6
+ cumbersome nominal constructions with verbs, make enumerations parallel, strike filler words and
7
+ redundancy, fix awkward transitions, and adjust voice, while content, numbers, and technical terms
8
+ stay exactly as they are. Use when the user wants to "refine", "tighten", or "polish" the wording
9
+ of a document.
10
+ user-invocable: true
11
+ disable-model-invocation: false
12
+ effort: high
13
+ ---
14
+
15
+ @${CLAUDE_SKILL_DIR}/../../meta/ase-control.md
16
+ @${CLAUDE_SKILL_DIR}/../../meta/ase-skill.md
17
+ @${CLAUDE_SKILL_DIR}/../../meta/ase-dialog.md
18
+ @${CLAUDE_SKILL_DIR}/../../meta/ase-getopt.md
19
+
20
+ <purpose name="ase-docs-refine">
21
+ Refine the sentence structure and style of documents
22
+ </purpose>
23
+
24
+ <expand name="getopt"
25
+ arg1="ase-docs-refine"
26
+ arg2="--auto|-a">
27
+ $ARGUMENTS
28
+ </expand>
29
+
30
+ <objective>
31
+ *Refine* the documents of `<getopt-arguments/>` in their *sentence
32
+ structure*, *nominal style*, *parallelism*, *filler and redundancy*,
33
+ *transitions*, and *voice* and propose light rewritings: make long
34
+ sentences shorter, replace cumbersome nominal constructions with verbs,
35
+ bring enumerations into one grammatical shape, and strike filler words.
36
+ *Content, numbers, and technical terms stay exactly as they are.*
37
+ </objective>
38
+
39
+ Ground Rule
40
+ -----------
41
+
42
+ This skill performs *light rewriting* of awkward or unclear sentences,
43
+ *without reshaping the argument*. Every proposed change *MUST* preserve
44
+ the statement of the original text *exactly*: same facts, same numbers,
45
+ same technical terms, same qualifiers, same negations, same order of
46
+ the argument -- only the *wording* changes. A rewriting which shifts
47
+ the meaning even slightly is *not* a refinement and is *never* applied.
48
+
49
+ The rewriting stays *within* a sentence. Dropping a whole sentence,
50
+ paragraph, example, or list item for the sake of brevity is *length
51
+ reduction*, not refinement, and belongs to the `ase-docs-shorten` skill.
52
+
53
+ <flow>
54
+
55
+ 1. <step id="STEP 1: Investigation">
56
+
57
+ <if condition="<ase-project-boxing/> is equal `black`">
58
+
59
+ The project source artifacts are classified as a *black box*, so
60
+ the user does *not* want them inspected or their problems surfaced.
61
+ *Skip* the entire investigation and reporting: do *not* invoke any
62
+ `Glob` or `Agent` tool and do *not* read any document, only output
63
+ the following <template/> and then *SKIP* the remaining steps STEP 2
64
+ and STEP 3:
65
+
66
+ <template>
67
+ <ase-tpl-bullet-normal/> **REFINE**: *suppressed* (`project.boxing` is `black`)
68
+ </template>
69
+
70
+ </if>
71
+
72
+ First, use the following <template/> to give a hint on this step:
73
+
74
+ <template>
75
+ <ase-tpl-bullet-secondary/> **REFINEMENT INVESTIGATION**
76
+ </template>
77
+
78
+ Dispatch the investigation to *sub-agents* via the `Agent`
79
+ tool so that *no* investigation details leak into the user-visible
80
+ transcript. The sub-agents perform the silent reading and checking;
81
+ only their final structured return values are consumed here.
82
+
83
+ For this, first *silently* resolve `<getopt-arguments/>` to the
84
+ list <documents/> of individual document files, expanding any
85
+ directory or wildcard references with the `Glob` tool. Then
86
+ partition <documents/>, preserving order, into at most *eight*
87
+ batches of roughly equal size (a single document yields a single
88
+ batch), and invoke the following tool once per batch, emitting
89
+ *all* invocations *in one single message* so they run in
90
+ *parallel*:
91
+
92
+ ```text
93
+ Agent(
94
+ description: "Refine Investigation (<batch-index/>/<batch-count/>)",
95
+ subagent_type: "ase:ase-docs-refine",
96
+ prompt: <batch/>,
97
+ run_in_background: false
98
+ )
99
+ ```
100
+
101
+ Here <batch/> is the space-separated list of the document file
102
+ paths of the corresponding batch, <batch-index/> is the 1-based
103
+ index of that batch, and <batch-count/> is the total number of
104
+ batches, so that each parallel invocation is distinguishable in
105
+ the progress display.
106
+
107
+ Parse the result message of each `Agent` tool invocation as a JSON
108
+ array, concatenate all those arrays, sort the combined list by
109
+ `file` and then numerically by `line`, and set <problems/> to that
110
+ list.
111
+
112
+ You *MUST* *NOT* output anything at all in this STEP 1 beyond the
113
+ above hint template and the `Glob` and `Agent` tool invocations.
114
+ </step>
115
+
116
+ 2. <step id="STEP 2: Summary">
117
+
118
+ Use the following <template/> to give a summary of the detected
119
+ problems in <problems/>:
120
+
121
+ <template>
122
+ <ase-tpl-bullet-secondary/> **REFINEMENT SUMMARY**:
123
+
124
+ | *Refinement Type* | *Refinement Result* |
125
+ | ------------------- | ----------------------- |
126
+ | **STRUCTURE**: | **<s/>** problems found |
127
+ | **NOMINALIZATION**: | **<n/>** problems found |
128
+ | **PARALLELISM**: | **<p/>** problems found |
129
+ | **FILLER**: | **<f/>** problems found |
130
+ | **TRANSITION**: | **<t/>** problems found |
131
+ | **VOICE**: | **<v/>** problems found |
132
+
133
+ </template>
134
+
135
+ Hints:
136
+
137
+ - <s/> is the number of problems with `type` equal to `STRUCTURE` in <problems/>
138
+ - <n/> is the number of problems with `type` equal to `NOMINALIZATION` in <problems/>
139
+ - <p/> is the number of problems with `type` equal to `PARALLELISM` in <problems/>
140
+ - <f/> is the number of problems with `type` equal to `FILLER` in <problems/>
141
+ - <t/> is the number of problems with `type` equal to `TRANSITION` in <problems/>
142
+ - <v/> is the number of problems with `type` equal to `VOICE` in <problems/>
143
+
144
+ </step>
145
+
146
+ 3. <step id="STEP 3: Refinement">
147
+
148
+ 1. *Mark this skill as the active edit-capable skill* so that the
149
+ ASE `pre-tool-use` hook auto-approves the subsequent `Edit`
150
+ invocations on *any* invocation path (slash command *or* `Skill`
151
+ tool). Call the `ase_config_set(key: "agent.skill", val:
152
+ "ase-docs-refine", scope: "session:<ase-session-id/>")` tool
153
+ from the `ase` MCP server. Do not output anything in this substep.
154
+
155
+ *Critical safety invariant*: the marker set here grants `Edit`
156
+ auto-approval and *MUST* be cleared again (substep 3 below)
157
+ *before* this skill yields control, *regardless* of how the
158
+ iteration in substep 2 ends - whether it completes normally,
159
+ is aborted early (e.g. an `Edit` failure, an unparseable value,
160
+ or any other unexpected condition), or is otherwise interrupted.
161
+ If you ever stop or bail out of substep 2 early, you *MUST*
162
+ still perform substep 3 first. Never leave this marker active
163
+ for a later, unrelated `Edit`.
164
+
165
+ 2. Set <total/> to the number of problems in <problems/> and
166
+ <index/> to `0`. Then iterate over all problems:
167
+
168
+ <for items="<problems/>">
169
+
170
+ 1. Increment <index/> by one (the 1-based position of the
171
+ current <item/> within <problems/>).
172
+ Set <type/> to the `type` field of <item/>.
173
+ Set <file/> to the `file` field of <item/>.
174
+ Set <line/> to the `line` field of <item/>.
175
+ Set <description/> to the `description` field of <item/>.
176
+ Set <context-before/> to the `context_before` field of <item/>.
177
+ Set <old-text/> to the `old_text` field of <item/>.
178
+ Set <new-text/> to the `new_text` field of <item/>.
179
+ Set <context-after/> to the `context_after` field of <item/>.
180
+
181
+ Then *verify the Ground Rule* for this <item/>: compare
182
+ <new-text/> against <old-text/> and *drop* the <item/>
183
+ entirely -- continuing with the next <item/> without any
184
+ output -- whenever the rewriting shifts the meaning even
185
+ slightly, i.e., drops, adds, or alters a fact, a number, a
186
+ technical term, a qualifier, a negation, or a condition.
187
+
188
+ Then *normalize* the change to its *minimal* form, so
189
+ that the proposed diff shows exactly the lines the later
190
+ `Edit` will actually change: while the *first* line of
191
+ <old-text/> is identical to the *first* line of
192
+ <new-text/>, *move* that line from both to the end of
193
+ <context-before/> and increment <line/> by one; likewise,
194
+ while the *last* line of <old-text/> is identical to the
195
+ *last* line of <new-text/>, *move* that line from both to
196
+ the front of <context-after/>. Finally, *trim*
197
+ <context-before/> to its *last* two lines and
198
+ <context-after/> to its *first* two lines.
199
+
200
+ Then, unless <ase-project-boxing/> is equal `grey` (where
201
+ the full unified diff is suppressed and no context lines are
202
+ rendered at all), *silently* read the current content of
203
+ <file/> with the `Read` tool - reusing the content read for
204
+ the same <file/> earlier in this iteration, unless an `Edit`
205
+ was applied to it in between - and set <file-lines/> to its
206
+ lines, *stripped* of the line-number prefixes the tool adds.
207
+ Set <file-lines/> to empty if the file cannot be read.
208
+
209
+ Whenever <file-lines/> is non-empty, *re-derive* both
210
+ context parts from it, *overriding* the sub-agent supplied
211
+ values, so the rendered diff shows real context even when a
212
+ sub-agent supplied none: set <context-before/> to the *up to
213
+ two* lines of <file-lines/> directly *before* line <line/>
214
+ (empty if <line/> is `1`) and <context-after/> to the *up
215
+ to two* lines of <file-lines/> starting at line (<line/> +
216
+ <n/>), where <n/> is the number of lines in <old-text/>
217
+ (empty if that line is beyond the end of the document).
218
+ Keep the sub-agent supplied values only when <file-lines/>
219
+ is empty.
220
+
221
+ 2. Report the problem with the following <template/>:
222
+
223
+ <template>
224
+ <ase-tpl-bullet-signal/> [<index/>/<total/>]: **<type/> PROBLEM**: `<file/>`:<line/>:
225
+
226
+ <description/>
227
+ </template>
228
+
229
+ 3. <if condition="<getopt-option-auto/> is not equal `true` and <ase-project-boxing/> is equal `grey`">
230
+
231
+ The project source artifacts are classified as a *grey box*, so
232
+ the user does *not* want the full artifact internals surfaced:
233
+ *suppress* the full unified diff and instead show only a
234
+ *condensed* one-line representation. Determine <old-snippet/>
235
+ as the *single-line* collapse of <old-text/> (join its lines
236
+ with ` ⏎ `, or `∅` when <old-text/> is empty for a pure
237
+ insertion) and <new-snippet/> as the same collapse of
238
+ <new-text/> (or `∅` when empty for a pure deletion). Then
239
+ report the refinement with the following <template/>:
240
+
241
+ <template>
242
+
243
+ <ase-tpl-bullet-normal/> **<type/> REFINEMENT**: `<old-snippet/>` → `<new-snippet/>`
244
+
245
+ </template>
246
+
247
+ </if>
248
+ <elseif condition="<getopt-option-auto/> is not equal `true`">
249
+
250
+ Determine the hunk *body* as an ordered list of lines, each
251
+ carrying a one-character prefix (` ` for context, `-` for
252
+ old-side, `+` for new-side). Build it by concatenating, in
253
+ order and *skipping any part that is empty*:
254
+
255
+ - one ` `-prefixed line for *each* line of <context-before/>
256
+ (if non-empty),
257
+ - one `-`-prefixed line for *each* line of <old-text/>
258
+ (if non-empty; split <old-text/> on newlines),
259
+ - one `+`-prefixed line for *each* line of <new-text/>
260
+ (if non-empty; split <new-text/> on newlines),
261
+ - one ` `-prefixed line for *each* line of <context-after/>
262
+ (if non-empty).
263
+
264
+ Set <hunk-body/> to those prefixed lines joined by newlines.
265
+
266
+ Set <old-count/> to the number of old-side hunk lines, i.e.,
267
+ the combined line count of <context-before/>, <old-text/>, and
268
+ <context-after/> (each empty part counts as `0`).
269
+ Set <new-count/> to the number of new-side hunk lines, i.e.,
270
+ the combined line count of <context-before/>, <new-text/>, and
271
+ <context-after/> (each empty part counts as `0`).
272
+
273
+ Set <old-start/> to the 1-based line number of the *first*
274
+ old-side hunk line: if <context-before/> is non-empty, that is
275
+ the line of its *first* context line, i.e., <line/> minus the
276
+ number of lines in <context-before/>; otherwise it is <line/> itself
277
+ (the first line of <old-text/>). For a hunk that *only inserts*
278
+ new lines (empty <old-text/> *and* empty context), set it to the
279
+ line *before* which the insertion happens, clamped to a minimum
280
+ of `0`, so a top-of-file insertion yields `@@ -0,0 ... @@`.
281
+ Set <new-start/> to the same value as <old-start/>, but clamped
282
+ to a minimum of `1` whenever <new-count/> is greater than `0`
283
+ (the refined side then has a real first line).
284
+
285
+ Render the proposed refinement as a *unified diff* with *up to
286
+ two* lines of context in a fenced block based on the following
287
+ <template/>, emitting <hunk-body/> verbatim (one already-prefixed
288
+ line per line, with no extra blank or space-only lines):
289
+
290
+ <template>
291
+
292
+ <ase-tpl-bullet-normal/> **<type/> REFINEMENT**:
293
+
294
+ ```diff
295
+ --- <file/> (original)
296
+ +++ <file/> (refined)
297
+ @@ -<old-start/>,<old-count/> +<new-start/>,<new-count/> @@
298
+ <hunk-body/>
299
+ ```
300
+
301
+ </template>
302
+
303
+ </elseif>
304
+
305
+ 4. <if condition="<getopt-option-auto/> is not equal `true`">
306
+
307
+ In the following, you *MUST* *NOT* use your built-in
308
+ <user-dialog-tool/> tool! Instead, you *MUST* just show a
309
+ custom dialog according to the expanded `custom-dialog`
310
+ definition. You *MUST* closely follow this definition:
311
+
312
+ <expand name="custom-dialog" arg1="--other">
313
+ REFINEMENT: How would you like to proceed with this proposed refinement?
314
+ ACCEPT: Apply this proposed refinement.
315
+ REJECT: Skip this proposed refinement.
316
+ </expand>
317
+
318
+ </if>
319
+
320
+ <else>
321
+
322
+ Set <result>ACCEPT</result>.
323
+
324
+ </else>
325
+
326
+ 5. Check <result/> and dispatch accordingly:
327
+
328
+ - <if condition="<result/> is 'ACCEPT'">
329
+
330
+ Invoke the `Edit` tool to apply the change by replacing
331
+ <old-text/> with <new-text/> at <file/>:<line/>. The operation
332
+ will be auto-approved by the ASE `pre-tool-use` hook (which
333
+ tracks the active skill), so *no* interactive permission
334
+ prompt will appear. Then continue with the next <item/>.
335
+
336
+ </if>
337
+
338
+ - <if condition="<result/> starts with 'OTHER'">
339
+
340
+ Generate a *new* proposal for the *same* <item/>,
341
+ incorporating the user's free-text hint from <result/>
342
+ after the "OTHER:" prefix. *Reassign* <description/>,
343
+ <old-text/>, and <new-text/> to reflect this refined
344
+ proposal (<old-text/> stays anchored to the existing text
345
+ at <file/>:<line/>; <new-text/> and <description/> carry the
346
+ refinement) so the subsequent rendering and any `Edit` use
347
+ the new proposal rather than the original. Then *re-apply*
348
+ the minimal-form normalization of substep 1 to the refined
349
+ <old-text/> and <new-text/> (so the re-rendered diff again
350
+ shows exactly the changed lines) and *go back* to substep 2
351
+ of this `for`-iteration. There is *no* cap on
352
+ refinement rounds - keep refining until the user picks
353
+ `ACCEPT` or `REJECT`.
354
+
355
+ </if>
356
+
357
+ - <if condition="
358
+ <result/> is 'REJECT' or
359
+ <result/> is 'CANCEL' or
360
+ <result/> starts with 'ERROR'
361
+ ">
362
+
363
+ Skip this <item/> without any `Edit` call and continue
364
+ with the next <item/>.
365
+
366
+ </if>
367
+
368
+ </for>
369
+
370
+ 3. *Clear the active edit-capable skill marker* now that all `Edit`
371
+ invocations are done, so a later unrelated `Edit` is *not*
372
+ auto-approved. Call the `ase_config_delete(key: "agent.skill",
373
+ scope: "session:<ase-session-id/>")` tool from the `ase` MCP
374
+ server. Do not output anything in this substep.
375
+
376
+ 4. You *MUST* *NOT* output any further additional explanations or
377
+ summaries at the end of this skill processing, except for the
378
+ following final <template/>:
379
+
380
+ <template>
381
+ <ase-tpl-bullet-secondary/> **REFINE FINISHED**
382
+ </template>
383
+
384
+ 5. Finally, give the closing hint by expanding the following
385
+ (which, depending on the configured <ase-guidance-level/>, may
386
+ expand into nothing and hence emit no output at all):
387
+
388
+ <if condition="<getopt-option-auto/> is not equal `true`">
389
+ <ase-tpl-hint level="verbose">
390
+ Use `/ase-docs-refine --auto` to apply all refinements unattended.
391
+ </ase-tpl-hint>
392
+ </if>
393
+
394
+ </step>
395
+
396
+ </flow>
@@ -0,0 +1,104 @@
1
+
2
+ ## NAME
3
+
4
+ `ase-docs-refine` - Refine Document Wording
5
+
6
+ ## SYNOPSIS
7
+
8
+ `ase-docs-refine`
9
+ [`--help`|`-h`]
10
+ [`--auto`|`-a`]
11
+ *docs-reference*
12
+
13
+ ## DESCRIPTION
14
+
15
+ The `ase-docs-refine` skill performs a *light rewriting* of awkward or
16
+ unclear sentences in the referenced documents, *without reshaping the
17
+ argument*: restructuring sentences for rhythm and clarity, making
18
+ enumerations parallel, cutting filler and redundancy, fixing awkward
19
+ transitions, and adjusting voice. *Content, numbers, and technical
20
+ terms stay exactly as they are.* The investigation is dispatched to a
21
+ sub-agent (`ase:ase-docs-refine`) so that scanning details do not leak
22
+ into the user-visible transcript.
23
+
24
+ The checked refinement types are:
25
+
26
+ 1. *Structure*: overlong, convoluted, or awkwardly built sentences,
27
+ split or restructured for rhythm and clarity.
28
+
29
+ 2. *Nominalization*: cumbersome nominal constructions, replaced with
30
+ plain verbs.
31
+
32
+ 3. *Parallelism*: non-parallel enumerations, brought into one
33
+ grammatical shape - a list whose items mix noun phrases,
34
+ imperatives, and full sentences, a heading set mixing gerunds and
35
+ nouns, or an inline series whose members do not share their form.
36
+
37
+ 4. *Filler*: filler words, empty intensifiers, and redundant
38
+ restatements, struck.
39
+
40
+ 5. *Transition*: abrupt or misleading transitions between sentences or
41
+ paragraphs, smoothed. An existing transition is only smoothed or
42
+ removed - a connective is *never* inserted where the original
43
+ asserted no such relation, as that would add a logical claim.
44
+
45
+ 6. *Voice*: needless passive voice turned active, needless hedging
46
+ struck, and shifts in grammatical person or mood aligned with the
47
+ rest of the document.
48
+
49
+ The rewriting always stays *within* a sentence. Dropping a whole
50
+ sentence, paragraph, example, or list item for the sake of brevity is
51
+ *length reduction*, not refinement, and belongs to
52
+ [`ase-docs-shorten`](../ase-docs-shorten/help.md). The recommended order
53
+ over one document is `ase-docs-shorten` first (cut the bulk), then
54
+ `ase-docs-refine` (polish what survives), then `ase-docs-proofread`
55
+ (final correctness pass), so no polishing effort is spent on text which
56
+ is later dropped.
57
+
58
+ For each detected problem, the skill renders a unified-diff
59
+ *REFINEMENT* preview and either asks the user to `ACCEPT` or `REJECT`
60
+ the proposed refinement interactively (or refine it via a free-text
61
+ hint, which re-proposes the refinement without limit) or - with
62
+ `--auto` - applies all refinements automatically. A proposal which
63
+ shifts the meaning even slightly - a lost negation, a changed
64
+ qualifier, a renamed technical term - is dropped instead of applied.
65
+
66
+ ## OPTIONS
67
+
68
+ - `--auto`|`-a`:
69
+ Automatically apply every proposed refinement without asking the
70
+ user via the interactive dialog.
71
+
72
+ ## ARGUMENTS
73
+
74
+ - *docs-reference*:
75
+ A file, directory, or other reference to the documents to
76
+ refine.
77
+
78
+ ## SCENARIOS
79
+
80
+ - You want long, convoluted sentences broken into readable ones
81
+ - You want nominal style like "perform a validation of" turned into verbs
82
+ - You want a bullet list of mixed noun phrases and sentences made parallel
83
+ - You want filler words and redundant restatements struck
84
+ - You want abrupt transitions between paragraphs smoothed
85
+ - You want needless passive voice or hedging adjusted
86
+ - You want the wording polished without touching facts or figures
87
+
88
+ ## EXAMPLES
89
+
90
+ Refine a single document interactively:
91
+
92
+ ```text
93
+ ❯ /ase-docs-refine README.md
94
+ ```
95
+
96
+ Refine an entire documentation directory automatically:
97
+
98
+ ```text
99
+ ❯ /ase-docs-refine --auto docs/
100
+ ```
101
+
102
+ ## SEE ALSO
103
+
104
+ [`ase-docs-shorten`](../ase-docs-shorten/help.md), [`ase-docs-proofread`](../ase-docs-proofread/help.md), [`ase-docs-distill`](../ase-docs-distill/help.md).