<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Carlos Mimoso on Medium]]></title>
        <description><![CDATA[Stories by Carlos Mimoso on Medium]]></description>
        <link>https://medium.com/@celom?source=rss-e126a55a8891------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*tQTMJrME3I9W_kbAmFIXfw.jpeg</url>
            <title>Stories by Carlos Mimoso on Medium</title>
            <link>https://medium.com/@celom?source=rss-e126a55a8891------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 13:26:18 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@celom/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com" rel="hub"/>
        <item>
            <title><![CDATA[Software Development Was Never Solved. AI Just Proved It.]]></title>
            <link>https://medium.com/@celom/software-development-was-never-solved-ai-just-proved-it-2c310fd51a9d?source=rss-e126a55a8891------2</link>
            <guid isPermaLink="false">https://medium.com/p/2c310fd51a9d</guid>
            <category><![CDATA[asdlc]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[product-design]]></category>
            <category><![CDATA[sdlc]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <dc:creator><![CDATA[Carlos Mimoso]]></dc:creator>
            <pubDate>Thu, 30 Jul 2026 21:04:17 GMT</pubDate>
            <atom:updated>2026-07-31T12:20:11.419Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eC4t7PdS207DZqD0765qcw.png" /></figure><p><em>TLDR: This is just a rant… you’ll learn nothing from it.</em></p><h3>Software development is broken. There, I said it.</h3><p>Not “broken” as in <em>AI broke it</em>. Broken as in <em>it was always broken</em>, in exactly one place, and we’ve built an entire industry around it.</p><p>Which is why the “solved” chorus keeps stopping me mid-scroll. Boris Cherny, creator of Claude Code, says coding is <em>largely solved</em>. Elon Musk goes further — by the end of this year you won’t write code at all, the AI will emit the binary directly. No language, no compiler.</p><p>I kept reading these, asking “Really? Was <em>coding</em> the actual problem?!”.</p><p>Turns out it wasn’t. It never was.</p><h3>Language was the cheap part</h3><p>Take Musk’s version, since it’s the most extreme. “Skip the source entirely, straight to the binary.”</p><p>Sit with what that concedes. It says programming languages are <em>disposable</em>. A tunnel between intent and execution.</p><p>Well… I agree. But that was never the issue!</p><p>Language <em>is</em> the most brittle tool in the process. Replaceable, translatable, transpilable. We’ve swapped it out roughly every eight years for decades and somehow the pain never left.</p><p>Because language maps <em>meaning</em>. That’s its job: an interface between “agents”, a protocol for getting an idea out of one head and into another with acceptable loss. It’s the first layer of action, and here’s the thing: <strong>it doesn’t act.</strong></p><p>For action you need intent. And for intent to emerge, you need to project yourself onto a possibility — a glimpse of something ahead that exists nowhere except your imagination.</p><p>That’s the expensive part. That’s always been the expensive part. Cherny, to his credit, says as much when you read past the headline: coding is solved, <em>building</em> isn’t.</p><h3>But the agents DO ship things</h3><p>They do. I’ve seen it, you’ve seen it. It builds the app, it runs, there’s a nice gradient on the landing page, it even remembered dark mode.</p><p>But — honestly — did it do what you asked?</p><p>Like… <em>really?</em> No more, no less, exactly <strong>that</strong>?</p><p>Were you ever <em>surprised</em> by it? Was it “A-MA-ZING!”? Well… I bet it threw in an abstraction nobody requested. And… quietly dropped the requirement from paragraph three. It solved a problem adjacent to yours — elegantly, confidently, at length, with excellent naming conventions.</p><p>So you said “fix it.” Did that work? First try? How many rounds? Are you in one of those rounds right now?</p><p>Sometimes more than you asked for. Sometimes less. Almost never <em>that</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*93PjoiBYaLKbRKlCqOTQiQ.png" /></figure><p>So what got solved, exactly? <strong>The typing.</strong> We solved the typing…</p><h3>The seam was never about AI</h3><p>Before this reads as an anti-AI screed — let’s look at the human version.</p><p>A business visionary has an idea. It’s vivid, urgent, and completely invisible to everyone else. They hire people to translate that idea into intent, so now there are eleven intents, all slightly different, all sincere, none of them aligned (good luck with that!). Those somehow become a spec. The spec becomes features. The features become behaviors. And at the end of the chain sits a senior developer… coffee going cold, reading it and saying:</p><p><em>“… this is sh*t.”</em></p><p>That’s not a process failure. That’s humans. That’s life.</p><p>We built entire professions around this leak. Product management exists because vision doesn’t survive contact with a team. Design exists because intent doesn’t survive contact with a user. QA exists because the spec doesn’t survive contact with reality. Every one of those roles are scars around the same wound.</p><p>So when an agent misreads you and confidently ships the wrong thing, it isn’t doing anything new. It’s doing what every junior hire, every rushed contractor, and every senior with a different mental model has always done. It’s just doing it in ninety seconds instead of six weeks — which means you now watch it happen <strong>forty times a day</strong> instead of twice a quarter.</p><p>That’s the actual contribution. Not solving the problem. <em>Sampling</em> it fast enough that we can finally see its shape.</p><h3>Fine. So what’s the better way?</h3><p>I have no framework to sell you. But there are three things I’m fairly sure have to be true.</p><p><strong>Intent has to become an artifact.</strong> Right now it lives in prompts, tickets, Slack threads, and someone’s recollection of a meeting half the room attended. It’s the most important input in the pipeline and the only one we don’t version, diff, or review. We have elaborate rituals for reviewing code. We have none for reviewing intent. That’s insane!</p><p><strong>Disagreement has to surface before implementation.</strong> The expensive failure isn’t building the wrong thing — it’s building the wrong thing <em>plausibly</em>. Structured, tested, reviewable, so the divergence goes unnoticed until it’s load-bearing. A system that stops and says “I read this two ways, pick one” beats a system that guesses right 90% of the time and never tells you which 90.</p><p><strong>We have to measure the gap, not the output.</strong> Every benchmark scores the artifact: does it compile, does it pass, does it match the reference. None score the distance between what you meant and what you got — because that distance was never written down. See problem one.</p><p>Get those right and it stops mattering whether the thing on the other end is a model or a person.</p><p>Software development isn’t solved. It was never a language problem waiting on a good enough compiler.</p><p>It’s an alignment problem between a human and reality, and it always has been.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2c310fd51a9d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Narrative-Driven Development]]></title>
            <link>https://medium.com/@celom/narrative-driven-development-02442f539ec8?source=rss-e126a55a8891------2</link>
            <guid isPermaLink="false">https://medium.com/p/02442f539ec8</guid>
            <category><![CDATA[narrative-driven]]></category>
            <category><![CDATA[ddns]]></category>
            <category><![CDATA[workflow]]></category>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Carlos Mimoso]]></dc:creator>
            <pubDate>Thu, 05 Mar 2026 00:09:38 GMT</pubDate>
            <atom:updated>2026-07-30T15:47:14.191Z</atom:updated>
            <content:encoded><![CDATA[<h3>Write the Story Before the Chapters</h3><p>Architects don’t start with bricks. They start with blueprints — documents that describe the <em>shape</em> of the thing before any material is cut, readable by people who will never hold a trowel.</p><p>Most code works the other way around. You write the validation function, then the database call, then the email sender, then wire them together in a function that grows like an attic nobody planned.</p><p>What if you wrote the blueprint first?</p><h3>TDD’s Older, More Literate Cousin</h3><p>TDD gave us a beautiful inversion: define what <em>should</em> happen before writing the code that makes it happen. The test is a contract. The implementation fulfils it.</p><p>Narrative-driven development takes this one level up. Instead of starting with the unit, you start with the <em>whole</em>: what is this workflow? What are its chapters? In what order do they unfold?</p><p>You write the table of contents before the chapters. And here’s the trick — it compiles.</p><h3>The Blank Page</h3><p>You’re building a content publishing pipeline. Editors draft articles, and hitting “publish” kicks off a sequence: validate, moderate, generate SEO metadata, schedule, notify subscribers.</p><p>Most developers would start at the bottom — write the moderation service, the SEO generator, the notification dispatcher — then stitch them together in a function nobody will enjoy reading six months from now.</p><p>Instead, start with the story:</p><pre>import { createFlow } from &#39;@celom/prose&#39;;<br><br>export const publishArticle = createFlow&lt;PublishInput, PublishDeps&gt;(&#39;publish-article&#39;)<br>  .validate(&#39;validate draft&#39;, validateDraft)<br>  .step(&#39;moderate content&#39;, moderateContent)<br>    .withRetry({ maxAttempts: 2, delayMs: 500 })<br>  .step(&#39;generate seo metadata&#39;, generateSeoMetadata)<br>  .transaction(&#39;schedule publication&#39;, schedulePublication)<br>  .step(&#39;notify subscribers&#39;, notifySubscribers)<br>    .withRetry({ maxAttempts: 3, delayMs: 1_000, backoffMultiplier: 2 })<br>  .event(&#39;content&#39;, publishedEvent)<br>  .build();</pre><p>That’s not code pretending to be documentation. That <em>is</em> the documentation. It also happens to execute.</p><h3>The Unwritten Chapters</h3><p>Here’s where NDD diverges from just “having a nice API.” The step functions don’t need to exist yet:</p><pre>// steps/moderate-content.ts<br>export async function moderateContent(<br>  ctx: FlowContext&lt;PublishInput, PublishDeps, {}&gt;<br>) {<br>  throw new Error(&#39;Not implemented&#39;);<br>  return { moderationResult: {} as ModerationResult };<br>}<br><br>// steps/generate-seo-metadata.ts<br>export async function generateSeoMetadata(<br>  ctx: FlowContext&lt;PublishInput, PublishDeps, { moderationResult: ModerationResult }&gt;<br>) {<br>  throw new Error(&#39;Not implemented&#39;);<br>  return { seo: {} as SeoMetadata };<br>}</pre><p>The flow compiles. TypeScript already knows generateSeoMetadata has access to ctx.state.moderationResult because moderateContent returns it. You&#39;ve defined the data contract between chapters before writing a single line of business logic.</p><p>In TDD, you write a test that fails, then make it pass. In NDD, you write a flow that <em>compiles but throws</em>, then fill in each step until it runs.</p><p>The flow is your spec. The steps are your implementation. The gap between them is your backlog.</p><h3>Legibility as a Feature</h3><p>There’s a second audience for this blueprint, and they don’t have an IDE.</p><p>Product managers, tech leads, new hires — they can all read the flow definition and understand what the system does without tracing error handling or decoding which catch belongs to which try.</p><p>When someone proposes adding a plagiarism check between moderation and SEO generation, the conversation becomes spatial:</p><pre>export const publishArticle = createFlow&lt;PublishInput, PublishDeps&gt;(&#39;publish-article&#39;)<br>  .validate(&#39;validate draft&#39;, validateDraft)<br>  .step(&#39;moderate content&#39;, moderateContent)<br>    .withRetry({ maxAttempts: 2, delayMs: 500 })<br>  .step(&#39;check plagiarism&#39;, checkPlagiarism)        // &lt;- new chapter<br>  .step(&#39;generate seo metadata&#39;, generateSeoMetadata)<br>  .transaction(&#39;schedule publication&#39;, schedulePublication)<br>  .step(&#39;notify subscribers&#39;, notifySubscribers)<br>    .withRetry({ maxAttempts: 3, delayMs: 1_000, backoffMultiplier: 2 })<br>  .event(&#39;content&#39;, publishedEvent)<br>  .build();</pre><p>One line. The narrative gains a chapter. The story still reads front to back.</p><h3>The Whole Before the Parts</h3><p>Traditional development is bottom-up: build components, compose them, hope the composition makes sense. TDD is unit-first: prove each piece works, then integrate. Neither prioritises the overview.</p><p>NDD is top-down. You define the workflow’s shape — steps, order, data dependencies — before any implementation exists. The type system enforces it. Change the order and the compiler tells you if the data contract breaks. Remove a step that produced state consumed downstream and you’ll know before you run a single test.</p><p>The spec <em>is</em> the code. They cannot disagree because they are the same artifact.</p><h3>When the Implementation Arrives</h3><p>Eventually you fill in the chapters. Each step does one thing, returns state:</p><pre>export async function moderateContent(<br>  ctx: FlowContext&lt;PublishInput, PublishDeps, {}&gt;<br>) {<br>  const result = await ctx.deps.moderationService.check(ctx.input.body, {<br>    signal: ctx.signal,<br>  });<br><br>  if (result.flagged) {<br>    throw ValidationError.single(&#39;body&#39;, `Content flagged: ${result.reason}`);<br>  }<br><br>  return { moderationResult: result };<br>}<br><br>export async function generateSeoMetadata(<br>  ctx: FlowContext&lt;PublishInput, PublishDeps, { moderationResult: ModerationResult }&gt;<br>) {<br>  const seo = await ctx.deps.seoEngine.generate({<br>    title: ctx.input.title,<br>    body: ctx.input.body,<br>    contentRating: ctx.state.moderationResult.rating,<br>  });<br><br>  return { seo };<br>}</pre><p>Notice generateSeoMetadata uses ctx.state.moderationResult.rating — produced by the previous step. Data flows through the narrative. Each chapter picks up where the last left off, and TypeScript guarantees the handoff.</p><p>By the time you’re implementing steps, the architecture is settled. You’re filling in a shape that already exists.</p><p>Write the story first. The chapters will follow.</p><p><a href="https://celom.github.io/prose/"><em>@celom/prose</em></a><em> is available on </em><a href="https://www.npmjs.com/package/@celom/prose"><em>npm</em></a><em>. Zero dependencies. Full TypeScript. MIT licensed.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=02442f539ec8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Replacing 200 Lines of Nested Try/Catch with a Declarative Workflow]]></title>
            <link>https://medium.com/@celom/replacing-200-lines-of-nested-try-catch-with-a-declarative-workflow-7553cf810818?source=rss-e126a55a8891------2</link>
            <guid isPermaLink="false">https://medium.com/p/7553cf810818</guid>
            <category><![CDATA[domain-specific-languages]]></category>
            <category><![CDATA[declarative-programming]]></category>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[nodejs]]></category>
            <dc:creator><![CDATA[Carlos Mimoso]]></dc:creator>
            <pubDate>Thu, 26 Feb 2026 17:17:28 GMT</pubDate>
            <atom:updated>2026-07-30T15:44:19.229Z</atom:updated>
            <content:encoded><![CDATA[<p>There’s a particular kind of code that doesn’t feel wrong when you write it. It feels <em>pragmatic</em>. You’re handling errors, cleaning up after yourself, being a responsible adult. Then six months later someone asks you to add a retry to step three, and somewhere deep in your limbic system, a small alarm goes off.</p><p>This is a story about that alarm.</p><h3>The Scene of the Crime</h3><p>You’re building user registration. Five steps: validate input, check for duplicates, create the account in a transaction, send a welcome email, publish a user.registered event. Reasonable. Finite. You&#39;ve done worse before breakfast.</p><p>Here’s what happens when you write it the normal way:</p><pre>async function registerUser(input: RegisterInput, deps: Deps): Promise&lt;User&gt; {<br>  // Validate<br>  if (!input.email.includes(&#39;@&#39;)) {<br>    throw new ValidationError(&#39;email&#39;, &#39;Invalid email address&#39;);<br>  }<br>  if (input.password.length &lt; 8) {<br>    throw new ValidationError(&#39;password&#39;, &#39;Password too short&#39;);<br>  }<br>  if (!input.name?.trim()) {<br>    throw new ValidationError(&#39;name&#39;, &#39;Name is required&#39;);<br>  }<br><br>  // Check for duplicates<br>  let existing: User | null;<br>  try {<br>    existing = await deps.db.users.findByEmail(input.email);<br>  } catch (err) {<br>    throw new Error(`Failed to check for existing user: ${(err as Error).message}`);<br>  }<br><br>  if (existing) {<br>    throw new ConflictError(&#39;A user with this email already exists&#39;);<br>  }<br><br>  // Create account in a transaction<br>  let user: User;<br>  try {<br>    user = await deps.db.transaction(async (tx) =&gt; {<br>      const newUser = await tx.users.create({<br>        email: input.email,<br>        name: input.name,<br>        passwordHash: await hashPassword(input.password),<br>        createdAt: new Date(),<br>      });<br><br>      await tx.auditLog.insert({<br>        action: &#39;user.created&#39;,<br>        targetId: newUser.id,<br>        timestamp: new Date(),<br>      });<br><br>      return newUser;<br>    });<br>  } catch (err) {<br>    // Is this a constraint violation? A connection error?<br>    throw new Error(`Failed to create user: ${(err as Error).message}`);<br>  }<br><br>  // Send welcome email<br>  // This can fail. We probably want to retry.<br>  try {<br>    await deps.mailer.send({<br>      to: user.email,<br>      template: &#39;welcome&#39;,<br>      data: { name: user.name },<br>    });<br>  } catch (err) {<br>    // Log and continue? Throw?<br>    console.error(&#39;Failed to send welcome email:&#39;, err);<br>  }<br><br>  // Step 5: Publish event<br>  try {<br>    await deps.eventBus.publish(&#39;users&#39;, {<br>      eventType: &#39;user.registered&#39;,<br>      userId: user.id,<br>      email: user.email,<br>    });<br>  } catch (err) {<br>    console.error(&#39;Failed to publish event:&#39;, err);<br>    // We&#39;ll deal with this latter...<br>  }<br><br>  return user;<br>}</pre><p>It’s not literally two hundred lines — but it <em>feels</em> like two hundred. And that’s before you add retry logic, timeouts, structured logging, correlation IDs, and error classification at each step.</p><p>At that point you’re not reading business logic. You’re reading infrastructure archaeology. The actual intent — <em>register a user</em> — is buried under a sediment of defensive code so thick you need a geological survey to find it.</p><h3>What You Actually Wanted to Say</h3><p>The <em>logic</em> of user registration is five steps in sequence. It fits on a whiteboard. It does not require a control flow that a future you will approach with the energy of someone defusing a bomb.</p><p>What if the code read more like the spec?</p><pre>import { createFlow } from &#39;@celom/prose&#39;;<br><br>export const registerUser = createFlow&lt;RegisterInput, Deps&gt;(&#39;register-user&#39;)<br>  .validate(&#39;validate user input&#39;, validateInput)<br>  .step(&#39;check for existing user&#39;, checkDuplicate)<br>  .transaction(&#39;create user account&#39;, createAccount)<br>  .step(&#39;send welcome email&#39;, sendWelcomeEmail)<br>  .event(&#39;users&#39;, publishRegisteredEvent)<br>  .build();</pre><p>Can you tell what this flow does? Yes. Your product manager could tell what this flow does. That’s the point.</p><p>Each step lives in its own module, doing exactly one thing:</p><pre>// steps/validate-input.ts<br>import { ValidationError } from &#39;@celom/prose&#39;;<br>import type { FlowContext } from &#39;@celom/prose&#39;;<br>import type { RegisterInput, Deps } from &#39;../types&#39;;<br><br>export function validateInput(ctx: FlowContext&lt;RegisterInput, Deps, {}&gt;): void {<br>  const issues = [];<br>  if (!ctx.input.email.includes(&#39;@&#39;))<br>    issues.push({ field: &#39;email&#39;, message: &#39;Invalid email address&#39; });<br>  if (ctx.input.password.length &lt; 8)<br>    issues.push({ field: &#39;password&#39;, message: &#39;Password too short&#39; });<br>  if (!ctx.input.name?.trim())<br>    issues.push({ field: &#39;name&#39;, message: &#39;Name is required&#39; });<br>  if (issues.length) throw ValidationError.multiple(issues);<br>}<br><br>// steps/check-duplicate.ts<br>export async function checkDuplicate(ctx: FlowContext&lt;RegisterInput, Deps, {}&gt;) {<br>  const existing = await ctx.deps.db.users.findByEmail(ctx.input.email);<br>  if (existing) throw new ConflictError(&#39;A user with this email already exists&#39;);<br>}<br><br>// steps/create-account.ts<br>export async function createAccount(ctx: FlowContext&lt;RegisterInput, Deps, {}&gt;, tx: Tx) {<br>  const user = await tx.users.create({<br>    email: ctx.input.email,<br>    name: ctx.input.name,<br>    passwordHash: await hashPassword(ctx.input.password),<br>    createdAt: new Date(),<br>  });<br>  await tx.auditLog.insert({ action: &#39;user.created&#39;, targetId: user.id, timestamp: new Date() });<br>  return { user };<br>}<br><br>// steps/send-welcome-email.ts<br>export async function sendWelcomeEmail(ctx: FlowContext&lt;RegisterInput, Deps, { user: User }&gt;) {<br>  await ctx.deps.mailer.send({<br>    to: ctx.state.user.email,<br>    template: &#39;welcome&#39;,<br>    data: { name: ctx.state.user.name },<br>  });<br>}<br><br>// steps/publish-registered-event.ts<br>export function publishRegisteredEvent(ctx: FlowContext&lt;RegisterInput, Deps, { user: User }&gt;) {<br>  return {<br>    eventType: &#39;user.registered&#39;,<br>    userId: ctx.state.user.id,<br>    email: ctx.state.user.email,<br>  };<br>}</pre><p>Same logic. Zero nested try/catches. The flow definition is a table of contents; each step is a chapter. If something breaks, you know which chapter to open.</p><blockquote>The code is shorter and flatter. But the real difference is what you get for free.</blockquote><h3>Retry Without Ceremony</h3><p>Imperatively, adding retry means a loop, attempt counts, delay calculations, catch-and-rethrow — twenty lines of plumbing with nothing to do with your domain. In Prose, .withRetry({ maxAttempts: 3, delayMs: 200, backoffMultiplier: 2 }) chains onto any step, respects AbortSignal, and won&#39;t retry ValidationError because that&#39;s never going to get better with repetition.</p><h3>Timeouts That Actually Work</h3><p>Most userland “timeout” implementations set a deadline but can’t actually interrupt a pending database call. Prose threads an AbortSignal through every step — pass it to fetch, to your ORM, to anything that respects the Web standard. The timeout actually <em>stops</em> things.</p><pre>const result = await registerUser.execute(input, deps, {<br>  timeout: 10_000,    // entire flow must finish within 10 seconds<br>  stepTimeout: 3_000, // no single step gets more than 3 seconds<br>});</pre><h3>Observability for Free</h3><pre>const result = await registerUser.execute(input, deps, {<br>  correlationId: requestId,<br>  observer: new PinoFlowObserver(logger),<br>});</pre><p>Every step start, completion, retry, and timeout gets structured log output with the correlation ID, step name, and duration. You didn’t write any of it. The framework knows when steps begin and end — something that’s fundamentally unknowable when your logic is anonymous try/catch blocks scattered through a function.</p><blockquote>At 2am during a production incident, this is the difference between “I can see exactly where it died” and “I need to infer the sequence from whatever made it to the console before the process crashed.”</blockquote><h3>Type Safety That Threads Through Steps</h3><p>Each step’s return type is automatically merged into ctx.state for subsequent steps. TypeScript knows at compile time that sendWelcomeEmail can access ctx.state.user because createAccount returned it. Rename user to account and forget to update downstream? The compiler tells you — not your QA engineer.</p><pre>.transaction(&#39;createAccount&#39;, async (ctx, tx) =&gt; {<br>  const user = await tx.users.create(/* ... */);<br>  return { user }; // &lt;- TypeScript infers this into state<br>})<br>.step(&#39;sendWelcomeEmail&#39;, async (ctx) =&gt; {<br>  // ctx.state.user is fully typed here. No casting. No &quot;any&quot;.<br>  await ctx.deps.mailer.send({ to: ctx.state.user.email, /* ... */ });<br>})</pre><p>This isn’t type safety as a feature — it’s a <em>side effect of the architecture</em>. The cons-list pattern internally propagates types forward through the builder chain. The type system becomes a second test suite that runs at zero cost, continuously.</p><h3>What This Is Not</h3><p>Prose is deliberately narrow. It doesn’t survive process restarts (that’s Temporal, Inngest, Trigger.dev). It doesn’t give you typed error channels (Effect-TS). It doesn’t model state machines (XState). If you need those things, use those things.</p><p>Prose solves in-process sequential business logic that accumulates retry policies, timeouts, transactions, events, and observability — without turning into a disaster of its own making. It’s the size of the problem it’s solving.</p><p>Remember the alarm? Someone asks you to add a retry to step three. Imperatively, that’s a loop, a counter, a delay utility, and a careful read of everything around it to make sure you didn’t swallow the final error or retry something that should only run once.</p><p>In Prose, you add one line:</p><pre>export const registerUser = createFlow&lt;RegisterInput, Deps&gt;(&#39;register-user&#39;)<br>  .validate(&#39;validate user input&#39;, validateInput)<br>  .step(&#39;check for existing user&#39;, checkDuplicate)<br>  .transaction(&#39;create user account&#39;, createAccount)<br>  .step(&#39;send welcome email&#39;, sendWelcomeEmail)<br>  .withRetry({ maxAttempts: 3, delayMs: 200, backoffMultiplier: 2 }) // &lt;- this one<br>  .event(&#39;users&#39;, publishRegisteredEvent)<br>  .build();</pre><p>One line. The flow still reads the same. The alarm stays quiet.</p><h3>Next up…</h3><p>This article is the “why.” The DSL is only the beginning. Over the next one, I’ll cover <a href="https://medium.com/@celom/narrative-driven-development-02442f539ec8"><strong>Narrative-Driven Development</strong></a> — write the flow first, fill in the steps after. The flow definition becomes a living spec readable by people who don’t write code.</p><p><a href="https://celom.github.io/prose/"><em>@celom/prose</em></a><em> is available on </em><a href="https://www.npmjs.com/package/@celom/prose"><em>npm</em></a><em>. Zero dependencies. Full TypeScript. MIT licensed.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7553cf810818" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[20 Years of Controlled Chaos, Occasionally on Purpose]]></title>
            <link>https://medium.com/@celom/20-years-of-controlled-chaos-occasionally-on-purpose-84359777d43c?source=rss-e126a55a8891------2</link>
            <guid isPermaLink="false">https://medium.com/p/84359777d43c</guid>
            <category><![CDATA[biography]]></category>
            <category><![CDATA[introduction]]></category>
            <category><![CDATA[looking-back]]></category>
            <dc:creator><![CDATA[Carlos Mimoso]]></dc:creator>
            <pubDate>Thu, 26 Feb 2026 15:17:37 GMT</pubDate>
            <atom:updated>2026-02-26T15:17:37.084Z</atom:updated>
            <content:encoded><![CDATA[<p>It has been over 20 years since I took my first job. This is, depending on how you look at it, either a long time or an eternity. In the technology industry, it is roughly equivalent to several geological epochs.</p><p>I started as a developer apprentice, tasked with the layout and styling of a new telecom operator website. I approached this with the enthusiasm of someone who didn’t yet know what they didn’t know, which is, in retrospect, the only mental state in which certain things can be attempted at all. The work was clumsy. It was finished. It went nowhere near production. It served its purpose perfectly.</p><p>It got me in the game. I was no longer a wanna-be developer. I was, in the technical sense, a developer. The distinction felt enormous at the time. It still does, actually.</p><p>Then came the first assignment involving direct contact with an actual customer — a human being with expectations and a desk that wasn’t mine to sit at. I had been told this would be nerve-wracking. It wasn’t. What it was, unexpectedly, was <em>thrilling</em>. The butterflies showed up and, finding the anxiety slot already occupied by excitement, had nowhere to go but up.</p><p>Then came my first real challenge, as challenges tend to do: standing up to an angry customer.</p><p>It had been a stressful project by any reasonable measure. My first genuine coding experience — VB Script, a language that has since been discontinued, possibly out of collective guilt — involved inheriting code of such spectacular structural disorder that understanding it felt less like engineering and more like archaeology conducted under deadline. There were all-nighters. There were solutions of questionable elegance. The company was haemorrhaging money on delays, and one afternoon, an administrator arrived to express his feelings about this. Loudly. At the team. At me specifically, as an outside contractor — the category of person most conveniently blamed for everything, historically.</p><p>Everyone in the room shuddered. Except me.</p><p>I stood my ground. I hadn’t done anything wrong and I knew it, which turns out to be a remarkably stabilising piece of information in a crisis. I refused to engage on those terms. He looked at me. I looked at him. He retracted, in the way that people sometimes do when they encounter something they weren’t expecting.</p><p>A few hours later, we shared an elevator. He used the silence to acknowledge his frustration, apologise for his outburst, and — the part I was not prepared for — praise my “stoic stand and ability to deescalate the tension.” I walked out of that elevator feeling disproportionately proud of myself. I was 19.</p><p>I have thought about that elevator a great deal since. It taught me three things that no amount of subsequent professional development training has managed to improve upon: that standing up to someone and talking back are not the same thing; that respect does not flow in only one direction on an org chart; and that the willingness to say <em>I was wrong</em> is not weakness wearing a disguise — it is, in fact, the thing itself.</p><p>A couple of years and several projects later, I began my journey into the world of start-ups. Well. One start-up. It started as a simple commercial directory — sensible, modest, achievable — and then, in the manner of start-ups everywhere and always, it rapidly escalated into something described internally as going “full metaverse”. This was the early 2000s. The web was still figuring out whether it wanted rounded corners. 3D in a browser was not a technology. It was a threat…</p><p>It was, in other words, a perfectly normal start-up.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=84359777d43c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>