PR stack

Overview

The PR Stack feature helps you break down large changes into smaller, manageable pull requests that are stacked on top of each other. This approach makes code reviews easier, reduces merge conflicts, and allows for incremental progress on complex features.

When you have multiple logical changes on a single branch, PR Stack automatically analyzes your commits and creates separate branches with stacked PRs, where each PR builds upon the previous one.

Note: This feature is only available in Git mode.

Quick Start

  1. Make sure you're running Friday in Git mode
  2. Ensure you have multiple commits or changes on your current branch that you want to split
  3. Type /pr-stack in the Friday prompt
  4. Friday will analyze your changes and create stacked PRs automatically
  5. Once complete, Friday will navigate back to your original branch

Usage

How It Works

When you invoke the /pr-stack command, Friday will:

  • Analyze all changes on your current branch
  • Identify logical groupings of related changes
  • Create separate branches for each logical group
  • Stack the PRs appropriately so each builds on the previous one
  • Return you to your original branch when finished

Examples

Example 1: Feature with Multiple Components

Suppose you're working on a feature branch with the following changes:

  • Database schema updates
  • API endpoint implementation
  • Frontend UI components

Running /pr-stack would create:

Branch 1: feature/database-schema
  ↓ (base for Branch 2)
Branch 2: feature/api-endpoints
  ↓ (base for Branch 3)
Branch 3: feature/ui-components

Each PR can be reviewed and merged independently, with later PRs automatically updating their base as earlier ones are merged.