@rse/ase 0.0.51 → 0.0.53
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-config.js +3 -3
- package/dst/ase-diagram.js +1 -1
- package/dst/ase-getopt.js +1 -1
- package/dst/ase-hello.js +9 -5
- package/dst/ase-kv.js +5 -5
- package/dst/ase-persona.js +1 -1
- package/dst/ase-service.js +1 -1
- package/dst/ase-skills.js +2 -2
- package/dst/ase-task.js +6 -6
- package/dst/ase-timestamp.js +1 -1
- package/package.json +5 -5
- package/plugin/.claude/settings.local.json +1 -1
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/.github/plugin/plugin.json +1 -1
- package/plugin/agents/ase-meta-chat.md +1 -1
- package/plugin/agents/ase-meta-diagram.md +5 -5
- package/plugin/agents/ase-meta-search.md +2 -6
- package/plugin/etc/stx.conf +4 -4
- package/plugin/meta/ase-getopt.md +2 -2
- package/plugin/meta/ase-plan.md +2 -2
- package/plugin/meta/ase-skill.md +3 -3
- package/plugin/package.json +1 -1
- package/plugin/skills/ase-arch-analyze/SKILL.md +3 -3
- package/plugin/skills/ase-arch-discover/SKILL.md +2 -2
- package/plugin/skills/ase-code-analyze/SKILL.md +1 -1
- package/plugin/skills/ase-code-craft/SKILL.md +10 -10
- package/plugin/skills/ase-code-lint/SKILL.md +2 -2
- package/plugin/skills/ase-code-refactor/SKILL.md +10 -10
- package/plugin/skills/ase-code-resolve/SKILL.md +17 -17
- package/plugin/skills/ase-docs-proofread/SKILL.md +2 -2
- package/plugin/skills/ase-meta-evaluate/SKILL.md +2 -2
- package/plugin/skills/ase-meta-persona/SKILL.md +4 -4
- package/plugin/skills/ase-task-delete/SKILL.md +5 -5
- package/plugin/skills/ase-task-edit/SKILL.md +17 -17
- package/plugin/skills/ase-task-id/SKILL.md +4 -4
- package/plugin/skills/ase-task-implement/SKILL.md +7 -7
- package/plugin/skills/ase-task-list/SKILL.md +2 -2
- package/plugin/skills/ase-task-preflight/SKILL.md +11 -11
- package/plugin/skills/ase-task-reboot/SKILL.md +9 -9
- package/plugin/skills/ase-task-rename/SKILL.md +5 -5
- package/plugin/skills/ase-task-view/SKILL.md +3 -3
- package/dst/ase-claude.js +0 -116
- package/dst/ase-decision.js +0 -67
- package/dst/ase-foo.js +0 -21
- package/dst/ase-helloxx.js +0 -23
- package/dst/ase-launch.js +0 -109
- package/dst/ase-plan.js +0 -143
- package/dst/ase-service-probe.js +0 -38
|
@@ -52,18 +52,18 @@ explicitly requested by this procedure via outputs based on a <template/>!
|
|
|
52
52
|
|
|
53
53
|
You *MUST* *NOT* call `Edit`, `Write`, `NotebookEdit`, or any
|
|
54
54
|
filesystem-modifying tool during this entire skill. The *only*
|
|
55
|
-
permitted way to persist artifacts is via `
|
|
55
|
+
permitted way to persist artifacts is via `ase_task_save(...)`.
|
|
56
56
|
|
|
57
57
|
1. **Reason About Problem**:
|
|
58
58
|
|
|
59
59
|
1. If <problem/> matches the regexp `^[PT]\d+$` (i.e. a bare issue
|
|
60
60
|
identifier like `P1`, `P2`, `T1`, `T2`, ...),
|
|
61
61
|
set <problem-id><problem/></problem-id> and
|
|
62
|
-
<ase-task-id><problem/></ase-task-id>, call the `
|
|
62
|
+
<ase-task-id><problem/></ase-task-id>, call the `ase_task_id(id:
|
|
63
63
|
<ase-task-id/>, session: <ase-session-id/>)` tool from the
|
|
64
|
-
`ase` MCP
|
|
65
|
-
call the `
|
|
66
|
-
the `ase` MCP
|
|
64
|
+
`ase` MCP server to implicitly switch the task, and then
|
|
65
|
+
call the `ase_kv_get(key: "ase-issue-<problem-id/>")` tool of
|
|
66
|
+
the `ase` MCP server to retrieve the previously persisted
|
|
67
67
|
problem description. If the returned `text` is non-empty, set
|
|
68
68
|
<problem><text/></problem>, otherwise complain to the user that
|
|
69
69
|
no analyzer result exists for <problem-id/> and stop processing.
|
|
@@ -73,8 +73,8 @@ permitted way to persist artifacts is via `task_save(...)`.
|
|
|
73
73
|
">
|
|
74
74
|
Set <ase-task-id><problem/></ase-task-id> (set task id to problem)
|
|
75
75
|
and <problem></problem> (set problem empty), call the
|
|
76
|
-
`
|
|
77
|
-
from the `ase` MCP
|
|
76
|
+
`ase_task_id(id: <ase-task-id/>, session: <ase-session-id/>)` tool
|
|
77
|
+
from the `ase` MCP server to switch the task, and then only
|
|
78
78
|
output the following <template/>:
|
|
79
79
|
|
|
80
80
|
<template>
|
|
@@ -85,8 +85,8 @@ permitted way to persist artifacts is via `task_save(...)`.
|
|
|
85
85
|
3. If <problem/> has the format `<id/>: <text/>` where <id/> matches
|
|
86
86
|
the regexp `^[a-zA-Z][a-zA-Z0-9_-]+$`, then set
|
|
87
87
|
<problem><text/></problem> and <ase-task-id><id/></ase-task-id>
|
|
88
|
-
and call the `
|
|
89
|
-
<ase-session-id/>)` tool from the `ase` MCP
|
|
88
|
+
and call the `ase_task_id(id: <ase-task-id/>, session:
|
|
89
|
+
<ase-session-id/>)` tool from the `ase` MCP server to
|
|
90
90
|
implicitly switch the task. Do not output anything.
|
|
91
91
|
|
|
92
92
|
4. If <problem/> is empty,
|
|
@@ -103,8 +103,8 @@ permitted way to persist artifacts is via `task_save(...)`.
|
|
|
103
103
|
">
|
|
104
104
|
Set <ase-task-id/> to a unique task id, derived from <problem/>,
|
|
105
105
|
which consists of two lower-case words concatenated with a
|
|
106
|
-
`-` character. Then call the `
|
|
107
|
-
session: <ase-session-id/>)` tool from the `ase` MCP
|
|
106
|
+
`-` character. Then call the `ase_task_id(id: <ase-task-id/>,
|
|
107
|
+
session: <ase-session-id/>)` tool from the `ase` MCP server to
|
|
108
108
|
implicitly switch the task. Do not output anything.
|
|
109
109
|
</if>
|
|
110
110
|
|
|
@@ -310,21 +310,21 @@ permitted way to persist artifacts is via `task_save(...)`.
|
|
|
310
310
|
You *MUST* *NOT* call `Edit`, `Write`, `NotebookEdit`, or any
|
|
311
311
|
filesystem-modifying tool during this step.
|
|
312
312
|
|
|
313
|
-
2. Call the `
|
|
314
|
-
`ase` MCP
|
|
313
|
+
2. Call the `ase_timestamp(format: "yyyy-LL-dd HH:mm")` tool of the
|
|
314
|
+
`ase` MCP server and use the `text` field of its response for
|
|
315
315
|
<timestamp-created/> and <timestamp-modified/> information. Then
|
|
316
316
|
insert the current <ase-task-id/>, <timestamp-created/>, and
|
|
317
317
|
<timestamp-modified/> information and calculate the number of
|
|
318
318
|
words <words/> of <content/>.
|
|
319
319
|
|
|
320
320
|
3. You then *MUST* *save* the resulting plan content with the
|
|
321
|
-
`
|
|
321
|
+
`ase_task_save(id: <ase-task-id/>, text: <content/>)`.
|
|
322
322
|
|
|
323
323
|
4. If <problem-id/> is set (i.e. the <problem/> was retrieved from
|
|
324
|
-
`
|
|
325
|
-
you *MUST* additionally call the `
|
|
324
|
+
`ase_kv_get` in STEP 1.3 via key `ase-issue-<problem-id/>`),
|
|
325
|
+
you *MUST* additionally call the `ase_kv_delete(key:
|
|
326
326
|
"ase-issue-<problem-id/>")` tool of the `ase` MCP
|
|
327
|
-
|
|
327
|
+
server to remove the now-resolved analyzer result from the
|
|
328
328
|
in-memory key/value store.
|
|
329
329
|
|
|
330
330
|
5. Output a hint with the following <template/>:
|
|
@@ -98,7 +98,7 @@ documents.
|
|
|
98
98
|
|
|
99
99
|
3. <step id="STEP 3: Correction">
|
|
100
100
|
|
|
101
|
-
1. You *MUST* call the MCP tool `
|
|
101
|
+
1. You *MUST* call the MCP tool `ase_config_set(key: "agent.skill", val:
|
|
102
102
|
"ase-docs-proofread", scope: "session:<ase-session-id/>")` of the
|
|
103
103
|
`ase` MCP server.
|
|
104
104
|
|
|
@@ -202,7 +202,7 @@ documents.
|
|
|
202
202
|
|
|
203
203
|
</for>
|
|
204
204
|
|
|
205
|
-
3. You *MUST* call the MCP tool `
|
|
205
|
+
3. You *MUST* call the MCP tool `ase_config_delete(key: "agent.skill",
|
|
206
206
|
scope: "session:<ase-session-id/>")` of the `ase` MCP server.
|
|
207
207
|
|
|
208
208
|
4. You *MUST* *NOT* output any further additional explanations or
|
|
@@ -153,9 +153,9 @@ multi-*criteria* decision matrix.
|
|
|
153
153
|
not output anything.
|
|
154
154
|
|
|
155
155
|
- Then, calculate the ratings <rating-K/> (K=1-N) for all
|
|
156
|
-
alternatives in a single call by invoking the `
|
|
156
|
+
alternatives in a single call by invoking the `ase_decision_matrix(matrix:
|
|
157
157
|
[ [ <weight-1/>, <eval-1-1/>, ..., <eval-1-N/> ], ..., [ <weight-M/>,
|
|
158
|
-
<eval-M-1/>, ..., <eval-M-N/> ] ])` tool of the `ase` MCP
|
|
158
|
+
<eval-M-1/>, ..., <eval-M-N/> ] ])` tool of the `ase` MCP server.
|
|
159
159
|
The tool returns an array of N numerical values, where the K-th
|
|
160
160
|
entry is the product-sum of all weights <weight-L/> (L=1-M) and
|
|
161
161
|
the evaluation <eval-K-L/> (L=1-M) for alternative <alternative-K/>.
|
|
@@ -23,8 +23,8 @@ Persona Configuration
|
|
|
23
23
|
Do not output anything.
|
|
24
24
|
|
|
25
25
|
2. <if condition="<request/> is empty">
|
|
26
|
-
1. Call the `
|
|
27
|
-
tool from the `ase` MCP
|
|
26
|
+
1. Call the `ase_persona(session: <ase-session-id/>)`
|
|
27
|
+
tool from the `ase` MCP server and set
|
|
28
28
|
<ase-persona-style/> to its `text` output.
|
|
29
29
|
Do not output anything.
|
|
30
30
|
|
|
@@ -45,8 +45,8 @@ Persona Configuration
|
|
|
45
45
|
</template>
|
|
46
46
|
|
|
47
47
|
2. Set <ase-persona-style><request/></ase-persona-style> and
|
|
48
|
-
call the `
|
|
49
|
-
<ase-session-id/>)` tool from the `ase` MCP
|
|
48
|
+
call the `ase_persona(style: <ase-persona-style/>, session:
|
|
49
|
+
<ase-session-id/>)` tool from the `ase` MCP server. Do not
|
|
50
50
|
output anything.
|
|
51
51
|
|
|
52
52
|
3. Output the following <template/>:
|
|
@@ -45,9 +45,9 @@ explicitly requested by this procedure via outputs based on a <template/>!
|
|
|
45
45
|
|
|
46
46
|
2. **Perform Operation**:
|
|
47
47
|
|
|
48
|
-
1. Call the `
|
|
49
|
-
|
|
50
|
-
`text` output field of this `
|
|
48
|
+
1. Call the `ase_task_delete(id: <id/>)` tool of the `ase` MCP
|
|
49
|
+
server to delete the task plan content and set <text/> to the
|
|
50
|
+
`text` output field of this `ase_task_delete` tool call. Do not
|
|
51
51
|
output anything related to this MCP tool call.
|
|
52
52
|
|
|
53
53
|
- If <text/> starts with `ERROR:` or `WARNING:`:
|
|
@@ -65,9 +65,9 @@ explicitly requested by this procedure via outputs based on a <template/>!
|
|
|
65
65
|
</template>
|
|
66
66
|
|
|
67
67
|
2. <if condition="<id/> is equal <ase-task-id/> AND <ase-task-id/> is not equal 'default'">
|
|
68
|
-
Set <ase-task-id>default</ase-task-id>. Call the `
|
|
68
|
+
Set <ase-task-id>default</ase-task-id>. Call the `ase_task_id(id:
|
|
69
69
|
<ase-task-id/>, session: <ase-session-id/>)` tool from the `ase`
|
|
70
|
-
MCP
|
|
70
|
+
MCP server to switch the task to the default task. Only output
|
|
71
71
|
the following <template/>:
|
|
72
72
|
|
|
73
73
|
<template>
|
|
@@ -63,9 +63,9 @@ explicitly requested by this procedure via outputs based on a <template/>!
|
|
|
63
63
|
">
|
|
64
64
|
Set <ase-task-id><instruction/></ase-task-id> (set task
|
|
65
65
|
id to instruction) and <instruction></instruction> (set
|
|
66
|
-
instruction empty), call the `
|
|
66
|
+
instruction empty), call the `ase_task_id(id: <ase-task-id/>,
|
|
67
67
|
session: <ase-session-id/>)` tool from the `ase` MCP
|
|
68
|
-
|
|
68
|
+
server to switch the task, and then only output the
|
|
69
69
|
following <template/>:
|
|
70
70
|
|
|
71
71
|
<template>
|
|
@@ -80,8 +80,8 @@ explicitly requested by this procedure via outputs based on a <template/>!
|
|
|
80
80
|
">
|
|
81
81
|
Set <instruction></instruction> (set instruction to empty)
|
|
82
82
|
and <ase-task-id><id/></ase-task-id> (set task id to
|
|
83
|
-
id) and call the `
|
|
84
|
-
<ase-session-id/>)` tool from the `ase` MCP
|
|
83
|
+
id) and call the `ase_task_id(id: <ase-task-id/>, session:
|
|
84
|
+
<ase-session-id/>)` tool from the `ase` MCP server to
|
|
85
85
|
switch the task, and then only output the following
|
|
86
86
|
<template/>:
|
|
87
87
|
|
|
@@ -97,8 +97,8 @@ explicitly requested by this procedure via outputs based on a <template/>!
|
|
|
97
97
|
">
|
|
98
98
|
Set <instruction><text/></instruction> (set instruction to
|
|
99
99
|
text) and <ase-task-id><id/></ase-task-id> (set task id
|
|
100
|
-
to id) and call the `
|
|
101
|
-
<ase-session-id/>)` tool from the `ase` MCP
|
|
100
|
+
to id) and call the `ase_task_id(id: <ase-task-id/>, session:
|
|
101
|
+
<ase-session-id/>)` tool from the `ase` MCP server to
|
|
102
102
|
switch the task, and then only output the following
|
|
103
103
|
<template/>:
|
|
104
104
|
|
|
@@ -131,9 +131,9 @@ explicitly requested by this procedure via outputs based on a <template/>!
|
|
|
131
131
|
|
|
132
132
|
2. **Determine Plan:**
|
|
133
133
|
|
|
134
|
-
1. Call the `
|
|
135
|
-
|
|
136
|
-
the `text` output field of this `
|
|
134
|
+
1. Call the `ase_task_load(id: <ase-task-id/>)` tool of the `ase` MCP
|
|
135
|
+
server to load any existing plan content and set <text/> to
|
|
136
|
+
the `text` output field of this `ase_task_load` tool call.
|
|
137
137
|
Do not output anything related to this MCP tool call.
|
|
138
138
|
Set <content-dirty>false</content-dirty>.
|
|
139
139
|
|
|
@@ -204,8 +204,8 @@ explicitly requested by this procedure via outputs based on a <template/>!
|
|
|
204
204
|
the <instruction/> and all decisions you derived from the
|
|
205
205
|
<instruction/>.
|
|
206
206
|
|
|
207
|
-
Call the `
|
|
208
|
-
`ase` MCP
|
|
207
|
+
Call the `ase_timestamp(format: "yyyy-LL-dd HH:mm")` tool of the
|
|
208
|
+
`ase` MCP server and use the `text` field of its response
|
|
209
209
|
for fresh <timestamp-created/> and <timestamp-modified/>
|
|
210
210
|
information. Then insert the current <ase-task-id/>,
|
|
211
211
|
<timestamp-created/>, and <timestamp-modified/> information
|
|
@@ -253,8 +253,8 @@ explicitly requested by this procedure via outputs based on a <template/>!
|
|
|
253
253
|
the <instruction/> and all decisions you derived from the
|
|
254
254
|
<instruction/>.
|
|
255
255
|
|
|
256
|
-
Call the `
|
|
257
|
-
`ase` MCP
|
|
256
|
+
Call the `ase_timestamp(format: "yyyy-LL-dd HH:mm")` tool of the
|
|
257
|
+
`ase` MCP server and use the `text` field of its response
|
|
258
258
|
for fresh <timestamp-created/> and <timestamp-modified/>
|
|
259
259
|
information. Then insert the current <ase-task-id/>,
|
|
260
260
|
<timestamp-created/>, and <timestamp-modified/> information
|
|
@@ -279,16 +279,16 @@ explicitly requested by this procedure via outputs based on a <template/>!
|
|
|
279
279
|
<if condition="<content/> contains '✎ modified:' AND <content-dirty/> is 'true'">
|
|
280
280
|
Update <timestamp-modified/> with the current time in
|
|
281
281
|
ISO-style format, which has to be determined by calling the
|
|
282
|
-
`
|
|
283
|
-
MCP
|
|
282
|
+
`ase_timestamp(format: "yyyy-LL-dd HH:mm")` tool of the `ase`
|
|
283
|
+
MCP server and use the `text` field of its response. Update
|
|
284
284
|
<content/> with the new `✎ modified: **<timestamp-modified/>**`.
|
|
285
285
|
Do not output anything.
|
|
286
286
|
</if>
|
|
287
287
|
|
|
288
288
|
2. *Persist plan*:
|
|
289
289
|
<if condition="<content-dirty/> is 'true'">
|
|
290
|
-
Call the `
|
|
291
|
-
of the `ase` MCP
|
|
290
|
+
Call the `ase_task_save(id: <ase-task-id/>, text: <content/>)` tool
|
|
291
|
+
of the `ase` MCP server to persist the current plan, and then
|
|
292
292
|
set <content-dirty>false</content-dirty> again. Calculate the
|
|
293
293
|
number of words <words/> of <content/>. Do not output anything
|
|
294
294
|
related to this MCP tool call except the following <template/>:
|
|
@@ -24,8 +24,8 @@ Configure Task Id
|
|
|
24
24
|
<request>$ARGUMENTS</request>
|
|
25
25
|
|
|
26
26
|
2. <if condition="<request/> is empty">
|
|
27
|
-
- Call the `
|
|
28
|
-
tool from the `ase` MCP
|
|
27
|
+
- Call the `ase_task_id(session: <ase-session-id/>)`
|
|
28
|
+
tool from the `ase` MCP server and set
|
|
29
29
|
<ase-task-id/> to its `text` output.
|
|
30
30
|
|
|
31
31
|
- Output:
|
|
@@ -36,8 +36,8 @@ Configure Task Id
|
|
|
36
36
|
|
|
37
37
|
3. <if condition="<request/> is NOT empty">
|
|
38
38
|
- Set <ase-task-id><request/></ase-task-id> and
|
|
39
|
-
call the `
|
|
40
|
-
tool from the `ase` MCP
|
|
39
|
+
call the `ase_task_id(id: <ase-task-id/>, session: <ase-session-id/>)`
|
|
40
|
+
tool from the `ase` MCP server.
|
|
41
41
|
|
|
42
42
|
- Output:
|
|
43
43
|
<template>
|
|
@@ -57,9 +57,9 @@ explicitly requested by this procedure via outputs based on a <template/>!
|
|
|
57
57
|
">
|
|
58
58
|
Set <ase-task-id><instruction/></ase-task-id> (set task
|
|
59
59
|
id to instruction) and <instruction></instruction> (set
|
|
60
|
-
instruction empty), call the `
|
|
60
|
+
instruction empty), call the `ase_task_id(id: <ase-task-id/>,
|
|
61
61
|
session: <ase-session-id/>)` tool from the `ase` MCP
|
|
62
|
-
|
|
62
|
+
server to switch the task, and then only output the
|
|
63
63
|
following <template/>:
|
|
64
64
|
|
|
65
65
|
<template>
|
|
@@ -74,8 +74,8 @@ explicitly requested by this procedure via outputs based on a <template/>!
|
|
|
74
74
|
">
|
|
75
75
|
Set <instruction></instruction> (set instruction to empty)
|
|
76
76
|
and <ase-task-id><id/></ase-task-id> (set task id to
|
|
77
|
-
id) and call the `
|
|
78
|
-
<ase-session-id/>)` tool from the `ase` MCP
|
|
77
|
+
id) and call the `ase_task_id(id: <ase-task-id/>, session:
|
|
78
|
+
<ase-session-id/>)` tool from the `ase` MCP server to
|
|
79
79
|
switch the task, and then only output the following
|
|
80
80
|
<template/>:
|
|
81
81
|
|
|
@@ -86,9 +86,9 @@ explicitly requested by this procedure via outputs based on a <template/>!
|
|
|
86
86
|
|
|
87
87
|
2. **Determine Operation**:
|
|
88
88
|
|
|
89
|
-
1. Call the `
|
|
90
|
-
|
|
91
|
-
the `text` output field of the `
|
|
89
|
+
1. Call the `ase_task_load(id: <ase-task-id/>)` tool of the `ase` MCP
|
|
90
|
+
server to load the current task plan content and set <content/> to
|
|
91
|
+
the `text` output field of the `ase_task_load` tool call.
|
|
92
92
|
|
|
93
93
|
Calculate the number of words <words/> of <content/>.
|
|
94
94
|
|
|
@@ -26,8 +26,8 @@ List Task Plans
|
|
|
26
26
|
$ARGUMENTS
|
|
27
27
|
</expand>
|
|
28
28
|
|
|
29
|
-
1. Call the `
|
|
30
|
-
the `ase` MCP
|
|
29
|
+
1. Call the `ase_task_list(verbose: <getopt-option-verbose/>)` tool from
|
|
30
|
+
the `ase` MCP server. The result is a structured object with a
|
|
31
31
|
`tasks` array where each entry has an `id` field, and -- if
|
|
32
32
|
<getopt-option-verbose/> is `true` -- additionally an `mtime` field
|
|
33
33
|
(formatted as `YYYY-MM-DD HH:MM`).
|
|
@@ -57,9 +57,9 @@ explicitly requested by this procedure via outputs based on a <template/>!
|
|
|
57
57
|
">
|
|
58
58
|
Set <ase-task-id><instruction/></ase-task-id> (set task
|
|
59
59
|
id to instruction) and <instruction></instruction> (set
|
|
60
|
-
instruction empty), call the `
|
|
60
|
+
instruction empty), call the `ase_task_id(id: <ase-task-id/>,
|
|
61
61
|
session: <ase-session-id/>)` tool from the `ase` MCP
|
|
62
|
-
|
|
62
|
+
server to switch the task, and then only output the
|
|
63
63
|
following <template/>:
|
|
64
64
|
|
|
65
65
|
<template>
|
|
@@ -74,8 +74,8 @@ explicitly requested by this procedure via outputs based on a <template/>!
|
|
|
74
74
|
">
|
|
75
75
|
Set <instruction></instruction> (set instruction to empty)
|
|
76
76
|
and <ase-task-id><id/></ase-task-id> (set task id to
|
|
77
|
-
id) and call the `
|
|
78
|
-
<ase-session-id/>)` tool from the `ase` MCP
|
|
77
|
+
id) and call the `ase_task_id(id: <ase-task-id/>, session:
|
|
78
|
+
<ase-session-id/>)` tool from the `ase` MCP server to
|
|
79
79
|
switch the task, and then only output the following
|
|
80
80
|
<template/>:
|
|
81
81
|
|
|
@@ -86,9 +86,9 @@ explicitly requested by this procedure via outputs based on a <template/>!
|
|
|
86
86
|
|
|
87
87
|
2. **Determine Operation:**
|
|
88
88
|
|
|
89
|
-
1. Call the `
|
|
90
|
-
|
|
91
|
-
the `text` output field of the `
|
|
89
|
+
1. Call the `ase_task_load(id: <ase-task-id/>)` tool of the `ase` MCP
|
|
90
|
+
server to load the current task plan content and set <content/> to
|
|
91
|
+
the `text` output field of the `ase_task_load` tool call.
|
|
92
92
|
|
|
93
93
|
Calculate the number of words <words/> of <content/>.
|
|
94
94
|
|
|
@@ -128,14 +128,14 @@ explicitly requested by this procedure via outputs based on a <template/>!
|
|
|
128
128
|
3. <if condition="<content/> contains '✎ modified:'">
|
|
129
129
|
Update <timestamp-modified/> with the current time in
|
|
130
130
|
ISO-style format, which has to be determined by calling the
|
|
131
|
-
`
|
|
132
|
-
MCP
|
|
131
|
+
`ase_timestamp(format: "yyyy-LL-dd HH:mm")` tool of the `ase`
|
|
132
|
+
MCP server and use the `text` field of its response. Update
|
|
133
133
|
<content/> with the new `✎ modified: **<timestamp-modified/>**`.
|
|
134
134
|
Do not output anything.
|
|
135
135
|
</if>
|
|
136
136
|
|
|
137
|
-
4. Finally, call the `
|
|
138
|
-
text: <content/>)` of the `ase` MCP
|
|
137
|
+
4. Finally, call the `ase_task_save(id: <ase-task-id/>,
|
|
138
|
+
text: <content/>)` of the `ase` MCP server to save the updated
|
|
139
139
|
task plan content. Calculate the number of words <words/> of
|
|
140
140
|
<content/>. Do not output anything related to this MCP tool call
|
|
141
141
|
except the following <template/>:
|
|
@@ -59,9 +59,9 @@ explicitly requested by this procedure via outputs based on a <template/>!
|
|
|
59
59
|
">
|
|
60
60
|
Set <ase-task-id><instruction/></ase-task-id> (set task
|
|
61
61
|
id to instruction) and <instruction></instruction> (set
|
|
62
|
-
instruction empty), call the `
|
|
62
|
+
instruction empty), call the `ase_task_id(id: <ase-task-id/>,
|
|
63
63
|
session: <ase-session-id/>)` tool from the `ase` MCP
|
|
64
|
-
|
|
64
|
+
server to switch the task, and then only output the
|
|
65
65
|
following <template/>:
|
|
66
66
|
|
|
67
67
|
<template>
|
|
@@ -71,9 +71,9 @@ explicitly requested by this procedure via outputs based on a <template/>!
|
|
|
71
71
|
|
|
72
72
|
2. **Determine Operation:**
|
|
73
73
|
|
|
74
|
-
1. Call the `
|
|
75
|
-
|
|
76
|
-
the `text` output field of the `
|
|
74
|
+
1. Call the `ase_task_load(id: <ase-task-id/>)` tool of the `ase` MCP
|
|
75
|
+
server to load the current task plan content and set <content/> to
|
|
76
|
+
the `text` output field of the `ase_task_load` tool call.
|
|
77
77
|
|
|
78
78
|
Calculate the number of words <words/> of <content/>.
|
|
79
79
|
|
|
@@ -118,15 +118,15 @@ explicitly requested by this procedure via outputs based on a <template/>!
|
|
|
118
118
|
the <instruction/> and all decisions you derived from the
|
|
119
119
|
<instruction/>.
|
|
120
120
|
|
|
121
|
-
7. Call the `
|
|
122
|
-
`ase` MCP
|
|
121
|
+
7. Call the `ase_timestamp(format: "yyyy-LL-dd HH:mm")` tool of the
|
|
122
|
+
`ase` MCP server and use the `text` field of its response for
|
|
123
123
|
<timestamp-modified/> information. Then insert the current
|
|
124
124
|
<ase-task-id/>, previous <timestamp-created/>, and refreshed
|
|
125
125
|
<timestamp-modified/> information and calculate the number of
|
|
126
126
|
words <words/> of <content/>.
|
|
127
127
|
|
|
128
|
-
8. Call the `
|
|
129
|
-
text: <content/>)` of the `ase` MCP
|
|
128
|
+
8. Call the `ase_task_save(id: <ase-task-id/>,
|
|
129
|
+
text: <content/>)` of the `ase` MCP server to save the updated
|
|
130
130
|
task plan content. Do not output anything related to this MCP
|
|
131
131
|
call.
|
|
132
132
|
|
|
@@ -61,9 +61,9 @@ explicitly requested by this procedure via outputs based on a <template/>!
|
|
|
61
61
|
|
|
62
62
|
2. **Perform Operation**:
|
|
63
63
|
|
|
64
|
-
1. Call the `
|
|
65
|
-
`ase` MCP
|
|
66
|
-
`text` output field of this `
|
|
64
|
+
1. Call the `ase_task_rename(old: <old/>, new: <new/>)` tool of the
|
|
65
|
+
`ase` MCP server to rename the task plan and set <text/> to the
|
|
66
|
+
`text` output field of this `ase_task_rename` tool call. Do not
|
|
67
67
|
output anything related to this MCP tool call.
|
|
68
68
|
|
|
69
69
|
- If <text/> starts with `ERROR:` or `WARNING:`:
|
|
@@ -81,9 +81,9 @@ explicitly requested by this procedure via outputs based on a <template/>!
|
|
|
81
81
|
</template>
|
|
82
82
|
|
|
83
83
|
2. <if condition="<old/> is equal <ase-task-id/>">
|
|
84
|
-
Set <ase-task-id><new/></ase-task-id>. Call the `
|
|
84
|
+
Set <ase-task-id><new/></ase-task-id>. Call the `ase_task_id(id:
|
|
85
85
|
<ase-task-id/>, session: <ase-session-id/>)` tool from the `ase`
|
|
86
|
-
MCP
|
|
86
|
+
MCP server to switch the task to the renamed task. Only output
|
|
87
87
|
the following <template/>:
|
|
88
88
|
|
|
89
89
|
<template>
|
|
@@ -45,9 +45,9 @@ explicitly requested by this procedure via outputs based on a <template/>!
|
|
|
45
45
|
|
|
46
46
|
2. **Perform Operation**:
|
|
47
47
|
|
|
48
|
-
1. Call the `
|
|
49
|
-
|
|
50
|
-
`text` output field of this `
|
|
48
|
+
1. Call the `ase_task_load(id: <id/>)` tool of the `ase` MCP
|
|
49
|
+
server to load the task plan content and set <text/> to the
|
|
50
|
+
`text` output field of this `ase_task_load` tool call. Do not
|
|
51
51
|
output anything related to this MCP tool call.
|
|
52
52
|
|
|
53
53
|
- If <text/> starts with `ERROR:` or `WARNING:`:
|
package/dst/ase-claude.js
DELETED
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
** Agentic Software Engineering (ASE)
|
|
3
|
-
** Copyright (c) 2025-2026 Dr. Ralf S. Engelschall <rse@engelschall.com>
|
|
4
|
-
** Licensed under GPL 3.0 <https://spdx.org/licenses/GPL-3.0-only>
|
|
5
|
-
*/
|
|
6
|
-
import { execa, execaSync } from "execa";
|
|
7
|
-
import which from "which";
|
|
8
|
-
import { Config, configSchema, parseScope } from "./ase-config.js";
|
|
9
|
-
/* default statusline arguments (claudeX fallback) used when the
|
|
10
|
-
"agent.statusline" config variable is empty or unset */
|
|
11
|
-
const DEFAULT_STATUSLINE_ARGS = "-w 0 -m 2 '<blue>%u</blue> <red>%p</red> <black>%T</black> %s' '%m %e %t' '%P %c'";
|
|
12
|
-
/* CLI command "ase claude" */
|
|
13
|
-
export default class ClaudeCommand {
|
|
14
|
-
log;
|
|
15
|
-
constructor(log) {
|
|
16
|
-
this.log = log;
|
|
17
|
-
}
|
|
18
|
-
/* ensure a tool is available */
|
|
19
|
-
async ensureTool(tool) {
|
|
20
|
-
return which(tool).catch(() => {
|
|
21
|
-
throw new Error(`mandatory tool "${tool}" not found in $PATH`);
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
/* resolve the statusline command-line arguments from the layered
|
|
25
|
-
ASE configuration ("agent.statusline"), falling back to the
|
|
26
|
-
claudeX default if the value is empty or unavailable */
|
|
27
|
-
resolveStatuslineArgs() {
|
|
28
|
-
let args = "";
|
|
29
|
-
try {
|
|
30
|
-
const cfg = new Config("config", configSchema, this.log, parseScope("project"));
|
|
31
|
-
cfg.read("lenient");
|
|
32
|
-
args = String(cfg.get("agent.statusline") ?? "").trim();
|
|
33
|
-
}
|
|
34
|
-
catch (_e) {
|
|
35
|
-
/* cascade unavailable; keep fallback */
|
|
36
|
-
}
|
|
37
|
-
if (args === "")
|
|
38
|
-
args = DEFAULT_STATUSLINE_ARGS;
|
|
39
|
-
return args;
|
|
40
|
-
}
|
|
41
|
-
/* register commands */
|
|
42
|
-
register(program) {
|
|
43
|
-
program
|
|
44
|
-
.command("claude")
|
|
45
|
-
.description("start Claude Code with bootstrapped ASE environment and settings")
|
|
46
|
-
.passThroughOptions()
|
|
47
|
-
.allowUnknownOption()
|
|
48
|
-
.argument("[args...]", "arguments forwarded verbatim to the \"claude\" CLI")
|
|
49
|
-
.action(async (args) => {
|
|
50
|
-
/* ensure Claude Code CLI is available */
|
|
51
|
-
await this.ensureTool("claude");
|
|
52
|
-
/* bootstrap ASE_TERM_WIDTH from terminal columns */
|
|
53
|
-
if (process.env.ASE_TERM_WIDTH === undefined) {
|
|
54
|
-
let width = 0;
|
|
55
|
-
if (process.stdout.isTTY) {
|
|
56
|
-
const cols = process.stdout.columns;
|
|
57
|
-
if (typeof cols === "number" && cols > 0)
|
|
58
|
-
width = cols;
|
|
59
|
-
}
|
|
60
|
-
process.env.ASE_TERM_WIDTH = `${width}`;
|
|
61
|
-
}
|
|
62
|
-
/* bootstrap ASE_TERM_HEIGHT from terminal rows */
|
|
63
|
-
if (process.env.ASE_TERM_HEIGHT === undefined) {
|
|
64
|
-
let height = 0;
|
|
65
|
-
if (process.stdout.isTTY) {
|
|
66
|
-
const rows = process.stdout.rows;
|
|
67
|
-
if (typeof rows === "number" && rows > 0)
|
|
68
|
-
height = rows;
|
|
69
|
-
}
|
|
70
|
-
process.env.ASE_TERM_HEIGHT = `${height}`;
|
|
71
|
-
}
|
|
72
|
-
/* bootstrap ASE_TERM_COLORS from "tput colors" */
|
|
73
|
-
if (process.env.ASE_TERM_COLORS === undefined) {
|
|
74
|
-
let colorMode = "none";
|
|
75
|
-
try {
|
|
76
|
-
const { stdout } = execaSync("tput", ["colors"], { reject: false });
|
|
77
|
-
const n = parseInt(stdout.trim(), 10);
|
|
78
|
-
if (!Number.isNaN(n) && n >= 256)
|
|
79
|
-
colorMode = "ansi256";
|
|
80
|
-
else if (!Number.isNaN(n) && n >= 16)
|
|
81
|
-
colorMode = "ansi16";
|
|
82
|
-
}
|
|
83
|
-
catch (_e) {
|
|
84
|
-
/* ignore */
|
|
85
|
-
}
|
|
86
|
-
process.env.ASE_TERM_COLORS = colorMode;
|
|
87
|
-
}
|
|
88
|
-
/* resolve statusline arguments (config or claudeX fallback) */
|
|
89
|
-
const statuslineArgs = this.resolveStatuslineArgs();
|
|
90
|
-
/* build inline Claude Code settings JSON */
|
|
91
|
-
const settings = {
|
|
92
|
-
env: {
|
|
93
|
-
DISABLE_TELEMETRY: "1",
|
|
94
|
-
DISABLE_AUTOUPDATER: "1",
|
|
95
|
-
DISABLE_BUG_COMMAND: "1",
|
|
96
|
-
DISABLE_ERROR_REPORTING: "1"
|
|
97
|
-
},
|
|
98
|
-
statusLine: {
|
|
99
|
-
type: "command",
|
|
100
|
-
command: `ase statusline ${statuslineArgs}`,
|
|
101
|
-
padding: 0
|
|
102
|
-
}
|
|
103
|
-
};
|
|
104
|
-
const settingsJSON = JSON.stringify(settings);
|
|
105
|
-
/* exec Claude Code with the inline settings prepended
|
|
106
|
-
and any user-supplied arguments forwarded verbatim */
|
|
107
|
-
const result = await execa("claude", ["--settings", settingsJSON, ...args], {
|
|
108
|
-
stdio: "inherit",
|
|
109
|
-
env: process.env,
|
|
110
|
-
reject: false,
|
|
111
|
-
windowsHide: false
|
|
112
|
-
});
|
|
113
|
-
process.exit(result.exitCode ?? 0);
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
|
-
}
|