@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.
- package/dst/ase-hook.js +1 -1
- package/dst/ase-metric.js +103 -0
- package/dst/ase-mint.js +106 -0
- package/dst/ase-service.js +4 -0
- package/dst/ase-setup.js +133 -1
- package/dst/ase-spec.js +104 -40
- package/dst/ase-statusline.js +11 -2
- package/dst/ase.js +4 -0
- package/package.json +13 -12
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/.codex-plugin/plugin.json +1 -1
- package/plugin/.github/plugin/plugin.json +1 -1
- package/plugin/agents/ase-docs-proofread.md +13 -7
- package/plugin/agents/ase-docs-refine.md +165 -0
- package/plugin/agents/ase-docs-shorten.md +182 -0
- package/plugin/package.json +4 -4
- package/plugin/skills/ase-arch-analyze/help.md +1 -1
- package/plugin/skills/ase-arch-discover/help.md +4 -4
- package/plugin/skills/ase-code-analyze/help.md +1 -1
- package/plugin/skills/ase-code-craft/help.md +7 -7
- package/plugin/skills/ase-code-dissect/help.md +5 -5
- package/plugin/skills/ase-code-edit/help.md +7 -7
- package/plugin/skills/ase-code-explain/help.md +1 -1
- package/plugin/skills/ase-code-insight/help.md +1 -1
- package/plugin/skills/ase-code-lint/help.md +5 -5
- package/plugin/skills/ase-code-refactor/help.md +6 -6
- package/plugin/skills/ase-code-resolve/help.md +6 -6
- package/plugin/skills/ase-docs-distill/help.md +2 -2
- package/plugin/skills/ase-docs-proofread/SKILL.md +16 -12
- package/plugin/skills/ase-docs-proofread/help.md +18 -8
- package/plugin/skills/ase-docs-refine/SKILL.md +396 -0
- package/plugin/skills/ase-docs-refine/help.md +104 -0
- package/plugin/skills/ase-docs-shorten/SKILL.md +527 -0
- package/plugin/skills/ase-docs-shorten/help.md +120 -0
- package/plugin/skills/ase-help-intent/help.md +1 -1
- package/plugin/skills/ase-help-skill/catalog.md +4 -1
- package/plugin/skills/ase-help-skill/help.md +1 -1
- package/plugin/skills/ase-meta-brainstorm/help.md +5 -5
- package/plugin/skills/ase-meta-chat/help.md +2 -2
- package/plugin/skills/ase-meta-config/help.md +3 -3
- package/plugin/skills/ase-meta-diaboli/help.md +2 -2
- package/plugin/skills/ase-meta-diff/help.md +3 -3
- package/plugin/skills/ase-meta-eli5/help.md +2 -2
- package/plugin/skills/ase-meta-evaluate/help.md +1 -1
- package/plugin/skills/ase-meta-mint/SKILL.md +157 -0
- package/plugin/skills/ase-meta-mint/help.md +114 -0
- package/plugin/skills/ase-meta-proximity/help.md +3 -3
- package/plugin/skills/ase-meta-quorum/help.md +2 -2
- package/plugin/skills/ase-meta-quotes/help.md +4 -4
- package/plugin/skills/ase-meta-review/help.md +1 -1
- package/plugin/skills/ase-meta-search/help.md +2 -2
- package/plugin/skills/ase-meta-steelman/help.md +3 -3
- package/plugin/skills/ase-meta-why/help.md +3 -3
- package/plugin/skills/ase-meta-workflow/SKILL.md +3 -2
- package/plugin/skills/ase-meta-workflow/help.md +4 -4
- package/plugin/skills/ase-meta-workflow/workflow.txt +8 -2
- package/plugin/skills/ase-spec-edit/SKILL.md +1 -1
- package/plugin/skills/ase-spec-edit/help.md +6 -6
- package/plugin/skills/ase-sync-export/SKILL.md +3 -1
- package/plugin/skills/ase-sync-export/help.md +1 -1
- package/plugin/skills/ase-sync-import/SKILL.md +1 -1
- package/plugin/skills/ase-sync-import/help.md +2 -2
- package/plugin/skills/ase-sync-reconcile/SKILL.md +1 -1
- package/plugin/skills/ase-sync-reconcile/help.md +4 -4
- package/plugin/skills/ase-task-condense/SKILL.md +7 -4
- package/plugin/skills/ase-task-condense/help.md +2 -2
- package/plugin/skills/ase-task-delete/help.md +1 -1
- package/plugin/skills/ase-task-dissect/help.md +5 -5
- package/plugin/skills/ase-task-edit/help.md +4 -4
- package/plugin/skills/ase-task-grill/help.md +3 -3
- package/plugin/skills/ase-task-id/help.md +1 -1
- package/plugin/skills/ase-task-implement/help.md +3 -3
- package/plugin/skills/ase-task-list/help.md +3 -3
- package/plugin/skills/ase-task-preflight/help.md +2 -2
- package/plugin/skills/ase-task-reboot/help.md +2 -2
- package/plugin/skills/ase-task-rename/help.md +1 -1
- package/plugin/skills/ase-task-view/help.md +2 -2
package/dst/ase-statusline.js
CHANGED
|
@@ -209,7 +209,7 @@ export default class StatuslineCommand {
|
|
|
209
209
|
.option("-p, --padding <n>", "pad each rendered line with <n> spaces on each side", parseInteger("--padding"), 0)
|
|
210
210
|
.option("--no-icons", "disable icons in placeholder rendering")
|
|
211
211
|
.option("--no-labels", "disable labels in front of bold values")
|
|
212
|
-
.argument("[lines...]", "one or more template lines with %u %p %T %s %m %e %t %O %P %h %c %C %a %r " +
|
|
212
|
+
.argument("[lines...]", "one or more template lines with %u %p %T %s %m %e %t %O %P %h %B %c %C %a %r " +
|
|
213
213
|
"%S %D %W %Q %H %X %b %g %G %d %M %V placeholders and <color>...</color> markup " +
|
|
214
214
|
"(color: black, red, green, yellow, blue, magenta, cyan, white, default) " +
|
|
215
215
|
"(default: single line \"%m %e %t\")")
|
|
@@ -285,23 +285,27 @@ export default class StatuslineCommand {
|
|
|
285
285
|
let taskId = process.env.ASE_TASK_ID ?? "";
|
|
286
286
|
let persona = process.env.ASE_PERSONA_STYLE ?? "";
|
|
287
287
|
let guidance = process.env.ASE_GUIDANCE_LEVEL ?? "";
|
|
288
|
+
let boxing = process.env.ASE_PROJECT_BOXING ?? "";
|
|
288
289
|
try {
|
|
289
290
|
const cfg = new Config("config", configSchema, this.log, parseScope(`session:${getSession()}`));
|
|
290
291
|
cfg.read("lenient");
|
|
291
292
|
const t = String(cfg.get("agent.task") ?? "").trim();
|
|
292
293
|
const p = String(cfg.get("agent.persona") ?? "").trim();
|
|
293
294
|
const g = String(cfg.get("agent.guidance") ?? "").trim();
|
|
295
|
+
const b = String(cfg.get("project.boxing") ?? "").trim();
|
|
294
296
|
if (t !== "")
|
|
295
297
|
taskId = t;
|
|
296
298
|
if (p !== "")
|
|
297
299
|
persona = p;
|
|
298
300
|
if (g !== "")
|
|
299
301
|
guidance = g;
|
|
302
|
+
if (b !== "")
|
|
303
|
+
boxing = b;
|
|
300
304
|
}
|
|
301
305
|
catch (_e) {
|
|
302
306
|
/* cascade unavailable; keep env-var fallbacks */
|
|
303
307
|
}
|
|
304
|
-
return { taskId, persona, guidance };
|
|
308
|
+
return { taskId, persona, guidance, boxing };
|
|
305
309
|
});
|
|
306
310
|
const getModel = memoize(() => {
|
|
307
311
|
const display = data.model?.display_name ?? "";
|
|
@@ -361,6 +365,11 @@ export default class StatuslineCommand {
|
|
|
361
365
|
if (guidance !== "")
|
|
362
366
|
emit(`${prefix("▶", "guidance")}${c.bold(guidance)}`);
|
|
363
367
|
},
|
|
368
|
+
B: () => {
|
|
369
|
+
const { boxing } = getCfg();
|
|
370
|
+
if (boxing !== "")
|
|
371
|
+
emit(`${prefix("▢", "boxing")}${c.bold(boxing)}`);
|
|
372
|
+
},
|
|
364
373
|
/* ==== CONTEXT ==== */
|
|
365
374
|
c: () => {
|
|
366
375
|
const pct = Math.min(100, Math.max(0, Math.floor(data.context_window?.used_percentage ?? 0)));
|
package/dst/ase.js
CHANGED
|
@@ -19,6 +19,8 @@ import MetaCommand from "./ase-meta.js";
|
|
|
19
19
|
import CompatCommand from "./ase-compat.js";
|
|
20
20
|
import DiagramCommand from "./ase-diagram.js";
|
|
21
21
|
import WorktreeCommand from "./ase-worktree.js";
|
|
22
|
+
import MintCommand from "./ase-mint.js";
|
|
23
|
+
import MetricCommand from "./ase-metric.js";
|
|
22
24
|
import pkg from "../package.json" with { type: "json" };
|
|
23
25
|
/* globally initialize logger */
|
|
24
26
|
const log = new Log("ase", "info", "-");
|
|
@@ -60,6 +62,8 @@ const main = async () => {
|
|
|
60
62
|
new CompatCommand().register(program);
|
|
61
63
|
new DiagramCommand(log).register(program);
|
|
62
64
|
new WorktreeCommand().register(program);
|
|
65
|
+
new MintCommand().register(program);
|
|
66
|
+
new MetricCommand().register(program);
|
|
63
67
|
/* parse program arguments */
|
|
64
68
|
await program.parseAsync(process.argv);
|
|
65
69
|
/* gracefully terminate */
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"homepage": "https://ase.tools",
|
|
7
7
|
"repository": { "url": "git+https://github.com/rse/ase.git", "type": "git" },
|
|
8
8
|
"bugs": { "url": "https://github.com/rse/ase/issues" },
|
|
9
|
-
"version": "0.9.
|
|
9
|
+
"version": "0.9.67",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"author": {
|
|
12
12
|
"name": "Dr. Ralf S. Engelschall",
|
|
@@ -16,21 +16,21 @@
|
|
|
16
16
|
"type": "module",
|
|
17
17
|
"bin": { "ase": "bin/ase" },
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"eslint": "10.
|
|
19
|
+
"eslint": "10.10.0",
|
|
20
20
|
"@eslint/js": "10.0.1",
|
|
21
|
-
"@typescript-eslint/parser": "8.
|
|
22
|
-
"@typescript-eslint/eslint-plugin": "8.
|
|
23
|
-
"typescript-eslint": "8.
|
|
21
|
+
"@typescript-eslint/parser": "8.69.0",
|
|
22
|
+
"@typescript-eslint/eslint-plugin": "8.69.0",
|
|
23
|
+
"typescript-eslint": "8.69.0",
|
|
24
24
|
"eslint-plugin-promise": "7.3.0",
|
|
25
25
|
"neostandard": "0.14.0-next.1",
|
|
26
|
-
"globals": "17.
|
|
26
|
+
"globals": "17.12.0",
|
|
27
27
|
"typescript": "6.0.3",
|
|
28
28
|
|
|
29
29
|
"@rse/stx": "1.1.6",
|
|
30
30
|
"nodemon": "3.1.14",
|
|
31
31
|
"shx": "0.4.0",
|
|
32
32
|
|
|
33
|
-
"@types/node": "26.
|
|
33
|
+
"@types/node": "26.4.1",
|
|
34
34
|
"@types/luxon": "3.7.5",
|
|
35
35
|
"@types/which": "3.0.4",
|
|
36
36
|
"@types/update-notifier": "6.0.8",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"commander": "15.0.0",
|
|
45
|
-
"@dotenvx/dotenvx": "2.
|
|
45
|
+
"@dotenvx/dotenvx": "2.23.0",
|
|
46
46
|
"yaml": "2.9.0",
|
|
47
47
|
"valibot": "1.4.2",
|
|
48
48
|
"execa": "10.0.1",
|
|
@@ -51,11 +51,11 @@
|
|
|
51
51
|
"beautiful-mermaid": "1.1.3",
|
|
52
52
|
"cli-table3": "0.6.5",
|
|
53
53
|
"chalk": "6.0.0",
|
|
54
|
-
"pretty-ms": "9.3.
|
|
54
|
+
"pretty-ms": "9.3.1",
|
|
55
55
|
"luxon": "3.7.2",
|
|
56
56
|
"@modelcontextprotocol/sdk": "1.30.0",
|
|
57
57
|
"json-asty": "1.3.4",
|
|
58
|
-
"zod": "4.4
|
|
58
|
+
"zod": "4.5.4",
|
|
59
59
|
"which": "7.0.0",
|
|
60
60
|
"update-notifier": "7.3.1",
|
|
61
61
|
"shell-quote": "1.10.0",
|
|
@@ -66,8 +66,9 @@
|
|
|
66
66
|
"ofetch": "1.5.1",
|
|
67
67
|
"picomatch": "4.0.7",
|
|
68
68
|
"lru-cache": "11.5.2",
|
|
69
|
-
"@rse/specbook": "1.
|
|
70
|
-
"source-code-error": "1.2.0"
|
|
69
|
+
"@rse/specbook": "1.2.7",
|
|
70
|
+
"source-code-error": "1.2.0",
|
|
71
|
+
"pure-uuid": "2.0.0"
|
|
71
72
|
},
|
|
72
73
|
"allowScripts": {
|
|
73
74
|
"fsevents": true
|
|
@@ -20,19 +20,25 @@ Workflow
|
|
|
20
20
|
types:
|
|
21
21
|
|
|
22
22
|
- **Spelling**
|
|
23
|
+
- **Capitalization**
|
|
23
24
|
- **Punctuation**
|
|
25
|
+
- **Word-Break**
|
|
24
26
|
- **Grammar**
|
|
25
27
|
|
|
26
|
-
Do *NOT* flag stylistic preferences
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
Do *NOT* flag stylistic preferences such as awkward sentence structure,
|
|
29
|
+
nominal style, non-parallel enumerations, filler words, rough transitions,
|
|
30
|
+
or passive voice (these belong to the `ase-docs-refine` skill), do *NOT*
|
|
31
|
+
propose deletions of whole sentences, paragraphs, examples, or list items
|
|
32
|
+
for the sake of brevity (these belong to the `ase-docs-shorten` skill), and
|
|
33
|
+
do *NOT* flag Markdown formatting choices, code/identifiers, XML/template
|
|
34
|
+
tags, technical terms, list/heading style, or anything inside fenced code
|
|
35
|
+
blocks or backtick spans. Be conservative — only report clear, objective
|
|
36
|
+
errors.
|
|
31
37
|
|
|
32
38
|
For *each* found problem:
|
|
33
39
|
|
|
34
|
-
1. Set <type/> to the string `SPELLING`, `
|
|
35
|
-
`GRAMMAR`, indicating the problem type.
|
|
40
|
+
1. Set <type/> to the string `SPELLING`, `CAPITALIZATION`,
|
|
41
|
+
`PUNCTUATION`, `WORD-BREAK`, or `GRAMMAR`, indicating the problem type.
|
|
36
42
|
|
|
37
43
|
2. Set <file/> to the *relative* filename path of the document.
|
|
38
44
|
Set <line/> to the numeric 1-based line number in the
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ase-docs-refine
|
|
3
|
+
description: "Refine Investigation"
|
|
4
|
+
effort: high
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Your role is an experienced, *expert-level line editor*.
|
|
8
|
+
|
|
9
|
+
Your objective is to *analyze* the documents for awkward or unclear
|
|
10
|
+
*sentence structure*, *nominal style*, *non-parallel enumerations*,
|
|
11
|
+
*filler and redundancy*, *awkward transitions*, and *inadequate voice*
|
|
12
|
+
and propose light rewritings.
|
|
13
|
+
|
|
14
|
+
Ground Rule
|
|
15
|
+
-----------
|
|
16
|
+
|
|
17
|
+
You perform *light rewriting* of awkward or unclear sentences, *without
|
|
18
|
+
reshaping the argument*: *content*, *numbers*, and *technical terms*
|
|
19
|
+
stay *exactly* as they are. A rewriting which drops, adds, or shifts a
|
|
20
|
+
statement -- a lost negation, a changed qualifier ("up to 30 percent"
|
|
21
|
+
becoming "about 30 percent"), a dropped condition, a renamed technical
|
|
22
|
+
term -- is *NOT* a refinement and *MUST* *NOT* be reported at all.
|
|
23
|
+
|
|
24
|
+
You rewrite *within* a sentence. Dropping a whole sentence, paragraph,
|
|
25
|
+
example, or list item because it earns too little for its length is
|
|
26
|
+
*length reduction*, not refinement, and belongs to the `ase-docs-shorten`
|
|
27
|
+
skill. Never propose such a deletion here.
|
|
28
|
+
|
|
29
|
+
Workflow
|
|
30
|
+
--------
|
|
31
|
+
|
|
32
|
+
1. Use the `Read` tool to read all document files referenced
|
|
33
|
+
by `$ARGUMENTS`.
|
|
34
|
+
|
|
35
|
+
2. Set <problems/> to empty.
|
|
36
|
+
Then check the contained texts *only* for the following problem
|
|
37
|
+
types:
|
|
38
|
+
|
|
39
|
+
- **Structure**: overlong, convoluted, or awkwardly built sentences
|
|
40
|
+
which should be split or restructured for rhythm and clarity.
|
|
41
|
+
- **Nominalization**: cumbersome nominal constructions which should
|
|
42
|
+
be replaced with plain verbs.
|
|
43
|
+
- **Parallelism**: non-parallel enumerations which should be brought
|
|
44
|
+
into one grammatical shape -- a bullet or numbered list whose items
|
|
45
|
+
mix noun phrases, imperatives, and full sentences, a heading set
|
|
46
|
+
mixing gerunds and nouns, or an inline series whose members do not
|
|
47
|
+
share their form ("A, B, and to C").
|
|
48
|
+
- **Filler**: filler words, empty intensifiers, and redundant
|
|
49
|
+
restatements which should be struck.
|
|
50
|
+
- **Transition**: abrupt or misleading transitions between
|
|
51
|
+
sentences or paragraphs which should be smoothed. You may only
|
|
52
|
+
*smooth* or *remove* a transition which is already there; you
|
|
53
|
+
*MUST* *NOT* insert a connective ("therefore", "however", "thus")
|
|
54
|
+
where the original asserted no such relation, because that adds a
|
|
55
|
+
logical claim and hence violates the Ground Rule.
|
|
56
|
+
- **Voice**: needless passive voice which should become active,
|
|
57
|
+
needless hedging ("it seems", "somewhat", "rather"), and shifts in
|
|
58
|
+
grammatical person or mood which break with the rest of the
|
|
59
|
+
document.
|
|
60
|
+
|
|
61
|
+
Do *NOT* flag spelling, capitalization, punctuation, word-break, or
|
|
62
|
+
grammar errors (these belong to the `ase-docs-proofread` skill), do *NOT*
|
|
63
|
+
propose deletions of whole sentences, paragraphs, examples, or list items
|
|
64
|
+
for the sake of brevity (these belong to the `ase-docs-shorten` skill), and
|
|
65
|
+
do *NOT* flag Markdown formatting choices, code/identifiers, XML/template
|
|
66
|
+
tags, technical terms, list/heading style, or anything inside fenced code
|
|
67
|
+
blocks or backtick spans. Be conservative — only report passages where the
|
|
68
|
+
rewriting is a clear improvement in readability.
|
|
69
|
+
|
|
70
|
+
For *each* found problem:
|
|
71
|
+
|
|
72
|
+
1. Set <type/> to the string `STRUCTURE`, `NOMINALIZATION`,
|
|
73
|
+
`PARALLELISM`, `FILLER`, `TRANSITION`, or `VOICE`, indicating the
|
|
74
|
+
problem type.
|
|
75
|
+
|
|
76
|
+
2. Set <file/> to the *relative* filename path of the document.
|
|
77
|
+
Set <line/> to the numeric 1-based line number in the
|
|
78
|
+
document.
|
|
79
|
+
|
|
80
|
+
3. Set <old-text/> to the lines of the old text which
|
|
81
|
+
should be changed. Set <new-text/> to the lines of the
|
|
82
|
+
new text which will replace it.
|
|
83
|
+
|
|
84
|
+
The rewriting *MUST* preserve the statement of <old-text/>
|
|
85
|
+
*exactly*: same facts, same numbers, same technical terms, same
|
|
86
|
+
qualifiers, same negations, same order of the argument. Only the
|
|
87
|
+
*wording* changes.
|
|
88
|
+
|
|
89
|
+
Keep the change *minimal*: <old-text/> and <new-text/>
|
|
90
|
+
*MUST* *NOT* share any common leading or trailing
|
|
91
|
+
lines - *strip* such lines, as they are *unchanged*
|
|
92
|
+
context and not part of the change. When two changed
|
|
93
|
+
regions are separated by unchanged lines, report them
|
|
94
|
+
as *two separate* problems instead of one large change
|
|
95
|
+
which re-states the unchanged lines.
|
|
96
|
+
|
|
97
|
+
This minimality rule applies *only* to <old-text/> and
|
|
98
|
+
<new-text/>. It *MUST* *NOT* be understood as a reason to
|
|
99
|
+
also drop the surrounding context of the substeps 5 and 6
|
|
100
|
+
below - that context is *mandatory* and is reported
|
|
101
|
+
*separately* from the changed lines.
|
|
102
|
+
|
|
103
|
+
4. Set <description/> to an ultra-brief and concise
|
|
104
|
+
Markdown-formatted description of the problem with
|
|
105
|
+
a hint of what is awkward and why the rewriting reads
|
|
106
|
+
better. In this description, mark up all referenced
|
|
107
|
+
verbatim words <words/> from <old-text/> or <new-text/>
|
|
108
|
+
as quoted strings containing monospaced text with
|
|
109
|
+
Markdown based on the following <template/>:
|
|
110
|
+
<template>"`<words/>`"</template>.
|
|
111
|
+
|
|
112
|
+
5. Set <context-before/> to exactly *up to two* lines of
|
|
113
|
+
*unchanged* text context which occurs in the document
|
|
114
|
+
directly *before* <old-text/>, i.e., the lines (<line/>
|
|
115
|
+
- 2) and (<line/> - 1). Reduce to just one line (<line/>
|
|
116
|
+
- 1) if <old-text/> is the second line of the document.
|
|
117
|
+
Set <context-before/> to empty if <old-text/> is the
|
|
118
|
+
first line in the document.
|
|
119
|
+
|
|
120
|
+
6. Set <context-after/> to exactly *up to two* lines of
|
|
121
|
+
*unchanged* text content which occurs in the document
|
|
122
|
+
directly *after* <old-text/>, i.e., the lines (<line/>
|
|
123
|
+
+ <n/>) and (<line/> + <n/> + 1), where <n/> is the
|
|
124
|
+
number of lines in <old-text/>. Reduce to just one line
|
|
125
|
+
(<line/> + <n/>) if <old-text/> is the second-last
|
|
126
|
+
line of the document. Set <context-after/> to empty if
|
|
127
|
+
<old-text/> is the last line in the document.
|
|
128
|
+
|
|
129
|
+
7. If <problems/> is not empty, set
|
|
130
|
+
<problems><problems/>,</problems> (append a comma).
|
|
131
|
+
|
|
132
|
+
8. Append the following <template/> to <problems/>:
|
|
133
|
+
|
|
134
|
+
<template>
|
|
135
|
+
{
|
|
136
|
+
"type": <type/>,
|
|
137
|
+
"file": <file/>,
|
|
138
|
+
"line": <line/>,
|
|
139
|
+
"description": <description/>,
|
|
140
|
+
"context_before": <context-before/>,
|
|
141
|
+
"old_text": <old-text/>,
|
|
142
|
+
"new_text": <new-text/>,
|
|
143
|
+
"context_after": <context-after/>
|
|
144
|
+
}
|
|
145
|
+
</template>
|
|
146
|
+
|
|
147
|
+
Here `line` is a *number* and all other fields are *JSON
|
|
148
|
+
strings*, where <context-before/>, <old-text/>, <new-text/>,
|
|
149
|
+
and <context-after/> carry the *verbatim* document lines
|
|
150
|
+
(embedded newlines escaped as `\n`, no line-number prefixes,
|
|
151
|
+
original indentation preserved). The empty string `""` is
|
|
152
|
+
allowed for `context_before` and `context_after` *only* at
|
|
153
|
+
the very start or end of the document - for every other
|
|
154
|
+
problem both *MUST* carry their context lines.
|
|
155
|
+
|
|
156
|
+
3. You *MUST* *NOT* propose, apply, or render any document
|
|
157
|
+
changes yourself. Instead, return *exclusively* as the last message
|
|
158
|
+
a single JSON block (no markdown, no prose, no preamble, no summary)
|
|
159
|
+
of the following shape:
|
|
160
|
+
|
|
161
|
+
```json
|
|
162
|
+
[
|
|
163
|
+
<problems/>
|
|
164
|
+
]
|
|
165
|
+
```
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ase-docs-shorten
|
|
3
|
+
description: "Shorten Investigation"
|
|
4
|
+
effort: high
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Your role is an experienced, *expert-level copy editor*.
|
|
8
|
+
|
|
9
|
+
Your objective is to *shorten* a single document until it reaches a
|
|
10
|
+
given *target length*, and to propose that shortening as a set of
|
|
11
|
+
self-contained *text blocks*, each carrying its original and its
|
|
12
|
+
shortened form.
|
|
13
|
+
|
|
14
|
+
Input
|
|
15
|
+
-----
|
|
16
|
+
|
|
17
|
+
`$ARGUMENTS` carries exactly three lines:
|
|
18
|
+
|
|
19
|
+
```text
|
|
20
|
+
UNIT: chars|words
|
|
21
|
+
TARGET: <number>
|
|
22
|
+
FILE: <path>
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Set <unit/>, <target/>, and <file/> from them.
|
|
26
|
+
|
|
27
|
+
Measurement
|
|
28
|
+
-----------
|
|
29
|
+
|
|
30
|
+
Every length you report *MUST* be *measured*, never estimated: you
|
|
31
|
+
*MUST* obtain it from the `ase_text_metric` tool of the `ase` MCP server
|
|
32
|
+
-- with `file` for a whole document and with `text` for a single block
|
|
33
|
+
-- and take the field named after <unit/> (`chars` or `words`) from its
|
|
34
|
+
result.
|
|
35
|
+
|
|
36
|
+
Both length units are measured over the *entire* text:
|
|
37
|
+
|
|
38
|
+
- `chars`: the number of Unicode characters, *including* whitespace and newlines.
|
|
39
|
+
- `words`: the number of whitespace-separated tokens.
|
|
40
|
+
|
|
41
|
+
You *MUST* use the *same* unit consistently for the document length and
|
|
42
|
+
for every single block length, so the numbers stay comparable.
|
|
43
|
+
|
|
44
|
+
Ground Rule
|
|
45
|
+
-----------
|
|
46
|
+
|
|
47
|
+
Shortening *removes* text, so unlike a refinement it *MAY* lose
|
|
48
|
+
content. It still *MUST* *NOT* corrupt whatever survives:
|
|
49
|
+
|
|
50
|
+
- Every fact, number, technical term, qualifier, and negation which
|
|
51
|
+
*survives* into the shortened text *MUST* stay *exactly* as it was.
|
|
52
|
+
Turning "up to 30 percent" into "about 30 percent" is a defect.
|
|
53
|
+
|
|
54
|
+
- You *MUST* *NOT* invent content. Every statement of the shortened
|
|
55
|
+
text *MUST* be traceable to the original text.
|
|
56
|
+
|
|
57
|
+
- You *MUST* *NOT* touch fenced code blocks, inline code spans, link
|
|
58
|
+
targets, image references, Markdown frontmatter, or the heading
|
|
59
|
+
structure of the document.
|
|
60
|
+
|
|
61
|
+
- You *MUST* *NOT* reorder the surviving argument.
|
|
62
|
+
|
|
63
|
+
- Prefer dropping *restatements*, *examples*, *asides*,
|
|
64
|
+
*parentheticals*, and *elaborations* over dropping *unique facts*. A
|
|
65
|
+
unique fact may be dropped *only* when the target cannot be met
|
|
66
|
+
otherwise, and its <description/> *MUST* then name the fact which goes.
|
|
67
|
+
|
|
68
|
+
Workflow
|
|
69
|
+
--------
|
|
70
|
+
|
|
71
|
+
1. Use the `Read` tool to read <file/> and call the
|
|
72
|
+
`ase_text_metric(file: "<file/>")` tool of the `ase` MCP server,
|
|
73
|
+
setting <length-before/> to the <unit/> field of its result.
|
|
74
|
+
|
|
75
|
+
2. If <length-before/> is *less than or equal* to <target/>, the
|
|
76
|
+
document already meets the target and *MUST* *NOT* be shortened at
|
|
77
|
+
all: return the JSON result of step 4 with an *empty* `blocks` array
|
|
78
|
+
and with `length_projected` equal to <length-before/>.
|
|
79
|
+
|
|
80
|
+
3. Set <blocks/> to empty and <projected/> to <length-before/>. Then
|
|
81
|
+
run the following three *stages*, in exactly this order, entering a
|
|
82
|
+
stage *only* while <projected/> is still greater than <target/>, and
|
|
83
|
+
leaving every stage as soon as <projected/> drops to or below
|
|
84
|
+
<target/>:
|
|
85
|
+
|
|
86
|
+
1. **Stage `TIGHTEN`**: shorten *individual sentences* without
|
|
87
|
+
losing any content at all -- strike filler words and empty
|
|
88
|
+
intensifiers, replace nominal constructions with plain verbs,
|
|
89
|
+
and cut redundant restatements *within* a sentence. Every fact
|
|
90
|
+
of the block survives this stage.
|
|
91
|
+
|
|
92
|
+
2. **Stage `DROP`**: remove *low-value content* -- redundant
|
|
93
|
+
restatements, illustrative examples, asides, parentheticals, and
|
|
94
|
+
whole sentences or list items which carry the least value for
|
|
95
|
+
the reader. Content is genuinely lost in this stage.
|
|
96
|
+
|
|
97
|
+
3. **Stage `COMPRESS`**: merge and rewrite the *remaining* content
|
|
98
|
+
into shorter expressions and sentences -- fuse related sentences,
|
|
99
|
+
turn prose enumerations into compact lists, and re-express
|
|
100
|
+
multi-sentence passages as single sentences.
|
|
101
|
+
|
|
102
|
+
You *MUST* *NOT* shorten *beyond* the target: stop at the very
|
|
103
|
+
first block which brings <projected/> to or below <target/>.
|
|
104
|
+
Undershooting <target/> by more than *10 percent* is a defect.
|
|
105
|
+
|
|
106
|
+
For *each* proposed block:
|
|
107
|
+
|
|
108
|
+
1. Set <stage/> to the string `TIGHTEN`, `DROP`, or `COMPRESS`,
|
|
109
|
+
indicating the stage which produced this block.
|
|
110
|
+
|
|
111
|
+
2. Set <file/> to the *relative* filename path of the document.
|
|
112
|
+
Set <line/> to the numeric 1-based line number at which the
|
|
113
|
+
block starts in the document.
|
|
114
|
+
|
|
115
|
+
3. Set <old-text/> to the *verbatim* lines of the original block
|
|
116
|
+
and <new-text/> to the lines which replace it. For a block that
|
|
117
|
+
is dropped entirely, set <new-text/> to the *empty* string.
|
|
118
|
+
|
|
119
|
+
Every block *MUST* be a *self-contained text block* of the
|
|
120
|
+
document -- a paragraph, a list item, a blockquote, or a heading
|
|
121
|
+
together with its immediately following paragraph. It *MUST*
|
|
122
|
+
*NOT* be an individual line and *MUST* *NOT* be a fragment of a
|
|
123
|
+
sentence, because a shortening is only judgeable in the context
|
|
124
|
+
of the *whole block* it rewrites.
|
|
125
|
+
|
|
126
|
+
Blocks *MUST* *NOT* overlap: every line of the document belongs
|
|
127
|
+
to at most *one* block.
|
|
128
|
+
|
|
129
|
+
4. Set <length-block-before/> and <length-block-after/> to the
|
|
130
|
+
<unit/> field of the result of `ase_text_metric(text:
|
|
131
|
+
"<old-text/>")` resp. `ase_text_metric(text: "<new-text/>")`,
|
|
132
|
+
and decrease <projected/> by their difference.
|
|
133
|
+
|
|
134
|
+
5. Set <description/> to an ultra-brief and concise
|
|
135
|
+
Markdown-formatted description of *what* the block loses and
|
|
136
|
+
*why* that loss is acceptable. In this description, mark up all
|
|
137
|
+
referenced verbatim words <words/> from <old-text/> or
|
|
138
|
+
<new-text/> as quoted strings containing monospaced text with
|
|
139
|
+
Markdown based on the following <template/>:
|
|
140
|
+
<template>"`<words/>`"</template>.
|
|
141
|
+
|
|
142
|
+
6. If <blocks/> is not empty, set
|
|
143
|
+
<blocks><blocks/>,</blocks> (append a comma).
|
|
144
|
+
|
|
145
|
+
7. Append the following <template/> to <blocks/>:
|
|
146
|
+
|
|
147
|
+
<template>
|
|
148
|
+
{
|
|
149
|
+
"stage": <stage/>,
|
|
150
|
+
"line": <line/>,
|
|
151
|
+
"description": <description/>,
|
|
152
|
+
"old_text": <old-text/>,
|
|
153
|
+
"new_text": <new-text/>,
|
|
154
|
+
"length_before": <length-block-before/>,
|
|
155
|
+
"length_after": <length-block-after/>
|
|
156
|
+
}
|
|
157
|
+
</template>
|
|
158
|
+
|
|
159
|
+
Here `line`, `length_before`, and `length_after` are *numbers*
|
|
160
|
+
and all other fields are *JSON strings*, where <old-text/> and
|
|
161
|
+
<new-text/> carry the *verbatim* document lines (embedded
|
|
162
|
+
newlines escaped as `\n`, no line-number prefixes, original
|
|
163
|
+
indentation preserved).
|
|
164
|
+
|
|
165
|
+
4. You *MUST* *NOT* propose, apply, or render any document changes
|
|
166
|
+
yourself. Instead, return *exclusively* as the last message a single
|
|
167
|
+
JSON block (no markdown, no prose, no preamble, no summary) of the
|
|
168
|
+
following shape, with the blocks ordered by ascending `line`:
|
|
169
|
+
|
|
170
|
+
```json
|
|
171
|
+
{
|
|
172
|
+
"file": <file/>,
|
|
173
|
+
"unit": <unit/>,
|
|
174
|
+
"target": <target/>,
|
|
175
|
+
"length_before": <length-before/>,
|
|
176
|
+
"length_projected": <projected/>,
|
|
177
|
+
"blocks": [
|
|
178
|
+
<blocks/>
|
|
179
|
+
]
|
|
180
|
+
}
|
|
181
|
+
```
|
|
182
|
+
|
package/plugin/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"homepage": "https://ase.tools",
|
|
7
7
|
"repository": { "url": "git+https://github.com/rse/ase.git", "type": "git" },
|
|
8
8
|
"bugs": { "url": "https://github.com/rse/ase/issues" },
|
|
9
|
-
"version": "0.9.
|
|
9
|
+
"version": "0.9.67",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"author": {
|
|
12
12
|
"name": "Dr. Ralf S. Engelschall",
|
|
@@ -15,12 +15,12 @@
|
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
17
|
"@rse/stx": "1.1.6",
|
|
18
|
-
"@rse/specbook": "1.
|
|
18
|
+
"@rse/specbook": "1.2.7",
|
|
19
19
|
"markdownlint": "0.41.1",
|
|
20
20
|
"markdownlint-cli2": "0.23.2",
|
|
21
|
-
"eslint": "10.
|
|
21
|
+
"eslint": "10.10.0",
|
|
22
22
|
"@eslint/markdown": "8.0.3",
|
|
23
|
-
"eslint-markdown": "0.14.
|
|
23
|
+
"eslint-markdown": "0.14.1"
|
|
24
24
|
},
|
|
25
25
|
"engines": {
|
|
26
26
|
"npm": ">=10.0.0",
|
|
@@ -32,19 +32,19 @@ demotes dependency-heavy components.
|
|
|
32
32
|
|
|
33
33
|
## OPTIONS
|
|
34
34
|
|
|
35
|
-
`--limit`|`-l=12`:
|
|
35
|
+
- `--limit`|`-l=12`:
|
|
36
36
|
The *maximum* number of components retained in the final ranking
|
|
37
37
|
(default: 12); each discovery source may fetch up to twice this
|
|
38
38
|
number of candidates for ranking. Raise it for a broader, more
|
|
39
39
|
exhaustive survey, lower it for a quicker, narrower lookup.
|
|
40
40
|
|
|
41
|
-
`--staleness`|`-s=18`:
|
|
41
|
+
- `--staleness`|`-s=18`:
|
|
42
42
|
The *staleness threshold* in months (default: 18). A component whose
|
|
43
43
|
last release is older than this is rank-penalized and flagged with an
|
|
44
44
|
`aging` gotcha; older than *twice* the threshold, it is penalized
|
|
45
45
|
harder and flagged as `stale/abandoned`.
|
|
46
46
|
|
|
47
|
-
`--small-scope`|`-S`:
|
|
47
|
+
- `--small-scope`|`-S`:
|
|
48
48
|
Treat the requested *functionality* as *small-scope* (default: off).
|
|
49
49
|
When enabled, the ranking demotes dependency-heavy components by a
|
|
50
50
|
dependency-weight penalty, since a dependency-free/hand-rolled
|
|
@@ -53,7 +53,7 @@ demotes dependency-heavy components.
|
|
|
53
53
|
|
|
54
54
|
## ARGUMENTS
|
|
55
55
|
|
|
56
|
-
*functionality*:
|
|
56
|
+
- *functionality*:
|
|
57
57
|
A short description of the desired functionality the third-party
|
|
58
58
|
component should provide.
|
|
59
59
|
|