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/jterratsdev/ableton-live-mcp/testing-disciplinegit clone --depth 1 https://github.com/jterratsdev/ableton-live-mcpWhat 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.01558 | $0.01558 |
| Opus 5 | $0.00779 | $0.00779 |
| Sonnet 5 | $0.00312 | $0.00312 |
| Haiku 4.5 | $0.00156 | $0.00156 |
Grade A, and why
testing-discipline 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.
How it starts
The opening of the file, as written. The whole thing — 68 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Testing Discipline
Test-Driven Development (TDD)
- Write the test before or alongside the implementation. At minimum, tests must exist before the PR.
- Red → Green → Refactor. Start with a failing test, make it pass with minimal code, then clean up.
- Every development task must include unit tests for new or changed business logic before it is handed to QA.
Behavior-Driven Development (BDD)
- Test behavior, not implementation. Test what the function does, not how it does it.
- Name tests as specifications:
it('rejects orders with zero quantity'), notit('test1'). - One assertion per test method. If you need multiple, it's multiple behaviors — split them.
Test Structure
- Arrange → Act → Assert. Separate setup, execution, and verification with blank lines.
- Use factory functions or builders for test data — never copy-paste fixtures across test files.
- QA automation, E2E suites, contract tests, and test scripts that repeat fixture collections, selectors, expected outputs, or command matrices must load the
collection-standardsskill. - Tests must be deterministic. No reliance on system clock, network, or random values without seeding.
Sync Tests
- If data is duplicated across packages (e.g., type definitions, config arrays), a test must assert both copies are identical.
- Schema changes in a source of truth must break a test somewhere — if they don't, add one.
Coverage
- Target 90%+ line coverage for business logic. Infrastructure/glue code can be lower.
- Coverage is a floor, not a goal. 100% coverage with bad assertions is worse than 80% with good ones.
E2E / Integration
- Prefer Playwright for browser-based E2E, smoke, and regression automation.
- Use the Page Object pattern for UI tests. Selectors live in page objects, not test bodies.
- Tag tests by speed/scope (
@smoke,@regression) so CI can run fast feedback loops. - Capture evidence for E2E failures with traces, screenshots, or videos when supported by the framework.
- E2E tests for any product surface must run against isolated disposable fixtures: web apps, mobile apps, desktop apps, CLI, APIs, integrations, workflows, runtimes, installers, file-system flows, data pipelines, and generated artifacts. Use the user/project-configured E2E fixture path, device farm, sandbox org, emulator, container, or test environment when one is explicitly provided; otherwise default local disposable fixtures to
/tmp. Each test creates its own users/data/project/tasks/roles/acceptance criteria/expected artifacts as applicable; never rely on the developer's current repo state as the tested product state. - QA must choose fixture data that reproduces the risk being validated. If the acceptance criterion is about oversized stories, split decisions, phase returns, queueing, or specialist roles, the E2E must create an oversized/cross-cutting task with enough paths, roles, acceptance criteria, and risk signals to force that behavior.
- Every E2E must assert the resulting state, not only that the action executed. Validate UI-visible state, navigation, accessibility, device/responsive behavior, API contracts, receiver-side integration state, database/mock records, files, events, handoff contents, stdout/stderr, exit code, push notifications, background jobs, generated artifacts, or release-readiness output as applicable.
- For workflow automata, E2E must validate state transitions and loops: allowed transition, blocked transition, return-to-dev/architect/BA when findings fail, and resume behavior after the corrective state is satisfied.
- Include negative and edge scenarios when they are the reason for the change. A happy-path smoke is insufficient for bugs involving guardrails, split detection, security boundaries, QA failback, or release blocking.
- QA, SDET, Developer, BA, Architect, and Release work that produces or reviews evidence must load the
qa-evidence-packskill when it involves acceptance criteria coverage, Playwright/browser artifacts, CLI stdout/stderr, API contracts, integration side effects, screenshots, visual diffs, or annotated defect evidence. - Keep large screenshots, videos, traces, logs, API payloads, and visual diffs as files. Summarize them in a compact evidence report so agents do not consume context with raw artifacts.
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.
- yesterday First seen · 68 lines · 1,558 tokens per session scan A d98d4409fb1e
testing-discipline is a cursor rule published in the GitHub repository jterratsdev/ableton-live-mcp (0 stars, last pushed 8d ago), licensed MIT. It adds 1,558 tokens to every session, about $0.0078 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.
03-testing
Testing requirements — test-before-commit policy, coverage expectations, and test quality standards.