@rse/ase 0.0.46 → 0.0.49

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 (34) hide show
  1. package/dst/ase-config.js +103 -6
  2. package/dst/ase-diagram.js +3 -3
  3. package/dst/ase-getopt.js +8 -4
  4. package/dst/ase-hook.js +122 -23
  5. package/dst/ase-mcp.js +26 -20
  6. package/dst/ase-service.js +10 -3
  7. package/dst/ase-skills.js +182 -42
  8. package/dst/ase-statusline.js +17 -21
  9. package/dst/ase-task.js +60 -1
  10. package/package.json +1 -1
  11. package/plugin/.claude-plugin/plugin.json +1 -1
  12. package/plugin/.github/plugin/plugin.json +1 -1
  13. package/plugin/agents/ase-code-lint.md +370 -0
  14. package/plugin/agents/ase-docs-proofread.md +100 -0
  15. package/plugin/meta/ase-constitution.md +7 -7
  16. package/plugin/meta/ase-control.md +1 -1
  17. package/plugin/meta/ase-dialog.md +2 -2
  18. package/plugin/meta/ase-persona.md +2 -2
  19. package/plugin/meta/ase-plan.md +2 -2
  20. package/plugin/meta/ase-skill.md +2 -2
  21. package/plugin/package.json +1 -1
  22. package/plugin/skills/ase-arch-analyze/SKILL.md +4 -4
  23. package/plugin/skills/ase-arch-discover/SKILL.md +14 -3
  24. package/plugin/skills/ase-code-analyze/SKILL.md +2 -2
  25. package/plugin/skills/ase-code-explain/SKILL.md +1 -1
  26. package/plugin/skills/ase-code-lint/SKILL.md +179 -298
  27. package/plugin/skills/ase-code-resolve/SKILL.md +1 -1
  28. package/plugin/skills/ase-docs-proofread/SKILL.md +151 -51
  29. package/plugin/skills/ase-meta-changes/SKILL.md +4 -4
  30. package/plugin/skills/ase-meta-diagram/SKILL.md +5 -5
  31. package/plugin/skills/ase-meta-evaluate/SKILL.md +2 -2
  32. package/plugin/skills/ase-meta-persona/SKILL.md +1 -1
  33. package/plugin/skills/ase-meta-quorum/SKILL.md +1 -1
  34. package/plugin/skills/ase-task-rename/SKILL.md +92 -0
@@ -3,14 +3,16 @@ name: ase-docs-proofread
3
3
  argument-hint: "<docs-reference>"
4
4
  description: >
5
5
  Analyze the documents for spelling, punctuation, or grammar errors.
6
- Use when the user wants to "spellcheck", "proofread", or "lint" a text or document.
6
+ Use when the user wants to "proofread" or "spellcheck" a document.
7
7
  user-invocable: true
8
8
  disable-model-invocation: false
9
- effort: high
9
+ effort: medium
10
10
  ---
11
11
 
12
12
  @${CLAUDE_SKILL_DIR}/../../meta/ase-control.md
13
13
  @${CLAUDE_SKILL_DIR}/../../meta/ase-skill.md
14
+ @${CLAUDE_SKILL_DIR}/../../meta/ase-dialog.md
15
+ @${CLAUDE_SKILL_DIR}/../../meta/ase-getopt.md
14
16
 
15
17
  Proofread Documentation
16
18
  =======================
@@ -19,6 +21,12 @@ Proofread Documentation
19
21
  Analyze the documents for spelling, punctuation, or grammar errors.
20
22
  </skill>
21
23
 
24
+ <expand name="getopt"
25
+ arg1="ase-docs-proofread"
26
+ arg2="--auto|-a">
27
+ $ARGUMENTS
28
+ </expand>
29
+
22
30
  <role>
23
31
  Your role is an experienced, *expert-level proofreader*, specialized in
24
32
  checking and correcting the *spelling*, *punctuation* and *grammar* of
@@ -26,93 +34,185 @@ documents.
26
34
  </role>
27
35
 
28
36
  <objective>
29
- *Analyze* the documents of $ARGUMENTS for problems in their *spelling*,
30
- *punctuation* or *grammar* and immediately correct all found problems.
37
+ *Analyze* the documents of `<getopt-arguments/>` for problems in their
38
+ *spelling*, *punctuation*, or *grammar* and propose corrections.
31
39
  </objective>
32
40
 
33
41
  <flow>
34
42
 
35
- 1. <step id="STEP 1: Investigation & Checking">
36
- Investigate on the document base by using the `Read` tool to read all
37
- referenced document files. For all contained texts in those files,
38
- check the following problem types *ONLY*:
43
+ 1. <step id="STEP 1: Investigation">
44
+
45
+ First, use the following <template/> to give a hint on this step:
46
+
47
+ <template>
48
+ &#x26AA; **PROOFREADING INVESTIGATION**
49
+ </template>
50
+
51
+ Dispatch the investigation to a *sub-agent* via the `Agent`
52
+ tool so that *no* investigation details leak into the user-visible
53
+ transcript. The sub-agent performs the silent reading and checking;
54
+ only its final structured return value is consumed here.
55
+
56
+ For this, invoke *exactly once* the tool:
39
57
 
40
- - **Spelling**
41
- - **Punctuation**
42
- - **Grammar**
58
+ ```text
59
+ Agent(
60
+ name: "ase-docs-proofread",
61
+ description: "Proofread Investigation",
62
+ subagent_type: "ase-docs-proofread",
63
+ mode: "plan",
64
+ prompt: <getopt-arguments/>
65
+ )
66
+ ```
43
67
 
44
- You *MUST* collect *all* found problems into an internal list only,
45
- and then set <problems/> to the value of this list.
68
+ Parse the single result message of the `Agent` tool as a JSON array
69
+ and set <problems/> to that list.
46
70
 
47
- You *MUST* *NOT* propose document changes in this step 1.
48
- You *MUST* *NOT* output anything in this step 1.
71
+ You *MUST* *NOT* output anything at all in this step 1 beyond the
72
+ single `Agent` tool invocation.
49
73
  </step>
50
74
 
51
75
  2. <step id="STEP 2: Summary">
76
+
52
77
  Use the following <template/> to give a summary of the detected
53
78
  problems in <problems/>:
54
79
 
55
80
  <template>
81
+ &#x26AA; **PROOFREADING SUMMARY**:
82
+
56
83
  | *Proofread Type* | *Proofread Result* |
57
84
  | ---------------- | ----------------------- |
58
85
  | **SPELLING**: | **<n/>** problems found |
59
86
  | **PUNCTUATION**: | **<m/>** problems found |
60
87
  | **GRAMMAR**: | **<k/>** problems found |
88
+
61
89
  </template>
62
90
 
63
91
  Hints:
64
92
 
65
- - <n/> is the number of spelling problems in <problems/>
66
- - <m/> is the number of punctuation problems in <problems/>
67
- - <k/> is the number of grammar problems in <problems/>
93
+ - <n/> is the number of problems with `type` equal to `SPELLING` in <problems/>
94
+ - <m/> is the number of problems with `type` equal to `PUNCTUATION` in <problems/>
95
+ - <k/> is the number of problems with `type` equal to `GRAMMAR` in <problems/>
96
+
68
97
  </step>
69
98
 
70
- 3. <step id="STEP 3: Details & Correction">
99
+ 3. <step id="STEP 3: Correction">
71
100
 
72
- <for items="<problems/>">
101
+ 1. You *MUST* call the MCP tool `config_set(key: "agent.skill", val:
102
+ "ase-docs-proofread", scope: "session:<ase-session-id/>")` of the
103
+ `ase` MCP server.
73
104
 
74
- For the current <item/> from the collected list <problems/>, do the
75
- following:
105
+ 2. Iterate over all problems:
76
106
 
77
- 1. Report the problem with the following <template/>:
107
+ <for items="<problems/>">
78
108
 
79
- <template>
80
- &#x1F7E0; **<type/>**: [`<file/>`:<line/>]: <description/>
81
- </template>
109
+ 1. Set <type/> to the `type` field of <item/>.
110
+ Set <file/> to the `file` field of <item/>.
111
+ Set <line/> to the `line` field of <item/>.
112
+ Set <description/> to the `description` field of <item/>.
113
+ Set <context-before/> to the `context_before` field of <item/>.
114
+ Set <old-text/> to the `old_text` field of <item/>.
115
+ Set <new-text/> to the `new_text` field of <item/>.
116
+ Set <context-after/> to the `context_after` field of <item/>.
117
+
118
+ 2. Report the problem with the following <template/>:
119
+
120
+ <template>
121
+ &#x1F7E0; **<type/> PROBLEM**: `<file/>`:<line/>:
122
+
123
+ <description/>
124
+ </template>
125
+
126
+ 3. <if condition="<getopt-option-auto/> is not 'true'">
127
+
128
+ Render the proposed correction as a *unified diff* with *one*
129
+ line of context in a fenced block based on the following <template/>:
130
+
131
+ <template>
132
+
133
+ &#x1F535; **<type/> CORRECTION**:
82
134
 
83
- Hints:
135
+ ```diff
136
+ --- <file/> (original)
137
+ +++ <file/> (corrected)
138
+ @@ -<line/>,<n/> +<line/>,<m/> @@
139
+ <context-before/>
140
+ -<old-text/>
141
+ +<new-text/>
142
+ <context-after/>
143
+ ```
84
144
 
85
- - The <type/> is `SPELLING`, `PUNCTUATION` or `GRAMMAR`
86
- of <item/>.
145
+ </template>
87
146
 
88
- - The <file/> is the name of the document artifact of <item/>.
89
- The <line/> is the line number of the document artifact of <item/>.
147
+ Hints:
148
+ - The <n/> is the number of lines in <old-text/>.
149
+ - The <m/> is the number of lines in <new-text/>.
90
150
 
91
- - The <description/> is an ultra brief and concise description
92
- of the problem <item/> with a hint what is wrong and why
93
- it is wrong. In <description/>, markup all verbatim words
94
- <words/> related to the checked text (or the proposed
95
- corrected text) as quoted strings containing monospaced text
96
- with the Markdown <template>"`<words/>`"</template>.
151
+ </if>
97
152
 
98
- 2. Propose a direct change to the corresponding document via the
99
- interactive `Edit` tool.
153
+ 4. <if condition="<getopt-option-auto/> is not 'true'">
100
154
 
101
- **IMPORTANT**: Regardless of whether the change was *accepted*
102
- or *rejected* by the user (i.e., even if the `Edit` tool returns
103
- an error like "The user doesn't want to proceed with this tool
104
- use" or "User rejected"), you *MUST* immediately *CONTINUE* with
105
- the *next* <item/> in the iteration.
155
+ Ask the user how to proceed via an interactive user dialog:
106
156
 
107
- Do *NOT* stop. Do *NOT* ask the user for confirmation. Do *NOT*
108
- summarize. A rejection is *NOT* a signal to abort; it is only
109
- a signal that *this one* change is skipped. Only after *all*
110
- problems have been processed may you stop.
157
+ <expand name="user-dialog">
158
+ CORRECTION: How would you like to proceed with this proposed correction?
159
+ ACCEPT: Apply the proposed correction.
160
+ REJECT: Skip this proposed correction.
161
+ </expand>
111
162
 
112
- </for>
163
+ </if>
164
+
165
+ <if condition="<getopt-option-auto/> is 'true'">
166
+
167
+ Set <result>ACCEPT</result>.
168
+
169
+ </if>
170
+
171
+ 5. Check <result/> and dispatch accordingly:
172
+
173
+ - <if condition="<result/> is 'ACCEPT'">
174
+
175
+ Invoke the `Edit` tool to apply the change exactly as shown
176
+ in the diff. The operation will be auto-approved because of
177
+ the active proofread marker, so *no* interactive permission
178
+ prompt will appear. Then continue with the next <item/>.
179
+
180
+ </if>
181
+
182
+ - <if condition="<result/> starts with 'OTHER'">
183
+
184
+ Generate a *new* proposal for the *same* <item/>,
185
+ incorporating the user's free-text hint from <result/>
186
+ after the "OTHER:" prefix, and loop back to substep 2 of
187
+ this iteration. There is *no* cap on refinement rounds —
188
+ keep refining until the user picks `ACCEPT` or `REJECT`.
189
+
190
+ </if>
191
+
192
+ - <if condition="
193
+ <result/> is 'REJECT' or
194
+ <result/> is 'CANCEL' or
195
+ <result/> starts with 'ERROR'
196
+ ">
197
+
198
+ Skip this <item/> without any `Edit` call and continue
199
+ with the next <item/>.
200
+
201
+ </if>
202
+
203
+ </for>
204
+
205
+ 3. You *MUST* call the MCP tool `config_delete(key: "agent.skill",
206
+ scope: "session:<ase-session-id/>")` of the `ase` MCP server.
207
+
208
+ 4. You *MUST* *NOT* output any further additional explanations or
209
+ summaries at the end of this skill processing, except for the
210
+ following final <template/>:
211
+
212
+ <template>
213
+ &#x26AA; **PROOFREAD FINISHED**
214
+ </template>
113
215
 
114
- You *MUST* *NOT* output any further additional explanations or
115
- summaries at the end of this skill processing.
116
216
  </step>
117
217
 
118
218
  </flow>
@@ -66,7 +66,7 @@ are also grouped and sorted according to the above <prefix/>es.
66
66
  </step>
67
67
 
68
68
  3. <step id="STEP 3: Complete ChangeLog entries">
69
- Without immediately modifying `CHANGELOG.md` file,
69
+ Without immediately modifying the `CHANGELOG.md` file,
70
70
  *complete* the entries in the first (most recent) section only,
71
71
  by adding the corresponding (most recent) Git commits only.
72
72
  For each Git commit, reduce the Git commit messages to a single
@@ -74,17 +74,17 @@ are also grouped and sorted according to the above <prefix/>es.
74
74
  </step>
75
75
 
76
76
  4. <step id="STEP 4: Consolidate ChangeLog entries">
77
- Without immediately modifying `CHANGELOG.md` file,
77
+ Without immediately modifying the `CHANGELOG.md` file,
78
78
  *consolidate* the entries in the first (most recent) section only,
79
79
  by summarizing and merging closely related entries.
80
80
  Perform the entry consolidation per prefix group only.
81
- If a changelog <summary/> is too short or is too little comprehensible
81
+ If a changelog <summary/> is too short or is not comprehensible enough
82
82
  because of too little context, add some context, especially references
83
83
  to the class/module/package, etc.
84
84
  </step>
85
85
 
86
86
  5. <step id="STEP 5: Sort ChangeLog entries">
87
- Without immediately modifying `CHANGELOG.md` file,
87
+ Without immediately modifying the `CHANGELOG.md` file,
88
88
  *sort* the entries in the first (most recent) section only.
89
89
  Instead of the chronological commit order, group the entries
90
90
  by the prefixes.
@@ -5,9 +5,9 @@ description: >
5
5
  *Always use* when you have to *visualize*
6
6
  structure/layout/components/dependencies as Flowchart,
7
7
  control-flow/branching/concurrency as Flowchart,
8
- state-machine/states/transitions as an UML State Diagram,
9
- data-flow/actors/messages/protocols as an UML Sequence Diagram,
10
- data-structure/classes/methods as an UML Class Diagram,
8
+ state-machine/states/transitions as a UML State Diagram,
9
+ data-flow/actors/messages/protocols as a UML Sequence Diagram,
10
+ data-structure/classes/methods as a UML Class Diagram,
11
11
  data-model/entities/relationships as an ER Diagram, or
12
12
  metrics/distributions/time-series as XY-Charts.
13
13
  user-invocable: false
@@ -71,7 +71,7 @@ Rules
71
71
  In other words, after the `diagram` tool call completes, the
72
72
  skill *MUST* copy the tool's `text` result *verbatim* into a
73
73
  Markdown-fenced code block (triple backticks), directly placed
74
- in the response text immediately after the MCP tool call -— the
74
+ in the response text immediately after the MCP tool call the
75
75
  user reads the Markdown fenced block in the response, not the
76
76
  (truncated) tool call display. Emitting only the tool call without
77
77
  the reproduction of the `text` output is a defect: the diagram is
@@ -95,7 +95,7 @@ Rules
95
95
  For *comparison diagrams* (e.g., *current vs. proposed*, *before
96
96
  vs. after*), render each side as a *separate* Mermaid diagram
97
97
  specification via the `diagram` tool from the `ase` MCP service, and
98
- then stack the two rendered blocks *vertically* -— each preceded by
98
+ then stack the two rendered blocks *vertically* each preceded by
99
99
  a bold label (`**BEFORE:**` / `**AFTER:**`, or similar). Do *not*
100
100
  attempt side-by-side layout.
101
101
 
@@ -121,7 +121,7 @@ multi-*criteria* decision matrix.
121
121
  important, over normal, to less important). Do not output anything.
122
122
 
123
123
  - Ensure the final number of criteria is always within the range of
124
- minimum 8 and maximum 12: if less than 8 criteria were requested,
124
+ minimum 8 and maximum 12: if fewer than 8 criteria were requested,
125
125
  use the set of alternatives to decide on additional criteria
126
126
  which potentially allow best to triage the alternatives, take the
127
127
  <reason/> into account, and use the `ase-meta-search` skill (drawing from
@@ -248,7 +248,7 @@ multi-*criteria* decision matrix.
248
248
  ⚠ *ATTENTION: all alternatives rate negatively; this is the least-bad choice, not a strong winner!*
249
249
  </template>
250
250
 
251
- - Otherwise (<percentage/> is greater than or equal 0.10), output
251
+ - Otherwise (<percentage/> is greater than or equal to 0.10), output
252
252
  just the following <template/> and do not output anything else:
253
253
 
254
254
  <template>
@@ -6,7 +6,7 @@ description: >
6
6
  The <persona> can be either the decorative, eloquent, and explaining "writer",
7
7
  the concise, factual, and accurate "engineer" (default),
8
8
  the brief, factual, and abbreviating "telegrapher",
9
- the terse, rough and stuttering "caveman".
9
+ the terse, rough, and stuttering "caveman".
10
10
  Use when user says "persona <persona>" or "be <persona>".
11
11
  user-invocable: true
12
12
  disable-model-invocation: false
@@ -81,7 +81,7 @@ by querying *multiple* AIs for an *optimal consensus*.
81
81
  If all responses disagree, the consensus <c/> is zero.
82
82
  If all responses agree, <c/> is <n/>.
83
83
 
84
- If not all AIs agree, determine a <disagreement/> information,
84
+ If not all AIs agree, determine <disagreement/> information,
85
85
  formatted as `(disagreement: <ai/>, <ai/>, [...])` where <ai/> is a
86
86
  name of an AI which disagreed with the consensus. Else, if all AIs
87
87
  agree, set <disagreement></disagreement>.
@@ -0,0 +1,92 @@
1
+ ---
2
+ name: ase-task-rename
3
+ argument-hint: "[<old>] <new>"
4
+ description: >
5
+ Rename the current or given task plan.
6
+ Use when the user calls to "rename", "move" or "relabel" the
7
+ "task", "plan", "spec", or "specification".
8
+ user-invocable: true
9
+ disable-model-invocation: false
10
+ effort: low
11
+ ---
12
+
13
+ @${CLAUDE_SKILL_DIR}/../../meta/ase-control.md
14
+ @${CLAUDE_SKILL_DIR}/../../meta/ase-skill.md
15
+
16
+ Rename a Task Plan
17
+ ==================
18
+
19
+ <skill name="ase-task-rename">
20
+ Rename a Task Plan
21
+ </skill>
22
+
23
+ Your role is an experienced, *expert-level assistant*.
24
+ *Rename* the task plan.
25
+
26
+ Procedure
27
+ ---------
28
+
29
+ You *MUST* follow the following numbered items *strictly* *sequentially*!
30
+ You *MUST* not skip any numbered item during processing!
31
+
32
+ You *MUST* *NOT* output anything in this entire procedure, *except* when
33
+ explicitly requested by this procedure via outputs based on a <template/>!
34
+
35
+ 1. **Determine Task:**
36
+
37
+ 1. Parse <arguments>$ARGUMENTS</arguments> into a whitespace-separated
38
+ list of tokens. Inherit the always existing <ase-task-id/> from
39
+ the current context. Do not output anything.
40
+
41
+ 2. <if condition="<arguments/> contains two tokens">
42
+ Set <old/> to the first token of <arguments/>.
43
+ Set <new/> to the second token of <arguments/>.
44
+ Do not output anything.
45
+ </if>
46
+
47
+ 3. <if condition="<arguments/> contains exactly one token">
48
+ Set <old><ase-task-id/></old>.
49
+ Set <new/> to the single token of <arguments/>.
50
+ Do not output anything.
51
+ </if>
52
+
53
+ 4. <if condition="<arguments/> is empty OR contains more than two tokens">
54
+ Only output the following <template/> and then immediately
55
+ *STOP* processing the entire current skill:
56
+
57
+ <template>
58
+ ⧉ **ASE**: ☻ skill: **ase-task-rename**, ▶ ERROR: expected `[<old>] <new>` arguments
59
+ </template>
60
+ </if>
61
+
62
+ 2. **Perform Operation**:
63
+
64
+ 1. Call the `task_rename(old: <old/>, new: <new/>)` tool of the
65
+ `ase` MCP service to rename the task plan and set <text/> to the
66
+ `text` output field of this `task_rename` tool call. Do not
67
+ output anything related to this MCP tool call.
68
+
69
+ - If <text/> starts with `ERROR:` or `WARNING:`:
70
+ Only output the following <template/>:
71
+
72
+ <template>
73
+ ⧉ **ASE**: ◉ task: **<old/>**, ▶ status: **<text/>**
74
+ </template>
75
+
76
+ - If <text/> starts NOT with `ERROR:` and NOT with `WARNING:`:
77
+ Only output the following <template/>:
78
+
79
+ <template>
80
+ ⧉ **ASE**: ◉ task: **<new/>**, ▶ status: **task renamed**
81
+ </template>
82
+
83
+ 2. <if condition="<old/> is equal <ase-task-id/>">
84
+ Set <ase-task-id><new/></ase-task-id>. Call the `task_id(id:
85
+ <ase-task-id/>, session: <ase-session-id/>)` tool from the `ase`
86
+ MCP service to switch the task to the renamed task. Only output
87
+ the following <template/>:
88
+
89
+ <template>
90
+ ⧉ **ASE**: ◉ task: **<ase-task-id/>**, ▶ status: **task switched**
91
+ </template>
92
+ </if>