@rse/ase 0.0.29 → 0.0.31
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-hello.js +22 -0
- package/dst/ase-hook.js +3 -1
- package/dst/ase-setup.js +10 -7
- package/dst/ase-task.js +12 -7
- package/package.json +2 -1
- package/plugin/.claude/settings.local.json +7 -0
- package/plugin/.claude-plugin/plugin.json +20 -0
- package/plugin/.github/plugin/plugin.json +21 -0
- package/plugin/agents/ase-meta-chat.md +10 -0
- package/plugin/agents/ase-meta-search.md +16 -0
- package/plugin/commands/ase-code-lint/complete.md +9 -0
- package/plugin/commands/ase-code-lint/explain.md +9 -0
- package/plugin/commands/ase-code-lint/nope.md +11 -0
- package/plugin/commands/ase-code-lint/reassess.md +15 -0
- package/plugin/commands/ase-code-lint/recheck.md +9 -0
- package/plugin/commands/ase-code-lint/refine.md +9 -0
- package/plugin/hooks/hooks-copilot.json +23 -0
- package/plugin/hooks/hooks.json +40 -0
- package/plugin/meta/ase-constitution.md +114 -0
- package/plugin/meta/ase-dialog.md +122 -0
- package/plugin/meta/ase-persona.md +63 -0
- package/plugin/meta/ase-plan.md +69 -0
- package/plugin/meta/ase-skill.md +238 -0
- package/plugin/skills/ase-arch-analyze/SKILL.md +442 -0
- package/plugin/skills/ase-arch-discover/SKILL.md +160 -0
- package/plugin/skills/ase-code-analyze/SKILL.md +108 -0
- package/plugin/skills/ase-code-craft/SKILL.md +237 -0
- package/plugin/skills/ase-code-explain/SKILL.md +115 -0
- package/plugin/skills/ase-code-insight/SKILL.md +96 -0
- package/plugin/skills/ase-code-lint/SKILL.md +382 -0
- package/plugin/skills/ase-code-refactor/SKILL.md +241 -0
- package/plugin/skills/ase-code-resolve/SKILL.md +299 -0
- package/plugin/skills/ase-meta-changes/SKILL.md +95 -0
- package/plugin/skills/ase-meta-chat/SKILL.md +58 -0
- package/plugin/skills/ase-meta-commit/SKILL.md +64 -0
- package/plugin/skills/ase-meta-diagram/SKILL.md +101 -0
- package/plugin/skills/ase-meta-evaluate/SKILL.md +247 -0
- package/plugin/skills/ase-meta-persona/SKILL.md +52 -0
- package/plugin/skills/ase-meta-quorum/SKILL.md +122 -0
- package/plugin/skills/ase-meta-search/SKILL.md +48 -0
- package/plugin/skills/ase-meta-why/SKILL.md +69 -0
- package/plugin/skills/ase-task-delete/SKILL.md +76 -0
- package/plugin/skills/ase-task-edit/SKILL.md +390 -0
- package/plugin/skills/ase-task-id/SKILL.md +46 -0
- package/plugin/skills/ase-task-implement/SKILL.md +146 -0
- package/plugin/skills/ase-task-list/SKILL.md +44 -0
- package/plugin/skills/ase-task-preflight/SKILL.md +181 -0
- package/plugin/skills/ase-task-reboot/SKILL.md +161 -0
- package/plugin/skills/ase-task-view/SKILL.md +81 -0
package/dst/ase-hello.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
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 chalk from "chalk";
|
|
7
|
+
/* command-line handling */
|
|
8
|
+
export default class HelloCommand {
|
|
9
|
+
log;
|
|
10
|
+
constructor(log) {
|
|
11
|
+
this.log = log;
|
|
12
|
+
}
|
|
13
|
+
/* register commands */
|
|
14
|
+
register(program) {
|
|
15
|
+
program
|
|
16
|
+
.command("hello")
|
|
17
|
+
.description("Print \"Hello World\" in red")
|
|
18
|
+
.action(async () => {
|
|
19
|
+
process.stdout.write(chalk.red("Hello World") + "\n");
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
}
|
package/dst/ase-hook.js
CHANGED
|
@@ -138,7 +138,8 @@ export default class HookCommand {
|
|
|
138
138
|
`export ASE_PROJECT_ID=${quote([projectId])}\n` +
|
|
139
139
|
`export ASE_TASK_ID=${quote([taskId])}\n` +
|
|
140
140
|
`export ASE_SESSION_ID=${quote([sessionId])}\n` +
|
|
141
|
-
`export ASE_HEADLESS=${quote([headless])}\n
|
|
141
|
+
`export ASE_HEADLESS=${quote([headless])}\n` +
|
|
142
|
+
`export ASE_AGENT_TOOL=${quote([tool])}\n`;
|
|
142
143
|
fs.appendFileSync(envFile, script, "utf8");
|
|
143
144
|
}
|
|
144
145
|
/* prepend ASE information to constitution markdown */
|
|
@@ -151,6 +152,7 @@ export default class HookCommand {
|
|
|
151
152
|
`<ase-task-id>${taskId}</ase-task-id>\n` +
|
|
152
153
|
`<ase-session-id>${sessionId}</ase-session-id>\n` +
|
|
153
154
|
`<ase-headless>${headless}</ase-headless>\n` +
|
|
155
|
+
`<ase-agent-tool>${tool}</ase-agent-tool>\n` +
|
|
154
156
|
"\n" + md;
|
|
155
157
|
/* expand all @<file> references manually */
|
|
156
158
|
md = this.expandReferences(md, path.dirname(fileMd));
|
package/dst/ase-setup.js
CHANGED
|
@@ -75,10 +75,11 @@ export default class SetupCommand {
|
|
|
75
75
|
const spec = toolSpecs[tool];
|
|
76
76
|
await this.ensureTool("npm");
|
|
77
77
|
await this.ensureTool(spec.cli);
|
|
78
|
+
this.log.write("info", `setup: install${dev ? "[dev]" : ""}: used ASE version: ${Version.current()}`);
|
|
78
79
|
this.log.write("info", `setup: install${dev ? "[dev]" : ""}: ` +
|
|
79
|
-
`installing ASE ${spec.label} plugin (origin: ${dev ? "local" : "remote"})`);
|
|
80
|
-
const
|
|
81
|
-
const source = dev ?
|
|
80
|
+
`installing ASE ${spec.label} plugin (origin: ${dev ? "local" : "remote/bundled"})`);
|
|
81
|
+
const pkgdir = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
|
|
82
|
+
const source = dev ? path.resolve(pkgdir, "..") : pkgdir;
|
|
82
83
|
await this.run(spec.cli, ["plugin", "marketplace", "add", source]);
|
|
83
84
|
await this.run(spec.cli, ["plugin", "install", "ase@ase"], { retries: 3 });
|
|
84
85
|
return 0;
|
|
@@ -94,6 +95,7 @@ export default class SetupCommand {
|
|
|
94
95
|
await this.run("ase", ["service", "stop"], { quiet: true });
|
|
95
96
|
if (dev) {
|
|
96
97
|
/* update ASE CLI Tool */
|
|
98
|
+
this.log.write("info", `setup: update[dev]: used ASE version: ${Version.current()}`);
|
|
97
99
|
this.log.write("info", "setup: update[dev]: re-build ASE CLI tool (origin: local)");
|
|
98
100
|
const tooldir = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
|
|
99
101
|
await this.run("npm", ["install"], { cwd: tooldir });
|
|
@@ -108,6 +110,7 @@ export default class SetupCommand {
|
|
|
108
110
|
else {
|
|
109
111
|
/* perform NPM version check */
|
|
110
112
|
const current = Version.current();
|
|
113
|
+
this.log.write("info", `setup: update: used ASE version: ${current}`);
|
|
111
114
|
const latest = await Version.latest();
|
|
112
115
|
if (!force && latest !== "" && latest === current) {
|
|
113
116
|
this.log.write("info", `setup: update: ASE already at latest version ${current}`);
|
|
@@ -134,7 +137,7 @@ export default class SetupCommand {
|
|
|
134
137
|
await this.run("ase", ["service", "stop"], { quiet: true });
|
|
135
138
|
/* uninstall ASE plugin */
|
|
136
139
|
this.log.write("info", `setup: uninstall${dev ? "[dev]" : ""}: ` +
|
|
137
|
-
`uninstalling ASE ${spec.label} plugin (origin: ${dev ? "local" : "remote"})`);
|
|
140
|
+
`uninstalling ASE ${spec.label} plugin (origin: ${dev ? "local" : "remote/bundled"})`);
|
|
138
141
|
await this.run(spec.cli, ["plugin", "uninstall", "ase@ase"], { ignoreError: `ASE ${spec.label} plugin not installed` });
|
|
139
142
|
await this.run(spec.cli, ["plugin", "marketplace", "remove", "ase"], { ignoreError: `ASE ${spec.label} plugin marketplace not registered` });
|
|
140
143
|
/* uninstall ASE CLI tool (non-development only) */
|
|
@@ -171,7 +174,7 @@ export default class SetupCommand {
|
|
|
171
174
|
.command("install")
|
|
172
175
|
.description("install the ASE plugin for a tool")
|
|
173
176
|
.option("-t, --tool <tool>", "target tool (\"claude\" or \"copilot\")", toolDflt)
|
|
174
|
-
.option("-d, --dev", "use local working copy instead of remote repository", devDflt)
|
|
177
|
+
.option("-d, --dev", "use local working copy instead of remote/bundled repository", devDflt)
|
|
175
178
|
.action(async (opts) => {
|
|
176
179
|
process.exit(await this.doInstall(this.parseTool(opts.tool), opts.dev));
|
|
177
180
|
});
|
|
@@ -181,7 +184,7 @@ export default class SetupCommand {
|
|
|
181
184
|
.description("update the ASE tool and the ASE plugin for a tool")
|
|
182
185
|
.option("-t, --tool <tool>", "target tool (\"claude\" or \"copilot\")", toolDflt)
|
|
183
186
|
.option("-f, --force", "always perform the update, even if already at latest version", false)
|
|
184
|
-
.option("-d, --dev", "use local working copy instead of remote repository", devDflt)
|
|
187
|
+
.option("-d, --dev", "use local working copy instead of remote/bundled repository", devDflt)
|
|
185
188
|
.action(async (opts) => {
|
|
186
189
|
process.exit(await this.doUpdate(this.parseTool(opts.tool), opts.force, opts.dev));
|
|
187
190
|
});
|
|
@@ -190,7 +193,7 @@ export default class SetupCommand {
|
|
|
190
193
|
.command("uninstall")
|
|
191
194
|
.description("uninstall the ASE plugin for a tool and the ASE tool")
|
|
192
195
|
.option("-t, --tool <tool>", "target tool (\"claude\" or \"copilot\")", toolDflt)
|
|
193
|
-
.option("-d, --dev", "use local working copy instead of remote repository", devDflt)
|
|
196
|
+
.option("-d, --dev", "use local working copy instead of remote/bundled repository", devDflt)
|
|
194
197
|
.action(async (opts) => {
|
|
195
198
|
process.exit(await this.doUninstall(this.parseTool(opts.tool), opts.dev));
|
|
196
199
|
});
|
package/dst/ase-task.js
CHANGED
|
@@ -263,7 +263,9 @@ export class TaskMCP {
|
|
|
263
263
|
constructor(log) {
|
|
264
264
|
this.log = log;
|
|
265
265
|
}
|
|
266
|
+
/* register MCP tools */
|
|
266
267
|
register(mcp) {
|
|
268
|
+
/* task list */
|
|
267
269
|
mcp.registerTool("task_list", {
|
|
268
270
|
title: "ASE task list",
|
|
269
271
|
description: "List all persisted tasks. " +
|
|
@@ -299,10 +301,11 @@ export class TaskMCP {
|
|
|
299
301
|
const message = err instanceof Error ? err.message : String(err);
|
|
300
302
|
return {
|
|
301
303
|
isError: true,
|
|
302
|
-
content: [{ type: "text", text: `
|
|
304
|
+
content: [{ type: "text", text: `ERROR: ${message}` }]
|
|
303
305
|
};
|
|
304
306
|
}
|
|
305
307
|
});
|
|
308
|
+
/* task load */
|
|
306
309
|
mcp.registerTool("task_load", {
|
|
307
310
|
title: "ASE task load",
|
|
308
311
|
description: "Load a previously persisted task by `id`. " +
|
|
@@ -322,10 +325,11 @@ export class TaskMCP {
|
|
|
322
325
|
const message = err instanceof Error ? err.message : String(err);
|
|
323
326
|
return {
|
|
324
327
|
isError: true,
|
|
325
|
-
content: [{ type: "text", text: `
|
|
328
|
+
content: [{ type: "text", text: `ERROR: ${message}` }]
|
|
326
329
|
};
|
|
327
330
|
}
|
|
328
331
|
});
|
|
332
|
+
/* task save */
|
|
329
333
|
mcp.registerTool("task_save", {
|
|
330
334
|
title: "ASE task save",
|
|
331
335
|
description: "Persist a task as `text` under `id`. " +
|
|
@@ -347,7 +351,7 @@ export class TaskMCP {
|
|
|
347
351
|
const message = err instanceof Error ? err.message : String(err);
|
|
348
352
|
return {
|
|
349
353
|
isError: true,
|
|
350
|
-
content: [{ type: "text", text: `
|
|
354
|
+
content: [{ type: "text", text: `ERROR: ${message}` }]
|
|
351
355
|
};
|
|
352
356
|
}
|
|
353
357
|
});
|
|
@@ -363,8 +367,8 @@ export class TaskMCP {
|
|
|
363
367
|
try {
|
|
364
368
|
const removed = Task.delete(args.id);
|
|
365
369
|
const msg = removed ?
|
|
366
|
-
|
|
367
|
-
|
|
370
|
+
"OK: removed task" :
|
|
371
|
+
"WARNING: task not found";
|
|
368
372
|
return {
|
|
369
373
|
content: [{ type: "text", text: msg }]
|
|
370
374
|
};
|
|
@@ -373,10 +377,11 @@ export class TaskMCP {
|
|
|
373
377
|
const message = err instanceof Error ? err.message : String(err);
|
|
374
378
|
return {
|
|
375
379
|
isError: true,
|
|
376
|
-
content: [{ type: "text", text: `
|
|
380
|
+
content: [{ type: "text", text: `ERROR: ${message}` }]
|
|
377
381
|
};
|
|
378
382
|
}
|
|
379
383
|
});
|
|
384
|
+
/* task id get/set */
|
|
380
385
|
mcp.registerTool("task_id", {
|
|
381
386
|
title: "ASE task id get/set",
|
|
382
387
|
description: "Get or set the active ASE task `id` for a given `session`. " +
|
|
@@ -408,7 +413,7 @@ export class TaskMCP {
|
|
|
408
413
|
const message = err instanceof Error ? err.message : String(err);
|
|
409
414
|
return {
|
|
410
415
|
isError: true,
|
|
411
|
-
content: [{ type: "text", text: `
|
|
416
|
+
content: [{ type: "text", text: `ERROR: ${message}` }]
|
|
412
417
|
};
|
|
413
418
|
}
|
|
414
419
|
});
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"homepage": "http://github.com/rse/ase",
|
|
7
7
|
"repository": { "url": "git+https://github.com/rse/ase.git", "type": "git" },
|
|
8
8
|
"bugs": { "url": "http://github.com/rse/ase/issues" },
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.31",
|
|
10
10
|
"license": "GPL-3.0-only",
|
|
11
11
|
"author": {
|
|
12
12
|
"name": "Dr. Ralf S. Engelschall",
|
|
@@ -67,6 +67,7 @@
|
|
|
67
67
|
"files": [
|
|
68
68
|
"dst/**/*",
|
|
69
69
|
"bin/**/*",
|
|
70
|
+
"plugin/**/*",
|
|
70
71
|
"README.md"
|
|
71
72
|
],
|
|
72
73
|
"scripts": {
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "ase",
|
|
3
|
+
"version": "0.0.30",
|
|
4
|
+
"description": "Agentic Software Engineering (ASE)",
|
|
5
|
+
"keywords": [ "agentic", "software", "engineering" ],
|
|
6
|
+
"homepage": "https://ase.tools",
|
|
7
|
+
"repository": "https://github.com/rse/ase",
|
|
8
|
+
"license": "GPL-3.0",
|
|
9
|
+
"author": {
|
|
10
|
+
"name": "Dr. Ralf S. Engelschall",
|
|
11
|
+
"email": "rse@engelschall.com",
|
|
12
|
+
"url": "https://engelschall.com"
|
|
13
|
+
},
|
|
14
|
+
"mcpServers": {
|
|
15
|
+
"ase": {
|
|
16
|
+
"command": "ase",
|
|
17
|
+
"args": [ "mcp" ]
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "ase",
|
|
3
|
+
"version": "0.0.30",
|
|
4
|
+
"description": "Agentic Software Engineering (ASE)",
|
|
5
|
+
"keywords": [ "agentic", "software", "engineering" ],
|
|
6
|
+
"homepage": "https://ase.tools",
|
|
7
|
+
"repository": "https://github.com/rse/ase",
|
|
8
|
+
"license": "GPL-3.0",
|
|
9
|
+
"author": {
|
|
10
|
+
"name": "Dr. Ralf S. Engelschall",
|
|
11
|
+
"email": "rse@engelschall.com",
|
|
12
|
+
"url": "https://engelschall.com"
|
|
13
|
+
},
|
|
14
|
+
"hooks": "hooks/hooks-copilot.json",
|
|
15
|
+
"mcpServers": {
|
|
16
|
+
"ase": {
|
|
17
|
+
"command": "ase",
|
|
18
|
+
"args": [ "mcp" ]
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ase-meta-search
|
|
3
|
+
description: Use the `ase-meta-search` agent to find answers to your questions!
|
|
4
|
+
tools:
|
|
5
|
+
- "mcp__perplexity__perplexity_search"
|
|
6
|
+
- "mcp__brave__brave_web_search"
|
|
7
|
+
- "WebSearch"
|
|
8
|
+
- "WebFetch"
|
|
9
|
+
model: sonnet
|
|
10
|
+
effort: low
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
Just perform the given *query*
|
|
14
|
+
and give back the *plain responses*
|
|
15
|
+
without any modifications.
|
|
16
|
+
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
argument-hint: ""
|
|
3
|
+
description: "During Lint: Complete Code Change"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Sorry, your last proposed code change set seems to be not really *complete*,
|
|
7
|
+
as some code changes seem to be missing.
|
|
8
|
+
Please *re-assess* and propose the *entire necessary change set*, all *at once*.
|
|
9
|
+
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
argument-hint: ""
|
|
3
|
+
description: "During Lint: Reject Change and Continue"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
I *reject* your last proposed code change.
|
|
7
|
+
|
|
8
|
+
Do *NOT apply* your last code change to the code.
|
|
9
|
+
But please *continue* your plan and *continue*
|
|
10
|
+
to propose further code changes.
|
|
11
|
+
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
argument-hint: "<question>"
|
|
3
|
+
description: "During Lint: Re-Assess Last Change"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Are you *really sure*? $ARGUMENTS
|
|
7
|
+
|
|
8
|
+
Please *re-assess* and *reason* on your last proposed code change!
|
|
9
|
+
|
|
10
|
+
Then, if you are still sure that it is correct, please *propose the code
|
|
11
|
+
change once again* before continuing with your plan.
|
|
12
|
+
|
|
13
|
+
Otherwise, if you are unsure, be transparent and tell me your new
|
|
14
|
+
reasoned concerns and continue with your plan immediately.
|
|
15
|
+
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
argument-hint: ""
|
|
3
|
+
description: "During Lint: Recheck Change"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
The source code was *updated externally*.
|
|
7
|
+
Please update your last code change against the latest source code
|
|
8
|
+
and *propose the code change again* before you continue following your review.
|
|
9
|
+
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 1,
|
|
3
|
+
"hooks": {
|
|
4
|
+
"sessionStart": [
|
|
5
|
+
{
|
|
6
|
+
"type": "command",
|
|
7
|
+
"bash": "ase hook session-start --tool copilot"
|
|
8
|
+
}
|
|
9
|
+
],
|
|
10
|
+
"sessionEnd": [
|
|
11
|
+
{
|
|
12
|
+
"type": "command",
|
|
13
|
+
"bash": "ase hook session-end --tool copilot"
|
|
14
|
+
}
|
|
15
|
+
],
|
|
16
|
+
"preToolUse": [
|
|
17
|
+
{
|
|
18
|
+
"type": "command",
|
|
19
|
+
"bash": "ase hook pre-tool-use --tool copilot"
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"hooks": {
|
|
3
|
+
"SessionStart": [
|
|
4
|
+
{
|
|
5
|
+
"matcher": "startup|resume|clear|compact",
|
|
6
|
+
"hooks": [
|
|
7
|
+
{
|
|
8
|
+
"type": "command",
|
|
9
|
+
"command": "ase hook session-start",
|
|
10
|
+
"statusMessage": "Loading ASE..."
|
|
11
|
+
}
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"SessionEnd": [
|
|
16
|
+
{
|
|
17
|
+
"matcher": "",
|
|
18
|
+
"hooks": [
|
|
19
|
+
{
|
|
20
|
+
"type": "command",
|
|
21
|
+
"command": "ase hook session-end",
|
|
22
|
+
"statusMessage": "Cleaning up ASE..."
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
"PreToolUse": [
|
|
28
|
+
{
|
|
29
|
+
"matcher": "",
|
|
30
|
+
"hooks": [
|
|
31
|
+
{
|
|
32
|
+
"type": "command",
|
|
33
|
+
"command": "ase hook pre-tool-use",
|
|
34
|
+
"statusMessage": "Approve ASE..."
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
|
|
2
|
+
ASE Constitution
|
|
3
|
+
================
|
|
4
|
+
|
|
5
|
+
You are **Claude Code**, an expert-level AI coding assistant.
|
|
6
|
+
You have the **Agentic Software Engineering (ASE)** facility enabled.
|
|
7
|
+
|
|
8
|
+
If <ase-headless/> is empty or not set,
|
|
9
|
+
you *MUST* once and immediately output the following <template/> now:
|
|
10
|
+
|
|
11
|
+
<template>
|
|
12
|
+
⧉ **ASE**: ⎈ version: **<ase-version/>** <ase-version-hint/>
|
|
13
|
+
⧉ **ASE**: ※ user: **<ase-user-id/>**, ⚑ project: **<ase-project-id/>**
|
|
14
|
+
⧉ **ASE**: ◉ task: **<ase-task-id/>**, ⏻ session: **<ase-session-id/>**
|
|
15
|
+
⧉ **ASE**: ☯ persona: **<ase-persona-style/>**
|
|
16
|
+
</template>
|
|
17
|
+
|
|
18
|
+
Prohibitions
|
|
19
|
+
------------
|
|
20
|
+
|
|
21
|
+
- Do *not* factor out (move) code into own functions without good reason, like necessary reusability.
|
|
22
|
+
- Do *not* use braces around single statement blocks in "if" and "while" constructs unless the language requires them.
|
|
23
|
+
- Do *not* insist on early "return" in "if" blocks if an "else" block exists.
|
|
24
|
+
- Do *not* remove any whitespaces in the code formatting -- keep whitespaces align with code base.
|
|
25
|
+
- Do *not* show just partial code changes -- always show complete changes.
|
|
26
|
+
- Do *not* produce any line which consists of just one or more space characters before the newline -- use just the newline.
|
|
27
|
+
- Do *not* use semicolons where they are syntactically optional, except inside `for` clauses.
|
|
28
|
+
- Do *not* split continuous chunks of code less than 100 lines into individual functions.
|
|
29
|
+
- Do *not* refactor deeply nested code constructs into individual functions.
|
|
30
|
+
- Do *not* answer with the "You're absolutely right", "You are
|
|
31
|
+
absolutely right", "You're absolutely correct", or "You are absolutely
|
|
32
|
+
correct" phrases -- instead, always directly come to the point.
|
|
33
|
+
|
|
34
|
+
Commandments
|
|
35
|
+
------------
|
|
36
|
+
|
|
37
|
+
- Be *honest* and *transparent* in all your responses.
|
|
38
|
+
- Give *answers* and *explanations* in a very *concise* and *brief* format.
|
|
39
|
+
- Use *concise* and *type-safe code* only.
|
|
40
|
+
- Use *precise* and *surgical code changes* only.
|
|
41
|
+
- Be very *pedantic* on code style.
|
|
42
|
+
- Before proposing any code changes, explain *WHAT* the proposed changes do and *WHY* it is necessary.
|
|
43
|
+
- Propose *entire, complete, and necessary code change sets* for each solution.
|
|
44
|
+
- Place a *blank line before a comment line*, but not when it is the first line of a block or an end of line comment.
|
|
45
|
+
- Keep code and comment *formatting exactly as in the existing code*.
|
|
46
|
+
- Use *regular comments* `/* [...] */` instead of end-of-line comments `// [...]`.
|
|
47
|
+
- Use *two leading/trailing spaces within comments* as in `/* [...] */`.
|
|
48
|
+
- Always use *parenthesis around arrow function parameters*, even for a single parameter.
|
|
49
|
+
- Make a line break before the keywords "else", "catch", and "finally".
|
|
50
|
+
- Try to *vertically align similar operators* on consecutive, similar lines.
|
|
51
|
+
- Place spaces after opening and before closing angle brackets and braces.
|
|
52
|
+
- Use *double-quotes* (`"[...]"`) instead of single-quotes (`'[...]'`) for all strings.
|
|
53
|
+
- Use K&R coding style with *opening braces* at end of lines and *closing braces* at the begin of lines.
|
|
54
|
+
- When a language has a *more strongly-typed variant*, prefer that
|
|
55
|
+
variant (e.g., TypeScript over JavaScript, Python with type hints
|
|
56
|
+
over untyped Python).
|
|
57
|
+
- When generating temporary helper programs, prefer the *target project's
|
|
58
|
+
primary programming language* (e.g., TypeScript for TS/JS projects,
|
|
59
|
+
Python for Python projects, Go for Go projects).
|
|
60
|
+
|
|
61
|
+
Tenets
|
|
62
|
+
------
|
|
63
|
+
|
|
64
|
+
- **Think Before Coding**:
|
|
65
|
+
*Don't assume. Don't hide confusion. Surface tradeoffs.*
|
|
66
|
+
Before implementing:
|
|
67
|
+
- State your assumptions explicitly. If uncertain, ask.
|
|
68
|
+
- If multiple interpretations exist, present them - don't pick silently.
|
|
69
|
+
- If a simpler approach exists, say so. Push back when warranted.
|
|
70
|
+
- If something is unclear, stop. Name what's confusing. Ask.
|
|
71
|
+
|
|
72
|
+
- **Simplicity First**:
|
|
73
|
+
*Minimum code that solves the problem. Nothing speculative.*
|
|
74
|
+
- No features beyond what was asked.
|
|
75
|
+
- No abstractions for single-use code.
|
|
76
|
+
- No "flexibility" or "configurability" that wasn't requested.
|
|
77
|
+
- No error handling for impossible scenarios.
|
|
78
|
+
- If you write 200 lines and it could be 50, rewrite it.
|
|
79
|
+
Ask yourself: "Would a senior software developer say this is overcomplicated?" If yes, simplify.
|
|
80
|
+
|
|
81
|
+
- **Practical Relevance**:
|
|
82
|
+
*Error handling for practically relevant cases only. No theoretical assumptions.*
|
|
83
|
+
- Handle obvious or expected errors near the origin.
|
|
84
|
+
- Handle theoretical or unexpected errors in parent scopes.
|
|
85
|
+
- Avoid introducing dedicated state variables for individual error cases.
|
|
86
|
+
- If state variables are needed to detect error cases, use minimum number of those variables only.
|
|
87
|
+
- Use minimum number of state variables to span the maximum of error space.
|
|
88
|
+
|
|
89
|
+
- **Surgical Changes**:
|
|
90
|
+
*Touch only what you must. Clean up only your own mess.*
|
|
91
|
+
When editing existing code:
|
|
92
|
+
- Don't "improve" adjacent code, comments, or formatting.
|
|
93
|
+
- Don't refactor things that aren't broken.
|
|
94
|
+
- Match existing style, even if you'd do it differently.
|
|
95
|
+
- If you notice unrelated dead code, mention it - don't delete it.
|
|
96
|
+
When your changes create orphans:
|
|
97
|
+
- Remove imports/variables/functions that YOUR changes made unused.
|
|
98
|
+
- Don't remove pre-existing dead code unless asked.
|
|
99
|
+
The test: Every changed line should trace directly to the user's request.
|
|
100
|
+
|
|
101
|
+
- **Goal-Driven Execution**:
|
|
102
|
+
*Define success criteria. Loop until verified.*
|
|
103
|
+
Transform tasks into verifiable goals:
|
|
104
|
+
- "Add validation" → "Write tests for invalid inputs, then make them pass"
|
|
105
|
+
- "Fix the bug" → "Write a test that reproduces it, then make it pass"
|
|
106
|
+
- "Refactor X" → "Ensure tests pass before and after"
|
|
107
|
+
Strong success criteria let you loop independently.
|
|
108
|
+
Weak criteria ("make it work") require constant clarification.
|
|
109
|
+
|
|
110
|
+
Persona
|
|
111
|
+
-------
|
|
112
|
+
|
|
113
|
+
@./ase-skill.md
|
|
114
|
+
@./ase-persona.md
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
User Dialog
|
|
4
|
+
===========
|
|
5
|
+
|
|
6
|
+
<user-dialog-tool>unknown</user-dialog-tool>
|
|
7
|
+
<if condition="<ase-agent-tool/> is 'claude'">
|
|
8
|
+
<user-dialog-tool>AskUserQuestion</user-dialog-tool>
|
|
9
|
+
</if>
|
|
10
|
+
<if condition="<ase-agent-tool/> is 'copilot'">
|
|
11
|
+
<user-dialog-tool>ask_user</user-dialog-tool>
|
|
12
|
+
</if>
|
|
13
|
+
|
|
14
|
+
<define name="user-dialog">
|
|
15
|
+
Let the *user interactively choose* an answer.
|
|
16
|
+
|
|
17
|
+
1. Take the following question specification:
|
|
18
|
+
<spec>
|
|
19
|
+
<content/>
|
|
20
|
+
</spec>
|
|
21
|
+
|
|
22
|
+
Each line of <spec/> (separated by newlines) is of the format:
|
|
23
|
+
|
|
24
|
+
`<label/>: <description/>`.
|
|
25
|
+
|
|
26
|
+
The first line provides the question label and the question
|
|
27
|
+
description. The second and following lines each provide an
|
|
28
|
+
answer label and an answer description.
|
|
29
|
+
|
|
30
|
+
Do not output anything in this step!
|
|
31
|
+
|
|
32
|
+
2. Dispatch according to the agent tool:
|
|
33
|
+
|
|
34
|
+
- <if condition="<ase-agent-tool/> is 'claude'">
|
|
35
|
+
|
|
36
|
+
1. Start with <config></config> (set config to empty).
|
|
37
|
+
Do not output anything in this step!
|
|
38
|
+
|
|
39
|
+
<for items="2 3 4 5">
|
|
40
|
+
Take from <config/> the line number <item/>.
|
|
41
|
+
If this line does not exist, <break/>.
|
|
42
|
+
If this line exists, parse it according to the format `<label/>: <description/>`.
|
|
43
|
+
If <config/> is not empty, set <config><config/>, </config> (append comma).
|
|
44
|
+
Set <config><config/>{ label: "<label/>",
|
|
45
|
+
description: "<description/>" }</config> (append a config entry).
|
|
46
|
+
</for>
|
|
47
|
+
|
|
48
|
+
2. Call the `AskUserQuestion` tool of the agent harness with:
|
|
49
|
+
|
|
50
|
+
`AskUserQuestion({
|
|
51
|
+
questions: [
|
|
52
|
+
{
|
|
53
|
+
header: "<question-label/>",
|
|
54
|
+
question: "<question-description/>",
|
|
55
|
+
multiSelect: false,
|
|
56
|
+
options: [
|
|
57
|
+
<config/>
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
})`
|
|
62
|
+
|
|
63
|
+
3. Check the tool result and dispatch accordingly:
|
|
64
|
+
|
|
65
|
+
- If the tool result contains `user doesn't want to proceed`,
|
|
66
|
+
`tool use was rejected`, or `user declined to answer
|
|
67
|
+
questions`, or the result clearly indicates that the
|
|
68
|
+
dialog was cancelled, rejected or skipped, set set
|
|
69
|
+
<result>CANCEL</result>.
|
|
70
|
+
|
|
71
|
+
- Otherwise, extract the selected <answer/> from the
|
|
72
|
+
tool result `"<question-description/>"="<answer/>".
|
|
73
|
+
Set <result><answer/></result>.
|
|
74
|
+
If <result/> is then NOT one
|
|
75
|
+
the "label" values from <config/>, set
|
|
76
|
+
<result>OTHER: <result/></result>
|
|
77
|
+
(prefix result with "OTHER").
|
|
78
|
+
|
|
79
|
+
Do not output anything in this step!
|
|
80
|
+
</if>
|
|
81
|
+
|
|
82
|
+
- <if condition="<ase-agent-tool/> is 'copilot'">
|
|
83
|
+
|
|
84
|
+
1. Start with <config></config> (set config to empty).
|
|
85
|
+
Do not output anything in this step!
|
|
86
|
+
|
|
87
|
+
<for items="2 3 4 5">
|
|
88
|
+
Take from <config/> the line number <item/>.
|
|
89
|
+
If this line does not exist, <break/>.
|
|
90
|
+
If this line exists, parse it according to the format `<label/>: <description/>`.
|
|
91
|
+
If <config/> is not empty, set <config><config/>, </config> (append comma).
|
|
92
|
+
Set <config><config/>"<label/>: <description/>"</config> (append a config entry).
|
|
93
|
+
</for>
|
|
94
|
+
|
|
95
|
+
2. Call the `AskUserQuestion` tool of the agent harness with:
|
|
96
|
+
|
|
97
|
+
`ask_user({
|
|
98
|
+
question: "<question-label>: <question-description/>",
|
|
99
|
+
allow_freeform: true,
|
|
100
|
+
choices: [
|
|
101
|
+
<config/>
|
|
102
|
+
]
|
|
103
|
+
})`
|
|
104
|
+
|
|
105
|
+
3. Check the tool result and dispatch accordingly:
|
|
106
|
+
|
|
107
|
+
- If the tool result contains `User skipped question`
|
|
108
|
+
or the result clearly indicates that the
|
|
109
|
+
dialog was cancelled, rejected or skipped, set
|
|
110
|
+
<result>CANCEL</result>.
|
|
111
|
+
|
|
112
|
+
- Otherwise, extract the selected answer from the tool result
|
|
113
|
+
set <result/> accordingly. If <result/> is of the
|
|
114
|
+
expected format `<label/>: <description/>`, set
|
|
115
|
+
<result><label/></result> (set result to label). Else,
|
|
116
|
+
if <result/> is NOT of the expected format `<label/>:
|
|
117
|
+
<description/>`, set <result>OTHER: <result/></result>
|
|
118
|
+
(prefix result with "OTHER").
|
|
119
|
+
|
|
120
|
+
Do not output anything in this step!
|
|
121
|
+
</if>
|
|
122
|
+
</define>
|