rse/ase / plugin/skills/ase-task-implement
ase-task-implement
UnverifiedImplement current or given task plan, optionally as an implementation draft attachment only. Use when the user calls to "implement", "realize", "draft", "dry-run", or "test-drive" the "task", "plan", "spec", or "specification".
@${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-common-task.md @${CLAUDE_SKILL_DIR}/../../meta/ase-tenets.md @${CLAUDE_SKILL_DIR}/../../meta/ase-common-code.md @${CLAUDE_SKILL_DIR}/../../meta/ase-common-changeset.md @${CLAUDE_SKILL_DIR}/../../meta/ase-common-ground.md
Procedure
-
Determine Task:
-
Set initially, with any leading and trailing whitespace stripped. Inherit the always existing from the current context. Inherit the always existing from the current context. Do not output anything.
-
React on task id:
-
Resolve the draft shorthand: if is
trueand is not empty, only output the following and then immediately STOP processing the entire current skill:Otherwise, if is
true, set attachment:draft, so the change set lands as the implementation draft in the attachmentdraftof the plan only. Do not output anything.
-
-
Determine Operation:
-
Determine the current task plan content:
-
If the is still empty, complain and tell the user to use the
ase-task-editskill first to create a task plan. Then immediately stop processing this skill. -
Internalize the tenets stated by the plan:
-
-
Prepare Source and Changeset:
The source (code basis) and the changeset (location of the change set) are controlled by the
Source:andChangeset:frontmatter keys of the plan, which the--sourceand--changesetoptions override ad-hoc without changing the plan. Theworktreevalue of the source refers to the origin working copy the skill was started in, theworktreevalue of the changeset to the context worktree, selected by the--worktreeoption (both are the same without--worktree). A context worktree created by--worktreecarries its own branch, which starts at the source, so the source branch itself is never checked out there and stays available as the integration target.-
Set to if it is not empty, otherwise to the value of the
Source:frontmatter key of , or to the configured default if the key is absent, and parse it:Set and .
-
Set to if it is not empty, otherwise to the value of the
Changeset:frontmatter key of , or to the configured default if the key is absent, and parse it:Set and .
<if condition=" is not
attachment:draftand the backmatter of contains an attachment block with theTypekey valuetext/x-diff; charset=utf-8; kind="draft", whoseDesckey carries nomerged <commit/>value"> The plan carries an undelivered implementation draft, which only anattachment:draftchangeset builds upon, so this run ignores it and implements the plan from scratch into . Only output the following , directly followed by the hint, and then continue processing: -
Determine the source commit : if is
worktree, capture the output of the commandgit rev-parse HEAD(the skill runs inside the origin working copy); if it isbranch, capture the output of the commandgit rev-parse --verify --quiet "refs/heads/<source-name/>". If the command fails, only output the following and then immediately STOP processing the entire current skill, leaving the working copy untouched (so a bad source never leaves a context worktree behind): -
Otherwise, prepare the context worktree, whose own branch -- if created together with it -- starts at :
-
Determine the work directory -- the worktree in which the implementation happens -- according to :
-
worktree: The change set stays uncommitted in the context worktree, so set .-
Otherwise, run the command
git switch "<source-name/>", and, if it fails (e.g. because the branch is checked out in another worktree), only output the following and then immediately STOP processing the entire current skill:Otherwise, only output the following :
-
-
branch: The change set is committed onto the branch inside a worktree carrying this branch. Determine the existing worktrees by running the commandgit worktree list --porcelain(taken exactly as given).-
If the branch is checked out in a registered worktree, set to its directory, to its path, and false, as this pre-existing worktree is never removed by this skill. If the command
git -C "<work-dir/>" status --porcelainreports any output, the change set could not be committed separately, so only output the following and then immediately STOP processing the entire current skill: -
Otherwise, set to with every character other than
A-Z,a-z,0-9,_, and-replaced by-, then every run of multiple-reduced to a single-, and finally all leading and trailing-and_removed (e.g.,feature-xforfeature/-x), determine by calling thease_worktree_path(id: "<work-id/>", create: true)tool of theaseMCP server (you MUST NEVER assemble this path yourself), and set .ase/worktree/. If this tool call fails or the directory already exists, only output the following and then immediately STOP processing the entire current skill:If the branch exists according to
git branch --list, create the worktree by running the commandgit worktree add "<work-dir/>" "<changeset-name/>", otherwise create the branch from the source together with the worktree by running the commandgit worktree add -b "<changeset-name/>" "<work-dir/>" "<source-commit/>"(each taken exactly as given). If the command fails, only output the same error as above and then immediately STOP processing the entire current skill. Otherwise, set true and only output the following :
-
-
attachment: The change set is made and verified in a temporary worktree, detached at , and afterwards stored as an attachment of the plan only, leaving all artifacts untouched.-
<if condition="the backmatter of contains an attachment block with the
Typekey valuetext/x-diff; charset=utf-8; kind="<changeset-name/>", whoseDesckey carries nomerged <commit/>value, and which is stale according to the plan (itsModifiedkey is absent or older than theModifiedkey of the frontmatter)"> The change set of a previous run was created for an earlier version of the plan, so building on it would silently carry over changes the plan no longer asks for, and dropping it would leave its[x]and[/]bullet-points unrealized. Only output the following , directly followed by the hint, and then immediately STOP processing the entire current skill, leaving the plan and the artifacts untouched: -
Set to the first 8 characters of the output of the
ase_mint(type: "sha1", hint: "<ase-task-id/>:<changeset-name/>:implement")tool of theaseMCP server, which keeps unique per task and attachment. Set to with all characters other thanA-Z,a-z,0-9,_, and-stripped, followed by-<changeset-name/>-implement-<work-hash/>, and determine by calling thease_worktree_path(id: "<work-id/>", temp: true, create: true)tool of theaseMCP server, which places it into the namespace of the temporary worktrees, disjoint from all other worktrees. You MUST NEVER assemble this path yourself. -
Create the worktree by running the command
git worktree add --detach "<work-dir/>" "<source-commit/>"(taken exactly as given). As it starts at the source commit, uncommitted changes of the source are not carried over. -
<if condition="the backmatter of contains an attachment block with the
Typekey valuetext/x-diff; charset=utf-8; kind="<changeset-name/>", whoseDesckey carries nomerged <commit/>value"> This block carries the change set of a previous run, which realized the[x]and[/]bullet-points. A block whoseDesckey carries amerged <commit/>value was already delivered byase-task-integrate, so it is not re-applied, and the change set of this run starts afresh at the source commit and replaces it below. As itsDatapayload is elided in , fetch it via thease_task_attachment(id: "<ase-task-id/>", type: "text/x-diff; charset=utf-8; kind=\"<changeset-name/>\"")tool of theaseMCP server, whosetextoutput field is the payload verbatim (without any indentation). Re-establish it in the worktree by applying this payload verbatim, e.g. viagit -C "<work-dir/>" apply --3way, and re-apply hunks which no longer apply to a meanwhile drifted source manually. The change set of this run is built on top of it, so the change set captured below is cumulative.
If any of these sub-steps fails, remove the worktree as above (if created by sub-step 4), only output the following , and then immediately STOP processing the entire current skill, leaving the task plan untouched:
-
-
-
-
Create Implementation:
-
Perform a final implementation of the task plan inside by modifying the artifacts with a corresponding, complete change set, following and honoring the task plan in :
Keep every changed
SPECartifact conformant to theSPECformat (structure, object kinds, properties, ids,[[xxx]]references, and theModified:timestamp rule). Read the SpecBook SCHEMA Model of the project (resolved as described inase-format-spec.md) to learn the allowed object kinds, properties, nestings, and value constraints, and resolve theSPECartifacts by running the commandase artifact list --kind speconce with as its working directory and parsing its- <file/>output lines into the file list -- thease_artifact_listtool always resolves against the project working copy and hence MUST NOT be used here. Do not output anything.Set (empty) and (empty). They collect, one entry each, the decisions you take on your own while implementing and whatever ends up waiting for the user.
The implementation is complete or it is not done: you MUST NEVER conclude this step while any point of the task plan is still unimplemented -- not because the change set already grew large, not because the remaining points look secondary or cosmetic, and not because an open question stands in the way. Work through every point of the plan within this single run.
Open questions therefore MUST NOT end the run: whenever the plan leaves a detail undecided or admits several defensible alternatives, decide it yourself -- picking what best fits the surrounding artifacts and the internalized tenets -- and append the decision plus a half-sentence rationale to , instead of asking the user and stopping. Only a genuine blocker, which no defensible assumption can bridge (a missing credential, an inaccessible external system), may leave a point unimplemented; append such a point to instead, naming what remains open and why. Append to as well whatever else now waits for the user once this run ends -- follow-ups you deliberately left out of scope, each with its reason, and results which genuinely need their review.
You MUST skip every bullet-point of in checkbox state
[-](cancelled) or[>](deferred): neither realize its in the change set nor perform its check, and do not count it against the completeness of the change set. Its stays context only, e.g. to understand the other bullet-points.You MUST also skip every bullet-point of in checkbox state
[x](done), as it was already fully resolved by a previous run: neither realize its again nor perform its check again, but do count it as complete for the change set. Its stays context only, too.You MUST treat every bullet-point of in checkbox state
[?](question) exactly like one in state[ ](todo), i.e., as a regular todo, as its grilling question just stayed unanswered: realize its or perform its check.You MUST re-examine every bullet-point of in checkbox state
[/](incomplete), as a previous run resolved it only partially: check which parts of its are not yet realized or verified by the artifacts, and then realize or check only these remaining parts. -
Store the change set according to :
-
worktree: Leave the change set uncommitted in . Do not output anything. -
branch: Stage the change set by running the commandgit -C "<work-dir/>" add --all. If the commandgit -C "<work-dir/>" diff --cached --quietfails (i.e. something is staged), craft a commit in the format<type/>: <summary/>, where is one ofFEATURE,IMPROVEMENT,BUGFIX,UPDATE,CLEANUP, orREFACTORand is a 60-80 character, imperative-mood summary of the task plan without a trailing period, without Markdown formatting, and without any double-quote ("), backtick (`), dollar ($), or backslash (\) characters, and commit the change set by running the commandgit -C "<work-dir/>" commit -m "<message/>". Never addCo-Authored-Bytrailers to commit messages. If the commit fails, treat the change set as not applied successfully. Set false. If is not equaltrue, istrue, and the commit (if any) succeeded, the change set lives on the branch alone, so remove the worktree created by this run by running the commandsgit worktree remove "<work-dir/>"andgit worktree prune(taken exactly as given, never with--force, so a worktree with uncommitted changes is kept), and set true if the removal succeeded. Do not output anything. -
attachment: Capture the cumulative change set into by running the commandsgit -C "<work-dir/>" add --allandgit -C "<work-dir/>" diff --cached --no-color --binary HEAD(taken exactly as given). Then remove the temporary worktree by running the commandgit worktree remove --force "<work-dir/>"(taken exactly as given). Do not output anything.
-
-
Update the checkboxes of the body bullet-points of as follows, changing nothing else of a bullet-point:
-
Set the checkbox of every
DOM,IFC,ARC, andIMPbullet-point to[x]whose was fully realized by the change set, and to[/]whose was realized only partially. Leave the checkbox of every other bullet-point untouched. -
Set the checkbox of every
REGandCONbullet-point to[x]whose check was actually performed and succeeded, and to[/]whose check was performed but succeeded only partially. Leave the checkbox of every other bullet-point untouched -- hence all of them for a plan whose## VERIFICATION (WHEN)section is deliberately omitted. -
The rules above apply to bullet-points in the states
[ ],[?], and[/]alike, so a[?]bullet-point which was not resolved at all stays[?], and a re-examined[/]bullet-point becomes[x]once its remaining parts were resolved, or otherwise stays[/]. -
Leave the checkbox of every skipped
[x]bullet-point untouched, as it was already resolved by a previous run. -
Leave the checkbox of every skipped
[-]and[>]bullet-point untouched, as only the user resolves its cancelled or deferred state.
-
-
Update the frontmatter and backmatter of as follows, creating each of the
Status:andModified:keys the plan does not carry yet at its position in the key order of the plan :-
Refresh the
Modified:key with the current time in ISO-style format, determined by calling thease_timestamp(format: "yyyy-LL-dd HH:mm")tool of theaseMCP server, but only if step 4 changed at least one checkbox, as the key tracks "body" changes only -- a frontmatter-only update leaves it untouched. Set to the resultingModified:key value, or to the current time determined the same way if the key was left untouched.
Apart from the checkboxes, the frontmatter keys, and the change set attachment above, the plan MUST stay exactly as loaded -- in particular, the "backmatter" with its other attachment blocks (including a change set snapshot, which is maintained by the
ase agentagents only) is passed through verbatim.Right before persisting, take over a concurrently stored effort estimation, as the
estimatoragent and thease-task-estimateskill can set theEffort:key while the task is implemented (and the checkbox changes above keep it valid): call thease_task_load(id: "<ase-task-id/>", tag: true)tool of theaseMCP server, set to the content of the trailing<task-plan-tag>delimiter line of itstextoutput field, and set theEffort:frontmatter key of to the one of the loaded plan -- replacing it, creating it at its position in the key order of the plan , or removing it if the loaded plan carries none -- changing nothing else of .Finally call the
ase_task_save(id: "<ase-task-id/>", text: "<task-content/>", base: "<task-tag/>")tool of theaseMCP server to persist the updated task plan (merging a change made meanwhile). If the save is refused because the plan was changed meanwhile in the same parts, repeat the take-over above and the save, at most three times in total, and then save once more with the argumentforce: trueinstead ofbase. Thisase_task_saveMCP tool call is the only permitted way to persist the plan -- NEVER write the plan file viaWrite/Editor by executing a shell command. Do not output anything in this sub-step. -
-
Only output the following :
-
Close the implementation with the boxed summary of what this run left open and what it decided on its own. Both boxes are written in the conversation language and the active persona style, list one entry per line, and are omitted entirely when they carry no content -- a run which implemented every point and took no decision of its own outputs no box at all.
-
Give the closing hint by expanding the following (which, depending on the configured , may expand into nothing and hence emit no output at all):
-
-
Decide Next Step:
-
Determine next step:
Next Step: How would you like to proceed with the plan? DONE: Stop processing and PRESERVE task plan. EDIT: Hand processing off to editing. INTEGRATE: Hand processing off to integration. DELETE: Stop processing and DELETE the task plan.
-
Check the tool and dispatch accordingly:
-
If is
DONEorCANCEL: Only output the following and then STOP. -
If is
EDIT: -
If is
INTEGRATE: Set (empty). If is not empty, append--worktree <getopt-option-worktree/>; if is not empty, append--changeset <getopt-option-changeset/>; if is not empty and theTarget:frontmatter key of (or, if absent, the configured default ) issource, append--target <getopt-option-source/>; and if istrue, append--statelessto , so the integration delivers the very change set just created into the very source it is based on. -
If is
DELETE: Set (empty). Do not forward any remaining--nextlist tokens, because thease:ase-task-deleteskill accepts only an optional[<id>]argument and no--nextoption; remaining tokens are intentionally discarded. Only output the following and then call the toolSkill(skill: "ase:ase-task-delete", args: "<args/>")to invoke thease:ase-task-deleteskill in order to delete the updated plan. Immediately stop processing the current skill once theSkilltool was used.
-
-
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 318k | Updated | Claude CodeCodex | Unverified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 318k | Updated | Claude CodeCodex | Unverified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 318k | Updated | Claude CodeCodex | Unverified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 195k | Updated | Claude CodeCodex | Verified | Install |