Ship pr

From compozy/agh · View interactive version

Ship pr is an AI agent skill from the GitHub repository compozy/agh. Ships a finished feature, bug fix, or refactor end-to-end — explores the change's impact on docs/site/README, generates release notes (via pr-release if present, otherwise inline from git log), writes a complete PR description (including QA screenshots and summary when qa-report/qa-execution artifac

How to use this skill

Skill file

ship-pr — Finish-a-Feature Release & PR Workflow

This skill drives the end-of-feature ritual: detect what changed, document its impact, generate release notes, write a complete PR description, commit cleanly, open the PR via gh, and (optionally) start an automated review-watch loop.

Two layers exist:

Optional steps are skipped silently when the supporting tool or artifact is not present — the skill never blocks on missing tooling.

Required Reading Router

Match the phase to the row. Read the listed file in full before acting on that phase. Inline content in this SKILL.md is a tripwire, not the source of truth.

| Phase | MUST read |

| ---------------------------------------------------- | -------------------------------------------------------- |

| Explore PR impact (docs/site/README/changelog) | references/explore-impact.md |

| Generate release notes | references/release-notes.md |

| Build PR description | references/pr-description.md |

| Build PR description with QA artifacts | references/pr-description.md + references/qa-artifacts.md |

| Commit staged changes | references/commit-conventions.md |

| Launch CodeRabbit review-watch loop | references/coderabbit-watch.md |

Reference Index

Pre-flight: detect tooling

Run the bundled detector (read-only — probes the filesystem and PATH only):

bash skills/mine/ship-pr/scripts/detect-tooling.sh

It prints a JSON object describing what is available:

{
  "gh": true,
  "pr_release": false,
  "compozy": true,
  "skeeper_installed": true,
  "skeeper_configured": false,
  "commitlint_config": "commitlint.config.cjs",
  "qa_output_paths": ["docs/qa"],
  "task_slug_candidates": ["my-feature"]
}

Branch decisions off this output. Notes:

Hard requirements: gh on PATH and a git working tree with changes ready to ship (staged or unstaged in tracked files). Abort with a clear message if either is missing — do not invent workarounds.

Operating Loop

Run the steps in order. Skip optional steps cleanly when the detector reports the supporting tool is absent.

1. Explore the change's impact

Fan out up to 3 parallel Explore subagents over the diff against the base branch. Each agent gets a distinct slice: docs site / README & top-level docs / .github/, CHANGELOG, examples & e2e. Aggregate results into a single bullet list grouped by impact area — this list feeds steps 2 and 4.

Gist tripwires:

STOP. Read references/explore-impact.md in full before launching the Explore agents. The inline tripwires above are not the contract — the reference defines the exact search prompts, the parallelism budget, and the aggregation format.

2. Generate release notes

Two flows, selected by the detector:

STOP. Read references/release-notes.md in full before running either flow. It contains the exact CLI invocations, the conventional-commit grouping rules, and the worked examples for both flows.

3. (Optional) Skeeper sync

Only if the detector reports skeeper_configured: true (i.e., .skeeper/ directory and skeeper.lock both exist):

skeeper sync --dry-run         # preview
skeeper sync --commit -m "..."  # apply + stage skeeper.lock

Review the dry-run plan before applying. Skip this step entirely otherwise — do not install or initialise skeeper as a side effect.

4. Build the PR description

Assemble these sections in order: Summary (≤ 3 bullets, focus on user-visible outcome), Changes (grouped by impact area from step 1), Release Notes (excerpt from step 2; for Flow B paste the full inline changelog here), QA (only when the detector reports qa_output_paths), Test plan (checklist of checks actually performed — never invent results).

Gist tripwires:

STOP. Read references/pr-description.md in full before writing the body. When the detector reports QA artifacts, also STOP and read references/qa-artifacts.md before drafting the QA section — that reference defines the path conventions, severity extraction, and screenshot linking rules.

5. Commit staged changes

Detect the repo's commit convention via the detector's commitlint_config value (fallback to @commitlint/config-conventional defaults). Stage files by name (never git add -A), write the commit message via HEREDOC, and never use --no-verify or --no-gpg-sign.

Gist tripwires:

STOP. Read references/commit-conventions.md in full before staging or committing. It contains the config-detection priority, the rules for reading type-enum/scope-enum, and the exact HEREDOC commit pattern.

6. Open the PR via `gh`

Refuse to push from the repo's main branch — opening a PR requires a feature branch with a distinct head:

BRANCH="$(git rev-parse --abbrev-ref HEAD)"
case "$BRANCH" in
  main|master|develop|trunk) echo "Refusing to ship from $BRANCH. Create a feature branch first." >&2; exit 1 ;;
esac

git push -u origin "$BRANCH"
gh pr create --title "<title>" --body-file "$BODY_FILE"

$BODY_FILE is the temp file written in step 4 (per references/pr-description.md §5). Capture the returned PR URL and number from gh's stdout — the PR number is the input for step 7.

7. (Optional) CodeRabbit review-watch loop

Only if the detector reports compozy: true. Resolve the task slug:

  1. If the detector reports any task_slug_candidates, pick the one whose name best matches the current git branch (or ask the user when ambiguous).
  2. Otherwise, derive a kebab-case slug from the branch name and create .compozy/tasks/<slug>/ (just mkdir -p — the compozy reviews watch daemon populates the rest).

Then run, substituting <slug> and <number>:

compozy reviews watch \
  --auto-commit --auto-push \
  --batch-size 20 \
  --ide codex --model gpt-5.4 --reasoning-effort high \
  --max-rounds 3 \
  --name <slug> \
  --pr <number> \
  --provider coderabbit

STOP. Read references/coderabbit-watch.md in full before invoking the command. It documents every flag, the alternative --until-clean mode, the attach-mode options, and the failure paths (missing compozy, missing .compozy/tasks/<slug>/, provider auth missing).

When NOT to use

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.