Patch, PR flow (Orchestrator)
This skill runs /speq-patch on its own branch and ships the result as a ready PR. /speq-patch writes the code, tests, specs, and docs. You run every git/gh action yourself, per /speq-git-operations. Stop on the first failed step and report it. Running it again resumes the work.
Required Skills
Invoke before starting:
/speq-writing-guardrails: prose style for GitHub text
/speq-git-operations: git/gh writes, PR title, version bump
/speq-patch invokes its own required skills.
Workflow
0. Load Project Hook
Check for .speq/patch-pr-hook.md in the repo root.
- Present: read it. Announce "Loaded project hook: .speq/patch-pr-hook.md". Its content is authoritative: it can add to, change, or override any part of this workflow. If the hook conflicts with this workflow, the hook wins.
- Absent: continue without mention.
1. Check Prerequisites and Name
gh auth status fails, or the repository has no origin remote → stop before any edit and name the missing piece.
- Run
/speq-patch steps 0 to 3: its hook, prerequisites, discovery, the patch name, and the first size check.
- Derive the PR title from
<patch-name> per /speq-git-operations § PR title and version bump.
2. Branch
Run checkout with patch/<patch-name>.
- Found: the latest commit
HEAD is not on origin/<default-branch>, has the PR title as subject, and git status --porcelain lists nothing outside the patch folder, new files included → go to step 5. Otherwise go to step 3.
- Not found: run
create-branch with patch/<patch-name> and base: origin/<default-branch>. Uncommitted changes the user assigned to the patch carry over.
3. Patch
Run /speq-patch steps 4 to 8, but keep the patch folder: step 5 deletes it. Keep the report for the PR body. Skip its closing line.
4. Bump Version
Bump the version file and sync the lockfile per /speq-implement-pr step 3, at the level /speq-git-operations § PR title and version bump gives.
5. Ship
- Run the suites and the lint command once more per
/speq-patch step 4, so the PR reports the tree it ships. Red → stop and report as in /speq-patch step 4.
- A run that resumed here reads the ADR and architecture lines from the commit's diff, and the affected plans from
speq plan list.
- Ship:
Run operation: ship-ready (per /speq-git-operations)
paths: every file /speq-patch changed except the patch folder, the version file, and the lockfile
message: <the PR title>
title: <the PR title>
body: per references/pr-body-template.md
- Delete the patch folder
specs/_plans/<patch-name>/.
Never merge the PR.
6. Report
Give the PR link, the new version, and the /speq-patch report.
1---2name: speq-patch-pr3description: "Ships a bug fix, small feature, or tweak as one ready PR: runs /speq-patch on the patch/patch-name branch, bumps the version, commits, and opens a ready pull request. Run again to resume. Arg: change intent text."4metadata:5 source: https://skillmd.com/skills/exasol-labs/speq-patch-pr6---78# Patch, PR flow (Orchestrator)910This skill runs `/speq-patch` on its own branch and ships the result as a ready PR. `/speq-patch` writes the code, tests, specs, and docs. You run every git/`gh` action yourself, per `/speq-git-operations`. Stop on the first failed step and report it. Running it again resumes the work.1112## Required Skills1314Invoke before starting:15- `/speq-writing-guardrails`: prose style for GitHub text16- `/speq-git-operations`: git/`gh` writes, PR title, version bump1718`/speq-patch` invokes its own required skills.1920## Workflow2122### 0. Load Project Hook2324Check for `.speq/patch-pr-hook.md` in the repo root.25- **Present:** read it. Announce "Loaded project hook: .speq/patch-pr-hook.md". Its content is authoritative: it can add to, change, or override any part of this workflow. If the hook conflicts with this workflow, the hook wins.26- **Absent:** continue without mention.2728### 1. Check Prerequisites and Name29301. `gh auth status` fails, or the repository has no `origin` remote → stop before any edit and name the missing piece.312. Run `/speq-patch` steps 0 to 3: its hook, prerequisites, discovery, the patch name, and the first size check.323. Derive the PR title from `<patch-name>` per `/speq-git-operations` § PR title and version bump.3334### 2. Branch3536Run `checkout` with `patch/<patch-name>`.37- **Found:** the latest commit `HEAD` is not on `origin/<default-branch>`, has the PR title as subject, and `git status --porcelain` lists nothing outside the patch folder, new files included → go to step 5. Otherwise go to step 3.38- **Not found:** run `create-branch` with `patch/<patch-name>` and `base: origin/<default-branch>`. Uncommitted changes the user assigned to the patch carry over.3940### 3. Patch4142Run `/speq-patch` steps 4 to 8, but keep the patch folder: step 5 deletes it. Keep the report for the PR body. Skip its closing line.4344### 4. Bump Version4546Bump the version file and sync the lockfile per `/speq-implement-pr` step 3, at the level `/speq-git-operations` § PR title and version bump gives.4748### 5. Ship49501. Run the suites and the lint command once more per `/speq-patch` step 4, so the PR reports the tree it ships. Red → stop and report as in `/speq-patch` step 4.512. A run that resumed here reads the ADR and architecture lines from the commit's diff, and the affected plans from `speq plan list`.523. Ship:5354```55Run operation: ship-ready (per /speq-git-operations)56 paths: every file /speq-patch changed except the patch folder, the version file, and the lockfile57 message: <the PR title>58 title: <the PR title>59 body: per references/pr-body-template.md60```61624. Delete the patch folder `specs/_plans/<patch-name>/`.6364Never merge the PR.6566### 6. Report6768Give the PR link, the new version, and the `/speq-patch` report.