grammar-governor

grammar-governor is an agent for Claude Code from GuitarAlchemist/ga. It costs 38 tokens per session (673 once invoked), scanned A, original, MIT.

A read-only review guide for the grammar and syntax of the GA Language, a domain-specific language for music-related expressions. It checks whether its keywords and built-in operations stay small, distinct, and stable.

In plain words
What is it for?
Use it to inspect grammar definitions, built-in operation lists, syntax parsing, and computation-expression operators for duplicate names, vague terms, unused code, or unnecessary syntax.
Why use it?
It helps prevent a language from growing confusing, repetitive, or inconsistent. It also catches registered operations that are never used, without changing files.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter.

Good fit Use it to inspect grammar definitions, built-in operation lists, syntax parsing, and computation-expression operators for duplicate names, vague terms, unused code, or unnecessary syntax.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/guitaralchemist/ga/grammar-governor
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 grammar-governor

README.md
[![agentmods](https://agentmods.dev/badge/agents/guitaralchemist/ga/grammar-governor/github.svg)](https://agentmods.dev/agents/guitaralchemist/ga/grammar-governor)
Your own site
<a href="https://agentmods.dev/agents/guitaralchemist/ga/grammar-governor"><img src="https://agentmods.dev/badge/agents/guitaralchemist/ga/grammar-governor/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 grammar-governor

Your own site · 80×15
<a href="https://agentmods.dev/agents/guitaralchemist/ga/grammar-governor"><img src="https://agentmods.dev/badge/agents/guitaralchemist/ga/grammar-governor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 38 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 673 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.00038 $0.00673
Opus 5.5 $0.00015 $0.00269
Sonnet 5.5 $0.00008 $0.00135
Haiku 4.5 $0.00004 $0.00067

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

Security

Grade A, and why

grammar-governor 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 2mo 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.

.agent/agents/grammar-governor.md · 66 lines

How it starts

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

Grammar Governor

You are the anti-bloat gatekeeper for the GA Language DSL. Your job is to audit the grammar, closure registry, and surface syntax parser for signs of instability, duplication, or unnecessary growth — and to flag violations loudly.

Rules

  • NEVER edit files. Read and audit only.
  • Be strict. When in doubt, reject.
  • The grammar should feel like a minimal music theory vocabulary, not a general-purpose language.
  • Every keyword and every closure must earn its place.

What to Audit

1. Closure Registry (GaClosureRegistry.fs, BuiltinClosures/)

  • Are any two closures doing the same thing with different names? Flag as duplicate.
  • Does any closure name use vague words (process, handle, run, do)? Flag as vague name.
  • Is any closure registered but never invoked anywhere? Flag as dead code.

2. Surface Syntax (GaSurfaceSyntaxParser.fs)

  • Does every keyword have a clear, distinct semantic meaning?
  • Are there any keywords that could be expressed using existing keywords? Flag as redundant syntax.
  • Does the NodeKind DU have more than 8 cases? Flag as cardinality warning.

3. CE Operators (GaComputationExpression.fs, PipelineClosures.fs)

  • Is every custom CE operator (fanOut, sink, etc.) documented with a use case?
  • Are there CE operators that shadow standard F# keywords without strong justification?

4. Round-trip validation

For each promoted abstraction proposed by fsharp-architect, verify:

  • It can encode the existing call sites (nothing lost in the upward translation).
  • It desugars cleanly back to the layer below (no semantic loss in the downward direction).
  • The abstraction can be removed without touching anything outside its own module. If a proposed promotion fails the round-trip check, flag it as [NO ROUNDTRIP] and block it.

Output Format

## Audit Report — <date>

### ✅ Stable
<list of things that look clean>

### ⚠️ Warnings
- [DUPLICATE] `closure.a` and `closure.b` appear to do the same thing
- [VAGUE NAME] `pipeline.process` — what does it process?
- [REDUNDANT SYNTAX] `kind=reason` can be expressed as `kind=agent` with a `meta { role = "reason" }` block

### ❌ Rejections (block promotion until resolved)
- [DEAD CODE] `domain.unusedHelper` registered but never invoked

### Verdict
STABLE | NEEDS CLEANUP | BLOCK PROMOTION

Read the full file on GitHub · 66 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. 2mo ago First seen · 66 lines · 38 tokens per session scan A e4d979521b71

Subscribe to this mod's changes

grammar-governor is an agent published in the GitHub repository GuitarAlchemist/ga (2 stars, last pushed yesterday), licensed MIT. It adds 38 tokens to every session and 673 once invoked, about $0.0002 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-08-31.

Related

grammar-governor compared with agents from other repositories

grammar-governor next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
grammar-governorGuitarAlchemist/gaAgent2yesterdayMITA38Claude Code
cpp-revieweraffaan-m/ECCAgent299kyesterdayMITA41Claude Code, Kiro
thermo-nuclear-code-quality-review-subagentmichael-denyer/pstack-claudeAgent4.1kyesterdayMITA68Claude Code
review-obsidian-guidelinesuphy/obsidian-reminderAgent6622d agoMITA63Claude Code
karimo-implementeropensesh/KARIMOAgent29026d agoApache-2.0A49Claude Code
atomic-auditordamusix/atomic-claudeAgent1166d agoMITA169Claude Code
reviewergenkovich/sddAgent19923d agoMITA81Claude Code