rse/ase / plugin/skills/ase-code-edit
ase-code-edit
UnverifiedEdit Source Code: Use when the user wants to "edit" the code base in one shot from a query or a bare analyzer issue id like "P1", fusing crafting, refactoring, and resolving with optional grilling, verification, looping, and Git worktree isolation.
@${CLAUDE_SKILL_DIR}/../../meta/ase-control.md @${CLAUDE_SKILL_DIR}/../../meta/ase-skill.md @${CLAUDE_SKILL_DIR}/../../meta/ase-dialog.md @${CLAUDE_SKILL_DIR}/../../meta/ase-getopt.md
$ARGUMENTS
@${CLAUDE_SKILL_DIR}/../../meta/ase-tenets.md @${CLAUDE_SKILL_DIR}/../../meta/ase-common-ground.md @${CLAUDE_SKILL_DIR}/../../meta/ase-common-grill.md @${CLAUDE_SKILL_DIR}/../../meta/ase-common-changeset.md @${CLAUDE_SKILL_DIR}/../../meta/ase-common-approach.md
Procedure
This skill is plan-less: it never composes or persists a task plan
and MUST NOT call ase_task_save(...). Instead, it applies the
requested edit in place, so the implementing state requires Edit
and Write to modify the affected artifacts. Every modification MUST
stay restricted to the artifacts the edit actually demands.
On finishing the state <arg1/>, only output the following ,
which shows the established and , where a still
empty or renders as (none):
WHAT:
HOW:
-
Initialize:
-
Set (with any leading and trailing whitespace stripped), set and (both empty), and set and (both empty). If is
true, set true, as--grill-autoimplies--grill. Do not output anything. -
If is not a positive integer, only output the following and then immediately STOP processing the entire current skill:
-
Resolve a potentially misparsed former boolean
--worktreeoption:
-
-
Iterate:
Perform the states (1) querying, (2) discovering, (3) grilling, (4) implementing, and (5) verifying below as one iteration. Without
--loopperform exactly one iteration. Under--looprepeat the iteration until the querying state receives aSTOP SKILLresult. Do not output anything in this item. -
State: querying:
-
-
In the following, you MUST NOT use your built-in tool! Instead, you MUST just show a custom dialog according to the expanded
custom-dialogdefinition. You MUST closely follow this definition. Its only answer option is the fixedSTOP SKILL, so the user normally answers with the edit query in one free-text reply: -
If is
STOP SKILLorCANCEL, only output the following and then immediately STOP processing the entire current skill:Otherwise, strip any leading
OTHER:prefix from and set to the remainder.
-
-
The is a bare issue identifier (like
P1,T1, or<prefix>-P1) previously produced byase-code-analyzeorase-arch-analyze. Set and call thease_kv_get(key: "ase-issue-<issue-id/>")tool of theaseMCP server to retrieve the persisted problem description. If the returnedtextis non-empty, set and only output the following :Otherwise, only output the following , then set and (both empty, so the next iteration asks for a fresh query), and then, under
--loop, continue with the next iteration at item 3.1 above, or, without--loop, immediately STOP processing the entire current skill: -
Convert the fresh into -- the domain-specific, non-implementation-detail information -- and -- the remaining information -- discarding all / content of any previous iteration. Without
--grillor--approachyou MUST NOT ask any clarifying questions and during later implementation just interpret the query best-effort. Do not output anything. -
Expand the following:
-
Set (clear the query, so every further
--loopiteration asks for a fresh one). Do not output anything.
-
-
State: discovering:
-
One single worktree serves the whole skill run: it is prepared once before the first discovery, so discovering, grilling, and implementing all operate on the same tree, and all further
--loopiterations land in it, too.Set . Do not output anything.
-
Check the existing source files for all code which is related to and , and check the architecture of the existing code base to understand the overall structures and dynamics. Do not output anything.
-
Ground the edit, where is
WHAT HOW WHENif is not equalnone, orWHAT HOWotherwise, as under--verify noneno verification takes place: -
Determine the kind of change of the edit:
-
If is
craft,refactor, orresolve: Set toCRAFTING,REFACTORING, orRESOLVINGcorrespondingly. -
Else if is not empty (
autowith a retrieved analyzer issue): Set toRESOLVING, as the edit fixes a reported problem. -
Else (
auto): Infer the from and : set toRESOLVINGif the edit predominantly fixes a defect, set toREFACTORINGif it predominantly re-structures existing artifacts without changing their observable behavior, and set toCRAFTINGotherwise (also the default if the inference stays inconclusive).
Set to
crafting,refactoring, orresolutionfor theCRAFTING,REFACTORING, orRESOLVINGcorrespondingly. Do not output anything. -
-
-
State: grilling:
Enter this state only if or is equal
true; otherwise silently skip the entire state. Do not output anything about the skipping.-
Understand what "grilling" is about:
-
Perform the approach round -- the grilling round 0 before the regular rounds -- based on and plus the information gathered in the discovering state. Set to
GRILLING ROUND 0/<getopt-option-grill-rounds/>if is equaltrue, or toGRILLINGotherwise. Do not output anything.If is
STOP, only output the following and then immediately STOP processing the entire current skill:Otherwise, merge exclusively into , where the chosen approach overrides any conflicting implementation detail, and expand the following:
If is
SKIP, skip all regular rounds below and continue with the implementing state. -
Perform at most grilling rounds, numbered (1-) -- the round count is a maximum only, as every round can stop the grilling early in its item 2 below.
For each round:
-
INITIALIZE TODO:
Explicitly start from scratch from only the current and and forget all information gathered in previous rounds -- except the grounding facts . Set to
GRILLING ROUND <m/>/<getopt-option-grill-rounds/>if is greater than 1 or is equaltrue, or toGRILLINGotherwise (a single round without an approach round needs no round numbering). Do not output anything. -
DETERMINE QUESTIONS:
Raise no questions at all of focus area
REGRESSIONorCONFIRMATION, as under--verify noneno verification takes place which could honor their decisions. Raise no questions at all of focus areaCONFIRMATION, as under--verify lightno change-specific tests take place which could honor their decisions.If is
true, skip the remaining items of this round and all remaining rounds, and continue with the implementing state. -
INTERACTIVE DIALOG:
Treat as the combined free-text answers to all questions of the round and continue with item 4 below. In the following, you MUST NOT use your built-in tool! Instead, you MUST just show a custom dialog according to the expanded
custom-dialogdefinition. You MUST closely follow this definition. The dialog below carries the two fixed answer optionsSKIP GRILLINGandSTOP SKILL, dispatched as follows:-
If a is
SKIP GRILLINGorCANCEL, ask no further questions, continue with item 4 below (merging the answers gathered so far), and after item 5 skip all remaining rounds and continue with the implementing state. -
If a is
STOP SKILL, only output the following and then immediately STOP processing the entire current skill:
Show a custom dialog. Its only answer options are the two fixed ones, so the user normally answers all aspects in one free-text reply:
Dispatch
SKIP GRILLING,STOP SKILL, andCANCELas defined above. Otherwise, strip any leadingOTHER:prefix from and treat the remainder as the combined free-text answers to all questions of the round. -
-
MERGE ANSWERS INTO TODO:
Merge all gathered answers in of the round -- the combined reply -- exclusively back into and . Do not output anything.
-
SHOW UPDATED TODO:
Set to
round <m/>/<getopt-option-grill-rounds/>if is greater than 1 or is equaltrue, or to empty otherwise, and expand the following -- this intentionally closes every round, so the intermediate / states stay visible:
-
-
-
State: implementing:
-
You MUST first forget all previous internalized tenets and then freshly internalize and strictly honor the GENERIC TENETS and the TENETS of the ASE Tenets in the following creation and updating of code. Do not output anything.
-
Apply the edit by modifying the affected artifacts with a corresponding, complete change set, honoring only and plus the information gathered in the discovering state. Also, if a
CHANGELOG.mdfile exists, make an appropriate entry there, too. -
Output only the following . You MUST NOT output a change summary, a list of modified artifacts, a rationale, or a unified diff of the changes -- independent of , whose exposure rules are explicitly overridden here:
-
-
State: verifying:
Enter this state only if is equal
lightorfull. Otherwise (none) you MUST strictly skip the entire state and any verification: do NOT run any build, tests, linter, or type-checker, and do NOT execute the modified program.-
Verify whether the implementation fulfills and , running every command with as its working directory :
-
Under
lightandfull: run the available lint and build commands (including the type-checker) and the already existing regression test suite, if any. -
Under
fullonly: additionally perform individual, change-specific manual tests, which exercise the changed behavior through ad-hoc scratch tests and program runs. Clean up all scratch test files afterwards, so they never become part of the change set.
If the verification fails, you MUST adjust the failing parts of the change set and RE-VERIFY -- for at most ten rounds in total.
-
-
Only output the following , listing one bullet line per remaining failure:
REMAINING FAILURES:
[...]
Only output the following :
-
-
Loop or Finish:
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation | Stars: 318k | Updated | Claude CodeCodex | Unverified | Install |
| requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirements | Stars: 318k | Updated | Claude CodeCodex | Unverified | Install |
| using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback | Stars: 318k | Updated | Claude CodeCodex | Unverified | Install |
| verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always | Stars: 318k | Updated | Claude CodeCodex | Unverified | Install |