@${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-format-meta.md @${CLAUDE_SKILL_DIR}/../../meta/ase-format-spec.md @${CLAUDE_SKILL_DIR}/../../meta/ase-tenets.md @${CLAUDE_SKILL_DIR}/../../meta/ase-common-grill.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 SPEC artifacts the edit actually demands -- the
kinds CODE, DOCS, TASK, INFR, and OTHR are never touched.
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:
Resolve the
SPECartifacts by calling thease_artifact_list(kind: [ "spec" ])tool of theaseMCP server once and reading the returnedartifactsarray of{ kind, files }objects to obtain the project-relative file list. Do not output anything.Read the SpecBook SCHEMA Model of the project (resolved as described in
ase-format-spec.md) to learn the allowed object kinds, properties, nestings, and value constraints. Do not output anything.Read all resolved
SPECartifacts which are related to and , and check the structure of the existing specification -- its artifacts, object kinds, ids, properties, descriptions, and[[xxx]]references -- to understand the overall models and their relationships. Do not output anything.
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:
Perform grilling rounds, numbered (1-).
For each round:
INITIALIZE TODO:
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 QUESTIONS:
Determine the questions, comprised of a round-local id of
Q<N/>-- where restarts at1in every round, independent of the numbering of previous rounds --, and a very brief but precise question text . Each question is chosen to resolve the open points related to the above understanding of grilling, by focusing on the mentioned Focus Areas.For use the format
Shall...?for questions of focus areaDOMAINandINTERFACE, the formatShould...?for questions of focus areaARCHITECTURE, and the formatMay...?for questions of focus areaIMPLEMENTATION.In every , encode all literal aspects -- file paths, artifact ids, object kinds, object ids, property keys, references, and literal values -- with backticks.
Keep every at most 200 characters long -- compact the text until it fits --, as a longer question overflows its table cell and silently degrades the entire table into a plain text rendering.
DETERMINE CONTEXT:
For each question, determine its focus area from the mentioned Focus Areas, a 1-3 word hint , describing what the question is about, and a , describing how important this question is.
Set to
DOMfor ofDOMAIN,IFCfor ofINTERFACE,ARCfor ofARCHITECTURE, andIMPfor ofIMPLEMENTATION.SORT QUESTIONS:
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, starting at1. Truncate the list after a maximum of 10 questions and set to the number of remaining questions. Do not output anything.Finally, assemble the out of
**<question-N-id/>** ▶ **<context-N-id/>** ▷ **<context-N-topic/>**: <question-N-text/>.DETERMINE ANSWERS:
For all remaining , check the specification and your world knowledge to find two to three grounded answer alternatives with a question-local id of
A<K/>-- where restarts at1for every question, independent of the numbering of other questions --, a 1-3 word label , and an ultra brief description of at most 10 words. For the answer which reflects the current / understanding, append⚑to its .Assemble an out of
**<answer-N-1-id/>** ▶ **<answer-N-1-label/>**: <answer-N-1-description/>, **<answer-N-2-id/>** ▶ **<answer-N-2-label/>**: <answer-N-2-description/>[, ...].Keep every assembled at most 240 characters long -- drop the least relevant alternative and compact the descriptions until it fits -- as a longer answer overflows its table cell and silently degrades the entire table into a plain text rendering.
INTERACTIVE DIALOG:
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 7 below (merging the answers gathered so far), and after item 8 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.
In every table cell you MUST escape each literal pipe character outside a code span as
\|and you MUST open and close every backtick code span within the same cell -- an unescaped pipe or an unbalanced backtick run splits the cell and silently degrades the entire table into a plain text rendering:QUESTION ANSWERS [...] [...] Legend: DOM: Domain (MUST), IFC: Interface (MUST), ARC: Architecture (SHOULD), IMP: Implementation (MAY) Qn: round-local question id, An: question-local answer id, ⚑: current decision state
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 CURRENT TODO:
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:
You MUST first forget all previous internalized tenets and then freshly internalize and strictly honor the GENERIC TENETS and the SPECIFYING TENETS of the ASE Tenets in the following creation and updating of specification content. 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 :
Call the
ase_timestamp(format: "yyyy-LL-dd HH:mm")tool of theaseMCP server once to find out the current time and store it in . Do not output anything.Apply the edit by modifying the affected
SPECartifacts with a corresponding, complete change set, honoring only and plus the information gathered in the discovering state.The change set MUST keep every touched artifact conformant to the
SPECformat contract (ase-format-spec.md): theCreated:/Modified:frontmatter block, the heading levels, the Complex/Concise/Grouped format variants, the schema-allowed object kinds, nestings, and property keys, the object ids and{{<id/>}}anchors, the, BECAUSErationale split, and the[[xxx]]references.Generate a
SPECartifact which does not yet exist but is warranted by the edit, using for both itsCreated:andModified:timestamps. Whenever an existing artifact is changed and carries aModified: <timestamp-modified-old/>line, replace this withModified: <timestamp-modified/>.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 validate the specification at all and do NOT run any build, tests, linter, or type-checker.Validate the specification and capture its array of
{ file, line, column, message }objects:If is not empty, fix the reported problems in the affected
SPECartifacts via theEdit/Writetools and re-validate as in item 7.1 -- for at most three rounds in total.Only output the following , listing one bullet line per remaining diagnostic:
REMAINING DIAGNOSTICS:
<file/>:<line/>:<column/>: [...]
Only output the following :
Loop or Finish: