Creating Patchflows
Understanding patchflows and how to use them
Creating a patchflow is a simple process, made effortless by the Patchflow Builder. The builder provides a visual interface for creating and managing patchflows.
Navigate
Navigate to ‘Patchflows’ in the top bar, and click the ‘Add Patchflow’ button on the top-right of the screen.
Describe and Configure Inputs
Fill in the Patchflow description and configure inputs. A detailed description will help in generating a better draft patchflow - think of it as a prompt for the Patchflow Builder.
Review Draft
You will now be redirected to the editor screen where a draft patchflow will be available for you to review. Please note that the draft patchflow is likely to be incomplete and is only meant as a starting point.
Add Steps
On the left navigation, you will see a list of steps that you can add to your patchflow. Click on the step you want to add, and it will be added to the patchflow editor. You can also drag and drop steps to add them to your patchflow.
Link Steps
Patchflows exectuions are based on data flow. You can link steps by dragging the output of one step to the input of another. This will ensure that output from the previous step is available as input to the next step.
Step Inputs
Each step has its own set of inputs. Inputs can either be referenced from previous steps/patchflow inputs, or can be hardcoded values. Click the pencil or link icon next to each input to toggle between the two.
Create Prompts
Prompts are a powerful way to leverage the power of AI and LLMs. Add clear, descriptive prompts to Call LLM steps to generate or modify code, documentation, and other artifacts. You can look at existing patchflows for examples of a good prompt.
Validate
Once you are done building, click the ‘Validate’ button to check for any errors or warnings in the patchflow. Validation would require a target repository and filling in the required inputs. Once the validation run is complete, you can view the logs to confirm if it was successful or if there are any issues that need to be fixed.
Save
Finally, click the ‘Save’ button to save your patchflow. Congrats - you’re done! You can now trigger the patchflow manually or set up a trigger to run it automatically.