FORM NOT VOID, MIND NO CORE

Chapter 5: Moat Design: How to Avoid Being 'Wiped Out' by OpenAI?

2026.08.10

Congratulations, you have crossed the most dangerous "fog forest" of indie development -- the uncertainty of demand. The idea in your hand is no longer a vague fantasy, but a "quasi-gold mine" that has been tempered by the market and validated with real user purchase intent.

Now it is time to pick up your tools and start digging.

In the era of traditional software development, this part might have been called "Efficient Development" or "Full-Stack Guide." But in the AI era, we need a new title: "Rapid Construction." Because AI, especially large language models, has transformed from an "optional feature" into the core productivity engine for our generation of independent developers. It can not only help us write code but also become the brain and engine of our products themselves.

However, this unprecedented power also brings an unprecedented fear: could everything we painstakingly build today become a "built-in feature" tomorrow, with a single OpenAI announcement?

This anxiety of being "wiped out by a giant" is the Sword of Damocles hanging over every AI application developer. Therefore, before we learn "how to build," we must first learn "how to survive." From day one of design, we must meticulously construct a deep and wide "moat" for our products.

This is the core of this chapter -- in the surging waves of AI, build your own sturdy ark.

In 2023, OpenAI held its first developer conference. In about an hour of keynote, Sam Altman, like a casual god, released "nuclear weapons" like GPTs and the Assistant API. In the aftermath, a wave of "wrapper" applications built on GPT-3.5 saw their core value heavily diluted ("hundreds reduced to zero" is the community's exaggerated narrative, without a statistical basis; the directional shock was real).

Countless indie developers saw their hard work wasted ("countless" is an impressionistic judgment drawn from community discussion; the conference did reshape value distribution across the AI application layer, but no statistical measure exists for how many wrapper products went to zero). This event taught all of us builders in the AI era a lesson worth billions of dollars:

If the core value of your product is entirely based on a simple call to a general-purpose large model, then you are not starting a business -- you are doing free market research for OpenAI.

You are using your own time and money to help them validate which direction has the strongest user demand. Once they have validated it, they can effortlessly "assimilate" that function as a native capability, and you, along with your product, will be ruthlessly run over.

So "moat design" is no longer an option. It is the "first principle" of AI application development. You must think clearly before writing your first import openai: What does my product have that OpenAI (or Google, Anthropic) cannot easily replicate?

This moat is not built from technical barriers -- because in model capability, you can never compete with giants. It is built from your strategic choices and product design.

5.1 Reject Pure Wrappers: If You Do Not Own Private Data, You Are Just Helping Giants Validate the Market

"Wrapper applications" are the most common and most fragile species in the AI application ecosystem.

Their typical pattern is:

  1. Build a UI.
  2. Let users input some text.
  3. Send the user's input, combined with a simple prompt template, to the GPT-4 API.
  4. Display the API's returned result directly to the user.

For example, an "AI Weekly Report Generator": the user inputs this week's work points, and it calls the API: "Please write a professional weekly report based on the following points."

Why are these applications dangerous? Because they do not own any unique, defensible assets.

  • Model: You are using a public API. The giant has a stronger internal model.
  • Prompt: The simple prompt you designed can be copied by competitors in a day, and the giant can do it even better.
  • Data: You have not accumulated any proprietary data. Each call is one-off and stateless.

When OpenAI decides to add a "weekly report generation" template to ChatGPT, your entire product loses its reason for existence.

What is "valuable wrapping" vs. "valueless wrapping"?

This does not mean all applications that call large model APIs are doomed. The key is: what added value does your "wrapper" actually provide?

A powerful criterion is: does your product accumulate some form of "private data," and does this data form a positive flywheel effect as users use it?

Here, "private data" can be broadly defined:

  1. User-generated structured data:

    • Case: A meal planning app called "MealPlan AI." Users record their dietary preferences (allergies, vegetarian, fitness goals), save favorite recipes, and log what they actually eat each day.
    • Moat: When the app needs to generate next week's shopping list, it can call GPT-4. But its prompt is not simply "generate a shopping list." It is:

      "Please generate a 7-day healthy dinner shopping list for a user who is allergic to peanuts, on a low-carb diet, ate chicken breast three times last week, likes Asian flavors, but dislikes cilantro. Ensure the ingredients are varied, and include simple cooking suggestions."

    • Analysis: In this prompt, "allergic to peanuts," "low-carb," "ate chicken breast three times last week," "likes Asian flavors" -- these are all private data that OpenAI does not have. The better your app, the more willing users are to record their data in it. The richer the user data, the more accurate and personalized the generated shopping list. The more accurate the list, the harder it is for users to leave you. This is a data flywheel. OpenAI cannot replicate this user's personal dietary database.
  2. Domain-specific non-public data:

    • Case: An "AI contract review tool" designed for lawyers. You have collected, yourself or with lawyers, thousands of professionally annotated legal contracts specific to a domain (e.g., "commercial leases"), building a proprietary knowledge base.
    • Moat: When a user uploads a new lease contract, your system does not just call GPT-4 and say "please review this contract." It first uses RAG (Retrieval-Augmented Generation) to retrieve the most relevant clauses and risk points from your private contract database, then injects this information as context into the prompt for GPT-4:

      "You are a top commercial real estate lawyer. Based on the following common risk clauses from our knowledge base ([retrieved clause 1], [retrieved clause 2]...), review this commercial lease contract uploaded by the user. Pay special attention to whether the descriptions of 'sublease rights' and 'force majeure' are unfavorable to the tenant."

    • Analysis: Your core asset is not the AI model, but that high-quality, proprietary legal contract knowledge base. This knowledge base is something giants struggle to reach with general data. For competitors to match your review accuracy, they must invest equally enormous effort and cost in building their own knowledge base.
  3. User feedback data forming a "fine-tuning" flywheel:

    • Case: An "AI marketing copywriting" application. After the AI generates copy, you provide a simple "like/dislike" button, and even allow users to manually modify the AI-generated copy and save it as "my favorite style."
    • Moat: You collect thousands of such user feedback instances. You know which copy style has the highest click-through rate in the "beauty industry" and which tone is most popular in "tech B2B." When enough data accumulates, you can use these high-quality "input-output-feedback" pairs to fine-tune an open-source model (like Llama 3) or OpenAI's dedicated model.
    • Analysis: Eventually, you will have an "expert model" dedicated to your specific domain, "trained" on real user preferences. Its performance on the specific task of generating marketing copy may surpass general-purpose GPT-5. Because the general model aims to "know a little about everything," while your model aims to "excel at marketing copy." This continuously evolving model, driven by user feedback data, is your moat.

Action Guide: Ask Yourself During the Design Phase

  • Is my application just a "prompt input box with a UI"?
  • As users use my product, will valuable, structured data be accumulated?
  • Can I obtain or create a unique, non-public dataset to enhance AI capabilities?
  • What mechanisms have I designed to collect implicit or explicit user feedback to iterate my AI system?

If your answers to these questions are all "no," be highly alert. You may be on a dangerous path that paves the way for giants.

Reject pure wrappers. Embrace the mindset of "data-enhanced AI applications." This is the first cornerstone of your moat.


5.2 Deep Embedding in Workflows: Make AI an "Uprootable" Part of the User's Business Process

The second moat-building approach is to shift from "tool thinking" to "workflow thinking."

A standalone "AI tool" might be tried out of curiosity, but it can easily be replaced by a newer, cooler tool. However, if your AI capability is deeply and seamlessly embedded into a user's existing, high-frequency, multi-step business process, it is no longer a "tool" -- it becomes the "infrastructure" of that process.

Trying to "uproot" it would mean reshaping the entire work habit. The migration cost is extremely high.

What is a "workflow"?

A workflow is a series of interconnected tasks performed to achieve a specific business goal. For example, "publishing a blog post" is a workflow that might include:

  1. Topic research
  2. Writing the first draft
  3. Finding matching images
  4. SEO optimization
  5. Publishing to WordPress
  6. Distributing to social media

"Shallow Embedding" vs. "Deep Embedding"

  • Shallow Embedding (an AI tool): You build an "AI blog title generator." After the author finishes the first draft in step 2, they might remember your tool, copy-and-paste content to your site, generate a title, and copy it back. Your tool is just an "isolated helper point" in their long process. If ChatGPT's title generation becomes stronger one day, they will abandon you without hesitation.

  • Deep Embedding (an AI workflow platform): You build a platform called "BlogFlow AI."

    • Step 1: The author enters a keyword in this platform. AI does topic research, analyzes competitors, and generates an outline.
    • Step 2: The author writes the article directly in the platform's built-in editor, which integrates an AI writing assistant. AI can help continue writing, polish, and rewrite.
    • Step 3: After writing, AI automatically suggests royalty-free images based on the content and generates appropriate ALT text.
    • Step 4: The platform automatically performs SEO analysis on the article, offering optimization suggestions for keyword density, readability, and so on.
    • Step 5: Click "Publish," and the platform automatically publishes the article, along with images and SEO settings, to the user's WordPress site via API.
    • Step 6: After successful publication, the platform automatically generates three different tweet styles for one-click distribution.

Moat Analysis:

In this "deep embedding" case, AI is no longer a set of isolated feature points. It flows like blood through every link of the entire workflow.

  • High migration cost: An author accustomed to BlogFlow AI has had their entire content creation habit "reshaped" by you. Returning to the old way of "manually cobbling together multiple tools" would feel inefficient and unbearable. Even if OpenAI releases a stronger writing model, they will not bother switching, because your product provides end-to-end, integrated value.
  • Network effects and data accumulation: All of the user's articles, drafts, and SEO data are accumulated on your platform. You can use this data to provide more personalized topic suggestions. If your platform supports team collaboration, then a team's knowledge base is built on your system, and the migration cost increases exponentially.
  • Defending against the giant's "single-point breakthrough": OpenAI might surpass you at the single point of "writing," but it is hard for them to replicate all the integration work you have done for the specific workflow of "blog publishing" -- connecting to WordPress, analyzing SEO, integrating with image libraries, generating tweets. These "dirty and tedious" tasks are exactly what giants are unwilling to do but incredibly valuable to users.

How to Find and Embed into Workflows?

  1. Become the shadow of your target user:

    • Method: Find one or two potential users, offer to pay them (or provide your product for free) to observe their day's work. See what software they use, how they switch between different software, and which transitions and data import/export processes are tedious and repetitive.
    • Example: You observe a salesperson who manually copies LinkedIn prospect information into Salesforce every day, then goes to Gmail to write a cold email. This broken "LinkedIn -> Salesforce -> Gmail" process is your opportunity.
  2. Use "integration" as a weapon:

    • Approach: Do not try to replace the core software users are already using (like Notion, Slack, Figma, Salesforce). Instead, become a "super plugin" for these software through APIs.
    • Example: Build an AI meeting notes tool. Instead of asking users to upload recordings, directly integrate with their Google Calendar. When a meeting ends, it automatically pulls the Zoom cloud recording, AI processes it, and sends the notes, action items, and key decisions to a designated Slack channel and creates a Notion page for archiving.
    • Analysis: Your AI capability, through "integration," acts like glue that binds the user's existing tool stack together, filling the "gaps" between them. You have not added burden to the user; instead, you have activated their existing software investment.
  3. Extend from "one-time task" to "recurring task":

    • Approach: Think about whether your AI function can evolve from a one-time service into a subscription-based, continuously running monitoring or automation process.
    • Example: An AI Logo generator is usually a one-time transaction. But what if you upgrade it to a "brand asset monitoring" service? The user enters their brand name and logo, and your AI system automatically scans the entire internet daily. Whenever it finds a website or social media post infringing on or misusing the brand's image, it automatically sends an alert to the user.
    • Analysis: You have transformed from a "design tool" into a "brand safety SaaS." Users will continuously pay for the value of "monitoring" and "automation" you provide -- a much more stable business model.

Action Guide: Design an "Uprootable" Product

  • Draw the complete step-by-step process your target user must go through to achieve a core business goal.
  • Identify the "breakpoints," "repetition points," and "efficiency bottlenecks" in this process.
  • Think about how your AI capability can become a "bridge" connecting these breakpoints, or a "catalyst" eliminating bottlenecks.
  • Prioritize deep integration with users' existing tools through APIs, rather than asking them to learn a new platform.

Remember, users do not buy AI. They buy a better, smoother "version of themselves at work." When your product can help them achieve this, you become an indispensable partner on their path to success -- and you possess the most solid moat.


5.3 Prompt as Backend: Building a Structured Prompt Library as Your Product's Core Asset

The third moat leans more toward technical implementation, but its essence is still strategic thinking. It is about how we view and manage the core production material of the AI era -- prompts.

For many simple AI applications, their "backend logic" might be just a few lines of prompt strings hardcoded in the code. This approach is extremely fragile and difficult to maintain, iterate, and scale.

A more advanced, more defensible concept is: upgrade your prompts from simple "strings" to a structured, manageable, version-controlled "core asset." Treat your prompt engineering as seriously as designing a database schema or building microservices.

We call this "prompt as backend."

Why is a structured prompt library a moat?

  1. Barrier of complexity and precision: A "super prompt" (what we call a "Prompt Chain" or "Prompt Template") that has been iterated hundreds of times, contains complex logic (like Chain of Thought, role-playing, output format constraints), and incorporates dynamic data injection -- is itself a significant intellectual asset. The quality and stability of its output far surpass a simple one-line prompt. Competitors can copy your UI, but it is very difficult to reverse-engineer your meticulously crafted prompt system that handles various edge cases stably.

  2. Rapid iteration and A/B testing capability: When you decouple prompts from code and store them in a dedicated system (a database, a version-controlled YAML file library, or a third-party platform like LangSmith or PromptLayer), you gain the ability to iterate agilely.

    • You can design multiple versions of a prompt for the same task and A/B test them to see which version yields higher user satisfaction.
    • When the upstream model upgrades (e.g., GPT-4 to GPT-5), you can quickly adjust and optimize your prompt library to adapt to the new model without redeploying your entire application.
    • You can let non-technical operations staff or domain experts optimize prompt copy directly in this system, without modifying backend code.
  3. Composability and extensibility: A structured prompt library allows you to "modularize" prompts. You can define some basic "prompt modules" (like "politely refuse unreasonable requests," "format output as JSON") and then reference and combine them like building blocks in more complex Prompt Chains. This greatly improves the maintainability and reusability of prompt development.

How to Build Your "Structured Prompt Library"?

Phase 1: From "String" to "Template"

Do not write something like this in your code:

prompt = f"Please write a marketing email about {product_name} for {customer_segment}."

At minimum, use a template engine (like Jinja2) to separate variables from static instructions:

// email_prompt.jinja2
You are an expert copywriter.
Your task is to write a marketing email.
Product: {{ product_name }}
Target Audience: {{ customer_segment }}
Tone: {{ tone | default('professional') }}

Please write the email now.

This makes prompts more readable and manageable.

Phase 2: Externalize and Version-Control the "Template"

Move your prompt template files out of the codebase into a dedicated location, and version-control them with Git. Or store them in a database table with fields like prompt_name, version, template_content.

This way, your application dynamically loads the specified name and version of the prompt template from this "prompt source" at runtime.

Phase 3: Introduce "Prompt Chains" and Advanced Techniques

For complex tasks, a single prompt is often not enough. You need to design a "prompt chain" where multiple prompts work together.

Case Study: An AI Feature That "Automatically Modifies Code Based on User Feedback"

  • User input: "This button is too small. Make it bigger."
  • Related code snippet: "<button class='btn-sm'>Click Me</button>"

A simple prompt (poor results):

"The user said 'This button is too small. Make it bigger.' Please modify this code: <button class='btn-sm'>Click Me</button>"

  • Problem: AI might return a full paragraph of explanation instead of just the modified code. It might change btn-sm to btn-lg, but if your CSS framework does not have a btn-lg class, the code is invalid.

A structured Prompt Chain (good results):

  1. Prompt 1: Intent Analysis

    • Input: User feedback + code
    • Prompt:

      You are a code analysis assistant. Please analyze the user's request and return the user's core intent and the specific code attributes to be modified in JSON format. User request: "{{ user_feedback }}" Code: "{{ code_snippet }}" Output JSON: {"intent": "change_size", "target_property": "class", "suggested_value": "larger"}

    • Output (LLM 1): {"intent": "change_size", "target_property": "class", "suggested_value": "larger"}
  2. Intermediate Logic

    • Your backend code receives this JSON. It checks that intent is change_size and target_property is class.
    • It queries its own "CSS knowledge base" (can be hardcoded or another AI call) and finds the available button size classes are btn-sm, btn-md, btn-lg.
    • It determines that "larger" corresponds to upgrading from btn-sm to btn-md.
  3. Prompt 2: Code Generation

    • Input: Original code + precise instruction after your logic processing
    • Prompt:

      You are a code generator. Your task is to return only the modified code snippet, without any explanation. Original code: "{{ original_code }}" Modification instruction: Replace the class 'btn-sm' with 'btn-md'.

    • Output (LLM 2): <button class='btn-md'>Click Me</button>

Moat Analysis:

This Prompt Chain, combining AI's understanding capability with your own business logic (CSS knowledge base), forms a powerful, hard-to-replicate system. Even if competitors know you are using GPT-4, it is difficult for them to guess your internal two-step process that combines structured data. This process itself, along with the carefully designed prompts that constitute it, is your moat.

Action Guide: Treat Your Prompts Like Software

  • Decouple: Separate prompts from business logic code.
  • Template: Use a template engine to manage dynamic data injection.
  • Version-control: Use Git or a database to track prompt change history.
  • Structure: For complex tasks, design Prompt Chains and use structured data formats like JSON for communication between AI and code.
  • Test: Build an evaluation set for your core prompts, containing typical inputs and expected outputs. Every time you modify a prompt, run the tests to ensure there are no "breaking changes."

Summary of Chapter 5:

We discussed how to design three solid moats from the very beginning when building products in the AI era, to avoid being easily crushed by giants. These three moats complement each other:

  1. Data Moat: Reject pure wrappers. Build a data flywheel by accumulating private data (user data, domain data, feedback data).
  2. Workflow Moat: Reject isolated tools. Build high switching costs by deeply embedding into users' existing workflows and providing end-to-end value.
  3. Prompt Moat: Reject hardcoded strings. Build technical and cognitive barriers by creating a structured, iterable, testable prompt system.

With this framework of "defensive design" in mind, you can now confidently enter the next chapter and learn how to use AI as our most powerful productivity tool, rapidly transforming your ideas into real products with the efficiency of "one person matching ten."