@rse/ase 0.9.59 → 0.9.60

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 (34) hide show
  1. package/dst/ase-hook.js +45 -5
  2. package/dst/ase-markdown.js +1 -1
  3. package/dst/ase-meta.js +1 -1
  4. package/dst/ase-setup.js +1 -1
  5. package/dst/ase-statusline.js +1 -1
  6. package/package.json +12 -13
  7. package/plugin/.claude-plugin/plugin.json +1 -1
  8. package/plugin/.codex-plugin/plugin.json +1 -1
  9. package/plugin/.github/plugin/plugin.json +1 -1
  10. package/plugin/meta/ase-common-code.md +1 -1
  11. package/plugin/meta/ase-common-task.md +8 -8
  12. package/plugin/meta/ase-dialog.md +4 -2
  13. package/plugin/package.json +4 -4
  14. package/plugin/skills/ase-code-craft/SKILL.md +43 -9
  15. package/plugin/skills/ase-code-craft/help.md +13 -0
  16. package/plugin/skills/ase-code-edit/SKILL.md +472 -0
  17. package/plugin/skills/ase-code-edit/help.md +127 -0
  18. package/plugin/skills/ase-code-refactor/SKILL.md +7 -6
  19. package/plugin/skills/ase-code-resolve/SKILL.md +7 -6
  20. package/plugin/skills/ase-help-skill/catalog.md +1 -0
  21. package/plugin/skills/ase-sync-import/SKILL.md +2 -1
  22. package/plugin/skills/ase-sync-reconcile/SKILL.md +3 -1
  23. package/plugin/skills/ase-task-condense/SKILL.md +13 -13
  24. package/plugin/skills/ase-task-dissect/SKILL.md +6 -5
  25. package/plugin/skills/ase-task-edit/SKILL.md +42 -20
  26. package/plugin/skills/ase-task-edit/help.md +7 -0
  27. package/plugin/skills/ase-task-grill/SKILL.md +4 -4
  28. package/plugin/skills/ase-task-implement/SKILL.md +21 -10
  29. package/plugin/skills/ase-task-implement/help.md +4 -2
  30. package/plugin/skills/ase-task-preflight/SKILL.md +18 -4
  31. package/plugin/skills/ase-task-preflight/help.md +5 -1
  32. package/plugin/skills/ase-task-reboot/SKILL.md +1 -1
  33. package/plugin/skills/ase-task-view/SKILL.md +1 -2
  34. package/plugin/package-lock.json +0 -2890
@@ -0,0 +1,472 @@
1
+ ---
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>]"
4
+ description: >
5
+ Edit Source Code: Use when the user wants to "edit" the code base in
6
+ one shot from a query, fusing crafting, refactoring, and resolving
7
+ with optional grilling, verification, looping, and Git worktree
8
+ isolation.
9
+ user-invocable: true
10
+ disable-model-invocation: false
11
+ effort: xhigh
12
+ ---
13
+
14
+ @${CLAUDE_SKILL_DIR}/../../meta/ase-control.md
15
+ @${CLAUDE_SKILL_DIR}/../../meta/ase-skill.md
16
+ @${CLAUDE_SKILL_DIR}/../../meta/ase-dialog.md
17
+ @${CLAUDE_SKILL_DIR}/../../meta/ase-getopt.md
18
+
19
+ <purpose name="ase-code-edit">
20
+ Edit Source Code
21
+ </purpose>
22
+
23
+ <expand name="getopt"
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">
26
+ $ARGUMENTS
27
+ </expand>
28
+
29
+ <objective>
30
+ *Edit* the code base directly from a query -- crafting, refactoring, or
31
+ resolving in one shot -- through the states *querying*, *discovering*,
32
+ *grilling*, *implementing*, and *verifying*.
33
+ </objective>
34
+
35
+ @${CLAUDE_SKILL_DIR}/../../meta/ase-tenets.md
36
+
37
+ Procedure
38
+ ---------
39
+
40
+ This skill is *plan-less*: it *never* composes or persists a task plan
41
+ and *MUST* *NOT* call `ase_task_save(...)`. Instead, it applies the
42
+ requested edit *in place*, so the *implementing* state *requires* `Edit`
43
+ and `Write` to modify the affected artifacts. Every modification *MUST*
44
+ stay restricted to the artifacts the edit actually demands.
45
+
46
+ <define name="todo-box">
47
+
48
+ On finishing the state `<arg1/>`, only output the following <template/>,
49
+ which shows the established <todo-what/> and <todo-how/>, where a still
50
+ empty <todo-what/> or <todo-how/> renders as `(none)`:
51
+
52
+ <template>
53
+ <ase-tpl-boxed title="EDIT TODO" subtitle="<arg1/>">
54
+
55
+ **WHAT**: <todo-what/>
56
+ **HOW**: <todo-how/>
57
+
58
+ </ase-tpl-boxed>
59
+ </template>
60
+
61
+ </define>
62
+
63
+ 1. **Initialize:**
64
+
65
+ 1. Set <query><getopt-arguments/></query> (with any leading and
66
+ trailing whitespace stripped), set <todo-what></todo-what> and
67
+ <todo-how></todo-how> (both empty), and set
68
+ <worktree-dir></worktree-dir> (empty). Do not output anything.
69
+
70
+ 2. If <getopt-option-grill-rounds/> is not a positive integer,
71
+ only output the following <template/> and then immediately
72
+ *STOP* processing the entire current skill:
73
+
74
+ <template>
75
+ ⧉ **ASE**: ✪ skill: **ase-code-edit**, ▶ ERROR: invalid `--grill-rounds` value: **<getopt-option-grill-rounds/>**
76
+ </template>
77
+
78
+ 2. **Iterate:**
79
+
80
+ Perform the states (1) *querying*, (2) *discovering*, (3) *grilling*,
81
+ (4) *implementing*, and (5) *verifying* below as one *iteration*.
82
+ Without `--loop` perform exactly *one* iteration. Under `--loop`
83
+ *repeat* the iteration until the *querying* state receives a
84
+ `STOP SKILL` result. Do not output anything in this item.
85
+
86
+ 3. **State: querying:**
87
+
88
+ 1. <if condition="<query/> is empty">
89
+
90
+ 1. In the following, you *MUST* *NOT* use your built-in
91
+ <user-dialog-tool/> tool! Instead, you *MUST* just show a
92
+ custom dialog according to the expanded `custom-dialog`
93
+ definition. You *MUST* closely follow this definition. Its
94
+ only answer option is the fixed `STOP SKILL`, so the user
95
+ normally answers with the edit query in *one* free-text
96
+ reply:
97
+
98
+ <expand name="custom-dialog" arg1="--other">
99
+ Edit Query: What is your edit query?
100
+ STOP SKILL: stop the entire skill immediately
101
+ </expand>
102
+
103
+ 2. If <result/> is `STOP SKILL` or `CANCEL`, only output the
104
+ following <template/> and then immediately *STOP* processing
105
+ the entire current skill:
106
+
107
+ <template>
108
+ ⧉ **ASE**: ✪ skill: **ase-code-edit**, ▶ status: **editing finished**
109
+ </template>
110
+
111
+ Otherwise, strip any leading `OTHER: ` prefix from
112
+ <result/> and set <query/> to the remainder.
113
+
114
+ </if>
115
+
116
+ 2. Convert the <query/> *fresh* into <todo-what/> -- the
117
+ domain-specific, non-implementation-detail information -- and
118
+ <todo-how/> -- the remaining information -- discarding all
119
+ <todo-what/>/<todo-how/> content of any previous iteration.
120
+ Without `--grill` you *MUST* *NOT* ask any clarifying questions
121
+ and during later implementation just interpret the query best-effort.
122
+ Do not output anything.
123
+
124
+ 3. Expand the following:
125
+
126
+ <expand name="todo-box" arg1="current state (after querying)"></expand>
127
+
128
+ 4. Set <query></query> (clear the query, so every further `--loop`
129
+ iteration asks for a fresh one). Do not output anything.
130
+
131
+ 4. **State: discovering:**
132
+
133
+ Check the existing source files for all code which is related to
134
+ <todo-what/> and <todo-how/>, and check the architecture of the
135
+ existing code base to understand the overall structures and
136
+ dynamics. Do not output anything in this state.
137
+
138
+ 5. **State: grilling:**
139
+
140
+ Enter this state only if <getopt-option-grill/> is equal `true`;
141
+ otherwise silently *skip* the entire state. Do not output anything
142
+ about the skipping.
143
+
144
+ 1. Understand what "grilling" is about:
145
+
146
+ - GOAL:
147
+
148
+ Interactively interviewing the user *relentlessly* about every
149
+ *essential aspect* of the edit query in <todo-what/> and
150
+ <todo-how/> *until* reaching a shared understanding and no
151
+ major decisions/questions are left open.
152
+
153
+ This especially means that you *MUST* clarify as many aspects as
154
+ necessary to ensure that for at least the most important decisions,
155
+ during a subsequent implementation, no essential freedom of choice
156
+ exists any longer.
157
+
158
+ - FOCUS:
159
+
160
+ Focusing on the following outside-in *Focus Areas*, in order of
161
+ descending importance for the grilling operation:
162
+
163
+ 1. *DOMAIN*: Aspects affecting domain-specifics. These
164
+ aspects *MUST* be clarified, as they are about
165
+ the "what" of the solution and they
166
+ non-technically shape the solution noticeably.
167
+
168
+ 2. *INTERFACE*: Aspects affecting externally observable
169
+ behavior or interfaces, especially aspects about user (UI)
170
+ and machine (API) interfaces. These aspects *MUST* be
171
+ clarified, as they are externally visible and
172
+ shape the boundary of the solution.
173
+
174
+ 3. *ARCHITECTURE*: Aspects affecting software and system
175
+ architecture, especially decisions on structure, wiring,
176
+ placement, or dependencies. These aspects *SHOULD*
177
+ be clarified, as they technically shape the solution noticeably.
178
+
179
+ 4. *IMPLEMENTATION*: Aspects affecting any other
180
+ implementation details, especially how the edit query
181
+ is realized in the code base. These aspects *CAN* be
182
+ clarified, as they shape technical inner details only.
183
+
184
+ - INDICATORS:
185
+
186
+ Check the following indicators for identifying problematic
187
+ aspects:
188
+
189
+ - *Fuzzy Language*:
190
+ When the user uses vague or overloaded terms instead of
191
+ a precise or canonical term.
192
+
193
+ - *Conflicting Terminology*:
194
+ When the user uses a term that conflicts with the
195
+ existing terminology in the code base.
196
+
197
+ - *Conflicting Code*:
198
+ When the user states how something works, check whether the
199
+ current code state really agrees.
200
+
201
+ - *Non-Concrete Scenarios*:
202
+ When domain relationships are being discussed,
203
+ stress-test them with specific scenarios. Theoretically
204
+ invent realistic scenarios that probe edge cases and
205
+ force the user to be precise about the boundaries
206
+ between concepts.
207
+
208
+ - *Unspecified Architecture Patterns*:
209
+ When the realization of the functionality is known to
210
+ be reasonably realizable with more than one decent
211
+ architecture pattern, but no such pattern was
212
+ mentioned.
213
+
214
+ - *Unspecified Dependencies*:
215
+ When the realization of functionality usually is known
216
+ to be supported by the use of frameworks or libraries,
217
+ but no dependencies on such solutions were mentioned.
218
+
219
+ 2. Perform <getopt-option-grill-rounds/> grilling *rounds*,
220
+ numbered <m/> (1-<getopt-option-grill-rounds/>).
221
+
222
+ For each round:
223
+
224
+ 1. Explicitly start *from scratch* from *only* the current
225
+ <todo-what/> and <todo-how/> and *forget* all information
226
+ gathered in previous rounds. Set <round-id/> to
227
+ `GRILLING ROUND <m/>/<getopt-option-grill-rounds/>` if
228
+ <getopt-option-grill-rounds/> is greater than 1, or to
229
+ `GRILLING` otherwise (a single round needs no round
230
+ numbering). Do not output anything.
231
+
232
+ 2. Determine the questions <question-N/>, chosen to
233
+ resolve the open points related to the above understanding
234
+ of grilling, by focusing on the mentioned *Focus Areas*.
235
+
236
+ For each <question-N/> determine its <focus-area-N/> and a
237
+ <topic-N/>, a 1-2 word hint describing what the question is
238
+ about. Render <focus-area-N/> in the tables below as
239
+ `**DOMAIN** (MUST)`, `**INTERFACE** (MUST)`,
240
+ `**ARCHITECTURE** (SHOULD)`, or `**IMPLEMENTATION** (MAY)`
241
+ correspondingly.
242
+
243
+ Use the format `Shall...?` for questions of
244
+ focus area *DOMAIN* and *INTERFACE*, the format `Should...?`
245
+ for questions of focus area *ARCHITECTURE*, and the format
246
+ `May...?` for questions of focus area *IMPLEMENTATION*.
247
+
248
+ In every <question-N/>, encode all *literal aspects* -- file
249
+ and directory paths, identifiers, symbols, types, commands,
250
+ options, configuration keys, and literal values -- with
251
+ backticks.
252
+
253
+ 3. Finally, *sort* the questions by descending
254
+ focus area order -- first all `DOMAIN`, then all
255
+ `INTERFACE`, then all `ARCHITECTURE`, and then all
256
+ `IMPLEMENTATION` ones -- and renumber <N/> according to this
257
+ order. Truncate the list after a maximum of 10 questions and
258
+ set <n/> to the number of remaining questions. Do not output
259
+ anything.
260
+
261
+ 4. For all remaining <question-N/>, check the code base
262
+ and your world knowledge to find *two to four*
263
+ grounded answer alternatives <answer-N-K/> with a
264
+ brief label <answer-N-K-label/> and a description
265
+ <answer-N-K-description/> which reflects the current
266
+ <todo-what/>/<todo-how/> understanding by prefixing its
267
+ description with `✻ **CURRENT** ✻`. Assemble a <answer-N/>
268
+ out of `**<answer-N-1-label/>**: <answer-N-1-description/> ─◇─
269
+ **<answer-N-2-label/>**: <answer-N-2-description/> ─◇─ [...]`.
270
+
271
+ 5. In the following, you *MUST* *NOT* use your built-in
272
+ <user-dialog-tool/> tool! Instead, you *MUST* just show a
273
+ custom dialog according to the expanded `custom-dialog`
274
+ definition. You *MUST* closely follow this definition. The
275
+ dialog below carries the two fixed answer options
276
+ `SKIP GRILLING` and `STOP SKILL`, dispatched as follows:
277
+
278
+ - If a <result/> is `SKIP GRILLING` or `CANCEL`, ask no
279
+ further questions, continue with item 6 below (merging
280
+ the answers gathered so far), and after item 7 skip all
281
+ remaining rounds and continue with the *implementing*
282
+ state.
283
+
284
+ - If a <result/> is `STOP SKILL`, only output the
285
+ following <template/> and then immediately *STOP*
286
+ processing the entire current skill:
287
+
288
+ <template>
289
+ ⧉ **ASE**: ✪ skill: **ase-code-edit**, ▶ status: **editing stopped**
290
+ </template>
291
+
292
+ 1. Output only the following <template/> -- it lists *all*
293
+ questions of the round up-front, one table row per
294
+ aspect, so the subsequent dialog only has to ask for the
295
+ combined answer. Align all column edges of the table. If
296
+ <getopt-option-grill-rounds/> is equal `1`, *omit* the
297
+ leading `<round-id/>` line:
298
+
299
+ <template>
300
+ ⧉ **ASE**: <round-id/>:
301
+
302
+ | ASPECT | FOCUS AREA | TOPIC | **QUESTION** ┈─▶ **ANSWERS** |
303
+ | -------- | --------------- | ----------- | --------------------------------- |
304
+ | 1/<n/> | <focus-area-1/> | <topic-1/> | **<question-1/>** ┈─▶ <answer-1/> |
305
+ | 2/<n/> | <focus-area-2/> | <topic-2/> | **<question-2/>** ┈─▶ <answer-2/> |
306
+ | [...] | [...] | [...] | [...] |
307
+ </template>
308
+
309
+ 2. Show a custom dialog. Its only answer options are the
310
+ two fixed ones, so the user normally answers all aspects in
311
+ *one* free-text reply:
312
+
313
+ <expand name="custom-dialog" arg1="--other">
314
+ <round-id/>: What is your (combined) answer to all (or a subset) of the above questions? (keywords are sufficient)
315
+ SKIP GRILLING: skip all remaining grilling and continue with the implementation
316
+ STOP SKILL: stop the entire skill immediately
317
+ </expand>
318
+
319
+ Dispatch `SKIP GRILLING`, `STOP SKILL`, and `CANCEL` as
320
+ defined above. Otherwise, strip any leading `OTHER: `
321
+ prefix from <result/> and treat the remainder as the
322
+ combined free-text answers to all questions of the
323
+ round.
324
+
325
+ 6. Merge all gathered answers of the round -- the combined
326
+ reply -- *exclusively* back into <todo-what/> and
327
+ <todo-how/>. Do not output anything.
328
+
329
+ 7. Set <round-suffix/> to
330
+ ` round <m/>/<getopt-option-grill-rounds/>` if
331
+ <getopt-option-grill-rounds/> is greater than 1, or to
332
+ empty otherwise, and expand the following -- this
333
+ intentionally closes *every* round, so the intermediate
334
+ <todo-what/>/<todo-how/> states stay visible:
335
+
336
+ <expand name="todo-box" arg1="current state (after grilling<round-suffix/>)"></expand>
337
+
338
+ 6. **State: implementing:**
339
+
340
+ 1. Determine the tenet(s) set to internalize:
341
+
342
+ - If <getopt-option-mode/> is `craft`, `refactor`, or
343
+ `resolve`: Set <task-kind/> to `CRAFTING`, `REFACTORING`,
344
+ or `RESOLVING` correspondingly.
345
+
346
+ - Else (`auto`): *Infer* the <task-kind/> from <todo-what/> and
347
+ <todo-how/>: set to `RESOLVING` if the edit predominantly
348
+ fixes a defect, set to `REFACTORING` if it predominantly
349
+ re-structures existing artifacts without changing their
350
+ observable behavior, and set to `CRAFTING` otherwise (also
351
+ the default if the inference stays inconclusive).
352
+
353
+ You *MUST* then first forget all previous internalized tenets
354
+ and then freshly internalize and strictly honor the **GENERIC
355
+ TENETS** and the **<task-kind/> TENETS** of the **ASE Tenets**
356
+ in the following creation and updating of code. Do not output
357
+ anything.
358
+
359
+ 2. <if condition="<getopt-option-worktree/> is equal `true` and <worktree-dir/> is empty">
360
+
361
+ One *single* worktree serves the whole skill run: it is created
362
+ *once* before the first change set is applied, and all further
363
+ `--loop` iterations land in it, too.
364
+
365
+ 1. Set <worktree-name/> to a unique name, derived from
366
+ <todo-what/>, which consists of two lower-case words
367
+ concatenated with a `-` character. Do not output anything.
368
+
369
+ 2. Determine the *worktree directory* by calling the
370
+ `ase_worktree_path(id: "<worktree-name/>", create: true)`
371
+ tool of the `ase` MCP server and capturing its output into
372
+ <worktree-dir/>. You *MUST* *NEVER* assemble this path
373
+ yourself. If this tool call fails, only output the following
374
+ <template/> and then immediately *STOP* processing the
375
+ entire current skill, leaving the working copy *untouched*:
376
+
377
+ <template>
378
+ ⧉ **ASE**: ✪ skill: **ase-code-edit**, ▶ ERROR: no Git repository or unsafe worktree directory -- cannot create worktree
379
+ </template>
380
+
381
+ 3. Determine the *existing worktrees* and *existing branches*
382
+ by running the commands `git worktree list --porcelain` and
383
+ `git branch --list` (taken exactly as given) and capturing
384
+ their outputs. If the worktree directory <worktree-dir/> or
385
+ the branch <worktree-name/> already exists, only output the
386
+ following <template/> and then immediately *STOP* processing
387
+ the entire current skill, leaving the existing worktree, its
388
+ branch, and the working copy *untouched*:
389
+
390
+ <template>
391
+ ⧉ **ASE**: ✪ skill: **ase-code-edit**, ▶ ERROR: worktree or branch **<worktree-name/>** already exists
392
+ </template>
393
+
394
+ 4. Create the worktree by running the command
395
+ `git worktree add "<worktree-dir/>"` (taken exactly as
396
+ given), which creates the directory *and* -- named after its
397
+ last path component -- the branch <worktree-name/> from
398
+ `HEAD`. If this command fails, only output the following
399
+ <template/> and then immediately *STOP* processing the
400
+ entire current skill, leaving the working copy *untouched*:
401
+
402
+ <template>
403
+ ⧉ **ASE**: ✪ skill: **ase-code-edit**, ▶ ERROR: worktree **<worktree-name/>** failed to create
404
+ </template>
405
+
406
+ 5. Only output the following <template/>:
407
+
408
+ <template>
409
+ ⧉ **ASE**: ✪ skill: **ase-code-edit**, ◉ worktree: **.ase/worktree/<worktree-name/>**, ▶ status: **worktree created**
410
+ </template>
411
+
412
+ </if>
413
+
414
+ 3. Apply the edit by modifying the affected *artifacts* with a
415
+ corresponding, complete *change set*, honoring *only*
416
+ <todo-what/> and <todo-how/> plus the information gathered in
417
+ the *discovering* state. Also, if a `CHANGELOG.md` file exists,
418
+ make an appropriate entry there, too.
419
+
420
+ <if condition="<worktree-dir/> is not empty">
421
+ The change set *MUST* land *exclusively inside* the worktree
422
+ <worktree-dir/>: resolve *every* file path relative to
423
+ <worktree-dir/> instead of the original working copy. You *MUST*
424
+ *NEVER* modify, stage, stash, revert, or commit anything
425
+ *outside* of this worktree. Leave the worktree *uncommitted*:
426
+ do *not* run `git add` and do *not* run `git commit`, so the
427
+ user keeps full control over the final commit.
428
+ </if>
429
+
430
+ 4. Output only the following <template/>. You *MUST* *NOT* output a
431
+ change summary, a list of modified artifacts, a rationale, or a
432
+ unified diff of the changes -- *independent* of
433
+ <ase-project-boxing/>, whose exposure rules are explicitly
434
+ *overridden* here:
435
+
436
+ <template>
437
+ ⧉ **ASE**: ✪ skill: **ase-code-edit**, ▶ status: **changes applied**
438
+ </template>
439
+
440
+ 7. **State: verifying:**
441
+
442
+ Enter this state only if <getopt-option-verify/> is equal `true`.
443
+ Otherwise you *MUST* *strictly skip* the entire state and *any*
444
+ verification: do *NOT* run any build, tests, linter, or
445
+ type-checker, and do *NOT* execute the modified program.
446
+
447
+ 1. Verify whether the implementation fulfills <todo-what/> and
448
+ <todo-how/> by running available verification commands
449
+ (build, tests, linter, type-checker)
450
+ <if condition=" <worktree-dir/> is not empty">
451
+ , each with <worktree-dir/> as its working directory
452
+ </if>.
453
+
454
+ If the verification fails, you *MUST* *adjust* the failing parts
455
+ of the change set and *RE-VERIFY* until the verification passes!
456
+
457
+ 2. Only output the following <template/>:
458
+
459
+ <template>
460
+ ⧉ **ASE**: ✪ skill: **ase-code-edit**, ▶ status: **verification passed**
461
+ </template>
462
+
463
+ 8. **Loop or Finish:**
464
+
465
+ <if condition="<getopt-option-loop/> is equal `true`">
466
+ Continue with the *next* iteration at the *querying* state
467
+ (item 3 above). Do not output anything in this item.
468
+ </if>
469
+ <else>
470
+ Finish the skill processing. Do not output anything in this item
471
+ besides the skill identification chrome.
472
+ </else>
@@ -0,0 +1,127 @@
1
+
2
+ ## NAME
3
+
4
+ `ase-code-edit` - Edit Source Code
5
+
6
+ ## SYNOPSIS
7
+
8
+ `ase-code-edit`
9
+ [`--help`|`-h`]
10
+ [`--mode`|`-m` `auto`|`craft`|`refactor`|`resolve`]
11
+ [`--grill`|`-g`]
12
+ [`--grill-rounds`|`-r` *n*]
13
+ [`--verify`|`-v`]
14
+ [`--worktree`|`-w`]
15
+ [`--loop`|`-l`]
16
+ [*query*]
17
+
18
+ ## DESCRIPTION
19
+
20
+ The `ase-code-edit` skill edits the code base *directly* from a *query*,
21
+ in one shot and without any task plan ceremony. It is a *plan-less*
22
+ fusion of `ase-code-craft`, `ase-code-refactor`, `ase-code-resolve`,
23
+ `ase-task-grill`, and `ase-task-implement`.
24
+
25
+ Each single-shot run (or each `--loop` iteration) walks through five
26
+ states: *querying* (take the *query* argument or ask for a query via an
27
+ interactive `Edit Query` dialog, and
28
+ split it into its domain-specific WHAT and its implementation-detail HOW
29
+ parts), *discovering* (read the source artifacts related to the query),
30
+ *grilling* (optionally stress-test the query with rounds of questions),
31
+ *implementing* (apply the change set in place, honoring the tenet set
32
+ selected via `--mode`), and *verifying* (optionally verify the
33
+ implementation until it passes). The *querying* state and every
34
+ *grilling* round close with an `EDIT TODO` box showing the established
35
+ `WHAT` and `HOW` information.
36
+
37
+ ## OPTIONS
38
+
39
+ `--mode`|`-m` `auto`|`craft`|`refactor`|`resolve`:
40
+ Select the tenet set internalized for the implementation: `craft`
41
+ (CRAFTING), `refactor` (REFACTORING), or `resolve` (RESOLVING).
42
+ The default `auto` infers the tenet set from the query itself.
43
+
44
+ `--grill`|`-g`:
45
+ Grill the query before implementing, similar to `ase-task-grill`:
46
+ raise 1-10 questions per round which resolve the open points of the
47
+ query. Each question carries a `FOCUS-AREA` -- `DOMAIN`
48
+ (domain-specifics, must be clarified), `INTERFACE` (externally
49
+ observable behavior or UI/API interfaces, must be clarified),
50
+ `ARCHITECTURE` (structure, wiring, placement, or dependencies,
51
+ should be clarified), or `IMPLEMENTATION` (inner technical details,
52
+ can be clarified) -- and a 1-2 word `TOPIC` hint. The questions of a
53
+ round are sorted by descending focus area importance (`DOMAIN`,
54
+ `INTERFACE`, `ARCHITECTURE`, `IMPLEMENTATION`).
55
+ All questions of a round are announced together below a
56
+ `GRILLING ROUND K/L` line (the announcement line and round numbering
57
+ are omitted when only a single round is performed) as an
58
+ `ASPECT`/`FOCUS AREA`/`TOPIC`/`QUESTION` table with one row per
59
+ question, each row carrying two to four grounded answer alternatives
60
+ (with the alternative reflecting the current understanding marked as
61
+ `CURRENT`). They are then asked in *one* batch via a single
62
+ interactive dialog titled `GRILLING ROUND K/L` (or plain `GRILLING`
63
+ for a single round), whose question asks for the combined answer to
64
+ all (or a subset) of the listed aspect questions and whose only
65
+ answer options are the fixed `STOP SKILL` (stop the skill) and
66
+ `SKIP GRILLING` (skip the remaining grilling) ones, plus free-text
67
+ input. The answers are
68
+ merged back into the WHAT and HOW parts of the query. Without
69
+ `--grill`, no questions are asked at all.
70
+
71
+ `--grill-rounds`|`-r` *n*:
72
+ The number of grill rounds to apply (default: `1`). Each round
73
+ starts from scratch from only the current WHAT and HOW parts,
74
+ forgetting all information of previous rounds, and closes with an
75
+ `EDIT TODO` box. Only effective together with `--grill`.
76
+
77
+ `--verify`|`-v`:
78
+ Verify whether the implementation fulfills the requirements, by
79
+ running the available verification commands (build, tests, linter,
80
+ type-checker) and adjusting the failing parts of the change set
81
+ until the verification passes. Without `--verify`, strictly no
82
+ verification is performed at all.
83
+
84
+ `--worktree`|`-w`:
85
+ Apply the change sets inside a dedicated Git worktree (as
86
+ `ase-task-implement --worktree`) instead of the current working
87
+ copy. One single worktree, named by a two-word id derived from the
88
+ first query, serves the whole skill run: all `--loop` iterations
89
+ land in it and it is left uncommitted for review.
90
+
91
+ `--loop`|`-l`:
92
+ Loop the whole state cycle: after each iteration, ask for the next
93
+ edit query via the interactive `Edit Query` dialog and repeat, until
94
+ the user answers with its fixed `STOP SKILL` option or cancels the
95
+ dialog.
96
+
97
+ ## ARGUMENTS
98
+
99
+ *query*:
100
+ Description of the edit to perform. When omitted, the skill asks
101
+ for the query via an interactive `Edit Query` dialog, carrying the
102
+ fixed `STOP SKILL` option plus free-text input.
103
+
104
+ ## EXAMPLES
105
+
106
+ Edit in one shot, without any questions or verification:
107
+
108
+ ```text
109
+ ❯ /ase-code-edit add a --verbose option to the CLI
110
+ ```
111
+
112
+ Grill the query with two rounds first, then implement and verify:
113
+
114
+ ```text
115
+ ❯ /ase-code-edit -g -r 2 -v refactor the config loading into layers
116
+ ```
117
+
118
+ Loop over multiple edits inside a dedicated Git worktree:
119
+
120
+ ```text
121
+ ❯ /ase-code-edit -l -w
122
+ ```
123
+
124
+ ## SEE ALSO
125
+
126
+ [`ase-code-craft`](../ase-code-craft/help.md), [`ase-code-refactor`](../ase-code-refactor/help.md), [`ase-code-resolve`](../ase-code-resolve/help.md),
127
+ [`ase-task-grill`](../ase-task-grill/help.md), [`ase-task-implement`](../ase-task-implement/help.md).
@@ -48,8 +48,9 @@ Procedure
48
48
 
49
49
  <if condition="<getopt-option-direct/> is not equal to 'true'">
50
50
  You *MUST* *NOT* call `Edit`, `Write`, `NotebookEdit`, or any
51
- filesystem-modifying tool during this entire skill. The *only*
52
- permitted way to persist artifacts is via `ase_task_save(...)`.
51
+ filesystem-modifying tool, nor execute any filesystem-modifying
52
+ shell command, during this entire skill. The *only* permitted way
53
+ to persist artifacts is via the `ase_task_save(...)` MCP tool.
53
54
  </if>
54
55
  <else>
55
56
  The `--direct`/`-D` mode applies the refactoring *in place*, so STEP 4
@@ -207,16 +208,16 @@ refactoring actually demands, and you *MUST* *NOT* call
207
208
  `ase` MCP server and use the `text` field of its response for
208
209
  <timestamp-created/> and <timestamp-modified/> information. Then
209
210
  insert the current <ase-task-id/>, <timestamp-created/>,
210
- <timestamp-modified/>, and <task-kind/> information and calculate
211
- the number of words <words/> of <task-content/>.
211
+ <timestamp-modified/>, and <task-kind/> information.
212
212
 
213
213
  3. You then *MUST* *save* the resulting plan content with the
214
- `ase_task_save(id: "<ase-task-id/>", text: "<task-content/>")`.
214
+ `ase_task_save(id: "<ase-task-id/>", text: "<task-content/>")`
215
+ MCP tool call only -- *NEVER* by executing a shell command.
215
216
 
216
217
  4. Output a hint with the following <template/>:
217
218
 
218
219
  <template>
219
- ⧉ **ASE**: ◉ task: **<ase-task-id/>**, ✪ plan: **<words/>** words, ▶ status: **plan created**
220
+ ⧉ **ASE**: ◉ task: **<ase-task-id/>**, ▶ status: **plan created**
220
221
  </template>
221
222
 
222
223
  5. Directly pass through control to the next skill:
@@ -48,8 +48,9 @@ Procedure
48
48
 
49
49
  <if condition="<getopt-option-direct/> is not equal to 'true'">
50
50
  You *MUST* *NOT* call `Edit`, `Write`, `NotebookEdit`, or any
51
- filesystem-modifying tool during this entire skill. The *only*
52
- permitted way to persist artifacts is via `ase_task_save(...)`.
51
+ filesystem-modifying tool, nor execute any filesystem-modifying
52
+ shell command, during this entire skill. The *only* permitted way
53
+ to persist artifacts is via the `ase_task_save(...)` MCP tool.
53
54
  </if>
54
55
  <else>
55
56
  The `--direct`/`-D` mode applies the resolution *in place*, so STEP 4
@@ -257,11 +258,11 @@ resolution actually demands, and you *MUST* *NOT* call
257
258
  `ase` MCP server and use the `text` field of its response for
258
259
  <timestamp-created/> and <timestamp-modified/> information. Then
259
260
  insert the current <ase-task-id/>, <timestamp-created/>,
260
- <timestamp-modified/>, and <task-kind/> information and calculate
261
- the number of words <words/> of <task-content/>.
261
+ <timestamp-modified/>, and <task-kind/> information.
262
262
 
263
263
  3. You then *MUST* *save* the resulting plan content with the
264
- `ase_task_save(id: "<ase-task-id/>", text: "<task-content/>")`.
264
+ `ase_task_save(id: "<ase-task-id/>", text: "<task-content/>")`
265
+ MCP tool call only -- *NEVER* by executing a shell command.
265
266
 
266
267
  4. If <problem-id/> is set (i.e. the <problem/> was retrieved from
267
268
  `ase_kv_get` in STEP 1.1 via key `ase-issue-<problem-id/>`),
@@ -273,7 +274,7 @@ resolution actually demands, and you *MUST* *NOT* call
273
274
  5. Output a hint with the following <template/>:
274
275
 
275
276
  <template>
276
- ⧉ **ASE**: ◉ task: **<ase-task-id/>**, ✪ plan: **<words/>** words, ▶ status: **plan created**
277
+ ⧉ **ASE**: ◉ task: **<ase-task-id/>**, ▶ status: **plan created**
277
278
  </template>
278
279
 
279
280
  6. Directly pass through control to the next skill:
@@ -28,6 +28,7 @@
28
28
  ○ `ase-code-craft`: Craft Source Code
29
29
  ○ `ase-code-refactor`: Refactor Artifacts
30
30
  ○ `ase-code-resolve`: Resolve Problem
31
+ ○ `ase-code-edit`: Edit Source Code
31
32
  ○ `ase-sync-import`: Import Foreign Sources into Artifact Set
32
33
  ○ `ase-sync-reconcile`: Reconcile Artifact Set to Artifact Set
33
34
  ○ `ase-sync-export`: Export Artifact Set to Side-by-Side Files