@rse/ase 1.0.7 → 2.0.1
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-agent-definition-api.d.ts +184 -0
- package/dst/ase-agent-definition-api.js +6 -0
- package/dst/ase-agent-definition-builtin/condenser.js +42 -0
- package/dst/ase-agent-definition-builtin/editor.js +45 -0
- package/dst/ase-agent-definition-builtin/estimator.js +98 -0
- package/dst/ase-agent-definition-builtin/implementer.js +121 -0
- package/dst/ase-agent-definition-builtin/integrator.js +56 -0
- package/dst/ase-agent-definition-builtin/qualifier.js +61 -0
- package/dst/ase-agent-definition-builtin/rebooter.js +41 -0
- package/dst/ase-agent-definition-builtin/researcher.js +77 -0
- package/dst/ase-agent-definition-core.js +827 -0
- package/dst/ase-agent-fleet.js +772 -0
- package/dst/ase-agent-process.js +232 -0
- package/dst/ase-agent-relay-client.js +509 -0
- package/dst/ase-agent-relay-core.js +213 -0
- package/dst/ase-agent-relay-server-bind.js +242 -0
- package/dst/ase-agent-relay-server-cli.js +50 -0
- package/dst/ase-agent-runtime-claim.js +189 -0
- package/dst/ase-agent-runtime-engine.js +1100 -0
- package/dst/ase-agent-runtime-exec.js +275 -0
- package/dst/ase-agent-runtime-phase.js +581 -0
- package/dst/ase-agent-runtime-request.js +272 -0
- package/dst/ase-agent-runtime-tool.js +207 -0
- package/dst/ase-agent-runtime.js +1316 -0
- package/dst/ase-agent.js +65 -0
- package/dst/ase-artifact.js +6 -5
- package/dst/ase-config-core.js +465 -0
- package/dst/ase-config-schema.js +357 -0
- package/dst/ase-config-scope.js +172 -0
- package/dst/ase-config.js +25 -585
- package/dst/ase-hook.js +228 -111
- package/dst/ase-lib-daemon-cli.js +130 -0
- package/dst/ase-lib-hash.js +20 -0
- package/dst/{ase-log.js → ase-lib-log.js} +40 -7
- package/dst/ase-lib-server-bind.js +115 -0
- package/dst/ase-lib-server-cli.js +474 -0
- package/dst/{ase-table.js → ase-lib-table.js} +1 -1
- package/dst/{ase-version.js → ase-lib-version.js} +8 -1
- package/dst/ase-man.js +96 -0
- package/dst/ase-mcp.js +166 -13
- package/dst/{ase-getopt.js → ase-service-getopt.js} +82 -80
- package/dst/{ase-markdown.js → ase-service-markdown.js} +18 -11
- package/dst/ase-service-otel.js +1246 -0
- package/dst/{ase-skills.js → ase-service-skills.js} +29 -64
- package/dst/ase-service-state.js +101 -0
- package/dst/ase-service.js +269 -81
- package/dst/ase-setup-common.js +141 -0
- package/dst/ase-setup-mcp.js +359 -0
- package/dst/ase-setup-settings.js +837 -0
- package/dst/ase-setup.js +113 -869
- package/dst/ase-spec.js +31 -19
- package/dst/ase-statusline.js +108 -43
- package/dst/ase-task-board-core.js +739 -0
- package/dst/ase-task-board-filter.js +127 -0
- package/dst/ase-task-board-flow.js +237 -0
- package/dst/ase-task-board-graph.js +497 -0
- package/dst/ase-task-board-stats.js +263 -0
- package/dst/ase-task-board-tui-control.js +775 -0
- package/dst/ase-task-board-tui-model.js +1008 -0
- package/dst/ase-task-board-tui-popup.js +626 -0
- package/dst/ase-task-board-tui-style.js +106 -0
- package/dst/ase-task-board-tui-view.js +847 -0
- package/dst/ase-task-board-tui.js +189 -0
- package/dst/ase-task-board-web-client.css +1 -0
- package/dst/ase-task-board-web-client.html +20 -0
- package/dst/ase-task-board-web-client.js +81 -0
- package/dst/ase-task-board-web-server.js +823 -0
- package/dst/ase-task-board.js +134 -0
- package/dst/ase-task-format.js +757 -0
- package/dst/ase-task-request.js +208 -0
- package/dst/ase-task-store-client.js +495 -0
- package/dst/ase-task-store-core.js +804 -0
- package/dst/ase-task-store-issues.js +237 -0
- package/dst/ase-task-store-plugin-api.js +6 -0
- package/dst/ase-task-store-plugin-ase.js +484 -0
- package/dst/ase-task-store-plugin-delegate.js +137 -0
- package/dst/ase-task-store-plugin-gitea.js +666 -0
- package/dst/ase-task-store-plugin-github.js +696 -0
- package/dst/ase-task-store-plugin-gitlab.js +668 -0
- package/dst/ase-task-store-server-bind.js +538 -0
- package/dst/ase-task-store-server-cli.js +154 -0
- package/dst/ase-task.js +1335 -357
- package/dst/{ase-compat.js → ase-util-compat.js} +2 -2
- package/dst/{ase-diagram.js → ase-util-diagram.js} +107 -32
- package/dst/{ase-meta.js → ase-util-meta.js} +2 -2
- package/dst/{ase-metric.js → ase-util-metric.js} +2 -2
- package/dst/{ase-mint.js → ase-util-mint.js} +19 -12
- package/dst/{ase-worktree.js → ase-util-worktree.js} +30 -19
- package/dst/ase-util.js +20 -0
- package/dst/ase.js +108 -32
- package/dst/man/ase-agent-adhoc.1 +515 -0
- package/dst/man/ase-agent-condenser.1 +193 -0
- package/dst/man/ase-agent-editor.1 +212 -0
- package/dst/man/ase-agent-estimator.1 +214 -0
- package/dst/man/ase-agent-fleet.1 +185 -0
- package/dst/man/ase-agent-implementer.1 +233 -0
- package/dst/man/ase-agent-integrator.1 +213 -0
- package/dst/man/ase-agent-qualifier.1 +214 -0
- package/dst/man/ase-agent-rebooter.1 +193 -0
- package/dst/man/ase-agent-relay.1 +128 -0
- package/dst/man/ase-agent-researcher.1 +217 -0
- package/dst/man/ase-agent.1 +264 -0
- package/dst/man/ase-artifact-list.1 +38 -0
- package/dst/man/ase-artifact-name.1 +39 -0
- package/dst/man/ase-artifact.1 +56 -0
- package/dst/man/ase-config-delete.1 +45 -0
- package/dst/man/ase-config-edit.1 +48 -0
- package/dst/man/ase-config-get.1 +46 -0
- package/dst/man/ase-config-init.1 +60 -0
- package/dst/man/ase-config-list.1 +42 -0
- package/dst/man/ase-config-set.1 +52 -0
- package/dst/man/ase-config.1 +231 -0
- package/dst/man/ase-hook-permission-request.1 +36 -0
- package/dst/man/ase-hook-pre-tool-use.1 +59 -0
- package/dst/man/ase-hook-session-end.1 +47 -0
- package/dst/man/ase-hook-session-persona.1 +37 -0
- package/dst/man/ase-hook-session-start.1 +81 -0
- package/dst/man/ase-hook-stop.1 +34 -0
- package/dst/man/ase-hook-user-prompt-submit.1 +34 -0
- package/dst/man/ase-hook.1 +51 -0
- package/dst/man/ase-man.1 +67 -0
- package/dst/man/ase-mcp.1 +61 -0
- package/dst/man/ase-service-log.1 +43 -0
- package/dst/man/ase-service-send.1 +47 -0
- package/dst/man/ase-service-start.1 +54 -0
- package/dst/man/ase-service-status.1 +46 -0
- package/dst/man/ase-service-stop.1 +37 -0
- package/dst/man/ase-service.1 +85 -0
- package/dst/man/ase-setup-disable.1 +44 -0
- package/dst/man/ase-setup-enable.1 +45 -0
- package/dst/man/ase-setup-install.1 +73 -0
- package/dst/man/ase-setup-mcp.1 +124 -0
- package/dst/man/ase-setup-status.1 +60 -0
- package/dst/man/ase-setup-statusline.1 +92 -0
- package/dst/man/ase-setup-telemetry.1 +92 -0
- package/dst/man/ase-setup-uninstall.1 +59 -0
- package/dst/man/ase-setup-update.1 +64 -0
- package/dst/man/ase-setup.1 +93 -0
- package/dst/man/ase-spec-export.1 +62 -0
- package/dst/man/ase-spec-lint.1 +40 -0
- package/dst/man/ase-spec-preview.1 +40 -0
- package/dst/man/ase-spec.1 +46 -0
- package/dst/man/ase-statusline.1 +189 -0
- package/dst/man/ase-task-assign.1 +71 -0
- package/dst/man/ase-task-board.1 +384 -0
- package/dst/man/ase-task-delete.1 +35 -0
- package/dst/man/ase-task-edit.1 +46 -0
- package/dst/man/ase-task-idscheme.1 +65 -0
- package/dst/man/ase-task-lifecycle.1 +57 -0
- package/dst/man/ase-task-list.1 +47 -0
- package/dst/man/ase-task-load.1 +36 -0
- package/dst/man/ase-task-newid.1 +61 -0
- package/dst/man/ase-task-purge.1 +37 -0
- package/dst/man/ase-task-rename.1 +44 -0
- package/dst/man/ase-task-request.1 +61 -0
- package/dst/man/ase-task-save.1 +48 -0
- package/dst/man/ase-task-status.1 +55 -0
- package/dst/man/ase-task-store.1 +194 -0
- package/dst/man/ase-task-view.1 +40 -0
- package/dst/man/ase-task.1 +160 -0
- package/dst/man/ase-util-compat.1 +25 -0
- package/dst/man/ase-util-diagram.1 +76 -0
- package/dst/man/ase-util-meta.1 +45 -0
- package/dst/man/ase-util-metric.1 +54 -0
- package/dst/man/ase-util-mint.1 +59 -0
- package/dst/man/ase-util-worktree.1 +72 -0
- package/dst/man/ase-util.1 +50 -0
- package/dst/man/ase.1 +124 -0
- package/package.json +81 -21
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/.codex-plugin/plugin.json +1 -1
- package/plugin/.github/plugin/plugin.json +1 -1
- package/plugin/agents/ase-meta-diagram.md +12 -8
- package/plugin/agents/ase-repo-review.md +322 -0
- package/plugin/hooks/hooks-codex.json +5 -0
- package/plugin/hooks/hooks-copilot.json +5 -0
- package/plugin/hooks/hooks.json +8 -0
- package/plugin/meta/ase-common-approach.md +117 -0
- package/plugin/meta/ase-common-changeset.md +256 -0
- package/plugin/meta/ase-common-code.md +10 -173
- package/plugin/meta/ase-common-grill.md +317 -0
- package/plugin/meta/ase-common-resolve.md +305 -0
- package/plugin/meta/ase-common-task.md +83 -4
- package/plugin/meta/ase-constitution.md +0 -2
- package/plugin/meta/ase-format-specbook.md +208 -25
- package/plugin/meta/ase-format-specbook.yaml +242 -851
- package/plugin/meta/ase-format-task.md +669 -125
- package/plugin/meta/ase-persona.md +3 -4
- package/plugin/meta/ase-skill.md +9 -0
- package/plugin/mods/ase-mods.ts +409 -0
- package/plugin/mods/claude-code.d.ts +13417 -0
- package/plugin/skills/ase-arch-analyze/SKILL.md +1 -1
- package/plugin/skills/ase-arch-analyze/help.md +2 -2
- package/plugin/skills/ase-code-analyze/SKILL.md +59 -8
- package/plugin/skills/ase-code-analyze/help.md +29 -4
- package/plugin/skills/ase-code-edit/SKILL.md +107 -181
- package/plugin/skills/ase-code-edit/help.md +118 -31
- package/plugin/skills/ase-code-lint/SKILL.md +64 -13
- package/plugin/skills/ase-code-lint/help.md +32 -2
- package/plugin/skills/ase-docs-proofread/SKILL.md +4 -4
- package/plugin/skills/ase-docs-proofread/help.md +1 -1
- package/plugin/skills/ase-docs-refine/SKILL.md +4 -4
- package/plugin/skills/ase-docs-shorten/SKILL.md +4 -4
- package/plugin/skills/ase-help-intent/data.md +2164 -1087
- package/plugin/skills/ase-help-intent/help.md +1 -1
- package/plugin/skills/ase-help-skill/catalog.md +12 -9
- package/plugin/skills/ase-meta-brainstorm/SKILL.md +1 -1
- package/plugin/skills/ase-meta-config/SKILL.md +3 -4
- package/plugin/skills/ase-meta-config/help.md +31 -10
- package/plugin/skills/ase-meta-mint/SKILL.md +5 -5
- package/plugin/skills/ase-meta-mint/help.md +10 -5
- package/plugin/skills/ase-meta-why/help.md +1 -1
- package/plugin/skills/ase-meta-workflow/SKILL.md +7 -7
- package/plugin/skills/ase-meta-workflow/help.md +4 -4
- package/plugin/skills/ase-meta-workflow/sample.md +3 -3
- package/plugin/skills/ase-meta-workflow/workflow.txt +22 -18
- package/plugin/skills/{ase-meta-changelog → ase-repo-changelog}/SKILL.md +4 -3
- package/plugin/skills/{ase-meta-changelog → ase-repo-changelog}/help.md +5 -5
- package/plugin/skills/{ase-meta-commit → ase-repo-commit}/SKILL.md +6 -6
- package/plugin/skills/{ase-meta-commit → ase-repo-commit}/help.md +5 -5
- package/plugin/skills/{ase-meta-diff → ase-repo-diff}/SKILL.md +6 -6
- package/plugin/skills/{ase-meta-diff → ase-repo-diff}/help.md +8 -8
- package/plugin/skills/{ase-code-dissect → ase-repo-dissect}/SKILL.md +19 -19
- package/plugin/skills/{ase-code-dissect → ase-repo-dissect}/help.md +10 -12
- package/plugin/skills/ase-repo-merge/SKILL.md +346 -0
- package/plugin/skills/ase-repo-merge/help.md +107 -0
- package/plugin/skills/ase-repo-resolve/SKILL.md +158 -0
- package/plugin/skills/ase-repo-resolve/help.md +102 -0
- package/plugin/skills/ase-repo-review/SKILL.md +406 -0
- package/plugin/skills/ase-repo-review/help.md +181 -0
- package/plugin/skills/ase-spec-edit/SKILL.md +117 -183
- package/plugin/skills/ase-spec-edit/help.md +107 -26
- package/plugin/skills/ase-sync-reconcile/help.md +1 -1
- package/plugin/skills/ase-task-assign/SKILL.md +111 -0
- package/plugin/skills/ase-task-assign/help.md +119 -0
- package/plugin/skills/ase-task-condense/SKILL.md +21 -21
- package/plugin/skills/ase-task-condense/help.md +12 -10
- package/plugin/skills/ase-task-delete/SKILL.md +1 -1
- package/plugin/skills/ase-task-dissect/SKILL.md +71 -48
- package/plugin/skills/ase-task-dissect/help.md +10 -9
- package/plugin/skills/ase-task-edit/SKILL.md +379 -94
- package/plugin/skills/ase-task-edit/help.md +95 -22
- package/plugin/skills/ase-task-estimate/SKILL.md +492 -0
- package/plugin/skills/ase-task-estimate/help.md +158 -0
- package/plugin/skills/ase-task-grill/SKILL.md +246 -138
- package/plugin/skills/ase-task-grill/help.md +129 -26
- package/plugin/skills/ase-task-id/SKILL.md +8 -1
- package/plugin/skills/ase-task-id/help.md +6 -3
- package/plugin/skills/ase-task-implement/SKILL.md +535 -145
- package/plugin/skills/ase-task-implement/help.md +138 -47
- package/plugin/skills/ase-task-integrate/SKILL.md +549 -0
- package/plugin/skills/ase-task-integrate/help.md +187 -0
- package/plugin/skills/ase-task-list/SKILL.md +55 -23
- package/plugin/skills/ase-task-list/help.md +45 -21
- package/plugin/skills/ase-task-reboot/SKILL.md +84 -43
- package/plugin/skills/ase-task-reboot/help.md +28 -8
- package/plugin/skills/ase-task-rename/SKILL.md +10 -2
- package/plugin/skills/ase-task-research/SKILL.md +386 -0
- package/plugin/skills/ase-task-research/help.md +102 -0
- package/plugin/skills/ase-task-status/SKILL.md +137 -0
- package/plugin/skills/ase-task-status/help.md +80 -0
- package/plugin/skills/ase-task-view/SKILL.md +49 -24
- package/plugin/skills/ase-task-view/help.md +19 -9
- package/plugin/agents/ase-meta-review.md +0 -187
- package/plugin/skills/ase-code-craft/SKILL.md +0 -264
- package/plugin/skills/ase-code-craft/help.md +0 -122
- package/plugin/skills/ase-code-refactor/SKILL.md +0 -232
- package/plugin/skills/ase-code-refactor/help.md +0 -109
- package/plugin/skills/ase-code-resolve/SKILL.md +0 -289
- package/plugin/skills/ase-code-resolve/help.md +0 -116
- package/plugin/skills/ase-meta-review/SKILL.md +0 -210
- package/plugin/skills/ase-meta-review/help.md +0 -96
- package/plugin/skills/ase-task-preflight/SKILL.md +0 -166
- package/plugin/skills/ase-task-preflight/help.md +0 -82
- /package/dst/{ase-ignore.js → ase-lib-ignore.js} +0 -0
- /package/dst/{ase-stdio.js → ase-lib-stdio.js} +0 -0
- /package/dst/{ase-kv.js → ase-service-kv.js} +0 -0
- /package/dst/{ase-sleep.js → ase-service-sleep.js} +0 -0
- /package/dst/{ase-timestamp.js → ase-service-timestamp.js} +0 -0
|
@@ -482,7 +482,7 @@ interface quality, quality attributes, and architecture governance.
|
|
|
482
482
|
nothing and hence emit no output at all):
|
|
483
483
|
|
|
484
484
|
<ase-tpl-hint level="minimal">
|
|
485
|
-
For deeper analysis, suggestions on solution approaches and then final source code changes, use `/ase-
|
|
485
|
+
For deeper analysis, suggestions on solution approaches and then final source code changes, use `/ase-task-edit <id-prefix/>P{n}` or `/ase-task-edit <id-prefix/>T{n}`, or for a direct one-shot fix use `/ase-code-edit <id-prefix/>P{n}` or `/ase-code-edit <id-prefix/>T{n}`, in the same or even a different session.
|
|
486
486
|
</ase-tpl-hint>
|
|
487
487
|
|
|
488
488
|
</step>
|
|
@@ -69,5 +69,5 @@ Analyze a module under its own id namespace, yielding `core-P1`, `core-T1`, ...:
|
|
|
69
69
|
|
|
70
70
|
## SEE ALSO
|
|
71
71
|
|
|
72
|
-
[`ase-arch-discover`](../ase-arch-discover/help.md), [`ase-code-analyze`](../ase-code-analyze/help.md), [`ase-
|
|
73
|
-
[`ase-code-
|
|
72
|
+
[`ase-arch-discover`](../ase-arch-discover/help.md), [`ase-code-analyze`](../ase-code-analyze/help.md), [`ase-task-edit`](../ase-task-edit/help.md),
|
|
73
|
+
[`ase-code-edit`](../ase-code-edit/help.md), [`ase-code-insight`](../ase-code-insight/help.md).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ase-code-analyze
|
|
3
|
-
argument-hint: "[--help|-h] [--performance|-p] [--security|-s] [--severity|-S=(LOW|MEDIUM|HIGH)] [--prefix|-P=<prefix>] <source-reference>"
|
|
3
|
+
argument-hint: "[--help|-h] [--performance|-p] [--security|-s] [--severity|-S=(LOW|MEDIUM|HIGH)] [--prefix|-P=<prefix>] [--staged] [--unstaged] [<source-reference>]"
|
|
4
4
|
description: >
|
|
5
5
|
Analyze the source code for problems in either the logic and
|
|
6
6
|
semantics and its related control flow, performance and efficiency,
|
|
@@ -11,6 +11,8 @@ effort: high
|
|
|
11
11
|
allowed-tools:
|
|
12
12
|
- "Agent"
|
|
13
13
|
- "Glob"
|
|
14
|
+
- "Bash(git rev-parse *)"
|
|
15
|
+
- "Bash(git -C *)"
|
|
14
16
|
---
|
|
15
17
|
|
|
16
18
|
@${CLAUDE_SKILL_DIR}/../../meta/ase-control.md
|
|
@@ -23,7 +25,7 @@ Analyze Source Code
|
|
|
23
25
|
|
|
24
26
|
<expand name="getopt"
|
|
25
27
|
arg1="ase-code-analyze"
|
|
26
|
-
arg2="--performance|-p --security|-s --severity|-S=(LOW|MEDIUM|HIGH) --prefix|-P=">
|
|
28
|
+
arg2="--performance|-p --security|-s --severity|-S=(LOW|MEDIUM|HIGH) --prefix|-P= --staged --unstaged">
|
|
27
29
|
$ARGUMENTS
|
|
28
30
|
</expand>
|
|
29
31
|
|
|
@@ -59,8 +61,9 @@ problems in *performance* and *efficiency*, or problems in *security*.
|
|
|
59
61
|
The project source artifacts are classified as a *black box*, so
|
|
60
62
|
the user does *not* want them inspected or their problems surfaced.
|
|
61
63
|
*Skip* the entire investigation and analysis: do *not* invoke any
|
|
62
|
-
`Glob
|
|
63
|
-
the following <template/> and then *SKIP* the remaining step
|
|
64
|
+
`Bash`, `Glob`, or `Agent` tool and do *not* read any source, only
|
|
65
|
+
output the following <template/> and then *SKIP* the remaining step
|
|
66
|
+
STEP 3:
|
|
64
67
|
|
|
65
68
|
<template>
|
|
66
69
|
<ase-tpl-bullet-normal/> **CODE ANALYSIS**: *suppressed* (`project.boxing` is `black`)
|
|
@@ -84,10 +87,58 @@ problems in *performance* and *efficiency*, or problems in *security*.
|
|
|
84
87
|
`true`, set <lens>security</lens> if <getopt-option-security/> is
|
|
85
88
|
equal `true`, and set <lens>logic</lens> otherwise.
|
|
86
89
|
|
|
90
|
+
<if condition="<getopt-option-staged/> is equal `true` or <getopt-option-unstaged/> is equal `true`">
|
|
91
|
+
|
|
92
|
+
Then *silently* restrict the analysis to the *changed* files of
|
|
93
|
+
the Git working copy. Set <changes>staged and unstaged</changes>
|
|
94
|
+
if both <getopt-option-staged/> and <getopt-option-unstaged/> are
|
|
95
|
+
equal `true`, set <changes>staged</changes> if only
|
|
96
|
+
<getopt-option-staged/> is equal `true`, and set
|
|
97
|
+
<changes>unstaged</changes> otherwise. Determine the *repository
|
|
98
|
+
root* by running the command `git rev-parse --show-toplevel`
|
|
99
|
+
(taken exactly as given) and capturing its output into
|
|
100
|
+
<repo-root/>. Then determine the changed files by running the
|
|
101
|
+
corresponding commands (taken exactly as given), each listing one
|
|
102
|
+
path relative to <repo-root/> per line, and collect all listed
|
|
103
|
+
paths, dropping duplicates:
|
|
104
|
+
|
|
105
|
+
<if condition="<getopt-option-staged/> is equal `true`">
|
|
106
|
+
`git -C "<repo-root/>" -c core.quotepath=off diff --cached --name-only --diff-filter=d`
|
|
107
|
+
</if>
|
|
108
|
+
|
|
109
|
+
<if condition="<getopt-option-unstaged/> is equal `true`">
|
|
110
|
+
`git -C "<repo-root/>" -c core.quotepath=off diff --name-only --diff-filter=d`
|
|
111
|
+
|
|
112
|
+
`git -C "<repo-root/>" -c core.quotepath=off ls-files --others --exclude-standard`
|
|
113
|
+
</if>
|
|
114
|
+
|
|
115
|
+
*Skip* every listed path below the `.ase/` directory (it carries
|
|
116
|
+
*ASE*'s own state) and every path which is not a source code file
|
|
117
|
+
(e.g. a binary file), and prefix every remaining path with
|
|
118
|
+
`<repo-root/>/`. If `<getopt-arguments/>` is not empty, keep only
|
|
119
|
+
those files which lie within the source code referenced by it,
|
|
120
|
+
expanding any directory or wildcard references with the `Glob`
|
|
121
|
+
tool. Set <sources/> to the resulting list of individual source
|
|
122
|
+
code files, preserving order.
|
|
123
|
+
|
|
124
|
+
If <sources/> is empty, only output the following <template/>
|
|
125
|
+
and then *SKIP* the rest of this STEP 2 and the remaining step
|
|
126
|
+
STEP 3:
|
|
127
|
+
|
|
128
|
+
<template>
|
|
129
|
+
<ase-tpl-bullet-normal/> **CODE ANALYSIS**: *no <changes/> source files to analyze*
|
|
130
|
+
</template>
|
|
131
|
+
|
|
132
|
+
</if>
|
|
133
|
+
<else>
|
|
134
|
+
|
|
87
135
|
Then *silently* resolve `<getopt-arguments/>` to the list
|
|
88
136
|
<sources/> of individual source code files, expanding any
|
|
89
|
-
directory or wildcard references with the `Glob` tool.
|
|
90
|
-
|
|
137
|
+
directory or wildcard references with the `Glob` tool.
|
|
138
|
+
|
|
139
|
+
</else>
|
|
140
|
+
|
|
141
|
+
Then partition <sources/>, preserving order, into at most *eight*
|
|
91
142
|
batches of roughly equal size (a single file yields a single
|
|
92
143
|
batch), and invoke the following tool once per batch, emitting
|
|
93
144
|
*all* invocations *in one single message* so they run in
|
|
@@ -117,7 +168,7 @@ problems in *performance* and *efficiency*, or problems in *security*.
|
|
|
117
168
|
to that list.
|
|
118
169
|
|
|
119
170
|
You *MUST* *NOT* output anything at all in this STEP 2 beyond the
|
|
120
|
-
`Glob
|
|
171
|
+
`Bash`, `Glob`, and `Agent` tool invocations and the templates above.
|
|
121
172
|
|
|
122
173
|
</step>
|
|
123
174
|
|
|
@@ -218,7 +269,7 @@ problems in *performance* and *efficiency*, or problems in *security*.
|
|
|
218
269
|
nothing and hence emit no output at all):
|
|
219
270
|
|
|
220
271
|
<ase-tpl-hint level="minimal">
|
|
221
|
-
For deeper analysis, suggestions on solution approaches and then final problem resolution, use `/ase-
|
|
272
|
+
For deeper analysis, suggestions on solution approaches and then final problem resolution, use `/ase-task-edit <id-prefix/>P{n}`, or for a direct one-shot fix use `/ase-code-edit <id-prefix/>P{n}`, in the same or even a different session.
|
|
222
273
|
</ase-tpl-hint>
|
|
223
274
|
|
|
224
275
|
You *MUST* not output anything else in this STEP 3,
|
|
@@ -11,7 +11,9 @@
|
|
|
11
11
|
[`--security`|`-s`]
|
|
12
12
|
[`--severity`|`-S`=(`LOW`|`MEDIUM`|`HIGH`)]
|
|
13
13
|
[`--prefix`|`-P` *prefix*]
|
|
14
|
-
|
|
14
|
+
[`--staged`]
|
|
15
|
+
[`--unstaged`]
|
|
16
|
+
[*source-reference*]
|
|
15
17
|
|
|
16
18
|
## DESCRIPTION
|
|
17
19
|
|
|
@@ -47,19 +49,29 @@ under *distinct* prefixes coexist instead of overwriting each other.
|
|
|
47
49
|
Without the option (the default), ids stay unprefixed and the purge
|
|
48
50
|
covers the *entire* `ase-issue-*` space, including any prefixed results.
|
|
49
51
|
|
|
52
|
+
The `--staged` option restricts the analysis to the source files with
|
|
53
|
+
*staged* Git changes, and the `--unstaged` option restricts it to the
|
|
54
|
+
source files with *unstaged* Git changes plus the *untracked* source
|
|
55
|
+
files. Deleted files are skipped, and the files are analyzed in their
|
|
56
|
+
current working copy state. With a *source-reference*, only the changed
|
|
57
|
+
files within it are analyzed; without one, all changed files of the
|
|
58
|
+
repository are analyzed. If no such file exists, nothing is analyzed.
|
|
59
|
+
Both options can be combined to analyze the source files with *any*
|
|
60
|
+
uncommitted Git changes.
|
|
61
|
+
|
|
50
62
|
The skill investigates the code base silently, reports each detected
|
|
51
63
|
problem as a `PROBLEM` entry with severity (`LOW`, `MEDIUM`, `HIGH`) and
|
|
52
64
|
inline file/line references (in the performance lens, each entry
|
|
53
65
|
additionally carries an *evidence* and a *trade-off* line), and persists
|
|
54
66
|
results in the `ase` MCP key/value store as `ase-issue-P<n>` entries so
|
|
55
|
-
they can later be
|
|
67
|
+
they can later be planned via `ase-task-edit P<n>` or directly
|
|
56
68
|
fixed via `ase-code-edit P<n>`.
|
|
57
69
|
|
|
58
70
|
## ARGUMENTS
|
|
59
71
|
|
|
60
72
|
- *source-reference*:
|
|
61
73
|
A file, directory, function, or other reference to the source code
|
|
62
|
-
to analyze.
|
|
74
|
+
to analyze. Optional only under `--staged` or `--unstaged`.
|
|
63
75
|
|
|
64
76
|
## SCENARIOS
|
|
65
77
|
|
|
@@ -68,6 +80,7 @@ fixed via `ase-code-edit P<n>`.
|
|
|
68
80
|
- You want performance and efficiency opportunities surfaced
|
|
69
81
|
- You want a security-focused inspection of your code
|
|
70
82
|
- You want problems persisted as issue ids like `P1` for later resolving
|
|
83
|
+
- You want only your staged or unstaged changes analyzed before committing
|
|
71
84
|
|
|
72
85
|
## EXAMPLES
|
|
73
86
|
|
|
@@ -107,7 +120,19 @@ Analyze a directory under its own id namespace, yielding `auth-P1`, `auth-P2`, .
|
|
|
107
120
|
❯ /ase-code-analyze --prefix auth src/auth/
|
|
108
121
|
```
|
|
109
122
|
|
|
123
|
+
Analyze only the source files with staged Git changes:
|
|
124
|
+
|
|
125
|
+
```text
|
|
126
|
+
❯ /ase-code-analyze --staged
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Analyze only the unstaged and untracked source files below a directory:
|
|
130
|
+
|
|
131
|
+
```text
|
|
132
|
+
❯ /ase-code-analyze --unstaged src/handlers/
|
|
133
|
+
```
|
|
134
|
+
|
|
110
135
|
## SEE ALSO
|
|
111
136
|
|
|
112
|
-
[`ase-
|
|
137
|
+
[`ase-task-edit`](../ase-task-edit/help.md), [`ase-code-edit`](../ase-code-edit/help.md), [`ase-code-lint`](../ase-code-lint/help.md),
|
|
113
138
|
[`ase-code-explain`](../ase-code-explain/help.md), [`ase-arch-analyze`](../ase-arch-analyze/help.md).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ase-code-edit
|
|
3
|
-
argument-hint: "[--help|-h] [--mode|-m auto|craft|refactor|resolve] [--grill|-g] [--grill-rounds|-r <n>] [--verify|-v] [--worktree|-w] [--loop|-l] [<query>|<issue-id>]"
|
|
3
|
+
argument-hint: "[--help|-h] [--mode|-m auto|craft|refactor|resolve] [--approach|-a] [--grill|-g] [--grill-rounds|-r <n>] [--grill-until|-u MUST|SHOULD|MAY] [--grill-perspective|-p <perspective>] [--grill-ground|-G] [--verify|-v] [--worktree|-w <name>[:<branch>]] [--loop|-l] [<query>|<issue-id>]"
|
|
4
4
|
description: >
|
|
5
5
|
Edit Source Code: Use when the user wants to "edit" the code base in
|
|
6
6
|
one shot from a query or a bare analyzer issue id like "P1", fusing
|
|
@@ -22,7 +22,7 @@ Edit Source Code
|
|
|
22
22
|
|
|
23
23
|
<expand name="getopt"
|
|
24
24
|
arg1="ase-code-edit"
|
|
25
|
-
arg2="--mode|-m=(auto|craft|refactor|resolve) --grill|-g --grill-rounds|-r=1 --verify|-v --worktree|-w --loop|-l">
|
|
25
|
+
arg2="--mode|-m=(auto|craft|refactor|resolve) --approach|-a --grill|-g --grill-rounds|-r=1 --grill-until|-u=(MUST|SHOULD|MAY) --grill-perspective|-p= --grill-ground|-G --verify|-v --worktree|-w= --loop|-l">
|
|
26
26
|
$ARGUMENTS
|
|
27
27
|
</expand>
|
|
28
28
|
|
|
@@ -34,6 +34,8 @@ resolving in one shot -- through the states *querying*, *discovering*,
|
|
|
34
34
|
|
|
35
35
|
@${CLAUDE_SKILL_DIR}/../../meta/ase-tenets.md
|
|
36
36
|
@${CLAUDE_SKILL_DIR}/../../meta/ase-common-grill.md
|
|
37
|
+
@${CLAUDE_SKILL_DIR}/../../meta/ase-common-changeset.md
|
|
38
|
+
@${CLAUDE_SKILL_DIR}/../../meta/ase-common-approach.md
|
|
37
39
|
|
|
38
40
|
Procedure
|
|
39
41
|
---------
|
|
@@ -77,6 +79,12 @@ empty <todo-what/> or <todo-how/> renders as `(none)`:
|
|
|
77
79
|
⧉ **ASE**: ✪ skill: **ase-code-edit**, ▶ ERROR: invalid `--grill-rounds` value: **<getopt-option-grill-rounds/>**
|
|
78
80
|
</template>
|
|
79
81
|
|
|
82
|
+
3. Resolve a potentially misparsed former boolean `--worktree`
|
|
83
|
+
option:
|
|
84
|
+
|
|
85
|
+
<expand name="changeset-ambiguity"
|
|
86
|
+
arg1="✪ skill: **ase-code-edit**"></expand>
|
|
87
|
+
|
|
80
88
|
2. **Iterate:**
|
|
81
89
|
|
|
82
90
|
Perform the states (1) *querying*, (2) *discovering*, (3) *grilling*,
|
|
@@ -157,10 +165,32 @@ empty <todo-what/> or <todo-how/> renders as `(none)`:
|
|
|
157
165
|
|
|
158
166
|
4. **State: discovering:**
|
|
159
167
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
168
|
+
1. <if condition="<getopt-option-worktree/> is not empty and <worktree-dir/> is empty">
|
|
169
|
+
|
|
170
|
+
One *single* worktree serves the whole skill run: it is
|
|
171
|
+
prepared *once* before the first discovery, so discovering,
|
|
172
|
+
grilling, and implementing all operate on the *same* tree, and
|
|
173
|
+
all further `--loop` iterations land in it, too.
|
|
174
|
+
|
|
175
|
+
<expand name="changeset-context"
|
|
176
|
+
arg1="<getopt-option-worktree/>"
|
|
177
|
+
arg2="✪ skill: **ase-code-edit**"
|
|
178
|
+
arg3="true"
|
|
179
|
+
arg4="true"></expand>
|
|
180
|
+
|
|
181
|
+
Set <worktree-dir><context-dir/></worktree-dir>. Do not output
|
|
182
|
+
anything.
|
|
183
|
+
|
|
184
|
+
</if>
|
|
185
|
+
|
|
186
|
+
2. <if condition="<worktree-dir/> is not empty">
|
|
187
|
+
<expand name="changeset-land" arg1="<worktree-dir/>"></expand>
|
|
188
|
+
</if>
|
|
189
|
+
|
|
190
|
+
3. Check the existing source files for all code which is related to
|
|
191
|
+
<todo-what/> and <todo-how/>, and check the architecture of the
|
|
192
|
+
existing code base to understand the overall structures and
|
|
193
|
+
dynamics. Do not output anything.
|
|
164
194
|
|
|
165
195
|
5. **State: grilling:**
|
|
166
196
|
|
|
@@ -170,10 +200,21 @@ empty <todo-what/> or <todo-how/> renders as `(none)`:
|
|
|
170
200
|
|
|
171
201
|
1. Understand what "grilling" is about:
|
|
172
202
|
|
|
173
|
-
<expand name="grill-understanding"
|
|
203
|
+
<expand name="grill-understanding"
|
|
204
|
+
arg1="the edit query in <todo-what/> and <todo-how/>"
|
|
205
|
+
arg2="<getopt-option-grill-perspective/>"
|
|
206
|
+
arg3="<getopt-option-grill-ground/>"></expand>
|
|
174
207
|
|
|
175
|
-
2.
|
|
176
|
-
|
|
208
|
+
2. Ground the grilling:
|
|
209
|
+
|
|
210
|
+
<expand name="grill-ground"
|
|
211
|
+
arg1="the edit query in <todo-what/> and <todo-how/>"
|
|
212
|
+
arg2="<worktree-dir/>"></expand>
|
|
213
|
+
|
|
214
|
+
3. Perform *at most* <getopt-option-grill-rounds/> grilling
|
|
215
|
+
*rounds*, numbered <m/> (1-<getopt-option-grill-rounds/>) --
|
|
216
|
+
the round count is a *maximum* only, as every round can
|
|
217
|
+
*stop* the grilling *early* in its item 2 below.
|
|
177
218
|
|
|
178
219
|
For each round:
|
|
179
220
|
|
|
@@ -181,7 +222,8 @@ empty <todo-what/> or <todo-how/> renders as `(none)`:
|
|
|
181
222
|
|
|
182
223
|
Explicitly start *from scratch* from *only* the current
|
|
183
224
|
<todo-what/> and <todo-how/> and *forget* all information
|
|
184
|
-
gathered in previous rounds
|
|
225
|
+
gathered in previous rounds -- except the grounding facts
|
|
226
|
+
<grill-facts/>. Set <round-id/> to
|
|
185
227
|
`GRILLING ROUND <m/>/<getopt-option-grill-rounds/>` if
|
|
186
228
|
<getopt-option-grill-rounds/> is greater than 1, or to
|
|
187
229
|
`GRILLING` otherwise (a single round needs no round
|
|
@@ -189,82 +231,23 @@ empty <todo-what/> or <todo-how/> renders as `(none)`:
|
|
|
189
231
|
|
|
190
232
|
2. DETERMINE QUESTIONS:
|
|
191
233
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
`
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
with backticks.
|
|
210
|
-
|
|
211
|
-
Keep every <question-N-text/> at most *200 characters* long
|
|
212
|
-
-- compact the text until it fits --, as a longer question
|
|
213
|
-
overflows its table cell and silently degrades the entire
|
|
214
|
-
table into a plain text rendering.
|
|
215
|
-
|
|
216
|
-
3. DETERMINE CONTEXT:
|
|
217
|
-
|
|
218
|
-
For each question, determine its focus area
|
|
219
|
-
<context-N-focus/> from the mentioned *Focus Areas*, a 1-3
|
|
220
|
-
word hint <context-N-topic/>, describing what the question
|
|
221
|
-
is about, and a <context-N-severity/>, describing how
|
|
222
|
-
important this question is.
|
|
223
|
-
|
|
224
|
-
Set <context-N-id/> to `DOM` for <context-N-focus/> of
|
|
225
|
-
`DOMAIN`, `IFC` for <context-N-focus/> of `INTERFACE`, `ARC`
|
|
226
|
-
for <context-N-focus/> of `ARCHITECTURE`, and `IMP` for
|
|
227
|
-
<context-N-focus/> of `IMPLEMENTATION`.
|
|
228
|
-
|
|
229
|
-
4. SORT QUESTIONS:
|
|
230
|
-
|
|
231
|
-
Finally, *sort* the questions by descending focus area
|
|
232
|
-
order -- first all `DOMAIN`, then all `INTERFACE`, then all
|
|
233
|
-
`ARCHITECTURE`, and then all `IMPLEMENTATION` ones -- and
|
|
234
|
-
renumber <N/> according to this order, starting at `1`.
|
|
235
|
-
Truncate the list after a maximum of 10 questions and set
|
|
236
|
-
<n/> to the number of remaining questions. Do not output
|
|
237
|
-
anything.
|
|
238
|
-
|
|
239
|
-
Finally, assemble the <question-N/> out of
|
|
240
|
-
`**<question-N-id/>** ▶ **<context-N-id/>** ▷
|
|
241
|
-
**<context-N-topic/>**: <question-N-text/>`.
|
|
242
|
-
|
|
243
|
-
5. DETERMINE ANSWERS:
|
|
244
|
-
|
|
245
|
-
For all remaining <question-N/>, check the code base and
|
|
246
|
-
your world knowledge to find *two to three* grounded answer
|
|
247
|
-
alternatives <answer-N-K/> with a question-local id
|
|
248
|
-
<answer-N-K-id/> of `A<K/>` -- where <K/> restarts at `1`
|
|
249
|
-
for *every* question, independent of the numbering of other
|
|
250
|
-
questions --, a 1-3 word label <answer-N-K-label/>, and
|
|
251
|
-
an ultra brief description <answer-N-K-description/> of
|
|
252
|
-
at most *10 words*. For the answer which reflects the
|
|
253
|
-
current <todo-what/>/<todo-how/> understanding, append
|
|
254
|
-
` ⚑` to its <answer-N-K-label/>.
|
|
255
|
-
|
|
256
|
-
Assemble an <answer-N/> out of `**<answer-N-1-id/>**
|
|
257
|
-
▶ **<answer-N-1-label/>**: <answer-N-1-description/>,
|
|
258
|
-
**<answer-N-2-id/>** ▶ **<answer-N-2-label/>**:
|
|
259
|
-
<answer-N-2-description/>[, ...]`.
|
|
260
|
-
|
|
261
|
-
Keep every assembled <answer-N/> at most *240 characters*
|
|
262
|
-
long -- drop the least relevant alternative and compact the
|
|
263
|
-
descriptions until it fits -- as a longer answer overflows
|
|
264
|
-
its table cell and silently degrades the entire table into a
|
|
265
|
-
plain text rendering.
|
|
266
|
-
|
|
267
|
-
6. INTERACTIVE DIALOG:
|
|
234
|
+
<expand name="grill-questions"
|
|
235
|
+
arg1="<getopt-option-grill-until/>"
|
|
236
|
+
arg2="✪ skill: **ase-code-edit**"
|
|
237
|
+
arg3="file and directory paths, identifiers, symbols, types, commands, options, configuration keys, and literal values"
|
|
238
|
+
arg4="the code base"
|
|
239
|
+
arg5="">
|
|
240
|
+
<if condition="<getopt-option-verify/> is not equal `true`">
|
|
241
|
+
Raise *no* questions at all of focus area `REGRESSION`
|
|
242
|
+
or `CONFIRMATION`, as without `--verify` no verification
|
|
243
|
+
takes place which could honor their decisions.
|
|
244
|
+
</if></expand>
|
|
245
|
+
|
|
246
|
+
If <grill-stop/> is `true`, skip the remaining items of
|
|
247
|
+
this round and all remaining rounds, and continue with
|
|
248
|
+
the *implementing* state.
|
|
249
|
+
|
|
250
|
+
3. INTERACTIVE DIALOG:
|
|
268
251
|
|
|
269
252
|
In the following, you *MUST* *NOT* use your built-in
|
|
270
253
|
<user-dialog-tool/> tool! Instead, you *MUST* just show a
|
|
@@ -274,8 +257,8 @@ empty <todo-what/> or <todo-how/> renders as `(none)`:
|
|
|
274
257
|
`SKIP GRILLING` and `STOP SKILL`, dispatched as follows:
|
|
275
258
|
|
|
276
259
|
- If a <result/> is `SKIP GRILLING` or `CANCEL`, ask no
|
|
277
|
-
further questions, continue with item
|
|
278
|
-
the answers gathered so far), and after item
|
|
260
|
+
further questions, continue with item 4 below (merging
|
|
261
|
+
the answers gathered so far), and after item 5 skip all
|
|
279
262
|
remaining rounds and continue with the *implementing*
|
|
280
263
|
state.
|
|
281
264
|
|
|
@@ -287,54 +270,31 @@ empty <todo-what/> or <todo-how/> renders as `(none)`:
|
|
|
287
270
|
⧉ **ASE**: ✪ skill: **ase-code-edit**, ▶ status: **editing stopped**
|
|
288
271
|
</template>
|
|
289
272
|
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
combined answer. Align all column edges of the table.
|
|
294
|
-
|
|
295
|
-
In every table cell you *MUST* escape each literal pipe
|
|
296
|
-
character outside a code span as `\|` and you *MUST*
|
|
297
|
-
open *and* close every backtick code span within the
|
|
298
|
-
*same* cell -- an unescaped pipe or an unbalanced
|
|
299
|
-
backtick run splits the cell and silently degrades the
|
|
300
|
-
entire table into a plain text rendering:
|
|
301
|
-
|
|
302
|
-
<template>
|
|
303
|
-
⧉ **ASE**: <round-id/>: *Relentless Interviewing Until Clarity*
|
|
304
|
-
|
|
305
|
-
| QUESTION | ANSWERS |
|
|
306
|
-
| ------------- | ----------- |
|
|
307
|
-
| <question-1/> | <answer-1/> |
|
|
308
|
-
| <question-2/> | <answer-2/> |
|
|
309
|
-
| [...] | [...] |
|
|
310
|
-
|
|
311
|
-
Legend: **DOM**: Domain (MUST), **IFC**: Interface (MUST), **ARC**: Architecture (SHOULD), **IMP**: Implementation (MAY)
|
|
312
|
-
**Qn**: round-local question id, **An**: question-local answer id, ⚑: current decision state
|
|
313
|
-
</template>
|
|
273
|
+
Show a custom dialog. Its only answer options are the
|
|
274
|
+
two fixed ones, so the user normally answers all aspects in
|
|
275
|
+
*one* free-text reply:
|
|
314
276
|
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
<round-id/>: What is your (combined) answer to all (or a subset) of the above questions? (keywords or `Qn:An` references are sufficient)
|
|
321
|
-
SKIP GRILLING: skip all remaining grilling and continue with the implementation
|
|
322
|
-
STOP SKILL: stop the entire skill immediately
|
|
323
|
-
</expand>
|
|
277
|
+
<expand name="custom-dialog" arg1="--other">
|
|
278
|
+
<round-id/>: What is your (combined) answer to all (or a subset) of the above questions? (keywords or `nX` short responses are sufficient)
|
|
279
|
+
SKIP GRILLING: skip all remaining grilling and continue with the implementation
|
|
280
|
+
STOP SKILL: stop the entire skill immediately
|
|
281
|
+
</expand>
|
|
324
282
|
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
283
|
+
Dispatch `SKIP GRILLING`, `STOP SKILL`, and `CANCEL` as
|
|
284
|
+
defined above. Otherwise, strip any leading `OTHER: `
|
|
285
|
+
prefix from <result/> and treat the remainder as the
|
|
286
|
+
combined free-text answers to all questions of the
|
|
287
|
+
round.
|
|
330
288
|
|
|
331
|
-
|
|
289
|
+
4. MERGE ANSWERS INTO TODO:
|
|
332
290
|
|
|
333
291
|
Merge all gathered answers in <result/> of the round -- the
|
|
334
292
|
combined reply -- *exclusively* back into <todo-what/> and
|
|
335
293
|
<todo-how/>. Do not output anything.
|
|
336
294
|
|
|
337
|
-
|
|
295
|
+
<expand name="grill-short-responses"></expand>
|
|
296
|
+
|
|
297
|
+
5. SHOW UPDATED TODO:
|
|
338
298
|
|
|
339
299
|
Set <round-suffix/> to
|
|
340
300
|
` round <m/>/<getopt-option-grill-rounds/>` if
|
|
@@ -370,58 +330,30 @@ empty <todo-what/> or <todo-how/> renders as `(none)`:
|
|
|
370
330
|
in the following creation and updating of code. Do not output
|
|
371
331
|
anything.
|
|
372
332
|
|
|
373
|
-
2. <if condition="<getopt-option-
|
|
374
|
-
|
|
375
|
-
One *single* worktree serves the whole skill run: it is created
|
|
376
|
-
*once* before the first change set is applied, and all further
|
|
377
|
-
`--loop` iterations land in it, too.
|
|
378
|
-
|
|
379
|
-
1. Set <worktree-name/> to a unique name, derived from
|
|
380
|
-
<todo-what/>, which consists of two lower-case words
|
|
381
|
-
concatenated with a `-` character. Do not output anything.
|
|
382
|
-
|
|
383
|
-
2. Determine the *worktree directory* by calling the
|
|
384
|
-
`ase_worktree_path(id: "<worktree-name/>", create: true)`
|
|
385
|
-
tool of the `ase` MCP server and capturing its output into
|
|
386
|
-
<worktree-dir/>. You *MUST* *NEVER* assemble this path
|
|
387
|
-
yourself. If this tool call fails, only output the following
|
|
388
|
-
<template/> and then immediately *STOP* processing the
|
|
389
|
-
entire current skill, leaving the working copy *untouched*:
|
|
390
|
-
|
|
391
|
-
<template>
|
|
392
|
-
⧉ **ASE**: ✪ skill: **ase-code-edit**, ▶ ERROR: no Git repository or unsafe worktree directory -- cannot create worktree
|
|
393
|
-
</template>
|
|
333
|
+
2. <if condition="<getopt-option-approach/> is equal `true`">
|
|
394
334
|
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
following <template/> and then immediately *STOP* processing
|
|
401
|
-
the entire current skill, leaving the existing worktree, its
|
|
402
|
-
branch, and the working copy *untouched*:
|
|
335
|
+
Set <approach-kind/> to `crafting`, `refactoring`, or
|
|
336
|
+
`resolution` for the <task-kind/> `CRAFTING`, `REFACTORING`, or
|
|
337
|
+
`RESOLVING` correspondingly, and determine the overall approach
|
|
338
|
+
of the edit, based on <todo-what/> and <todo-how/> plus the
|
|
339
|
+
information gathered in the *discovering* state:
|
|
403
340
|
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
341
|
+
<expand name="approach-select"
|
|
342
|
+
arg1="<approach-kind/>"
|
|
343
|
+
arg2="✪ skill: **ase-code-edit**"></expand>
|
|
407
344
|
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
given), which creates the directory *and* -- named after its
|
|
411
|
-
last path component -- the branch <worktree-name/> from
|
|
412
|
-
`HEAD`. If this command fails, only output the following
|
|
413
|
-
<template/> and then immediately *STOP* processing the
|
|
414
|
-
entire current skill, leaving the working copy *untouched*:
|
|
345
|
+
If <chosen-approach/> is empty, only output the following <template/>
|
|
346
|
+
and then immediately *STOP* processing the entire current skill:
|
|
415
347
|
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
348
|
+
<template>
|
|
349
|
+
⧉ **ASE**: ✪ skill: **ase-code-edit**, ▶ status: **editing stopped**
|
|
350
|
+
</template>
|
|
419
351
|
|
|
420
|
-
|
|
352
|
+
Otherwise, merge <chosen-approach/> *exclusively* into <todo-how/>,
|
|
353
|
+
where the chosen approach overrides any conflicting
|
|
354
|
+
implementation detail, and expand the following:
|
|
421
355
|
|
|
422
|
-
|
|
423
|
-
⧉ **ASE**: ✪ skill: **ase-code-edit**, ◉ worktree: **.ase/worktree/<worktree-name/>**, ▶ status: **worktree created**
|
|
424
|
-
</template>
|
|
356
|
+
<expand name="todo-box" arg1="current state (after approaching)"></expand>
|
|
425
357
|
|
|
426
358
|
</if>
|
|
427
359
|
|
|
@@ -432,13 +364,7 @@ empty <todo-what/> or <todo-how/> renders as `(none)`:
|
|
|
432
364
|
make an appropriate entry there, too.
|
|
433
365
|
|
|
434
366
|
<if condition="<worktree-dir/> is not empty">
|
|
435
|
-
|
|
436
|
-
<worktree-dir/>: resolve *every* file path relative to
|
|
437
|
-
<worktree-dir/> instead of the original working copy. You *MUST*
|
|
438
|
-
*NEVER* modify, stage, stash, revert, or commit anything
|
|
439
|
-
*outside* of this worktree. Leave the worktree *uncommitted*:
|
|
440
|
-
do *not* run `git add` and do *not* run `git commit`, so the
|
|
441
|
-
user keeps full control over the final commit.
|
|
367
|
+
<expand name="changeset-land" arg1="<worktree-dir/>"></expand>
|
|
442
368
|
</if>
|
|
443
369
|
|
|
444
370
|
4. <if condition="<issue-id/> is not empty">
|