implement-task

A command that implements a software task from an existing technical plan. It reads the task and plan files, changes code, writes tests, runs checks, and produces an implementation report.

In plain words
What is it for?
Implementing planned features or fixes in projects that use the specified .ai-workspace task files, including creating tests and recording modified files and test results.
Why use it?
It gives a defined workflow for carrying a planned change through coding, testing, documentation, and reporting. It also stops when the required task or plan files are missing.

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

Made for: Claude Code.

Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,508 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.00012 $0.01508
Opus 5 $0.00006 $0.00754
Sonnet 5 $0.00002 $0.00302
Haiku 4.5 $0.00001 $0.00151

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

Security

Grade A, and why

implement-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/implement-task.md · 223 lines

How it starts

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

Implement Task Command

功能说明

根据技术方案实施任务,编写代码和测试,输出实现报告。

⚠️ CRITICAL: 状态更新要求

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

执行流程

1. 验证前置条件

检查必需文件:

  • .ai-workspace/active/{task-id}/task.md - 任务文件
  • .ai-workspace/active/{task-id}/plan.md - 技术方案

注意:{task-id} 格式为 TASK-{yyyyMMdd-HHmmss},例如 TASK-20260205-202013

如果任一文件不存在,提示用户先完成前置步骤。

2. 读取技术方案

仔细阅读 plan.md,理解:

  • 技术方案和实现策略
  • 详细的实施步骤
  • 需要创建/修改的文件清单
  • 测试策略

3. 执行代码实现

按照 .agents/workflows/feature-development.yaml 中的 implementation 步骤:

必须完成的任务

  • 按照方案实现功能代码
  • 编写完整的单元测试
  • 本地运行测试验证功能
  • 更新相关文档和注释
  • 遵循项目编码规范

实施原则

  1. 严格遵循方案:不要偏离技术方案
  2. 分步实施:按照 plan.md 中的步骤顺序执行
  3. 及时测试:每完成一个步骤就运行测试
  4. 保持简洁:不要过度设计或添加额外功能

4. 运行测试验证

# 根据项目类型运行测试
mvn test -pl :{module-name}  # Maven 项目
npm test                      # Node.js 项目
pytest                        # Python 项目

确保所有测试通过。

5. 输出实现报告

创建 .ai-workspace/active/{task-id}/implementation.md,必须包含以下章节:

# 实现报告

## 已修改文件列表

### 新增文件
- `{file-path}` - {说明}

### 修改文件
- `{file-path}` - {修改内容摘要}

## 关键代码说明

### {模块/功能名称}
**文件**: `{file-path}:{line-number}`

**实现逻辑**:
{重要逻辑的解释}

**关键代码**:
```{language}
{关键代码片段}

测试结果

单元测试

  • 测试文件: {test-file-path}
  • 测试用例数: {数量}
  • 通过率: {百分比}

测试输出

{测试运行结果}

集成测试

{如果有}

与方案的差异

{如果实现与方案有差异,说明原因}

待审查事项

需要 reviewer 特别关注的点

  • {关注点1}
  • {关注点2}

已知问题

{实现过程中发现的问题或待优化项}

下一步建议

{对代码审查的建议或后续优化方向}


### 6. 更新任务状态

更新 `.ai-workspace/active/{task-id}/task.md`:
- `current_step`: implementation
- `assigned_to`: {当前 AI}
- `updated_at`: {当前时间}
- 标记 implementation.md 为已完成
- 在工作流进度中标记代码实现为完成

### 7. 告知用户

输出格式:

✅ 任务 {task-id} 实现完成

实现概要

  • 修改文件: {数量} 个
  • 新增文件: {数量} 个
  • 测试通过: {数量}/{总数}

输出文件

  • 实现报告: .ai-workspace/active/{task-id}/implementation.md

下一步: 使用以下命令进行代码审查:

  • Claude Code / OpenCode: /review-task {task-id}
  • Gemini CLI: /fit:review-task {task-id}
  • Codex CLI: /prompts:fit-review-task {task-id}

或使用项目的 code-review 插件: /code-review:code-review

Read the full file on GitHub · 223 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 · 223 lines · 12 tokens per session scan A 2eb571723c03

Subscribe to this mod's changes

implement-task is a command published in the GitHub repository ModelEngine-Group/fit-framework (2,117 stars, last pushed 5mo ago), licensed MIT. It adds 12 tokens to every session and 1,508 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.