@rse/ase 1.0.7 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (279) hide show
  1. package/dst/ase-agent-definition-api.d.ts +184 -0
  2. package/dst/ase-agent-definition-api.js +6 -0
  3. package/dst/ase-agent-definition-builtin/condenser.js +42 -0
  4. package/dst/ase-agent-definition-builtin/editor.js +45 -0
  5. package/dst/ase-agent-definition-builtin/estimator.js +98 -0
  6. package/dst/ase-agent-definition-builtin/implementer.js +121 -0
  7. package/dst/ase-agent-definition-builtin/integrator.js +56 -0
  8. package/dst/ase-agent-definition-builtin/qualifier.js +61 -0
  9. package/dst/ase-agent-definition-builtin/rebooter.js +41 -0
  10. package/dst/ase-agent-definition-builtin/researcher.js +77 -0
  11. package/dst/ase-agent-definition-core.js +827 -0
  12. package/dst/ase-agent-fleet.js +772 -0
  13. package/dst/ase-agent-process.js +232 -0
  14. package/dst/ase-agent-relay-client.js +509 -0
  15. package/dst/ase-agent-relay-core.js +213 -0
  16. package/dst/ase-agent-relay-server-bind.js +242 -0
  17. package/dst/ase-agent-relay-server-cli.js +50 -0
  18. package/dst/ase-agent-runtime-claim.js +189 -0
  19. package/dst/ase-agent-runtime-engine.js +1100 -0
  20. package/dst/ase-agent-runtime-exec.js +275 -0
  21. package/dst/ase-agent-runtime-phase.js +581 -0
  22. package/dst/ase-agent-runtime-request.js +272 -0
  23. package/dst/ase-agent-runtime-tool.js +207 -0
  24. package/dst/ase-agent-runtime.js +1316 -0
  25. package/dst/ase-agent.js +65 -0
  26. package/dst/ase-artifact.js +6 -5
  27. package/dst/ase-config-core.js +465 -0
  28. package/dst/ase-config-schema.js +351 -0
  29. package/dst/ase-config-scope.js +172 -0
  30. package/dst/ase-config.js +25 -585
  31. package/dst/ase-hook.js +228 -111
  32. package/dst/ase-lib-daemon-cli.js +130 -0
  33. package/dst/ase-lib-hash.js +20 -0
  34. package/dst/{ase-log.js → ase-lib-log.js} +40 -7
  35. package/dst/ase-lib-server-bind.js +115 -0
  36. package/dst/ase-lib-server-cli.js +474 -0
  37. package/dst/{ase-table.js → ase-lib-table.js} +1 -1
  38. package/dst/{ase-version.js → ase-lib-version.js} +3 -0
  39. package/dst/ase-man.js +96 -0
  40. package/dst/ase-mcp.js +166 -13
  41. package/dst/{ase-getopt.js → ase-service-getopt.js} +82 -80
  42. package/dst/{ase-markdown.js → ase-service-markdown.js} +18 -11
  43. package/dst/ase-service-otel.js +1246 -0
  44. package/dst/{ase-skills.js → ase-service-skills.js} +29 -64
  45. package/dst/ase-service-state.js +101 -0
  46. package/dst/ase-service.js +251 -76
  47. package/dst/ase-setup-common.js +141 -0
  48. package/dst/ase-setup-mcp.js +359 -0
  49. package/dst/ase-setup-settings.js +837 -0
  50. package/dst/ase-setup.js +113 -869
  51. package/dst/ase-spec.js +31 -19
  52. package/dst/ase-statusline.js +108 -43
  53. package/dst/ase-task-board-core.js +739 -0
  54. package/dst/ase-task-board-filter.js +127 -0
  55. package/dst/ase-task-board-flow.js +237 -0
  56. package/dst/ase-task-board-graph.js +497 -0
  57. package/dst/ase-task-board-stats.js +263 -0
  58. package/dst/ase-task-board-tui-control.js +775 -0
  59. package/dst/ase-task-board-tui-model.js +1008 -0
  60. package/dst/ase-task-board-tui-popup.js +626 -0
  61. package/dst/ase-task-board-tui-style.js +106 -0
  62. package/dst/ase-task-board-tui-view.js +847 -0
  63. package/dst/ase-task-board-tui.js +189 -0
  64. package/dst/ase-task-board-web-client.css +1 -0
  65. package/dst/ase-task-board-web-client.html +20 -0
  66. package/dst/ase-task-board-web-client.js +81 -0
  67. package/dst/ase-task-board-web-server.js +823 -0
  68. package/dst/ase-task-board.js +134 -0
  69. package/dst/ase-task-format.js +757 -0
  70. package/dst/ase-task-request.js +208 -0
  71. package/dst/ase-task-store-client.js +495 -0
  72. package/dst/ase-task-store-core.js +804 -0
  73. package/dst/ase-task-store-issues.js +237 -0
  74. package/dst/ase-task-store-plugin-api.js +6 -0
  75. package/dst/ase-task-store-plugin-ase.js +484 -0
  76. package/dst/ase-task-store-plugin-delegate.js +137 -0
  77. package/dst/ase-task-store-plugin-gitea.js +666 -0
  78. package/dst/ase-task-store-plugin-github.js +696 -0
  79. package/dst/ase-task-store-plugin-gitlab.js +668 -0
  80. package/dst/ase-task-store-server-bind.js +538 -0
  81. package/dst/ase-task-store-server-cli.js +154 -0
  82. package/dst/ase-task.js +1335 -357
  83. package/dst/{ase-compat.js → ase-util-compat.js} +2 -2
  84. package/dst/{ase-diagram.js → ase-util-diagram.js} +107 -32
  85. package/dst/{ase-meta.js → ase-util-meta.js} +2 -2
  86. package/dst/{ase-metric.js → ase-util-metric.js} +2 -2
  87. package/dst/{ase-mint.js → ase-util-mint.js} +19 -12
  88. package/dst/{ase-worktree.js → ase-util-worktree.js} +30 -19
  89. package/dst/ase-util.js +20 -0
  90. package/dst/ase.js +108 -32
  91. package/dst/man/ase-agent-adhoc.1 +515 -0
  92. package/dst/man/ase-agent-condenser.1 +193 -0
  93. package/dst/man/ase-agent-editor.1 +212 -0
  94. package/dst/man/ase-agent-estimator.1 +214 -0
  95. package/dst/man/ase-agent-fleet.1 +185 -0
  96. package/dst/man/ase-agent-implementer.1 +233 -0
  97. package/dst/man/ase-agent-integrator.1 +213 -0
  98. package/dst/man/ase-agent-qualifier.1 +214 -0
  99. package/dst/man/ase-agent-rebooter.1 +193 -0
  100. package/dst/man/ase-agent-relay.1 +128 -0
  101. package/dst/man/ase-agent-researcher.1 +217 -0
  102. package/dst/man/ase-agent.1 +264 -0
  103. package/dst/man/ase-artifact-list.1 +38 -0
  104. package/dst/man/ase-artifact-name.1 +39 -0
  105. package/dst/man/ase-artifact.1 +56 -0
  106. package/dst/man/ase-config-delete.1 +45 -0
  107. package/dst/man/ase-config-edit.1 +48 -0
  108. package/dst/man/ase-config-get.1 +46 -0
  109. package/dst/man/ase-config-init.1 +60 -0
  110. package/dst/man/ase-config-list.1 +42 -0
  111. package/dst/man/ase-config-set.1 +52 -0
  112. package/dst/man/ase-config.1 +225 -0
  113. package/dst/man/ase-hook-permission-request.1 +36 -0
  114. package/dst/man/ase-hook-pre-tool-use.1 +59 -0
  115. package/dst/man/ase-hook-session-end.1 +47 -0
  116. package/dst/man/ase-hook-session-persona.1 +37 -0
  117. package/dst/man/ase-hook-session-start.1 +81 -0
  118. package/dst/man/ase-hook-stop.1 +34 -0
  119. package/dst/man/ase-hook-user-prompt-submit.1 +34 -0
  120. package/dst/man/ase-hook.1 +51 -0
  121. package/dst/man/ase-man.1 +67 -0
  122. package/dst/man/ase-mcp.1 +61 -0
  123. package/dst/man/ase-service-log.1 +43 -0
  124. package/dst/man/ase-service-send.1 +47 -0
  125. package/dst/man/ase-service-start.1 +54 -0
  126. package/dst/man/ase-service-status.1 +46 -0
  127. package/dst/man/ase-service-stop.1 +37 -0
  128. package/dst/man/ase-service.1 +85 -0
  129. package/dst/man/ase-setup-disable.1 +44 -0
  130. package/dst/man/ase-setup-enable.1 +45 -0
  131. package/dst/man/ase-setup-install.1 +73 -0
  132. package/dst/man/ase-setup-mcp.1 +124 -0
  133. package/dst/man/ase-setup-status.1 +60 -0
  134. package/dst/man/ase-setup-statusline.1 +92 -0
  135. package/dst/man/ase-setup-telemetry.1 +92 -0
  136. package/dst/man/ase-setup-uninstall.1 +59 -0
  137. package/dst/man/ase-setup-update.1 +64 -0
  138. package/dst/man/ase-setup.1 +93 -0
  139. package/dst/man/ase-spec-export.1 +62 -0
  140. package/dst/man/ase-spec-lint.1 +40 -0
  141. package/dst/man/ase-spec-preview.1 +40 -0
  142. package/dst/man/ase-spec.1 +46 -0
  143. package/dst/man/ase-statusline.1 +189 -0
  144. package/dst/man/ase-task-assign.1 +71 -0
  145. package/dst/man/ase-task-board.1 +384 -0
  146. package/dst/man/ase-task-delete.1 +35 -0
  147. package/dst/man/ase-task-edit.1 +46 -0
  148. package/dst/man/ase-task-idscheme.1 +65 -0
  149. package/dst/man/ase-task-lifecycle.1 +57 -0
  150. package/dst/man/ase-task-list.1 +47 -0
  151. package/dst/man/ase-task-load.1 +36 -0
  152. package/dst/man/ase-task-newid.1 +61 -0
  153. package/dst/man/ase-task-purge.1 +37 -0
  154. package/dst/man/ase-task-rename.1 +44 -0
  155. package/dst/man/ase-task-request.1 +61 -0
  156. package/dst/man/ase-task-save.1 +48 -0
  157. package/dst/man/ase-task-status.1 +55 -0
  158. package/dst/man/ase-task-store.1 +194 -0
  159. package/dst/man/ase-task-view.1 +40 -0
  160. package/dst/man/ase-task.1 +160 -0
  161. package/dst/man/ase-util-compat.1 +25 -0
  162. package/dst/man/ase-util-diagram.1 +76 -0
  163. package/dst/man/ase-util-meta.1 +45 -0
  164. package/dst/man/ase-util-metric.1 +54 -0
  165. package/dst/man/ase-util-mint.1 +59 -0
  166. package/dst/man/ase-util-worktree.1 +72 -0
  167. package/dst/man/ase-util.1 +50 -0
  168. package/dst/man/ase.1 +124 -0
  169. package/package.json +79 -21
  170. package/plugin/.claude-plugin/plugin.json +1 -1
  171. package/plugin/.codex-plugin/plugin.json +1 -1
  172. package/plugin/.github/plugin/plugin.json +1 -1
  173. package/plugin/agents/ase-meta-diagram.md +12 -8
  174. package/plugin/agents/ase-repo-review.md +322 -0
  175. package/plugin/hooks/hooks-codex.json +5 -0
  176. package/plugin/hooks/hooks-copilot.json +5 -0
  177. package/plugin/hooks/hooks.json +8 -0
  178. package/plugin/meta/ase-common-approach.md +117 -0
  179. package/plugin/meta/ase-common-changeset.md +256 -0
  180. package/plugin/meta/ase-common-code.md +10 -173
  181. package/plugin/meta/ase-common-grill.md +317 -0
  182. package/plugin/meta/ase-common-resolve.md +305 -0
  183. package/plugin/meta/ase-common-task.md +83 -4
  184. package/plugin/meta/ase-constitution.md +0 -2
  185. package/plugin/meta/ase-format-specbook.md +208 -25
  186. package/plugin/meta/ase-format-specbook.yaml +242 -851
  187. package/plugin/meta/ase-format-task.md +669 -125
  188. package/plugin/meta/ase-persona.md +3 -4
  189. package/plugin/meta/ase-skill.md +9 -0
  190. package/plugin/mods/ase-mods.ts +409 -0
  191. package/plugin/mods/claude-code.d.ts +13417 -0
  192. package/plugin/skills/ase-arch-analyze/SKILL.md +1 -1
  193. package/plugin/skills/ase-arch-analyze/help.md +2 -2
  194. package/plugin/skills/ase-code-analyze/SKILL.md +59 -8
  195. package/plugin/skills/ase-code-analyze/help.md +29 -4
  196. package/plugin/skills/ase-code-edit/SKILL.md +107 -181
  197. package/plugin/skills/ase-code-edit/help.md +118 -31
  198. package/plugin/skills/ase-code-lint/SKILL.md +64 -13
  199. package/plugin/skills/ase-code-lint/help.md +32 -2
  200. package/plugin/skills/ase-docs-proofread/SKILL.md +4 -4
  201. package/plugin/skills/ase-docs-proofread/help.md +1 -1
  202. package/plugin/skills/ase-docs-refine/SKILL.md +4 -4
  203. package/plugin/skills/ase-docs-shorten/SKILL.md +4 -4
  204. package/plugin/skills/ase-help-intent/data.md +2164 -1087
  205. package/plugin/skills/ase-help-intent/help.md +1 -1
  206. package/plugin/skills/ase-help-skill/catalog.md +12 -9
  207. package/plugin/skills/ase-meta-brainstorm/SKILL.md +1 -1
  208. package/plugin/skills/ase-meta-config/SKILL.md +3 -4
  209. package/plugin/skills/ase-meta-config/help.md +31 -10
  210. package/plugin/skills/ase-meta-mint/SKILL.md +5 -5
  211. package/plugin/skills/ase-meta-mint/help.md +10 -5
  212. package/plugin/skills/ase-meta-why/help.md +1 -1
  213. package/plugin/skills/ase-meta-workflow/SKILL.md +7 -7
  214. package/plugin/skills/ase-meta-workflow/help.md +4 -4
  215. package/plugin/skills/ase-meta-workflow/sample.md +3 -3
  216. package/plugin/skills/ase-meta-workflow/workflow.txt +22 -18
  217. package/plugin/skills/{ase-meta-changelog → ase-repo-changelog}/SKILL.md +4 -3
  218. package/plugin/skills/{ase-meta-changelog → ase-repo-changelog}/help.md +5 -5
  219. package/plugin/skills/{ase-meta-commit → ase-repo-commit}/SKILL.md +6 -6
  220. package/plugin/skills/{ase-meta-commit → ase-repo-commit}/help.md +5 -5
  221. package/plugin/skills/{ase-meta-diff → ase-repo-diff}/SKILL.md +6 -6
  222. package/plugin/skills/{ase-meta-diff → ase-repo-diff}/help.md +8 -8
  223. package/plugin/skills/{ase-code-dissect → ase-repo-dissect}/SKILL.md +19 -19
  224. package/plugin/skills/{ase-code-dissect → ase-repo-dissect}/help.md +10 -12
  225. package/plugin/skills/ase-repo-merge/SKILL.md +346 -0
  226. package/plugin/skills/ase-repo-merge/help.md +107 -0
  227. package/plugin/skills/ase-repo-resolve/SKILL.md +158 -0
  228. package/plugin/skills/ase-repo-resolve/help.md +102 -0
  229. package/plugin/skills/ase-repo-review/SKILL.md +406 -0
  230. package/plugin/skills/ase-repo-review/help.md +181 -0
  231. package/plugin/skills/ase-spec-edit/SKILL.md +117 -183
  232. package/plugin/skills/ase-spec-edit/help.md +107 -26
  233. package/plugin/skills/ase-sync-reconcile/help.md +1 -1
  234. package/plugin/skills/ase-task-assign/SKILL.md +111 -0
  235. package/plugin/skills/ase-task-assign/help.md +119 -0
  236. package/plugin/skills/ase-task-condense/SKILL.md +21 -21
  237. package/plugin/skills/ase-task-condense/help.md +12 -10
  238. package/plugin/skills/ase-task-delete/SKILL.md +1 -1
  239. package/plugin/skills/ase-task-dissect/SKILL.md +71 -48
  240. package/plugin/skills/ase-task-dissect/help.md +10 -9
  241. package/plugin/skills/ase-task-edit/SKILL.md +379 -94
  242. package/plugin/skills/ase-task-edit/help.md +95 -22
  243. package/plugin/skills/ase-task-estimate/SKILL.md +492 -0
  244. package/plugin/skills/ase-task-estimate/help.md +158 -0
  245. package/plugin/skills/ase-task-grill/SKILL.md +246 -138
  246. package/plugin/skills/ase-task-grill/help.md +129 -26
  247. package/plugin/skills/ase-task-id/SKILL.md +8 -1
  248. package/plugin/skills/ase-task-id/help.md +6 -3
  249. package/plugin/skills/ase-task-implement/SKILL.md +535 -145
  250. package/plugin/skills/ase-task-implement/help.md +138 -47
  251. package/plugin/skills/ase-task-integrate/SKILL.md +549 -0
  252. package/plugin/skills/ase-task-integrate/help.md +187 -0
  253. package/plugin/skills/ase-task-list/SKILL.md +55 -23
  254. package/plugin/skills/ase-task-list/help.md +45 -21
  255. package/plugin/skills/ase-task-reboot/SKILL.md +84 -43
  256. package/plugin/skills/ase-task-reboot/help.md +28 -8
  257. package/plugin/skills/ase-task-rename/SKILL.md +10 -2
  258. package/plugin/skills/ase-task-research/SKILL.md +386 -0
  259. package/plugin/skills/ase-task-research/help.md +102 -0
  260. package/plugin/skills/ase-task-status/SKILL.md +137 -0
  261. package/plugin/skills/ase-task-status/help.md +80 -0
  262. package/plugin/skills/ase-task-view/SKILL.md +49 -24
  263. package/plugin/skills/ase-task-view/help.md +19 -9
  264. package/plugin/agents/ase-meta-review.md +0 -187
  265. package/plugin/skills/ase-code-craft/SKILL.md +0 -264
  266. package/plugin/skills/ase-code-craft/help.md +0 -122
  267. package/plugin/skills/ase-code-refactor/SKILL.md +0 -232
  268. package/plugin/skills/ase-code-refactor/help.md +0 -109
  269. package/plugin/skills/ase-code-resolve/SKILL.md +0 -289
  270. package/plugin/skills/ase-code-resolve/help.md +0 -116
  271. package/plugin/skills/ase-meta-review/SKILL.md +0 -210
  272. package/plugin/skills/ase-meta-review/help.md +0 -96
  273. package/plugin/skills/ase-task-preflight/SKILL.md +0 -166
  274. package/plugin/skills/ase-task-preflight/help.md +0 -82
  275. /package/dst/{ase-ignore.js → ase-lib-ignore.js} +0 -0
  276. /package/dst/{ase-stdio.js → ase-lib-stdio.js} +0 -0
  277. /package/dst/{ase-kv.js → ase-service-kv.js} +0 -0
  278. /package/dst/{ase-sleep.js → ase-service-sleep.js} +0 -0
  279. /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-code-resolve <id-prefix/>P{n}` or `/ase-code-resolve <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.
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-code-resolve`](../ase-code-resolve/help.md),
73
- [`ase-code-refactor`](../ase-code-refactor/help.md), [`ase-code-insight`](../ase-code-insight/help.md).
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` or `Agent` tool and do *not* read any source, only output
63
- the following <template/> and then *SKIP* the remaining step STEP 3:
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. Then
90
- partition <sources/>, preserving order, into at most *eight*
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` and `Agent` tool invocations.
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-code-resolve <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.
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
- *source-reference*
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 resolved via `ase-code-resolve P<n>` or directly
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-code-resolve`](../ase-code-resolve/help.md), [`ase-code-refactor`](../ase-code-refactor/help.md), [`ase-code-lint`](../ase-code-lint/help.md),
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
- Check the existing source files for all code which is related to
161
- <todo-what/> and <todo-how/>, and check the architecture of the
162
- existing code base to understand the overall structures and
163
- dynamics. Do not output anything in this state.
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" arg1="the edit query in <todo-what/> and <todo-how/>"></expand>
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. Perform <getopt-option-grill-rounds/> grilling *rounds*,
176
- numbered <m/> (1-<getopt-option-grill-rounds/>).
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. Set <round-id/> to
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
- Determine the questions, comprised of a round-local id
193
- <question-N-id/> of `Q<N/>` -- where <N/> restarts at `1`
194
- in *every* round, independent of the numbering of previous
195
- rounds --, and a very brief but precise question text
196
- <question-N-text/>. Each question is chosen to
197
- resolve the open points related to the above understanding
198
- of grilling, by focusing on the mentioned *Focus Areas*.
199
-
200
- For <question-N-text/> use the format `Shall...?` for
201
- questions of focus area `DOMAIN` and `INTERFACE`, the format
202
- `Should...?` for questions of focus area `ARCHITECTURE`,
203
- and the format `May...?` for questions of focus area
204
- `IMPLEMENTATION`.
205
-
206
- In every <question-N-text/>, encode all *literal aspects*
207
- -- file and directory paths, identifiers, symbols, types,
208
- commands, options, configuration keys, and literal values --
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 7 below (merging
278
- the answers gathered so far), and after item 8 skip all
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
- 1. Output only the following <template/> -- it lists *all*
291
- questions of the round up-front, one table row per
292
- aspect, so the subsequent dialog only has to ask for the
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
- 2. Show a custom dialog. Its only answer options are the
316
- two fixed ones, so the user normally answers all aspects in
317
- *one* free-text reply:
318
-
319
- <expand name="custom-dialog" arg1="--other">
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
- Dispatch `SKIP GRILLING`, `STOP SKILL`, and `CANCEL` as
326
- defined above. Otherwise, strip any leading `OTHER: `
327
- prefix from <result/> and treat the remainder as the
328
- combined free-text answers to all questions of the
329
- round.
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
- 7. MERGE ANSWERS INTO TODO:
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
- 8. SHOW CURRENT TODO:
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-worktree/> is equal `true` and <worktree-dir/> is empty">
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
- 3. Determine the *existing worktrees* and *existing branches*
396
- by running the commands `git worktree list --porcelain` and
397
- `git branch --list` (taken exactly as given) and capturing
398
- their outputs. If the worktree directory <worktree-dir/> or
399
- the branch <worktree-name/> already exists, only output the
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
- <template>
405
- ⧉ **ASE**: ✪ skill: **ase-code-edit**, ▶ ERROR: worktree or branch **<worktree-name/>** already exists
406
- </template>
341
+ <expand name="approach-select"
342
+ arg1="<approach-kind/>"
343
+ arg2="✪ skill: **ase-code-edit**"></expand>
407
344
 
408
- 4. Create the worktree by running the command
409
- `git worktree add "<worktree-dir/>"` (taken exactly as
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
- <template>
417
- ⧉ **ASE**: ✪ skill: **ase-code-edit**, ▶ ERROR: worktree **<worktree-name/>** failed to create
418
- </template>
348
+ <template>
349
+ ⧉ **ASE**: ✪ skill: **ase-code-edit**, ▶ status: **editing stopped**
350
+ </template>
419
351
 
420
- 5. Only output the following <template/>:
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
- <template>
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
- The change set *MUST* land *exclusively inside* the worktree
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">