agent-prose
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.
Why It Matters
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.
What It Evaluates
- 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.
Installation
Install from PyPI:
pip install agent-prose
Run without a permanent install:
uv tool run agent-prose path/to/document.md
Install 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.
Quickstart
agent-prose README.md
A 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 -.
Pre-Commit Hook Integration
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"]
File Opt-Out Directive
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.
Dialect Resolution Cascade
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
Agent Platform Integrations
Grok Build
Copy integrations/grok/prose_gate.rhai into .grok/workflows/. The workflow runs agent-prose on a path.
Claude Code and Cursor
Copy integrations/claude/SKILL.md to ~/.claude/skills/prose-gate/SKILL.md, or the equivalent Cursor skills directory.
Model priming adapters
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.
Contributing and Security
- 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.
License
MIT License. Copyright (c) 2026 Nitivra (gehe@nitivra.com.au).
Metadata
Release files for agent-prose 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| agent_prose-1.0.2.tar.gz | 35.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| agent_prose-1.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 65.7 kB
Release files / agent_prose-1.0.2.tar.gz
| Download URL | agent_prose-1.0.2.tar.gz |
|---|---|
| Size | 35.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
92b7cac892e4ea0c9677e49f8c8a05c1eff99742422ed68557dc729f0d266881
|
|
BLAKE2b-256 checksum How to use checksums |
4c2a9277c7cdc4cd969c111f5d44f1fa4e7fcc18a018e9f3a23ad2b5bbab2b35
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 22, 2026.
Transparency logRelease files / agent_prose-1.0.2-py3-none-any.whl
| Download URL | agent_prose-1.0.2-py3-none-any.whl |
|---|---|
| Size | 30.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
52bb180ae7efc54e8955550a53c09634a66f893e67e39c178a5e0a1563ef38b8
|
|
BLAKE2b-256 checksum How to use checksums |
d7455578c3f0b9d034527d63e82a0e0fabddcb644c39ae21e21f4f47808cef20
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 22, 2026.
Transparency log