> ## Documentation Index
> Fetch the complete documentation index at: https://docs.potpie.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Make Code Changes

In this tutorial, you'll learn how to use Build in Potpie to generate code that matches your codebase's exact patterns and review every change as a diff before it reaches the repository.

To understand how Build works, see the [Build mode page](/build-flow/build-a-feature).

## Workflow

<Steps>
  <Step title="Describe the feature">
    Enter a description of the feature for to build.

    <img src="https://mintcdn.com/potpieai/gJ4EwDE1Ctkm-zsd/images/feature-description-input.png?fit=max&auto=format&n=gJ4EwDE1Ctkm-zsd&q=85&s=8980b75ab3641f4322d1f6cc76b011fd" alt="Feature description input" width="2782" height="1576" data-path="images/feature-description-input.png" />
  </Step>

  <Step title="Clarifying questions">
    Potpie surfaces a set of clarifying questions as multiple choice options. Answers lock in the scope and requirements before the specification begins.

    <img src="https://mintcdn.com/potpieai/gJ4EwDE1Ctkm-zsd/images/code-agent-clarifying-questions.png?fit=max&auto=format&n=gJ4EwDE1Ctkm-zsd&q=85&s=bde9fb594f8d622594c8bebd54697324" alt="Clarifying questions" width="2782" height="1576" data-path="images/code-agent-clarifying-questions.png" />
  </Step>

  <Step title="Specification">
    Potpie parses the codebase against the confirmed requirements and generates a specification covering every file to create or modify, implementation details for each change, and dependency relationships between affected components.

    <img src="https://mintcdn.com/potpieai/gJ4EwDE1Ctkm-zsd/images/code-agent-spec-page.png?fit=max&auto=format&n=gJ4EwDE1Ctkm-zsd&q=85&s=9ada4518281cd0fc3ea08dd49dc51196" alt="Specification page" width="2782" height="1576" data-path="images/code-agent-spec-page.png" />
  </Step>

  <Step title="Plan">
    Once the spec is confirmed, Potpie generates a plan.

    <Tabs>
      <Tab title="Summary">
        An explanation of what changes, which parts of the codebase are in scope, and how the new code fits the existing system.

        <img src="https://mintcdn.com/potpieai/gJ4EwDE1Ctkm-zsd/images/code-agent-plan-summary.png?fit=max&auto=format&n=gJ4EwDE1Ctkm-zsd&q=85&s=68649afb8215d1229c83bac42344f1c5" alt="Plan summary tab" width="2782" height="1576" data-path="images/code-agent-plan-summary.png" />
      </Tab>

      <Tab title="Architecture">
        A dependency graph showing how new components wire into existing services, data models, and API boundaries as they exist in the repository.

        <img src="https://mintcdn.com/potpieai/gJ4EwDE1Ctkm-zsd/images/build-architecture1.png?fit=max&auto=format&n=gJ4EwDE1Ctkm-zsd&q=85&s=103404150b3d54391be770954e1c4cdd" alt="Architecture tab" width="2782" height="1576" data-path="images/build-architecture1.png" />
      </Tab>

      <Tab title="Plan items">
        Each task lists the target file, implementation intent, dependency order, and the verification criteria checked after each diff is generated.

        <img src="https://mintcdn.com/potpieai/gJ4EwDE1Ctkm-zsd/images/code-agent-plan-items.png?fit=max&auto=format&n=gJ4EwDE1Ctkm-zsd&q=85&s=a277fdf9d25a6f36e62c2ebca5d883f8" alt="Plan items tab" width="2782" height="1576" data-path="images/code-agent-plan-items.png" />
      </Tab>
    </Tabs>
  </Step>

  <Step title="Code generation">
    Potpie generates the code and presents every change as a **diff**. Changes match the existing code style and conventions identified during **specification**.

    <img src="https://mintcdn.com/potpieai/gJ4EwDE1Ctkm-zsd/images/build-codegen.png?fit=max&auto=format&n=gJ4EwDE1Ctkm-zsd&q=85&s=590a8898fd609e811910c8cf4d8bd53a" alt="Code generation diff view" width="2782" height="1576" data-path="images/build-codegen.png" />
  </Step>

  <Step title="Pull request">
    Clicking **Create PR** pushes the full diff to the repository.

    <img src="https://mintcdn.com/potpieai/gJ4EwDE1Ctkm-zsd/images/Build-Pull.png?fit=max&auto=format&n=gJ4EwDE1Ctkm-zsd&q=85&s=d48ebde7a956a2a4eaf09fc180019166" alt="Final review before PR" width="2782" height="1576" data-path="images/Build-Pull.png" />
  </Step>
</Steps>
