Logo de Finalize Task

Finalize Task

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

Visão geral

Publicado poretr
Repositóriogroundwork
Nome da habilidadefinalize-task
Estrelas
45
Forks
4
Arquivos incluídos
Somente instruções
LicençaMIT
Links
  • Instruções em Markdown

    Um arquivo SKILL.md que o modelo carrega sob demanda, consumindo tokens apenas quando uma solicitação é realmente relevante para a habilidade.

  • Funciona com qualquer LLM

    Habilidades de IA são Markdown simples, não código específico de um provedor, por isso funcionam com GPT, Claude, Gemini, Grok ou um modelo local.

  • Completa em si mesma

    Tudo de que o modelo precisa está nas instruções — sem arquivos extras para sincronizar.

  • Código aberto

    Publicada por etr no GitHub. Leia o conteúdo-fonte antes de instalar.

Instalação

Instale a habilidade de IA Finalize Task no TypingMind para usá-la com qualquer LLM ou adicione-a a outro agente que leia SKILL.md.

1

Instalar no TypingMind

O TypingMind instala uma habilidade diretamente da pasta dela no GitHub — lê o arquivo SKILL.md, reúne os arquivos de recursos em um pacote e armazena o resultado localmente.

  1. Abra o app e vá para Plugins → Habilidades.
  2. Escolha "Instalar do GitHub".
  3. Cole a URL da pasta da habilidade exibida abaixo e confirme.
    https://github.com/etr/groundwork/tree/main/skills/finalize-task
  4. Ative a habilidade em cada chat em que quiser disponibilizá-la.
Plugins → Habilidades → Nova habilidade → Via URL GitHub, depois cole a URL da pasta e pressione Continuar.
2

Instalar em outro agente

Qualquer agente que leia o formato Agent Skills pode usar esta habilidade — copie a pasta para o diretório de habilidades desse agente.

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
Reinicie Claude Code após copiar para que a nova habilidade seja reconhecida.

Use no TypingMind

Ative Finalize Task em qualquer chat do TypingMind e o modelo cuida do resto. O nome e a descrição da habilidade ficam no prompt do sistema e, assim que uma solicitação relevante aparece, o modelo carrega as instruções completas automaticamente — sem precisar de acionamento manual e sem consumir tokens até que ela seja realmente usada.

O modelo carrega Finalize Task automaticamente assim que uma solicitação é relevante para essa habilidade.

Funciona com qualquer modelo de IA

Habilidades de IA são instruções em Markdown simples, não código específico de um provedor. Por isso, Finalize Task não fica vinculada ao modelo para o qual foi criada. Instale-a uma vez no TypingMind e use-a com GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ou um modelo local executado por conta própria — tudo com suas próprias chaves de API.

  • Carregada apenas quando necessário

    O prompt do sistema contém apenas o nome e a descrição. As instruções são buscadas na primeira solicitação relevante, então uma habilidade sem uso não gera custo.

  • Troque de modelo durante a conversa

    Como a habilidade é composta de instruções, não de código, trocar de modelo não afeta seu funcionamento — o próximo modelo lê o mesmo arquivo SKILL.md.

Instruções da habilidade

Este é o conteúdo de SKILL.md que o modelo carrega. Leia antes de instalar — uma habilidade é um conjunto de instruções que seu modelo seguirá.

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.

Perguntas frequentes

O que a habilidade de IA Finalize Task faz?

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

Por que usar Finalize Task no TypingMind?

Porque basta instalar uma vez para usar com qualquer modelo. Finalize Task é escrito em Markdown simples, e não em código específico de um provedor, então a mesma habilidade funciona com GPT-5, Claude, Gemini, Grok ou um modelo local — e é possível trocar de modelo no meio do chat sem que ela deixe de funcionar. O TypingMind usa suas próprias chaves de API, então o pagamento é feito diretamente aos provedores, em vez de uma assinatura por licença de usuário, e suas habilidades e chats permanecem no seu próprio armazenamento.

Como instalar Finalize Task no TypingMind?

Abra Plugins → Habilidades → Instalar do GitHub no TypingMind e cole https://github.com/etr/groundwork/tree/main/skills/finalize-task. O TypingMind lê o arquivo SKILL.md e instala a habilidade para que possa ser ativada em cada chat.

Quais modelos de IA podem usar Finalize Task?

Qualquer modelo conectado no TypingMind. As habilidades de IA são instruções em Markdown simples, e não código específico de um provedor. Assim, GPT, Claude, Gemini, Grok e modelos locais podem carregar esta habilidade quando uma solicitação corresponder a ela.

Quantos modelos de IA posso usar com Finalize Task?

Quantos quiser. Desde que o modelo ofereça suporte a habilidades, é possível usar Finalize Task com ele — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e outros — tudo no TypingMind com suas próprias chaves de API.

A habilidade de IA Finalize Task é gratuita?

Sim. A habilidade é publicada no GitHub por etr sob a licença MIT. O pagamento é feito apenas ao seu provedor de IA pelos tokens usados.

O que são habilidades de IA?

Uma habilidade de IA é um conjunto reutilizável de instruções que ensina um modelo de IA a realizar uma tarefa específica. Ela segue o formato aberto Agent Skills: um arquivo SKILL.md com nome e descrição, além de scripts, modelos de documento ou arquivos de referência de que o modelo possa precisar. O modelo lê as instruções apenas quando sua solicitação corresponde à habilidade, então uma habilidade instalada não gera custos até ser usada.

Qual é a diferença entre habilidades de IA e plugins ou servidores MCP?

Um plugin ou servidor MCP oferece ao modelo novas ferramentas para chamar — código que é executado em algum lugar e retorna um resultado. Já uma habilidade de IA fornece conhecimento e um processo ao modelo: como abordar uma tarefa, quais etapas seguir e como deve ser um bom resultado. As habilidades são escritas em Markdown simples, por isso não precisam de servidor, chave de API nem ambiente de execução, e funcionam com qualquer modelo.

Ver todos

Crie seu próprio espaço de IA agora

Inscreva-se na nossa newsletter para receber novidades sobre recursos e futuros sorteios 👇