fit-complete-task

A command that marks a software task as complete and moves its task folder from an active directory to a completed directory.

In plain words
What is it for?
Checking task files, review approval, Git commits, and tests before updating the task record and archiving the task.
Why use it?
It prevents unfinished, unreviewed, uncommitted, or untested work from being archived as done.

Command for Codex

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/fit-complete-task
Clone the repo
git clone --depth 1 https://github.com/ModelEngine-Group/fit-framework

Made for: Codex.

Per session 11 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 572 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.00011 $0.00572
Opus 5 $0.00005 $0.00286
Sonnet 5 $0.00002 $0.00114
Haiku 4.5 $0.00001 $0.00057

Measured 2d ago against content hash 9e98005a6e5b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

fit-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 2d ago.

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.

.codex/commands/fit-complete-task.md · 67 lines

What it actually says

标记任务 $1 为已完成状态,更新任务元数据,并归档到 completed 目录。

前置条件检查: 在执行前,确认以下条件全部满足:

  • 所有工作流步骤已完成
  • 代码已审查通过(review.md 显示批准)
  • 代码已提交到 Git
  • 所有测试通过 如果以上条件未全部满足,请勿执行此命令。

执行以下步骤:

  1. 验证任务存在:

    test -f .ai-workspace/active/$1/task.md && echo "✅ 任务存在" || echo "❌ ERROR: 任务不存在"
    
  2. 读取并验证任务状态:

    • 检查所有步骤是否标记为完成 ✅
    • 检查文件完整性: analysis.md, plan.md, implementation.md, review.md 都存在
  3. 获取当前时间:

    date '+%Y-%m-%d %H:%M:%S'
    
  4. 更新任务状态: 使用 Edit 工具更新 task.md:

    • status: completed
    • current_step: finalize
    • updated_at: 当前时间
    • completed_at: 当前时间
  5. 在 task.md 末尾添加完成总结(交付成果、完成标准等)

  6. 归档任务:

    mkdir -p .ai-workspace/completed && mv .ai-workspace/active/$1 .ai-workspace/completed/
    
  7. 验证移动成功:

    test ! -d .ai-workspace/active/$1 && echo "✅ 已移除 active" || echo "❌ active 仍存在"
    test -d .ai-workspace/completed/$1 && echo "✅ 已归档到 completed" || echo "❌ 归档失败"
    
  8. 告知用户:

    🎉 任务 $1 已完成并归档
    归档位置: .ai-workspace/completed/$1/
    
    • 提示下一步:
      • 如果还有其他待处理任务:
        • Claude Code / OpenCode: /check-task {task-id}
        • Gemini CLI: /fit:check-task {task-id}
        • Codex CLI: /prompts:fit-check-task {task-id}

注意事项:

  • 只有在真正完成所有工作后才归档
  • 归档前确认所有文档都已创建
  • 不要过早归档未完成的任务
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. 2d ago First seen · 67 lines · 11 tokens per session scan A 9e98005a6e5b

Subscribe to this mod's changes

fit-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 11 tokens to every session and 572 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.