---
name: "music_theory_basics"
description: "Foundational music theory: spell scales, name intervals, build and identify chords, and convert rhythm notation — enough to read and play. Triggers when the user asks about scales, keys, chords, intervals, rhythm, time signatures, note reading, or music fundamentals."
---

# Music Theory Basics

## Purpose
Answer music-theory questions accurately and help agents work with musical material: spell any scale, name any interval, build or identify triads, and convert rhythmic notation to durations. For precision work (spellings, chord identification, rhythm math), use the bundled `bin/musictheory` CLI instead of hand-deriving answers.

## Workflow

1. **Classify the question**: is it about *pitch* (scales/intervals/chords) or *rhythm* (note values/time signatures)?
2. **Pitch questions**
   - To spell a scale: `bin/musictheory scale <root> <major|natural|harmonic|melodic>` (e.g. `scale G major`). Returns the correctly spelled notes with accidentals.
   - To name an interval: `bin/musictheory interval <note1> <note2>` (e.g. `interval F A`). Returns name, semitones, shorthand.
   - To identify or build a chord: `bin/musictheory triad <note1> <note2> <note3>` — the first note is treated as the bass; returns root, quality, and lead-sheet symbol (e.g. `triad C E G` → C major, "C"). For diatonic harmony: `bin/musictheory harmony <root> <major|minor>` lists the seven scale triads with roman numerals.
   - Theory concepts not covered by the CLI (key signatures, modes, solfège, voice-leading rules) live in `references/`.
3. **Rhythm questions**
   - `bin/musictheory beats <value>` converts a note value to beats in 4/4 (e.g. `beats dotted-half` → 3). Accepts `whole, half, quarter, eighth, sixteenth, thirtysecond`, each optionally `dotted-`.
   - Conceptual material (time signatures, rests, beams, counting) is in `references/rhythm.md`.
4. **Compose the answer** in plain language with the worked result. Show the steps briefly — note names spelled out, intervals labeled — so the user can verify.

## Output Contract
- Note names: use ♯/♭ (or `#`/`b` in code contexts), never invented enharmonics; keep one spelling per note.
- Chords: state quality + lead-sheet symbol, e.g. "D minor triad (Dm): D–F–A".
- Intervals: name + semitone count, e.g. "C to A is a major sixth (9 semitones)".
- Rhythm: beats + subdivision, e.g. "a dotted quarter = 1.5 beats = one quarter + one eighth".
- When a claim isn't in `references/` or CLI-verified, say so — frame it as interpretation, not fact.

## Operating Rules
1. **Accuracy rule (non-negotiable):** every factual claim must come from the CLI, the references, or a verified primary source. Never invent scale degrees, chord spellings, intervals, or composer claims. Unverifiable = cut it or frame as opinion.
2. **Spelling over pitch-class:** C♯ and D♭ are the same pitch but different notes. Always return correctly spelled notes (one letter name per scale degree), never bare semitone numbers.
3. **Scope is basics:** major/natural/harmonic/melodic scales, triads, diatonic harmony, intervals within an octave, simple and compound time. Say "beyond basics" for jazz extensions, serial theory, counterpoint.
4. **One worked example per concept:** show it done once (e.g. spell G major: G–A–B–C–D–E–F♯–G), don't dump the whole circle of fifths.
5. **No playback promises:** you can describe how something sounds ("bright", "tense") but can't guarantee timbre; the CLI doesn't produce audio.
