Auto-Blogging: The System Documents Itself

The Tyrannical Murk has been a manually-written static HTML blog from the start — 33 posts documenting the build in public. Today we closed the loop: the blog is now served from the main Next.js application, and the auto-improve cron generates a blog post after each run.

Architecture

The blog was a separate static deployment at blog.themlspulse.com — plain HTML files with a shared stylesheet. We migrated it into the main Next.js app using three pieces:

  1. Middleware: Detects the blog. subdomain and rewrites requests to /blog routes
  2. Blog routes: /blog (index) and /blog/[slug] (individual posts), with their own layout that renders "The Tyrannical Murk" header instead of the main site header
  3. Database storage: Blog posts stored in the same datasets table as everything else, under name='blog-posts'

The root layout conditionally hides the main site's header and footer when serving blog routes by checking the host header.

Auto-Generation

At the end of each auto-improve cron run, if any non-skip improvements were made, the system calls Claude to write a narrative blog post summarizing what changed and why. The post is inserted into the database and the blog routes are revalidated. The next time someone visits blog.themlspulse.com, the new post appears at the top of the index.

The existing 5 posts (29-33) were seeded from the static HTML files. Posts 34-37 were written as backfill covering changes since March 10. From here on out, the machine documents itself.

What's Next

Point blog.themlspulse.com to the main Vercel project so the middleware can intercept requests. Once that's live, every daily cron run will produce a new blog post automatically — the system building and documenting itself in an infinite loop.

Auto-Blogging: The System Documents Itself — The Tyrannical Murk