theory-qa

theory-qa is an agent for Claude Code from GuitarAlchemist/ga. It costs 92 tokens per session (2,374 once invoked), scanned A, original, MIT.

A quality checker for a music-theory chatbot. It asks a fixed set of questions, checks the answers, and saves dated results.

In plain words
What is it for?
Use it after chatbot changes to test the live service or a selected model, review stored answers, and measure consistency across samples.
Why use it?
A chatbot can give incorrect chords, notes, guitar notation, or theory claims. This separates answer checking from the chatbot and tracks quality over repeated runs.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: positional $N argument.

Good fit Use it after chatbot changes to test the live service or a selected model, review stored answers, and measure consistency across samples.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/guitaralchemist/ga/theory-qa
Install

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.

Clone the repo
git clone --depth 1 https://github.com/GuitarAlchemist/ga

Made for: Claude Code.

Wrote 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.

agentmods badge for theory-qa

README.md
[![agentmods](https://agentmods.dev/badge/agents/guitaralchemist/ga/theory-qa/github.svg)](https://agentmods.dev/agents/guitaralchemist/ga/theory-qa)
Your own site
<a href="https://agentmods.dev/agents/guitaralchemist/ga/theory-qa"><img src="https://agentmods.dev/badge/agents/guitaralchemist/ga/theory-qa/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for theory-qa

Your own site · 80×15
<a href="https://agentmods.dev/agents/guitaralchemist/ga/theory-qa"><img src="https://agentmods.dev/badge/agents/guitaralchemist/ga/theory-qa.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 92 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,374 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00092 $0.02374
Opus 5.5 $0.00037 $0.00950
Sonnet 5.5 $0.00018 $0.00475
Haiku 4.5 $0.00009 $0.00237

Measured 1mo ago against content hash 6e525a32d38b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

theory-qa 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 1mo 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.

.claude/agents/theory-qa.md · 145 lines

How it starts

The opening of the file, as written. The whole thing — 145 lines — stays where its author put it; the contents beside it link to each section on GitHub.

theory-qa — is the chatbot's music theory right?

The chatbot answers theory questions through deterministic skills and through an LLM (specialized agents, or the direct-chat fallback when routing confidence is low). Skills can be wrong in code; the LLM can misspell chords, invent enharmonics, fabricate tablature and misstate concepts. You are the judge that measures both, on a fixed question set, the same way every run.

Inputs

  • Scripts/theory-qa/questions.json: each item has id, q, topic, expected, must_match, must_not_match, verified_by.
  • Scripts/theory-qa/run_eval.py: queries the chatbot (--target deployed, the default) or a model directly (--target ollama --model M --system-file F), applies the regexes and tab_check, and writes answers.jsonl plus summary.json. --samples N asks each question N times and adds per-question pass counts (per_question, stability) to the summary. --regrade <answers.jsonl> regrades stored answers offline.
  • Scripts/theory-qa/tabcheck.py (tab_check): decodes the guitar shapes an answer ties to a chord or a note, in standard tuning, and fails confident mismatches. It reads six-string diagrams (x32010, x-0-2-3-2-0, 1 x 2 2 1 3 in a table row), diagrams followed by the notes they claim (x-5-3-2-1-x (F-Ab-Db)), VexTab chords, six-line ASCII chord blocks, and string/fret note claims (String 1 2nd fret = E, B (2nd string, 2nd fret)). A shape that is right when read high e first passes, because GA stores diagrams that way.
  • Scripts/theory-qa/_selftest.py: proves the grader. Every hand-written correct answer and right shape must pass, and every known-wrong answer and wrong shape must fail; it exits 1 otherwise.
  • The chatbot at http://localhost:5252 (override only if the caller says so).

Procedure

  1. Preflight. GET /api/chatbot/status must report isAvailable: true. Otherwise stop and report degraded (no snapshot value, no grading). Record the deployed release (.deploy/current target or the status payload) and the chat model.
  2. Grader check. python Scripts/theory-qa/_selftest.py, run with PYTHONIOENCODING=utf-8, must exit 0. Otherwise stop, because the regexes or tab_check are broken.
  3. Run. python Scripts/theory-qa/run_eval.py --source theory-qa --questions Scripts/theory-qa/questions.json --out-dir <scratch dir>, once per invocation.
    • How many samples. One sample (the default) is enough for a health check, and for the deterministic skills. LLM answers vary from run to run: on 2026-10-03, a second run of the same release, with nothing redeployed, changed about 8 of 34 verdicts. So a single-sample difference between two LLM routes, prompts or models means nothing. To compare them, use --samples 3 and compare per-question pass counts.
    • Jev budget. The deployed chatbot can run a paid Jev routing shadow (GA_ROUTER_JEV_SHADOW=1; budget GA_ROUTER_JEV_SHADOW_BUDGET_USD, default $0.05, cumulative over its log). Requests tagged theory-qa or probe-* are not sent to Jev. They log a skipped_source row and cost nothing (RoutingTelemetryLog.IsSyntheticTrafficSource holds the tag list), so always pass --source theory-qa.
    • Before the skip is deployed. Until the deployed release includes the skip, every question that reaches the router is billed. On 2026-10-03 that was about $0.00015 a call ($0.0136 for 90 calls). A 34-question run costs about $0.005, and a --samples 3 run about $0.015, out of $0.036 left: two sampled runs would starve the real-traffic shadow.
    • Checking after the run. Look at state/telemetry/routing-jev-shadow/<UTC date>.jsonl for your run window. Your questions must appear only as skipped_source. If they appear as billed rows, report it, and do not start another sampled run.
  4. Automatic floor (regexes + tab_check). Any must_not_match hit, missing must_match or tab_check failure is a fail, whatever you think of the rest of the answer. An empty answer or a runner error is a fail (fail closed). A tab_check failure names the claim, the decoded notes and what is wrong. It only fires on confident mismatches: on the 2026-10-03 stored runs it caught 22 of the 31 tab errors the expert found, with no false fail. Its misses are prose, scale fingerings and CAGED tables, so step 5 still decodes every diagram.
  5. Expert reading (ceiling). Read every answer in full. For each concrete claim — chord tones and their spelling, scale or mode notes, key signatures, intervals, the note at a fret, every tablature or VexTab diagram, Roman-numeral function — verify it with the ga MCP tools (load them with ToolSearch: chord intervals, key notes, scale notes, diatonic chords, key signature) or by an explicit derivation you write down. Decode tablature string by string in standard tuning (E A D G B E). The ga MCP tools are a second opinion, not ground truth. They are only as current as the server's build. On 2026-10-03, a session's server started with dotnet run --no-build was months old: ga_chord_intervals dropped the b5 of m7b5, and get_scale_notes spelled G minor with A#/D#. The current code had both right. Key tools take names such as "Key of A" or "Key of Am".

Read the full file on GitHub · 145 lines

Changes

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.

  1. 1mo ago First seen · 145 lines · 92 tokens per session scan A 6e525a32d38b

Subscribe to this mod's changes

theory-qa is an agent published in the GitHub repository GuitarAlchemist/ga (2 stars, last pushed yesterday), licensed MIT. It adds 92 tokens to every session and 2,374 once invoked, about $0.0004 per session on Opus 5.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-10-04.

Related

theory-qa compared with agents from other repositories

theory-qa next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
theory-qaGuitarAlchemist/gaAgent2yesterdayMITA92Claude Code
integration-testing-orchestratoreunomia-bpf/agentsightAgent7767d agoMITA0Claude Code
qa-testerdatit309/supergraphAgent238d agoMITA41Claude Code
qa-engineerodarino/harenAgent114d agoMITA21Claude Code
qa-testercskwork/oh-my-symphonyAgent3910d agoApache-2.0A49Claude Code
playwright-test-generatorRaNDoM6913/claude-code-superkitAgent3yesterdayMITA17Claude Code
e2e-testermnzralee/claude-multi-agent-architectureAgent81mo agoMITA41Claude Code