@${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
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 (empty). Do not output anything.
If is not a positive integer, only output the following and then immediately STOP processing the entire current skill:
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.
Convert the fresh into -- the domain-specific, non-implementation-detail information -- and -- the remaining information -- discarding all / content of any previous iteration. Without
--grillyou 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:
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 in this state.
State: grilling:
Enter this state only if is equal
true; otherwise silently skip the entire state. Do not output anything about the skipping.Understand what "grilling" is about:
GOAL:
Interactively interviewing the user relentlessly about every essential aspect of the edit query in and until reaching a shared understanding and no major decisions/questions are left open.
This especially means that you MUST clarify as many aspects as necessary to ensure that for at least the most important decisions, during a subsequent implementation, no essential freedom of choice exists any longer.
FOCUS:
Focusing on the following outside-in Focus Areas, in order of descending importance for the grilling operation:
DOMAIN: Aspects affecting domain-specifics. These aspects MUST be clarified, as they are about the "what" of the solution and they non-technically shape the solution noticeably.
INTERFACE: Aspects affecting externally observable behavior or interfaces, especially aspects about user (UI) and machine (API) interfaces. These aspects MUST be clarified, as they are externally visible and shape the boundary of the solution.
ARCHITECTURE: Aspects affecting software and system architecture, especially decisions on structure, wiring, placement, or dependencies. These aspects SHOULD be clarified, as they technically shape the solution noticeably.
IMPLEMENTATION: Aspects affecting any other implementation details, especially how the edit query is realized in the code base. These aspects CAN be clarified, as they shape technical inner details only.
INDICATORS:
Check the following indicators for identifying problematic aspects:
Fuzzy Language: When the user uses vague or overloaded terms instead of a precise or canonical term.
Conflicting Terminology: When the user uses a term that conflicts with the existing terminology in the code base.
Conflicting Code: When the user states how something works, check whether the current code state really agrees.
Non-Concrete Scenarios: When domain relationships are being discussed, stress-test them with specific scenarios. Theoretically invent realistic scenarios that probe edge cases and force the user to be precise about the boundaries between concepts.
Unspecified Architecture Patterns: When the realization of the functionality is known to be reasonably realizable with more than one decent architecture pattern, but no such pattern was mentioned.
Unspecified Dependencies: When the realization of functionality usually is known to be supported by the use of frameworks or libraries, but no dependencies on such solutions were mentioned.
Perform grilling rounds, numbered (1-).
For each round:
Explicitly start from scratch from only the current and and forget all information gathered in previous rounds. Set to
GRILLING ROUND <m/>/<getopt-option-grill-rounds/>if is greater than 1, or toGRILLINGotherwise (a single round needs no round numbering). Do not output anything.Determine the questions , chosen to resolve the open points related to the above understanding of grilling, by focusing on the mentioned Focus Areas.
For each determine its and a , a 1-2 word hint describing what the question is about. Render in the tables below as
**DOMAIN** (MUST),**INTERFACE** (MUST),**ARCHITECTURE** (SHOULD), or**IMPLEMENTATION** (MAY)correspondingly.Use the format
Shall...?for questions of focus area DOMAIN and INTERFACE, the formatShould...?for questions of focus area ARCHITECTURE, and the formatMay...?for questions of focus area IMPLEMENTATION.In every , encode all literal aspects -- file and directory paths, identifiers, symbols, types, commands, options, configuration keys, and literal values -- with backticks.
Finally, sort the questions by descending focus area order -- first all
DOMAIN, then allINTERFACE, then allARCHITECTURE, and then allIMPLEMENTATIONones -- and renumber according to this order. Truncate the list after a maximum of 10 questions and set to the number of remaining questions. Do not output anything.For all remaining , check the code base and your world knowledge to find two to four grounded answer alternatives with a brief label and a description which reflects the current / understanding by prefixing its description with
✻ **CURRENT** ✻. Assemble a out of**<answer-N-1-label/>**: <answer-N-1-description/> ─◇─ **<answer-N-2-label/>**: <answer-N-2-description/> ─◇─ [...].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 6 below (merging the answers gathered so far), and after item 7 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:
Output only the following -- it lists all questions of the round up-front, one table row per aspect, so the subsequent dialog only has to ask for the combined answer. Align all column edges of the table. If is equal
1, omit the leading<round-id/>line:ASPECT FOCUS AREA TOPIC QUESTION ┈─▶ ANSWERS 1/ ┈─▶ 2/ ┈─▶ [...] [...] [...] [...] 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 all gathered answers of the round -- the combined reply -- exclusively back into and . Do not output anything.
Set to
round <m/>/<getopt-option-grill-rounds/>if is greater than 1, or to empty otherwise, and expand the following -- this intentionally closes every round, so the intermediate / states stay visible:
State: implementing:
Determine the tenet(s) set to internalize:
If is
craft,refactor, orresolve: Set toCRAFTING,REFACTORING, orRESOLVINGcorrespondingly.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).
You MUST then 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.
One single worktree serves the whole skill run: it is created once before the first change set is applied, and all further
--loopiterations land in it, too.Set to a unique name, derived from , which consists of two lower-case words concatenated with a
-character. Do not output anything.Determine the worktree directory by calling the
ase_worktree_path(id: "<worktree-name/>", create: true)tool of theaseMCP server and capturing its output into . You MUST NEVER assemble this path yourself. If this tool call fails, only output the following and then immediately STOP processing the entire current skill, leaving the working copy untouched:Determine the existing worktrees and existing branches by running the commands
git worktree list --porcelainandgit branch --list(taken exactly as given) and capturing their outputs. If the worktree directory or the branch already exists, only output the following and then immediately STOP processing the entire current skill, leaving the existing worktree, its branch, and the working copy untouched:Create the worktree by running the command
git worktree add "<worktree-dir/>"(taken exactly as given), which creates the directory and -- named after its last path component -- the branch fromHEAD. If this command fails, only output the following and then immediately STOP processing the entire current skill, leaving the working copy untouched:Only output the following :
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
true. Otherwise 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 by running available verification commands (build, tests, linter, type-checker)
If the verification fails, you MUST adjust the failing parts of the change set and RE-VERIFY until the verification passes!
Only output the following :
Loop or Finish: