PR Draft Summary
Purpose
Produce the PR-ready summary for cashubtc/coco after substantive work is complete:
a branch suggestion, a Conventional Commit-style PR title, and a concise PR
description aligned with CONTRIBUTING.md.
When to Trigger
- The task is finished or ready for review and it touched runtime code, tests,
docs with behavior impact, examples, or build/test/release configuration.
- Treat this as the default final handoff step for substantive code work. Run it
after verification and after any needed changeset work.
- Skip only for trivial or conversation-only tasks, repo-meta/doc-only changes
without behavior impact, or when the user explicitly says not to include it.
Inputs to Collect Automatically (do not ask the user)
- Current branch:
git rev-parse --abbrev-ref HEAD
- Working tree:
git status -sb
- Untracked files:
git ls-files --others --exclude-standard
- Changed files:
- unstaged:
git diff --name-only
- staged:
git diff --name-only --cached
- stats:
git diff --stat and git diff --stat --cached
- Base reference:
- Prefer the PR base branch, not the current branch's upstream.
- Use
BASE_REF=$(git symbolic-ref --short refs/remotes/origin/HEAD 2>/dev/null || echo origin/master) by default.
- If the PR base branch is known and differs from the default branch, use that explicit base instead.
- Only fall back to
git rev-parse --abbrev-ref --symbolic-full-name @{upstream} when the upstream branch is intentionally the PR base.
BASE_COMMIT=$(git merge-base --fork-point "$BASE_REF" HEAD || git merge-base "$BASE_REF" HEAD || echo "$BASE_REF")
- Commits ahead of the base fork point:
git log --oneline --no-merges ${BASE_COMMIT}..HEAD
- Category signals for this repo:
- runtime:
packages/core/**, packages/react/**, packages/indexeddb/**,
packages/expo-sqlite/**, packages/sqlite3/**,
packages/sqlite-bun/**, packages/adapter-tests/**, scripts/**
- tests:
packages/core/test/**, packages/*/src/test/**,
scripts/test-integration.sh, scripts/auth_mint/**
- docs:
packages/docs/**, README.md, CONTRIBUTING.md, AGENTS.md
- build/test/release config:
package.json, bun.lock, .changeset/**,
.github/workflows/**, tsconfig*.json, packages/*/tsconfig*.json,
packages/*/vitest.config.ts, packages/react/eslint.config.js,
.prettierrc, .prettierignore
- Title scope mapping:
core -> packages/core/**
react -> packages/react/**
indexeddb -> packages/indexeddb/**
expo-sqlite -> packages/expo-sqlite/**
sqlite3 -> packages/sqlite3/**
sqlite-bun -> packages/sqlite-bun/**
adapter-tests -> packages/adapter-tests/**
docs -> packages/docs/**
- use no scope for repo-wide or multi-area changes
Workflow
- Run the commands above without asking the user.
- If there are no staged, unstaged, or untracked changes and no commits ahead
of
${BASE_COMMIT}, reply briefly that no code changes were detected and do
not emit the PR block.
- Treat
${BASE_REF} as the intended PR target branch. Do not default to the
current branch's upstream when it merely points to the same branch on origin.
- Infer the change type from the touched paths:
feat for new user-facing or public functionality
fix for bug fixes or correctness issues
docs for documentation-only changes
test for test-only changes
refactor for internal cleanup without intended behavior change
chore for maintenance, tooling, workflow, or release housekeeping
- Pick the title scope from the mapping above when one package or area clearly
dominates. If the diff spans multiple major areas, omit the scope.
- Summarize the change in 1-3 short sentences using the most important paths
and
git diff --stat. Explicitly mention untracked files because --stat
does not include them. If the worktree is clean but there are commits ahead
of ${BASE_COMMIT}, summarize from those commit messages.
- Explain the problem being solved, not just the implementation. For bug fixes,
include the symptom, failure mode, or repro. For features, explain the user
or maintainer need.
- Include verification steps in the PR description. Prefer the smallest
relevant commands that were actually run. If no verification was run, say so
plainly rather than inventing coverage.
- If the change touches a published package or public docs for a published
package, check whether a new file was added under
.changeset/. Mention the
changeset in the draft description when relevant; if none was added, call
that out briefly instead of guessing.
- Flag compatibility risk only when the diff changes released public APIs,
package exports, persisted data, release configuration, or wire/protocol
behavior.
- Suggest a branch name. If already off
master, keep the current branch.
Otherwise propose feat/<slug>, fix/<slug>, docs/<slug>,
refactor/<slug>, test/<slug>, or chore/<slug>.
- If the current branch matches
issue-<number> (digits only), keep that
branch suggestion. When an issue number is present, reference
https://github.com/cashubtc/coco/issues/<number> and include
This pull request resolves #<number>.
- If the change affects UI or docs visuals, add a short reminder in the
description to attach screenshots or preview images.
- Draft the PR title and description using the template below.
- Output only the block in "Output Format", with at most a very short status
note before it.
Title guidance
- Use an imperative Conventional Commit-style title.
- Prefer a scope when the affected package or area is clear:
fix(core): prevent duplicate quote sync
feat(react): add wallet provider reset hook
docs(docs): clarify adapter setup
- Use an unscoped title for repo-wide work:
chore: update release workflow
- Keep the title specific to the user-visible or reviewer-relevant outcome, not
the internal mechanism.
Output Format
When closing out a task, add this concise Markdown block after any brief status
note unless the task falls under the documented skip cases or the user says they
do not want it.
# Pull Request Draft
## Branch name suggestion
git checkout -b <branch-name>
## Title
<type[(scope)] : imperative summary>
## Description
This pull request <adds|fixes|updates|improves> ...
## Problem
<what was broken, missing, unclear, or risky, and why this change was needed>
## Summary
- <key change>
- <key change>
- <optional compatibility note, screenshot reminder, or follow-up note>
## Verification
- <command actually run>
- <command actually run>
## Changeset
- <added `.changeset/...md` or explain why one was not added when relevant>
Keep it tight. Do not pad the description with generic filler, and do not claim
tests or screenshots that were not actually produced.
1---2name: pr-draft-summary3description: Create the repo-ready PR draft block, branch suggestion, Conventional Commit-style title, and concise PR description for cashubtc/coco after substantive code changes. Use in the final handoff for runtime, test, docs-with-impact, or build/config work; skip only for trivial or conversation-only tasks, repo-meta or docs-only changes without behavior impact, or when the user explicitly says not to include it.4---56# PR Draft Summary78## Purpose910Produce the PR-ready summary for `cashubtc/coco` after substantive work is complete:11a branch suggestion, a Conventional Commit-style PR title, and a concise PR12description aligned with `CONTRIBUTING.md`.1314## When to Trigger1516- The task is finished or ready for review and it touched runtime code, tests,17 docs with behavior impact, examples, or build/test/release configuration.18- Treat this as the default final handoff step for substantive code work. Run it19 after verification and after any needed changeset work.20- Skip only for trivial or conversation-only tasks, repo-meta/doc-only changes21 without behavior impact, or when the user explicitly says not to include it.2223## Inputs to Collect Automatically (do not ask the user)2425- Current branch: `git rev-parse --abbrev-ref HEAD`26- Working tree: `git status -sb`27- Untracked files: `git ls-files --others --exclude-standard`28- Changed files:29 - unstaged: `git diff --name-only`30 - staged: `git diff --name-only --cached`31 - stats: `git diff --stat` and `git diff --stat --cached`32- Base reference:33 - Prefer the PR base branch, not the current branch's upstream.34 - Use `BASE_REF=$(git symbolic-ref --short refs/remotes/origin/HEAD 2>/dev/null || echo origin/master)` by default.35 - If the PR base branch is known and differs from the default branch, use that explicit base instead.36 - Only fall back to `git rev-parse --abbrev-ref --symbolic-full-name @{upstream}` when the upstream branch is intentionally the PR base.37 - `BASE_COMMIT=$(git merge-base --fork-point "$BASE_REF" HEAD || git merge-base "$BASE_REF" HEAD || echo "$BASE_REF")`38- Commits ahead of the base fork point:39 `git log --oneline --no-merges ${BASE_COMMIT}..HEAD`40- Category signals for this repo:41 - runtime: `packages/core/**`, `packages/react/**`, `packages/indexeddb/**`,42 `packages/expo-sqlite/**`, `packages/sqlite3/**`,43 `packages/sqlite-bun/**`, `packages/adapter-tests/**`, `scripts/**`44 - tests: `packages/core/test/**`, `packages/*/src/test/**`,45 `scripts/test-integration.sh`, `scripts/auth_mint/**`46 - docs: `packages/docs/**`, `README.md`, `CONTRIBUTING.md`, `AGENTS.md`47 - build/test/release config: `package.json`, `bun.lock`, `.changeset/**`,48 `.github/workflows/**`, `tsconfig*.json`, `packages/*/tsconfig*.json`,49 `packages/*/vitest.config.ts`, `packages/react/eslint.config.js`,50 `.prettierrc`, `.prettierignore`51- Title scope mapping:52 - `core` -> `packages/core/**`53 - `react` -> `packages/react/**`54 - `indexeddb` -> `packages/indexeddb/**`55 - `expo-sqlite` -> `packages/expo-sqlite/**`56 - `sqlite3` -> `packages/sqlite3/**`57 - `sqlite-bun` -> `packages/sqlite-bun/**`58 - `adapter-tests` -> `packages/adapter-tests/**`59 - `docs` -> `packages/docs/**`60 - use no scope for repo-wide or multi-area changes6162## Workflow63641. Run the commands above without asking the user.652. If there are no staged, unstaged, or untracked changes and no commits ahead66 of `${BASE_COMMIT}`, reply briefly that no code changes were detected and do67 not emit the PR block.683. Treat `${BASE_REF}` as the intended PR target branch. Do not default to the69 current branch's upstream when it merely points to the same branch on origin.704. Infer the change type from the touched paths:71 - `feat` for new user-facing or public functionality72 - `fix` for bug fixes or correctness issues73 - `docs` for documentation-only changes74 - `test` for test-only changes75 - `refactor` for internal cleanup without intended behavior change76 - `chore` for maintenance, tooling, workflow, or release housekeeping775. Pick the title scope from the mapping above when one package or area clearly78 dominates. If the diff spans multiple major areas, omit the scope.796. Summarize the change in 1-3 short sentences using the most important paths80 and `git diff --stat`. Explicitly mention untracked files because `--stat`81 does not include them. If the worktree is clean but there are commits ahead82 of `${BASE_COMMIT}`, summarize from those commit messages.837. Explain the problem being solved, not just the implementation. For bug fixes,84 include the symptom, failure mode, or repro. For features, explain the user85 or maintainer need.868. Include verification steps in the PR description. Prefer the smallest87 relevant commands that were actually run. If no verification was run, say so88 plainly rather than inventing coverage.899. If the change touches a published package or public docs for a published90 package, check whether a new file was added under `.changeset/`. Mention the91 changeset in the draft description when relevant; if none was added, call92 that out briefly instead of guessing.9310. Flag compatibility risk only when the diff changes released public APIs,94 package exports, persisted data, release configuration, or wire/protocol95 behavior.9611. Suggest a branch name. If already off `master`, keep the current branch.97 Otherwise propose `feat/<slug>`, `fix/<slug>`, `docs/<slug>`,98 `refactor/<slug>`, `test/<slug>`, or `chore/<slug>`.9912. If the current branch matches `issue-<number>` (digits only), keep that100 branch suggestion. When an issue number is present, reference101 `https://github.com/cashubtc/coco/issues/<number>` and include102 `This pull request resolves #<number>.`10313. If the change affects UI or docs visuals, add a short reminder in the104 description to attach screenshots or preview images.10514. Draft the PR title and description using the template below.10615. Output only the block in "Output Format", with at most a very short status107 note before it.108109## Title guidance110111- Use an imperative Conventional Commit-style title.112- Prefer a scope when the affected package or area is clear:113 - `fix(core): prevent duplicate quote sync`114 - `feat(react): add wallet provider reset hook`115 - `docs(docs): clarify adapter setup`116- Use an unscoped title for repo-wide work:117 - `chore: update release workflow`118- Keep the title specific to the user-visible or reviewer-relevant outcome, not119 the internal mechanism.120121## Output Format122123When closing out a task, add this concise Markdown block after any brief status124note unless the task falls under the documented skip cases or the user says they125do not want it.126127```md128# Pull Request Draft129130## Branch name suggestion131132git checkout -b <branch-name>133134## Title135136<type[(scope)] : imperative summary>137138## Description139140This pull request <adds|fixes|updates|improves> ...141142## Problem143144<what was broken, missing, unclear, or risky, and why this change was needed>145146## Summary147148- <key change>149- <key change>150- <optional compatibility note, screenshot reminder, or follow-up note>151152## Verification153154- <command actually run>155- <command actually run>156157## Changeset158159- <added `.changeset/...md` or explain why one was not added when relevant>160```161162Keep it tight. Do not pad the description with generic filler, and do not claim163tests or screenshots that were not actually produced.