Skip to main content

grai-gate

Marketplace PyPI pre-commit

Deterministic style gate for markdown written by coding agents. One Python engine, no model calls, no network. It scores sentence burstiness and flags structural patterns that survive spellcheck. It is a style gate, not an authorship detector.

Scope. Calibrated on non-fiction prose, from 134,522 posts. Dialogue-heavy fiction inflates sentence-length variation, so a pass on fiction is not evidence of anything.

On the v2 corpus (58 human-edited docs, 63 model-generated docs), the gate flagged 7 of 63 model docs and 3 of 58 human docs. It catches visible patterns, not provenance. Full report: VALIDATION.md.

GitHub Action

name: cadence
on:
  pull_request:
    paths: ['**.md', '**.mdx', '**.txt']
jobs:
  gate:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: adrianpeticila/grai-gate-action@v0.2.0
        with:
          fail-on-slop: "false"

The action scores only files changed in the pull request. It fetches the base ref itself, so a shallow checkout is fine. The default is advisory: the card lands in the log and the job stays green. Set fail-on-slop: "true" to block.

Inputs: path (scan target when no pull request base is available), fail-on-slop, verbose.

Python package

pipx run grai-gate README.md

or

pip install grai-gate
grai-gate docs/

Exit codes: 0 clean, 1 slop, 2 input error. The CLI accepts -h and --help.

pre-commit

repos:
  - repo: https://github.com/adrianpeticila/grai-gate-action
    rev: v0.2.0
    hooks:
      - id: grai-gate

The hook scores markdown, mdx, and plain text. It exits 1 on slop and stops the commit. Skip one commit with SKIP=grai-gate git commit.

One engine

src/grai_gate/gate.py is vendored byte-for-byte from the Antigravity plugin in the grai repo. Run python scripts/sync_engine.py --check to prove the copies match; it exits 1 on drift.

UTM attribution

The report card links to the Pro Cockpit. Attribution resolves from GRAI_UTM_SOURCE, then GITHUB_ACTIONS, then PRE_COMMIT. The installed PyPI command defaults to pypi; a direct engine run defaults to cli.

Metadata

Release files for grai-gate 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for grai-gate 0.2.1
File Size Uploaded Provenance Actions
grai_gate-0.2.1.tar.gz 16.4 kB Without provenance Details for grai_gate-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for grai-gate 0.2.1
File Interpreter ABI Platform Actions
grai_gate-0.2.1-py3-none-any.whl Python 3 none any Details for grai_gate-0.2.1-py3-none-any.whl

Total release size: 31.0 kB

Release files / grai_gate-0.2.1.tar.gz

Download URL grai_gate-0.2.1.tar.gz
Size 16.4 kB
Tags Source
SHA-256 checksum
How to use checksums
6f290161637dc0544362e29d3b27542ed72700cba0254441c31d2c0b8c65ff31
BLAKE2b-256 checksum
How to use checksums
ae41a6672acf3825a75cc9c28832d0fe03c8effcea812eaccabaaf11390a427a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / grai_gate-0.2.1-py3-none-any.whl

Download URL grai_gate-0.2.1-py3-none-any.whl
Size 14.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a578de2ec8650b48916262dc17ce9a7dad43cf040a19bd0f5fbd0ed4a36c80f7
BLAKE2b-256 checksum
How to use checksums
52c1079e8ab69c8a424837df84623c3deab5e88a1abe1a31affc4651d798b016
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Security for grai-gate 0.2.1

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page