Mastering AI agents
Running a Personal Website with AI: From One Request to Site Changes and Posts
A five-step workflow for running a personal website with AI: make a request, clarify it with brainstorming, write down what done means and let a goal keep the AI working until it's met, save and check the result, and publish only after you approve. Rules live in CLAUDE.md, AGENTS.md and DESIGN.md; articles are files in the repo, and social drafts go to a review queue.
Kelvin Wang · · 11 min read
Key points
- Running a site with AI is five steps: request, clarify with brainstorming, write done-criteria and drive with a goal, save and check, publish only after I approve.
- The rules live in CLAUDE.md, AGENTS.md and DESIGN.md, so every run follows the same process.
- A push to main is a release, so the AI asks before every commit and push.
- Before a big change, an issue writes down the problems to solve; that list is the done criteria.
What makes those steps repeatable is the rule files: CLAUDE.md and AGENTS.md hold the working rules, DESIGN.md the visual design, and skills cover writing. Because site changes and articles are files, they get tested and you read them before anything is committed. Threads and X drafts wait for your approval in the site’s admin area.
- Positive step
-
Setup
Put the rules in project files.
CLAUDE.mdandAGENTS.mdhold the working rules,DESIGN.mdthe visual design, and writing rules live in skills. -
Step 1
Make the request.
Say what result you want and add constraints as the conversation goes.
-
Step 2
Use brainstorming to get the problem clear.
One question at a time: what problem this solves, what's in and out of scope, and what counts as done.
-
Step 3
Write down what done means, and drive it with a goal.
After each turn the AI checks whether the condition holds, and keeps going if it doesn't.
-
Step 4
Save and check.
Run the tests, look at the screen, read the files: confirm it really saved, not just that a tool said so.
-
Positive step: Step 5
Publish only after you approve.
The AI commits and pushes only after I say yes; after the push, confirm the build succeeded and the live page is new.
The pieces involved
| Piece | Role in the workflow |
|---|---|
| AI model | Understands the request, analyzes data, writes content and decides the next step |
| Harness | The execution system around the model: manages conversation context, tool calls, permissions and the run itself |
| Superpowers brainstorming | Clarifies the requirements, discusses options and turns them into a design you can sign off on |
| Goal in Codex or Claude Code | Tracks the goal and checks after each turn whether to keep going |
| Project docs and skills | Provide the working rules, formats and how things get delivered |
| CLI and other tools | Actually read, change or save data |
| Studio (the site's admin area) | Keeps social drafts in one place for me to read, edit and approve |
The AI calls a tool, gets the result and decides what to do next; all of that runs on the harness 1. Claude Code and Codex are harnesses. The rule files, skills and goals below are all ways of shaping how that layer behaves.
Setup: put the rules in project files
Repeating “read the design spec before touching the UI” in every conversation is tiring, and sooner or later you forget. Put the rules in a file at the repo root and the AI reads them at the start of every session: Claude Code reads CLAUDE.md, Codex reads AGENTS.md.
The top of the CLAUDE.md in my website repo looks like this (excerpt):
- Design spec: read DESIGN.md before changing anything visible (public site, /app,
new pages or components). If you need to break a rule, update DESIGN.md first and say so.
- Work directly on main unless Kelvin asks for a branch. Pushing to main deploys
(Cloudflare Workers Builds).
- Website articles are files: src/content/posts/<slug>/{zh-hant,en}.mdx; Studio is for Threads/X only.
- Tests: npx vitest run. Mobile checks per DESIGN.md §0.5 and §7.
The visual design lives in DESIGN.md: colors, type sizes, spacing, and the checks for the mobile layout. When the AI changes a feature it has something to go on, and I can edit these files directly to record decisions for next time.
If you don’t have a CLAUDE.md yet, open Claude Code in the project folder and type /init. It reads the project and drafts one for you. Then cut it down to the rules that actually change how the AI works: the command that runs the tests, files it must not touch, things it has to ask you about first.
Writing gets its own skills. I have a writing skill that covers how public content is put together, each platform’s format limits and where drafts go. Chinese drafts get a final pass with humanizer-zh-tw, which cuts repetition and filler while keeping what I meant.
The split is simple: project rules cover how the site gets built, writing rules cover how articles get delivered, and the conversation decides what to do this time.
Go deeper Claude Code Tutorial 2026: Install, CLAUDE.md, Skills, and Your First Website Installing Claude Code, writing a first CLAUDE.md and adding skills, step by step.Step 1: make the request, and let the direction settle in conversation
A request is rarely complete the first time. Your part is saying what you want done, then adding constraints as you go: which angle, when it’s needed, just save a draft for now. The AI has to keep up with those changes, know which decisions have moved, and keep working on the same draft or feature.
A real example: I once set out to write about Supabase MCP. Then I added that I wanted to cover how AI looks up data and how I approve changes, then switched to the angle of editing an article, and in the end pushed that topic back and wrote about the workflow first. All of that happened in one conversation, and each time the AI had to know which decision was the latest.
So the first sentence doesn’t need to be perfect. Say what result you want and let the next step’s questions fill in the rest.
Step 2: use brainstorming to get the problem clear
For tasks that need talking through first, I use the brainstorming skill from Superpowers (install it in Claude Code with /plugin install superpowers@claude-plugins-official). It looks at the existing project and what you’re after, asks questions one at a time to pin down the requirements, then lays out options and trade-offs. For bigger tasks it writes the decisions up as a spec for you to approve before going further.
At this stage, confirm three things:
- What problem this solves.
- What’s in scope and what isn’t.
- How far it has to go to count as done.
For an article, that means deciding whether it’s a long post for the site or a social draft, where it gets saved, and whether publishing is part of this task.
Step 3: write down what done means, and drive it with a goal
Once the direction and the done criteria are agreed, I use a goal for tasks that need to keep going. Codex Goals check on their own whether the goal is met; if it isn’t and there’s still a workable next step, Codex keeps going. It stops when it hits a budget limit, the user interrupts, or it’s blocked on something that needs outside help 2. Claude Code has /goal too: after each turn, a separate small model checks whether your condition holds, and if not, Claude takes another turn 3.
So when setting a goal, spell out the expected result, how to verify it, and the scope. For a social draft, the done criteria could read:
Turn the approved outline into a Traditional Chinese post, save it to the specified Studio draft, read it back and confirm the body matches. Keep it pending review and don’t publish; if it can’t be saved, explain where it got stuck and keep the draft.
Website articles are now files in the repo, so their criteria are about files and tests:
Write the approved outline as
src/content/posts/<slug>/zh-hant.mdxanden.mdxwith complete frontmatter, and makenpx vitest runpass. Don’t commit or push; report the file paths and wait for my review.
Where the result goes, how to confirm it saved correctly, what’s out of scope: all of it has to be written down, so the AI has something to judge “done” against. Site features work the same way: the done criteria can be a user flow, test results and what actually shows on screen.
While running, the AI reads files, edits code and runs commands through tools. Studio also has its own CLI that can look up content, read versions and send finished text into the review queue.
Step 4: save and check
When a tool reports it’s done, the result still needs checking. “It says it’s written” isn’t “it’s saved”:
- Code changes: run their tests.
- UI changes: look at them on screen, mobile included.
- Website articles: open the file or a local preview and read it, content and formatting both.
- Social drafts: confirm the body actually saved, the platform is right, and it’s still pending review.
Social drafts have a database guard on top. Anything the AI sends to Studio lands as an AI draft, and the database blocks it from being published until I approve it.
Step 5: publish only after you approve
Once I’ve checked the result and said yes, the AI commits and pushes to main. On my site, a push to main triggers Cloudflare Workers Builds, which builds and deploys automatically, so pushing is the same as going live. That’s why this step always waits for a human. Threads and X posts need a separate yes for that exact text; “the site post is good to go” doesn’t cover social.
The push isn’t the end. Wait for Workers Builds to report a successful build, then open the live page and confirm it shows the new version. I’ve had pushes go through while the build failed, on 5 of the 7 pushes before the November 5, 2026 fix: Cloudflare’s build environment allows fewer open files at once, and the bundler opened too many and failed with EMFILE. Rollup opens up to 1,000 files at once by default; capping its parallel file operations at 64 in astro.config.mjs fixed it. If you call it shipped as soon as the push succeeds, you miss failures like that.
A real redesign
Between the afternoon of November 7 and the afternoon of November 9, 2026, this site’s blog page (/blog) changed 11 times, one commit each: from a list grouped by year to shelves grouped by topic, then topic cards that page through their posts, then cards that flip over, and finally back to a single list of posts with topic tabs. Across the blog pages, components, topic settings and their tests, those three days added a net 722 lines and removed 97, spread over 12 files.
The flip-card version started from something I dictated in the chat (translated; filler words removed): “When readers enter this page there should be one more layer that shows these four cards. Each card can be hovered and flipped to tell readers why I write about this, and after flipping, clicking through shows all the posts.”
- Warning or reduced service
- Positive step
-
11-07 14:15
b5b9efc:/bloggrouped by topic instead of by year.The same commit ranks the further-reading list at the end of each post by relatedness.
-
11-07 14:55
7ed675d: topic cards in four columns on wide screens, each with a small illustration.The illustrations started as single-color line-art placeholders; the final art went into a separate request.
-
11-07 18:40–23:59
da9a05a,deab0ba,890ac5d: cards rise in, a back-to-top button, each card pages its posts five at a time. -
11-08 00:17
16ec41f: each topic gets its own page (/blog/<topic>/).Posts get a breadcrumb showing their topic.
-
11-08 11:15
f268a24:/blogbecomes a 2×2 grid of flip cards.Hover or tap a card and it turns over to say why I write about that topic, then opens the topic page.
-
11-08 11:35
5668ddb: a US stocks topic; the five cards sit 3 + 2 on wide screens. -
Warning or reduced service: 11-08 11:53
ec20f5e: fix the card backs flashing for a moment on page load.A problem that only showed up once it was live; 18 minutes from the previous version to the fix.
-
Positive step: 11-08 23:05
54576c1: one Writing list replaces the cards.Sticky topic tabs, pinned and latest posts, tag pages and Pagefind site search.
-
11-09 14:04
7b506db: category tabs and category page titles drop the #; only tags keep it.
Read against the five steps:
- The request changed in conversation. Four columns, paging, flipping, 3 + 2: each was a new ask added after seeing the previous version, not all stated up front.
- Before the big change, the problem was written down. The evening the flip cards went live, before switching to a list, an issue (#24) set out the problems to solve:
/blogshowed only 5 flip cards, with no posts and no summaries; getting from the home page to a post took 3 clicks; there was no search. The issue came with an interactive prototype. That list of problems was the done criteria for the redesign, and it was pushed about half an hour after the issue was opened. - Checking catches what tests don’t. A card back flashing on load is only visible when you actually open the page.
- A push is a release. Each of the 11 commits deployed as soon as it reached
main, so the live/blogtook several shapes over those three days.
Why does the review queue live inside the site?
Conversations are for working out direction; drafts need a fixed place where work can continue. That’s why I built Studio into my site’s admin area: one topic can have a site version and a social version, each with its own content and status.
After a while I noticed I never edited website articles in Studio. Agents draft them, I read all of it, and once I say it can go out, the AI does the rest. On November 5, 2026 I moved every article out of the database and into the repo as MDX files, one folder per post, and removed the article editor from the admin area. In the repo, the AI can read and write the files directly, articles can use the site’s own components, and git records every change. Studio stayed for Threads and X drafts, publishing and video, where you need to see how a post will look on each platform before it goes out.
Sources
Kelvin Wang
Electrical engineer building tools with AI agents, sharing hands-on notes on engineering and investing.
More about me