Build-Learn-Refactor: Leverage of Simplicity

Subject: Build-Learn-Refactor: Leverage of Simplicity

Hey this is Isaac,

Welcome to my new weekly newsletter format. Each week, we explore one build, one lesson, and one refactor. Only practical ideas to help you build better. This week I jumped from untangling a messy Stripe integration to light creativity generating an AI promo video. The mental whiplash is real.

Let's start with the AI Promo Video.


The Build: Directing an AI to Make a Promo Video

I created a 74-second promo video draft in about 30 minutes. AI wrote the code, but I was the creative director. Retaining control of AI is everything; You can't just vibe-code it. Context, taste, vision, and critical feedback can't be manufactured.

Here’s what I did:

  1. Provide Good Context. Bad input equals bad output. I gave AI tools to retrieve the real documentation and source code to help with factual correctness.
  2. Add Your Vision. AI can't know what you want people to feel. I voice-transcribed my vision, goals, and feelings to get as much of my intuition into context as possible.
  3. Iterate with Taste. The text was too small and key features were missing. I used my domain knowledge to correct mistakes, add animated callouts, and mold it to my taste.
  4. Sync with Audio. AI can't "feel" music. I found a track with a major phrase change around 30 seconds in and instructed AI to time a key visual to that exact moment.

AI is powerful if wielded by someone with expertise and a clear vision.

For a full breakdown of the prompts and process, read the full article here.


The Learn: A Pattern for Personal Automation

Here’s a powerful pattern for building your own tools (both for you and your agent): combine a justfile for simple commands with uv scripts for isolated logic.

  1. The justfile is your simple interface. A justfile file is a command runner (like Make but simpler). uv run fastapi dev app/main.py becomes just app. It’s your personal, simplified command-line menu.
  2. uv scripts are your disposable tools. Each tool is a self-contained Python script. uv lets you declare dependencies in the header with dependencies = ["yt-dlp"]. uv installs them for you, eliminating the need to manage virtual environments for small scripts.

This lets you build powerful workflows. I have a just yt-pipeline command that runs a sequence of these AI-generated scripts: download -> transcribe -> content plan -> blog post -> description + chapters.

Each script is independent, and the justfile orchestrates them. Add instructions in your AGENT.md or CLAUDE.md file about the justfile and get them all as agent tools as well.

Why build your own tools? Because with AI, the creation cost is near zero. I created a custom GitHub issue reader script in less than 10 seconds. It was faster than finding, installing, and learning a pre-built tool. And the github MCP has over 90 tools and takes thousands of tokens of context - better to write your own in a few seconds.

To see the full workflow and get the scripts, read the full article here.


The Refactor: Trading API Calls for Simplicity

The classic approach to Stripe webhooks is a complex state machine. You write separate handlers for every event:

customer.subscription.created, updated, deleted, invoice.payment_succeeded, and so on. This means complex routing logic and helper functions just to figure out the current state.

We threw that out for a radically simpler approach for a SaaS I am building.

The old way: Listen for a specific event, interpret its payload, and update our database accordingly.

The new way: After any subscription-related webhook arrives, we ignore the payload and make one API call to fetch_stripe_subscription_details. We ask Stripe for the latest, authoritative state of the subscription and sync it to our database.

The result? We replaced over 200 lines of complex event-handling logic with a single, idempotent function call. It's a 90% reduction in code in our webhooks file and completely eliminates ambiguity. It might cost an extra API call, but it buys us absolute certainty and drastically simpler code.


Until next week,

Isaac