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/stramp/lost-mines-phandelver/test-driven-developmentgit clone --depth 1 https://github.com/Stramp/Lost-Mines-PhandelverWhat 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.04668 | $0.04668 |
| Opus 5 | $0.02334 | $0.02334 |
| Sonnet 5 | $0.00934 | $0.00934 |
| Haiku 4.5 | $0.00467 | $0.00467 |
Grade A, and why
test-driven-development 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.
How it starts
The opening of the file, as written. The whole thing — 569 lines — stays where its author put it; the contents beside it link to each section on GitHub.
🧪 Test-Driven Development (TDD) Rule
🎯 Objetivo
ALWAYS seguir o paradigma Test-Driven Development (TDD) para código crítico e reutilizável, garantindo que testes sejam escritos ANTES da implementação, seguindo o ciclo Red-Green-Refactor.
🚨 REGRA PRINCIPAL - TEST-FIRST 🚨
ALWAYS escrever testes ANTES da implementação quando:
- ✅ Criando nova função helper/utility (em
Utils/ouHelpers/) - ✅ Implementando lógica de negócio (cálculos, validações, transformações)
- ✅ Criando novos motores (
*Motor.cpp- PointBuy, Multiclass, RaceBonus) - ✅ Criando novos validators (
*Validator.cpp) - ✅ Adicionando cálculos complexos (modificadores, proficiências, atributos)
- ✅ Implementando regras de negócio (regras D&D, multiclassing, point buy)
- ✅ Refatorando código crítico (escrever testes primeiro para garantir comportamento)
NEVER implementar código crítico sem testes correspondentes.
🔄 O Ciclo Red-Green-Refactor
1. Red: Escrever Teste que Falha
ALWAYS começar escrevendo o teste que define o comportamento esperado:
// ✅ CORRETO - Teste primeiro
BEGIN_DEFINE_SPEC(FPointBuyMotorSpec, "MyProject2.CreateSheet.PointBuy",
EAutomationTestFlags::ProductFilter | EAutomationTestFlags::ApplicationContextMask)
FPointBuyMotor* Motor;
END_DEFINE_SPEC(FPointBuyMotorSpec)
void FPointBuyMotorSpec::Define()
{
Describe("CalculatePointBuyCost", [this]()
{
It("deve calcular custo correto para score 15 (9 pontos)", [this]()
{
// Arrange
int32 Score = 15;
// Act
int32 Result = FPointBuyMotor::CalculatePointBuyCost(Score);
// Assert
TestEqual("Custo para score 15 deve ser 9", Result, 9);
});
});
}
Por que começar pelo teste:
- Define o contrato antes da implementação
- Força pensar na interface primeiro
- Garante que o teste pode detectar erros
- Confirma que a infraestrutura de teste funciona
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 · 569 lines · 4,668 tokens per session scan A 16e437da49fa
test-driven-development is a cursor rule published in the GitHub repository Stramp/Lost-Mines-Phandelver (2 stars, last pushed 9mo ago), licensed MIT. It adds 4,668 tokens to every session, about $0.0233 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.
Other cursor rules, from other repositories
unit-tests-tdd
TDD required for behavior changes; ≥80% package coverage on touched packages; unit-test conventions.
elite-developer
Principal Full-Stack Engineer for surgical implementation, strict TDD, complex debugging, and UI construction. Enforces the Agentic Company pipeline and high-rigor engineering standards. This agent contains the full knowledge of TDD, Systematic Debugging, Build Error Resolution, and Refactoring.
mcpnuke-tests
Test conventions for mcpnuke — enforces TDD workflow.
test_first_workflow
Enforce test-first or test-alongside development. Load when implementing new features, APIs, or UI components.
android_unit_testing_bdd
Unit testing best practices with BDD style.
sage-behavior
SAGE /behavior command — load when user types @sage behavior.