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

# Create a new flow

> Create flow files and folders and write test code manually in the QA Wolf code editor.

If you'd prefer to have AI create and edit flows for you, see [Automate flows with AI](/qawolf/Automate-flows-using-AI-2d35b2a994fb8084b524cfc9aca7c358).

## Create a folder or flow

<Steps>
  <Step>
    From the **Automate** tab, navigate to the location in the file tree where you want to create the new file or folder.
  </Step>

  <Step>
    Click the <Icon icon="square-plus" /> icon in the toolbar.

    <Frame>
      <img src="https://mintcdn.com/qawolf/WhusTdYQKIe4Ucwh/images/automate-add.png?fit=max&auto=format&n=WhusTdYQKIe4Ucwh&q=85&s=6c9486408becb2ac1d35f77a16de7cc5" alt="Automate Add" width="730" height="372" data-path="images/automate-add.png" />
    </Frame>
  </Step>

  <Step>
    Click **New Folder** or **New Flow**.

    <Check>
      Use clear, descriptive names that reflect your app's feature areas — this helps both you and AI keep flows organized.
    </Check>
  </Step>
</Steps>

## Write test code

Select a flow file from the tree to open it in the code editor. The editor prefills new flows with [AAA](https://www.qawolf.com/blog/intro-to-aaa) (Arrange-Act-Assert) comments as a starting structure.

For a full explanation of flow structure and imports, see [Anatomy of a flow](/qawolf/anatomy-of-a-qa-wolf-test-mobile-edition).

<Note>
  QA Wolf lints your code as you type. See [Debug tests & flows](/qawolf/Debug-tests-and-flows-2c15b2a994fb805c9e92eec7a4a3e83e) if you encounter errors.
</Note>

## Publish your changes

<Steps>
  <Step>
    When ready, click **Review**.

    <Frame>
      <img src="https://mintcdn.com/qawolf/WhusTdYQKIe4Ucwh/images/unpublished.png?fit=max&auto=format&n=WhusTdYQKIe4Ucwh&q=85&s=782b9d57a5c69306d133a53ad3f095cd" alt="Unpublished" width="728" height="298" data-path="images/unpublished.png" />
    </Frame>
  </Step>

  <Step>
    Review your changes in the side-by-side diff.

    <Frame>
      <img src="https://mintcdn.com/qawolf/WhusTdYQKIe4Ucwh/images/publish.png?fit=max&auto=format&n=WhusTdYQKIe4Ucwh&q=85&s=cf361d253230d465be15b3f19e2b4545" alt="Publish" width="2282" height="506" data-path="images/publish.png" />
    </Frame>
  </Step>

  <Step>
    Enter a clear description of the change in the **Adding a comment** field.
  </Step>

  <Step>
    Click **Publish changes** to confirm. The publish dialog will close when your changes have been saved.
  </Step>
</Steps>
