Review software architecture, including package cohesion and inter-package coupling
日本語の概要は準備中です。原文の説明を表示しています。
Integrate the change set or implementation draft of the current or given task plan into its target. Use when the user calls to "deliver" or "apply" the change set or draft of the "task" or "plan". For merging a plain Git branch, use `ase-repo-merge` instead.
インストール方法を見るインストールする前に、エージェントに与えられる指示の中身を確認できます。
@${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
<purpose name="ase-task-integrate"> Integrate a Task Change Set </purpose><expand name="getopt" arg1="ase-task-integrate" arg2="--next|-n=(none|DONE|DELETE)... --worktree|-w= --changeset|-c= --draft|-d --target|-t= --mode|-m=(merge|rebase|squash) --no-cleanup|-K --stateless|-S --int-reuse-task"> $ARGUMENTS </expand>
<objective> *Integrate* the change set of the task plan from its *changeset* location into its *target* through a Git merge. </objective>@${CLAUDE_SKILL_DIR}/../../meta/ase-format-task.md @${CLAUDE_SKILL_DIR}/../../meta/ase-common-task.md @${CLAUDE_SKILL_DIR}/../../meta/ase-common-changeset.md
<define name="integrate-temp-remove"> If <temp-dir/> is not empty, remove the temporary worktree and branch by running the commands `git worktree remove --force "<temp-dir/>"`, `git worktree prune`, and `git branch -D "<temp-branch/>"` (taken exactly as given), ignoring any failure, and set <temp-dir></temp-dir> (empty). Do not output anything. </define>Determine Task:
Set <instruction><getopt-arguments/></instruction> initially, with any leading and trailing whitespace stripped, and set <temp-dir></temp-dir> (empty). Inherit the always existing <ase-task-id/> from the current context. Inherit the always existing <ase-session-id/> from the current context. Do not output anything.
React on task id:
<expand name="task-react-id" arg1="ase-task-integrate"></expand>
Resolve the draft shorthand: if <getopt-option-draft/> is true
and <getopt-option-changeset/> is not empty, only output the
following <template/> and then immediately STOP processing the
entire current skill:
Otherwise, if <getopt-option-draft/> is true, set
<getopt-option-changeset>attachment:draft</getopt-option-changeset>,
so the implementation draft in the attachment draft of the
plan is delivered. Do not output anything.
Determine Operation:
Determine the current task plan content:
<expand name="task-load-content"></expand>
If the <task-content/> is still empty, complain and tell the user to
use the ase-code-resolve, ase-code-refactor, ase-code-craft,
or ase-task-edit skills first to create a task plan, and
ase-task-implement to create its change set. Then immediately
stop processing this skill.
Prepare Changeset and Target:
The changeset (location of the change set) and the target
(place of integration) are controlled by the Changeset: and
Target: frontmatter keys of the plan, which the --changeset and
--target options override ad-hoc without changing the plan.
The worktree value of the changeset refers to the context
worktree, selected by the --worktree option, the worktree value
of the target (and of the source it may refer to) to the origin
working copy the skill was started in (both are the same without
--worktree). An integration never creates a context worktree.
Set <task-changeset/> to <getopt-option-changeset/> if it is not
empty, otherwise to the value of the Changeset: frontmatter key
of <task-content/>, or to the configured default
<ase-project-task-default-changeset/> if the key is absent, and
parse it:
<expand name="changeset-value" arg1="Changeset" arg2="<task-changeset/>" arg3="`worktree`, `branch`, `attachment`" arg4="◉ task: **<ase-task-id/>**"></expand>
Set <changeset-type><value-type/></changeset-type> and <changeset-name><value-name/></changeset-name>.
Otherwise, prepare the context worktree:
<expand name="changeset-context" arg1="<getopt-option-worktree/>" arg2="◉ task: **<ase-task-id/>**" arg3="false" arg4="false"></expand>
Set <task-target/> to <getopt-option-target/> if it is not
empty, otherwise to the value of the Target: frontmatter key of
<task-content/>, or to the configured default
<ase-project-task-default-target/> if the key is absent, and parse
it:
<expand name="changeset-value" arg1="Target" arg2="<task-target/>" arg3="`worktree`, `branch`, `source`" arg4="◉ task: **<ase-task-id/>**"></expand>
Set <target-type><value-type/></target-type> and
<target-name><value-name/></target-name>. If <target-type/> is
source, the target is whatever the Source: frontmatter key of
<task-content/> refers to (or the configured default
<ase-project-task-default-source/> if the key is absent):
set <task-target/> to this value and parse it:
<expand name="changeset-value" arg1="Source" arg2="<task-target/>" arg3="`worktree`, `branch`" arg4="◉ task: **<ase-task-id/>**"></expand>
Set <target-type><value-type/></target-type> and <target-name><value-name/></target-name>.
Determine the target branch <target-branch/>: if <target-type/>
is worktree, capture the output of the command
git -C "<origin-dir/>" branch --show-current, otherwise set it
to <target-name/>. If <target-branch/> is empty (detached HEAD)
or the command
git rev-parse --verify --quiet "refs/heads/<target-branch/>"
fails, only output the following <template/> and then
immediately STOP processing the entire current skill:
Determine the merge source branch <merge-source/> according to <changeset-type/>:
worktree: Capture the output of the command
git -C "<context-dir/>" branch --show-current into
<merge-source/>. If it is empty (detached HEAD), only output
the following <template/> and then immediately STOP
processing the entire current skill:
branch: Set <merge-source><changeset-name/></merge-source>.
If the command
git rev-parse --verify --quiet "refs/heads/<merge-source/>"
fails, only output the following <template/> and then
immediately STOP processing the entire current skill:
attachment: The change set is materialized on a temporary
branch at the commit it is based on, so that the merge below
can resolve any drift of the target semantically.
<if condition="the backmatter of <task-content/> contains NO attachment block with the Type key value text/x-diff; charset=utf-8; kind="<changeset-name/>"">
Only output the following <template/>, directly followed
by the hint, and then immediately STOP processing the
entire current skill:
Set <temp-base/> to the commit of the base <commit/>
value of the Desc: key of this attachment block. If
the key is absent or the command
git rev-parse --verify --quiet "<temp-base/>^{commit}"
fails, set <temp-base><target-branch/></temp-base>
instead.
Set <temp-hash/> to the first 8 characters of the output
of the ase_mint(type: "sha1", hint: "<ase-task-id/>:<changeset-name/>:integrate") tool of the
ase MCP server, which keeps <temp-id/> unique per task
and attachment. Set <temp-id/> to <ase-task-id/> with all
characters other than A-Z, a-z, 0-9, _, and -
stripped, followed by
-<changeset-name/>-integrate-<temp-hash/>, and set
<temp-branch>ase-integrate/<temp-id/></temp-branch>.
Determine <temp-dir/> by calling the ase_worktree_path(id: "<temp-id/>", temp: true, create: true) tool of the ase
MCP server, which places it into the namespace of the
temporary worktrees, disjoint from all other worktrees.
You MUST NEVER assemble this path yourself.
Otherwise, remove any leftover of an earlier run which stopped before its cleanup by expanding the following, and then determine <temp-dir/> once again the same way:
<expand name="integrate-temp-remove"></expand>
Create the temporary worktree and branch by running the
command
git worktree add -b "<temp-branch/>" "<temp-dir/>" "<temp-base/>"
(taken exactly as given), and apply the Data payload of
the attachment block inside it verbatim. As this payload
is elided in <task-content/>, fetch it via the
ase_task_attachment(id: "<ase-task-id/>", type: "text/x-diff; charset=utf-8; kind=\"<changeset-name/>\"") tool of the ase
MCP server, whose text output field is the payload
verbatim (without any indentation), and apply it, e.g. via
git -C "<temp-dir/>" apply --3way, re-applying hunks
which no longer apply manually. You MUST NEVER modify
anything outside of <temp-dir/>. Leave the change set
uncommitted, as the merge below commits it. Set
<merge-source><temp-branch/></merge-source>.
If any of these sub-steps fails, expand the following:
<expand name="integrate-temp-remove"></expand>
Then only output the following <template/> and then immediately STOP processing the entire current skill, leaving the task plan untouched:
<template> ⧉ **ASE**: ◉ task: **<ase-task-id/>**, ▶ ERROR: change set attachment **<changeset-name/>** failed to materialize </template>Check that the change set can be delivered at all. Determine the
change set directory <merge-dir/>: for <changeset-type/>
worktree it is <context-dir/>, for attachment it is
<temp-dir/>, and for branch it is the directory of the
registered worktree in which <merge-source/> is checked out
according to git worktree list --porcelain (or empty if there
is none). Do not output anything, except for the templates
below.
<expand name="integrate-temp-remove"></expand>
<template> ⧉ **ASE**: ◉ task: **<ase-task-id/>**, ▶ ERROR: change set and target are the same branch **<target-branch/>** </template> <ase-tpl-hint level="minimal"> Use `--target branch:<name>` to select a different target branch. </ase-tpl-hint> </if><elseif condition="the command git rev-list --count "<target-branch/>..<merge-source/>" reports 0 and either <merge-dir/> is empty or the command git -C "<merge-dir/>" status --porcelain reports no output">
The change set carries neither commits beyond the target nor
uncommitted changes, so an integration would report a
success without delivering anything. Expand the following,
then only output the following <template/> and then
immediately STOP processing the entire current skill,
leaving the plan and the artifacts untouched:
<expand name="integrate-temp-remove"></expand>
<template> ⧉ **ASE**: ◉ task: **<ase-task-id/>**, ▶ ERROR: nothing to integrate -- change set **<task-changeset/>** carries no changes beyond target **<target-branch/>** </template> </elseif>Integrate Change Set:
Capture the outputs of the commands
git rev-parse "refs/heads/<target-branch/>" and
git rev-parse "refs/heads/<target-branch/>^{tree}" into
<target-before/> and <target-tree-before/>, the target branch
and its content before the merge. Do not output anything.
Set <merge-args>--target "<target-branch/>" --mode "<getopt-option-mode/>"</merge-args>,
which passes the merge mode (merge, rebase, or squash)
through. If <changeset-type/> is attachment, or
<getopt-option-no-cleanup/> is not equal true, append
--cleanup to <merge-args/>, so the merged source branch (and
its worktree) is removed afterwards. Then merge the change set by
invoking the ase-repo-merge skill, which commits still
uncommitted changes of the source branch, resolves merge
conflicts semantically, and checks that the source branch landed:
Set <merge-verdict/> to the MERGE VERDICT reported by the
ase-repo-merge skill in <merge-result/> (MERGED,
CONFLICT, or FAILED), or to FAILED if it reported none.
<if condition="<merge-verdict/> is MERGED and the output of the command git rev-parse "refs/heads/<target-branch/>^{tree}" equals <target-tree-before/>">
The merge succeeded, but the content of the target is unchanged,
as the change set already landed earlier (e.g. on a repeated
integration), so nothing was delivered: set
<merge-verdict>NOOP</merge-verdict>. Capture the output of the
command git rev-parse "refs/heads/<target-branch/>" into
<target-after/>, and if it differs from <target-before/> and the
output of the command
git rev-parse "refs/heads/<target-branch/>^1" equals
<target-before/>, drop the resulting empty commit by running
the command
git update-ref "refs/heads/<target-branch/>" "<target-before/>" "<target-after/>"
(taken exactly as given), which leaves the index and working tree
of the target intact, as their content is unchanged. Do not
output anything.
</if>
If <changeset-type/> is attachment, expand the following:
<expand name="integrate-temp-remove"></expand>
Update the frontmatter and backmatter of <task-content/> as follows, but persist them only if anything changed:
The Modified: key stays untouched, as the "body" is not
changed. Apart from the above, the plan MUST stay exactly as
loaded. To persist the plan, call the ase_task_save(id: "<ase-task-id/>", text: "<task-content/>") tool of the ase
MCP server. 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. Do not
output anything in this sub-step.
Decide Next Step:
Determine next step:
<expand name="task-next-select" arg1="ase-task-integrate" arg2="DONE|DELETE"> Next Step: How would you like to proceed with the plan? DONE: Stop processing and PRESERVE task plan. DELETE: Stop processing and DELETE the task plan. </expand>
Check the tool <result/> and dispatch accordingly:
If <result/> is DONE or CANCEL:
Only output the following <template/> and then STOP.
If <result/> is DELETE:
Set <args></args> (empty). Do not forward any remaining
--next list tokens, because the ase:ase-task-delete
skill accepts only an optional [<id>] argument and no
--next option; remaining tokens are intentionally discarded.
Only output the following <template/> and then call the
tool Skill(skill: "ase:ase-task-delete", args: "<args/>")
to invoke the ase:ase-task-delete skill in order to
delete the updated plan. Immediately stop processing the
current skill once the Skill tool was used.
まだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
Review software architecture, including package cohesion and inter-package coupling
日本語の概要は準備中です。原文の説明を表示しています。
Discover additional, third-party components (libraries/frameworks) for the technology stack to provide needed functionality.
日本語の概要は準備中です。原文の説明を表示しています。
Analyze the source code for problems in either the logic and semantics and its related control flow, performance and efficiency, or security.
日本語の概要は準備中です。原文の説明を表示しています。
Craft Source Code: Use when user wants to "create", "add", or "craft" a new feature from scratch.
日本語の概要は準備中です。原文の説明を表示しています。
Edit Source Code: Use when the user wants to "edit" the code base in one shot from a query or a bare analyzer issue id like "P1", fusing crafting, refactoring, and resolving with optional grilling, verification, looping, and Git worktree isolation.
日本語の概要は準備中です。原文の説明を表示しています。
Explains code with WHAT, WHY, ANALOGY, DIAGRAM, CRUXES, and GOTCHAS. Use when you want to know how code works or when the user asks "how does this work?"
日本語の概要は準備中です。原文の説明を表示しています。