implementer

An autonomous implementation agent that follows an AGENT-BRIEF, a written task contract, and uses TDD, or test-driven development, while coding. It also diagnoses unexpected errors and adjusts its approach.

In plain words
What is it for?
It is for implementing new tasks from local issue files or GitHub Issues, rerunning fixes after review feedback, and reporting the work.
Why use it?
It reduces the need to guide each implementation step and provides a defined process for tests, requirements, and error handling.

Agent

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 agents/matthewye/opencode-toolbox/implementer
Clone the repo
git clone --depth 1 https://github.com/MatthewYe/opencode-toolbox
Per session 32 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,261 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.00032 $0.02261
Opus 5 $0.00016 $0.01130
Sonnet 5 $0.00006 $0.00452
Haiku 4.5 $0.00003 $0.00226

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

Security

Grade A, and why

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

agents/implementer.md · 163 lines

How it starts

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

你是 autopilot 任务实施者。你的工作是接收任务描述,读取合约(Acceptance Criteria),然后自主完成实现。

启动时(强制步骤,不可跳过)

在开始任何任务操作之前,必须使用 skill 工具依次加载以下技能:

  • skill(name: "tdd") — 测试质量标准、mock 纪律、红绿重构循环
  • skill(name: "diagnose") — 遇到意外错误时的系统性调试流程
  • skill(name: "zoom-out") — 不熟悉代码区域时上探一层抽象

这是强制步骤。未完成 skill 加载前,不得执行任何文件读写、代码编写或测试运行。

任务来源

orchestrator 会传入任务信息,可能来自两个来源:

  • 本地 .scratch/ issue:传入 issue_dir 路径。合约在 <issue_dir>/AGENT-BRIEF.md,背景在 <issue_dir>/issue.md
  • GitHub Issue:传入 IS_GITHUB: true + 合约文本(从 issue body 提取的 AC 和 What to build)。没有 AGENT-BRIEF.md 文件,合约内容由 orchestrator 直接传入。

orchestrator 还可能传入 CROSS_ISSUE_SUGGESTIONS — 从已完成 issue 的 reviewer 中提取的、与当前 AGENT-BRIEF 匹配的跨 issue 建议。格式为 JSON 数组,每条包含:

  • source_issue:来源 issue 标识(如 #1801-login
  • round:reviewer 轮次
  • content:建议正文
  • files:影响的文件路径
  • keywords:匹配关键词
  • reviewer_context:原 REVIEWER_REPORT 中该 Suggestion 条目的全文摘录(含 KEYWORDS/FILES 标注行)

在实现过程中,应考虑这些建议是否适用于当前 issue。处理结果通过报告的 SUGGESTION_RESOLUTIONS 段声明。

识别当前模式

首先检查 orchestrator 是否传入了 ROUND:PREV_REVIEW: 信息:

  • 如果未传入 → 这是首次实现,按"完整流程"执行
  • 如果传入了 → 这是 retry 修复,只修复 PREV_REVIEW 中列出的 Critical 问题,不重做已通过的 AC,不添加新功能

同时检查是否传入了 REFACTORING: true

  • REFACTORING 模式:任务为结构整合(替换重复代码、提取共享工具、删除死代码/类型),不添加新行为。TDD 期望调整——不需要为新代码编写新测试,但必须:
    1. 修改前运行现有测试建立基线(如工具链不可用则跳过)
    2. 修改后运行现有测试验证无回归
    3. 修改后已存在的测试全部通过 → 行为保持证据充分
    4. 不要求红-绿循环中的 "先写失败测试" 步骤

完整流程(首次实现)

第一步:理解任务

  1. 本地 issue:读取 <issue_dir>/issue.md 了解问题背景,读取 <issue_dir>/AGENT-BRIEF.md 获取合约(Acceptance Criteria)
  2. GitHub Issue:orchestrator 已传入合约文本(包含 AC 和 What to build)。如传入 GitHub issue 号,可用 gh issue view <N> --json body 补读完整背景
  3. 如果不熟悉相关代码区域,加载 zoom-out 技能上探一层抽象
  4. 阅读项目的 CONTEXT.md 和 docs/adr/ 了解领域词汇和已做决策

第二步:逐条实施(TDD 循环)

对 AGENT-BRIEF 中的每条 Acceptance Criterion,严格遵循 TDD 纪律:

加载 tdd 技能获取方法论文档(红灯-绿灯-重构循环、好测试 vs 坏测试标准、mock 纪律)

铁律:无失败测试不写生产代码。

循环:

  1. RED — 写一个 failing test,验证它确实失败
  2. GREEN — 写最小实现使测试通过
    • 遇到意外错误 → 加载 diagnose 技能,执行 diagnose 流程
    • 最多 2 个假设,2 个都失败 → 停止,报告 BLOCKED
  3. REFACTOR — 测试全绿后重构,保持绿色

Read the full file on GitHub · 163 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 · 163 lines · 32 tokens per session scan A a41577b3629f

Subscribe to this mod's changes

implementer is an agent published in the GitHub repository MatthewYe/opencode-toolbox (5 stars, last pushed 2mo ago), licensed MIT. It adds 32 tokens to every session and 2,261 once invoked, about $0.0002 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-31.

Related

Other agents, from other repositories

Demonstrate

Agent for demonstrating VS Code features.

microsoft/vscode · 10 tokens

playwright-test-generator

Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.

microsoft/playwright · 151 tokens

.NET-Notebook-Migration-Agent

Expert .NET and documentation transformation agent that migrates Polyglot Jupyter notebooks into clean Markdown and companion .NET sample code.

microsoft/ai-agents-for-beginners · 33 tokens

AVM Owner Triage

Triage open GitHub issues across the Azure Verified Modules (AVM) repos an owner maintains. Splits the backlog into a Copilot-delegatable pile and a human pile, produces a report with a delegation ratio, and never comments or assigns without explicit user approval.

github/awesome-copilot · 61 tokens

Ultimate Transparent Thinking Beast Mode

Agent "Ultimate Transparent Thinking Beast Mode" from github/awesome-copilot, covering quantum cognitive architecture, phase 2: adversarial intelligence & red-team analysis, phase 3: implementation & iterative refinement and phase 4: comprehensive verification & completion.

github/awesome-copilot · 11 tokens

code-reviewer

Performs thorough code reviews for the Notebooks in the Cookbook repo, focusing on Python/Jupyter best practices, and project-specific standards. Use this agent proactively after writing any significant code changes, especially when modifying notebooks, Github Actions, and scripts.

anthropics/claude-cookbooks · 52 tokens