complete-task

A task-closing workflow that marks a finished task as complete and moves its records into a completed folder for archiving. Archiving means keeping finished work separate from active work.

In plain words
What is it for?
Use it after implementation, review, testing, Git submission, and any required issue or pull-request updates are finished.
Why use it?
It prevents unfinished or unreviewed work from being marked done. It checks for required files, approvals, tests, commits, and related updates first.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/modelengine-group/fit-framework/complete-task
Clone the repo
git clone --depth 1 https://github.com/ModelEngine-Group/fit-framework

Made for: Claude Code.

Per session 14 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,304 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00014 $0.02304
Opus 5 $0.00007 $0.01152
Sonnet 5 $0.00003 $0.00461
Haiku 4.5 $0.00001 $0.00230

Measured yesterday against content hash 02c7ee83ea55, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

complete-task scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/complete-task.md · 304 lines

How it starts

The opening of the file, as written. The whole thing — 304 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Complete Task Command

功能说明

标记任务为已完成状态,更新任务元数据,并将任务从 active 目录移动到 completed 目录进行归档。

⚠️ CRITICAL: 状态更新要求

执行此命令后,你必须立即更新任务状态并移动任务目录。参见规则 7。

前置条件

在执行此命令前,请确认以下条件全部满足:

  • 所有工作流步骤已完成
  • 代码已审查通过(review.md 显示批准)
  • 代码已提交到 Git
  • 代码已合并到目标分支(如果需要)
  • 所有测试通过
  • Issue 已同步更新(如果有关联 Issue)
  • PR 已合并(如果有 PR)

如果以上条件未全部满足,请勿执行此命令。

执行流程

1. 验证任务存在

检查任务文件是否存在:

ls -la .ai-workspace/active/{task-id}/task.md

如果任务不在 active 目录,检查是否已经在 completedblocked 目录。

2. 读取并验证任务状态

读取 .ai-workspace/active/{task-id}/task.md,检查:

工作流进度

  • 所有步骤是否标记为完成 ✅
  • current_step 是否为最后一步(如 finalizecode-review

任务状态

  • status 是否为 active(即将改为 completed
  • 是否有未解决的阻塞问题

文件完整性

  • analysis.md 存在(如果是 feature-development 或 security-fix)
  • plan.md 存在(如果是 feature-development)
  • implementation.md 存在
  • review.md 存在且显示批准

如果发现任何问题,提示用户并停止执行

3. 更新任务状态 (CRITICAL)

必须更新 .ai-workspace/active/{task-id}/task.md

status: completed
current_step: finalize
updated_at: {当前时间,格式: yyyy-MM-dd HH:mm:ss}
completed_at: {当前时间,格式: yyyy-MM-dd HH:mm:ss}

在工作流进度中标记所有步骤完成

## 工作流进度

- [x] requirement-analysis (claude, {日期})
- [x] technical-design (claude, {日期})
- [x] implementation (claude, {日期})
- [x] code-review (claude, {日期})
- [x] finalize (claude, {当前日期})  ← 标记为完成

添加完成总结(在 task.md 末尾添加):

---

## 任务完成总结

### 完成信息

- **完成时间**: {当前时间}
- **完成者**: {当前AI}
- **关联 PR**: #{pr-number}(如果有)
- **关联 Issue**: #{issue-number}(如果有)
- **目标分支**: {分支名}

### 交付成果

- [x] 需求分析文档: `analysis.md`
- [x] 技术方案文档: `plan.md`
- [x] 实现报告: `implementation.md`
- [x] 代码审查报告: `review.md`
- [x] 代码提交: {commit-hash}
- [x] PR 合并: #{pr-number}

### 任务完成标准

- [x] 功能完整实现
- [x] 代码审查通过
- [x] 所有测试通过
- [x] 文档完整
- [x] 代码已合并

### 备注

{如有需要,添加备注}

4. 归档任务 (CRITICAL)

将任务从 active 目录移动到 completed 目录:

# 确保 completed 目录存在
mkdir -p .ai-workspace/completed

# 移动任务目录
mv .ai-workspace/active/{task-id} .ai-workspace/completed/

Read the full file on GitHub · 304 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 304 lines · 14 tokens per session scan A 02c7ee83ea55

Subscribe to this mod's changes

complete-task is a command published in the GitHub repository ModelEngine-Group/fit-framework (2,117 stars, last pushed 5mo ago), licensed MIT. It adds 14 tokens to every session and 2,304 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.