بنقرة واحدة
pr-context
// Shared atom for gathering full PR context -- metadata, diff, conversation, linked Linear ticket. Background knowledge for workflow commands -- not invoked directly.
// Shared atom for gathering full PR context -- metadata, diff, conversation, linked Linear ticket. Background knowledge for workflow commands -- not invoked directly.
Shared atom for running quality checks, committing, and pushing. Background knowledge for workflow commands -- not invoked directly.
Full PR workflow -- ticket, branch, verify, lint, test, commit, push, open PR. Use when the user asks to open, ship, or land a PR; handles fresh work, mid-fix state, and changes already verified in the session.
Shared atom for analyzing a diff and writing a structured PR description. Background knowledge for workflow commands -- not invoked directly.
Root-cause-first debugging by tracing expected behavior to the first unintended side effect before changing contracts, parsing, or types. Use when debugging protocol errors, deserialization failures, null payloads, missing fields, restore or hydration issues, state-ownership bugs, unexpected requests, background mutations, or reviewing code where the visible failure may be downstream noise. Also loaded by /implement during bug-fix flows.
Control and navigate a logged-in macOS GUI session with upstream trycua/cua `cua-driver`. Use for macOS app automation, native dialogs, screenshots, UI inspection, clicking, typing, hotkeys, and any task where a Droid needs reliable computer-use control of macOS.
Reference for using linear-cli (aliased as `linear`) to manage Linear.app issues, projects, cycles, and sprints from the terminal. Use when the user mentions Linear tickets, issues, project management, or sprint planning.
| name | pr-context |
| description | Shared atom for gathering full PR context -- metadata, diff, conversation, linked Linear ticket. Background knowledge for workflow commands -- not invoked directly. |
| user-invocable | true |
Accept PR reference as: #123, 123, or a full GitHub URL. Extract the number.
gh pr view <number> --json title,body,headRefName,baseRefName,additions,deletions,changedFiles,commits,labels,reviewRequests,headRefOid
gh pr view <number> --comments
gh pr diff <number>
Scan the PR body for Linear ticket references (patterns like TEAM-123, or Linear URLs). If found:
linear i get <ID> --output json --comments
Extract from the ticket: problem statement, acceptance criteria, constraints, and discussion context.
REPO=$(gh repo view --json nameWithOwner --jq '.nameWithOwner')
HEAD_SHA=$(gh pr view <number> --json headRefOid --jq '.headRefOid')
These values are needed by commands that post review comments or interact with the GitHub API.
Choose the right gh interface for each operation. gh pr edit is currently broken on orgs that still have Projects (classic) enabled -- it fails with a GraphQL deprecation error on every invocation, regardless of flags. Route every mutation through REST instead.
| Operation | Use | Why |
|---|---|---|
| View/list PRs, issues | gh pr view, gh issue list | CLI works for reads |
| Create PR | gh pr create | CLI handles all create options |
| Update PR title | gh api repos/$REPO/pulls/<N> -X PATCH -f title="..." | gh pr edit --title hits Projects-classic deprecation |
| Update PR body | gh api repos/$REPO/pulls/<N> -X PATCH -f body="..." | gh pr edit --body hits same deprecation |
| Add reviewer | gh api repos/$REPO/pulls/<N>/requested_reviewers --method POST -f "reviewers[]=<login>" | gh pr edit --add-reviewer hits same deprecation |
| Add label | gh api repos/$REPO/issues/<N>/labels --method POST -f "labels[]=<label>" | gh pr edit --add-label hits same deprecation |
| Post line-level review comments | gh api repos/$REPO/pulls/<N>/comments --method POST -f ... | CLI cannot target specific diff lines or sides |
| Code suggestion comments | REST API with ```suggestion blocks in body | CLI has no code suggestion support |
| Resolve review threads | gh api graphql with resolveReviewThread mutation | No REST endpoint exists for thread resolution |
| Merge PR | gh pr merge | CLI handles merge strategies |
Rule of thumb: gh pr/gh issue CLI for reads and gh pr create/gh pr merge only. Every PR mutation (body, title, labels, reviewers) goes through gh api REST. gh api graphql is reserved for thread resolution and complex queries that need nested data.
Do not retry gh pr edit when it fails -- the error is deterministic, not transient. Switch to REST immediately.