Skip to content

rse/ase / plugin/skills/ase-task-edit

ase-task-edit

Unverified

Iteratively edit and refine a named plan for a task through a conversational loop. A new plan is optionally composed along the chosen one of several proposed crafting, refactoring, resolution, or specification approaches. Each round, the current plan is shown and the user is asked whether to keep refining, mark the plan as done, or proceed to the implementation or draft. Use when the user wants to plan a task purely through chat-driven refinement, or wants a plan to "craft" a new feature, "refactor" the code base, or "resolve" a problem (also from a bare analyzer issue id like "P1").

@${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-task.md @${CLAUDE_SKILL_DIR}/../../meta/ase-format-meta.md @${CLAUDE_SKILL_DIR}/../../meta/ase-common-task.md @${CLAUDE_SKILL_DIR}/../../meta/ase-common-grill.md @${CLAUDE_SKILL_DIR}/../../meta/ase-common-approach.md @${CLAUDE_SKILL_DIR}/../../meta/ase-common-ground.md @${CLAUDE_SKILL_DIR}/../../meta/ase-tenets.md

Procedure

Set true.

  • If is craft, refactor, resolve, or specify: Set to CRAFTING, REFACTORING, RESOLVING, or SPECIFYING correspondingly, and set true.

  • Else if is not empty (auto with a retrieved analyzer issue): Set to RESOLVING, as the refinement fixes a reported problem, and set true.

  • Else (auto): Set to the value of the Kind: frontmatter key of (or, if it is absent or invalid, infer it from the plan content, defaulting to CRAFTING), and set false.

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 refinement of the plan. Do not output anything.

Treat the as a refinement instruction for the plan, and update in-place by applying the requested to the plan, preferring the grounding facts (if any) over the world knowledge of the model.

When refining the plan this way, preserve the overall structure of the plan and only modify what the user actually requested. Do not rewrite unrelated sections of the plan.

Attachment blocks of the "backmatter" are never dropped by a refinement, unless the explicitly asks for it. Their Data payloads are elided to [elided: <n/> lines] markers, which you MUST keep verbatim, as ase_task_save restores them. Only if the requires reading or changing the payload of an attachment, fetch it via the ase_task_attachment(id: "<ase-task-id/>", type: "<type/>") tool of the ase MCP server (with being the value of its Type key), and replace its marker with the complete changed payload as a |4+ (or |4-) literal block scalar according to the plan . Remember every attachment block whose content the applied changed as touched, so its Modified key is refreshed together with the frontmatter in step 3.1. An attachment the did not change stays verbatim -- an implementation draft attachment (Type key value text/x-diff; charset=utf-8; kind="draft", from ase-task-implement --draft) hence turns stale through a "body" change by its Modified key falling behind the frontmatter, which step 3.3 reports.

Set true.

Determine the kind of change of the new plan:

  • If is craft, refactor, resolve, or specify: Set to CRAFTING, REFACTORING, RESOLVING, or SPECIFYING correspondingly.

  • Else if is not empty (auto with a retrieved analyzer issue): Set to RESOLVING, as the plan fixes a reported problem.

  • Else (auto): Infer the from the : set to SPECIFYING if the plan predominantly creates or revises the statements of the SPEC artifacts, set to RESOLVING if it predominantly fixes a defect, set to REFACTORING if it predominantly re-structures existing artifacts without changing their observable behavior, and set to CRAFTING otherwise (also the default if the inference stays inconclusive).

Set to specification, resolution, refactoring, or crafting for the SPECIFYING, RESOLVING, REFACTORING, or CRAFTING correspondingly. 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 composition of the plan. Do not output anything.

Investigate and figure out details related to the problem of the and report them with the following :

PROBLEM DETAILS: ● [...] ● [...] ● [...]

Hints:

  • Give a short one-sentence of the problem plus a short excerpt of the affected code .

  • Give a short one-sentence of the problem plus precise but brief code processing information to understand the problem. Try to keep the number of bullet points (●) in the range of 1-4.

  • In case of a complex context situation with complex structure (layout, components, dependencies, etc.), complex control flow (branching, concurrency, etc.), complex state machine (states, transitions, etc.), complex data flow (actors, messages, etc.), or complex data structure (classes, entities, relationships, etc.), visualize it with an optional diagram by building a Mermaid specification (e.g. flowchart TB, stateDiagram-v2, sequenceDiagram, classDiagram, or erDiagram, depending on intent) and rendering it according to the Diagrams rule of the skill conventions. Omit entirely for simple or purely local situations.

Set GRILLING. Do not output anything.

If is STOP, only output the following and then immediately STOP processing the entire current skill:

Call the ase_timestamp(format: "yyyy-LL-dd HH:mm") tool of the ase MCP server and use the text field of its response for fresh and information. Then insert the current , , and information -- except for the OVERWRITE under a focus above, which keeps the Created: key. Set true.

  1. Determine Task and Instruction:

    1. Set initially. Set (empty), false, false, (empty), and task inherited. Inherit the always existing from the current context. Inherit the always existing from the current context. Do not output anything.

      Set false. The band of --interactive is drawn by the function hooks module of the plugin, which provides the mcp__ase__ase_task_band tool in an interactive terminal only. Load the schema of this tool (if deferred, via ToolSearch with the query select:mcp__ase__ase_task_band). If this tool does not exist, only output the following and then immediately STOP processing the entire current skill:

    2. Resolve a potential analyzer issue:

      The may be a bare issue identifier (like P1, T1, or <prefix>-P1) previously produced by ase-code-analyze or ase-arch-analyze. Call the ase_kv_get(key: "ase-issue-<candidate/>") tool of the ase MCP server to retrieve the persisted problem description. If the returned text is non-empty:

      1. Set and .

      2. If is given, set and task given, and call the ase_task_id(id: "<ase-task-id/>", session: "<ase-session-id/>") tool from the ase MCP server to switch the task.

      3. Only output the following :

      Otherwise, keep unchanged, so it is treated as a task id resp. as an instruction below. Do not output anything.

    3. React on task and/or instruction:

      1. Set (set task id to instruction) and (set instruction empty), call the ase_task_id(id: "<ase-task-id/>", session: "<ase-session-id/>") tool from the ase MCP server to switch the task, and then only output the following :

      2. Set (set instruction to empty) and (set task id to id) and call the ase_task_id(id: "<ase-task-id/>", session: "<ase-session-id/>") tool from the ase MCP server to switch the task, and then only output the following :

      3. Set (set instruction to text) and (set task id to id) and call the ase_task_id(id: "<ase-task-id/>", session: "<ase-session-id/>") tool from the ase MCP server to switch the task, and then only output the following :

      4. Only output the following , where is task given if step 1.2 switched the task:

      5. Only output the following :

  2. Determine Plan:

    1. Determine any existing plan content:

      Set to the text argument of the most recent ase_task_save(id: '<ase-task-id/>', ...) tool call -- this is the authoring form of the plan and MUST NOT be confused with the text output field of that call -- without calling ase_task_load again. Set (set the rendering-prepared plan to empty, as it is re-derived in step 3.2 or 3.3). Set to the content enclosed in the <task-plan-tag> delimiter line of the text output field of that ase_task_save tool call (the entity tag of the plan as saved by it). Set plan reused. Do not output anything. Call the ase_task_load(id: "<ase-task-id/>", variant: "both", tag: true) tool of the ase MCP server to load any existing plan content in both of its forms, with the payloads of all attachments elided to [elided: <n/> lines] markers (the default of its attachments argument). From the text output field of this ase_task_load tool call, set to the content enclosed in the <task-plan-source> delimiter lines (the authoring form, the only form which is ever edited and persisted), set to the content enclosed in the <task-plan-render> delimiter lines (the rendering-prepared form, used for display only), and set to the content enclosed in the <task-plan-tag> delimiter line (the entity tag of the loaded plan, or empty if absent, as no plan exists yet). The delimiter lines themselves are never part of any form. Do not output anything related to this MCP tool call. Set plan loaded.

      Set false.

      • If starts with ERROR: or WARNING:: Silently ignore the MCP error. Set to empty. Set to empty. Do not output anything.

      • If starts NOT with ERROR: and NOT with WARNING:: Set (set task content to text). Only output the following :

    2. **No plan content yet. What is the task you want to plan?**

      Then set to the response of the user and only output the following :

    3. Call the ase_task_newid(title: "<title/>", proposal: "<proposal/>") tool from the ase MCP server, where is a brief title summarizing and is a task id derived from , which consists of two lower-case words concatenated with a - character, and set to the id field of its response -- the tool derives the id according to the task id scheme of the project, so you MUST NEVER assemble it yourself. Then call the ase_task_id(id: "<ase-task-id/>", session: "<ase-session-id/>") tool from the ase MCP server to switch the task, set (empty, as no plan exists yet under the new id) and true, and only output the following :

    4. Determine previous-plan handling:

      • If matches the regex ^(OVERWRITE|REFINE|PRESERVE)$: Honor the pre-selection of what to do with the previous plan. Set .

      • If is equal to none:

        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:

      Check the tool and dispatch accordingly:

      • If is CANCEL or PRESERVE:

        Only output the following and then immediately STOP processing this skill:

      • If is OVERWRITE:

        Only output the following and continue processing:

      • If is REFINE:

        Only output the following and continue processing:

      • If matches OTHER: <text/>:

        Set (append the user's free-text hint to the existing instruction).

        Only output the following and continue processing:

    5. Only output the following and continue processing:

  3. Iterative Plan Refinement Loop:

    REPEAT the following steps from 3.1 up to and including 3.4 in a LOOP until the user selects DONE, GRILL, IMPLEMENT, or DRAFT, or declines/cancels in the dialog of step 3.4:

    1. Update timestamp: Update with the current time in ISO-style format, which has to be determined by calling the ase_timestamp(format: "yyyy-LL-dd HH:mm") tool of the ase MCP server and using the text field of its response. If the frontmatter of carries a Modified: key and the refinement changed the "body" (not only frontmatter keys or attachments), update it with the new value, as the key tracks "body" changes only. Then set the Modified: key of every attachment block touched by the refinement (see apply-refinement) to the very same value -- creating the key at its position in the key order of the plan if the block does not carry it yet -- and forget the touched marks again, so a changed attachment never falls behind the frontmatter. Do not output anything.

    2. Persist plan: Call the ase_task_save(id: "<ase-task-id/>", text: "<task-content/>", render: true, tag: true) tool of the ase MCP server -- if is not empty, additionally with the argument base: "<task-tag/>", so a change of the plan made meanwhile by anybody else is merged (instead of silently overwritten), and the save is refused only if that change touched the same parts (then output the error message and stop), and if is empty (no plan existed yet), additionally with the argument create: true, so the save is refused if the plan was created meanwhile by anybody else -- to persist the current plan -- always is the authoring form of the plan and hence is persisted as is -- and then set false again. If this call fails because the task already exists and is true (a concurrent session took the allocated id), allocate and switch to a new exactly as in step 2.3, set the Id: frontmatter key of to it, and save again. This ase_task_save MCP tool call is the only permitted way to persist the plan -- NEVER write the plan file via Write/Edit or by executing a shell command. Finally, always set to the content enclosed in the <task-plan-tag> delimiter line of the text output field of this ase_task_save tool call (the entity tag of the just-saved plan, to be passed as base on the next save of every subsequent loop round), and set to the remaining text output field of this ase_task_save tool call (without this delimiter line) -- the rendering-prepared form of the just-persisted plan, which is for display only and MUST NOT be confused with the text argument passed into that call -- so the rendering in step 3.3 stays consistent across all loop rounds. Then take over the Effort: key as stored into the authoring form, as the task store stamps a key without or drops a stale one on save (see the plan ): set the Effort: frontmatter key of to the one of the frontmatter of (rendered from the stored plan) -- replacing it, creating it at its position in the key order of the plan , or removing it if carries none -- changing nothing else of and leaving untouched. But if the text output field carries a NOTICE: line about a merged change, instead re-load the merged plan exactly as in the <else> branch of step 2.1, i.e., set , , and from a new ase_task_load(id: "<ase-task-id/>", variant: "both", tag: true) tool call. Do not output anything related to these MCP tool calls except the following :

      Then set false, as the allocated id is now taken by the saved plan. If is not empty, call the ase_kv_delete(key: "ase-issue-<issue-id/>") tool of the ase MCP server to remove the now-planned analyzer result from the key/value store and set (empty). Do not output anything related to these steps.

    3. Render plan: If is true, nobody reads the rendering, so silently skip this entire step 3.3 (no MCP tool call and no output at all) and continue with step 3.4.

      Treat as verbatim Markdown.

      For the rendering only, drop the leading frontmatter block -- both --- delimiters and all of their keys -- and instead place the following column-aligned glyph lines before the # TASK: <title/> heading, separated from it by an empty line, omitting the line of every key absent from the frontmatter and always omitting the Type key. The glyph lines MUST stay above the heading, exactly where the frontmatter block sits in the plan file, and MUST NOT be moved below it. This keeps the --- delimiters from rendering as a horizontal rule plus a setext heading. This rewrite is display-only and MUST NOT change or itself:

      Set (empty). For the rendering only, overriding the above, additionally drop the glyph lines, the # TASK: <title/> heading, every ## section whose name is not in , and the entire "backmatter", keeping the remaining sections, including their ## headings, in their plan order, and set to (<names/>), with being the comma-separated names of these remaining sections.

      Only output the following , so the user can read the plan and react to it. Do not truncate, summarize, or partially show the plan, beyond the focus above. Use the following :

      <if condition="the backmatter of contains an attachment block with the Type key value text/x-diff; charset=utf-8; kind="draft" which is stale according to the plan (its Modified key is absent or older than the Modified key of the frontmatter)"> Directly after any rendering, only output the following and then give the corrective hint by expanding the subsequent construct (which, depending on the configured , may expand into nothing and hence emit no output at all):

    4. Determine next step:

      • If is not equal to none: Treat as a comma-separated chronological list of pre-selected next-step tokens. Split it on ,, take the first token as , and store the remaining tokens (joined back with ,, or none if empty) into so subsequent loop iterations or downstream skills can consume the tail.

        • If matches the regex ^(DONE|GRILL|IMPLEMENT|DRAFT)$: Honor the pre-selected token. Set .

          Set (clear the instruction, as any instruction carried in via the arguments was already applied to the plan in step 2 before this loop), so that a later OTHER: <text/> refinement correctly starts from a fresh refinement instruction below.

        • else: Only output the following and then immediately STOP processing the entire current skill:

      • If is equal to none and is true:

        Do not show any dialog. Only output the following , end the current turn, wait for the user input, and store the user input in :

        If , with any leading and trailing whitespace stripped, case-insensitively equals DONE, GRILL, DRAFT, IMPLEMENT, or CANCEL -- exactly the inputs on which the band closes on its own -- set to this upper-case token. Otherwise, set OTHER: , also for an input which merely indicates that the user does not want to proceed, as the band stays open on it.

      • If is equal to none and is not true:

        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:

      Check the tool and dispatch accordingly:

      • If is DONE:

        Break out of the loop, only output the following and then STOP. Do not implement the plan.

      • If is GRILL:

        Break out of the loop. Set --quiet. Set --int-interactive. Set --focus . Set --ground. Only output the following and then call the Skill(skill: "ase:ase-task-grill", args: "<args/>") tool to grill the finalized plan.

      • If is DRAFT:

        Break out of the loop. Set --draft. Only output the following and then call the Skill(skill: "ase:ase-task-implement", args: "<args/>") tool to draft the implementation of the finalized plan.

      • If is IMPLEMENT:

        Break out of the loop. Only output the following and then call the Skill(skill: "ase:ase-task-implement", args: "<args/>") tool to apply the finalized plan.

      • If matches OTHER: <text/>:

        Set (replace existing instruction).

        Finally, only output the following and then continue the loop at step 3.1!

      • If is CANCEL:

        Break out of the loop, only output the following and then STOP. Do not implement the plan.

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 implementationStars: 318kUpdated Claude CodeCodexUnverifiedInstall
requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirementsStars: 318kUpdated Claude CodeCodexUnverifiedInstall
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 fallbackStars: 318kUpdated Claude CodeCodexUnverifiedInstall
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 alwaysStars: 318kUpdated Claude CodeCodexUnverifiedInstall