Skip to content

Smart PR

Smart PR is a context-aware command that creates branches, opens PRs, and marks them ready for review — all with a single key.

Smart PR demo

Press 8 and Smart PR determines the right action based on your current context:

ContextAction
On main + issue selectedCreates branch, worktree, switches to it, opens draft PR
On main + no issueOpens popup to enter issue number
On feature branch + no PRCreates standard PR (ready for review)
On feature branch + draft PRMarks PR as ready for review
On feature branch + ready PRShows “already published” message

When starting work from an issue on main, Autogit automatically creates a worktree for your new branch. This means:

  1. A new branch is created from the issue
  2. A worktree directory is created as a sibling to your main repo
  3. Autogit switches to the new worktree
  4. The draft PR is created (linked to the issue)

This workflow is optional but recommended, especially if you’re running multiple AI coding agents in parallel. Each agent can work in its own isolated worktree without file conflicts.

Draft PR — Created when starting from an issue on main:

  • Signals work has started (prevents duplicate effort)
  • Get early CI feedback
  • Iterate before marking ready

Standard PR — Created when submitting from a feature branch:

  • You’re ready to submit for review
  • Created ready for review immediately
KeyAction
8Smart PR (context-aware)
  1. On main, select an issue in the Issues panel
  2. Press 8 — creates branch, worktree, switches to it, opens draft PR
  3. Work on changes in your isolated worktree, commit with 7 (Smart Commit)
  4. Press 8 again — marks PR ready for review
  1. On a feature branch with commits
  2. Press 8 — creates standard PR (or marks draft ready)

When creating a PR from an issue, Autogit generates:

  • Branch name — Derived from issue number and title (e.g., 42-fix-login-bug)
  • PR title — From the issue title
  • PR body — Links to the issue with a checklist from AI analysis

Create the draft PR as soon as you start working. This:

  • Signals to teammates (and AI agents) that work is in progress
  • Gets CI running early
  • Provides a place to track progress

Keep PRs focused on a single issue. This leads to:

  • Faster reviews
  • Easier rollbacks if needed
  • Cleaner git history

The typical flow is press 8 to start (draft PR), then 8 again to ship (ready for review). No need to leave Autogit.