Built for AI-written code

Review AI pull requests by what they change.

multipile divides your codebase into named parts, each with a stated purpose. Every pull request shows which parts it touched. Check each against its purpose. Catch the change that went where it shouldn't.

Install multipile
The multipile mascot: four soft pieces stacked into one character

See a pull request the way you think about it.

The same change, two ways. Thirty paths in alphabetical order, or three parts of your system with what each is for. One of them wasn't part of the task.

#128Show dates in the user's time zone on the settings page
30 files changed
  • src/settings/page.tsx
  • src/settings/fields/date.tsx
  • src/format/date.ts
  • src/format/date.test.ts
  • src/format/zones.ts
  • src/auth/session.ts
  • src/auth/session.test.ts
  • src/shared/time.ts
  • and 22 more
3 piles changed
  • settings-pageLets a user see and change their account settings.In the task
  • formatterTurns dates and numbers into text for every page.In the task
  • authProves who a user is, for every service.Not in the task

Early developmentmultipile is new. Commands and file formats can still change between releases.

Install

Start in a few commands.

The plugin teaches your agent to work in piles. The pile command shows them to you. The GitHub action shows every pull request by pile.

Let your agent install it

Paste this into your coding agent. It reads install.md, installs the pile command, sets up your repository to use it, and offers the plugin.

Read https://multipile.dev/install.md and install multipile for me.
multipile/multipile-agent-plugins on GitHub

The agent plugin

Teaches your coding agent to work in a repository of piles: read it pile by pile, scope and commit a change, and write .pile/ declarations.

Install the plugin in
claude plugin marketplace add https://github.com/multipile/multipile-agent-plugins.gitclaude plugin install gitrepo@multipile

The multipile skill loads on its own, or run /gitrepo:multipile.

codex plugin marketplace add https://github.com/multipile/multipile-agent-plugins.gitcodex plugin add gitrepo@multipile

The multipile skill loads on its own.

Then open any repository that has a .pile/ directory.

multipile/pile-cli on GitHub

The pile command

Lists the piles in a repository, shows each one whole, and shows what changed by pile. It works with or without the plugin.

Install pile with
brew install multipile/tap/pile

brew upgrade moves it to the next release.

mise use -g github:multipile/pile-cli

Installs the latest release from GitHub.

Latest release

Each archive holds a single pile binary. Put it on your PATH.

For macOS and Linux, on arm64 and amd64. Then run pile guide.

multipile/generate-pile-diff-action on GitHub

The GitHub action

Shows every pull request by pile, in one comment it keeps up to date, with what each pile is for. It also makes a prompt for your agent to review the pull request pile by pile.

Set up the action
.github/workflows/piles.yml
name: piles
on:
  pull_request:
    types: [opened, synchronize, reopened]

jobs:
  piles:
    runs-on: ubuntu-latest
    permissions:
      contents: read
      pull-requests: write # for the comment
    steps:
      - uses: actions/checkout@v5
        with:
          ref: ${{ github.event.pull_request.head.sha }}
          fetch-depth: 0

      - uses: multipile/generate-pile-diff-action@v0

Keeps one comment on the pull request with the piles it changed, and writes them to the job summary.

.github/workflows/piles.yml
name: piles
on:
  pull_request:
    # edited: a new base, or a new description, which is the task.
    types: [opened, synchronize, reopened, ready_for_review, edited]

jobs:
  piles:
    runs-on: ubuntu-latest
    permissions:
      contents: read
      pull-requests: write # for the comments
      id-token: write # for claude-code-action
    steps:
      # The pull request's own head, with its history, so pile can find
      # where it left its base.
      - uses: actions/checkout@v5
        with:
          ref: ${{ github.event.pull_request.head.sha }}
          fetch-depth: 0

      - id: piles
        uses: multipile/generate-pile-diff-action@v0

      - if: steps.piles.outputs.changed-piles != '0' && !github.event.pull_request.draft
        uses: anthropics/claude-code-action@v1
        env:
          GH_TOKEN: ${{ github.token }} # for pile-review-comment
        with:
          claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
          github_token: ${{ github.token }}
          plugin_marketplaces: https://github.com/multipile/multipile-agent-plugins.git
          plugins: gitrepo@multipile
          prompt: ${{ steps.piles.outputs.prompt }}
          # What pile guide review runs, and pile-review-comment to post.
          claude_args: |
            --allowedTools "Read,Glob,Grep,Write,Bash(pile:*),Bash(pile-review-comment:*),Bash(command -v pile),Bash(git fetch:*),Bash(git diff:*),Bash(git log:*),Bash(git show:*),Bash(git merge-base:*),Bash(gh pr view:*),Bash(gh pr diff:*)"

Passes the prompt to anthropics/claude-code-action with the plugin, and Claude posts its review as a second comment. It needs a CLAUDE_CODE_OAUTH_TOKEN secret. Any agent action can take the prompt instead.

On a pull request
#128Show dates in the user's time zone on the settings page
  1. github-actions bot commented

    3 of 9 piles changed

    • @settings-pageLets a user see and change their account settings.2
      • src/settings/page.tsx
      • src/settings/fields/date.tsx
    • @formatterTurns dates and numbers into text for every page.3
      • src/format/date.ts
      • src/format/date.test.ts
      • src/format/zones.ts
    • @authProves who a user is, for every service.1
      • src/auth/session.ts
  2. claude bot commented

    Pile review · 1 to consider

    • Consider@auth · not in the task: a session lasts 30 days instead of 7.Fix: move it to its own pull request, or say why it is here.
    How each pile was judged
    • @settings-page in the task, fits the intent
    • @formatter in the task, fits the intent
    • @auth not in the task, fits the intent

For a repository that declares piles. The action installs pile itself.