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.

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.1.8
        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.1.8
    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.1.8

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

Built distribution (wheel)

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

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

Download URL grai_gate-0.1.8-py3-none-any.whl
Size 12.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
424d646a726b5af0ccda17b1d45b9a2cf31a8698fccbb5865c4f2d20af41d4c0
BLAKE2b-256 checksum
How to use checksums
605272d35c27250161b723b24b840488dfb808be3c4e74c0553e59b5798a7249
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.2

Security for grai-gate 0.1.8

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