Borrowing it
Nothing to install: this file belongs to laonayan/tdd-mcp-server. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/laonayan/tdd-mcp-server/master/AGENTS.mdgit clone --depth 1 https://github.com/laonayan/tdd-mcp-serverWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/laonayan/tdd-mcp-server/agents-md)<a href="https://agentmods.dev/instructions/laonayan/tdd-mcp-server/agents-md"><img src="https://agentmods.dev/badge/instructions/laonayan/tdd-mcp-server/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/instructions/laonayan/tdd-mcp-server/agents-md"><img src="https://agentmods.dev/badge/instructions/laonayan/tdd-mcp-server/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.01660 | $0.01660 |
| Opus 5.5 | $0.00664 | $0.00664 |
| Sonnet 5.5 | $0.00332 | $0.00332 |
| Haiku 4.5 | $0.00166 | $0.00166 |
Grade A, and why
tdd-mcp-server AGENTS.md scanned grade A with 1 finding 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 today.
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.
Runs shell commandslowCapability
Expected in a hook, worth knowing in a rule or an instructions file.
- **端口与适配器**:`src/core/ports.ts` 定义 `CommandExecutor` 与存储仓储接口;`src/adapters/` 提供 `GuardedCommandExecutor`(**唯一 spawn 网关**,`child_process` 只允许出现在 adapters 与 execution-guard,架构守卫测试锁定)与 `InMemoryStorage`(测试 fake) How it starts
The opening of the file, as written. The whole thing — 73 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md — AI 编码代理工作指引
本仓库是 tdd-mcp-server:为 AI 编程助手提供 TDD 工作流支持的 MCP 服务器(TypeScript, ESM, MCP SDK 1.x)。任何 AI 代理在此仓库工作前请先读本文件。
开发流程(OpenSpec)
本仓库使用 OpenSpec 管理变更,目录在 openspec/:
openspec list # 查看进行中的变更
openspec validate --all # 机器校验 specs 与 changes(质量门之一)
若本机无
openspec命令:真包是@fission-ai/openspec(npm 上的openspec是无关占位包),可用pnpm dlx @fission-ai/openspec <cmd>运行。
流程:/opsx:explore(探索)→ /opsx:propose(提案:proposal/specs/design/tasks 四件套)→ /opsx:apply(逐任务实施,按功能分步提交)→ /opsx:archive(规格合入 openspec/specs/,变更移入 openspec/changes/archive/)。
- 任何非平凡改动都必须走 openspec 变更流程;规格用中文书写,结构标题与 SHALL 关键词保持英文
- 归档时把 delta 合入主规格(
openspec/specs/mcp-server/spec.md),保持 Requirement 必须至少有一个#### Scenario:
质量门(每次提交前全部通过)
npm test # 单元测试(当前 202 个)
npm run lint # ESLint 9(0 error;存量 warning 为已记录技术债)
npm run build # tsc,零错误
./integration-test.sh # 9 个 stdio 集成场景(需本机 npm 与 node)
openspec validate --all # 规格校验
CI(GitHub Actions)在 Node 20/24 上执行 build + test + lint。
运行安全:内存限制(强制)
任何需要运行的操作,必须在启动时设置内存限制——禁止无上限占用内存导致整台设备假死。本仓库曾因递归 spawn 测试进程发生过整机冻结事故(每层按 worker 数派生进程,进程树指数膨胀),见 src/services/execution-guard.ts 背景注释与 src/services/__tests__/nested-execution-guard.test.ts 回归用例。
npm test已默认限内存(node --max-old-space-size=2048 ... --maxWorkers=2 --workerIdleMemoryLimit=512MB),直接使用即可- 直接调用 node 工具链时必须显式带上限,例如:
node --max-old-space-size=2048 node_modules/jest/bin/jest.js --maxWorkers=2 --workerIdleMemoryLimit=512MBnode --max-old-space-size=1536 node_modules/typescript/bin/tscnode --max-old-space-size=1536 node_modules/eslint/bin/eslint.js src
- 运行
integration-test.sh或任何会派生子进程的脚本前,先export NODE_OPTIONS="--max-old-space-size=1536",让整棵子进程树的每个 node 进程都被封顶;宁可单进程 OOM 快速失败,也不拖垮整机 - 服务代码派生测试/覆盖率子进程必须统一走
src/services/execution-guard.ts:注入TDD_MCP_NESTED_RUN嵌套标记 +NODE_OPTIONS=--max-old-space-size=<MB>(默认 1024,可用TDD_MCP_CHILD_MEMORY_LIMIT_MB覆盖),并在 spawn 前用isNestedExecution()拒绝嵌套执行——新增任何 spawn 点都必须接入该守卫 - 后台运行测试/构建时同样适用上述规则;用管道接
tail会掩盖真实退出码,判断成败以$?或PIPESTATUS为准
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.
- today Changed · +5 lines · +282 tokens per session a9c56b5f6f55
- 4d ago First seen · 68 lines · 1,378 tokens per session scan A 74d93814dd7a
tdd-mcp-server AGENTS.md is an instructions file published in the GitHub repository laonayan/tdd-mcp-server (2 stars, last pushed yesterday), licensed MIT. It adds 1,660 tokens to every session, about $0.0066 per session on Opus 5.5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-12.
tdd-mcp-server AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| tdd-mcp-server AGENTS.mdlaonayan/tdd-mcp-server | Instructions file | 2 | yesterday | MIT | A | 1,660 | Codex, OpenCode |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 144k | today | MIT | A | 7,461 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 5,685 | GitHub Copilot |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 150k | today | MIT | A | 4,680 | Codex, OpenCode |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 3,086 | GitHub Copilot |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 282k | 3d ago | MIT | A | 4,335 | Codex, OpenCode |