Mujtaba Hassanpur
← All posts

Jul 5, 2026 · 1 min read

Rebuilding my website with agentic coding

agentic-codingai-engineeringmeta

In 2024 I had a half-finished Next.js site and a self-hosted Ghost blog running in Docker behind AWS CDK. It worked, mostly. It also required me to maintain it, and by 2026 that premise no longer made sense. I don't hand-write most code anymore. I direct agents that do.

So I archived the old site to a branch and started over, with one rule: every stack decision optimizes for the agent's feedback loop, not my typing comfort.

The stack

  • Next.js, statically exported to S3 + CloudFront. No servers, no cold starts, and every route is pre-rendered HTML. That is all SEO ever actually required.
  • Markdown (MDX) for the blog, validated by a Zod schema at build time. If an agent (or I) writes bad frontmatter, the build fails with a clear error instead of shipping a broken post.
  • AWS CDK in TypeScript for infrastructure. I started with Terraform for cloud portability, then admitted the portability was never in the IaC layer. Static files are the portable artifact; they run anywhere. Given that, one language across app and infra means one typecheck loop.
  • One pnpm check command: typecheck, format, content validation, build. A single deterministic signal an agent can verify its own work against.

The principle

Ghost was a fine blogging platform. But every moving part was a thing an agent couldn't fully see or verify: the CMS, the database, the Docker host. Markdown in a git repo is the opposite: the entire state of the site is text, diffable, and testable. The agent's world and the site's world are the same world.

That's the real shift agentic coding makes. The question is no longer "what's the most powerful tool?" but "what's the most verifiable one?"

More on what I'm learning about building this way soon.