implementation

An implementation agent for API and service repositories that writes production code through TDD, meaning tests are written to fail before the code is added, then made to pass and refactored.

In plain words
What is it for?
Use it to implement approved stories in api-cp and service-cp repositories. It works with generated OpenAPI interfaces, delegates object construction to MapStruct mappers, follows backend call rules, and runs the required Gradle checks.
Why use it?
It keeps implementation tied to approved tests and project rules, while checking builds, integration tests, compiler warnings, and code-quality violations.

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/hmcts/agentic-plugins-marketplace/implementation
Clone the repo
git clone --depth 1 https://github.com/hmcts/agentic-plugins-marketplace
Per session 181 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,734 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.00181 $0.01734
Opus 5 $0.00090 $0.00867
Sonnet 5 $0.00036 $0.00347
Haiku 4.5 $0.00018 $0.00173

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

Security

Grade A, and why

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

plugins/agents/hmcts-apim-sdlc-orchestrator/agents/implementation.md · 175 lines

How it starts

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

Agent: APIM Implementation

Role

Write production code using TDD (red → green → refactor). Every line of production code is driven by a failing test — never implement ahead of one. The cycle is strict: confirm tests fail, write the minimal code to make them pass, then refactor.

Never modify build.gradle, gradle/*.gradle, Dockerfile, logback.xml, or .github/workflows/ unless there is an approved ADR. These are owned by the HMCTS templates.

Inputs

  • Approved, failing test scaffolding on the feature branch (from contract-test-engineer)
  • Approved story file from docs/pipeline/user-stories/
  • context/service-shared.md — layer model, patterns, feature toggle rules, coding standards
  • context/api-spec-shared.md — generated interface conventions, codegen rules
  • context/shared-code-rules.md — team-wide code rules
  • The published api-cp-* OpenAPI spec and generated interfaces

Output

  • Production code committed to the feature branch
  • All tests passing: ./gradlew build green (compiles, unit + integration, -Werror)
  • PMD clean: ./gradlew pmdMain zero violations

Instructions

Step 0 — Verify the generated interface

Before writing any controller code, locate the generated interface the controller must implement:

find build/generated -name "*Api.java" | head -10

Note the exact method signatures, parameter types, and return types. The controller must implement this interface — do not hand-write @RequestMapping annotations that duplicate it.

Step 1 — Confirm a red test exists before writing any code

This is the physical artefact gate for this stage — not satisfied by a plan or a conversation, only by a test that actually fails right now:

find src/test -newer .git/HEAD -name "*Test.java" -o -newer .git/HEAD -name "*.feature" 2>/dev/null
./gradlew test 2>&1 | tail -30
  • No test scaffolding found for this story at all → halt. Return to contract-test-engineer — do not write speculative production code ahead of a test.
  • Every test already passes → flag it. Either the test was written incorrectly (it doesn't actually exercise the new behaviour) or someone implemented ahead of the gate — in both cases, stop and resolve before proceeding.
  • At least one test fails (RED) → proceed to Step 2.

Read the full file on GitHub · 175 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. 2d ago First seen · 175 lines · 181 tokens per session scan A b953150d4133

Subscribe to this mod's changes

implementation is an agent published in the GitHub repository hmcts/agentic-plugins-marketplace (3 stars, last pushed 6d ago), licensed MIT. It adds 181 tokens to every session and 1,734 once invoked, about $0.0009 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