# grai: stop publishing AI slop with your name on it

> **The personal voice engine. Local-first HTML5 workbench. Zero subscription.**
> Draft faster with AI without the polite, robotic ChatGPT smell that kills your authority. grai extracts your Voice DNA and audits every draft against your structural rules and rhythm floor.

- **Canonical URL:** https://grai.page/
- **Methodology Study:** https://grai.page/methodology
- **Comparisons Hub:** https://grai.page/vs/
- **Full LLM Spec:** https://grai.page/llms-full.txt
- **Author:** Adrian M. Peticila (`https://peticila.ro/#person` · Wikidata `Q140362129` · ORCID `0009-0005-9601-9527`)
- **GitHub (MIT Skill & Instructions):** https://github.com/adrianpeticila/grai

---

## 1. Two Operating Modes & Local Privacy Boundary

1. **Shipped Pre-Built Kit (`grai.html`, 622 KB): Local App with Direct API Connections Blocked by Default (Copy-Paste Mode)**
   The pre-built `grai.html` file ships with a 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, self-contained prompt under 1,800 characters that you copy into your existing Claude or ChatGPT web tab (or Gemini), then paste back into `grai` for local verification.

2. **Custom Source Build (`source/src/app.html` + `scripts/build.py`): Direct BYOK API & Local Ollama Mode**
   If you want direct browser-to-API generation (Anthropic or OpenAI, plus Gemini and OpenRouter) or local generation via Ollama (`http://localhost:11434`) or 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). Direct requests go from your browser to the endpoint you configured (subject to standard browser CORS rules when opened via `file://`), never through a `grai` application backend.

3. **Storage & Data Handling:**
   - Voice profiles and writing samples (along with drafts) are stored in your browser's `localStorage` (`ps:voices`, `ps:active`, `ps:mode`, `ps:deskLang`, `ps:ai`) when available. If your browser settings or private-browsing mode block `localStorage` on local `file://` pages, `grai` falls back to in-memory session storage (`memStorage`), which keeps your work only until the browser tab is closed. Use the 1-click `.grai` backup button to save your profiles as a local file on disk.
   - Data leaves your machine only when: (a) you paste and submit a prompt into Claude or ChatGPT (or Gemini) in Copy-Paste mode, (b) you run a custom source build with BYOK enabled and send a prompt to your selected API provider, or (c) you export a `.grai` backup file or print a PDF Dossier and share it yourself (or your own browser profile syncs local data across devices).

---

## 2. Why Prompts Fail, and How grai Enforces Your Spine

Most AI writing tools fail because they rely on simple word blocklists. Our linguistic audit of **134,522 LinkedIn posts** (LigoSocial dataset, 2023 to 2026) proved that while mocked words dropped by 88.1%, structural AI tells exploded:
- `"Here is why"` openings grew **7.4x** (1.3% to 9.6%).
- `"Not X, but Y"` opposition formulas grew **4.9x** (1.2% to 5.9%).
- Arrow and emoji bullet cascades grew **20.5x** (0.6% to 12.3%).
- Sentence length variation (`CV = sigma / mu`) collapsed by **52.1%** (from `0.48` human burstiness down to `0.23` flat metronome rhythm).

### The Deterministic Signal Chain
1. **01 VOICE DNA PROFILER:** Paste 5 to 20 of your real posts. `grai` measures your median sentence length and burstiness coefficient (`CV`). It records your sentence starters and signature vocabulary.
2. **02 PREMISE SPARRING & THE WRITING DESK:** Before drafting, `grai` challenges safe or unanchored ideas (`Counter-Punch`, `Adopt Angle`, or `Bypass`). It then drafts three distinct editorial galleys simultaneously:
   - **Scalpel:** Short hook, sharp rhythm, compressed thesis.
   - **Broadsheet:** Concrete story first, takeaway last.
   - **Ledger:** Hard numbers and empirical proof first.
3. **03 THE CADENCE GATE:** Every draft is audited locally in your browser against six structural regex rules (`CONTRASTIVE_NEGATION`, `LESS_MORE_SYMMETRY`, `EPIPHANY_OPENER`, `ARROW_BULLET_SLOP`, `TRIADIC_PADDING`, `LEXICAL_SLOP`) and a mathematical sentence-length burstiness floor (`CV = sigma / mu >= 0.32`). The gate scores your draft from 4 to 100, highlights matching spans in the editor (`<mark class="slop-mark">`), and offers targeted span repair (`buildSurgicalTargets` / `applySurgicalReplacements`) while leaving the final decision to edit or copy with you.

---

## 3. Economic Comparison & Side-by-Side Evaluations

| Path | Real Cost | Execution Model | Reality |
|---|---|---|---|
| **1. Write manually** | $0 software | 100% manual | High authority, hard to sustain alongside company operations. |
| **2. Retainer ghostwriting agency** | $1,500 to $4,000 / mo ($18k to $48k / yr; $24k/yr at $2k/mo scenario) | Done-for-you human service | Human service (interviews, research, full drafting). Agencies vary in how they use AI: ask who drafts the posts, what editing is included, and how data is handled. |
| **3. Cloud AI wrapper SaaS** | $39 to $99 / mo ($468 to $1,188 / yr) | Hosted cloud app | Recurring monthly subscription for cloud templates and hosted workflows. |
| **4. Raw ChatGPT / Claude** | $20 / mo ($240 / yr) | Prompt + manual rewrite | General-purpose chat models. Prompt instructions alone lack a deterministic burstiness check, so writers review and polish the cadence by hand. |
| **5. Your AI + grai** | **$69 once** (+$240/yr existing AI = $309 Yr 1, or $0 API fee with Ollama) | **Self-operated local gate** | Your existing AI speed locked to your quantitative spine. |

### Side-by-Side Comparison Guides
- [All Comparisons Hub (`https://grai.page/vs/`)](https://grai.page/vs/)
- [grai vs. Claude Projects & Custom GPTs (`https://grai.page/vs/claude-projects`)](https://grai.page/vs/claude-projects)
- [grai vs. ContentIn & Cloud LinkedIn SaaS (`https://grai.page/vs/contentin`)](https://grai.page/vs/contentin)
- [grai vs. Retainer Ghostwriting Agencies (`https://grai.page/vs/ghostwriting-agency`)](https://grai.page/vs/ghostwriting-agency)

---

## 4. Editions & One-Time Pricing

### Founder Edition: $69 (One-Time Payment)
*Built for founders and independent builders who want an unmistakable personal brand.*
- **Checkout:** https://payhip.com/b/5pXfN
- `grai.html`, the 622 KB local writing workbench
- Voice DNA profiler (extract your personal cadence)
- The Writing Desk (Scalpel, Broadsheet & Ledger drafts)
- Cadence Gate: six structural checks and a `CV >= 0.32` rhythm floor
- 1-Click Local Backup & Device Migration (`.grai` file)
- Lifetime v3.x engine updates included

### Agency Edition: $149 (One-Time Payment)
*Built for professional ghostwriters and boutique agencies managing multiple client voices.*
- **Checkout:** https://payhip.com/b/QVIBp
- Everything included in Founder Edition
- Commercial licence for client work
- Unlimited multi-client voice switcher
- Printable 1-page A4 **Client Voice DNA Dossier** (`#grai-print-certificate`) displaying 8 concrete audit fields: (1) Voice profile name, (2) Samples analysed count, (3) Target sentence length, (4) Selected platforms, (5) Rules passed (`X of 6`), (6) Cadence score (`score/100` with formatted `CV`), (7) Generation date (`YYYY-MM-DD`), and (8) Locally computed `SHA-256` checksum over the profile and audit JSON payload
- Offline Team Sync: share `.grai` profiles on Slack with zero seat fees
- Priority updates

**The 30-Day Distinction Guarantee:** If grai does not make your writing visibly sharper and faster to produce within 30 days, email `refund@grai.page` with your order number. 100% refund, no forms, no questions.
