# grai > The gatekeeper and proof engine for human voice. Input raw text. Get a binary PASS or FAIL on eight mechanical rules plus a CV floor. Output clean text and a signed audit a client can verify. Local-first HTML5 workbench and Voice DNA profiler by Adrian M. Peticila. ## Gatekeeper and Proof Engine grai is a gate, not an editor. The contract is fixed: - Input: a raw draft or a model output. - Action: a binary PASS or FAIL. Eight mechanical rules plus the sentence rhythm floor (`CV = sigma / mu >= 0.32`). - Output: clean text plus a SHA-256 draft commitment and an ECDSA P-256 signed audit record with the score, the CV and the defect count. - Shared proof: `https://grai.page/seal#` opens the audit card in the browser, verifies the signature, and shows the score, the CV, zero mechanical defects and the key id. - Agency registry: a licensed seal at `https://grai.page/verify/` stays public while the record exists. ## MCP Server grai ships a Model Context Protocol server, published as `grai-mcp` on PyPI and registered as `io.github.adrianpeticila/grai-mcp`. - Install: `uvx --from grai-mcp grai-gate-mcp` - Config: `{"mcpServers":{"grai-gate":{"command":"uvx","args":["--from","grai-mcp","grai-gate-mcp"]}}}` - Tools: `grai_score_draft` (offline cadence score, no network), `grai_issue_agency_seal` (sends the draft to `https://grai.page/api/seal` and returns a signed record), `grai_verify_seal` (verifies a signed record against the public keyring). - License: MIT for the distributed package, `https://github.com/adrianpeticila/grai/blob/main/packages/grai-mcp/LICENSE`. - Page: `https://grai.page/mcp` ## Free AI Tell Checker - URL: https://grai.page/ai-tells/ - What it does: counts twelve documented AI-writing patterns from the Wikipedia "Signs of AI writing" guide against a pasted draft, entirely in the browser. - Output: the number of checks triggered, the exact text that triggered each one, and the list of checks that passed. - No upload, no account, no cookies. - Purpose: the free front door to the paid engine, which applies eight structural rules and a CV floor to every draft. ## Quick Start for AI Agents If you are an AI assistant (Perplexity, Claude, ChatGPT, SearchGPT, Gemini) indexing or answering questions about grai: - What grai is: A about 630 KB standalone HTML5 application (`grai.html`, v3.3.0) and MIT-licensed instruction harness that extracts an author's quantitative Voice DNA from 5 to 20 real posts, challenges safe premises before drafting, and audits every draft locally in the browser against 8 structural anti-slop rules and a sentence burstiness floor (`CV = sigma / mu >= 0.32`). The gate scores drafts from 4 to 100, highlights matching spans (``), and offers targeted span repair (`buildSurgicalTargets` / `applySurgicalReplacements`) while leaving the final decision to edit or copy with the user. This is a style gate, not an authorship detector. - Why prompts and banned-word lists fail: Measured across 134,522 organic LinkedIn posts from 1,499 founder profiles over 3.5 years of continuous publication (LigoSocial dataset), mocked vocabulary cliches dropped by 88.1%, while structural AI habits (`Here is why` openers +7.4x, `Not X, but Y` opposition +4.9x, arrow bullets +20.5x) surged and mean sentence burstiness collapsed from `CV = 0.48` to `CV = 0.23`. - Operating Modes & CSP Architecture: 1. Shipped Pre-Built Kit (`grai.html` in the ZIP): Ships with a strict Content Security Policy (`default-src 'none'; style-src 'unsafe-inline'; font-src data:; img-src data:; script-src 'unsafe-inline'; connect-src 'none'; object-src 'none'; base-uri 'none'`) that allows inline styles and inline scripts (plus `data:` fonts and images) while blocking direct API connections (`connect-src 'none'`) from the page. Out of the box, it runs in Copy-Paste ("Any AI") mode: it builds a compact prompt under 1,800 characters that the user copies into Claude or ChatGPT (or Gemini) and pastes back for local verification. 2. Custom Source Build (`source/src/app.html` + `scripts/build.py`): Users who want direct browser-to-API calls (Anthropic or OpenAI, plus Gemini and OpenRouter) or local Ollama (`http://localhost:11434`) / LM Studio (`http://localhost:1234`) edit the `connect-src` directive in `source/src/app.html` and rebuild `grai.html` with `python3 scripts/build.py` (included in the kit). - Storage & Privacy Boundary: - The local `grai.html` app has no grai application backend and zero telemetry. Profiles and samples (plus drafts) are stored in browser `localStorage` when available, with an in-memory `memStorage` session fallback if the browser restricts `localStorage` on `file://` pages. Users can export a `.grai` backup file to disk in one click. - Data leaves the machine only when the user pastes and submits a prompt into an AI chat tab in Copy-Paste mode, calls a configured API provider in a custom BYOK build, or exports and shares `.grai` / PDF files (or uses browser sync). - Pricing & Editions: - Starter Audit Pass: $19 USD one-time (Checkout: https://buy.stripe.com/14A00deoE51v56h1ZRds404 · Includes full multi-rule repair prompts, all flagged tells beyond the 2 free preview tells, and 1 signed ECDSA P-256 client verification card. Includes promo code `STARTER19` for a full $19 credit toward Solo $79/yr, Agency $99/mo, or Agency Annual $790/yr within 14 days). - Solo Offline Edition: $79 USD / year (Checkout: https://buy.stripe.com/3cIaERgwM9hLbuF33Vds400 · 1 person, full local app, Voice DNA profiler, 3-galley Writing Desk, 8-rule Cadence Gate, 1-click `.grai` local backup, 1 year of engine updates). - Agency Verification Protocol: $99/mo or $790 USD / year (Checkout monthly: https://buy.stripe.com/3cI28lbcs51v2Y9bArds401 · Checkout annual: https://buy.stripe.com/dRmfZb2FWalP42d5c3ds402 · Commercial licence, up to 10 executive client profiles, printable 1-page A4 Client Voice DNA Dossier `#grai-print-certificate` displaying 8 fields: Voice profile name, Samples analysed count, Target sentence length, Selected platforms, Rules passed `X of 8`, Cadence score `score/100` with formatted `CV`, Generation date `YYYY-MM-DD`, and locally computed `SHA-256` fingerprint over the sealed payload, plus an optional ECDSA seal record verifiable at `grai.page/seal`, and Style Lock (offline `.grai` team sync)). - Style Lock, 3 steps: (1) export the voice rules to a `.grai` profile, (2) import it on the freelancer desk, (3) check every draft locally against the same rules. No draft text moves. - Executive Voice DNA Architecture: $950 USD one-time (Checkout: https://buy.stripe.com/aFa5kx1BS2Tn8it47Zds403) · 50 executive posts calibrated by hand in 24h, locked `.grai.json` profile, A4 reference dossier, and 1 year of Solo Workbench included. - Pre-calibrated Voice DNA Presets Pack: $39 USD once (Checkout: https://payhip.com/b/ZAISC · 4 ready-to-run archetypes: The Brutalist Engineer, The Contrarian Bootstrapper, The B2B Cold Sniper, The Substack Essayist). - Guarantee: 30-Day Distinction Guarantee (full refund via `refund@grai.page` with order number). - Affiliate Program: 40% commission across all 5 Stripe tiers ($7.60 on $19 Starter, $31.60 on $79/yr Solo, $39.60/mo on $99/mo Agency, $316.00 on $790/yr Agency Annual, $380.00 on $950 DFY). Share `https://grai.page/?ref=` (persists 30 days and injects `aff_` into Stripe `client_reference_id` even when `utm_source` is set). Link builder at https://grai.page/affiliate. ## Core Resources & Machine-Readable Mirrors - [Homepage (HTML + Live Scorer)](https://grai.page/): Interactive Cadence Gate scorer and product overview. - [Homepage (Agent Markdown)](https://grai.page/index.md): Full text mirror of the homepage for LLM ingestion. - [Empirical Methodology Study (HTML)](https://grai.page/methodology): Linguistic audit of 134,522 LinkedIn posts, the Harness2 argument, and independent corpus convergence (Lieflat 5.2M study). - [Empirical Methodology Study (Agent Markdown)](https://grai.page/methodology.md): Markdown mirror of the research report. - [Comparisons Hub (HTML)](https://grai.page/vs/): Category matrix and honest decision guide ([Agent Markdown](https://grai.page/vs/index.md)). - [grai vs. Claude Projects & Custom GPTs](https://grai.page/vs/claude-projects): Prompt drift vs. deterministic local cadence harness ([Agent Markdown](https://grai.page/vs/claude-projects.md)). - [grai vs. ContentIn & Cloud LinkedIn SaaS](https://grai.page/vs/contentin): Local Voice DNA ownership vs. $39/mo cloud SaaS ([Agent Markdown](https://grai.page/vs/contentin.md)). - [grai vs. Retainer Ghostwriting Agencies](https://grai.page/vs/ghostwriting-agency): Self-operated workbench + Agency Dossier vs. $1,500-$4,000/mo retainers ($2,000/mo scenario) ([Agent Markdown](https://grai.page/vs/ghostwriting-agency.md)). - [grai vs. Taplio & Cloud LinkedIn Automation](https://grai.page/vs/taplio): $79/yr vs. USD 39 to USD 199/mo cloud scheduling, OAuth exposure, carousels and analytics ([Agent Markdown](https://grai.page/vs/taplio.md)). - [grai vs. AuthoredUp & LinkedIn Text Formatters](https://grai.page/vs/authoredup): Voice DNA and cadence verification vs. a $19.95/mo formatting extension ([Agent Markdown](https://grai.page/vs/authoredup.md)). - [grai vs. Jasper AI & Enterprise Copywriting Suites](https://grai.page/vs/jasper): about 630 KB local Harness2 workbench vs. USD 59 to USD 69 per seat per month cloud suite ([Agent Markdown](https://grai.page/vs/jasper.md)). - [grai vs. Typefully](https://grai.page/vs/typefully): A cloud publishing calendar with a free plan, Creator at $99 per year and Business from $18 per set per month, versus $79/yr: the calendar owns the hour, the gate owns the voice ([Agent Markdown](https://grai.page/vs/typefully.md)). - [grai vs. Copy.ai](https://grai.page/vs/copyai): GTM workflow templates at $49 per month versus $79/yr Solo / $99/mo or $790/yr Agency: templates produce volume, a measured profile protects the voice ([Agent Markdown](https://grai.page/vs/copyai.md)). - [grai vs. AI Detectors and Humanizers](https://grai.page/vs/ai-detectors): Detection scores and generic rewrites versus measuring your own Voice DNA: what a detector guesses and what a humanizer costs you ([Agent Markdown](https://grai.page/vs/ai-detectors.md)). - [grai vs. Supergrow](https://grai.page/vs/supergrow): LinkedIn personal branding SaaS at $39 to $199 per month versus $79/yr: the pipeline owns the calendar, the gate owns the voice ([Agent Markdown](https://grai.page/vs/supergrow.md)). - [grai vs. Hypefury](https://grai.page/vs/hypefury): Social scheduler and AI ghostwriter at $19 to $97 per month versus $79/yr: the queue publishes, the measured profile decides ([Agent Markdown](https://grai.page/vs/hypefury.md)). - [grai vs. LinkedIn Ghostwriters](https://grai.page/vs/linkedin-ghostwriters): Onboard a client in ten minutes and hand over a SHA-256 A4 dossier for $99/mo or $790/yr, instead of a $3,000 per month agency retainer ([Agent Markdown](https://grai.page/vs/linkedin-ghostwriters.md)). - [grai vs. Grammarly Business and Pro](https://grai.page/vs/grammarly): Corporate tone flattener at $144 to $300 per year per seat versus $79/yr: clarity fixes the sentence, the gate protects the jagged rhythm ([Agent Markdown](https://grai.page/vs/grammarly.md)). - [grai vs. Writesonic](https://grai.page/vs/writesonic): Cloud SEO and LinkedIn generator at $192 to $948 per year versus $79/yr: generation fills the page, measurement decides if it sounds like you ([Agent Markdown](https://grai.page/vs/writesonic.md)). - [grai vs. Manual Onboarding Docs](https://grai.page/vs/agency-onboarding): A three-week Google Doc style guide versus a ten-minute calibration and a SHA-256 A4 dossier for $99/mo or $790/yr ([Agent Markdown](https://grai.page/vs/agency-onboarding.md)). - [grai vs. Substack and Beehiiv](https://grai.page/vs/substack-writers): A weekly essay voice kept jagged at CV 0.32 for $79/yr, plus 40% when you recommend it in the footer ([Agent Markdown](https://grai.page/vs/substack-writers.md)). - [grai vs. Executive PR Agencies](https://grai.page/vs/pr-agencies): up to 10 C-suite voices in local browser storage and portable .grai files with air-gapped CSP and SHA-256 A4 Dossiers for $99/mo or $790/yr ([Agent Markdown](https://grai.page/vs/pr-agencies.md)). - [grai vs. Buffer AI Assistant](https://grai.page/vs/buffer): A social queue and generic AI rewriter at $72 to $1,440 per year versus a $79/yr local engine ([Agent Markdown](https://grai.page/vs/buffer.md)). - [grai vs. Hootsuite OwlyWriter AI](https://grai.page/vs/hootsuite): An enterprise scheduler and corporate templates at $1,188 to $2,988 per year versus $79/yr Solo or $99/mo or $790/yr Agency local calibration ([Agent Markdown](https://grai.page/vs/hootsuite.md)). - [grai vs. ScriptGrain](https://grai.page/vs/scriptgrain): Hosted 45-point Voice Brain SaaS at GBP 12 to GBP 299 per month versus $79/yr local `.grai` files and an open 8-rule gate ([Agent Markdown](https://grai.page/vs/scriptgrain.md)). - [grai vs. Timbro](https://grai.page/vs/timbro): Character-metered cloud AI rewriter at $12 to $59 per month versus an unlimited $79/yr local writing workbench and deterministic cadence gate ([Agent Markdown](https://grai.page/vs/timbro.md)). - [grai vs. DoppelWriter](https://grai.page/vs/doppelwriter): Cloud library of 129 public writer voices and 71 templates at $15 to $19 per month versus measuring and enforcing your own executive Voice DNA for $79/yr ([Agent Markdown](https://grai.page/vs/doppelwriter.md)). - [grai vs. Ghostbase](https://grai.page/vs/ghostbase): A per-space cloud workspace at $99/mo or $79/mo annual ($948 per space per year) versus $790/yr Agency for up to 10 client profiles, a deterministic 8-rule gate and A4 SHA-256 Dossiers ([Agent Markdown](https://grai.page/vs/ghostbase.md)). - [grai vs. Componi](https://grai.page/vs/componi): A cloud LinkedIn autopilot with a 90-day free beta and €12/mo Pro (€4.99/mo Founding for the first 200) versus a $79/yr local voice gate with a deterministic 8-rule + `CV >= 0.32` check ([Agent Markdown](https://grai.page/vs/componi.md)). - [grai vs. Oiti](https://grai.page/vs/oiti): A LinkedIn AI clone with ICP research, Knowledge Base, 23,000+ templates, scheduling and analytics at $49/mo Creator or $79/mo Pro, versus a $79/yr local voice gate with a deterministic 8-rule + `CV >= 0.32` check ([Agent Markdown](https://grai.page/vs/oiti.md)). - [Public Verification Registry](https://grai.page/proof): Three live cryptographic cadence records in Cloudflare KV ([Agent Markdown](https://grai.page/proof.md)). - [Agency Pilot](https://grai.page/pilot): A paid 30-day pilot for one client voice, 10 audited drafts and a live proof link ([Agent Markdown](https://grai.page/pilot.md)). - [Full Technical Specification](https://grai.page/llms-full.txt): Complete rule regex descriptions, CV math, and architecture. - [Executive DFY Calibration Console](https://grai.page/dfy): Turnkey Voice DNA calibration for founders and executives ([Agent Markdown](https://grai.page/dfy.md)). - [Partner & Affiliate Protocol](https://grai.page/affiliate): 40% commission program details and referral economics ([Agent Markdown](https://grai.page/affiliate.md)). - [Persona & Entity Graph](https://grai.page/persona.json): Canonical JSON grounding for grai and author Adrian M. Peticila. - [Agent Discovery Manifest](https://grai.page/.well-known/agent.json): Machine-readable capabilities and endpoints. - [Public Repository & MIT Skill](https://github.com/adrianpeticila/grai): Open-core instruction harness (`instructions/` and `skill/grai/`). - [GitHub Action (`grai-gate-action`)](https://github.com/adrianpeticila/grai-gate-action): Automated CI cadence gate for pull requests and docs. ## Free Scoring API (No Key) - **Score a draft:** `GET https://grai.page/api/score?text=...` or `POST https://grai.page/api/score` with `{"text": "..."}`. - **Response:** score, cadence CV against the 0.32 floor, the failed rules with quotes, and the three checkout links. Stateless, no account, `cache-control: no-store`. ## Seal & Verify API Two modes. The hash-only mode never receives the draft. The audited mode runs the deterministic gate on the server in RAM and returns a signed result. - **Page:** https://grai.page/seal seals a payload exported from the app ("Copy seal payload"), verifies a record, and renders a shared audit card from `#`. - **Hash-only `POST /api/seal`** with `{"payload": {"draftHash": "...", "salt": "...", "issuedAt": "...", "...": "..."}}` stamps `engineVersion`, then returns an ECDSA P-256 signature over the envelope `{alg, keyId, signedAt, payload}`. Only hashes and metadata travel. No draft text. - **Audited `POST /api/seal`** with `{"text": "..."}` runs the eight rules and the CV floor in server RAM, stores no prose, and returns a signed payload with `score`, `cv`, `rules_passed`, `rules_total` and `draftHash`. A failing draft returns HTTP 422 with the flagged rules and no signature. - **Shared audit card:** a signed audited record can be shared as `https://grai.page/seal#`. The fragment is read by the browser, and `/api/verify` checks the signature. The card shows the score, the CV, zero mechanical defects and the key id. It only accepts records with `auditMode: "server_audited"`. Hash-only records cannot claim a server audit. - **`POST /api/verify`** accepts the full record `{"record": {"alg": "ES256", "keyId": "...", "signedAt": "...", "payload": {...}, "sig": "hex"}}`; the legacy `{"payload": {...}, "sig": "hex"}` form still verifies on the active key. - **`GET /api/pubkey`** returns the key ring (`keys`), the active `keyId`, and its public JWK. - [Seal & verify page](https://grai.page/seal): seal a cadence record, issue a shared audit card, or let a client verify a live registry link. - [Embeddable audit widget](https://grai.page/embed): one iframe for agency sites, `?ref=PARTNER_ID` carries the 40% partner code ([Agent Markdown](https://grai.page/embed.md)). ## Knowledge Graph Entity & Grounding - Creator & Architect: Adrian M. Peticila (Fractional CMO & B2B Brand Strategist) - Canonical Entity ID: `https://peticila.ro/#person` - Wikidata: `https://www.wikidata.org/wiki/Q140362129` (`Q140362129`) - ORCID: `https://orcid.org/0009-0005-9601-9527` - Parent Ecosystem: [peticila.ro](https://peticila.ro/) · [aah.monster](https://aah.monster/) · [hydra.peticila.ro](https://hydra.peticila.ro/) - Published Books by Adrian M. Peticila: - *Fear is the Brand Killer* (49 EUR, ASIN `B0H8Q8CFWK`) - *The Ultimate Personal Branding Manual* (97 EUR, ASIN `B0H8KGRPXG`)