Deterministic Anti-RLHF Stylometric Gate for Autonomous Agents. Created and maintained by Nitivra (gehe@nitivra.com.au).
The GitHub project, the PyPI package and the command are all agent-prose.
Traditional linters catch spelling and punctuation. Large language models almost never make those mistakes. The distortions they produce are structural: cadence uniformity, copula avoidance and forced rhetorical balance.
Foundation models trained with Reinforcement Learning from Human Feedback exhibit predictable stylometric habits:
- Monotone sentence cadence. Four or five consecutive sentences land at nearly the same word count, often 18 to 24 words.
- Copula avoidance. The plain verb "is" is replaced by evasive linking phrases such as "serves as" or "stands as".
- Prestige scaffolding. Academic filler (
crucial,nuance,bedrock,linchpin,cornerstone) clusters together and adds no information. - Synthetic balance. Clauses are forced into symmetry the underlying ideas do not have, including "not only X, but also Y".
- Trailing participial tails. Sentences acquire a weak ending such as ", ensuring that..." or ", enabling...".
agent-prose is a zero-dependency Python quality gate and pre-commit hook. It detects these distortions with the standard library.
When engineering teams deploy autonomous agents to generate documentation, pull request summaries and customer communications, text quality is part of company credibility.
A reader who meets generic boilerplate disengages. Text that passes a spelling check can still carry structural tells. Readers who notice those tells trust the page less.
agent-prose replaces a subjective edit debate with a repeatable gate in CI.
- Sliding-window burstiness. Measures sentence-length variance across five-sentence blocks. A standard deviation under 6.0 is a monotone run.
- Direct copula check. Flags evasive linking verbs.
- Dialect packs. Australian English (
en-AU, Macquarie and the Australian Government Style Manual), American English (en-US, Chicago and AP) and British English (en-GB). - Technical shields. Fenced code blocks, inline code, markdown tables and YAML frontmatter are left out of the prose scan.
- Two severities. Blocking defects exit 1. They include non-ASCII punctuation, invalid dialect spellings, contractions and raw flow arrows in narrative prose. Advisory findings cover cadence, prestige stems and synthetic balance. Four or more advisory findings exit 2.
--strictpromotes every advisory finding to a blocking failure. - Repair bound. The prose-gate skill tells an agent to stop after two repair passes. The scanner itself does not count passes.
Install from PyPI:
pip install agent-proseRun without a permanent install:
uv tool run agent-prose path/to/document.mdInstall from this repository:
git clone https://github.com/geheharidas/agent-prose.git
cd agent-prose
pip install -e .There are no third-party runtime dependencies.
agent-prose README.mdA clean file prints:
README.md: [PASSED] Clean
Scan complete: 1 file(s) evaluated. Status: PASSED.
Other entry points:
agent-prose docs/
agent-prose --locale en-AU docs/
agent-prose --locale en-US docs/
agent-prose --strict docs/
agent-prose --quiet docs/
agent-prose --json docs/--locale en-AU requires -ise spellings and colour or centre, and it rejects the serial comma. --locale en-US permits -ize, color and the serial comma. Read stdin with agent-prose -.
Add the hook to .pre-commit-config.yaml:
repos:
- repo: https://github.com/geheharidas/agent-prose
rev: v1.0.2
hooks:
- id: agent-prose
args: ["--locale", "en-AU"]Put one of these markers in the first five lines:
<!-- agent-prose: off --><!-- writing-quality: off -->The file is reported as [EXEMPT] and the process exits 0 for that file.
agent-prose picks a dialect in this order:
--locale <code|path>.proserc.jsonor[tool.agent-prose]inpyproject.toml- The
AGENT_PROSE_LOCALEenvironment variable locale.getlocale()on the host- Fallback:
en-US
Copy integrations/grok/prose_gate.rhai into .grok/workflows/. The workflow runs agent-prose on a path.
Copy integrations/claude/SKILL.md to ~/.claude/skills/prose-gate/SKILL.md, or the equivalent Cursor skills directory.
Adapter text lives in src/agent_prose/adapters/. Load one from Python:
from agent_prose.adapters import get_adapter_prompt
print(get_adapter_prompt("claude", profile=None))The packs are Claude, Gemini, Grok, Muse or Llama, and Copilot. Each pack names the failure mode that family tends to produce. They do not call a model.
- Contribution rules, including new dialect profiles:
CONTRIBUTING.md - Security reports:
SECURITY.md - Contact:
gehe@nitivra.com.au
The sibling gate for epistemic sycophancy is agent-sycophancy.
MIT License. Copyright (c) 2026 Nitivra (gehe@nitivra.com.au).