Skip to content

Enforce anti-AI writing patterns with Vale#1881

Merged
benbalter merged 1 commit into
mainfrom
vale-anti-ai-patterns
Jun 8, 2026
Merged

Enforce anti-AI writing patterns with Vale#1881
benbalter merged 1 commit into
mainfrom
vale-anti-ai-patterns

Conversation

@benbalter

Copy link
Copy Markdown
Owner

Ports the anti-AI prose rules from the book project into a local AIPatterns Vale style, translated for a conversational blog, and makes Vale actually run in CI.

What's in here (three distinct kinds of change)

1. Lint infrastructure

  • New checked-in Vale style .github/styles/AIPatterns/ (11 rules), tiered for this site's voice:
    • Error (blocks CI): hedging openers ("It's important to note that…"), reader-probing ("you might be wondering"), meta-commentary ("Let's dive into"), "This ensures…" constructions, performative enthusiasm ("Great question!")
    • Warning: formulaic transitions ("Furthermore," "In conclusion,"), setup phrases ("When it comes to"), dramatic flourishes ("Spoiler alert", "Plot twist")
    • Suggestion: negation-antithesis ("it's not X—it's Y"), rhetorical questions, weak openings, vague intensifiers—patterns this blog uses deliberately, so they never gate
  • Vale now actually runs in CI. It was configured but silently skipped—ci.yml never installed the binary. Adds pinned install + vale sync + style cache to the Content Linting job.
  • Unblocked Vale 3.x: the BenBalter pack crashed Vale at config load (removed link scope). Fixed upstream in vale-styles#1, released as v0.0.2, URL bumped here.
  • .mdx posts (28 of them) are now linted too ([formats] mdx = md + script/vale globs).
  • Enabling Vale at error level surfaced 367 errors across 162 legacy posts from existing package rules. Stylistic ones (clichés, "very", e.g.,, US date formats, quoted profanity, duplicate So/But flags) are demoted to warning in .vale.ini; the rest were genuine and are fixed below.

2. Mechanical fixes in legacy posts (typos the new error level caught)

  • Doubled words ("can can", "the The"), an orphaned stray "I" line in the AI-first PM post
  • TODO examples wrapped in backticks, 10AM10 AM, lowercase domain in CONTRIBUTING heading, lowercased a .PDF link text
  • File-level Vale.Repetition off-switch for the law-review post whose legal citations (U.S.C.C.A.N., L.L.) false-positive

3. Prose edits in legacy posts — review these

Eleven small rewrites remove now-error patterns from 2011–2018 posts. They're all filler-removal ("It's worth noting that…", "As noted above,", "as mentioned earlier,", "Let's take a look at" → "Here are", "This creates a" → "The result is"), but they do alter published text—worth a skim in the diff.

Dramatic flourishes ("Spoiler alert: it didn't.") were deliberately kept in the vintage posts and demoted to warning—they're authentic human voice there; new writing still gets flagged visibly.

Verification

  • script/vale (error level): 0 errors across 204 files
  • Smoke-tested every rule tier fires (including a fix for punctuation-terminated tokens breaking Vale's \b wrapping)
  • script/cibuild-content passes locally (remark, textlint, vale; harper/languagetool skip without local installs)
  • npm run build passes
  • Vale release asset URL verified (HTTP 200)

🤖 Generated with Claude Code

Port the anti-AI prose rules from the book project as a local
AIPatterns Vale style, translated for a conversational blog:

- Errors (block CI): hedging openers, meta-commentary,
  "This ensures..." constructions, performative enthusiasm
- Warnings: formulaic transitions, setup phrases
- Suggestions: negation-antithesis, rhetorical questions, weak
  openings, vague intensifiers (deliberate voice, never gate)

Vale was configured but never ran in CI (no install step) and the
upstream BenBalter pack crashed Vale 3.x (removed `link` scope, fixed
in vale-styles v0.0.2). Wire it up:

- Install pinned Vale + sync packages in the Content Linting job
- Lint .mdx posts too ([formats] mdx = md; script/vale globs)
- Check in .github/styles/AIPatterns past the styles gitignore
- Demote stylistic package rules (cliches, very, e.g., US dates,
  quoted profanity) to warnings so error level gates real problems

Fix the genuine errors the new error level surfaced across legacy
posts: doubled words, stray spacing, unhyphenated TODOs in prose, a
handful of AI-pattern phrases, and an orphaned "I" line.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
benbalter-github-com a7d3abb Jun 08 2026, 02:46 AM

@benbalter benbalter enabled auto-merge June 8, 2026 02:47
@benbalter benbalter merged commit 27dbe11 into main Jun 8, 2026
13 of 14 checks passed
@benbalter benbalter deleted the vale-anti-ai-patterns branch June 8, 2026 02:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant