grai-gate
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.
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.7
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.7
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.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| grai_gate-0.1.7-py3-none-any.whl | Python 3 | none | any | Details for grai_gate-0.1.7-py3-none-any.whl |
Release files / grai_gate-0.1.7-py3-none-any.whl
| Download URL | grai_gate-0.1.7-py3-none-any.whl |
|---|---|
| Size | 12.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
18972dad3fce2569390f23ae597fac4e68e9c4905740b412507d680a7cd5562f
|
|
BLAKE2b-256 checksum How to use checksums |
e04db507a9e85f0955d569ded31e8c79e1b02e8569867a4a226708d2cf60f0e6
|
| 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.7
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.