Skip to main content

Overview

Two-phase completion:
  1. Plan phase — call without pr_url. Returns a squash-merge plan: suggested title, markdown PR body, and literal git + gh commands to run locally.
  2. Finalize phase — after you open and merge the PR, call again with pr_url. Status flips to completed and participants’ sessions are notified.
If the workstream still has open tasks the response includes summary.has_blockers=true. Resolve those (or cancel them) before finalizing.

Parameters

ParameterTypeRequiredDescription
slugstringYesWorkstream slug
pr_urlstringNoOnce the PR exists, pass its URL to finalize
session_idstringNoYour current session id

Plan-phase example

{
  "tool": "workstream_complete",
  "arguments": { "slug": "stripe-subscription-upgrades" }
}
Response (abridged):
{
  "plan": {
    "suggested_title": "feat(billing): stripe subscription upgrades",
    "pr_body_md": "## Summary\n- ...\n\n## Test plan\n- ...",
    "commands": [
      "git checkout main && git pull",
      "git merge --squash ena/stripe-subscription-upgrades",
      "git commit -m 'feat(billing): stripe subscription upgrades'",
      "gh pr create --base main ..."
    ]
  },
  "summary": { "has_blockers": false, "open_tasks": 0 }
}

Finalize example

{
  "tool": "workstream_complete",
  "arguments": {
    "slug": "stripe-subscription-upgrades",
    "pr_url": "https://github.com/acme/app/pull/417"
  }
}