@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.
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 +357 -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} +8 -1
  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 +269 -81
  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 +231 -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 +81 -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
@@ -1,12 +1,16 @@
1
1
  ---
2
2
  name: ase-task-edit
3
- argument-hint: "[--help|-h] [--plan|-p <option>] [--dry|-d] [--next|-n <option>[,...]] [<id> | <id>: <instruction> | <instruction>]"
3
+ argument-hint: "[--help|-h] [--plan|-p <option>] [--mode|-m auto|craft|refactor|resolve|specify] [--approach|-a] [--unverified|-u] [--next|-n <option>[,...]] [<id> | <id>: <instruction> | <instruction> | <issue-id>]"
4
4
  description: >
5
5
  Iteratively edit and refine a named plan for a task through a
6
- conversational loop. Each round, the current plan is shown and the
7
- user is asked whether to keep refining, mark the plan as done, or
8
- proceed to the implementation or preflight. Use when the user wants
9
- to plan a task purely through chat-driven refinement.
6
+ conversational loop. A new plan is optionally composed along the
7
+ chosen one of several proposed crafting, refactoring, resolution, or
8
+ specification approaches. Each round, the current plan is shown and the user is
9
+ asked whether to keep refining, mark the plan as done, or proceed to
10
+ the implementation or draft. Use when the user wants to plan a task
11
+ purely through chat-driven refinement, or wants a plan to "craft" a
12
+ new feature, "refactor" the code base, or "resolve" a problem (also
13
+ from a bare analyzer issue id like "P1").
10
14
  user-invocable: true
11
15
  disable-model-invocation: false
12
16
  effort: high
@@ -23,7 +27,7 @@ Iteratively Edit a Task Plan
23
27
 
24
28
  <expand name="getopt"
25
29
  arg1="ase-task-edit"
26
- arg2="--plan|-p=(none|OVERWRITE|REFINE|PRESERVE) --dry|-d --next|-n=(none|DONE|GRILL|PREFLIGHT|IMPLEMENT)... --int-reuse-task">
30
+ arg2="--plan|-p=(none|OVERWRITE|REFINE|PRESERVE) --mode|-m=(auto|craft|refactor|resolve|specify) --approach|-a --unverified|-u --next|-n=(none|DONE|GRILL|DRAFT|IMPLEMENT)... --int-reuse-task --int-source-dir=">
27
31
  $ARGUMENTS
28
32
  </expand>
29
33
 
@@ -31,15 +35,44 @@ Iteratively Edit a Task Plan
31
35
  Establish and refine the *task plan* purely through a *chat-driven
32
36
  loop*. The user steers each round via an interactive dialog that offers
33
37
  continued refinement, finalization, or hand-off to implementation or
34
- preflight.
38
+ draft.
35
39
  </objective>
36
40
 
37
41
  @${CLAUDE_SKILL_DIR}/../../meta/ase-format-task.md
42
+ @${CLAUDE_SKILL_DIR}/../../meta/ase-format-meta.md
43
+ @${CLAUDE_SKILL_DIR}/../../meta/ase-common-task.md
44
+ @${CLAUDE_SKILL_DIR}/../../meta/ase-common-approach.md
45
+ @${CLAUDE_SKILL_DIR}/../../meta/ase-tenets.md
38
46
 
39
47
  Procedure
40
48
  ---------
41
49
 
42
50
  <define name="apply-refinement">
51
+ Determine the *kind of change* of the refined plan:
52
+
53
+ - If <getopt-option-mode/> is `craft`, `refactor`, `resolve`, or
54
+ `specify`: Set <task-kind/> to `CRAFTING`, `REFACTORING`,
55
+ `RESOLVING`, or `SPECIFYING` correspondingly, and set
56
+ <task-kind-changed>true</task-kind-changed>.
57
+
58
+ - Else if <issue-id/> is not empty (`auto` with a retrieved analyzer
59
+ issue): Set <task-kind/> to `RESOLVING`, as the refinement fixes a
60
+ reported problem, and set <task-kind-changed>true</task-kind-changed>.
61
+
62
+ - Else (`auto`): Set <task-kind/> to the value of the `Kind:`
63
+ frontmatter key of <task-content/> (or, if it is absent or invalid,
64
+ *infer* it from the plan content, defaulting to `CRAFTING`), and set
65
+ <task-kind-changed>false</task-kind-changed>.
66
+
67
+ You *MUST* then first forget all previous internalized tenets and then
68
+ freshly internalize and strictly honor the **GENERIC TENETS** and the
69
+ **<task-kind/> TENETS** of the **ASE Tenets** in the following
70
+ refinement of the plan. Do not output anything.
71
+
72
+ <if condition="<task-kind/> is equal `SPECIFYING`">
73
+ <expand name="task-spec-format"/>
74
+ </if>
75
+
43
76
  Treat the <instruction/> as a *refinement instruction* for
44
77
  the plan, and update <task-content/> in-place by *applying* the
45
78
  requested <instruction/> to the *plan*.
@@ -48,36 +81,155 @@ When refining the plan this way, preserve the overall structure of the
48
81
  plan and only modify what the user actually requested. Do *not* rewrite
49
82
  unrelated sections of the plan.
50
83
 
51
- <if condition="<task-content/> contains a `## IMPLEMENTATION DRAFT`
52
- section (from the companion skill `ase-task-preflight`) AND the
53
- applied <instruction/> changed the plan text *outside* of that
54
- section">
55
- The implementation draft was created for the *previous* plan text and
56
- hence is *stale* now. Remove the entire `## IMPLEMENTATION DRAFT`
57
- section from <task-content/>, remove the value `preflighted` from the
58
- `Properties:` frontmatter key (dropping the whole key if it carries no
59
- values anymore), and set <draft-removed>true</draft-removed>.
84
+ <if condition="<getopt-option-int-source-dir/> is not empty">
85
+ The *code basis* of the task is the separate working copy
86
+ <getopt-option-int-source-dir/> (e.g. a checkout of the branch of its
87
+ `Source` key): read every project file the <instruction/> requires
88
+ *exclusively* from there, instead of from the current working copy.
89
+ </if>
90
+
91
+ Attachment blocks of the "backmatter" are *never* dropped by a
92
+ refinement, unless the <instruction/> explicitly asks for it. Their
93
+ `Data` payloads are *elided* to `[elided: <n/> lines]` markers, which
94
+ you *MUST* keep *verbatim*, as `ase_task_save` restores them. Only if
95
+ the <instruction/> requires reading or changing the payload of an
96
+ attachment, fetch it via the `ase_task_attachment(id:
97
+ "<ase-task-id/>", type: "<type/>")` tool of the `ase` MCP server (with
98
+ <type/> being the value of its `Type` key), and replace its marker with
99
+ the *complete* changed payload as a `|4+` (or `|4-`) literal block
100
+ scalar according to the plan <format/>. *Remember* every attachment block whose content the
101
+ applied <instruction/> changed as *touched*, so its `Modified` key is
102
+ refreshed together with the frontmatter in step 3.1. An attachment the
103
+ <instruction/> did not change stays *verbatim* -- an implementation
104
+ draft attachment (`Type` key value `text/x-diff; charset=utf-8;
105
+ kind="draft"`, from `ase-task-implement --draft`) hence
106
+ turns *stale* through a "body" change by its `Modified` key falling
107
+ behind the frontmatter, which step 3.3 reports.
108
+
109
+ <if condition="<task-kind-changed/> is equal `true`">
110
+ Set the `Kind:` frontmatter key of <task-content/> to <task-kind/> --
111
+ *creating* the key at its position in the key order of the plan
112
+ <format/> if it is absent.
60
113
  </if>
61
114
 
62
115
  Set <task-content-dirty>true</task-content-dirty>.
63
116
  </define>
64
117
 
65
118
  <define name="generate-plan">
119
+ <expand name="task-ground-plan" arg1="<getopt-option-int-source-dir/>"/>
120
+
121
+ Determine the *kind of change* of the new plan:
122
+
123
+ - If <getopt-option-mode/> is `craft`, `refactor`, `resolve`, or
124
+ `specify`: Set <task-kind/> to `CRAFTING`, `REFACTORING`,
125
+ `RESOLVING`, or `SPECIFYING` correspondingly.
126
+
127
+ - Else if <issue-id/> is not empty (`auto` with a retrieved analyzer
128
+ issue): Set <task-kind/> to `RESOLVING`, as the plan fixes a
129
+ reported problem.
130
+
131
+ - Else (`auto`): *Infer* the <task-kind/> from the <instruction/>:
132
+ set to `SPECIFYING` if the plan predominantly creates or revises the
133
+ statements of the `SPEC` artifacts, set to `RESOLVING` if it
134
+ predominantly fixes a defect, set to `REFACTORING` if it
135
+ predominantly re-structures existing artifacts without changing
136
+ their observable behavior, and set to `CRAFTING` otherwise (also
137
+ the default if the inference stays inconclusive).
138
+
139
+ Set <approach-kind/> to `specification`, `resolution`, `refactoring`,
140
+ or `crafting` for the <task-kind/> `SPECIFYING`, `RESOLVING`,
141
+ `REFACTORING`, or `CRAFTING` correspondingly. You *MUST* then first
142
+ forget all previous internalized tenets and then freshly internalize
143
+ and strictly honor the **GENERIC TENETS** and the **<task-kind/>
144
+ TENETS** of the **ASE Tenets** in the following composition of the
145
+ plan. Do not output anything.
146
+
147
+ <if condition="<task-kind/> is equal `SPECIFYING`">
148
+ <expand name="task-spec-format"/>
149
+ </if>
150
+
151
+ <if condition="
152
+ <task-kind/> is equal `RESOLVING` and
153
+ <ase-project-boxing/> is not equal `black` and
154
+ <ase-headless/> is not equal `true`
155
+ ">
156
+ Investigate and *figure out details* related to the problem of the
157
+ <instruction/> and report them with the following <template/>:
158
+
159
+ <template>
160
+ <ase-tpl-bullet-signal/> **PROBLEM CONTEXT**: *<context/>*
161
+ <affected-code-excerpt/>
162
+ <optional-diagram/>
163
+
164
+ <ase-tpl-bullet-signal/> **PROBLEM DETAILS**: *<summary/>*
165
+ ● [...]
166
+ ● [...]
167
+ ● [...]
168
+ </template>
169
+
170
+ Hints:
171
+
172
+ - Give a short one-sentence <context/> of the problem plus a short
173
+ excerpt of the affected code <affected-code-excerpt/>.
174
+
175
+ - Give a short one-sentence <summary/> of the problem plus *precise*
176
+ but *brief* code processing information to understand the problem.
177
+ Try to keep the number of bullet points (●) in the range of 1-4.
178
+
179
+ - In case of a *complex context situation* with complex *structure*
180
+ (layout, components, dependencies, etc.), complex *control flow*
181
+ (branching, concurrency, etc.), complex *state machine* (states,
182
+ transitions, etc.), complex *data flow* (actors, messages, etc.), or
183
+ complex *data structure* (classes, entities, relationships, etc.),
184
+ visualize it with an optional diagram <optional-diagram/> by
185
+ building a Mermaid specification <mermaid-spec/> (e.g. `flowchart
186
+ TB`, `stateDiagram-v2`, `sequenceDiagram`, `classDiagram`, or
187
+ `erDiagram`, depending on intent) and dispatching the rendering
188
+ to the `ase-meta-diagram` sub-agent by calling the tool
189
+ `Agent(description: "Diagram Rendering", subagent_type:
190
+ "ase:ase-meta-diagram", prompt: <mermaid-spec/>,
191
+ run_in_background: false)`, reproducing its
192
+ returned fenced code block verbatim. Omit <optional-diagram/>
193
+ entirely for simple or purely local situations.
194
+ </if>
195
+
196
+ <if condition="<getopt-option-approach/> is equal `true`">
197
+ Determine the overall approach of the new plan, based on the
198
+ <instruction/> and the grounding in the project:
199
+
200
+ <expand name="approach-select"
201
+ arg1="<approach-kind/>"
202
+ arg2="◉ task: **<ase-task-id/>**"></expand>
203
+
204
+ If <chosen-approach/> is empty, only output the following <template/> and
205
+ then immediately *STOP* processing the entire current skill:
206
+
207
+ <template>
208
+ ⧉ **ASE**: ◉ task: **<ase-task-id/>**, ▶ status: **plan generation cancelled**
209
+ </template>
210
+ </if>
211
+ <else>
212
+ Set <chosen-approach></chosen-approach> (empty). Do not output anything.
213
+ </else>
214
+
66
215
  Create a new plan from scratch and store the result as
67
216
  <task-content/> by closely following the defined plan format
68
217
  <format/> and injecting into it all the information from
69
- the <instruction/> and all decisions you derived from the
70
- <instruction/>.
71
-
72
- If a `CHANGELOG.md` file exists in the project (or in any
73
- affected sub-package), the plan *MUST* include, as part of
74
- its `## CHANGES` section, an explicit bullet point
75
- describing the addition of a corresponding new entry to
76
- that `CHANGELOG.md` file, aligned with its existing style
77
- and conventions.
78
-
79
- <if condition="<getopt-option-dry/> is equal `true`">
80
- You *MUST* completely omit the `## VERIFICATION` section
218
+ the <instruction/>, the <chosen-approach/> (if not empty), all
219
+ decisions you derived from the <instruction/> and the <chosen-approach/>, and
220
+ the grounding in the project. Set the `Kind:` frontmatter key to
221
+ <task-kind/>.
222
+
223
+ <if condition="<task-kind/> is equal `RESOLVING`">
224
+ The plan *MUST* carry code references, a precise description of the
225
+ problem, the resolution approach, a preview of the *unified
226
+ diff* of the necessary code changes, and -- unless
227
+ <getopt-option-unverified/> is equal `true` -- a possible way to verify the
228
+ success of the resolution.
229
+ </if>
230
+
231
+ <if condition="<getopt-option-unverified/> is equal `true`">
232
+ You *MUST* completely omit the `## VERIFICATION (WHEN)` section
81
233
  (including its heading and all of its bullet points) from
82
234
  <task-content/>.
83
235
  </if>
@@ -103,14 +255,51 @@ Set <args></args> (set args to empty).
103
255
  1. **Determine Task and Instruction:**
104
256
 
105
257
  1. Set <instruction><getopt-arguments/></instruction> initially.
258
+ Set <issue-id></issue-id> (empty),
259
+ <task-allocated>false</task-allocated>, and
260
+ <task-origin>task inherited</task-origin>.
106
261
  Inherit the always existing <ase-task-id/> from the current context.
107
262
  Inherit the always existing <ase-session-id/> from the current context.
108
263
  Do not output anything.
109
264
 
110
- 2. React on task and/or instruction:
265
+ 2. Resolve a potential analyzer issue:
266
+
267
+ <if condition="
268
+ <instruction/> has the format `[<id/>:] <candidate/>` where
269
+ the optional <id/> matches the regexp `^[a-zA-Z0-9#][a-zA-Z0-9#_-]*$` and
270
+ <candidate/> matches the regexp `^([a-zA-Z][a-zA-Z0-9_]*-)?[PT]\d+$`
271
+ ">
272
+ The <candidate/> may be a bare issue identifier (like `P1`,
273
+ `T1`, or `<prefix>-P1`) previously produced by
274
+ `ase-code-analyze` or `ase-arch-analyze`. Call the
275
+ `ase_kv_get(key: "ase-issue-<candidate/>")` tool of the `ase`
276
+ MCP server to retrieve the persisted problem description. If the
277
+ returned `text` is non-empty:
278
+
279
+ 1. Set <issue-id><candidate/></issue-id> and
280
+ <instruction><text/></instruction>.
281
+
282
+ 2. If <id/> is given, set <ase-task-id><id/></ase-task-id> and
283
+ <task-origin>task given</task-origin>, and call the
284
+ `ase_task_id(id: "<ase-task-id/>", session:
285
+ "<ase-session-id/>")` tool from the `ase` MCP server to
286
+ switch the task.
287
+
288
+ 3. Only output the following <template/>:
289
+
290
+ <template>
291
+ ⧉ **ASE**: ◉ task: **<ase-task-id/>**, ⇌ issue: **<issue-id/>**, ▶ status: **issue retrieved**
292
+ </template>
293
+
294
+ Otherwise, keep <instruction/> unchanged, so it is treated as a
295
+ task id resp. as an instruction below. Do not output anything.
296
+ </if>
297
+
298
+ 3. React on task and/or instruction:
111
299
 
112
300
  1. <if condition="
113
- <instruction/> matches the regexp `^[a-zA-Z][a-zA-Z0-9_-]*$`
301
+ <issue-id/> is empty and
302
+ <instruction/> matches the regexp `^[a-zA-Z0-9#][a-zA-Z0-9#_-]*$`
114
303
  ">
115
304
  Set <ase-task-id><instruction/></ase-task-id> (set task
116
305
  id to instruction) and <instruction></instruction> (set
@@ -125,8 +314,9 @@ Set <args></args> (set args to empty).
125
314
  </if>
126
315
 
127
316
  2. <elseif condition="
317
+ <issue-id/> is empty and
128
318
  <instruction/> has the format `<id/>: <text/>` where
129
- <id/> matches the regexp `^[a-zA-Z][a-zA-Z0-9_-]*$` and
319
+ <id/> matches the regexp `^[a-zA-Z0-9#][a-zA-Z0-9#_-]*$` and
130
320
  <text/> is *empty*
131
321
  ">
132
322
  Set <instruction></instruction> (set instruction to empty)
@@ -142,8 +332,9 @@ Set <args></args> (set args to empty).
142
332
  </elseif>
143
333
 
144
334
  3. <elseif condition="
335
+ <issue-id/> is empty and
145
336
  <instruction/> has the format `<id/>: <text/>` where
146
- <id/> matches the regexp `^[a-zA-Z][a-zA-Z0-9_-]*$` and
337
+ <id/> matches the regexp `^[a-zA-Z0-9#][a-zA-Z0-9#_-]*$` and
147
338
  <text/> is *not empty*
148
339
  ">
149
340
  Set <instruction><text/></instruction> (set instruction to
@@ -162,10 +353,11 @@ Set <args></args> (set args to empty).
162
353
  4. <elseif condition="
163
354
  <instruction/> is not empty
164
355
  ">
165
- Only output the following <template/>:
356
+ Only output the following <template/>, where <task-origin/>
357
+ is `task given` if step 1.2 switched the task:
166
358
 
167
359
  <template>
168
- ⧉ **ASE**: ◉ task: **<ase-task-id/>**, ▶ status: **task inherited**
360
+ ⧉ **ASE**: ◉ task: **<ase-task-id/>**, ▶ status: **<task-origin/>**
169
361
  ⧉ **ASE**: ◉ task: **<ase-task-id/>**, ⇌ instruction: **<instruction/>**, ▶ status: **instruction given**
170
362
  </template>
171
363
  </elseif>
@@ -188,6 +380,13 @@ Set <args></args> (set args to empty).
188
380
  <getopt-option-int-reuse-task/> is equal `true`
189
381
  *and* an `ase_task_save(id: '<ase-task-id/>', ...)` tool call
190
382
  exists earlier in the current session
383
+ *and* the `text` *output* field of the most recent such
384
+ `ase_task_save` tool call carries a `<task-plan-tag>`
385
+ delimiter line
386
+ *and* the `text` *argument* of that call carries no `Effort:`
387
+ frontmatter key without <hash/> (a bare size like `Effort: M`,
388
+ which the task store stamped or dropped on that save, see the
389
+ plan <format/>)
191
390
  ">
192
391
  Set <text/> to the `text` *argument* of the most recent
193
392
  `ase_task_save(id: '<ase-task-id/>', ...)` tool call -- this
@@ -196,25 +395,32 @@ Set <args></args> (set args to empty).
196
395
  *without* calling `ase_task_load` again. Set
197
396
  <task-render></task-render> (set the rendering-prepared plan
198
397
  to empty, as it is re-derived in step 3.2 or 3.3). Set
199
- <status>plan reused</status>. Do not output anything.
398
+ <task-tag/> to the content enclosed in the `<task-plan-tag>`
399
+ delimiter line of the `text` *output* field of that
400
+ `ase_task_save` tool call (the *entity tag* of the plan as
401
+ saved by it). Set <status>plan reused</status>. Do not
402
+ output anything.
200
403
  </if>
201
404
  <else>
202
405
  Call the `ase_task_load(id: "<ase-task-id/>", variant:
203
- "both")` tool of the `ase` MCP server to load any existing
204
- plan content in *both* of its forms. From the `text` output
406
+ "both", tag: true)` tool of the `ase` MCP server to load any existing
407
+ plan content in *both* of its forms, with the payloads of all
408
+ attachments *elided* to `[elided: <n/> lines]` markers (the
409
+ default of its `attachments` argument). From the `text` output
205
410
  field of this `ase_task_load` tool call, set <text/> to the
206
411
  content enclosed in the `<task-plan-source>` delimiter lines
207
412
  (the *authoring form*, the only form which is ever edited and
208
- persisted) and set <task-render/> to the content enclosed in
413
+ persisted), set <task-render/> to the content enclosed in
209
414
  the `<task-plan-render>` delimiter lines (the
210
- *rendering-prepared* form, used for *display only*). The
211
- delimiter lines themselves are *never* part of either form.
212
- Do not output anything related to this MCP tool call. Set
415
+ *rendering-prepared* form, used for *display only*), and set
416
+ <task-tag/> to the content enclosed in the `<task-plan-tag>`
417
+ delimiter line (the *entity tag* of the loaded plan, or empty
418
+ if absent, as no plan exists yet). The delimiter lines themselves are *never* part of
419
+ any form. Do not output anything related to this MCP tool call. Set
213
420
  <status>plan loaded</status>.
214
421
  </else>
215
422
 
216
423
  Set <task-content-dirty>false</task-content-dirty>.
217
- Set <draft-removed>false</draft-removed>.
218
424
 
219
425
  - If <text/> starts with `ERROR:` or `WARNING:`:
220
426
  Silently ignore the MCP error.
@@ -244,7 +450,31 @@ Set <args></args> (set args to empty).
244
450
  </template>
245
451
  </if>
246
452
 
247
- 3. <if condition="<task-content/> is not empty AND
453
+ 3. <if condition="
454
+ <ase-task-id/> is equal `default` AND
455
+ <task-content/> is empty AND
456
+ <instruction/> is not empty
457
+ ">
458
+ Call the `ase_task_newid(title: "<title/>", proposal:
459
+ "<proposal/>")` tool from the `ase` MCP server, where <title/> is
460
+ a brief title summarizing <instruction/> and <proposal/> is a
461
+ task id derived from <instruction/>, which consists of two
462
+ lower-case words concatenated with a `-` character, and set
463
+ <ase-task-id/> to the `id` field of its response -- the tool
464
+ derives the id according to the task id scheme of the project,
465
+ so you *MUST* *NEVER* assemble it yourself. Then call the
466
+ `ase_task_id(id: "<ase-task-id/>", session: "<ase-session-id/>")`
467
+ tool from the `ase` MCP server to switch the task, set
468
+ <task-tag></task-tag> (empty, as no plan exists yet under the
469
+ new id) and <task-allocated>true</task-allocated>, and only
470
+ output the following <template/>:
471
+
472
+ <template>
473
+ ⧉ **ASE**: ◉ task: **<ase-task-id/>**, ▶ status: **task allocated**
474
+ </template>
475
+ </if>
476
+
477
+ 4. <if condition="<task-content/> is not empty AND
248
478
  <instruction/> is not empty AND
249
479
  <instruction/> is not equal <task-content/>">
250
480
  *Determine previous-plan handling*:
@@ -315,14 +545,14 @@ Set <args></args> (set args to empty).
315
545
  </template>
316
546
  </if>
317
547
 
318
- 4. <if condition="no line of <task-content/> matches the case-insensitive regex `^\s*#+\s*TASK\b` AND <instruction/> is empty">
548
+ 5. <if condition="no line of <task-content/> matches the case-insensitive regex `^\s*#+\s*TASK\b` AND <instruction/> is empty">
319
549
  Set <instruction><task-content/></instruction> (set instruction to task content).
320
550
  Set <task-content></task-content> (set task content to empty).
321
551
  Set <task-content-dirty>true</task-content-dirty>.
322
552
  Do not output anything.
323
553
  </if>
324
554
 
325
- 5. <if condition="<task-content/> is empty AND <instruction/> is not empty">
555
+ 6. <if condition="<task-content/> is empty AND <instruction/> is not empty">
326
556
  <expand name="generate-plan"/>
327
557
 
328
558
  Only output the following <template/> and continue processing:
@@ -337,55 +567,86 @@ Set <args></args> (set args to empty).
337
567
 
338
568
  *REPEAT* the following steps from 3.1 up to and including 3.4 in
339
569
  a *LOOP* until the user selects `DONE`, `GRILL`, `IMPLEMENT`, or
340
- `PREFLIGHT`, or declines/cancels in the dialog of step 3.4:
570
+ `DRAFT`, or declines/cancels in the dialog of step 3.4:
341
571
 
342
572
  1. *Update timestamp*:
343
- <if condition="the frontmatter of <task-content/> carries a `Modified:` key AND <task-content-dirty/> is 'true'">
573
+ <if condition="<task-content-dirty/> is 'true'">
344
574
  Update <timestamp-modified/> with the current time in
345
575
  ISO-style format, which has to be determined by calling the
346
576
  `ase_timestamp(format: "yyyy-LL-dd HH:mm")` tool of the `ase`
347
- MCP server and using the `text` field of its response. Update
348
- the `Modified: ...` frontmatter key of <task-content/> with the
349
- new <timestamp-modified/> value.
577
+ MCP server and using the `text` field of its response. If the
578
+ frontmatter of <task-content/> carries a `Modified:` key *and*
579
+ the refinement changed the "body" (not only frontmatter keys or
580
+ attachments), update it with the new <timestamp-modified/>
581
+ value, as the key tracks "body" changes only. Then set the
582
+ `Modified:` key of every attachment block *touched* by the
583
+ refinement (see `apply-refinement`) to the very same
584
+ <timestamp-modified/> value -- *creating* the key at its position
585
+ in the key order of the plan <format/> if the block does not
586
+ carry it yet -- and forget the touched marks again, so a changed
587
+ attachment never falls behind the frontmatter.
350
588
  Do not output anything.
351
589
  </if>
352
590
 
353
591
  2. *Persist plan*:
354
592
  <if condition="<task-content-dirty/> is 'true'">
355
593
  Call the `ase_task_save(id: "<ase-task-id/>", text:
356
- "<task-content/>", render: true)` tool of the `ase` MCP server to
594
+ "<task-content/>", render: true, tag: true)` tool of the `ase` MCP server --
595
+ if <task-tag/> is not empty, additionally with the argument
596
+ `base: "<task-tag/>"`, so the save is refused if the plan was
597
+ changed meanwhile by anybody else (instead of silently
598
+ overwriting that change), and if <task-tag/> is empty (no plan
599
+ existed yet), additionally with the argument `create: true`, so
600
+ the save is refused if the plan was created meanwhile by anybody
601
+ else -- to
357
602
  persist the current plan -- <task-content/> always is the
358
603
  *authoring form* of the plan and hence is persisted *as is* --
359
604
  and then set <task-content-dirty>false</task-content-dirty>
360
- again. This `ase_task_save` MCP tool call is the *only*
361
- permitted way to persist the plan -- *NEVER* write the plan
605
+ again. If this call fails because the task already exists *and*
606
+ <task-allocated/> is `true` (a concurrent session took the
607
+ allocated id), allocate and switch to a new <ase-task-id/>
608
+ exactly as in step 2.3, set the `Id:` frontmatter key of
609
+ <task-content/> to it, and save again. This `ase_task_save` MCP
610
+ tool call is the *only* permitted way to persist the plan -- *NEVER* write the plan
362
611
  file via `Write`/`Edit` or by executing a shell command.
363
- Finally, set <task-render/> to the `text` *output* field
364
- of this `ase_task_save` tool call -- the rendering-prepared form
612
+ Finally, *always* set <task-tag/> to the content enclosed in the
613
+ `<task-plan-tag>` delimiter line of the `text` *output* field of
614
+ this `ase_task_save` tool call (the entity tag of the just-saved
615
+ plan, to be passed as `base` on the next save of every
616
+ subsequent loop round), and set <task-render/> to the remaining
617
+ `text` *output* field
618
+ of this `ase_task_save` tool call (without this delimiter line) -- the rendering-prepared form
365
619
  of the just-persisted plan, which is for *display only* and
366
620
  *MUST NOT* be confused with the `text` *argument* passed into
367
621
  that call -- so the rendering in step 3.3 stays consistent across
368
- all loop rounds. Do not output anything related to this MCP tool
369
- call except the following <template/>:
622
+ all loop rounds. Then take over the `Effort:` key *as stored*
623
+ into the authoring form, as the task store stamps a key without
624
+ <hash/> or drops a stale one on save (see the plan <format/>):
625
+ set the `Effort:` frontmatter key of <task-content/> to the one
626
+ of the frontmatter of <task-render/> (rendered from the stored
627
+ plan) -- *replacing* it, *creating* it at its position in the key
628
+ order of the plan <format/>, or *removing* it if <task-render/>
629
+ carries none -- changing *nothing else* of <task-content/> and
630
+ leaving <task-content-dirty/> untouched. Do not output anything
631
+ related to this MCP tool call except the following <template/>:
370
632
 
371
633
  <template>
372
634
  ⧉ **ASE**: ◉ task: **<ase-task-id/>**, ▶ status: **plan saved**
373
635
  </template>
374
636
 
375
- <if condition="<draft-removed/> is equal `true`">
376
- Directly *after* this <template/>, reset
377
- <draft-removed>false</draft-removed> and give the corrective
378
- hint by expanding the following (which, depending on the
379
- configured <ase-guidance-level/>, may expand into nothing and
380
- hence emit no output at all):
381
-
382
- <ase-tpl-hint level="minimal">
383
- The `IMPLEMENTATION DRAFT` section became stale through the plan change and was removed -- run `/ase-task-preflight` again to re-create the draft for the changed plan.
384
- </ase-tpl-hint>
385
- </if>
637
+ Then set <task-allocated>false</task-allocated>, as the
638
+ allocated id is now taken by the saved plan. If <issue-id/> is
639
+ not empty, call the `ase_kv_delete(key: "ase-issue-<issue-id/>")`
640
+ tool of the `ase` MCP server to remove the now-planned analyzer
641
+ result from the key/value store and set <issue-id></issue-id>
642
+ (empty). Do not output anything related to these steps.
386
643
  </if>
387
644
 
388
645
  3. *Render plan*:
646
+ If <ase-headless/> is `true`, nobody reads the rendering, so
647
+ silently *skip* this entire step 3.3 (no MCP tool call and no
648
+ output at all) and continue with step 3.4.
649
+
389
650
  <if condition="<task-render/> is empty">
390
651
  Call the `ase_markdown_prepare(text: "<task-content/>")` tool of
391
652
  the `ase` MCP server and set <task-render/> to the `text` output
@@ -399,30 +660,34 @@ Set <args></args> (set args to empty).
399
660
  both `---` delimiters and all of their keys -- and instead place
400
661
  the following column-aligned glyph lines *before* the
401
662
  `# TASK: <title/>` heading, separated from it by an empty line,
402
- omitting the line of every key absent from the frontmatter. The
403
- glyph lines *MUST* stay *above* the heading, exactly where the
404
- frontmatter block sits in the plan file, and *MUST NOT* be moved
405
- below it. This keeps the `---` delimiters from rendering as a
406
- horizontal rule plus a *setext heading*. This rewrite is
407
- *display-only* and *MUST NOT* change <task-render/> or
408
- <task-content/> itself:
663
+ omitting the line of every key absent from the frontmatter and
664
+ always omitting the `Type` key. The glyph lines *MUST* stay
665
+ *above* the heading, exactly where the frontmatter block sits in
666
+ the plan file, and *MUST NOT* be moved below it. This keeps the
667
+ `---` delimiters from rendering as a horizontal rule plus a
668
+ *setext heading*. This rewrite is *display-only* and *MUST NOT*
669
+ change <task-render/> or <task-content/> itself:
409
670
 
410
671
  <format>
411
- ◉ **Id:** <task-id/>
412
- ⎈ **Created:** <timestamp-created/>
413
- ⚙ **Modified:** <timestamp-modified/>
414
- ◐ **Status:** <task-status/>
415
- ⚑ **Properties:** <task-properties/>
416
- ☯ **Kind:** <task-kind/>
672
+ ◉ **Id:** <task-id/>
673
+ ⎈ **Created:** <timestamp-created/>
674
+ ⚙ **Modified:** <timestamp-modified/>
675
+ ⊞ **Group:** <task-group/>
676
+ ◷ **Phase:** <task-phase/>
677
+ ⇢ **After:** <task-after/>
678
+ ◐ **Status:** <task-status/>
679
+ ☯ **Kind:** <task-kind/>
680
+ ⚖ **Effort:** <task-effort/>
681
+ ⚑ **Tags:** <task-tags/>
682
+ ⇤ **Source:** <task-source/>
683
+ ⇢ **Changeset:** <task-changeset/>
684
+ ⇥ **Target:** <task-target/>
417
685
  </format>
418
686
 
419
687
  Only output the following <template/>, so the user
420
- can read the plan and react to it. If <task-render/> is longer
421
- than 90 lines and a `## IMPLEMENTATION DRAFT` section (from the
422
- companion skill `ase-task-preflight`) exists, replace the entire
423
- content of the `## IMPLEMENTATION DRAFT` section with `[...]`.
424
- Else, do *not* truncate, summarize, or partially show the plan.
425
- Use the following <template/>:
688
+ can read the plan and react to it. Do *not* truncate,
689
+ summarize, or partially show the plan. Use the
690
+ following <template/>:
426
691
 
427
692
  <template>
428
693
  <ase-tpl-head title="TASK" subtitle="<task-id/>"/>
@@ -430,6 +695,25 @@ Set <args></args> (set args to empty).
430
695
  <ase-tpl-foot title="TASK" subtitle="<task-id/>"/>
431
696
  </template>
432
697
 
698
+ <if condition="the backmatter of <task-content/> contains an attachment
699
+ block with the `Type` key value `text/x-diff; charset=utf-8; kind="draft"`
700
+ which is *stale* according to the plan <format/> (its `Modified` key
701
+ is absent or older than the `Modified` key of the frontmatter)">
702
+ Directly *after* this <template/>, only output the following
703
+ <template/> and then give the corrective hint by expanding the
704
+ subsequent construct (which, depending on the configured
705
+ <ase-guidance-level/>, may expand into nothing and hence emit
706
+ no output at all):
707
+
708
+ <template>
709
+ ⧉ **ASE**: ◉ task: **<ase-task-id/>**, ▶ WARNING: implementation draft attachment is **stale** (older than the plan)
710
+ </template>
711
+
712
+ <ase-tpl-hint level="minimal">
713
+ Run `/ase-task-implement --draft` again to re-create the implementation draft for the changed plan, as `/ase-task-integrate --draft` refuses a stale draft.
714
+ </ase-tpl-hint>
715
+ </if>
716
+
433
717
  4. *Determine next step*:
434
718
 
435
719
  - If <getopt-option-next/> is not equal to `none`:
@@ -440,7 +724,7 @@ Set <args></args> (set args to empty).
440
724
  <getopt-option-next/> so subsequent loop iterations or
441
725
  downstream skills can consume the tail.
442
726
 
443
- - If <head/> matches the regex `^(DONE|GRILL|IMPLEMENT|PREFLIGHT)$`:
727
+ - If <head/> matches the regex `^(DONE|GRILL|IMPLEMENT|DRAFT)$`:
444
728
  Honor the pre-selected token.
445
729
  Set <result><head/></result>.
446
730
 
@@ -469,7 +753,7 @@ Set <args></args> (set args to empty).
469
753
  Next Step: How would you like to proceed with the plan?
470
754
  DONE: Mark plan finalized, exit planning loop.
471
755
  GRILL: Hand off plan to grilling.
472
- PREFLIGHT: Hand off plan to pre-flighting.
756
+ DRAFT: Hand off plan to implementation drafting.
473
757
  IMPLEMENT: Hand off plan to implementation.
474
758
  </expand>
475
759
 
@@ -496,16 +780,17 @@ Set <args></args> (set args to empty).
496
780
  ⧉ **ASE**: ◉ task: **<ase-task-id/>**, ▶ status: **plan finalized -- hand-off to grilling**
497
781
  </template>
498
782
 
499
- - If <result/> is `PREFLIGHT`:
783
+ - If <result/> is `DRAFT`:
500
784
 
501
785
  *Break* out of the *loop*.
502
786
  <expand name="handoff-args"/>
503
- Only output the following <template/> and then call the
504
- `Skill(skill: "ase:ase-task-preflight", args: "<args/>")` tool
505
- to *apply* the finalized plan.
787
+ Set <args><args/> --draft</args>. Only output the following
788
+ <template/> and then call the
789
+ `Skill(skill: "ase:ase-task-implement", args: "<args/>")` tool
790
+ to *draft* the implementation of the finalized plan.
506
791
 
507
792
  <template>
508
- ⧉ **ASE**: ◉ task: **<ase-task-id/>**, ▶ status: **plan finalized -- hand-off to pre-flight**
793
+ ⧉ **ASE**: ◉ task: **<ase-task-id/>**, ▶ status: **plan finalized -- hand-off to implementation draft**
509
794
  </template>
510
795
 
511
796
  - If <result/> is `IMPLEMENT`: