Finalize Taskのロゴ

Finalize Task

コミュニティ
etr
finalize-task

Use when a task worktree has passed validation - manually commits, merges, and cleans up, or prepares runner-owned commits and publication. Pass --on-unrelated-failure ignore-and-merge to allow merging a tree validated as PASSED-WITH-WAIVERS (unrelated gates waived with receipts; default stop-and-ask refuses it).

概要

公開者etr
リポジトリgroundwork
スキル名finalize-task
スター
45
フォーク
4
同梱ファイル
指示のみ
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

    etrがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキルFinalize TaskをTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/etr/groundwork/tree/main/skills/finalize-task
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/etr/groundwork.git /tmp/groundwork
mkdir -p .claude/skills
cp -r /tmp/groundwork/skills/finalize-task .claude/skills/finalize-task
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでFinalize Taskを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあると、モデルが自動的にFinalize Taskを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Finalize Taskは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、未使用のスキルにはコストがかかりません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Finalize Task

Finalize one validated task. Use judgment for commit and merge messages. Preserve the worktree and branch whenever state is ambiguous.

Inputs

Accept a task ID, optional --project <name>, and optional --on-unrelated-failure <mode> (stop-and-ask, expand-and-fix, or ignore-and-merge; default stop-and-ask when absent). ignore-and-merge is the only mode that changes finalization behavior here: it authorizes merging a tree whose terminal validation result was Validation PASSED-WITH-WAIVERS (see item 4 below). An invalid mode value → stop with a usage error.

When invoked by the external runner, treat its exact project_root, worktree_path, branch, base_branch, base_head, and validated_head values as authoritative. Missing or inconsistent runner inputs are a failure.

When invoked manually from the task worktree:

  1. Resolve --project directly from the repository's .groundwork.yml; do not depend on or change persisted project selection.
  2. Derive the current registered worktree and checked-out task branch.
  3. Derive the primary worktree and its checked-out base branch.
  4. Treat the current task HEAD as validated_head. If validation did not just pass for this exact tree and working state, stop and ask the user to run validate first. A Validation PASSED-WITH-WAIVERS outcome counts as a pass only when this invocation carried --on-unrelated-failure ignore-and-merge and the terminal validation session's coordinator-owned record contains at least one waiver receipt (failed gate, evidence, causal assessment, path attribution outside the project root, authorizing flag — see ${CLAUDE_PLUGIN_ROOT}/references/validation-session-protocol.md); otherwise it is not a pass: stop and ask. Exception — resume entry: when a resume gate (node ${CLAUDE_PLUGIN_ROOT}/lib/task-resume.js check <task-id>) classified this task as resume_at: finalize, its terminal validated session already covers this exact tree; proceed (see ${CLAUDE_PLUGIN_ROOT}/references/task-resume-protocol.md).

Workflow

1. Verify state

Before changing anything:

  1. Confirm the task path is a registered worktree for exactly the task branch.
  2. Confirm the primary worktree is on the base branch and clean.
  3. Confirm the task branch HEAD equals validated_head.
  4. Record the base branch's current head.
  5. Inspect staged, unstaged, and untracked task-worktree changes without discarding any.

Never reset, stash, rebase, force-delete, or silently switch either worktree to another branch.

2. Complete task bookkeeping

Within the selected project's task files:

  1. Change only this task's status to Complete.
  2. Update its status-table row when an index exists.
  3. Leave unrelated tasks unchanged.

3. Commit remaining validated work

Inspect the actual remaining diff. Include validation fixes and task bookkeeping belonging to this task.

  • In runner mode, validation has already been sealed by the runner. Only task-status bookkeeping may remain; reject any other changed path. Do not stage or commit it. Return it to the runner with action: "commit" and propose <task-id>: Mark task complete plus an explanatory body. Use action: "none" only when no bookkeeping change remains.
  • Outside runner mode, commit bookkeeping changes on the task branch as <task-id>: Mark task complete.
  • In manual mode, describe any validated remaining change in the subject.
  • Do not create an empty commit.
  • Require a clean task worktree afterward only in manual mode.

In runner mode, never ask a question. Return RESULT: FAILURE for missing information or unsafe state.

4. Integrate a moved base

Check whether the current base head is an ancestor of the task branch.

If it is not:

  1. Merge the current base head into the task branch with --no-ff --no-commit.
  2. Resolve conflicts only when the task definition and surrounding code make the resolution unambiguous.
  3. Record whether the merge command reported conflicts, even when every conflict was resolved unambiguously.
  4. In runner mode, do not run git add or create the merge commit. Leave the prepared merge for the runner and propose an expressive task-prefixed commit subject and body. Return RESULT: BASE_INTEGRATED, bind it to the exact integrated base head, and report conflicts_resolved: true only when the merge command reported conflicts. The runner owns the opt-in revalidation policy and invokes finalization again after sealing the integration.
  5. Outside runner mode, commit the resolution and continue to prepare and merge the task into the base branch.

If resolution needs product, architecture, or ownership judgment, safely abort the integration when possible and return RESULT: NEEDS_INPUT.

5. Prepare the merge

In runner mode:

  1. Reconfirm the primary worktree is clean, the task worktree contains only the permitted bookkeeping change, and the base branch is still at the head recorded in step 1.
  2. Choose a concise merge message containing the task ID and actual title or outcome. When this finalization accepted a PASSED-WITH-WAIVERS validation, the merge body must name each waived gate as waived (never as passed). When validation repaired an unrelated failure under expand-and-fix, mention the incidental fix.
  3. Return the versioned JSON RESULT: READY_TO_MERGE receipt with the exact runner token, task identity, bookkeeping commit proposal when needed, and expressive outward merge subject/body. Do not merge outward, remove the worktree, or delete the branch; the runner verifies and commits the prepared tree before performing those operations.

When invoked manually, merge with --no-ff, then continue to cleanup below. If an unexpected conflict occurs, abort it when safe and return RESULT: NEEDS_INPUT. Do not resolve it on the base branch because the resolution would not have been validated.

6. Verify and clean up

After a successful manual merge:

  1. Confirm the task branch is an ancestor of the base branch.
  2. Confirm the primary worktree is clean and record its merge commit.
  3. Remove exactly the verified task worktree.
  4. Delete exactly the verified task branch with safe deletion.

If the merge succeeded but cleanup fails, return RESULT: CLEANUP_REQUIRED; do not undo the merge.

Result contract

Make the final line exactly one of:

text
RESULT: FINALIZED | task_id=<id> | task_head=<sha> | merge_commit=<sha> | base_branch=<branch>
RESULT: NEEDS_INPUT | reason=<one-line reason>
RESULT: CLEANUP_REQUIRED | merge_commit=<sha> | worktree_path=<path> | branch=<branch> | reason=<one-line reason>
RESULT: FAILURE | reason=<one-line reason> | worktree_path=<path> | branch=<branch>

In runner mode, report only one of these compact JSON receipts or a failure result:

text
RESULT: READY_TO_MERGE | {"v":1,"token":"<exact-runner-token>","task_id":"TASK-NNN","phase":"finalize","action":"commit","commit":{"subject":"TASK-NNN: Mark task complete","body":"<bookkeeping summary>"},"merge":{"subject":"Merge TASK-NNN: <actual outcome>","body":"<publication summary>"}}
RESULT: BASE_INTEGRATED | {"v":1,"token":"<exact-runner-token>","task_id":"TASK-NNN","phase":"finalize","action":"commit","base_head":"<full-integrated-base-sha>","conflicts_resolved":true,"commit":{"subject":"TASK-NNN: Integrate updated base branch","body":"<resolution summary>"}}
RESULT: REVALIDATE | {"v":1,"token":"<exact-runner-token>","task_id":"TASK-NNN","phase":"finalize","action":"commit","base_head":"<full-integrated-base-sha>","reason":"<why revalidation is required>","commit":{"subject":"TASK-NNN: Integrate updated base branch","body":"<resolution summary>"}}

For READY_TO_MERGE, use action: "none" and omit commit when the task worktree is clean. BASE_INTEGRATED always uses action: "commit"; REVALIDATE remains accepted only for compatibility with older skill exports. Report FINALIZED only after a manual merge is present, both remaining worktrees are clean, and cleanup succeeded.

よくある質問

AIスキル「Finalize Task」では何ができますか?

Use when a task worktree has passed validation - manually commits, merges, and cleans up, or prepares runner-owned commits and publication. Pass --on-unrelated-failure ignore-and-merge to allow merging a tree validated as PASSED-WITH-WAIVERS (unrelated gates waived with receipts; default stop-and-ask refuses it).

TypingMindでFinalize Taskを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Finalize Taskはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにFinalize Taskをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/etr/groundwork/tree/main/skills/finalize-taskを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

Finalize Taskを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストが合致したときにこのスキルを読み込めます。

Finalize Taskは何個のAIモデルで使えますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもFinalize Taskを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Finalize Task」は無料ですか?

はい。etrがGitHubでMITライセンスの下で公開しています。支払いが必要なのは、利用したトークンに対する、ご自身が契約するAIプロバイダーへの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇