· 5 min read
Blog Posts as Code: AI Drafts, I Own the Facts
I write my blog with Claude, but it interviews me and drafts only from my answers, and CI checks every post. The workflow, the code and what I still catch.
I write the posts on this blog with Claude, but Claude doesn't decide what they say. It interviews me, drafts only from my answers and leaves a marker where a fact is missing. The format is code: every post is a file in the repo, and the tests fail a post with a bad title, description or date before anyone sees it.
So far that has produced three posts of about 1,500 words each, in about an hour and a half of my time per post on average. This post shows how the workflow is built, for engineers who want to write with AI without publishing something that sounds generated.
Why not let AI write the posts?
Because an AI-written post says what anyone could say. I knew that if I stayed in the process myself, the posts wouldn't sound generated, so I built the process around me: Claude asks, I answer, and every decision and idea comes from me.
Search engines point the same way. Google's guide to its generative AI search features contrasts commodity content, which anyone could write, with content built on first-hand experience, and it warns against producing pages at scale to game rankings or AI answers. A post about my own decisions and numbers is the one thing an AI can't produce without me.
How AI helped build the site itself is a different story, told in Building My Portfolio as if It Were a Product. This post is only about the writing.
Research first: how should a post be written?
Before I wrote anything, I researched how to write a technical blog post, using Claude's research feature. I turned the result into a playbook: topic choice, structure, search, style and distribution. It stays private, because it's my working notes, but its main principles are public knowledge:
- Answer first. The result goes in the first 150 words, then the stakes, then what the reader gets.
- First-hand facts. Real numbers, decisions and failures, not general advice.
- Headings people would search. Questions or plain statements, so a skimmer gets the story from the headings alone.
- Write about what you learned, built or found. That's Simon Willison's advice, and it takes away the pressure to be novel: your experience is the novelty.
How does an AI interview turn into a post?
A skill for Claude Code turns the playbook into a workflow of nine steps: frame, interview, outline, draft, edit, metadata, a pre-publish checklist, a distribution kit and cross-posting. I start it with /write-post and a topic, and it asks me questions before it writes a single sentence.
Its most important part is one rule at the top:
The interview covers the problem, what I tried first, the decisions and the alternatives I turned down, at least three real numbers, and the trade-offs. Claude saves my answers to a notes file as it goes, so a long session survives. Then it proposes an outline, and drafts only after I approve it.
When I don't remember something, it looks it up instead of guessing. The timings in this post came from our earlier sessions: Claude read the history and measured them, and I confirmed them.
What does "as code" check?
Everything a post needs besides the words is checked or generated by code. Each post is an MDX file (Markdown with components) in the repo, and its YAML frontmatter has rules:
export const TITLE_SUFFIX = ' | Tugrul Subekci';
export const SEO_TITLE_LENGTH = { min: 50, max: 60 } as const;
export const DESCRIPTION_LENGTH = { min: 140, max: 160 } as const;
const SLUG = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
const DAY = /^\d{4}-\d{2}-\d{2}$/;The title tag must be 50 to 60 characters and end with my name, the description 140 to 160, the slug must match the file name, and dates must be real days. The test suite runs these rules over every post on disk, so a post that breaks one fails CI and can't merge. Claude counts the characters when it writes the metadata, and the tests make sure it counted right.
The rest follows from the frontmatter:
| Part | How it's handled |
|---|---|
| Drafts | draft: false posts build only locally and on preview deploys, never in production, the sitemap or the feed |
| Feed, sitemap, structured data | Generated from each post's frontmatter |
| Share image | Drawn per post from its title |
| Code blocks | Highlighted at build time, with a title and a copy button |
| Post page | Browser tests check it for accessibility issues and blocked scripts |
Distribution is partly automated too. Claude drafts the LinkedIn post, which I post myself, and it publishes copies on dev.to and Hashnode in my browser, each with a canonical link back to the original.
What do I still catch myself?
The things a test can't see. I read every draft line by line, and each post so far has needed changes, like these:
- An unrelated sentence. The logo post tied the logo to a museum article about tughras as branding. I asked how that related to the logo. It didn't, so it went.
- A wrong name. A draft called it the "falcon logo". It's the Tuğrul logo.
- Sections I didn't want. I cut a "what I'd do differently" section and a hiring call to action from one post, because they weren't what I wanted to say.
How long does a post take?
About an hour and a half on average, from starting the interview to approving the draft. That includes my answers, my reading and the edits.
| Average per post | |
|---|---|
| Length | about 1,500 words |
| From interview to approval | about an hour and a half |
| Posts so far | 3 |
The time goes into answering and reading, not typing. That's the split I wanted: the slow part is the part only I can do.
What are the trade-offs?
This workflow saves drafting time but not judgement, and it has three costs I accept:
- I must read every line. Drafts still contain sentences that don't belong and numbers that are wrong. The time saved is in writing, never in reviewing.
- Tests check the format, not the truth. A post can pass every check in CI and still say something false. Being right is my job.
- Posts may start to sound alike. One skill and one playbook shape every post, so I watch for the same openings and rhythms repeating.
Takeaways
Writing with AI works when the AI asks and you answer. Put the rules that can be checked into code, so the machine handles format, and keep the facts and the final read for yourself.
The writing skill is in the site's public repository. Copy it and adapt it to your own blog.