@rse/ase 0.9.59 → 0.9.61

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 +492 -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,492 @@
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-head title="EDIT TODO" subtitle="<arg1/>"/>
54
+
55
+ **WHAT**: <todo-what/>
56
+
57
+ **HOW**: <todo-how/>
58
+
59
+ <ase-tpl-foot title="EDIT TODO" subtitle="<arg1/>"/>
60
+ </template>
61
+
62
+ </define>
63
+
64
+ 1. **Initialize:**
65
+
66
+ 1. Set <query><getopt-arguments/></query> (with any leading and
67
+ trailing whitespace stripped), set <todo-what></todo-what> and
68
+ <todo-how></todo-how> (both empty), and set
69
+ <worktree-dir></worktree-dir> (empty). Do not output anything.
70
+
71
+ 2. If <getopt-option-grill-rounds/> is not a positive integer,
72
+ only output the following <template/> and then immediately
73
+ *STOP* processing the entire current skill:
74
+
75
+ <template>
76
+ ⧉ **ASE**: ✪ skill: **ase-code-edit**, ▶ ERROR: invalid `--grill-rounds` value: **<getopt-option-grill-rounds/>**
77
+ </template>
78
+
79
+ 2. **Iterate:**
80
+
81
+ Perform the states (1) *querying*, (2) *discovering*, (3) *grilling*,
82
+ (4) *implementing*, and (5) *verifying* below as one *iteration*.
83
+ Without `--loop` perform exactly *one* iteration. Under `--loop`
84
+ *repeat* the iteration until the *querying* state receives a
85
+ `STOP SKILL` result. Do not output anything in this item.
86
+
87
+ 3. **State: querying:**
88
+
89
+ 1. <if condition="<query/> is empty">
90
+
91
+ 1. In the following, you *MUST* *NOT* use your built-in
92
+ <user-dialog-tool/> tool! Instead, you *MUST* just show a
93
+ custom dialog according to the expanded `custom-dialog`
94
+ definition. You *MUST* closely follow this definition. Its
95
+ only answer option is the fixed `STOP SKILL`, so the user
96
+ normally answers with the edit query in *one* free-text
97
+ reply:
98
+
99
+ <expand name="custom-dialog" arg1="--other">
100
+ Edit Query: What is your edit query?
101
+ STOP SKILL: stop the entire skill immediately
102
+ </expand>
103
+
104
+ 2. If <result/> is `STOP SKILL` or `CANCEL`, only output the
105
+ following <template/> and then immediately *STOP* processing
106
+ the entire current skill:
107
+
108
+ <template>
109
+ ⧉ **ASE**: ✪ skill: **ase-code-edit**, ▶ status: **editing finished**
110
+ </template>
111
+
112
+ Otherwise, strip any leading `OTHER: ` prefix from
113
+ <result/> and set <query/> to the remainder.
114
+
115
+ </if>
116
+
117
+ 2. Convert the <query/> *fresh* into <todo-what/> -- the
118
+ domain-specific, non-implementation-detail information -- and
119
+ <todo-how/> -- the remaining information -- discarding all
120
+ <todo-what/>/<todo-how/> content of any previous iteration.
121
+ Without `--grill` you *MUST* *NOT* ask any clarifying questions
122
+ and during later implementation just interpret the query best-effort.
123
+ Do not output anything.
124
+
125
+ 3. Expand the following:
126
+
127
+ <expand name="todo-box" arg1="current state (after querying)"></expand>
128
+
129
+ 4. Set <query></query> (clear the query, so every further `--loop`
130
+ iteration asks for a fresh one). Do not output anything.
131
+
132
+ 4. **State: discovering:**
133
+
134
+ Check the existing source files for all code which is related to
135
+ <todo-what/> and <todo-how/>, and check the architecture of the
136
+ existing code base to understand the overall structures and
137
+ dynamics. Do not output anything in this state.
138
+
139
+ 5. **State: grilling:**
140
+
141
+ Enter this state only if <getopt-option-grill/> is equal `true`;
142
+ otherwise silently *skip* the entire state. Do not output anything
143
+ about the skipping.
144
+
145
+ 1. Understand what "grilling" is about:
146
+
147
+ - GOAL:
148
+
149
+ Interactively interviewing the user *relentlessly* about every
150
+ *essential aspect* of the edit query in <todo-what/> and
151
+ <todo-how/> *until* reaching a shared understanding and no
152
+ major decisions/questions are left open.
153
+
154
+ This especially means that you *MUST* clarify as many aspects as
155
+ necessary to ensure that for at least the most important decisions,
156
+ during a subsequent implementation, no essential freedom of choice
157
+ exists any longer.
158
+
159
+ - FOCUS:
160
+
161
+ Focusing on the following outside-in *Focus Areas*, in order of
162
+ descending importance for the grilling operation:
163
+
164
+ 1. *DOMAIN*: Aspects affecting domain-specifics. These
165
+ aspects *MUST* be clarified, as they are about
166
+ the "what" of the solution and they
167
+ non-technically shape the solution noticeably.
168
+
169
+ 2. *INTERFACE*: Aspects affecting externally observable
170
+ behavior or interfaces, especially aspects about user (UI)
171
+ and machine (API) interfaces. These aspects *MUST* be
172
+ clarified, as they are externally visible and
173
+ shape the boundary of the solution.
174
+
175
+ 3. *ARCHITECTURE*: Aspects affecting software and system
176
+ architecture, especially decisions on structure, wiring,
177
+ placement, or dependencies. These aspects *SHOULD*
178
+ be clarified, as they technically shape the solution noticeably.
179
+
180
+ 4. *IMPLEMENTATION*: Aspects affecting any other
181
+ implementation details, especially how the edit query
182
+ is realized in the code base. These aspects *CAN* be
183
+ clarified, as they shape technical inner details only.
184
+
185
+ - INDICATORS:
186
+
187
+ Check the following indicators for identifying problematic
188
+ aspects:
189
+
190
+ - *Fuzzy Language*:
191
+ When the user uses vague or overloaded terms instead of
192
+ a precise or canonical term.
193
+
194
+ - *Conflicting Terminology*:
195
+ When the user uses a term that conflicts with the
196
+ existing terminology in the code base.
197
+
198
+ - *Conflicting Code*:
199
+ When the user states how something works, check whether the
200
+ current code state really agrees.
201
+
202
+ - *Non-Concrete Scenarios*:
203
+ When domain relationships are being discussed,
204
+ stress-test them with specific scenarios. Theoretically
205
+ invent realistic scenarios that probe edge cases and
206
+ force the user to be precise about the boundaries
207
+ between concepts.
208
+
209
+ - *Unspecified Architecture Patterns*:
210
+ When the realization of the functionality is known to
211
+ be reasonably realizable with more than one decent
212
+ architecture pattern, but no such pattern was
213
+ mentioned.
214
+
215
+ - *Unspecified Dependencies*:
216
+ When the realization of functionality usually is known
217
+ to be supported by the use of frameworks or libraries,
218
+ but no dependencies on such solutions were mentioned.
219
+
220
+ 2. Perform <getopt-option-grill-rounds/> grilling *rounds*,
221
+ numbered <m/> (1-<getopt-option-grill-rounds/>).
222
+
223
+ For each round:
224
+
225
+ 1. Explicitly start *from scratch* from *only* the current
226
+ <todo-what/> and <todo-how/> and *forget* all information
227
+ gathered in previous rounds. Set <round-id/> to
228
+ `GRILLING ROUND <m/>/<getopt-option-grill-rounds/>` if
229
+ <getopt-option-grill-rounds/> is greater than 1, or to
230
+ `GRILLING` otherwise (a single round needs no round
231
+ numbering). Do not output anything.
232
+
233
+ 2. Determine the very brief but precise questions <question-N/>,
234
+ chosen to resolve the open points related to the above
235
+ understanding of grilling, by focusing on the mentioned
236
+ *Focus Areas*.
237
+
238
+ For each <question-N/> determine its <focus-area-N/> and a
239
+ <topic-N/>, a 1-2 word hint describing what the question is
240
+ about. Render <focus-area-N/> in the tables below as
241
+ `**DOMAIN** (MUST)`, `**INTERFACE** (MUST)`,
242
+ `**ARCHITECTURE** (SHOULD)`, or `**IMPLEMENTATION** (MAY)`
243
+ correspondingly.
244
+
245
+ Use the format `Shall...?` for questions of
246
+ focus area *DOMAIN* and *INTERFACE*, the format `Should...?`
247
+ for questions of focus area *ARCHITECTURE*, and the format
248
+ `May...?` for questions of focus area *IMPLEMENTATION*.
249
+
250
+ In every <question-N/>, encode all *literal aspects* -- file
251
+ and directory paths, identifiers, symbols, types, commands,
252
+ options, configuration keys, and literal values -- with
253
+ backticks.
254
+
255
+ Keep every <question-N/> at most *200 characters* long, as a
256
+ longer question overflows its table cell and silently
257
+ degrades the entire table into a plain text rendering.
258
+
259
+ 3. Finally, *sort* the questions by descending
260
+ focus area order -- first all `DOMAIN`, then all
261
+ `INTERFACE`, then all `ARCHITECTURE`, and then all
262
+ `IMPLEMENTATION` ones -- and renumber <N/> according to this
263
+ order. Truncate the list after a maximum of 10 questions and
264
+ set <n/> to the number of remaining questions. Do not output
265
+ anything.
266
+
267
+ 4. For all remaining <question-N/>, check the code base
268
+ and your world knowledge to find *two to three*
269
+ grounded answer alternatives <answer-N-K/> with a
270
+ 1-3 word label <answer-N-K-label/> and an ultra brief description
271
+ <answer-N-K-description/> of at most *10 words*. For the answer
272
+ which reflects the current
273
+ <todo-what/>/<todo-how/> understanding prefixing its
274
+ description with `✻ **CURRENT** ✻`. Assemble a <answer-N/>
275
+ out of `**A1**: **<answer-N-1-label/>**: <answer-N-1-description/> ─◇─
276
+ **A2**: **<answer-N-2-label/>**: <answer-N-2-description/> ─◇─ [...]`.
277
+
278
+ Keep every assembled <answer-N/> at most *240 characters*
279
+ long -- drop the least relevant alternative and compact the
280
+ descriptions until it fits -- as a longer answer overflows
281
+ its table cell and silently degrades the entire table into a
282
+ plain text rendering.
283
+
284
+ 5. In the following, you *MUST* *NOT* use your built-in
285
+ <user-dialog-tool/> tool! Instead, you *MUST* just show a
286
+ custom dialog according to the expanded `custom-dialog`
287
+ definition. You *MUST* closely follow this definition. The
288
+ dialog below carries the two fixed answer options
289
+ `SKIP GRILLING` and `STOP SKILL`, dispatched as follows:
290
+
291
+ - If a <result/> is `SKIP GRILLING` or `CANCEL`, ask no
292
+ further questions, continue with item 6 below (merging
293
+ the answers gathered so far), and after item 7 skip all
294
+ remaining rounds and continue with the *implementing*
295
+ state.
296
+
297
+ - If a <result/> is `STOP SKILL`, only output the
298
+ following <template/> and then immediately *STOP*
299
+ processing the entire current skill:
300
+
301
+ <template>
302
+ ⧉ **ASE**: ✪ skill: **ase-code-edit**, ▶ status: **editing stopped**
303
+ </template>
304
+
305
+ 1. Output only the following <template/> -- it lists *all*
306
+ questions of the round up-front, one table row per
307
+ aspect, so the subsequent dialog only has to ask for the
308
+ combined answer. Align all column edges of the table. If
309
+ <getopt-option-grill-rounds/> is equal `1`, *omit* the
310
+ leading `<round-id/>` line.
311
+
312
+ In every table cell you *MUST* escape each literal pipe
313
+ character outside a code span as `\|` and you *MUST*
314
+ open *and* close every backtick code span within the
315
+ *same* cell -- an unescaped pipe or an unbalanced
316
+ backtick run splits the cell and silently degrades the
317
+ entire table into a plain text rendering:
318
+
319
+ <template>
320
+ ⧉ **ASE**: <round-id/>:
321
+
322
+ | # | FOCUS ▶ TOPIC | **QUESTION** | **ANSWERS** |
323
+ | :----: | ----------------------------- | ----------------- | ----------- |
324
+ | **Q1** | <focus-area-1/> ▶ <topic-1/> | **<question-1/>** | <answer-1/> |
325
+ | **Q2** | <focus-area-2/> ▶ <topic-2/> | **<question-2/>** | <answer-2/> |
326
+ | [..] | [...] | [...] | [...] |
327
+ </template>
328
+
329
+ 2. Show a custom dialog. Its only answer options are the
330
+ two fixed ones, so the user normally answers all aspects in
331
+ *one* free-text reply:
332
+
333
+ <expand name="custom-dialog" arg1="--other">
334
+ <round-id/>: What is your (combined) answer to all (or a subset) of the above questions? (keywords are sufficient)
335
+ SKIP GRILLING: skip all remaining grilling and continue with the implementation
336
+ STOP SKILL: stop the entire skill immediately
337
+ </expand>
338
+
339
+ Dispatch `SKIP GRILLING`, `STOP SKILL`, and `CANCEL` as
340
+ defined above. Otherwise, strip any leading `OTHER: `
341
+ prefix from <result/> and treat the remainder as the
342
+ combined free-text answers to all questions of the
343
+ round.
344
+
345
+ 6. Merge all gathered answers of the round -- the combined
346
+ reply -- *exclusively* back into <todo-what/> and
347
+ <todo-how/>. Do not output anything.
348
+
349
+ 7. Set <round-suffix/> to
350
+ ` round <m/>/<getopt-option-grill-rounds/>` if
351
+ <getopt-option-grill-rounds/> is greater than 1, or to
352
+ empty otherwise, and expand the following -- this
353
+ intentionally closes *every* round, so the intermediate
354
+ <todo-what/>/<todo-how/> states stay visible:
355
+
356
+ <expand name="todo-box" arg1="current state (after grilling<round-suffix/>)"></expand>
357
+
358
+ 6. **State: implementing:**
359
+
360
+ 1. Determine the tenet(s) set to internalize:
361
+
362
+ - If <getopt-option-mode/> is `craft`, `refactor`, or
363
+ `resolve`: Set <task-kind/> to `CRAFTING`, `REFACTORING`,
364
+ or `RESOLVING` correspondingly.
365
+
366
+ - Else (`auto`): *Infer* the <task-kind/> from <todo-what/> and
367
+ <todo-how/>: set to `RESOLVING` if the edit predominantly
368
+ fixes a defect, set to `REFACTORING` if it predominantly
369
+ re-structures existing artifacts without changing their
370
+ observable behavior, and set to `CRAFTING` otherwise (also
371
+ the default if the inference stays inconclusive).
372
+
373
+ You *MUST* then first forget all previous internalized tenets
374
+ and then freshly internalize and strictly honor the **GENERIC
375
+ TENETS** and the **<task-kind/> TENETS** of the **ASE Tenets**
376
+ in the following creation and updating of code. Do not output
377
+ anything.
378
+
379
+ 2. <if condition="<getopt-option-worktree/> is equal `true` and <worktree-dir/> is empty">
380
+
381
+ One *single* worktree serves the whole skill run: it is created
382
+ *once* before the first change set is applied, and all further
383
+ `--loop` iterations land in it, too.
384
+
385
+ 1. Set <worktree-name/> to a unique name, derived from
386
+ <todo-what/>, which consists of two lower-case words
387
+ concatenated with a `-` character. Do not output anything.
388
+
389
+ 2. Determine the *worktree directory* by calling the
390
+ `ase_worktree_path(id: "<worktree-name/>", create: true)`
391
+ tool of the `ase` MCP server and capturing its output into
392
+ <worktree-dir/>. You *MUST* *NEVER* assemble this path
393
+ yourself. If this tool call fails, only output the following
394
+ <template/> and then immediately *STOP* processing the
395
+ entire current skill, leaving the working copy *untouched*:
396
+
397
+ <template>
398
+ ⧉ **ASE**: ✪ skill: **ase-code-edit**, ▶ ERROR: no Git repository or unsafe worktree directory -- cannot create worktree
399
+ </template>
400
+
401
+ 3. Determine the *existing worktrees* and *existing branches*
402
+ by running the commands `git worktree list --porcelain` and
403
+ `git branch --list` (taken exactly as given) and capturing
404
+ their outputs. If the worktree directory <worktree-dir/> or
405
+ the branch <worktree-name/> already exists, only output the
406
+ following <template/> and then immediately *STOP* processing
407
+ the entire current skill, leaving the existing worktree, its
408
+ branch, and the working copy *untouched*:
409
+
410
+ <template>
411
+ ⧉ **ASE**: ✪ skill: **ase-code-edit**, ▶ ERROR: worktree or branch **<worktree-name/>** already exists
412
+ </template>
413
+
414
+ 4. Create the worktree by running the command
415
+ `git worktree add "<worktree-dir/>"` (taken exactly as
416
+ given), which creates the directory *and* -- named after its
417
+ last path component -- the branch <worktree-name/> from
418
+ `HEAD`. If this command fails, only output the following
419
+ <template/> and then immediately *STOP* processing the
420
+ entire current skill, leaving the working copy *untouched*:
421
+
422
+ <template>
423
+ ⧉ **ASE**: ✪ skill: **ase-code-edit**, ▶ ERROR: worktree **<worktree-name/>** failed to create
424
+ </template>
425
+
426
+ 5. Only output the following <template/>:
427
+
428
+ <template>
429
+ ⧉ **ASE**: ✪ skill: **ase-code-edit**, ◉ worktree: **.ase/worktree/<worktree-name/>**, ▶ status: **worktree created**
430
+ </template>
431
+
432
+ </if>
433
+
434
+ 3. Apply the edit by modifying the affected *artifacts* with a
435
+ corresponding, complete *change set*, honoring *only*
436
+ <todo-what/> and <todo-how/> plus the information gathered in
437
+ the *discovering* state. Also, if a `CHANGELOG.md` file exists,
438
+ make an appropriate entry there, too.
439
+
440
+ <if condition="<worktree-dir/> is not empty">
441
+ The change set *MUST* land *exclusively inside* the worktree
442
+ <worktree-dir/>: resolve *every* file path relative to
443
+ <worktree-dir/> instead of the original working copy. You *MUST*
444
+ *NEVER* modify, stage, stash, revert, or commit anything
445
+ *outside* of this worktree. Leave the worktree *uncommitted*:
446
+ do *not* run `git add` and do *not* run `git commit`, so the
447
+ user keeps full control over the final commit.
448
+ </if>
449
+
450
+ 4. Output only the following <template/>. You *MUST* *NOT* output a
451
+ change summary, a list of modified artifacts, a rationale, or a
452
+ unified diff of the changes -- *independent* of
453
+ <ase-project-boxing/>, whose exposure rules are explicitly
454
+ *overridden* here:
455
+
456
+ <template>
457
+ ⧉ **ASE**: ✪ skill: **ase-code-edit**, ▶ status: **changes applied**
458
+ </template>
459
+
460
+ 7. **State: verifying:**
461
+
462
+ Enter this state only if <getopt-option-verify/> is equal `true`.
463
+ Otherwise you *MUST* *strictly skip* the entire state and *any*
464
+ verification: do *NOT* run any build, tests, linter, or
465
+ type-checker, and do *NOT* execute the modified program.
466
+
467
+ 1. Verify whether the implementation fulfills <todo-what/> and
468
+ <todo-how/> by running available verification commands
469
+ (build, tests, linter, type-checker)
470
+ <if condition=" <worktree-dir/> is not empty">
471
+ , each with <worktree-dir/> as its working directory
472
+ </if>.
473
+
474
+ If the verification fails, you *MUST* *adjust* the failing parts
475
+ of the change set and *RE-VERIFY* until the verification passes!
476
+
477
+ 2. Only output the following <template/>:
478
+
479
+ <template>
480
+ ⧉ **ASE**: ✪ skill: **ase-code-edit**, ▶ status: **verification passed**
481
+ </template>
482
+
483
+ 8. **Loop or Finish:**
484
+
485
+ <if condition="<getopt-option-loop/> is equal `true`">
486
+ Continue with the *next* iteration at the *querying* state
487
+ (item 3 above). Do not output anything in this item.
488
+ </if>
489
+ <else>
490
+ Finish the skill processing. Do not output anything in this item
491
+ besides the skill identification chrome.
492
+ </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
+ `#`/`FOCUS ▶ 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: