Step

A reusable, atomic action that carries out a well-defined task.

For example, the ReadPR step reads a Pull Request from a repository, and the CallLLM step prompts an LLM endpoint with the given input.

Steps are the building blocks for creating automations in Patched. They abstract away implementation complexity and provide a simple interface to carry out an operation. This does not mean that steps are limited in functionality or flexibility - they can be modified, extended, or recreated as needed.

Prompt

A text-based, templated instruction used in the CallLLM step to perform a task.

For example, Fix this code which is breaking my build: {{code}} is a prompt that asks the LLM to generate a fix in a code snippet that is provided dynamically based on the code provided in the step’s input.

Prompts are critical to create high-quality, reliable automations. They provide a way to execute an infinite array of context-aware tasks, including code generation, reasoning, data transformation, and more. The best results are achieved when prompts are well-defined, clear, and concise - with necessary context and examples.

Patchflow

An LLM-assisted workflow defined using steps and prompts that can be triggered to automate a well-defined process.

For example, the PRReview patchflow automates the process of reviewing a Pull Request, and the Generate Docstrings patchflow automates the process of generating docstrings for a repository.

Patchflows are a directed graph that represents the flow of data between steps. Each node in the graph represents a step, and each edge represents the data flow.

Patch

A single execution of a patchflow that automates a specific task.

For example, running PRReview creates a comment on the target Pull Request with the review details, and running Generate Docstrings creates a Pull Request with the generated docstrings. Each run is considered a patch.

Patches are the atomic unit of execution in Patched. They are created by running a patchflow with the required input data. Patches can be triggered manually, scheduled, or triggered by external events like webhooks or API calls.

Organization

A workspace that groups repositories, patchflows, and users together for easier management and collaboration.

For example, an organization can be a company, a team, or even an individual. Organizations commonly corespond to a GitHub organization or a GitLab group.

Organizations provide a way to manage access control, billing, and collaboration within Patched. Users can belong to multiple organizations and have different roles within each organization.