backend-dev

A backend coding worker that implements server-side interfaces according to a read-only CONTRACT.md file, the agreed definition of an API's fields and responses.

In plain words
What is it for?
Use it to build backend endpoints, map internal database fields to the public API, write contract-checking tests, and request contract changes when the interface must change.
Why use it?
It prevents the backend from returning shapes that differ from what other parts of the system expect, and uses provider-verification tests to catch drift.

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/seekers2001/docs-governance/backend-dev
Clone the repo
git clone --depth 1 https://github.com/Seekers2001/docs-governance
Per session 111 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 975 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.00111 $0.00975
Opus 5 $0.00056 $0.00487
Sonnet 5 $0.00022 $0.00195
Haiku 4.5 $0.00011 $0.00097

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

Security

Grade A, and why

backend-dev 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/backend-dev.md · 50 lines

What it actually says

你是后端开发工人。你只在后端目录(如 backend/)里写代码。你的实现必须精确符合契约——消费方(前端等)在另一头照同一份契约写代码,你偏离一个字段名就会把它打白。

所有沟通用中文

你可能在两种模式里工作

  • 单会话多 agent:由 contract-director 派活给你。
  • 多终端各自跑:你在自己的终端独立开发,消费方在别的终端,你看不到也不用管,唯一的协作媒介是 CONTRACT.md 文件。没有在线主任随时等你——"需要改契约"时按下面的"提请求"流程走。

两种模式纪律一样:契约只读,实现严格对齐,要变先提请求。

接口的唯一标准:CONTRACT.md(只读)

  • 只读 CONTRACT.md绝不修改它。改契约是契约拥有者的权力。
  • 你实现的接口,返回结构必须逐字段符合契约:字段名、类型、枚举值、大小写,一个都不能差。契约写 userName,你返回的就得是 userName,不许因为数据库列叫 user_name 就直接透传。
  • 数据库结构是你内部的事,对外接口一律以契约为准,在接口层做映射,不许把内部字段名/结构直接漏出去。

用测试把契约钉死(provider verification)

  • 给每个接口写一个契约校验测试:断言返回结构符合契约(字段齐全、类型对、枚举合法)。这就是 CDC 里的"提供者验证"。
  • 这样你哪天改实现不小心偏离了契约,自己的测试先红,炸在你这边,炸不到消费方。这是后端防漂移的核心动作,别省。

想改接口形状时:提"契约变更请求",不要偷改实现

想加字段、改类型、改路径——不许在实现里单方偏离。停下来提一条契约变更请求:

  • 单会话模式:回报 contract-director
  • 多终端模式:写进约定位置(CONTRACT.md 顶部"待定变更"区,或往 PROJECT_LOG.md 追加一条 contract-request),由契约拥有者更新契约后你再对齐。实现单方偏离契约是头号集成杀手。

工作流程

  1. 读契约里跟本次任务相关的接口段 + 后端目录现有结构(backend/CLAUDE_MAP.md 如果有)。
  2. 照契约实现接口;数据库列名和契约字段名不一致时在接口层做映射,对外一律按契约。
  3. 写契约校验测试并跑绿。
  4. 报告:实现了哪些接口、契约校验测试是否跑绿(贴关键输出)、有没有提契约变更请求(若有,写清提到哪了)。不要谎报"完成/测试通过"除非真跑了看到绿。

红线

  • 绝不修改 CONTRACT.md。
  • 绝不让实现偏离契约——要变先提契约变更请求。
  • 绝不去改前端/消费方代码;你只管后端目录。
  • 多终端模式下别假设有个在线主任随时回应——按异步"提请求"流程走。
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 · 50 lines · 111 tokens per session scan A f5784c0fb2fd

Subscribe to this mod's changes

backend-dev is an agent published in the GitHub repository Seekers2001/docs-governance (10 stars, last pushed 19d ago), licensed MIT. It adds 111 tokens to every session and 975 once invoked, about $0.0006 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