# The AI-First Automation Build Loop <!-- ref: @knowledge/protocols/ai-first-automation-build-loop type: protocol tags: [automation, AI, workflow design, node-based platforms, spec-driven development] triggers: [building automation workflows, debugging node failures, configuring business variables, generating build specifications] trigger_prompt: When you're tasked with creating or refining an automation workflow and need to ensure it is efficient, simple, and adaptable to client needs. version: 2 updated_at: 2026-10-18T05:41:49.359Z --> The bottleneck in automation work is no longer knowing every node in the platform — it's scoping the build and debugging it in loops. Plan with a docs-loaded AI, generate from a spec, debug by racing two AIs at the same error. *Synthesized from Liam Ottley, "How to Build & Sell AI Agents in 2026: Ultimate Beginner's Guide."* **Applies to:** node-based automation platforms with (a) a native AI workflow builder that accepts a written spec, and (b) an execution log you can drill into. n8n is the reference implementation in the source; Make, Zapier's agent builder, and similar tools fit the same shape. Ottley reports building his first tutorial workflow the traditional way — dragging and configuring nodes by hand — finding it painfully slow, and reshooting the entire tutorial around an AI-first process instead. The loop below is that process. **1. Build a planning agent that has the docs.** Create a custom GPT (or equivalent) whose knowledge base is the platform's documentation, and give it a CTO-ish role: it should interrogate you about the automation before proposing anything. The generalizable move underneath this is *context sourcing* — a large share of the work is now finding who has the best context and pulling it in. For a voice-agent build, Ottley fed a voice vendor's public prompting guide into the planner rather than writing prompt theory himself. **2. Prompt explicitly for MVP and agentic simplicity.** Planning AIs over-engineer by default — reaching for Redis, Postgres-backed chat memory, webhook confirmation dances. Say the words *MVP* and *don't worry about edge cases* out loud. Push generators toward fewer nodes and more intelligence: ask for a single agent with a few tools attached rather than a sprawling deterministic graph. *The honest tension:* deterministic node-heavy workflows genuinely shrink the error surface, because LLMs are non-deterministic. Choosing the agentic version trades reliability for simplicity and flexibility. Make that trade deliberately, not by default. **3. Convert the plan into a spec, then let the platform generate the build.** This is `spec-driven-development` applied to automation platforms — see that framework for the principle. The platform-specific delta worth recording: **take the spec-writer's markdown-formatted output, not raw text.** The heading and list structure is load-bearing for node generators; plain prose produces visibly worse graphs. **4. Front-load a configuration node.** Put every business variable a client might change — thresholds, recipient addresses, sheet IDs, currencies, qualification floors — in one config node that downstream nodes reference. When the client changes their mind about a number, you edit one place. This is the step that survives contact with clients and the one no tutorial teaches. **5. Debug by racing two AIs.** When a node fails, do both at once: paste a screenshot of the failing node and its JSON payload into your web-searching planning GPT (which can look up current docs and community threads), *and* ask the platform's built-in assistant to execute and refine. Whichever fixes it first, wins. Operational note: errors frequently hide inside sub-executions. Drill into the sub-execution view rather than trusting the top-level error message. --- **Adjacent decision (not part of the loop): when to own your infrastructure.** Ottley frames managed cloud hosting as renting an apartment and self-hosting as owning the home — predictable monthly server cost instead of usage spikes, unlimited workflows, community node access. The trigger to move is having paying clients, not having an opinion about hosting. *Flagged: the specific hosting recommendation in the source episode was a paid sponsorship. The client-count trigger is the reusable part; treat the vendor endorsement as an ad.* --- *Related: `@protocol/protocol-api` · `@content/youtube/tiago-forte/where-to-focus-your-career-as-ai-changes-everything` · `@content/youtube/cole-medin/parallel-claude-code-git-worktrees-this-setup-will-change-how-you-ship` · `@content/youtube/cole-medin/bmads-founder-on-the-future-of-ai-coding-and-the-slop-apocalypse` · `@content/youtube/sean-kochel/5-engineer-only-claude-skills-every-vibe-coder-needs`* --- *You're reading a protocol on [protocol.supply](https://protocol.supply) — hosted, searchable knowledge for AI agents. Think Agent Skills, as an API: bootstrap once (`curl -sL https://api.protocol.supply/bootstrap`), search (`/search?q=…`), fetch (`/@repo/slug`).* *Any skill can become a protocol, and any protocol installs as a local skill — tell your agent "install this as a skill" or see [`@protocol/protocol-to-skill`](https://api.protocol.supply/@protocol/protocol-to-skill).*