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.
npx agentmods add rules/microsoft/data-formulator/test-driven-workflowgit clone --depth 1 https://github.com/microsoft/data-formulatorWhat 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 | $0.00496 | $0.00496 |
| Opus 5 | $0.00248 | $0.00248 |
| Sonnet 5 | $0.00099 | $0.00099 |
| Haiku 4.5 | $0.00050 | $0.00050 |
Grade A, and why
test-driven-workflow 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.
What it actually says
Test-Driven Workflow
1. 测试优先:新功能 / Bug 修复必须有测试
开发新功能或修复 Bug 时,必须同步编写测试,不能只提交业务代码:
- 新功能 → 先写测试(或至少同步写),描述期望行为,再实现代码使测试通过
- Bug 修复 → 先写复现测试,确认测试失败,再修复代码使测试通过
- 重构 → 确保重构前已有测试覆盖,重构后测试仍然全部通过
完成实现后,主动运行相关测试验证:
- 后端:
python -m pytest tests/backend/ -q - 前端:
yarn test
2. 测试保护:不要轻易修改测试代码
测试失败时,禁止直接修改测试代码来让测试通过。必须执行以下流程:
- 复现并定位:运行失败的测试,确认失败现象
- 诊断分类:
- A:测试本身有问题(断言错误、setup 不正确)
- B:业务实现有 Bug
- C:需求/规格变更导致测试过时
- 给出方案:至少提供两个可选方案(改测试 / 改实现 / 补规格),说明各自影响和风险
- 等待确认:由用户决定采用哪个方案,再执行修改
绝对禁止:
- 测试一红就直接改测试代码
- 删除或跳过(
@pytest.mark.skip)失败的测试来"解决"问题 - 修改测试的断言值来匹配错误的实现
3. 精准修改:不动无关测试
与 Karpathy 编码准则的"精准修改"一致:
- 不"顺手改进"与当前任务无关的测试代码
- 不重构正在通过的测试
- 不改变已有测试的断言逻辑,除非被明确要求
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.
- 2d ago First seen · 45 lines · 496 tokens per session scan A 2029dda8d557
test-driven-workflow is a cursor rule published in the GitHub repository microsoft/data-formulator (17,048 stars, last pushed 3d ago), licensed MIT. It adds 496 tokens to every session, about $0.0025 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-30.
Other cursor rules, from other repositories
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.
dev-standard
Apache Superset development standards and guidelines for Cursor IDE.
typescript
Changes to these high-fan-out internals can affect every message, delta, element, or rerun. Keep work in them minimal, and benchmark changes with representative stress-test apps.
coolify-ai-docs
Master reference to all Coolify AI documentation in .ai/ directory.
python_lib
Tips and guidelines specific to the development of the Streamlit Python library, not applicable to scripts and e2e tests.
specs
This directory contains product and tech specs for Streamlit features.