ase-spec-edit

SkillDev tools

Edit Specification: Use when the user wants to "edit" the SpecBook-based specification (SPEC) in one shot from a query, with optional grilling, SpecBook validation, looping, and Git worktree isolation.

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the ase-spec-edit skill

What this skill tells your AI

The instructions your AI receives, as published by rse/ase in plugin/skills/ase-spec-edit/SKILL.md and read by ahel’s review.

@${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:

  1. Initialize:

    1. Set (with any leading and trailing whitespace stripped), set and (both empty), and set (empty). Do not output anything.

    2. If is not a positive integer, only output the following and then immediately STOP processing the entire current skill:

  2. Iterate:

    Perform the states (1) querying, (2) discovering, (3) grilling, (4) implementing, and (5) verifying below as one iteration. Without --loop perform exactly one iteration. Under --loop repeat the iteration until the querying state receives a STOP SKILL result. Do not output anything in this item.

  3. State: querying:

      1. In the following, you MUST NOT use your built-in tool! Instead, you MUST just show a custom dialog according to the expanded custom-dialog definition. You MUST closely follow this definition. Its only answer option is the fixed STOP SKILL, so the user normally answers with the edit query in one free-text reply:

      2. If is STOP SKILL or CANCEL, 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.

    1. Convert the fresh into -- the domain-specific, non-implementation-detail information -- and -- the remaining information -- discarding all / content of any previous iteration. Without --grill you MUST NOT ask any clarifying questions and during later implementation just interpret the query best-effort. Do not output anything.

    2. Expand the following:

    3. Set (clear the query, so every further --loop iteration asks for a fresh one). Do not output anything.

  4. State: discovering:

    1. Resolve the SPEC artifacts by calling the ase_artifact_list(kind: [ "spec" ]) tool of the ase MCP server once and reading the returned artifacts array of { kind, files } objects to obtain the project-relative file list. Do not output anything.

    2. 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.

    3. Read all resolved SPEC artifacts 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.

  5. State: grilling:

    Enter this state only if is equal true; otherwise silently skip the entire state. Do not output anything about the skipping.

    1. Understand what "grilling" is about:

    2. Perform grilling rounds, numbered (1-).

      For each round:

      1. 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 to GRILLING otherwise (a single round needs no round numbering). Do not output anything.

      2. DETERMINE QUESTIONS:

        Determine the questions, comprised of a round-local id of Q<N/> -- where restarts at 1 in 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 area DOMAIN and INTERFACE, the format Should...? for questions of focus area ARCHITECTURE, and the format May...? for questions of focus area IMPLEMENTATION.

        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.

      3. 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 DOM for of DOMAIN, IFC for of INTERFACE, ARC for of ARCHITECTURE, and IMP for of IMPLEMENTATION.

      4. SORT QUESTIONS:

        Finally, sort the questions by descending focus area order -- first all DOMAIN, then all INTERFACE, then all ARCHITECTURE, and then all IMPLEMENTATION ones -- and renumber according to this order, starting at 1. 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/>.

      5. 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 at 1 for 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.

      6. 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-dialog definition. You MUST closely follow this definition. The dialog below carries the two fixed answer options SKIP GRILLING and STOP SKILL, dispatched as follows:

        • If a is SKIP GRILLING or CANCEL, 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:

        1. 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:

          QUESTIONANSWERS
          [...][...]

          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

        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, and CANCEL as defined above. Otherwise, strip any leading OTHER: prefix from and treat the remainder as the combined free-text answers to all questions of the round.

      7. MERGE ANSWERS INTO TODO:

        Merge all gathered answers in of the round -- the combined reply -- exclusively back into and . Do not output anything.

      8. 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:

  6. State: implementing:

    1. 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.

    2. One single worktree serves the whole skill run: it is created once before the first change set is applied, and all further --loop iterations land in it, too.

      1. Set to a unique name, derived from , which consists of two lower-case words concatenated with a - character. Do not output anything.

      2. Determine the worktree directory by calling the ase_worktree_path(id: "<worktree-name/>", create: true) tool of the ase MCP 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:

      3. Determine the existing worktrees and existing branches by running the commands git worktree list --porcelain and git 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:

      4. 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 from HEAD. If this command fails, only output the following and then immediately STOP processing the entire current skill, leaving the working copy untouched:

      5. Only output the following :

    3. Call the ase_timestamp(format: "yyyy-LL-dd HH:mm") tool of the ase MCP server once to find out the current time and store it in . Do not output anything.

    4. Apply the edit by modifying the affected SPEC artifacts 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 SPEC format contract (ase-format-spec.md): the Created:/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 , BECAUSE rationale split, and the [[xxx]] references.

      Generate a SPEC artifact which does not yet exist but is warranted by the edit, using for both its Created: and Modified: timestamps. Whenever an existing artifact is changed and carries a Modified: <timestamp-modified-old/> line, replace this with Modified: <timestamp-modified/>.

      Also, if a CHANGELOG.md file exists, make an appropriate entry there, too.

    5. 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:

  7. 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.

    1. Validate the specification and capture its array of { file, line, column, severity, message } objects:

    2. If is not empty, fix the reported problems in the affected SPEC artifacts via the Edit/Write tools and re-validate as in item 7.1 -- for at most three rounds in total.

    3. Only output the following , listing one bullet line per remaining diagnostic:

      REMAINING DIAGNOSTICS:

      • <file/>:<line/>:<column/>: [...]

      Only output the following :

  8. Loop or Finish:

Signals

GitHub stars
52
Forks
5
Last commit
Sep 2026
Advanced
Catalog kind
skill
Gateway key
ase-spec-edit
Source
github.com/rse/ase