agent-prose 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. agent_prose-1.0.0/.github/workflows/publish.yml +33 -0
  2. agent_prose-1.0.0/.github/workflows/test.yml +37 -0
  3. agent_prose-1.0.0/.gitignore +14 -0
  4. agent_prose-1.0.0/.pre-commit-hooks.yaml +7 -0
  5. agent_prose-1.0.0/CONTRIBUTING.md +65 -0
  6. agent_prose-1.0.0/LAUNCH_POST.md +47 -0
  7. agent_prose-1.0.0/LICENSE +21 -0
  8. agent_prose-1.0.0/PKG-INFO +196 -0
  9. agent_prose-1.0.0/README.md +170 -0
  10. agent_prose-1.0.0/SECURITY.md +25 -0
  11. agent_prose-1.0.0/pyproject.toml +57 -0
  12. agent_prose-1.0.0/src/agent_prose/__init__.py +13 -0
  13. agent_prose-1.0.0/src/agent_prose/__main__.py +6 -0
  14. agent_prose-1.0.0/src/agent_prose/adapters/__init__.py +73 -0
  15. agent_prose-1.0.0/src/agent_prose/adapters/claude.md +21 -0
  16. agent_prose-1.0.0/src/agent_prose/adapters/copilot.md +21 -0
  17. agent_prose-1.0.0/src/agent_prose/adapters/gemini.md +21 -0
  18. agent_prose-1.0.0/src/agent_prose/adapters/grok.md +20 -0
  19. agent_prose-1.0.0/src/agent_prose/adapters/muse.md +20 -0
  20. agent_prose-1.0.0/src/agent_prose/cli.py +220 -0
  21. agent_prose-1.0.0/src/agent_prose/engine.py +1013 -0
  22. agent_prose-1.0.0/src/agent_prose/profiles/__init__.py +119 -0
  23. agent_prose-1.0.0/src/agent_prose/profiles/base.py +28 -0
  24. agent_prose-1.0.0/src/agent_prose/profiles/en_au.py +103 -0
  25. agent_prose-1.0.0/src/agent_prose/profiles/en_gb.py +24 -0
  26. agent_prose-1.0.0/src/agent_prose/profiles/en_us.py +28 -0
  27. agent_prose-1.0.0/tests/fixtures/clean_spec.md +21 -0
  28. agent_prose-1.0.0/tests/fixtures/code_heavy.md +24 -0
  29. agent_prose-1.0.0/tests/fixtures/mixed_violations.md +7 -0
  30. agent_prose-1.0.0/tests/fixtures/opt_out_file.md +6 -0
  31. agent_prose-1.0.0/tests/test_adapters.py +64 -0
  32. agent_prose-1.0.0/tests/test_cadence.py +85 -0
  33. agent_prose-1.0.0/tests/test_cli.py +90 -0
  34. agent_prose-1.0.0/tests/test_cli_advanced.py +98 -0
  35. agent_prose-1.0.0/tests/test_constructions.py +170 -0
  36. agent_prose-1.0.0/tests/test_fixtures.py +68 -0
  37. agent_prose-1.0.0/tests/test_locales.py +84 -0
  38. agent_prose-1.0.0/tests/test_shields.py +135 -0
@@ -0,0 +1,33 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ jobs:
8
+ pypi-publish:
9
+ name: Build and publish Python distribution to PyPI
10
+ runs-on: ubuntu-latest
11
+ permissions:
12
+ id-token: write
13
+ contents: read
14
+
15
+ steps:
16
+ - name: Check out repository
17
+ uses: actions/checkout@v4
18
+
19
+ - name: Set up Python
20
+ uses: actions/setup-python@v5
21
+ with:
22
+ python-version: "3.12"
23
+
24
+ - name: Install build dependencies
25
+ run: |
26
+ python -m pip install --upgrade pip
27
+ pip install build
28
+
29
+ - name: Build wheel and source distributions
30
+ run: python -m build
31
+
32
+ - name: Publish package distributions to PyPI
33
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,37 @@
1
+ name: Test Suite
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ test:
11
+ name: Python ${{ matrix.python-version }} on ${{ matrix.os }}
12
+ runs-on: ${{ matrix.os }}
13
+ strategy:
14
+ fail-fast: false
15
+ matrix:
16
+ os: [ubuntu-latest, windows-latest, macos-latest]
17
+ python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
18
+
19
+ steps:
20
+ - name: Check out repository
21
+ uses: actions/checkout@v4
22
+
23
+ - name: Set up Python ${{ matrix.python-version }}
24
+ uses: actions/setup-python@v5
25
+ with:
26
+ python-version: ${{ matrix.python-version }}
27
+
28
+ - name: Install test dependencies
29
+ run: |
30
+ python -m pip install --upgrade pip
31
+ pip install pytest
32
+
33
+ - name: Install agent-prose in editable mode
34
+ run: pip install -e .
35
+
36
+ - name: Run pytest test suite
37
+ run: pytest -v
@@ -0,0 +1,14 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ *$py.class
4
+ *.whl
5
+ dist/
6
+ build/
7
+ *.egg-info/
8
+ .pytest_cache/
9
+ .coverage
10
+ htmlcov/
11
+ .venv/
12
+ venv/
13
+ .DS_Store
14
+ .audit.jsonl
@@ -0,0 +1,7 @@
1
+ - id: agent-prose
2
+ name: agent-prose
3
+ description: Deterministic Anti-RLHF Stylometric Gate for Autonomous Agents by Nitivra
4
+ entry: agent-prose
5
+ language: python
6
+ types: [markdown]
7
+ stages: [pre-commit]
@@ -0,0 +1,65 @@
1
+ # Contributing to agent-prose
2
+
3
+ Thank you for your interest in improving `agent-prose`.
4
+
5
+ This project is created and maintained by **Nitivra** under the MIT License.
6
+
7
+ ---
8
+
9
+ ## 1. Guiding Principles
10
+
11
+ - **Zero Runtime Dependencies**: The core engine runs strictly on standard library Python modules (`re`, `pathlib`, `collections`, `statistics`, `json`, `locale`). Pull requests introducing external runtime dependencies will not be accepted.
12
+ - **Deterministic Stylometrics**: Rules target structural, syntactic and cadence distortions caused by Reinforcement Learning from Human Feedback (RLHF), rather than subjective stylistic preferences.
13
+ - **Sub-2ms Execution**: Every check must remain fast enough to run inside pre-commit hooks on every commit without slowing down developer velocity.
14
+
15
+ ---
16
+
17
+ ## 2. Contributing Regional Dialect Profiles
18
+
19
+ We welcome community contributions for regional dialect profiles (such as Canadian English `en-CA`, New Zealand English `en-NZ` or Indian English `en-IN`).
20
+
21
+ To add a new regional profile:
22
+
23
+ 1. Create a new module under `src/agent_prose/profiles/` (for example, `en_ca.py`).
24
+ 2. Instantiate a `DialectProfile` defining:
25
+ - `code`: The regional code (for example, `en-CA`).
26
+ - `name`: The authoritative dictionary or government standard.
27
+ - `allow_serial_comma`: Boolean indicating whether the Oxford comma is standard.
28
+ - `allow_ize_spelling`: Boolean indicating whether `-ize` spellings are accepted.
29
+ - `banned_stem_words`: Stems to flag.
30
+ - `context_exemptions`: Domain phrases where specific words are legitimate.
31
+ 3. Register the profile in `PROFILE_REGISTRY` in `src/agent_prose/profiles/__init__.py`.
32
+ 4. Add corresponding unit tests in `tests/test_locales.py`.
33
+
34
+ ---
35
+
36
+ ## 3. Development Workflow
37
+
38
+ ### Setup
39
+
40
+ Clone the repository and install test dependencies:
41
+
42
+ ```bash
43
+ git clone https://github.com/geheharidas/agent-prose.git
44
+ cd agent-prose
45
+ pip install pytest build
46
+ ```
47
+
48
+ ### Running Tests
49
+
50
+ Run the complete test suite:
51
+
52
+ ```bash
53
+ pytest -v
54
+ ```
55
+
56
+ All tests must pass before submitting a pull request.
57
+
58
+ ---
59
+
60
+ ## 4. Submitting Pull Requests
61
+
62
+ 1. Create a feature branch from `main`.
63
+ 2. Implement your changes with accompanying tests.
64
+ 3. Ensure all tests pass cleanly.
65
+ 4. Open a pull request against `main` describing the rationale and regional linguistic sources.
@@ -0,0 +1,47 @@
1
+ # Announcing agent-prose: An Anti-RLHF Stylometric Gate
2
+
3
+ Most AI linters search for human spelling errors.
4
+
5
+ Large language models rarely make those mistakes.
6
+
7
+ They miss the real reason readers detect machine prose in three seconds: uniform sentence length, evasive verbs and artificial symmetry.
8
+
9
+ When foundation models undergo reinforcement training, they develop repetitive structural habits:
10
+
11
+ First, monotone cadence. Systems output four or five consecutive sentences of nearly identical length.
12
+
13
+ Second, evasive linking verbs. Models decline to write direct statements. They choose weak filler instead of a direct 'is'.
14
+
15
+ Third, synthetic symmetry. Sentences get forced into formulaic balance clauses.
16
+
17
+ Fourth, weak tails. Paragraphs end with repetitive participial phrases.
18
+
19
+ In autonomous agent swarms, written quality reflects company credibility.
20
+
21
+ When an automated agent drafts technical specifications or architecture records, generic boilerplate erodes client trust.
22
+
23
+ Engineering teams need deterministic quality gates in their deployment pipelines.
24
+
25
+ Today, Nitivra releases agent-prose.
26
+
27
+ It is an open-source Python quality gate.
28
+
29
+ Zero dependencies.
30
+
31
+ Execution takes under two milliseconds.
32
+
33
+ The engine calculates syntactic variance across sliding five-sentence windows, requiring a standard deviation above 6.0 to break robotic cadence.
34
+
35
+ It provides native profiles for Australian English, American English and British English.
36
+
37
+ Supported platforms include Claude, Gemini and Grok, alongside Meta Muse and Microsoft Copilot.
38
+
39
+ The package is available on PyPI and GitHub under the MIT License.
40
+
41
+ Install:
42
+ pip install agent-prose
43
+
44
+ Repository:
45
+ https://github.com/geheharidas/agent-prose
46
+
47
+ How does your engineering team manage textual quality in autonomous agent workflows?
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Nitivra
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,196 @@
1
+ Metadata-Version: 2.5
2
+ Name: agent-prose
3
+ Version: 1.0.0
4
+ Summary: Deterministic Anti-RLHF Stylometric Gate for Autonomous Agents by Nitivra
5
+ Project-URL: Homepage, https://github.com/geheharidas/agent-prose
6
+ Project-URL: Repository, https://github.com/geheharidas/agent-prose.git
7
+ Author-email: Nitivra <hello@nitivra.com>
8
+ License-Expression: MIT
9
+ License-File: LICENSE
10
+ Keywords: anti-rlhf,autonomous-agents,burstiness,cadence,linter,llm,pre-commit,stylometrics,writing-quality
11
+ Classifier: Development Status :: 5 - Production/Stable
12
+ Classifier: Environment :: Console
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.9
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Programming Language :: Python :: 3.13
22
+ Classifier: Topic :: Software Development :: Quality Assurance
23
+ Classifier: Topic :: Text Processing :: Linguistic
24
+ Requires-Python: >=3.9
25
+ Description-Content-Type: text/markdown
26
+
27
+ <!-- writing-quality: off -->
28
+ # agent-prose
29
+
30
+ > Deterministic Anti-RLHF Stylometric Gate for Autonomous Agents.
31
+ > Created and maintained by **Nitivra**.
32
+
33
+ [![CI](https://github.com/geheharidas/agent-prose/actions/workflows/test.yml/badge.svg)](https://github.com/geheharidas/agent-prose/actions)
34
+ [![PyPI](https://img.shields.io/pypi/v/agent-prose.svg)](https://pypi.org/project/agent-prose/)
35
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
36
+ [![Python: 3.9+](https://img.shields.io/badge/python-3.9%2B-blue)](https://www.python.org/downloads/)
37
+
38
+ Traditional linters check human grammar. They search for misspellings and punctuation errors that modern large language models rarely make.
39
+
40
+ They completely miss the real reason human readers identify AI-generated text in seconds: **cadence symmetry, evasive verbs and synthetic balance**.
41
+
42
+ Foundation models trained through Reinforcement Learning from Human Feedback (RLHF) develop predictable stylometric tells:
43
+ - **Monotone Sentence Cadence**: Running four or five consecutive sentences of nearly identical word length (18 to 24 words).
44
+ - **Copula Avoidance**: Refusing to write direct statements like "X is Y", substituting evasive constructions such as "X serves as Y", "stands as" or "represents a".
45
+ - **Prestige Filler Stems**: Overusing academic scaffolding words like "crucial", "nuance", "bedrock", "linchpin" and "cornerstone".
46
+ - **Synthetic Balance**: Forcing thoughts into artificial balance structures like "not only X, but also Y".
47
+ - **Tacked-on Participial Tails**: Appending weak participial clauses to sentence endings (", ensuring that...", ", enabling...").
48
+
49
+ `agent-prose` is a zero-dependency Python gate and pre-commit hook that detects these structural distortions deterministically in under two milliseconds.
50
+
51
+ ---
52
+
53
+ ## Why It Matters
54
+
55
+ When software engineering teams deploy autonomous agents to generate documentation, pull request summaries, technical specifications and customer communications, text quality directly reflects company credibility.
56
+
57
+ If your documentation reads like generic corporate boilerplate, readers tune out immediately.
58
+
59
+ `agent-prose` replaces subjective editorial debates with an automated, reproducible quality gate in your continuous integration pipeline.
60
+
61
+ ---
62
+
63
+ ## What It Evaluates
64
+
65
+ 1. **Sliding-Window Burstiness Analysis**: Measures syntactic variance across five-sentence blocks. Requires sentence length standard deviation to reach at least 6.0, penalising monotone runs.
66
+ 2. **Direct Copula Enforcement**: Flags evasive linking verbs and restores direct declarative active voice.
67
+ 3. **Pluggable Dialect Packs**:
68
+ - **Australian English (`en-AU`)**: Australian Government Style Manual and Macquarie standard. Strict `-ise` spellings, British orthography (`colour`, `centre`) and Oxford comma banned.
69
+ - **American English (`en-US`)**: Chicago Manual of Style and AP standard. `-ize` spellings and serial comma permitted.
70
+ - **British English (`en-GB`)**: Oxford UK standard.
71
+ 4. **Two-Tier Severity Architecture**:
72
+ - **Blocking Defects (Exit Code 1)**: Fatal issues including non-ASCII smart quotes, invalid dialect spellings, contractions and raw flow arrows (`->`) in narrative prose.
73
+ - **Advisory Warnings**: Cadence anomalies, prestige stems and synthetic balance.
74
+ - **Promotion Quota (Exit Code 2)**: Accumulating four or more advisory warnings promotes the scan to a blocking process exit.
75
+ 5. **Agent Swarm Remediation Bounds**: Includes recommended two-pass repair loop specifications to prevent autonomous agents from getting trapped in circular editing loops.
76
+
77
+ ---
78
+
79
+ ## Installation
80
+
81
+ Install from PyPI:
82
+
83
+ ```bash
84
+ pip install agent-prose
85
+ ```
86
+
87
+ Or run instantly without installation using `uv`:
88
+
89
+ ```bash
90
+ uv tool run agent-prose path/to/document.md
91
+ ```
92
+
93
+ Or install directly from GitHub:
94
+
95
+ ```bash
96
+ pip install git+https://github.com/geheharidas/agent-prose.git
97
+ ```
98
+
99
+ ---
100
+
101
+ ## Quickstart
102
+
103
+ Scan a single document:
104
+
105
+ ```bash
106
+ agent-prose README.md
107
+ ```
108
+
109
+ Scan an entire directory recursively:
110
+
111
+ ```bash
112
+ agent-prose docs/
113
+ ```
114
+
115
+ Specify a dialect profile:
116
+
117
+ ```bash
118
+ # Australian English (strict -ise, colour, Oxford comma banned):
119
+ agent-prose --locale en-AU docs/
120
+
121
+ # American English (-ize, color, Oxford comma permitted):
122
+ agent-prose --locale en-US docs/
123
+ ```
124
+
125
+ Run in strict mode (all warnings become blocking errors):
126
+
127
+ ```bash
128
+ agent-prose --strict docs/
129
+ ```
130
+
131
+ Emit machine-readable JSON results for automated CI tooling:
132
+
133
+ ```bash
134
+ agent-prose --json docs/
135
+ ```
136
+
137
+ ---
138
+
139
+ ## Pre-Commit Hook Integration
140
+
141
+ Add `agent-prose` to your repository `.pre-commit-config.yaml` to gate pull requests automatically:
142
+
143
+ ```yaml
144
+ repos:
145
+ - repo: https://github.com/geheharidas/agent-prose
146
+ rev: v1.0.0
147
+ hooks:
148
+ - id: agent-prose
149
+ args: ["--locale", "en-AU"]
150
+ ```
151
+
152
+ ---
153
+
154
+ ## Dialect Resolution Cascade
155
+
156
+ `agent-prose` resolves your active regional profile through an automated 5-stage cascade:
157
+ 1. Command-line argument: `--locale <code|path>`
158
+ 2. Project configuration: `.proserc.json` or `[tool.agent-prose]` in `pyproject.toml`
159
+ 3. Environment variable: `AGENT_PROSE_LOCALE`
160
+ 4. Host operating system locale detection: `locale.getlocale()`
161
+ 5. Fallback baseline: `en-US`
162
+
163
+ ---
164
+
165
+ ## Multi-Agent Swarm Priming Adapters
166
+
167
+ Preventing errors before generation is faster than remediation. `agent-prose` provides calibration blocks tailored to specific model family failure modes:
168
+
169
+ - **Anthropic Claude**: Suppresses prestige academic scaffolding (`crucial`, `nuance`, `bedrock`).
170
+ - **Google Gemini**: Enforces burstiness variation and eliminates trailing participial clauses.
171
+ - **xAI Grok**: Suppresses informal conversational swagger and prose arrows (`->`).
172
+ - **Meta Muse / Llama**: Enforces strict dialect orthography and bans contractions.
173
+ - **Microsoft Copilot**: Eliminates corporate marketing fluff (`empower`, `seamless`) and conversational customer-service patter.
174
+
175
+ View adapter templates in `src/agent_prose/adapters/` or generate them dynamically:
176
+
177
+ ```python
178
+ from agent_prose.adapters import get_adapter_prompt
179
+
180
+ claude_prompt = get_adapter_prompt("claude", profile=None)
181
+ print(claude_prompt)
182
+ ```
183
+
184
+ ---
185
+
186
+ ## Zero Dependencies, Sub-2ms Latency
187
+
188
+ `agent-prose` relies exclusively on Python standard library modules (`re`, `pathlib`, `collections`, `statistics`, `json`, `locale`).
189
+
190
+ It introduces zero third-party supply chain risks, installs in seconds and scans complete technical specifications in under two milliseconds.
191
+
192
+ ---
193
+
194
+ ## License
195
+
196
+ MIT License. Copyright (c) 2026 **Nitivra**.
@@ -0,0 +1,170 @@
1
+ <!-- writing-quality: off -->
2
+ # agent-prose
3
+
4
+ > Deterministic Anti-RLHF Stylometric Gate for Autonomous Agents.
5
+ > Created and maintained by **Nitivra**.
6
+
7
+ [![CI](https://github.com/geheharidas/agent-prose/actions/workflows/test.yml/badge.svg)](https://github.com/geheharidas/agent-prose/actions)
8
+ [![PyPI](https://img.shields.io/pypi/v/agent-prose.svg)](https://pypi.org/project/agent-prose/)
9
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
10
+ [![Python: 3.9+](https://img.shields.io/badge/python-3.9%2B-blue)](https://www.python.org/downloads/)
11
+
12
+ Traditional linters check human grammar. They search for misspellings and punctuation errors that modern large language models rarely make.
13
+
14
+ They completely miss the real reason human readers identify AI-generated text in seconds: **cadence symmetry, evasive verbs and synthetic balance**.
15
+
16
+ Foundation models trained through Reinforcement Learning from Human Feedback (RLHF) develop predictable stylometric tells:
17
+ - **Monotone Sentence Cadence**: Running four or five consecutive sentences of nearly identical word length (18 to 24 words).
18
+ - **Copula Avoidance**: Refusing to write direct statements like "X is Y", substituting evasive constructions such as "X serves as Y", "stands as" or "represents a".
19
+ - **Prestige Filler Stems**: Overusing academic scaffolding words like "crucial", "nuance", "bedrock", "linchpin" and "cornerstone".
20
+ - **Synthetic Balance**: Forcing thoughts into artificial balance structures like "not only X, but also Y".
21
+ - **Tacked-on Participial Tails**: Appending weak participial clauses to sentence endings (", ensuring that...", ", enabling...").
22
+
23
+ `agent-prose` is a zero-dependency Python gate and pre-commit hook that detects these structural distortions deterministically in under two milliseconds.
24
+
25
+ ---
26
+
27
+ ## Why It Matters
28
+
29
+ When software engineering teams deploy autonomous agents to generate documentation, pull request summaries, technical specifications and customer communications, text quality directly reflects company credibility.
30
+
31
+ If your documentation reads like generic corporate boilerplate, readers tune out immediately.
32
+
33
+ `agent-prose` replaces subjective editorial debates with an automated, reproducible quality gate in your continuous integration pipeline.
34
+
35
+ ---
36
+
37
+ ## What It Evaluates
38
+
39
+ 1. **Sliding-Window Burstiness Analysis**: Measures syntactic variance across five-sentence blocks. Requires sentence length standard deviation to reach at least 6.0, penalising monotone runs.
40
+ 2. **Direct Copula Enforcement**: Flags evasive linking verbs and restores direct declarative active voice.
41
+ 3. **Pluggable Dialect Packs**:
42
+ - **Australian English (`en-AU`)**: Australian Government Style Manual and Macquarie standard. Strict `-ise` spellings, British orthography (`colour`, `centre`) and Oxford comma banned.
43
+ - **American English (`en-US`)**: Chicago Manual of Style and AP standard. `-ize` spellings and serial comma permitted.
44
+ - **British English (`en-GB`)**: Oxford UK standard.
45
+ 4. **Two-Tier Severity Architecture**:
46
+ - **Blocking Defects (Exit Code 1)**: Fatal issues including non-ASCII smart quotes, invalid dialect spellings, contractions and raw flow arrows (`->`) in narrative prose.
47
+ - **Advisory Warnings**: Cadence anomalies, prestige stems and synthetic balance.
48
+ - **Promotion Quota (Exit Code 2)**: Accumulating four or more advisory warnings promotes the scan to a blocking process exit.
49
+ 5. **Agent Swarm Remediation Bounds**: Includes recommended two-pass repair loop specifications to prevent autonomous agents from getting trapped in circular editing loops.
50
+
51
+ ---
52
+
53
+ ## Installation
54
+
55
+ Install from PyPI:
56
+
57
+ ```bash
58
+ pip install agent-prose
59
+ ```
60
+
61
+ Or run instantly without installation using `uv`:
62
+
63
+ ```bash
64
+ uv tool run agent-prose path/to/document.md
65
+ ```
66
+
67
+ Or install directly from GitHub:
68
+
69
+ ```bash
70
+ pip install git+https://github.com/geheharidas/agent-prose.git
71
+ ```
72
+
73
+ ---
74
+
75
+ ## Quickstart
76
+
77
+ Scan a single document:
78
+
79
+ ```bash
80
+ agent-prose README.md
81
+ ```
82
+
83
+ Scan an entire directory recursively:
84
+
85
+ ```bash
86
+ agent-prose docs/
87
+ ```
88
+
89
+ Specify a dialect profile:
90
+
91
+ ```bash
92
+ # Australian English (strict -ise, colour, Oxford comma banned):
93
+ agent-prose --locale en-AU docs/
94
+
95
+ # American English (-ize, color, Oxford comma permitted):
96
+ agent-prose --locale en-US docs/
97
+ ```
98
+
99
+ Run in strict mode (all warnings become blocking errors):
100
+
101
+ ```bash
102
+ agent-prose --strict docs/
103
+ ```
104
+
105
+ Emit machine-readable JSON results for automated CI tooling:
106
+
107
+ ```bash
108
+ agent-prose --json docs/
109
+ ```
110
+
111
+ ---
112
+
113
+ ## Pre-Commit Hook Integration
114
+
115
+ Add `agent-prose` to your repository `.pre-commit-config.yaml` to gate pull requests automatically:
116
+
117
+ ```yaml
118
+ repos:
119
+ - repo: https://github.com/geheharidas/agent-prose
120
+ rev: v1.0.0
121
+ hooks:
122
+ - id: agent-prose
123
+ args: ["--locale", "en-AU"]
124
+ ```
125
+
126
+ ---
127
+
128
+ ## Dialect Resolution Cascade
129
+
130
+ `agent-prose` resolves your active regional profile through an automated 5-stage cascade:
131
+ 1. Command-line argument: `--locale <code|path>`
132
+ 2. Project configuration: `.proserc.json` or `[tool.agent-prose]` in `pyproject.toml`
133
+ 3. Environment variable: `AGENT_PROSE_LOCALE`
134
+ 4. Host operating system locale detection: `locale.getlocale()`
135
+ 5. Fallback baseline: `en-US`
136
+
137
+ ---
138
+
139
+ ## Multi-Agent Swarm Priming Adapters
140
+
141
+ Preventing errors before generation is faster than remediation. `agent-prose` provides calibration blocks tailored to specific model family failure modes:
142
+
143
+ - **Anthropic Claude**: Suppresses prestige academic scaffolding (`crucial`, `nuance`, `bedrock`).
144
+ - **Google Gemini**: Enforces burstiness variation and eliminates trailing participial clauses.
145
+ - **xAI Grok**: Suppresses informal conversational swagger and prose arrows (`->`).
146
+ - **Meta Muse / Llama**: Enforces strict dialect orthography and bans contractions.
147
+ - **Microsoft Copilot**: Eliminates corporate marketing fluff (`empower`, `seamless`) and conversational customer-service patter.
148
+
149
+ View adapter templates in `src/agent_prose/adapters/` or generate them dynamically:
150
+
151
+ ```python
152
+ from agent_prose.adapters import get_adapter_prompt
153
+
154
+ claude_prompt = get_adapter_prompt("claude", profile=None)
155
+ print(claude_prompt)
156
+ ```
157
+
158
+ ---
159
+
160
+ ## Zero Dependencies, Sub-2ms Latency
161
+
162
+ `agent-prose` relies exclusively on Python standard library modules (`re`, `pathlib`, `collections`, `statistics`, `json`, `locale`).
163
+
164
+ It introduces zero third-party supply chain risks, installs in seconds and scans complete technical specifications in under two milliseconds.
165
+
166
+ ---
167
+
168
+ ## License
169
+
170
+ MIT License. Copyright (c) 2026 **Nitivra**.
@@ -0,0 +1,25 @@
1
+ # Security Policy
2
+
3
+ ## Supported Versions
4
+
5
+ Only the latest published version of `agent-prose` receives security updates.
6
+
7
+ | Version | Supported |
8
+ | :--- | :--- |
9
+ | 1.0.x | Yes |
10
+
11
+ ---
12
+
13
+ ## Architecture and Dependencies
14
+
15
+ `agent-prose` has zero third-party runtime dependencies. The entire package executes strictly on Python standard library modules (`re`, `pathlib`, `collections`, `statistics`, `json`, `locale`).
16
+
17
+ This architecture eliminates third-party supply chain risks and network vulnerability attack surfaces.
18
+
19
+ ---
20
+
21
+ ## Reporting a Vulnerability
22
+
23
+ If you discover a potential security defect, please report it responsibly by emailing Nitivra at `hello@nitivra.com`.
24
+
25
+ We investigate all reports promptly and acknowledge valid contributions.
@@ -0,0 +1,57 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "agent-prose"
7
+ version = "1.0.0"
8
+ description = "Deterministic Anti-RLHF Stylometric Gate for Autonomous Agents by Nitivra"
9
+ readme = "README.md"
10
+ license = "MIT"
11
+ requires-python = ">=3.9"
12
+ authors = [
13
+ { name = "Nitivra", email = "hello@nitivra.com" }
14
+ ]
15
+ classifiers = [
16
+ "Development Status :: 5 - Production/Stable",
17
+ "Environment :: Console",
18
+ "Intended Audience :: Developers",
19
+ "License :: OSI Approved :: MIT License",
20
+ "Operating System :: OS Independent",
21
+ "Programming Language :: Python :: 3",
22
+ "Programming Language :: Python :: 3.9",
23
+ "Programming Language :: Python :: 3.10",
24
+ "Programming Language :: Python :: 3.11",
25
+ "Programming Language :: Python :: 3.12",
26
+ "Programming Language :: Python :: 3.13",
27
+ "Topic :: Software Development :: Quality Assurance",
28
+ "Topic :: Text Processing :: Linguistic",
29
+ ]
30
+ keywords = [
31
+ "llm",
32
+ "autonomous-agents",
33
+ "anti-rlhf",
34
+ "stylometrics",
35
+ "writing-quality",
36
+ "pre-commit",
37
+ "linter",
38
+ "burstiness",
39
+ "cadence",
40
+ ]
41
+ dependencies = []
42
+
43
+ [project.scripts]
44
+ agent-prose = "agent_prose.cli:main"
45
+
46
+ [project.urls]
47
+ Homepage = "https://github.com/geheharidas/agent-prose"
48
+ Repository = "https://github.com/geheharidas/agent-prose.git"
49
+
50
+ [tool.hatch.build.targets.wheel]
51
+ packages = ["src/agent_prose"]
52
+
53
+ [tool.pytest.ini_options]
54
+ testpaths = ["tests"]
55
+ python_files = ["test_*.py"]
56
+ pythonpath = ["src"]
57
+