Picnic

Concepts

Review and merge

How Picnic checks a job's pull request and CI, sends red CI and conflicts back to the agent, and merges, including branch rules and admin bypass.

Picnic doesn't take an agent's word that it's finished. When the agent reports, Picnic runs its own checks, and it only merges when your CI is green. This page explains what it checks, what happens when something is red, and the buttons you see when a job is ready to review.

What Picnic checks

At the end of a job the agent writes a short report: what it did, the pull request, and the plan or the demo. Picnic then checks for itself:

Check For
The plan is there Plan
No changes were made: nothing edited, nothing committed Plan
The pull request exists and is from the job's branch Plan and build, Ship
The demo is there: a video that plays, screenshots or demo.md Plan and build
CI is green Ship, and Plan and build when you choose Ship it

What it checked shows on the job. A failed check sends the job to Needs you with the reasons.

If the agent forgets its report, Picnic asks it twice. If it still hasn't written one and there is an open pull request on its branch, Picnic carries on from the pull request.

CI

Picnic reads CI with the GitHub CLI:

gh pr checks --required
  • If the repository has required checks, those are what count.
  • If it has none, all checks count.
  • If there are no checks at all, Picnic treats CI as green and says so on the job.
  • A skipped or cancelled required check isn't green.

While CI is pending, the job sits in Running with the badge Waiting on CI, polled every 30 seconds for as long as CI takes. There's no time limit.

Red CI goes back to the agent

When CI fails, Picnic resumes the agent with the failure so it can fix it, up to 3 times. If it's still red after that, the job goes to Needs you as Stuck, with what was tried. Answer with a hint, or choose Try again.

Conflicts

If GitHub refuses the merge because the branch conflicts with the base, Picnic resumes the agent to merge the base branch in and push, with the same 3 tries.

Merging

Merges are always squash merges with gh pr merge --squash. A draft pull request is marked ready first.

  • The agent may merge itself. Ship tells it to merge once CI is green; Plan and build tells it to wait for you; Plan can't merge at all. A pull request it has already merged finishes the job.
  • Picnic merges anything the agent leaves ready, after its own CI check: Ship once the checks pass, Plan and build once you choose Ship it.
  • Admin bypass only on your say. If you tell the agent to merge with admin bypass, it can use gh pr merge --squash --admin. Picnic never does that on its own.

Branch rules and auto-merge

If GitHub refuses the merge because of branch rules Picnic can't meet, such as a required review from someone else, Picnic:

  1. turns on GitHub auto-merge with gh pr merge --squash --auto (never a bypass)
  2. moves the job to Needs you, ready to review
  3. checks every 2 minutes and finishes the job when GitHub merges or closes the pull request

So once a colleague approves on GitHub, GitHub merges it and the job moves to Done on its own.

Merge now and Merge with admin bypass

A Ship job waiting on branch rules has two buttons, as well as Mark done:

  • Merge now tries the merge again, for when you've fixed the blocker yourself.
  • Merge with admin bypass merges past the branch rules with --admin. It only works if your GitHub login on that machine has admin rights on the repository, and it's only ever done because you asked.

Review actions by mode

Mode When it's ready to review
Plan Comment (the agent revises the plan), Build it (the job becomes Plan and build and carries on), Ship it (the job becomes Ship and carries on), Mark done
Plan and build Comment (the agent makes the changes and records the demo again), Ship it (Picnic merges once CI is green, with admin bypass if you ask), Mark done (the draft pull request stays open)
Ship Merge now, Merge with admin bypass, Mark done (only when waiting on branch rules)

Build it and Ship it keep the same job, session, chat and worktree. Every job can also take a chat message at any time. See Modes and Chat.

Mark as done

Mark as done, in a job's menu on every machine and iPhone, finishes any job that has started and isn't done, whatever its mode. The session stops and the job goes to Done as Closed. The worktree is kept, so you can still look at it or pick it up by hand. Use it for a job that's still running that you no longer need, or a job you've finished yourself.

What's never allowed

Whatever you or the prompt say:

  • force-push
  • the agent approving its own pull request
  • touching Picnic's own background agent

See Permission asks and Waiting on CI.