Skip to content

Swarm mode: support draft PR mode for child looms #577

@acreeger

Description

@acreeger

Summary

When draft PR mode is configured, swarm child looms should respect it. Currently child agents create regular PRs targeting the epic branch. With draft PR mode enabled, the flow should be:

  1. il start creates the child loom worktree with a draft PR (already supported by start command when draft PR mode is configured)
  2. The agent (il spin -p) does its work, pushes to the branch, cleans up the placeholder commit
  3. New: SwarmSupervisor marks the draft PR as "ready for review" before merging it via gh pr ready <number>

Changes needed

SwarmSupervisor.ts

In mergePR(), before calling gh pr merge, call gh pr ready <number> to mark the draft PR as ready for review. This is idempotent - calling it on an already-ready PR is a no-op.

Alternatively, check if the PR is a draft first and only call gh pr ready if needed.

LoomManager.ts / start flow

Ensure that when swarmMode: true is set AND draft PR mode is configured, the child loom creation path still creates a draft PR. The swarm fast path (finishSwarmLoom()) currently skips PR creation - it may need to create a draft PR when the setting is enabled.

Template / Agent prompt

No changes needed - the agent already handles pushing and cleaning up placeholder commits in headless mode.

Notes

  • gh pr ready <number> is the command to convert a draft PR to ready-for-review
  • This is a nice-to-have for keeping implementation notes visible on the PR during agent work

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions