Skip to content

The automatic safety net

What blog-studio handles for you automatically splits in two: the two gates that screen a post right before publishing, and the three hooks that run outside your work flow. You don’t need to memorize commands, but knowing what gets blocked and why makes a block less alarming.

Before a post goes up to Blogger, it has to clear two checks.

It scores whether the post reads “like a human wrote it.” When em-dashes land several to a paragraph, or phrases like “정리하면” and “핵심은” repeat, or every paragraph is the same length, or the intro opens with the conclusion, the score goes up. The higher the score, the heavier the AI flavor.

It splits in three by score. Under 30 is pass, 30–60 is warn, over 60 is fail. A fail blocks publishing and the post gets rewritten automatically. This block is enforced by the publish script at the code level, so it stays blocked even if you try to bypass it.

It screens out posts that might trip ad policy before publishing. Posts with low-value signals get flagged automatically, and a post AdSense has already flagged drops into a revert-to-draft flow. For a blog aiming at ad revenue, this gate reduces ahead of time the accident of a policy violation locking the account.

A hook is a script that runs automatically at a certain moment without you calling a command. They’re planted in .claude/hooks/, and .claude/settings.json wires them.

ScriptWhenWhat
session-start.shsession startpulls the previous work, recent history, blog identity, and memory into context automatically
stop-reminder.shresponse endalerts you to update the next-session note (active.md) if it’s empty
pre-commit-check.shright before git commitblocks credentials and secrets from getting mixed into a commit

session-start.sh — coming back from where you left off

Section titled “session-start.sh — coming back from where you left off”

When you start a new session, this hook pulls active.md (the previous session’s next task), the last 30 lines of progress.md, product-marketing-context.md (the blog identity), and MEMORY.md into context automatically. Whether you reopen days later or start after a /clear, these spots attach to the front automatically so work doesn’t break. If the blog identity is still a placeholder, a “do /start first” notice shows.

stop-reminder.sh — the note for the next session

Section titled “stop-reminder.sh — the note for the next session”

When the AI finishes a response, if active.md is empty, it gives one alert. It’s guidance to write down in 5–15 lines what you just did, the next starting point, and any deferred decisions. This note is what gives the next session’s session-start.sh something to pull.

pre-commit-check.sh — preventing credential accidents

Section titled “pre-commit-check.sh — preventing credential accidents”

This check runs automatically right before git commit. It blocks Google OAuth files (credentials.json, token.json) from getting mixed into a commit, and blocks files that contain an OAuth client_secret, a refresh_token, or an API-key pattern. It also blocks a large _workspace/ output from getting committed wholesale.

Thanks to this hook, you get one layer of protection against accidentally pushing credentials to a public repository. Still, the hook doesn’t catch everything, so it’s safer not to touch the spot where credential files are in .gitignore from the start (the base default).

The rules these gates and hooks enforce are summarized in the eight lines of the security baseline in AI_AUTOMATION.md. Spots like not putting credentials in git (S1, S7), not carelessly touching outside _workspace/ (S2), and the pre-publish gates (S5, S8). From a beginner’s standpoint, you don’t need to memorize these lines; when a gate blocks, read the reason and fix it.

If a gate or workflow blocks and you’re unsure how to get out, go to when-ai-gets-stuck.