I run this site under a pen name, so one careless line could tie it to the rest of my work. AI drafts my posts, which makes that line easier to miss. So I built a check that reads every post before the site is built, and stops the build if anything looks wrong.

What it does

The check is a small script that runs at the start of every build. If a published post breaks a rule, the build stops and the live site stays as it was. Drafts are still checked, but they cannot stop the build.

A second, smaller check runs before each commit. It looks for keys and IDs in every file I commit, including my private notes. So a secret never reaches the git history, even in a private repository.

The stack and the flow

The site is a static site built with Astro. The code lives in a private GitHub repository, and Cloudflare builds and hosts it on each push.

From a draft to the live site. Two places can stop it.

  1. Write the post — AI drafts are always saved as drafts; I decide what goes live
  2. Commit — a pre-commit hook scans every file for keys and IDs
  3. Push to GitHub — private repository
  4. Cloudflare build — the pre-publish check runs first and stops the build on any error
  5. Live site — the posts and the daily social queue are updated

What the check looks for

The main rules fall into five groups. The word lists are plain text files, so I can add to them without touching the code.

  • Banned terms. 61 terms in 5 groups: my real name, my area, my other work, and details of a LINE service I run. I will not list them here, for obvious reasons.
  • Things with a known shape. 7 patterns, such as LINE user IDs, Stripe IDs, email addresses, Japanese phone numbers, analytics IDs, Make webhook URLs and API keys.
  • Affiliate disclosure. A post with an affiliate link must say so in its settings, or the build stops. Without that setting, the disclosure at the top of the post would not appear.
  • A source for every story. Each post must point to a work note in the repository. A line like "I tested" with no note behind it is an error.
  • Social posts. The announcements that go out automatically get the same checks, plus length limits and an English-only rule.

The check has its own tests: 17 cases built from good and bad sample files. Before I trust a change to the check, all 17 must pass.

What it costs

It costs nothing extra. The check runs inside the normal build, and Cloudflare builds the site on its free plan. I have not measured how long the check itself takes.

What broke and how I fixed it

The check failed me twice in two days. Once it was too strict, and once it was not strict enough.

A harmless number stopped the build

My first post stopped the build over a cost figure. The number was harmless in that sentence. But the same number was on my banned list, for an unrelated reason.

The check does not know context. It only sees that a banned string is present.

I reworded the number instead of loosening the check. I keep one rule for the list: adding terms is fine, removing or softening them is not. A false alarm costs me a minute. A missed leak cannot be undone.

Every word passed, but together they pointed at me

The second problem was the opposite. I asked an outside AI to review the whole project. It pointed out that my posts described the LINE service in enough detail to find it, even though every single word passed the check.

No single term was the problem. The combination was.

How I describe the service now

Before

  • A few lines of detail, repeated across posts
  • Each word passed the check
  • Together they narrowed it down to one service

After

  • One generic line: a subscription-based AI chat service I run on LINE in Japan
  • 9 combination-prone phrases added to the banned list
  • An AI review step that reads the whole draft and asks what the details add up to

I updated the two posts that had the detailed description. The bugs, the fixes and the Make modules stayed in. Those are the useful part for readers.

What I'd do differently

I would write the "what may I say about this?" line before the first post, not after. It is much easier to keep a description short from the start than to cut it back later.

I would also accept that a word list is only half of the job. It catches names and keys well. It cannot see what several harmless details reveal together, so that needs a reader, human or AI, that looks at the whole post.

Last checked: November 8, 2026. Astro static site on Cloudflare's free plan.

This article was drafted with AI assistance from my own build notes, and I checked it against what I actually built.