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 $0.00019 $0.00336
Sonnet 5 $0.00008 $0.00135
Haiku 4.5 $0.00004 $0.00067

Measured 10d ago against content hash e4d979521b71, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, 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 10d 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. 10d 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 today), licensed MIT. It adds 38 tokens to every session and 673 once invoked, about $0.0002 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.

Related

Other agents, from other repositories

cpp-reviewer

Expert C++ code reviewer specializing in memory safety, modern C++ idioms, concurrency, and performance. Use for all C++ code changes. MUST BE USED for C++ projects.

affaan-m/ECC · 41 tokens

reviewer

Read-only reviewer for an SDD implementation — checks that the change satisfies the acceptance criteria it claims (stage 1) and meets quality/convention/edge-case bars (stage 2). Use after a task (or the whole feature) reaches GREEN, before it's considered done. It reads the diff and the upstream artifacts and reports…

genkovich/sdd · 81 tokens

atomic-auditor

Final gate for a finished implementation. Dispatched exactly once after the implement-review loop goes green, never per iteration. Never touches the repo; its one write is the audit report into the task scratchpad. Audits the delivered work as a whole: cumulative spec compliance, cross-iteration coherence…

damusix/atomic-claude · 169 tokens

bt6-pr-auditor

Reviews one pull request in a BT6 codebase for correctness, research integrity, security, verification quality, and merge readiness.

elder-plinius/T3MP3ST · 32 tokens

Reviewer

Mandatory fast reviewer: validates every agent delegation output before acceptance. Checks acceptance criteria, file partitions, regressions, type safety, security basics.

monkilabs/opencastle · 30 tokens

security-auditor

Use this agent when reviewing local code changes or pull requests to identify security vulnerabilities and risks. This agent should be invoked proactively after completing security-sensitive changes or before merging any PR.

NeoLabHQ/context-engineering-kit · 40 tokens