@rse/ase 0.9.57 → 0.9.58

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.
@@ -24,6 +24,7 @@ import { MarkdownMCP } from "./ase-markdown.js";
24
24
  import { ArtifactMCP } from "./ase-artifact.js";
25
25
  import { KVMCP } from "./ase-kv.js";
26
26
  import { TimestampMCP } from "./ase-timestamp.js";
27
+ import { SleepMCP } from "./ase-sleep.js";
27
28
  import { GetoptMCP } from "./ase-getopt.js";
28
29
  import { SkillsMCP } from "./ase-skills.js";
29
30
  import pkg from "../package.json" with { type: "json" };
@@ -268,6 +269,7 @@ export default class ServiceCommand {
268
269
  new ArtifactMCP(this.log).register(mcp);
269
270
  new KVMCP().register(mcp);
270
271
  new TimestampMCP().register(mcp);
272
+ new SleepMCP().register(mcp);
271
273
  new GetoptMCP().register(mcp);
272
274
  new SkillsMCP().register(mcp);
273
275
  new ConfigMCP(this.log).register(mcp);
@@ -0,0 +1,26 @@
1
+ /*
2
+ ** Agentic Software Engineering (ASE)
3
+ ** Copyright (c) 2025-2026 Dr. Ralf S. Engelschall <rse@engelschall.com>
4
+ ** Licensed under Apache 2.0 <https://spdx.org/licenses/Apache-2.0>
5
+ */
6
+ import { z } from "zod";
7
+ /* MCP registration entry point for sleep tool */
8
+ export class SleepMCP {
9
+ register(mcp) {
10
+ mcp.registerTool("ase_sleep", {
11
+ title: "ASE sleep",
12
+ description: "Wait once for `duration` seconds and then return. " +
13
+ "The duration can be fractional (e.g. `1.5`). " +
14
+ "Returns `OK: slept <duration> seconds` as `text` after the duration elapsed.",
15
+ inputSchema: {
16
+ duration: z.number().positive().max(3600)
17
+ .describe("wait duration in seconds (fractional values allowed, at most 3600)")
18
+ }
19
+ }, async (args) => {
20
+ await new Promise((resolve) => setTimeout(resolve, args.duration * 1000));
21
+ return {
22
+ content: [{ type: "text", text: `OK: slept ${args.duration} seconds` }]
23
+ };
24
+ });
25
+ }
26
+ }
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.57",
9
+ "version": "0.9.58",
10
10
  "license": "Apache-2.0",
11
11
  "author": {
12
12
  "name": "Dr. Ralf S. Engelschall",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ase",
3
- "version": "0.9.57",
3
+ "version": "0.9.58",
4
4
  "description": "Agentic Software Engineering (ASE)",
5
5
  "keywords": [ "agentic", "software", "engineering" ],
6
6
  "homepage": "https://ase.tools",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ase",
3
- "version": "0.9.57",
3
+ "version": "0.9.58",
4
4
  "description": "Agentic Software Engineering (ASE)",
5
5
  "keywords": [ "agentic", "software", "engineering" ],
6
6
  "homepage": "https://ase.tools",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ase",
3
- "version": "0.9.57",
3
+ "version": "0.9.58",
4
4
  "description": "Agentic Software Engineering (ASE)",
5
5
  "keywords": [ "agentic", "software", "engineering" ],
6
6
  "homepage": "https://ase.tools",
@@ -31,6 +31,10 @@ which boosts you to an expert-level Software Engineering AI agent.
31
31
  - Place a *blank line before any comment line*,
32
32
  but not when it is the first line of a block or an end-of-line comment.
33
33
  - Keep code and comment *formatting exactly as in the existing code*.
34
+ - Keep comments *brief*: target *1-2 lines*, only as an exception use up to *4 lines*,
35
+ and only for *very complex algorithms* go up to at most *8 lines*.
36
+ If an existing comment is already at its limit and still has to be expanded,
37
+ first *compact* its wording before adding new content.
34
38
  - Use *regular comments* `/* [...] */` instead of end-of-line comments `// [...]`.
35
39
  - Use *two leading/trailing spaces within comments* as in `/* [...] */`.
36
40
  - Always use *parentheses around arrow function parameters*, even for a single parameter.
@@ -95,6 +95,27 @@ Control Flow Constructs
95
95
  is finished and no further repetitions are performed. This construct
96
96
  is expanded into nothing. Do not output anything.
97
97
 
98
+ - *IMPORTANT*: You *MUST* honor the following control flow construct:
99
+ <sleep duration="<sleep-duration/>"/>:
100
+
101
+ This specifies a single *wait* of <sleep-duration/> seconds
102
+ (fractional values like `1.5` are allowed): call the
103
+ `ase_sleep(duration: <sleep-duration/>)` tool of the `ase` MCP
104
+ server, which returns once the duration has elapsed. This construct
105
+ is expanded into nothing. Do not output anything.
106
+
107
+ - *IMPORTANT*: You *MUST* honor the following control flow construct:
108
+ <await condition="<await-condition/>" [interval="<await-interval/>"]><await-body/></await>:
109
+
110
+ This specifies an <await-body/> whose execution *waits* until
111
+ <await-condition/> is met: if <await-condition/> is met, the
112
+ <await-body/> is executed once and the construct is finished. If
113
+ <await-condition/> is *not* met, wait for <await-interval/> seconds
114
+ (default: `60`) via the `ase_sleep(duration: <await-interval/>)`
115
+ tool of the `ase` MCP server and then *start over* by re-evaluating
116
+ <await-condition/>. This construct is expanded to its
117
+ <await-body/>. Do not output anything else.
118
+
98
119
  - *IMPORTANT*: You *MUST* honor the following control flow construct:
99
120
  <agent <attr/>="<value/>" [...]><agent-body/></agent>:
100
121
 
@@ -292,8 +292,10 @@ Artifact Boxing Transparency
292
292
  - Internals exposed: *none* (no diffs, no code, no per-artifact explanation)
293
293
 
294
294
  - *IMPORTANT*: Precedence rule: a skill's *explicit* `black` branches
295
+ and a skill's *explicit* output suppression instructions
295
296
  deterministically skip or suppress and *win* over the implicit decisions
296
- above. Where no such branches exist, the decisions above apply.
297
+ above. Where no such branches or instructions exist, the decisions
298
+ above apply.
297
299
 
298
300
  Guidance Hint Level
299
301
  -------------------
@@ -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.57",
9
+ "version": "0.9.58",
10
10
  "license": "Apache-2.0",
11
11
  "author": {
12
12
  "name": "Dr. Ralf S. Engelschall",
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ase-code-craft
3
- argument-hint: "[--help|-h] [--auto|-a] [--dry|-d] [--quick|-Q] [--next|-n <option>[,...]] [<task-id>:] <feature>"
3
+ argument-hint: "[--help|-h] [--auto|-a] [--dry|-d] [--direct|-D] [--quick|-Q] [--next|-n <option>[,...]] [<task-id>:] <feature>"
4
4
  description: >
5
5
  Craft Source Code:
6
6
  Use when user wants to "create", "add", or "craft" a new feature from scratch.
@@ -10,6 +10,7 @@ effort: xhigh
10
10
  allowed-tools:
11
11
  - "Skill"
12
12
  - "Agent"
13
+ - "Read"
13
14
  ---
14
15
 
15
16
  @${CLAUDE_SKILL_DIR}/../../meta/ase-control.md
@@ -23,7 +24,7 @@ Craft Source Code
23
24
 
24
25
  <expand name="getopt"
25
26
  arg1="ase-code-craft"
26
- arg2="--auto|-a --dry|-d --quick|-Q --next|-n=(none|DONE|EDIT|GRILL|PREFLIGHT|IMPLEMENT)...">
27
+ arg2="--auto|-a --dry|-d --direct|-D --quick|-Q --next|-n=(none|DONE|EDIT|GRILL|PREFLIGHT|IMPLEMENT)...">
27
28
  $ARGUMENTS
28
29
  </expand>
29
30
 
@@ -45,9 +46,18 @@ From scratch *craft* the following feature:
45
46
  Procedure
46
47
  ---------
47
48
 
49
+ <if condition="<getopt-option-direct/> is not equal to 'true'">
48
50
  You *MUST* *NOT* call `Edit`, `Write`, `NotebookEdit`, or any
49
51
  filesystem-modifying tool during this entire skill. The *only*
50
52
  permitted way to persist artifacts is via `ase_task_save(...)`.
53
+ </if>
54
+ <else>
55
+ The `--direct`/`-D` mode applies the crafting *in place*, so STEP 4
56
+ below *requires* `Edit` and `Write` to modify the affected artifacts.
57
+ Every modification *MUST* still stay restricted to the artifacts the
58
+ crafting actually demands, and you *MUST* *NOT* call
59
+ `ase_task_save(...)`, as no task plan is composed at all.
60
+ </else>
51
61
 
52
62
  <flow>
53
63
 
@@ -136,13 +146,41 @@ permitted way to persist artifacts is via `ase_task_save(...)`.
136
146
 
137
147
  </step>
138
148
 
139
- 4. <step id="STEP 4: Choose Feature Crafting Approaches">
149
+ 4. <if condition="<getopt-option-direct/> is equal to 'true'">
150
+
151
+ <step id="STEP 4: Direct Feature Crafting">
152
+
153
+ 1. Directly craft the <feature/> by modifying the affected
154
+ *artifacts* with a corresponding, complete *change set*,
155
+ based on your gathered knowledge about the code base and your
156
+ internalized crafting tenets. Also, if a CHANGELOG.md
157
+ file exists, make an appropriate entry there, too.
158
+
159
+ 2. Output only the following <template/>:
160
+
161
+ <template>
162
+ ⧉ **ASE**: ◉ task: **<ase-task-id/>**, ▶ status: **changes directly applied**
163
+ </template>
164
+
165
+ 3. Then *IMMEDIATELY* *STOP* all further skill processing. You
166
+ *MUST* *NOT* output anything else in this STEP 4 or after it --
167
+ *independent* of <ase-project-boxing/>, whose exposure rules
168
+ are explicitly *overridden* here. Especially, do not output a
169
+ change summary, a list of modified artifacts, a rationale, or
170
+ a unified diff of the changes.
171
+
172
+ </step>
173
+
174
+ </if>
175
+ <else>
176
+
177
+ <step id="STEP 4: Choose Feature Crafting Approaches">
140
178
 
141
179
  <expand name="code-approaches" arg1="feature" arg2="crafting"></expand>
142
180
 
143
181
  </step>
144
182
 
145
- 5. <step id="STEP 5: Compose Feature Crafting Plan">
183
+ <step id="STEP 5: Compose Feature Crafting Plan">
146
184
 
147
185
  1. *Compose a feature plan* for the chosen feature A<n/> by
148
186
  closely aligning to the existing architecture and the existing
@@ -187,4 +225,6 @@ permitted way to persist artifacts is via `ase_task_save(...)`.
187
225
 
188
226
  </step>
189
227
 
228
+ </else>
229
+
190
230
  </flow>
@@ -9,6 +9,7 @@
9
9
  [`--help`|`-h`]
10
10
  [`--auto`|`-a`]
11
11
  [`--dry`|`-d`]
12
+ [`--direct`|`-D`]
12
13
  [`--quick`|`-Q`]
13
14
  [`--next`|`-n` *option*[,...]]
14
15
  [*task-id*:] *feature*
@@ -22,10 +23,11 @@ investigating the existing code base, internalizing crafting tenets
22
23
  preferred approach, and composing a corresponding *task plan* aligned
23
24
  with the existing architecture.
24
25
 
25
- The skill does *not* directly modify source files. It persists the
26
- plan via `ase_task_save` and then hands off to `ase-task-edit`,
27
- `ase-task-preflight`, or `ase-task-implement`, as selected by
28
- `--next`.
26
+ By default the skill does *not* directly modify source files. It
27
+ persists the plan via `ase_task_save` and then hands off to
28
+ `ase-task-edit`, `ase-task-preflight`, or `ase-task-implement`, as
29
+ selected by `--next`. Only under `--direct` it skips the plan
30
+ entirely and applies the change set to the affected artifacts itself.
29
31
 
30
32
  ## OPTIONS
31
33
 
@@ -40,6 +42,15 @@ plan via `ase_task_save` and then hands off to `ase-task-edit`,
40
42
  type-checker, or program execution) once the source files have
41
43
  been modified.
42
44
 
45
+ `--direct`|`-D`:
46
+ Craft the feature *immediately* and *in place*: skip the
47
+ feature approaches, the interactive dialog, and the entire task
48
+ plan ceremony, and directly apply the complete change set to the
49
+ affected artifacts, including a corresponding entry in an existing
50
+ `CHANGELOG.md` file. In this mode `--auto`, `--dry`, `--quick`, and
51
+ `--next` have no effect, as neither approaches are proposed nor a
52
+ plan is composed.
53
+
43
54
  `--quick`|`-Q`:
44
55
  Shorthand alias for `-a -d -n IMPLEMENT,DELETE`: automatically pick
45
56
  the recommended feature approach, compose the plan *without* the
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ase-code-refactor
3
- argument-hint: "[--help|-h] [--auto|-a] [--dry|-d] [--quick|-Q] [--next|-n <option>[,...]] [<task-id>:] <request>"
3
+ argument-hint: "[--help|-h] [--auto|-a] [--dry|-d] [--direct|-D] [--quick|-Q] [--next|-n <option>[,...]] [<task-id>:] <request>"
4
4
  description: >
5
5
  Refactor Code:
6
6
  Use when user wants to "refactor" or "change" the code base.
@@ -10,6 +10,7 @@ effort: xhigh
10
10
  allowed-tools:
11
11
  - "Skill"
12
12
  - "Agent"
13
+ - "Read"
13
14
  ---
14
15
 
15
16
  @${CLAUDE_SKILL_DIR}/../../meta/ase-control.md
@@ -23,7 +24,7 @@ Refactor Source Code
23
24
 
24
25
  <expand name="getopt"
25
26
  arg1="ase-code-refactor"
26
- arg2="--auto|-a --dry|-d --quick|-Q --next|-n=(none|DONE|EDIT|GRILL|PREFLIGHT|IMPLEMENT)...">
27
+ arg2="--auto|-a --dry|-d --direct|-D --quick|-Q --next|-n=(none|DONE|EDIT|GRILL|PREFLIGHT|IMPLEMENT)...">
27
28
  $ARGUMENTS
28
29
  </expand>
29
30
 
@@ -45,9 +46,18 @@ to `true`, <getopt-option-dry/> to `true`, and <getopt-option-next/> to
45
46
  Procedure
46
47
  ---------
47
48
 
49
+ <if condition="<getopt-option-direct/> is not equal to 'true'">
48
50
  You *MUST* *NOT* call `Edit`, `Write`, `NotebookEdit`, or any
49
51
  filesystem-modifying tool during this entire skill. The *only*
50
52
  permitted way to persist artifacts is via `ase_task_save(...)`.
53
+ </if>
54
+ <else>
55
+ The `--direct`/`-D` mode applies the refactoring *in place*, so STEP 4
56
+ below *requires* `Edit` and `Write` to modify the affected artifacts.
57
+ Every modification *MUST* still stay restricted to the artifacts the
58
+ refactoring actually demands, and you *MUST* *NOT* call
59
+ `ase_task_save(...)`, as no task plan is composed at all.
60
+ </else>
51
61
 
52
62
  <flow>
53
63
 
@@ -136,13 +146,41 @@ permitted way to persist artifacts is via `ase_task_save(...)`.
136
146
 
137
147
  </step>
138
148
 
139
- 4. <step id="STEP 4: Choose Refactoring Approaches">
149
+ 4. <if condition="<getopt-option-direct/> is equal to 'true'">
150
+
151
+ <step id="STEP 4: Direct Refactoring">
152
+
153
+ 1. Directly apply the refactoring <request/> by modifying the
154
+ affected *artifacts* with a corresponding, complete *change set*,
155
+ based on your gathered knowledge about the code base and your
156
+ internalized refactoring tenets. Also, if a CHANGELOG.md
157
+ file exists, make an appropriate entry there, too.
158
+
159
+ 2. Output only the following <template/>:
160
+
161
+ <template>
162
+ ⧉ **ASE**: ◉ task: **<ase-task-id/>**, ▶ status: **changes directly applied**
163
+ </template>
164
+
165
+ 3. Then *IMMEDIATELY* *STOP* all further skill processing. You
166
+ *MUST* *NOT* output anything else in this STEP 4 or after it --
167
+ *independent* of <ase-project-boxing/>, whose exposure rules
168
+ are explicitly *overridden* here. Especially, do not output a
169
+ change summary, a list of modified artifacts, a rationale, or
170
+ a unified diff of the changes.
171
+
172
+ </step>
173
+
174
+ </if>
175
+ <else>
176
+
177
+ <step id="STEP 4: Choose Refactoring Approaches">
140
178
 
141
179
  <expand name="code-approaches" arg1="refactoring" arg2="refactoring"></expand>
142
180
 
143
181
  </step>
144
182
 
145
- 5. <step id="STEP 5: Compose Refactoring Plan">
183
+ <step id="STEP 5: Compose Refactoring Plan">
146
184
 
147
185
  1. *Compose a refactoring plan* for the chosen refactoring A<n/> by
148
186
  closely aligning to the existing architecture and the existing
@@ -187,5 +225,7 @@ permitted way to persist artifacts is via `ase_task_save(...)`.
187
225
 
188
226
  </step>
189
227
 
228
+ </else>
229
+
190
230
  </flow>
191
231
 
@@ -9,6 +9,7 @@
9
9
  [`--help`|`-h`]
10
10
  [`--auto`|`-a`]
11
11
  [`--dry`|`-d`]
12
+ [`--direct`|`-D`]
12
13
  [`--quick`|`-Q`]
13
14
  [`--next`|`-n` *option*[,...]]
14
15
  [*task-id*:] *request*
@@ -22,10 +23,11 @@ clear interfaces, ...), proposing one or more *refactoring approaches*
22
23
  with pros and cons, letting the user pick the preferred approach,
23
24
  and composing a corresponding *task plan*.
24
25
 
25
- The skill does *not* directly modify source files. It persists the
26
- plan via `ase_task_save` and then hands off to `ase-task-edit`,
27
- `ase-task-preflight`, or `ase-task-implement`, as selected by
28
- `--next`.
26
+ By default the skill does *not* directly modify source files. It
27
+ persists the plan via `ase_task_save` and then hands off to
28
+ `ase-task-edit`, `ase-task-preflight`, or `ase-task-implement`, as
29
+ selected by `--next`. Only under `--direct` it skips the plan
30
+ entirely and applies the change set to the affected artifacts itself.
29
31
 
30
32
  ## OPTIONS
31
33
 
@@ -40,6 +42,15 @@ plan via `ase_task_save` and then hands off to `ase-task-edit`,
40
42
  type-checker, or program execution) once the source files have
41
43
  been modified.
42
44
 
45
+ `--direct`|`-D`:
46
+ Apply the refactoring *immediately* and *in place*: skip the
47
+ refactoring approaches, the interactive dialog, and the entire task
48
+ plan ceremony, and directly apply the complete change set to the
49
+ affected artifacts, including a corresponding entry in an existing
50
+ `CHANGELOG.md` file. In this mode `--auto`, `--dry`, `--quick`, and
51
+ `--next` have no effect, as neither approaches are proposed nor a
52
+ plan is composed.
53
+
43
54
  `--quick`|`-Q`:
44
55
  Shorthand alias for `-a -d -n IMPLEMENT,DELETE`: automatically pick
45
56
  the recommended refactoring approach, compose the plan *without* the
@@ -206,8 +206,18 @@ resolution actually demands, and you *MUST* *NOT* call
206
206
  internalized problem resolution tenets. Also, if a CHANGELOG.md
207
207
  file exists, make an appropriate entry there, too.
208
208
 
209
- 2. Do not output anything else in this STEP 4. Especially, do not
210
- output a change summary or a unified diff of the changes.
209
+ 2. Output only the following <template/>:
210
+
211
+ <template>
212
+ ⧉ **ASE**: ◉ task: **<ase-task-id/>**, ▶ status: **changes directly applied**
213
+ </template>
214
+
215
+ 3. Then *IMMEDIATELY* *STOP* all further skill processing. You
216
+ *MUST* *NOT* output anything else in this STEP 4 or after it --
217
+ *independent* of <ase-project-boxing/>, whose exposure rules
218
+ are explicitly *overridden* here. Especially, do not output a
219
+ change summary, a list of modified artifacts, a rationale, or
220
+ a unified diff of the changes.
211
221
 
212
222
  </step>
213
223