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/baijum/ukulele-companion/testing-conventionsgit clone --depth 1 https://github.com/baijum/ukulele-companionWrote 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/rules/baijum/ukulele-companion/testing-conventions)<a href="https://agentmods.dev/rules/baijum/ukulele-companion/testing-conventions"><img src="https://agentmods.dev/badge/rules/baijum/ukulele-companion/testing-conventions.svg" alt="Measured on agentmods" 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.00000 | $0.00773 |
| Opus 5 | $0.00000 | $0.00387 |
| Sonnet 5 | $0.00000 | $0.00155 |
| Haiku 4.5 | $0.00000 | $0.00077 |
Grade A, and why
testing-conventions 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 6d 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 — 83 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Testing Conventions
Frameworks
- Unit tests: JUnit 4
- Property tests: Kotest Property Testing (
io.kotest:kotest-property) - UI tests: Compose UI Testing (
ui-test-junit4) - iOS tests: XCTest
Running tests
./gradlew testDebugUnitTest # All Android unit tests
./gradlew connectedAndroidTest # Instrumented tests (requires emulator/device)
Property tests (Kotest)
Property tests generate thousands of random inputs and verify invariants. Use runBlocking { checkAll(...) { ... } } with JUnit 4.
@Test
fun `transpose identity`() = runBlocking {
checkAll(Arb.string(), Arb.int(0..11)) { chord, semitones ->
val result = transpose(transpose(chord, semitones), -semitones)
assertEquals(chord, result)
}
}
Domain logic (domain/ package) is pure Kotlin — add property tests for new invariants.
What to test when
- Chord/note logic changes: Test both High-G and Low-G tuning
- Fretboard UI changes: Test left-handed mode
- UI changes: Verify light, dark, and high-contrast themes
- New domain logic: Add property tests for invariants
- Accessibility changes: Run instrumented accessibility tests
Existing test files
Unit tests (app/src/test/)
| File | Tests |
|---|---|
PitchDetectorTest.kt |
YIN pitch detection with synthetic sine waves |
AudioResamplerTest.kt |
Downsampling ratio, empty input, frequency preservation |
FFTProcessorTest.kt |
DC signal, pure sine peak, FFT/IFFT round-trip |
TunerNoteMapperTest.kt |
Frequency-to-note mapping, string matching, hysteresis |
TtsAnnouncementThrottlerTest.kt |
Tuner spoken feedback throttling |
Property tests (app/src/test/, *PropertyTest.kt)
| File | Invariants |
|---|---|
TransposePropertyTest.kt |
Identity, inverse round-trip, associativity, chord name preservation |
ChordNameParserPropertyTest.kt |
Arbitrary string robustness, known chord parsing, case insensitivity |
ChordDetectorPropertyTest.kt |
Empty/single/pair handling, known formula detection |
FFTProcessorPropertyTest.kt |
FFT/IFFT round-trip with random signals, sine peak detection |
PitchDetectorPropertyTest.kt |
Silent/quiet buffer rejection, pure sine accuracy |
ChordSheetTransposePropertyTest.kt |
Zero/twelve identity, double transpose round-trip |
CapoCalculatorPropertyTest.kt |
Capo position range, score ordering, voicing fret range |
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.
- 6d ago First seen · 83 lines · 0 tokens per session scan A 39435a5c82c5
testing-conventions is a cursor rule published in the GitHub repository baijum/ukulele-companion (13 stars, last pushed 2d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 773 tokens. 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
project
Redface 2 project rules — imports AGENTS.md as source of truth.
telegram-bot-tests
Test conventions for Telegram Bot library.
project-conventions
PriceGrab project conventions (override selected global rules).
project-status
PriceGrab shipped state and product backlog (read first).
specify-rules
For additional context about the active feature, technologies, project structure, shell commands, and other important information.
30-safety-and-testing
Safety and testing requirements — always apply.