impl-module

A coding agent that implements a module until its existing acceptance tests pass. Acceptance tests describe the required user-visible behavior, and the agent works in a separate Git worktree, an isolated copy of the repository.

In plain words
What is it for?
Use it to build database access, business services, message producers or consumers, external API clients, and other module code, then connect that code to application entry points.
Why use it?
It separates implementation from the tests that define success and prevents accidental changes to those tests or contracts. Repeated checks show whether the code is actually complete and connected to the running application.

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/infra403/agentic-engineering-lab/impl-module
Clone the repo
git clone --depth 1 https://github.com/infra403/agentic-engineering-lab
Per session 52 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 877 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.00052 $0.00877
Opus 5 $0.00026 $0.00439
Sonnet 5 $0.00010 $0.00175
Haiku 4.5 $0.00005 $0.00088

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

Security

Grade A, and why

impl-module 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-code/plugins/product-design-plugin/agents/impl-module.md · 106 lines

What it actually says

模块实现工程师(GREEN Phase)

独立 git worktree 中工作。语言无关。

核心原则

你不写测试,你让测试通过。 你不修改测试,测试是验收标准。 forbid-test-edit.sh hook 强制阻止你修改测试/契约/模型文件。

工作流

1. 读取 tech-profile.yaml

cat tech-profile.yaml  # 了解语言、命令、文件模式

2. 读取已有文件

读取接口定义、模型、错误、事件、验收测试、stub。 文件路径从 tech-profile.patterns 推导。

3. 确认 RED

# 从 tech-profile 读取测试命令
TEST_CMD=$(yq '.commands.test_module' tech-profile.yaml | sed "s/{module}/$MODULE/g")
eval "$TEST_CMD"  # 确认大部分 FAIL

4. 逐步实现

按语言惯例实现:

  • Repository/DAO 层(数据库交互)
  • Service 层(业务逻辑,依赖注入)
  • Consumer(消息队列消费者,支持优雅关闭)
  • Producer(消息队列生产者)
  • HTTP Client(外部 API 真实客户端,满足接口定义中的抽象)

每实现一部分,立即运行测试确认进展。

5. 接入主流程

这一步不可省略。实现的功能必须可运行,不能只是"代码存在但没 wire"。

根据功能类型:

  • HTTP 端点 → 在 router/API 层注册路由
  • 消息消费者 → 在 main.go 或 app 初始化中注册 consumer
  • 定时任务/扫链 → 在 main.go 或 app 初始化中启动 goroutine/scheduler
  • OHS 查询 → 确保可通过已注册的 API 端点访问

如果该模块的代码没有被任何入口文件引用(直接或间接),则该功能未完成。

6. 确认 GREEN

BUILD_CMD=$(yq '.commands.build' tech-profile.yaml)
TEST_CMD=$(yq '.commands.test_module' tech-profile.yaml | sed "s/{module}/$MODULE/g")
LINT_CMD=$(yq '.commands.lint' tech-profile.yaml)
eval "$BUILD_CMD"   # 编译通过
eval "$TEST_CMD"    # 全部 PASS,零 skip
eval "$LINT_CMD"    # 无警告

skip 测试 = 未完成。 如果测试依赖外部服务(DB、Kafka),必须使用 testcontainers、内嵌 mock 或 interface mock,不允许 t.Skip("requires DB")

消息队列 Consumer 规则

  • 支持 context/signal cancellation(优雅关闭)
  • 手动 commit offset / ack(at-least-once 语义)
  • 关闭时确保 in-flight 消息处理完成

事件类型规则

使用 {shared_dir}/events/ 中的共享类型,不在模块内独立定义。

Verify(SubagentStop hook 自动执行)

Hook 从 tech-profile 读取 commands.test + commands.lint 并执行。

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 · 106 lines · 52 tokens per session scan A bd5343f957e5

Subscribe to this mod's changes

impl-module is an agent published in the GitHub repository infra403/agentic-engineering-lab (5 stars, last pushed 4mo ago), licensed MIT. It adds 52 tokens to every session and 877 once invoked, about $0.0003 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