stacked-pr-review

Use when addressing PR review comments on stacked jj branches. Triggered by phrases like "address review comments", "fix PR feedback", "respond to review on stacked branch", or "update the PR with reviewer suggestions".

7 stars

Best use case

stacked-pr-review is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Use when addressing PR review comments on stacked jj branches. Triggered by phrases like "address review comments", "fix PR feedback", "respond to review on stacked branch", or "update the PR with reviewer suggestions".

Teams using stacked-pr-review should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/stacked-pr-review/SKILL.md --create-dirs "https://raw.githubusercontent.com/jack-michaud/faire/main/jack-software/skills/stacked-pr-review/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/stacked-pr-review/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How stacked-pr-review Compares

Feature / Agentstacked-pr-reviewStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Use when addressing PR review comments on stacked jj branches. Triggered by phrases like "address review comments", "fix PR feedback", "respond to review on stacked branch", or "update the PR with reviewer suggestions".

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

You are a staff engineer addressing code review feedback on a stack of jj branches, keeping the fix as a clean, separate revision rather than squashing it into the parent.

## Process

1. **Read PR review comments** using `gh api`:
   ```bash
   gh api repos/{owner}/{repo}/pulls/{pr_number}/comments
   ```
   Identify which branch the PR targets (this is the "target bookmark").

2. **Navigate to the target branch** by creating a new revision on top of it:
   ```bash
   jj new <target-bookmark>
   ```
   This places the working copy directly on the target branch, ready for the fix.

3. **Make code changes** to address the review comments. Only change what's needed to satisfy the reviewer — don't refactor or clean up unrelated code.

4. **Describe the fix** with a concise commit message:
   ```bash
   jj describe -m "address review: <brief description of what was fixed>"
   ```

5. **Identify downstream stacked branches** — these are any branches that were originally built on the target bookmark and now need to be rebased onto the fix:
   ```bash
   jj log --revisions 'descendants(<target-bookmark>)' --no-graph
   ```
   Note the revision IDs of any downstream branches.

6. **Rebase downstream branches** onto the fix:
   ```bash
   jj rebase -s <downstream-rev-id> -d @
   ```
   Run this for each downstream branch that needs to move. `@` refers to the current fix revision.

7. **Resolve any rebase conflicts**, if they appear:
   - `jj log` will show conflicted revisions with a `!` marker.
   - For each conflicted revision:
     1. `jj new <conflicted-rev-id>` — create a resolution revision on top of it
     2. Edit the conflicted files to resolve the markers (`<<<`, `===`, `>>>`)
     3. Verify the file looks correct
     4. `jj squash` — fold the resolution into the conflicted revision
   - Repeat until `jj log` shows no `!` markers.

8. **Retag bookmarks** to point to the updated revisions:
   ```bash
   jj bookmark set <bookmark-name> -r <rev-id>
   ```
   Do this for each downstream bookmark that moved during the rebase.

9. **Push all affected branches** in one command:
   ```bash
   jj git push --bookmark <bookmark1> --bookmark <bookmark2> ...
   ```
   Include the fix revision's bookmark AND all downstream bookmarks.

10. **Verify**: visit the PRs on GitHub (or run `gh pr view <pr-number>`) to confirm the pushes updated the right branches. Check that CI is triggered.

## Key Rules

- **Never squash the fix into the parent** unless the reviewer explicitly asks for it — keep it as its own revision. This preserves the review history.
- **Never force-push main/master** — only push to feature branches.
- If you're unsure which revision a bookmark points to, use `jj bookmark list` to inspect.

## Completion Criteria

- All review comments are addressed in code
- The fix is a separate revision with a clear description
- All downstream branches have been rebased and their bookmarks updated
- All affected bookmarks are pushed to the remote
- CI is triggered on the updated PRs

Related Skills

SOLID Principles Code Review

7
from jack-michaud/faire

Review Python code for adherence to SOLID principles (SRP, OCP, LSP, ISP, DIP). Use when reviewing Python code for maintainability, testability, and design quality.

Python Code Review with Modern Typing

7
from jack-michaud/faire

Review Python code ensuring strict type safety with Python 3.12+ conventions. Use when reviewing Python code, writing new Python code, or refactoring existing Python code.

Prompt Brevity Review

7
from jack-michaud/faire

Review AI prompts and instructions for conciseness and clarity. Use when reviewing skills, CLAUDE.md, slash commands, or any LLM prompt content.

Pull Request File Review

7
from jack-michaud/faire

Identify and flag unnecessary test artifacts and temporary files in pull requests. Use when reviewing pull requests to ensure only production-relevant files are committed.

Code Review Orchestrator

7
from jack-michaud/faire

Delegate specialized reviews to subagents and synthesize their findings. Use when reviewing code.

Ticket Workflow

7
from jack-michaud/faire

Autonomous ticket-to-production lifecycle with promptlet-driven phases. Use when executing /ticket commands or working on ticket-driven development.

setup-sprite

7
from jack-michaud/faire

Set up a reproducible remote dev environment using sprites with credential-free git sync. Use when user asks to "set up a sprite", "create a remote dev environment", "use sprites", or mentions wanting a reproducible remote environment for a project.

Writing python services

7
from jack-michaud/faire

Writing a class with encapsulated logic that interfaces with an external system. Logging, APIs, etc.

Python Code Style

7
from jack-michaud/faire

Use when writing python code. Can be used for code review.

Plan

7
from jack-michaud/faire

My planning skill that has additional instructions. Always use when entering plan mode.

Modal

7
from jack-michaud/faire

No description provided.

merging-pr-stack

7
from jack-michaud/faire

Use when merging a stack of stacked PRs with jj. Triggered by phrases like "merge the PR stack", "merge the stacked PRs", "land these PRs", or "merge the stack into main".