agentleFS
haco29haco29/agentic-sdlc/skills/open-pull-request/SKILL.md

open-pull-request

Skill0 starsChanged 17 days agoMITView on GitHub

Checks the SDLC gates for the current branch and opens a pull request that carries the evidence, or writes the PR description to sdlc/<branch>/pr.md when no PR can be opened. Use when the user runs /sdlc:pr or asks to open, raise or prepare a pull request.

  • Commits and pushes

4 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Check the working tree: Run git status --porcelain.

    line 15
  2. Distinctive:

    All gates pass: open a ready PR.

    line 23
  3. Very specific:

    When gh auth status succeeds, origin is on GitHub, and viewerPermission is WRITE, MAINTAIN or ADMIN: git push -u origin HEAD, write the …

    line 41

“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Open a pull request

A PR is the end of the loop, so it should prove the loop ran. Paths, gates and the coverage checklist are defined in sdlc:sdlc-artifacts.

Steps

  1. Resolve the folder. On the default branch or a detached HEAD, stop and ask for a feature branch.
  2. Check the working tree. Run git status --porcelain. Uncommitted changes inside $DIR/ are artifacts: commit them as docs(sdlc): artifacts for <feature>. Any other uncommitted change: show it and ask the user to commit or stash it. Don't commit code on their behalf here.
  3. Run the gates. Find the project's test and lint commands (its CLAUDE.md, README, or CI config) and run them yourself for G4. Append the run to Test evidence. Show the gate table.
  4. Decide readiness.
    • All gates pass: open a ready PR.
    • Any gate fails: name the failing gates and ask: fix first (recommended), or open a draft that lists the failures. Never open a ready PR with a failing gate.
  5. Write the title and body.
    • Title: conventional-commit style, from the spec's objective, at most 72 characters.
    • Body, in this order:
      • Why: the spec's objective, linking spec.md.
      • What changed: one line per task from plan.md.
      • How it was tested: the latest Test evidence lines, verbatim.
      • Gates: the gate table.
      • Review: from review.md, what was fixed and what was deferred, with reasons.
      • Out of scope: the spec's non-goals and any follow-ups.
  6. Choose the repo and base. The PR goes to the repository origin points at: gh repo view --json nameWithOwner,isFork,defaultBranchRef,viewerPermission. On a fork, gh would otherwise target the parent, so always pass --repo <nameWithOwner> unless the user asks for the parent. The base is the branch the user named, else that repo's default branch.
  7. Open it.
    • When gh auth status succeeds, origin is on GitHub, and viewerPermission is WRITE, MAINTAIN or ADMIN: git push -u origin HEAD, write the body to a temporary file, then gh pr create --repo <nameWithOwner> --base <base> --title "<title>" --body-file <file> (add --draft when a gate failed). Print the PR URL.
    • Otherwise (no GitHub, no gh, no network, or no write access to origin, as in a plain clone of someone else's repo): write $DIR/pr.md with the title, base and body, and tell the user to paste it into their review tool. Without write access, also say why, and that a fork or a copy of their own would let them open a real PR. Never create a fork or a repo for them.
  8. Tick nothing new. /sdlc:pr is not in the coverage list; the PR itself is the evidence.

Never

  • Push to the base branch, force-push, or merge.
  • Mark a failing gate as passing, or tick coverage lines for commands that didn't run.
  • Pad the body with claims that aren't in the artifacts.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.