Skip to content
This repository was archived by the owner on Nov 25, 2026. It is now read-only.

docs(skills/create-pr): infer Linear ticket and skip pre-create confirmation - #501

Merged
wmadden merged 1 commit into
mainfrom
chore/create-pr-skill-no-confirm
May 14, 2026
Merged

wmadden merged 1 commit into
mainfrom
chore/create-pr-skill-no-confirm

Conversation

@wmadden

@wmadden wmadden commented May 14, 2026 •

Copy link
Copy Markdown
Contributor

At a glance

Two confirmation steps removed from the create-pr skill, replaced by inference + direct action:

### Step 2: Resolve the Linear Ticket

Resolve the Linear ticket from context — **do not ask the user**. The ticket is almost always derivable from one of:

1. **The branch name.** Most branches are named `tml-NNNN-…` (lower-case form of the Linear identifier). The current ticket is whatever matches `(?i)\b(TML-\d+)\b` in `git rev-parse --abbrev-ref HEAD`. Use the trailing slug from the branch name verbatim as `$SLUG`.
2. **The conversation context.** If the user previously linked or named a ticket in this conversation, use that.
3. **The most recent commit messages on the branch.** Look for a `Refs: TML-NNNN` or `(TML-NNNN)` trailer / mention in `git log "$BASE_BRANCH..HEAD"`.

…

Only ask the user if **all three** sources fail to yield an identifier.
### Step 5: Push and Create

Open the PR directly — **do not ask the user to confirm the title or body first**. The skill's quality bar is the structure and forbidden-patterns checklist above; running through that in your own head is the gate, not a confirmation prompt. (If the user wants changes after the fact, they will tell you and you can edit the PR via `gh pr edit`.)

This isn't tied to a Linear ticket — it's a workflow tweak surfaced while opening #500, where both prompts produced friction without value.

Decision

The create-pr skill should be a single-pass workflow whenever the agent has enough context to do the right thing. Two prompts were the main cost:

  1. Asking for the Linear ticket URL even though almost every branch is named tml-NNNN-… and the slug is embedded in the branch name verbatim. The agent already had the ticket; the prompt was pure overhead.
  2. Asking the user to confirm the title and body before gh pr create. The skill's "Required structure" + "Forbidden / discouraged patterns" sections are the actual quality gate; running them through the agent's own pre-flight check is the right enforcement point. Post-creation gh pr edit is a cheap safety net for any wording the user wants to tweak.

Don't Do items 6 and 7 are flipped accordingly — the old "always ask" rules become "infer first; only ask if you genuinely can't" and "open the PR; let the user edit if they want changes".

How it fits together

  1. Step 2 (was "Ask for Linear Ticket", now "Resolve the Linear Ticket") — replaces the prompt with a three-source inference (branch name → conversation → commit trailers), with an explicit fallback-only ask.
  2. Step 5 (was "Confirm and Create", now "Push and Create") — drops the "present the full title and description to the user for review" line; the skill goes straight to push + gh pr create.
  3. Don't Do items 6 & 7 — flipped from "don't create the PR without confirming" / "always ask" to "open the PR; don't ask".

Behavior changes & evidence

Compatibility / migration / risk

  • No code or runtime impact. This is a documentation file consumed by AI agents at PR-authoring time.
  • The gh pr edit escape hatch is real and cheap. Both title and body are editable after creation, so a too-eager push remains recoverable.
  • The new "infer the ticket" path can fail. When it does, the skill falls back to asking with a concrete proposal — explicit in Step 2's last paragraph.

Follow-ups

None. If the inference logic proves insufficient in practice, we can extend Step 2 with more sources (e.g. gh pr view for branches that already have a draft PR).

Alternatives considered

  • Keep the title/body confirmation gate. Rejected because the skill already encodes the quality bar (structure + forbidden patterns) that the confirmation was supposed to enforce, and gh pr edit is a low-friction post-creation correction path. The prompt added latency without changing outcomes.
  • Make the Linear ticket field strictly required and continue to prompt. Rejected because the ticket is almost always derivable from the branch name (and the conversation, and recent commit trailers), so the prompt was redundant in the common case. The fallback ask survives for the rare case where it isn't.
  • Split the two policy changes into separate PRs. Rejected because they're the same intent ("trust the agent to infer; don't gate on confirmation") in two adjacent steps of the same skill, and they share the same Don't Do table.

Summary by CodeRabbit

  • New Features

    • PR creation is fully automated — branches are pushed and PRs opened immediately without prompting for title/body.
    • Linear ticket linking is automatic, inferred from branch names, recent commits, or prior context; user prompted only as a last resort.
  • Chores

    • Updated skill instructions and “Don’t Do” rules to forbid title/body confirmation prompts and asking for the Linear ticket.

Review Change Stack

@wmadden
wmadden requested a review from a team as a code owner May 14, 2026 13:12
@coderabbitai

coderabbitai Bot commented May 14, 2026 •

Copy link
Copy Markdown
Contributor

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: 6a3c5036-70c0-43c2-91a3-13dc07c9857e

📥 Commits

Reviewing files that changed from the base of the PR and between 938c368 and 7ad14fb.

📒 Files selected for processing (1)
  • .agents/skills/create-pr/SKILL.md

📝 Walkthrough

Walkthrough

The create-pr skill instructions now infer the Linear ticket from branch name, conversation context, or recent commits (prompting only if all fail), detect the PR base branch dynamically, and automatically push and create the PR via gh pr create --body-file without asking the user to confirm title/body. The "Don't Do" rules are updated to match.

Changes

Automated PR Creation Skill

Layer / File(s) Summary
Automated ticket inference and PR creation
.agents/skills/create-pr/SKILL.md
Step 2 infers $TICKET_ID and $SLUG from branch name, conversation context, or recent commits before prompting the user as a fallback. Step 5 automatically pushes the branch if required and creates the PR using gh pr create --body-file without asking the user to confirm title/body. The "Don't Do" section is updated to forbid asking for the Linear ticket and forbids title/body confirmation.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • prisma/prisma-next#501: Both PRs update the same .agents/skills/create-pr/SKILL.md instructions to infer the Linear ticket automatically and to skip any pre-create title/body confirmation by pushing and immediately running gh pr create, including aligning the “Don’t Do” rules to forbid those prompts.

Poem

🐰 Branches hum a quiet tune tonight,
I sniff commits by soft moonlight,
I find the ticket, push with cheer,
And open PRs—no prompt, no fear,
Hopping swift to save your sight.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the two main behavioral changes: inferring the Linear ticket and removing pre-creation confirmation steps.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/create-pr-skill-no-confirm

Comment @coderabbitai help to get the list of available commands and usage tips.

@pkg-pr-new

pkg-pr-new Bot commented May 14, 2026

Copy link
Copy Markdown

Open in StackBlitz

@prisma-next/mongo-runtime

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/mongo-runtime@501

@prisma-next/family-mongo

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/family-mongo@501

@prisma-next/sql-runtime

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/sql-runtime@501

@prisma-next/family-sql

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/family-sql@501

@prisma-next/extension-arktype-json

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/extension-arktype-json@501

@prisma-next/extension-cipherstash

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/extension-cipherstash@501

@prisma-next/middleware-telemetry

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/middleware-telemetry@501

@prisma-next/mongo

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/mongo@501

@prisma-next/extension-paradedb

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/extension-paradedb@501

@prisma-next/extension-pgvector

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/extension-pgvector@501

@prisma-next/extension-postgis

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/extension-postgis@501

@prisma-next/postgres

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/postgres@501

@prisma-next/sql-orm-client

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/sql-orm-client@501

@prisma-next/sqlite

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/sqlite@501

@prisma-next/target-mongo

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/target-mongo@501

@prisma-next/adapter-mongo

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/adapter-mongo@501

@prisma-next/driver-mongo

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/driver-mongo@501

@prisma-next/contract

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/contract@501

@prisma-next/utils

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/utils@501

@prisma-next/config

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/config@501

@prisma-next/errors

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/errors@501

@prisma-next/framework-components

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/framework-components@501

@prisma-next/operations

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/operations@501

@prisma-next/ts-render

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/ts-render@501

@prisma-next/contract-authoring

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/contract-authoring@501

@prisma-next/ids

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/ids@501

@prisma-next/psl-parser

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/psl-parser@501

@prisma-next/psl-printer

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/psl-printer@501

@prisma-next/cli

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/cli@501

@prisma-next/emitter

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/emitter@501

@prisma-next/migration-tools

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/migration-tools@501

prisma-next

npm i https://pkg.pr.new/prisma/prisma-next@501

@prisma-next/vite-plugin-contract-emit

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/vite-plugin-contract-emit@501

@prisma-next/mongo-codec

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/mongo-codec@501

@prisma-next/mongo-contract

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/mongo-contract@501

@prisma-next/mongo-value

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/mongo-value@501

@prisma-next/mongo-contract-psl

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/mongo-contract-psl@501

@prisma-next/mongo-contract-ts

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/mongo-contract-ts@501

@prisma-next/mongo-emitter

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/mongo-emitter@501

@prisma-next/mongo-schema-ir

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/mongo-schema-ir@501

@prisma-next/mongo-query-ast

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/mongo-query-ast@501

@prisma-next/mongo-orm

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/mongo-orm@501

@prisma-next/mongo-query-builder

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/mongo-query-builder@501

@prisma-next/mongo-lowering

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/mongo-lowering@501

@prisma-next/mongo-wire

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/mongo-wire@501

@prisma-next/sql-contract

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/sql-contract@501

@prisma-next/sql-errors

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/sql-errors@501

@prisma-next/sql-operations

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/sql-operations@501

@prisma-next/sql-schema-ir

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/sql-schema-ir@501

@prisma-next/sql-contract-psl

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/sql-contract-psl@501

@prisma-next/sql-contract-ts

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/sql-contract-ts@501

@prisma-next/sql-contract-emitter

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/sql-contract-emitter@501

@prisma-next/sql-lane-query-builder

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/sql-lane-query-builder@501

@prisma-next/sql-relational-core

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/sql-relational-core@501

@prisma-next/sql-builder

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/sql-builder@501

@prisma-next/target-postgres

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/target-postgres@501

@prisma-next/target-sqlite

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/target-sqlite@501

@prisma-next/adapter-postgres

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/adapter-postgres@501

@prisma-next/adapter-sqlite

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/adapter-sqlite@501

@prisma-next/driver-postgres

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/driver-postgres@501

@prisma-next/driver-sqlite

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/driver-sqlite@501

commit: 773ece4

@wmadden
wmadden force-pushed the chore/create-pr-skill-no-confirm branch from 773ece4 to 938c368 Compare May 14, 2026 15:12
…eate confirmation

Two friction points the previous skill imposed unnecessarily:

1. It asked the user for the Linear ticket URL even when the branch
   name (tml-NNNN-...) or recent commits clearly named one. Step 2 now
   resolves the ticket from branch name, conversation, or commit
   trailers, and only falls back to asking when all three fail.
2. It required showing the title and body to the user for approval
   before running `gh pr create`. The structure + forbidden-patterns
   checklist is the quality gate; the user can always edit the PR
   afterwards via `gh pr edit`. Step 5 now opens the PR directly.

Signed-off-by: Will Madden <[email protected]>
@wmadden
wmadden force-pushed the chore/create-pr-skill-no-confirm branch from 938c368 to 7ad14fb Compare May 14, 2026 15:14
@wmadden
wmadden merged commit e96be8e into main May 14, 2026
5 checks passed
@wmadden
wmadden deleted the chore/create-pr-skill-no-confirm branch May 14, 2026 15:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant